HardenedBSD/src 9ffa80f — contrib/wpa/src/ap ieee802_11.c, contrib/wpa/src/common proximity_ranging.c qca-vendor.h

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/main
DeltaFile
+6,124-33contrib/wpa/src/common/qca-vendor.h
+5,003-0contrib/wpa/wpa_supplicant/nan_supplicant.c
+3,381-671contrib/wpa/src/drivers/driver_nl80211.c
+3,106-664contrib/wpa/src/ap/ieee802_11.c
+3,677-0contrib/wpa/src/nan/nan.c
+2,707-0contrib/wpa/src/common/proximity_ranging.c
+23,998-1,368383 files not shown
+90,408-24,898389 files

HardenedBSD/src 89e9221 — sbin/dhclient/tests functional.py, sys/dev/apple_acpi apple_platform.c apple_acpi.h

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+771-0sys/dev/apple_acpi/apple_backlight.c
+242-0sbin/dhclient/tests/functional.py
+233-0tests/sys/kern/sigreturn_fpregs.c
+175-0tests/sys/kern/sigreturn_fpregs_ppc64.S
+149-0sys/dev/apple_acpi/apple_acpi.h
+123-0sys/dev/apple_acpi/apple_platform.c
+1,693-058 files not shown
+2,028-12664 files

HardenedBSD/src d7c97b4 — sbin/dhclient/tests functional.py, sys/dev/apple_acpi apple_platform.c apple_acpi.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+771-0sys/dev/apple_acpi/apple_backlight.c
+242-0sbin/dhclient/tests/functional.py
+233-0tests/sys/kern/sigreturn_fpregs.c
+175-0tests/sys/kern/sigreturn_fpregs_ppc64.S
+149-0sys/dev/apple_acpi/apple_acpi.h
+123-0sys/dev/apple_acpi/apple_platform.c
+1,693-058 files not shown
+2,028-12664 files

HardenedBSD/src d561278 — sbin/umbctl umbctl.8, share/man/man4 umb.4

Revert "umb: Update man page HISTORY"

Oops, pushed in error from a staging branch.

This reverts commit ed797306243f3bdbbfd5d8223ec8698b9d7fe319.
DeltaFile
+1-1share/man/man4/umb.4
+1-1sbin/umbctl/umbctl.8
+2-22 files

HardenedBSD/src 98b7f63 — share/man/man4 Makefile

man4: Install mgb.4 on all architectures

mgb(4) is not x86-only now, so install its manpage everywhere and make
if_mgb.4 link creation work, which is already on all architectures.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-2share/man/man4/Makefile
+1-21 files

HardenedBSD/src ed79730 — sbin/umbctl umbctl.8, share/man/man4 umb.4

umb: Update man page HISTORY

It was merged to stable/14 prior to FreeBSD 14.4.
DeltaFile
+1-1share/man/man4/umb.4
+1-1sbin/umbctl/umbctl.8
+2-22 files

HardenedBSD/src 617c700 — sys/conf newvers.sh

newvers.sh: Report -dirty also with staged changes

We add -dirty to the uname version string if the tree does not match the
reported hash. Previously, staged but uncommitted changes were ignored.
Noted by naddy@ in D60606.

Reviewed by:    cperciva, imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60722
DeltaFile
+1-1sys/conf/newvers.sh
+1-11 files

HardenedBSD/src 79d491b — contrib/elftoolchain/libelftc elftc_timestamp.3 elftc_reloc_type_str.3, contrib/openbsm/bin/auditdistd unlinkat.h trail.h

Remove "All Rights Reserved" from FreeBSD Foundation copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder.
DeltaFile
+1-1contrib/elftoolchain/libelftc/elftc_timestamp.3
+1-1contrib/elftoolchain/libelftc/elftc_reloc_type_str.3
+0-1contrib/openbsm/compat/compat.h
+0-1contrib/openbsm/compat/closefrom.h
+0-1contrib/openbsm/bin/auditdistd/unlinkat.h
+0-1contrib/openbsm/bin/auditdistd/trail.h
+2-631 files not shown
+2-3737 files

HardenedBSD/src a143197 — sbin/dhclient/tests Makefile functional.py

dhclient: Add some regression tests

Add tests for some recently fixed bugs in dhclient.  All of these tests
set up two VNET jails connected by an epair.  dhclient runs in one jail,
and the test code runs on the other end.  It uses scapy to inject
"interesting" packets in response to DHCPDISCOVER messages from
dhclient, then checks the configured interface and lease file.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60485
DeltaFile
+242-0sbin/dhclient/tests/functional.py
+2-0sbin/dhclient/tests/Makefile
+244-02 files

HardenedBSD/src 368a1bf — sbin/dhclient dhclient.c

dhclient: Avoid out-of-bounds reads in check_classless_option()

The loop did not verify that the option buffer is large enough before
reading an address.

Reported by:    Andrew Griffiths <andrew at calif.io>
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60484
DeltaFile
+43-31sbin/dhclient/dhclient.c
+43-311 files

HardenedBSD/src 35a226d — tests/sys/kern Makefile sigreturn_fpregs_ppc64.S

tests/sys/kern: stress FP registers across sigreturn on powerpc64

This is the program that found the races fixed in 1f1043d550ea. One
thread keeps a pattern in f14-f31 across a signal, while helpers pinned
to the same CPU keep different patterns in the real registers and get
woken up from another CPU to preempt it at random points. If the kernel
ever hands it somebody else's registers, the pattern doesn't match.

The register loads, the thr_kill() and the handshake with the helper are
in assembly so that nothing touches the FP registers between sigreturn
and the check. It runs for ten seconds and is skipped with fewer than
two CPUs.

Requested by:   adrian
Approved by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D60411
DeltaFile
+233-0tests/sys/kern/sigreturn_fpregs.c
+175-0tests/sys/kern/sigreturn_fpregs_ppc64.S
+6-0tests/sys/kern/Makefile
+414-03 files

HardenedBSD/src eaaf838 — sys/powerpc/aim locore64.S trap_subr64.S, sys/powerpc/include pcpu.h

powerpc64: give each CPU its own KDB trap stack

Kernel mode program, trace, breakpoint and machine check exceptions go
through dbtrap, which saves the registers on trapstk and, if KDB doesn't
want the trap, restores them from there and continues with the normal
trap handler. There was just one trapstk for all CPUs, so when two of
them trapped at the same time they overwrote each other's frame and one
of them carried on with the other's registers. DTrace fbt probes are
these traps, so a probe on a function that runs on several CPUs at once
took the kernel down within seconds.

Keep the stack in the pcpu instead. The boot CPU gets a static one,
since it's set up before malloc works, the others allocate theirs in
cpu_pcpu_init() like the Book-E critical interrupt stack.

Approved by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D60362
DeltaFile
+27-0sys/powerpc/aim/aim_machdep.c
+0-7sys/powerpc/aim/locore64.S
+3-4sys/powerpc/aim/trap_subr64.S
+2-1sys/powerpc/include/pcpu.h
+1-0sys/powerpc/powerpc/genassym.c
+33-125 files

HardenedBSD/src c4fde87 — libexec/rtld-elf/powerpc rtld_start.S, libexec/rtld-elf/powerpc64 rtld_start.S

rtld: add .cfi_undefined lr to rtld_start.S on powerpc*

Without it, LLVM libunwind doesn't know where to stop when unwinding the
main thread, so it uses a stale LR as the return address and crashes.
Our libunwind doesn't do that since 5866c369e4fd reverted it, but
programs that bundle their own copy, like ClickHouse, are hit by it.

amd64, arm64, i386 and riscv already have the same annotation.

Approved by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D60740
DeltaFile
+1-0libexec/rtld-elf/powerpc64/rtld_start.S
+1-0libexec/rtld-elf/powerpc/rtld_start.S
+2-02 files

HardenedBSD/src d7d237c — share/man/man4 acpi_apple.4, sys/dev/apple_acpi apple_acpi.c apple_platform.c

acpi_apple: Apple platform ACPI driver,

handles wake-on-LAN arming and lid state on the PCH
PMC/GMUX platform instance, and panel backlight
control on the PNLF instance, registering with
backlight(9).

Reviewed by:    ziaee, adrian
Differential Revision:  https://reviews.freebsd.org/D58867
DeltaFile
+771-0sys/dev/apple_acpi/apple_backlight.c
+149-0sys/dev/apple_acpi/apple_acpi.h
+123-0sys/dev/apple_acpi/apple_platform.c
+120-0sys/dev/apple_acpi/apple_acpi.c
+74-0share/man/man4/acpi_apple.4
+8-0sys/modules/acpi/acpi_apple/Makefile
+1,245-03 files not shown
+1,255-09 files

HardenedBSD/src 802f5e4 — sbin/ggate/ggated ggated.c, sbin/ggate/ggatel ggatel.c

ggate: fix test intermittency

* ggatel: fix piped output.  Flush stdout before daemonizing, so the
  output can be read when it's in a command pipeline.

* ggated: bind the port _before_ daemonizing, so an invoking script can
  be sure that the port is bound as soon as the command returns.

* tests: allow ggatec or ggatel to automatically allocate a device
  number instead of choosing one in a racy way.

With all of these changes I can no run the tests 1000 times without
fail.  And in parallel, too.

MFC after:      1 week
Sponsored by:   ConnectWise
PR:             298942
Reported by:    siva
Reviewed by:    ngie
Differential Revision: https://reviews.freebsd.org/D60707
DeltaFile
+17-31tests/sys/geom/class/gate/ggate_test.sh
+13-8sbin/ggate/ggated/ggated.c
+3-1sbin/ggate/ggatel/ggatel.c
+0-3tests/sys/geom/class/gate/Makefile
+33-434 files

HardenedBSD/src da12097 — share/man/man7 ports.7, sys/dev/sound/pcm sound.h

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+7-1sys/dev/virtio/gpu/virtio_gpu.c
+0-6sys/dev/sound/pcm/sound.h
+3-1share/man/man7/ports.7
+10-83 files

HardenedBSD/src a6f68bc — share/man/man7 ports.7, sys/dev/sound/pcm sound.h

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+7-1sys/dev/virtio/gpu/virtio_gpu.c
+0-6sys/dev/sound/pcm/sound.h
+3-1share/man/man7/ports.7
+10-83 files

HardenedBSD/src a045cfb — sys/dev/sound/pcm sound.h

sound: Remove obsolete comment from sound.h

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 20381bce4b63975494a2f4bc84257f6932e6d379)
DeltaFile
+0-6sys/dev/sound/pcm/sound.h
+0-61 files

HardenedBSD/src 6db6755 — share/man/man7 ports.7

ports.7: Document how to use mdo(1) for SU_CMD

Reviewed by:    olce
MFC after:      1 week
Sponsored by:   fme AG
Differential Revision:  https://reviews.freebsd.org/D60443

(cherry picked from commit 8eb863097f264794eccd8ef7cdaf95aa80260353)
DeltaFile
+3-1share/man/man7/ports.7
+3-11 files

HardenedBSD/src ceaf30c — sys/dev/virtio/gpu virtio_gpu.c

virtio_gpu: use an X8R8G8B8 resource on big-endian guests

The virtio-gpu resource formats are defined by byte order in memory,
while vt(4) and the X server (through vt_fb and the fb mmap) write
native 32-bit 0x00RRGGBB pixels into the shadow framebuffer.  On a
big-endian guest such as powerpc64 those pixels land in memory as
00 RR GG BB, which the host interprets under B8G8R8X8 with red and
blue swapped and the padding byte taken as blue: white renders yellow
and blue renders black.

Request X8R8G8B8 on big-endian guests instead, which is also what the
Linux driver does (DRM_FORMAT_HOST_XRGB8888).  Reproduced with a colour
test pattern on a powerpc64 QEMU pseries guest using the identically
coded out-of-tree fork of this driver (graphics/virtio-gpu-qemu-kmod);
little-endian guests are unchanged.

Differential Revision:  https://reviews.freebsd.org/D60085
Approved by:    jhibbits
MFC after:      1 week

    [2 lines not shown]
DeltaFile
+7-1sys/dev/virtio/gpu/virtio_gpu.c
+7-11 files

HardenedBSD/src 91b283d — sys/dev/iwm if_iwm_pcie_trans.h if_iwm_pcie_trans.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+101-19sys/dev/iwm/if_iwm_phy_ctxt.c
+87-21sys/dev/iwm/if_iwm.c
+22-6sys/dev/iwm/if_iwm_sta.c
+18-0sys/dev/iwm/if_iwm_util.h
+7-6sys/dev/iwm/if_iwm_pcie_trans.c
+3-3sys/dev/iwm/if_iwm_pcie_trans.h
+238-554 files not shown
+248-5810 files

HardenedBSD/src 606ecfe — sys/fs/nfsserver nfs_nfsdsocket.c

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+7-0sys/fs/nfsserver/nfs_nfsdsocket.c
+7-01 files

HardenedBSD/src db34b21 — sys/dev/iwm if_iwm_pcie_trans.h if_iwm_pcie_trans.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+101-19sys/dev/iwm/if_iwm_phy_ctxt.c
+87-21sys/dev/iwm/if_iwm.c
+22-6sys/dev/iwm/if_iwm_sta.c
+18-0sys/dev/iwm/if_iwm_util.h
+7-6sys/dev/iwm/if_iwm_pcie_trans.c
+3-3sys/dev/iwm/if_iwm_pcie_trans.h
+238-554 files not shown
+248-5810 files

HardenedBSD/src 5b15afe — sys/fs/nfsserver nfs_nfsdsocket.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+7-0sys/fs/nfsserver/nfs_nfsdsocket.c
+7-01 files

HardenedBSD/src f84cdc2 — sys/netpfil/pf if_pfsync.c

pfsync: use result of m_pullup()
DeltaFile
+2-2sys/netpfil/pf/if_pfsync.c
+2-21 files

HardenedBSD/src c27ed49 — sys/dev/iwm if_iwm_pcie_trans.h if_iwm_pcie_trans.c

iwm: add return status to set/clear prph bits

This brings these functions inline with OpenBSD

Locally tested:

* 3160, STA mode
* 7260, STA mode
* 8260, STA mode
* 9260, STA mode

Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674

Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D60211
DeltaFile
+7-6sys/dev/iwm/if_iwm_pcie_trans.c
+3-3sys/dev/iwm/if_iwm_pcie_trans.h
+10-92 files

HardenedBSD/src 103a4f0 — sys/dev/iwm if_iwmvar.h if_iwm_phy_ctxt.h

iwm: update phy context routines; add HT channel width parameter

Update the phy context routines to match what the openbsd snapshot
is doing.  This involves some HT channel width stuff which although
I am not doing HT right now, it was juts easier to sync these
entirely versus just a partial sync.

* Update the phy context routines to match what openbsd is doing
* Although the openbsd driver has an iwm_phy_ctxt_update() routine
  instead of add and modify, I'm leaving it as-is for now.
  A bunch of refactoring is going to need to be done to properly
  use an iwm_phy_ctxt_update() call and I didn't want to tackle
  that in here.
* Add a UHB firmware capability phy context call; I can't test it
  but it's mostly copy/paste.
* Add in a util to turn ieee80211_channel into the 'sco' variable
  (the HT low/hi parameter) since it's done in openbsd in a
  slightly different way.


    [10 lines not shown]
DeltaFile
+101-19sys/dev/iwm/if_iwm_phy_ctxt.c
+18-0sys/dev/iwm/if_iwm_util.h
+6-2sys/dev/iwm/if_iwm.c
+5-0sys/dev/iwm/if_iwm_phy_ctxt.h
+1-0sys/dev/iwm/if_iwmvar.h
+131-215 files

HardenedBSD/src ed92055 — sys/dev/iwm if_iwm.c

iwm: bring IWM_CSR_HW_IF_CONFIG_REG programming in line with openbsd

bring the iwm_nic_config() / IWM_CSR_HW_IF_CONFIG_REG programming
in line with openbsd.

Locally tested:

* 3160 STA mode
* 7260 STA mode
* 8260 STA mode
* 9260 STA mode

Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674

Differential Revision:  https://reviews.freebsd.org/D60081
DeltaFile
+8-5sys/dev/iwm/if_iwm.c
+8-51 files

HardenedBSD/src 8d53176 — sys/dev/iwm if_iwmvar.h if_iwm_util.c

iwm: add DQA (dynamic queue assignment)

This is the minimum set of DQA bits from iwm at the given openbsd
commit place.

* add a method to map ac to queue / ring
* use the DQA command queue if needed
* glue to wire it up

Locally tested:

* Intel 7260, STA mode
* Intel 9260, STA mode
* Intel 8260, STA mode
* Intel 3160, STA mode

Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674

Differential Revision:  https://reviews.freebsd.org/D60080
DeltaFile
+73-14sys/dev/iwm/if_iwm.c
+22-6sys/dev/iwm/if_iwm_sta.c
+1-1sys/dev/iwm/if_iwm_util.c
+1-0sys/dev/iwm/if_iwmvar.h
+97-214 files

HardenedBSD/src e4a203a — sys/fs/nfsserver nfs_nfsdsocket.c

nfs_nfsdsocket.c: Fix "nfsstats -d" for ERELOOKUP

When ERELOOKLUP is returned by a file operation
(always vop_lookup?) the operation is retried without
doing nfsrv_statsend().

This patch fixes this problem,

The only effect of the bug was bogus "nfsstat -d"
output.

PR:     298534

(cherry picked from commit 9a237074d380233e93a17ddee6b155cc2f90ee96)
DeltaFile
+7-0sys/fs/nfsserver/nfs_nfsdsocket.c
+7-01 files