secure: Add ssh-sk-client to all consumers of libssh
These all failed to link with ld.bfd used by GCC due to
Fssh_sshsk_sign being an unresolved symbol.
Fixes: 65d8491719bb ("secure: Adapt Makefile to ssh-sk-client everywhere")
(cherry picked from commit a098111a28ed59e1ab1101ad09913f0235ebd28f)
tarfs: tests: Increase timeout (again)
Bump the timeout value (a little more), to avoid cutoff on emulated
architectures on ci.freebsd.org.
Reported by: Jenkins
Fixes: 47015e454661 ("tests: Increase timeout")
MFC after: 3 days
(cherry picked from commit a551b0524953cbfa4f1035c6d968623e64f4436a)
tarfs: tests: Increase timeout (again 2)
Bump the timeout value (for the third time), to avoid cutoff on emulated
architectures on ci.freebsd.org. One of the runners will take
considerably more time to complete this test.
Reported by: Jenkins
Fixes: a551b0524953 ("tarfs: tests: Increase timeout (again)")
MFC after: 3 days
(cherry picked from commit a4f0a60e05293f3f517324f3ebc41046a79a9feb)
pf tests: give rules_counter:4G more time
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 8217075f9ecb12fa9a4cf746541b9d3e1dc57e79)
makefs: tests: Double the timeout of ZFS file_extend test
The test makefs_zfs_tests:file_extend is timing out on ci.freebsd.org.
Double the default timeout to allow it to finish.
Reported by: Jenkins
Reviewed by: asomers
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54425
(cherry picked from commit 065f02174f76a49fbf537ee51ed8068d3d398b08)
makefs: tests: Double the timeout of ZFS compression test
The test makefs_zfs_tests:compression is timing out on ci.freebsd.org.
Double the default timeout to allow it to finish.
While here, check if the file exists before cleaning up, otherwise, cat
may fail.
Reported by: Jenkins
Reviewed by: asomers
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54424
(cherry picked from commit 9f28e92637e9a29124f407b74d7665a921865a53)
libsa add boot_serial to is_restricted_var allow list
NOTE: variables that get passed by boot_setenv() will not have '='
so for these we need to leave that out.
It doesn't matter much unless the variable we want to allow is
also a prefix for something we do not.
Sponsored by: Hewlett Packard Enterprise Development LP
Reviewed by: kevans, imp
Differential Revision: https://reviews.freebsd.org/D61856
acpi_iicbus: Return _DSD properties of the I2C children
acpi_iicbus has no bus_get_property method, so device_get_property()
on one of its children reaches acpi(4) through
bus_generic_get_property(). acpi_bus_get_prop() then takes the
child's acpi_iicbus ivars for a struct acpi_device and follows garbage
pointers: on an HP ZBook Ultra G1a, a driver reading _DSD of its I2C
device froze the machine.
Answer for the I2C children from their own ACPI handle, with a _DSD
cache in the ivars, through a helper split out of acpi_bus_get_prop().
Reviewed by: wulf, imp
Approved by: wulf, imp
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
acpi_iicbus: Free the ivars of deleted children
acpi_iicbus_child_deleted() replaces iicbus_child_deleted() but only
detached the ACPI data, so the ivars and their resource list leaked
with every deleted child. It also used the ivars without checking
them, while iicbus_add_child_common() can leave a child without any.
Check them and call iicbus_child_deleted() at the end.
Reviewed by: wulf, imp
Approved by: wulf, imp
Fixes: 9b7938dcf338 ("iicbus(4): Add support for ACPI-based children enumeration")
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
acpi: Return the handle of a reference property, not its target
acpi_bus_get_prop() copied the first bytes of the namespace node a
_DSD reference points to, instead of the handle itself, when a caller
asked for such a property with a type other than DEVICE_PROP_HANDLE.
Reviewed by: wulf, imp
Approved by: wulf, imp
Fixes: 99e6980fcf5e ("device_get_property: add a HANDLE case")
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
amdgpio: Add PNP info for devmatch
amdgpio is not in GENERIC and exports no PNP info, so devmatch(8)
never loads it, and GPIO consumers on AMD systems find no controller
unless amdgpio is in kld_list.
Export the ACPI ids so devmatch(8) loads the module at boot.
Reviewed by: imp
Approved by: imp
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/116
ig4: Add an AMD generation with a 150 MHz clock
AMDI0010 controllers attached as Atom, whose timings assume a 100 MHz
input clock, but they run from 150 MHz (Linux drivers/acpi/acpi_apd.c),
so the bus runs above the 400 kHz of fast mode and the SDA hold time
is a third short. The median of 200 timed 1 KB reads on an HP ZBook
Ultra G1a gives an effective 472 kHz before and 348 kHz after.
Give them their own generation: the Atom timings with a 150 MHz clock,
and of the Atom register handling only the DesignWare FIFO depth and
component version checks, not the Intel LPSS private registers. It
sorts before IG4_SKYLAKE, so IG4_HAS_ADDREGS() stays false.
Reviewed by: wulf, imp
Approved by: wulf, imp
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/114
amdiommu: Skip the invalidation after PTE-only maps
amdiommu_map_buf() waited for an invalidation after every map, so each
busdma load cost a command round trip and a completion interrupt. A
128 KB NVMe read raised 51 IOMMU interrupts on a Ryzen 7 7735HS and 66
on a Ryzen AI Max+ PRO 395, where reads ran at 200 MB/s instead of
900 MB/s without the IOMMU.
Filling non-present PTEs needs no invalidation unless the capability
header reports NpCache, which is how Linux handles it. A new PDE still
does: unmap frees empty page table pages and clears their PDE before
the deferred invalidation runs, and skipping the flush then produced
IO_PAGE_FAULTs from nvme(4). A concurrent map that uses such a PDE
before its flush completes flushes too.
With this change the same reads raise 19 and 33 interrupts, and the
second machine reads at 400 to 440 MB/s.
Reviewed by: kib, kbowling
[3 lines not shown]
iommu: Identity-map contexts when DMA remapping is disabled
With hw.amdiommu.enable=1 alone, interrupt remapping is on and DMA
remapping is off. amdiommu_ir_find() still instantiates a context for
each MSI source, and it got a translating domain with an empty page
table while busdma kept handing out physical addresses, so every DMA
from these devices faulted. On a Ryzen 7 7735HS the USB devices
attached in an endless loop.
Treat a unit with DMA remapping disabled like a device with remapping
disabled: give the context the identity mapping.
Reviewed by: kib, kbowling
Approved by: kib, kbowling
Fixes: 0f5116d7efe3 ("AMD IOMMU driver")
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/113
amdiommu: Free and align interrupt remapping entries
amdiommu_ir_free_irte() cleared the IRTE but never returned its index,
so a device's 32 default entries run out: a driver using 32 MSI-X
vectors gets ENOMEM from pci_alloc_msix() on its second attach. Free
the block with vmem_xfree(), now that msi_release() hands a group over
whole, and allocate it with vmem_xalloc() aligned on its size, since
the device ORs the message number into the MSI data, which is the IRTE
index.
As the entries are now reused, invalidate the interrupt table under the
DeviceID it is installed at, the IVRS-resolved ctx->context.rid, not
the PCI requester ID, which differs for aliased devices.
Reviewed by: kib, kbowling, imp
Approved by: kib, kbowling
Fixes: 0f5116d7efe3 ("AMD IOMMU driver")
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/112
x86: Release the IOMMU entries of an MSI group at once
msi_alloc() takes the interrupt remapping entries of a multiple-message
MSI group as one block, but msi_release() returned them one message at
a time. The DMAR driver frees each with vmem_free(cookie, 1): the
extra messages, released first, do not start a vmem segment, so
releasing a group with interrupt remapping on fails an assertion or
dereferences a NULL segment.
Pass the whole group to iommu_unmap_msi_intr() with its count, and free
the block at once in the DMAR driver, with one interrupt entry cache
invalidation for the range, its index mask capped at the unit's MHMV.
The AMD driver keeps clearing each entry for now.
Reviewed by: kib, kbowling, imp
Approved by: kib, kbowling
Fixes: 0a110d5b172e ("Use VT-d interrupt remapping block (IR) to perform FSB messages translation.")
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/112
crypto/openssl: correct messages printed out when copying manpages
Prior to this change section 1's message applied to 3/5/7 and vice
versa. Now the right message is printed out by the Makefile with its
respective operation.
MFC after: 1 week
crypto/openssl: sync manpages with current release
The content in the manpages matches 3.5.4 today and we're on 3.5.9.
Update to 3.5.9's content so the manpages reflect the shipped release.
MFC after: 1 week
tdestroy(3): Take posix_tnode * like the other tsearch(3) functions
tdestroy(3) was originally a glibc extension. glibc does not use
posix_tnode (yet), and when tdestroy(3) was pulled in its signature was
not updated to match the other tsearch(3) functions.
Fixes: b8c99e7d912f ("libc: add glibc-compatible tdestroy(3)")
Sponsored by: Klara, Inc.
fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size warning
tests/sys/fs/fusefs/xattr.cc:572:50: error: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Werror,-Wstrlcpy-strlcat-size]
572 | strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1));
| ~~~~~~~^~~~~~~
The warning is correct in that the size is the size of the source, but
that is intended in this case. Use memcpy() instead of strlcpy() to
match the same code in the size_only_race_smaller test above.
Differential Revision: https://reviews.freebsd.org/D49786
(cherry picked from commit faae895fec6571242ae05b11bc7eba0dff83fa49)
Add USB quirk for WCH-Link adapter
WCH-Link is a debug adapter from QinHeng Electronics that features a
(proprietary) debug bridge for their RISC-V MCUs, as well as a serial
gateway, implemented as a CDC device. The CDC's call management
descriptor declares the data interface to be 1, but it is actually
interface 2. UQ_IGNORE_CDC_CM has already been implemented before to
handle this kind of firmware bug, so just add this quirk for WCH-Link.
Reported by: Holm Tiffe
MFC after: 1 week