FreeBSD/src ef27f78 — sbin/ifconfig Makefile ifue.c

ifconfig(8): show parent device for USB Ethernet interfaces

Report net.ue.<unit>.%parent as "parent interface", consistent with
wlan(4):

  # ifconfig ue0
  ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
          ether 00:00:5e:00:53:2a
          inet 192.0.2.10/24 broadcast 192.0.2.255
          parent interface: ure0
          media: Ethernet autoselect (2500Base-T <full-duplex>)
          status: active

Reviewed by:    aokblast
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59060
DeltaFile
+62-0sbin/ifconfig/ifue.c
+4-0sbin/ifconfig/Makefile
+66-02 files

FreeBSD/src 16a284b — sys/compat/linux linux_event.c

linux(4): Fix signal mask restoration in epoll_pwait(2)/epoll_pwait2(2)

Since 80c7315d17ce ("Restore signal mask in epoll_pwait.") the caller's
signal mask is saved in a local variable, but TDP_OLDMASK is still set
and the TDA_SIGSUSPEND AST is still scheduled.  On return to user mode
that AST, or postsig() if a signal is delivered, then installs
td_oldsigmask, which this code never writes and which holds whatever
mask the thread had at its last sigsuspend(2), pselect(2) or ppoll(2).
As a result every epoll_pwait(2)/epoll_pwait2(2) call with a non-NULL
sigmask can leave the thread with a stale signal mask.  In addition, the
explicit restore at the end overwrote the return value, so EINTR (and
any other error) was reported to user space as 0.

Save the old mask in td_oldsigmask and let the AST restore it, as
kern_pselect() and kern_poll_kfds() do: schedule TDA_SIGSUSPEND if the
wait was interrupted, so the signal is delivered with the temporary mask
in place, and TDA_PSELECT otherwise.  This matches Linux, which restores
the saved mask unless the syscall returns -EINTR.


    [11 lines not shown]
DeltaFile
+14-11sys/compat/linux/linux_event.c
+14-111 files

FreeBSD/src 1d94247 — lib/geom/cache gcache.8, lib/geom/concat gconcat.8

geom: Document existing --libxo support in the manual pages

The standard list and status subcommands of every GEOM class emit
through libxo, and so does geom -p, but only geom.8 (list, status) and
gpart.8 (show) mentioned it.  Mark the list and status forms with
--libxo in all class manual pages, add the option description, and
cross-reference xo_options(7).  Also mark geom -p in geom.8.

Only forms whose output already goes through libxo are marked;
class-specific verbs such as gmirror dump still print directly and are
left alone.

Reviewed by:    adrian, bcr, carlavilla, des
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D59574
DeltaFile
+11-1lib/geom/mirror/gmirror.8
+11-1lib/geom/label/glabel.8
+11-1lib/geom/journal/gjournal.8
+11-1lib/geom/eli/geli.8
+11-1lib/geom/concat/gconcat.8
+11-1lib/geom/cache/gcache.8
+66-612 files not shown
+181-1818 files

FreeBSD/src 9436865 — sys/dev/tpm tpm.c

tpm: Do not use timed tsleep() while polling during cold boot

Commit 4e0f283fb97a made tpm_tis12_init() wait for TPM_STS_CMD_READY
after aborting any command.  The wait is implemented by the driver's
existing tpm_waitfor_poll() loop, which sleeps with a one-tick tsleep()
between status reads.  Until now, that loop only ran from the resume and
command paths after boot.  From tpm_attach() it can panic with "timed
sleep before timers are working" when the TPM is attached from ACPI
during cold boot and the chip does not report ready on the first status
read.

Before 4e0f283fb97a, tpm_tis12_init() wrote TPM_STS_CMD_READY and
returned without waiting, so the polling loops only ran after boot.
tpm_request_locality() had the same latent hazard but its fast path
returns before sleeping whenever locality is already active.

Nothing calls wakeup() on the channels used by these polling loops, so
the sleeps are pure delays.  Use pause_sig(), which falls back to
DELAY() while the kernel is cold and returns EWOULDBLOCK, a value these

    [10 lines not shown]
DeltaFile
+3-3sys/dev/tpm/tpm.c
+3-31 files

FreeBSD/src dd38230 — sys/dev/ichiic ig4_reg.h ig4_acpi.c

ig4(4): fix attach of ACPI-enumerated LPSS controllers

Intel LPSS I2C controllers enumerated through ACPI rather than PCI never
attach on Haswell and Broadwell, so every device behind those buses is
lost. On a Dell XPS 13 9343 that hides the I2C HID touchpad and leaves
only the PS/2 fallback, which the firmware does not restore after S3.

Three causes, all on the ACPI path:

Firmware may leave an LPSS function in D3, where its registers read as
all-ones and set_controller() fails with "controller error during
attach-1". Run _PS0 before mapping them. The PCI path does not need
this, which is why the gap went unnoticed.

INT33C2, INT33C3, INT3432 and INT3433 are Lynx Point-LP and Wildcat
Point-LP, which ig4_pci.c already classifies as IG4_HASWELL; the ACPI
path called everything but APMC0D0F an Atom SoC.

The functional clock stays gated until bit 0 of IG4_REG_CLK_PARMS is

    [14 lines not shown]
DeltaFile
+11-0sys/dev/ichiic/ig4_iic.c
+10-0sys/dev/ichiic/ig4_acpi.c
+1-0sys/dev/ichiic/ig4_reg.h
+22-03 files

FreeBSD/src 886a355 — sys/dev/ichiic ig4_var.h ig4_iic.c

ig4(4): Add an EMAG device type

Sponsored by: Ampere Computing LLC, Netflix
Submitted by: allanjude
Differential Revision: https://reviews.freebsd.org/D28746
Reviewed by: imp

(cherry picked from commit 5972ffde919ab65ba29d4d51ccf735da18d52719)
DeltaFile
+10-2sys/dev/ichiic/ig4_acpi.c
+3-0sys/dev/ichiic/ig4_iic.c
+1-0sys/dev/ichiic/ig4_var.h
+14-23 files

FreeBSD/src 3244419 — sys/dev/evdev evdev_utils.c

evdev: map ChromeOS "Vivaldi" top-row action keys

Chromebook keyboards driven by the ChromeOS EC emit the top-row action
keys as scancode set 1 codes 0xE0 0x11 - 0xE0 0x1E (see the codeset 1
comments on the SCANCODE_* enum in chrome-ec
include/keyboard_8042_sharedlib.h).  The e0 half of the
evdev_scancode2key() translation table leaves eleven of those at NONE,
so on FreeBSD those keys emit no evdev event at all and userspace
remappers such as keyd have nothing to bind to:

  e0 11  fullscreen             KEY_ZOOM
  e0 12  overview               KEY_SCALE
  e0 13  screenshot             KEY_SYSRQ
  e0 14  brightness down        KEY_BRIGHTNESSDOWN
  e0 15  brightness up          KEY_BRIGHTNESSUP
  e0 16  privacy screen toggle  KEY_PRIVACY_SCREEN_TOGGLE
  e0 17  kbd backlight down     KEY_KBDILLUMDOWN
  e0 18  kbd backlight up       KEY_KBDILLUMUP
  e0 1a  play/pause             KEY_PLAYPAUSE

    [15 lines not shown]
DeltaFile
+9-4sys/dev/evdev/evdev_utils.c
+9-41 files

FreeBSD/src 8603e1f — sys/dev/ichiic ig4_reg.h ig4_acpi.c

ig4(4): fix attach of ACPI-enumerated LPSS controllers

Intel LPSS I2C controllers enumerated through ACPI rather than PCI never
attach on Haswell and Broadwell, so every device behind those buses is
lost. On a Dell XPS 13 9343 that hides the I2C HID touchpad and leaves
only the PS/2 fallback, which the firmware does not restore after S3.

Three causes, all on the ACPI path:

Firmware may leave an LPSS function in D3, where its registers read as
all-ones and set_controller() fails with "controller error during
attach-1". Run _PS0 before mapping them. The PCI path does not need
this, which is why the gap went unnoticed.

INT33C2, INT33C3, INT3432 and INT3433 are Lynx Point-LP and Wildcat
Point-LP, which ig4_pci.c already classifies as IG4_HASWELL; the ACPI
path called everything but APMC0D0F an Atom SoC.

The functional clock stays gated until bit 0 of IG4_REG_CLK_PARMS is

    [14 lines not shown]
DeltaFile
+11-0sys/dev/ichiic/ig4_iic.c
+10-0sys/dev/ichiic/ig4_acpi.c
+1-0sys/dev/ichiic/ig4_reg.h
+22-03 files

FreeBSD/src b98d169 — tests/sys/vfs Makefile abi_root_symlink.sh

tests/sys/vfs: add ABI-root absolute symlink tests

Pin the overlay namei(9) uses for Linux ABI processes: a target under
the ABI root wins (PR 289739), a native-only target should retry from
the native root (PR 297426), an ENOENT past a resolved ABI target is
not retried, and the plain no-symlink native fallback is unchanged.
Skip without a Linux userland so CI stays green.  The two native-only
cases use atf_expect_fail until the retry lands.

PR:             297426
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D59990
DeltaFile
+279-0tests/sys/vfs/abi_root_symlink.sh
+2-0tests/sys/vfs/Makefile
+281-02 files

FreeBSD/src e8da572 — lib/libutil mntopts.c

libutil: Make free_iovec() zero its arguments, like the manpage claims

Approved by: kib
Differential Revision: https://reviews.freebsd.org/D59929
DeltaFile
+2-0lib/libutil/mntopts.c
+2-01 files

FreeBSD/src 3963483 — usr.bin/whereis pathnames.h whereis.c

whereis(1): Simplify code

Simplify the way we build paths.
Avoid decolonification of source paths.
Remove gnu directories and add non-tracked ones.

Fix a memory leak while here.

Approved by:            ngie@
Differential Revision:  https://reviews.freebsd.org/D59846
DeltaFile
+11-28usr.bin/whereis/whereis.c
+26-10usr.bin/whereis/pathnames.h
+37-382 files

FreeBSD/src ce0268c — sys/arm64/arm64 pmap.c

arm64 pmap: Eliminate redundant icache synchronization

Creating an executable user-space mapping to write-back memory
synchronizes the icache with the page's contents, whether or not those
contents have changed since the previous synchronization.  Use the pmap
private page flag PGA_ICACHE_SYNCED to record that the icache has been
synchronized with a managed page's contents and that the page has no
writable mappings.  When the flag is set, the creation of another
executable mapping to the page can skip the synchronization.  The flag
is cleared when a writable mapping to the page is created, using a
single atomic operation that keeps PGA_WRITEABLE and PGA_ICACHE_SYNCED
from ever being simultaneously set, and when the page's last mapping is
destroyed.

Assisted-by:    Claude Code (Fable 5.1)
Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D59865
DeltaFile
+185-45sys/arm64/arm64/pmap.c
+185-451 files

FreeBSD/src f29a09d — sys/powerpc/aim mmu_oea64.c, sys/vm vm_page.c vm_page.h

vm_page: Replace PGA_EXECUTABLE with PGA_PMAP_PRIV1

At present, PGA_EXECUTABLE is only used by the powerpc mmu_oea64 pmap.
The MI layer only accesses this flag to assert that it is clear when a
managed page is freed.  Soon, we will need a similar, but not identical,
machine-dependent flag in the arm64 pmap.  So, we rename this flag to
PGA_PMAP_PRIV1, simply saying that it is reserved for use by the pmap.
Each pmap can then define a name that best reflects its own meaning.
However, we still assert that this flag is clear when a managed page is
freed.

No functional change.

Reviewed by:    kib, markj
Differential Revision:  https://reviews.freebsd.org/D59995
DeltaFile
+4-3sys/vm/vm_page.h
+7-0sys/powerpc/aim/mmu_oea64.c
+1-1sys/vm/vm_page.c
+12-43 files

FreeBSD/src f492ef8 — . MAINTAINERS, .github CODEOWNERS

Add christos@ to MAINTAINERS and .github/CODEOWNERS

Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59912
DeltaFile
+2-0MAINTAINERS
+2-0.github/CODEOWNERS
+4-02 files

FreeBSD/src 53fe018 — sys/amd64/include cpufunc.h

amd64: gate WRMSRNS immediate form on compiler support

This support was introduced in LLVM 20 and we still support releases
with LLVM 19 so it's too early to require LLVM 20.  Decay to the
non-immediate form when the compiler it too old.  This makes the ifunc
pointless, but limits the need for other ifdefs.

Reviewed by:    kib
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D60023
DeltaFile
+10-0sys/amd64/include/cpufunc.h
+10-01 files

FreeBSD/src 2a717d5 — sys/compat/freebsd32 freebsd32_util.h freebsd32_misc.c, sys/kern subr_uio.c

uio: make *copyinuio take a void *

This aligns with copyinuio_t and avoids some hypothetical undefined
behavor around calling functions with mismatched types.

Reviewed by:    kib
Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D60024
DeltaFile
+6-4sys/compat/freebsd32/freebsd32_misc.c
+1-2sys/compat/freebsd32/freebsd32_util.h
+1-1sys/sys/uio.h
+1-1sys/kern/subr_uio.c
+9-84 files

FreeBSD/src e2d42b0 — sys/arm/ti/am335x am335x_pwmss.c, sys/dev/clk clk_bus.c

ofw: Convert simplebus to device_get_softc_class().

Stop embedding struct simplebus_softc as the first member of subclass
softcs. Use device_get_softc_class() to locate the simplebus portion of
the device softc

MFC after:      2 months
Differential Revision:  https://reviews.freebsd.org/D59837
DeltaFile
+5-33sys/dev/fdt/simple_mfd.c
+19-15sys/dev/dpaa/fman.c
+13-12sys/dev/ofw/ofw_firmware.c
+15-10sys/dev/fdt/simplebus.c
+4-19sys/arm/ti/am335x/am335x_pwmss.c
+5-15sys/dev/clk/clk_bus.c
+61-10431 files not shown
+139-28937 files

FreeBSD/src 12c3004 — sys/dev/dpaa2 dpaa2_mc_fdt.c

dpaa2: Don't return simplebus devinfo for a non-simplebus child

dpaa2_mc_simplebus_get_devinfo() must not treat the MC resource-container
device as a simplebus child. Return NULL when child is sc->rcdev instead
of forwarding OFW_BUS_GET_DEVINFO() for that device.

MFC after:      2  weeks
Differential Revision:  https://reviews.freebsd.org/D59836
DeltaFile
+5-0sys/dev/dpaa2/dpaa2_mc_fdt.c
+5-01 files

FreeBSD/src 2203903 — sbin/nvmecontrol identify_ext.c, sys/dev/nvme nvme.h

nvme: name the reserved Identify Controller fields at bytes 102 through 110

Bytes 102 through 110 of the I/O Command Set Independent Identify
Controller data structure were reserved padding.  Name them: Boot
Partition Capabilities (byte 102), CXL HDM Support Information (byte
103), NVM Subsystem Shutdown Latency (bytes 107:104) and Power Loss
Signaling Information (byte 110).  Bytes 109:108 stay reserved.

CXL HDM Support Information was added in NVM Express Base Specification
2.4, Figure 338; the others appear in 2.3, Figure 328.

Report the new fields from nvmecontrol identify.

Reviewed by:    imp, adrian
Differential Revision:  https://reviews.freebsd.org/D60000
DeltaFile
+39-1sys/dev/nvme/nvme.h
+11-0sbin/nvmecontrol/identify_ext.c
+50-12 files

FreeBSD/src 228b1a0 — sys/dev/usb/serial uchcom.c

uchcom: Set rate to 1 if 0

If userspace provides rate == 0, it causes kernel panic as rate is
directly used as a divident, which cannot be zero. Fix it by set the
rate to 1 if it is passed as 0.

Reviewed by:    imp, emaste
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59111
DeltaFile
+3-0sys/dev/usb/serial/uchcom.c
+3-01 files

FreeBSD/src d8acc2a — tools/boot boot-test.sh gptattr.c

boot-test.sh: Add gptboot.efi tests

Make sure that we can chainboot with gptboot.efi. Many projects use this
as their migration tool from gptboot to ping-pong partitions to boot
from. This tests that functionality which I recently broke.

Assisted-by: Claude Code (Fable 5, Opus 5)
Sponsored by:           Netflix
DeltaFile
+133-0tools/boot/gptattr.c
+124-1tools/boot/boot-test.sh
+257-12 files

FreeBSD/src 4f06a8e — sys/contrib/edk2/Include/Guid FileInfo.h

edk2: Import FileInfo.h from edk2-stable202502

Sponsored by:           Netflix
DeltaFile
+66-0sys/contrib/edk2/Include/Guid/FileInfo.h
+66-01 files

FreeBSD/src 9ecc249 — stand/efi/loader main.c

Restore booting the partition the EFI boot image was loaded from.

BSDRP images are built with "poudriere image -t firmware", which puts
gptboot.efi on the ESP instead of loader.efi.  gptboot.efi reads the GPT
bootme attribute, picks the active system partition (BSDRP1 or BSDRP2),
chainloads /boot/loader.efi from it and hands loader.efi that partition
in LoadedImage->DeviceHandle (stand/efi/boot1/boot1.c:try_boot).

Since ce9bfd78167 ("loader.efi: Refactor try_boot_device_partitions"),
find_currdev() no longer tries that device: try_boot_device_partitions()
walks the parent disk while explicitly skipping dp->pd_handle, on the
assumption that the boot image always comes from an ESP holding no root
filesystem.  When chainloaded, the partition gptboot.efi selected is
therefore the one partition never considered, and loader.efi falls
through to the first other UFS partition on the disk - the previous
system.  Every A/B upgrade silently boots the old slice.

Commit 1c85c5eea09, which introduced try_boot_device_partitions(), did
try dp itself before its siblings; the refactor dropped it.  Restore it,

    [5 lines not shown]
DeltaFile
+14-3stand/efi/loader/main.c
+14-31 files

FreeBSD/src a844bc2 — tools/boot boot-test.sh

boot-test.sh: Add netboot-http-efi test

Using iPXE, chainboot loader.efi with rootdev=http://${next-server}/
to test the loader's http:// code.

Sponsored by:           Netflix
DeltaFile
+9-0tools/boot/boot-test.sh
+9-01 files

FreeBSD/src 58741fa — tools/boot boot-test.sh

boot-test.sh: Add virtio-rng-pci to the EFI RAM-disk netboot qemu invocation

Since the PixieFail security fixes (CVE-2023-45237), EDK II's DxeNetLib --
underneath essentially all of NetworkPkg (Mnp/Arp/Ip4/Dhcp4/Tcp/Http) --
carries a DEPEX on EFI_RNG_PROTOCOL. With no RNG protocol producer
available, that DEPEX is never satisfied and the entire NetworkPkg driver
stack silently fails to load: no error, no assert, it just isn't there.

netboot-efi and netboot-ramdisk never noticed because they only ever touch
the raw EFI_SIMPLE_NETWORK_PROTOCOL via our own net.c, which has no such
dependency. A test that needs EDK II's own NetworkPkg (e.g. one exercising
EFI_HTTP_PROTOCOL) is the first to be affected.

RngDxe can satisfy the DEPEX from the RDRAND instruction alone on a
sufficiently recent edk2 build, but not every installed OVMF is that
recent. -device virtio-rng-pci provides an RNG unconditionally via
VirtioRngDxe, regardless of edk2 vintage or host CPU features.

Unfortunately, the edk2 shipped with qemu lacks the network this needs.

    [2 lines not shown]
DeltaFile
+4-0tools/boot/boot-test.sh
+4-01 files

FreeBSD/src ab9130c — tools/boot boot-test.sh.8 boot-test.sh

boot-test.sh: Add a http server per interface

Add the built-in python http server, bound to each of the interaces we
create to expand network testing to include http:// in various
scenarios.

Sponsored by:           Netflix
DeltaFile
+40-1tools/boot/boot-test.sh
+24-8tools/boot/boot-test.sh.8
+64-92 files

FreeBSD/src 102adf8 — sys/compat/linsysfs linsysfs.c

linux: Exposes renderD nodes and chardev in sysfs

To allow normal users to render through the render device, we expose the
renderD node. This enables Wayland applications to use hardware
acceleration when running under the Linux emulator.

Additionally, libdrm and Mesa need to look up
/sys/dev/char/<major>:<minor> and <pcidev>/drm to identify the
corresponding renderer device (e.g., a renderD device). We expose this
path as well so that libdrm can locate the renderer.

Differential Revision: https://reviews.freebsd.org/D59190
DeltaFile
+56-2sys/compat/linsysfs/linsysfs.c
+56-21 files

FreeBSD/src 269002d — sbin/fsck_msdosfs fat.c

fsck_msdosfs: fix head bitmap over-allocation on 32-bit platforms

bitmap_ctor() computed the allocation size as

        roundup2(bits, LONG_BIT) / (LONG_BIT / 8)

The dividend is a count of bits, so converting it to bytes requires
dividing by 8 (bits per byte), not by LONG_BIT / 8 (bytes per long).
The two divisors happen to coincide on LP64, but on ILP32 platforms
the head bitmap was allocated at twice the required size; for a
FAT32 file system with close to 2^28 clusters, that is 64 MiB instead
of 32 MiB.

The extra half of the allocation was never accessed, so there is no
functional change other than the reduced memory footprint.

MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2440
DeltaFile
+1-1sbin/fsck_msdosfs/fat.c
+1-11 files

FreeBSD/src 10bd16d — sys/x86/cpufreq hwpstate_intel.c

ihwpstate_intel: update dev.hwpstate_intel.%d.epp sysctl description

Catch up with 8452afeb568: now dev.hwpstate_intel.%d.epp accepts
values from 0 to 255.  Update its description accordingly to sync
with the code and the man page.
DeltaFile
+1-1sys/x86/cpufreq/hwpstate_intel.c
+1-11 files

FreeBSD/src 27c6904 — . RELNOTES

Add release notes entry for less v710.

(cherry picked from commit 7f7e9584cb9dbff7f74faf5589c9154d2c6eef3f)
DeltaFile
+9-0RELNOTES
+9-01 files