FreeBSD/src 584ecfesys/modules/xz Makefile

XZ kernel build cleanup

-I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz isn't used, and
.PATH: ${SRCTOP}/sys/contrib/xz-embedded/freebsd isn't used either.
Remove them both to simplify things a little.

Sponsored by:           Netflix
DeltaFile
+0-2sys/modules/xz/Makefile
+0-21 files

FreeBSD/src 45f9f6eusr.sbin/kldxref kldxref.c kldxref.8

kldxref: Add -m filag to print info about modules in one file

kldxref -m <file> will print the same data that the '-d' flag produces,
except restrict the output to one file. This should be the full path to
the file, and the directory name to process is omitted.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57902
DeltaFile
+14-3usr.sbin/kldxref/kldxref.c
+6-1usr.sbin/kldxref/kldxref.8
+20-42 files

FreeBSD/src bcb1b15share/man/man5 src.conf.5, stand Makefile.amd64

loader: Add two new build knobs for x86 BIOS loaders

We have two sets of BIOS loaders: One that lives in stand/i386 and one
that lives in stand/userboot. Add knows to turn these on/off, with the
default being on. These often aren't needed when creating a minimal UEFI
system, so add knobs to turn them off.  Given light-weight VMs have
created a new use cases for these loaders, there's no plans at all to
eliminate them.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D58072
DeltaFile
+7-1share/man/man5/src.conf.5
+2-2stand/Makefile.amd64
+2-0tools/build/options/WITH_LOADER_BIOS
+2-0tools/build/options/WITHOUT_LOADER_BIOS
+2-0tools/build/options/WITHOUT_LOADER_USERBOOT
+2-0tools/build/options/WITH_LOADER_USERBOOT
+17-31 files not shown
+19-37 files

FreeBSD/src c8842f1stand/efi/loader main.c

Revert "loader.efi: Trim ZFS searching for other booting options"

This reverts commit 3e3fd1fde8e168910edc538966111c0b5f03cd5f.

This appears to break chainbooting with boot1.efi and similar scenarios
with Root-on-ZFS scenarios. Revert until it's better understood.

PR: 296309
Sponsored by: Netflix
Differential Revision:  https://reviews.freebsd.org/D58071
DeltaFile
+24-6stand/efi/loader/main.c
+24-61 files

FreeBSD/src 603270bstand/efi/libefi efipart.c

loader.efi: Fix off by one error in size of the virtual disk

The end address is the final byte in the array, not one byte past the
end of the array, so we need to add 1 to get the full length.

Fixes: 59219fc76a4b ("loader.efi: efiblk_memdisk_preload passes the VirtualDisks to FreeBSD")
Sponsored by: Netflix
Differential Revision:  https://reviews.freebsd.org/D58069
DeltaFile
+1-1stand/efi/libefi/efipart.c
+1-11 files

FreeBSD/src a22fa5estand/efi/loader memdisk.c

laoder.efi: Fix error in download protcol

The download protocol calls download_data with FileOffset and
BufferLength of 0 first to start the download (no data yet
available). Calls it again with BufferLength == 0 and FileOffset the
size of the download (again, no data). It then starts calling with
BufferLength != 0 and FileOffset == 0 to start the download. The
heuristic I used to detect the start was wrong, so we'd allocate the
buffer twice. Fix that by being more explicit and not using the
heuristic that was bogus.

Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D58068
DeltaFile
+7-3stand/efi/loader/memdisk.c
+7-31 files

FreeBSD/src 1d12982stand/efi/loader decompress.c

loader.efi: Simplify the code for null decompression a little

This code is simpler when we spell it the Unix way. Also, add sanity
checks to make sure the offset is where we think it is.

Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Differential Revision:  https://reviews.freebsd.org/D58070
DeltaFile
+7-3stand/efi/loader/decompress.c
+7-31 files

FreeBSD/src f273414sys/amd64/conf MINIMAL, sys/i386/conf MINIMAL

MINIMAL: Add device md

This can't be a loadable module, so add it to MINIMAL

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D58067
DeltaFile
+1-0sys/amd64/conf/MINIMAL
+1-0sys/i386/conf/MINIMAL
+2-02 files

FreeBSD/src 5792a63crypto/openssh servconf.h servconf.c

openssh: fix GSSAPI option names

From openssh-portable commit c14709356563.

Reported by:    cy
DeltaFile
+9-9crypto/openssh/servconf.h
+9-9crypto/openssh/servconf.c
+18-182 files

FreeBSD/src 28abe46sys/ufs/ffs ffs_vfsops.c

ffs: do not return ESTALE on attempt to ffs_unotovp() on unlinked inode

(cherry picked from commit c041b82c59e885d106f45454302bad3d9dcc58a7)
DeltaFile
+1-1sys/ufs/ffs/ffs_vfsops.c
+1-11 files

FreeBSD/src fe0d7d6contrib/libcxxrt exception.cc

libcxxrt: Fix diagnostics for derived classes

In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed.  The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".

Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".

Reviewed by:    dim
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822

(cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3)
(cherry picked from commit ab1af7bd2f425147e658a32f128a56176b1de059)
DeltaFile
+1-1contrib/libcxxrt/exception.cc
+1-11 files

FreeBSD/src db1b75dusr.bin/vtfontcvt vtfontcvt.c

vtfontcvt: Return error from write_fnt_source

Previously write_fnt_source always returned 0, silently discarding
errors.  Return rv so that errors set vtfontcvt's shell exit
appropriately.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit f05fb5157ba1291ee5019bacece8d1e98ea95b35)
(cherry picked from commit a00f80731213e03bf3d0b9028a93d0be4c0df756)
DeltaFile
+1-1usr.bin/vtfontcvt/vtfontcvt.c
+1-11 files

FreeBSD/src ab1af7bcontrib/libcxxrt exception.cc

libcxxrt: Fix diagnostics for derived classes

In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed.  The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".

Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".

Reviewed by:    dim
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822

(cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3)
DeltaFile
+1-1contrib/libcxxrt/exception.cc
+1-11 files

FreeBSD/src 707ee7fsys/dev/usb usbdevs

usbdevs: Add Microchip 10BASE-T1S eval board

USB vendor:product 184f:0051

Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56794
DeltaFile
+4-0sys/dev/usb/usbdevs
+4-01 files

FreeBSD/src e9f21e4sys/compat/linuxkpi/common/include/linux delay.h

linuxkpi: Add `usleep_range_state()`

It takes a task state as its last argument. We enforce that this state
is `TASK_UNINTERRUPTIBLE` for the time being because other states are
not interpreted.

Change `usleep_range()` to call `usleep_range_state()` with the state
set to `TASK_UNINTERRUPTIBLE`, which is what Linux does too.

The amdgpu DRM driver starte to use `usleep_range_state()` in Linux
6.13.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57579
DeltaFile
+13-1sys/compat/linuxkpi/common/include/linux/delay.h
+13-11 files

FreeBSD/src 6d5f5f7sys/compat/linuxkpi/common/include/linux acpi.h

linuxkpi: Add `to_acpi_device_node()` and `ACPI_COMPANION()`

The former is called by the latter. We return NULL because linuxkpi does
not implement ACPI (pseudo?) devices associated to regular devices.

The amdgpu DRM driver started to use `ACPI_COMPANION()` in Linux 6.13.

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57577
DeltaFile
+8-0sys/compat/linuxkpi/common/include/linux/acpi.h
+8-01 files

FreeBSD/src 712623asys/dev/usb/controller generic_ehci_fdt.c

generic_ehci_fdt: fix driver softc size

This subclass declares its own softc structure adding necessary members
after the embedded ehci_softc_t. The full size of the struct must be
included in the driver declaration, otherwise the allocation backing the
softc is not guaranteed to be large enough.

Reported by:    KASAN
Reviewed by:    jrtc27, manu
Fixes: 7a58744fd0f1 ("Split out the attachment from the generic-ehci driver")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57951

(cherry picked from commit d5332d3a904242cb82e7dbf35e4aeec7c2df4402)
DeltaFile
+1-1sys/dev/usb/controller/generic_ehci_fdt.c
+1-11 files

FreeBSD/src 745c0eastand/libofw openfirm.c openfirm.h, stand/powerpc/ofw ofwfdt.c

stand/libofw: make OF_hasprop() part of the library

Currently it is only needed by powerpc ofwfdt.c, and defined statically
there. Make it available as part of libofw, mirroring what we have in
the kernel.

Two small tweaks are made to the implementation:
  1. Return type is changed to bool
  2. Return 'true' when OF_getproplen() == 0. This matches the expected
     semantics of the kernel version, described in OF_hasprop(9).

Reviewed by:    manu, imp, adrian
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56429

(cherry picked from commit 48a05f833c7d0c089d37522cc234039ec823edf4)
DeltaFile
+7-0stand/libofw/openfirm.c
+0-6stand/powerpc/ofw/ofwfdt.c
+1-0stand/libofw/openfirm.h
+8-63 files

FreeBSD/src b17f8fdsys/arm/broadcom/bcm2835 raspberrypi_virtgpio.c

raspberry_virtgpio: fix OF_hasprop() usage

The function returns a bool. This driver was merged recently (by me) and
I missed this instance.

While here, adjust the ofw_bus_status_okay() call similarly. This
function still returns an int, but this usage is more widely used in our
drivers.

No functional change intended.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Fixes:          b60cd486a652 ("ofw: bool-ify OF_hasprop()")

(cherry picked from commit ce6b4973ba8c6503d3b6dc12d9e6b42ce274d912)
DeltaFile
+2-2sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
+2-21 files

FreeBSD/src 7411d01share/man/man9 OF_getprop.9

OF_getprop.9: update OF_hasprop() signature

The return type has been converted to a bool.

Reported by:    manu
Sponsored by:   The FreeBSD Foundation
Fixes:          b60cd486a652 ("ofw: bool-ify OF_hasprop()")

(cherry picked from commit 47b0ac1cadc91eee5e98813169b590c443135fbc)
DeltaFile
+8-4share/man/man9/OF_getprop.9
+8-41 files

FreeBSD/src 2e56e44sys/dev/clk clk_fixed.c

clk_fixed: quiet a warning message

Frequently there are some unused/unspecified fixed clocks present in a
device tree. Each one emits a warning before it fails to attach, which
results in (sometimes many) repeated messages which are not
user-actionable.

Put this warning behind the bootverbose flag.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56204

(cherry picked from commit 8728e21bd694dbb813c149206c5c89290f9c32f5)
DeltaFile
+4-2sys/dev/clk/clk_fixed.c
+4-21 files

FreeBSD/src 64f6ab4sys/dev/clk clk_fixed.c, sys/dev/dwc if_dwc.c

ofw: bool-ify OF_hasprop()

Adjust the function signature and the few callers that don't treat it
this way already.

This is style only; no functional change intended.

Reviewed by:    andrew
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56203

(cherry picked from commit b60cd486a652f0427e525b4482ac598be5460459)
DeltaFile
+4-4sys/dev/dwc/if_dwc.c
+2-2sys/dev/ofw/openfirm.c
+1-1sys/dev/clk/clk_fixed.c
+1-1sys/dev/ofw/openfirm.h
+1-1sys/dev/usb/net/if_smsc.c
+9-95 files

FreeBSD/src bac4760sys/netinet6 nd6_nbr.c nd6_rtr.c

netinet6: Fix ND link-layer address option layout for IPoIB

RFC 4391 (IP over InfiniBand), section 9.3, lays the ND source/target
link-layer address option out as type, length (3), two reserved zero
octets, then the 20-octet IPoIB link-layer address.
The ND code assumed the Ethernet layout (RFC 4861, section 4.6.1)
everywhere and read/wrote the address directly after the option
header, i.e. two octets early.
The option-length sanity check computes 24 for both layouts for
a 20-octet address, so the mismatch was silent.

PR:             296585
Reviewed by:    adrian, pouria
Sponsored by:   VersatusHPC
Differential Revision: https://reviews.freebsd.org/D58096
DeltaFile
+37-10sys/netinet6/nd6_nbr.c
+10-8sys/netinet6/nd6_rtr.c
+10-5sys/netinet6/icmp6.c
+1-0sys/netinet6/nd6.h
+58-234 files

FreeBSD/src bb5c77ecrypto/openssh libcrux_internal.h libcrux_mlkem768_sha3.h, crypto/openssh/regress/unittests/crypto/testdata nistkats-44.json

OpenSSH: Update to 10.4p1

Full release notes are available at
https://www.openssh.com/txt/release-10.4

Selected highlights from the release notes:

Potentially-incompatible changes
--------------------------------

 * sshd(8): configuration dump mode ("sshd -G") now writes directives
   in mixed case (e.g. "PubkeyAuthentication") whereas previously it
   emitted only lower-case names.

 * ssh(1), sshd(8): make the transport protocol stricter by
   disconnecting if the peer sends non-KEX messages during a post-
   authentication key re-exchange. Previously a malicious peer could
   continue sending non-key exchange messages without penalty. These
   would be buffered, causing memory to be wasted up until the

    [69 lines not shown]
DeltaFile
+27,332-0crypto/openssh/libcrux_internal.h
+0-11,752crypto/openssh/libcrux_mlkem768_sha3.h
+1,869-1,349crypto/openssh/ChangeLog
+1,438-517crypto/openssh/servconf.c
+539-585crypto/openssh/moduli
+802-0crypto/openssh/regress/unittests/crypto/testdata/nistkats-44.json
+31,980-14,203158 files not shown
+37,545-15,612164 files

FreeBSD/src 554cf9dsys/compat/linuxkpi/common/src linux_80211.c

linuxkpi 802.11: Free entire mbuf chain on failure

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Fixes: 0936c648ad0ee ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Fixes: c816f64e66a0d ("LinuxKPI: 802.11: plug mbuf leak")
Differential Revision: https://reviews.freebsd.org/D57477

(cherry picked from commit 232021fd093c6e65beee5c0b4281091902022d08)
DeltaFile
+2-2sys/compat/linuxkpi/common/src/linux_80211.c
+2-21 files

FreeBSD/src f8e499fsys/netpfil/ipfw ip_fw_nat.c

ipfw nat: Add assertion that mbuf is not a chain

Discarding m_free's return value will result in an mbuf leak if the mbuf
was in a chain.

In general we should use m_freem if the mbuf may be in a chain, or
assert that the return was NULL.  There will not be a chain here due to
m_megapullup, so add an assert.

Reviewed by:    ae
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57479

(cherry picked from commit b16c731b0191d6c47de46a3c6057b0c5ec0dd420)
DeltaFile
+3-2sys/netpfil/ipfw/ip_fw_nat.c
+3-21 files

FreeBSD/src de8a68dsys/netipsec ipsec_output.c

ipsec: Free entire mbuf chain on failure

Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57475

(cherry picked from commit 85195c0c7f8a2926f0ba131178d9231bc33c81b5)
DeltaFile
+1-1sys/netipsec/ipsec_output.c
+1-11 files

FreeBSD/src 32d229dsys/dev/tsec if_tsec.c

if_tsec: Free entire mbuf chain on failure

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57478

(cherry picked from commit 39e2fe23238f4d49cd6f2c3ce9d0d9c1c3bcbedd)
DeltaFile
+1-1sys/dev/tsec/if_tsec.c
+1-11 files

FreeBSD/src 242c9c8sys/kern vfs_inotify.c, tests/sys/kern inotify_test.c

inotify: Unconditionally generate IN_IGNORED events for files/dirs

The implementation previously only generated an IN_IGNORED event for a
deleted watched file if the watch explicitly requested IN_DELETE_SELF.
This is not correct, IN_IGNORED should always be raised when the watched
subject is deleted.  Adjust the implementation of inotify_log_one()
accordingly.

This also fixes a problem where a deleted watched file's watch
would not be removed if IN_DELETE_SELF was not in the watch's event
mask, in which case the unlinked vnode would linger until the inotify
descriptor itself is closed.

Add a regression test.

Reported by:    jrtc27
Reviewed by:    jrtc27
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D58050

    [2 lines not shown]
DeltaFile
+23-12sys/kern/vfs_inotify.c
+24-0tests/sys/kern/inotify_test.c
+47-122 files

FreeBSD/src 1ad156fsys/kern vfs_inotify.c

inotify: Ensure that "allocfail" is initialized in inotify_log_one()

Fixes:  b70997c8c75a ("inotify: Unconditionally generate IN_IGNORED events for files/dirs")

(cherry picked from commit f370bf9fafce82851bedb2b88bc21ec6ca0182df)
DeltaFile
+1-2sys/kern/vfs_inotify.c
+1-21 files