Commit Graph

272670 Commits

Author SHA1 Message Date
Chuck Tuffli
c2318cf80a nvme: fix spelling of Namespace
Fix spelling of a macro definition.

Reviewed by:	mav, imp
Differential Revision:	https://reviews.freebsd.org/D34330
2022-02-21 10:34:46 -08:00
Chuck Tuffli
e71afa1202 nvme: Add OAES bit-field definitions
Create definitions for the Optional Asynchronous Events Supported (OAES)
values. Also adds a helper macro for the common use case of "mask and
shift". E.g.
    value = NVME_CTRLR_DATA_OAES_NS_ATTR_MASK << NVME_CTRLR_DATA_OAES_NS_ATTR_SHIFT;
becomes
    value = NVMEB(NVME_CTRLR_DATA_OAES_NS_ATTR);

Reviewed by:	mav, imp
Differential Revision:	https://reviews.freebsd.org/D34300
2022-02-21 10:34:14 -08:00
Emmanuel Vadot
f898e41925 files: Make mmc_helper depend on gpio
mmc_helper have an hard dependency on gpio_if.h
gpio(4) isn't in the default x86 kernel and none of the x86
sd/mmc drivers uses mmc_helper so just add a dependency on gpio.

Fixes: 85b3794cee ("files: Make ext_resources non-optional")
2022-02-21 18:31:00 +01:00
Emmanuel Vadot
b25ff2b9d3 man: Remove mention of EXT_RESOURCES
It doesn't exists anymore.

Reviewed by:	debdrup (manpages)
Differential Revision:	https://reviews.freebsd.org/D33840
2022-02-21 17:29:17 +01:00
Emmanuel Vadot
8b39d2fe35 options: Remove EXT_RESOURCES
It is now unused in kernel code.

MFC after:	Never
Differential Revision:	https://reviews.freebsd.org/D33839
2022-02-21 17:29:15 +01:00
Emmanuel Vadot
092a42a6a3 riscv: conf: Remove options EXT_RESOURCES
It is now unused in kernel code.

Reviewed by:	mhorne
MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33838
2022-02-21 17:29:13 +01:00
Emmanuel Vadot
34223f74a2 arm: conf: Remove options EXT_RESOURCES
It is now unused in kernel code.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33837
2022-02-21 17:29:11 +01:00
Emmanuel Vadot
90288dcb4c arm64: conf: Remove options EXT_RESOURCES
It is now unused in kernel code.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D33836
2022-02-21 17:29:09 +01:00
Emmanuel Vadot
02398e581d ofw_cpu: Make ext_resources non-optional for arm* and riscv
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.
For RISC-V it was always enabled.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D33835
2022-02-21 17:29:07 +01:00
Emmanuel Vadot
85b3794cee files: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D33834
2022-02-21 17:29:06 +01:00
Emmanuel Vadot
ee2e56c6d7 armv7: allwinner: Make ext_resources non-optional
The only valid condition for if_awg and aw_syscon is syscon.
EXT_RESOURCES is enabled in GENERIC since 12-CURRENT.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D33833
2022-02-21 17:29:04 +01:00
Emmanuel Vadot
4bcdfeb06f vf_i2c: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33832
2022-02-21 17:29:02 +01:00
Emmanuel Vadot
90a5fc326e imx_gpio: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33831
2022-02-21 17:29:00 +01:00
Emmanuel Vadot
774a4b6a51 imx_i2c: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33830
2022-02-21 17:28:58 +01:00
Emmanuel Vadot
14444bf7c8 bcm2835_sdhci: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

Reviewed by:	kevans
MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33829
2022-02-21 17:28:56 +01:00
Emmanuel Vadot
5c00765bf2 uart_dev_snps: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33828
2022-02-21 17:28:54 +01:00
Emmanuel Vadot
fb6cebd8bd usb: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33827
2022-02-21 17:28:52 +01:00
Emmanuel Vadot
4f64df4e32 uart_dev_imx: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33826
2022-02-21 17:28:50 +01:00
Emmanuel Vadot
d46fd9e855 if_cgem: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33825
2022-02-21 17:28:48 +01:00
Emmanuel Vadot
a813b0965d sdhci: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33824
2022-02-21 17:28:46 +01:00
Emmanuel Vadot
36498b1408 twsi: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33823
2022-02-21 17:28:44 +01:00
Emmanuel Vadot
b4cc0f7d28 dwmmc: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33822
2022-02-21 17:28:42 +01:00
Emmanuel Vadot
78f8b4aafa mmc: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33821
2022-02-21 17:28:40 +01:00
Emmanuel Vadot
a5339ba3ff dwc: Make ext_resources non-optional
EXT_RESOURCES have been introduced in 12-CURRENT and all supported
releases have it enabled in their kernel config.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D33820
2022-02-21 17:28:37 +01:00
Arka Sharma
766c2466ff mmap map_at_zero test: handle W^X
Use kern.elfXX.allow_wx to decide whether to map W+X or W-only memory.

Future work could expand this test to add an "allow_wx" axis to the
test matrix, but I would argue that a separate test should be written,
since that's orthogonal to map_at_zero.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2022-02-21 09:43:42 -06:00
Randall Stewart
ea9017fb25 tcp: Congestion control move to using reference counting.
In the transport call on 12/3 Gleb asked to move the CC modules towards
using reference counting to prevent folks from unloading a module in use.
It was also agreed that Michael would do a user space utility like tcp_drop
that could be used to move all connections that are using a specific CC
to some other CC.

This is the half I committed to doing, making it so that we maintain a refcount
on a cc module every time a pcb refers to it and decrementing that every
time a pcb no longer uses a cc module. This also helps us simplify the
whole unloading process by getting rid of tcp_ccunload() which munged
through all the tcb's. Instead we mark a module as being removed and
prevent further references to it. We also make sure that if a module is
marked as being removed it cannot be made as the default and also
the opposite of that, if its a default it fails and does not mark it as being
removed.

Reviewed by: Michael Tuexen, Gleb Smirnoff
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D33249
2022-02-21 06:30:17 -05:00
Martin Matuska
5ccf909af9 libarchive: merge vendor bugfix
OSS-Fuzz #44843 (security):
RAR reader: fix null-dereference in RAR (v4) filter code

X-MFC-with:	833a452e9d
2022-02-21 12:06:54 +01:00
Martin Matuska
8b3c992251 Update vendor/libarchive to libarchive/libarchive@1271f775d
Bugfixes:
OSS-Fuzz #44843 (security):
  RAR reader: fix null-dereference in RAR (v4) filter code

Obtained from:		libarchive
Libarchive commit:	1271f775dc917798ad7d03c3b3bd66bacad03603
2022-02-21 12:04:05 +01:00
Emmanuel Vadot
eb80ba8d54 cpufreq: dt: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:23 +01:00
Emmanuel Vadot
4f118605ad twsi: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:21 +01:00
Emmanuel Vadot
6582b75a32 audio_soc: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:20 +01:00
Emmanuel Vadot
79778f8692 if_dwc: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:18 +01:00
Emmanuel Vadot
8c70a27c4d arm: allwinner: a33_codec: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:16 +01:00
Emmanuel Vadot
8604ba7423 arm: allwinner: a10_timer: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:14 +01:00
Emmanuel Vadot
89f8aa7d41 pmic: rockchip: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:12 +01:00
Emmanuel Vadot
4c5b550e63 arm: allwinner: clk: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:10 +01:00
Emmanuel Vadot
cfd8b9545e arm64: allwinner: aw_usb3phy: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:08 +01:00
Emmanuel Vadot
d6ab3d1c20 arm64: allwinner: aw_i2s: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:06 +01:00
Emmanuel Vadot
3dc60bab27 arm: allwinner: aw_gpio: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:05 +01:00
Emmanuel Vadot
aeb70a6707 arm64: allwinner: axp81x: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:02 +01:00
Emmanuel Vadot
34abc89413 arm64: allwinner: aw_sid: Plug set but not used variable
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-02-21 11:08:00 +01:00
Hans Petter Selasky
eb16e362d6 mlx5core: Add PCI IDs for ConnectX-8.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-21 09:35:19 +01:00
Hans Petter Selasky
91c8ffd7e6 mlx5ib: Add support for NDR link speed.
The IBTA specification has new speed - NDR. That speed supports signaling
rate of 100Gb. mlx5 IB driver translates link modes reported by ConnectX
device to IB speed and width. Added translation of new 100Gb, 200Gb and
400Gb link modes to NDR IB type and width of x1, x2 or x4 respectively.

Linux commits:
f946e45f59ef01ff54ffb3b1eba3a8e7915e7326

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-21 09:35:19 +01:00
Hans Petter Selasky
ea8aacc523 mlx5core: Add PCI IDs for ConnectX-7.
Linux commits:
505a7f5478062c6cd11e22022d9f1bf64cd8eab3
dd8595eabeb486d41ad9994e6cece36e0e25e313

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-21 09:35:19 +01:00
Hans Petter Selasky
1aa593b90c ibcore: Add support for NDR link speed.
Add new IBTA speed NDR, supporting signaling rate of 100Gb.

Linux commit:
c7adf7717301558e8852949d8e3dc3748d1a4a97

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-02-21 09:35:19 +01:00
Li-Wen Hsu
85eeb6ea62
Temporarily skip usr.bin.diff.diff_test.functionname in CI
PR:		262086
Sponsored by:	The FreeBSD Foundation
2022-02-21 16:31:43 +08:00
Ed Maste
baf8cbcd97 Revert "Enable -Wdate-time warning"
This reverts commit 489d7a8528.

The flag leaks into some port builds, causing them to fail.  I will
recommit it with some sort of opt-out later on.

Reported by:	mi
2022-02-20 19:16:40 -05:00
Stefan Eßer
f01c863337 dev/pci: fix potential panic due to bogus VPD data
A panic has been observed on a system with a Intel X520 dual LAN
device. The panic is caused by a KASSERT() noticing that the amount
of VPD data copied out to the pciconf command does not match the
amount of data read from the device.

The cause of the size mismatch was VPD data that started with 0x82,
the VPD tag that indicates that a VPD ident follows, but with a length
of more than 255 characters, which happens to be the maximum ident
size supported by the API between kernel and the pciconf program.
The data provided did not resemble an actual VPD identifier, and it
can be assumed that the initial tag value 0x82 happens to be there
by accident.

An ident size of 255 far exceeds the sensible length of that data
element, which is in the order of at most 30 to 40 bytes.

This patch adds several consitstency checks to the VPD parser, the
most critical being that ident lengths of more than 255 bytes are
rejected. Other checks reject VPD with more than one ident tag or
with an empty (zero length) ident string.

This patch prevents the panic that occured when "pciconf -lV" was
executed on the affected system.

During the anaylsis of the issue and the VPD code it has been
found that the VPD parser uses a state machine that accepts tags
in any order and combination. This is a bad match for the actual
VPD data, which has a very simple structure that can be parsed
with a non-recursive direct descent parser (which always knows
exactly which token to expect next).

A review fpr a much simpler VPD parser that performs many more
consistency checks and rejects invalid VPD has been proposed in
review https://reviews.freebsd.org/D34268.

Reported by:	mikej at paymentallianceintl.com (Michael Jung)
Approved by:	jhb
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D34255
2022-02-20 22:36:04 +01:00
Kirk McKusick
7a1c1f6a03 Avoid unaligned writes by fsck_ffs(8).
Normally fsck_ffs never does reads or writes that are not aligned
to the size of one of the checked filesystems fragments. The one
exception is when it finds that it needs to write the superblock
recovery information. Here it will write with the alignment reported
by the underlying disk as its sector size as reported by an
ioctl(diskfd, DIOCGSECTORSIZE, &secsize).

Modern disks have a sector size of 4096, but for backward compatibility
with older disks will report that they have a sector size of 512.
When presented with a 512 byte write, they have to read the associated
4096 byte sector, replace the 512 bytes to be written, and write
the updated 4096 byte sector back to the disk. Unfortunately, some
disks report that they have 512 sectors, but fail writes that are not
aligned to 4096 boundaries and are a multiple of 4096 bytes in size.

This commit updates fsck_ffs(8) so that it uses the filesystem fragment
size as the smallest size and alignment for doing writes rather than
the disk's reported sector size.

Reported by:  Andriy Gapon
MFC after:    1 week
2022-02-20 13:21:12 -08:00
Joerg Wunsch
a52d8d4a6c
share/mk: Fix obvious typo in README (TAREGT -> TARGET)
MFC after:	1 week
2022-02-20 17:26:04 +01:00