HardenedBSD/src 605af06sys/dev/cxgbe t4_main.c

cxgbe(4): Show correct range of tids in sysctl_tids

The highest valid tid has to be adjusted for the hi-pri filter region.

MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+1-1sys/dev/cxgbe/t4_main.c
+1-11 files

HardenedBSD/src be7e4dcsys/dev/nvme nvme_private.h

nvme: Use size_t for payload size

Using uint32_t here can cause spurious compiler warnings.  I assume it
was done to constrain the range; use a KASSERT instead.

Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55279
DeltaFile
+3-1sys/dev/nvme/nvme_private.h
+3-11 files

HardenedBSD/src 10ac741sys/sys elf_common.h

elf_common.h: Add some AArch32 relocations

Reviewed by:    mmel
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55268
DeltaFile
+13-0sys/sys/elf_common.h
+13-01 files

HardenedBSD/src 6265f30lib/libsys/arm Makefile.sys

libsys/arm: include ARM EABI unwind bits into libsys

libsys required ARM EABI unwind symbols like __aeabi_unwind_cpp_pr0.
These symbols are normally provided by libc, but if a binary does
not link libc, the symbol ends up not being resolved.

Among other problems, this prevented gcc14 and newer from building
on arm.

Add the relevant symbols as hidden symbols into libsys to avoid this
problem.

(this patch was posted by jrtc27 who has asked me to move it along)

PR:             292539
Tested by:      fuz, Mark Millard <marklmi26-fbsd at yahoo.com>
Reviewed by:    mmel
Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55255
DeltaFile
+5-0lib/libsys/arm/Makefile.sys
+5-01 files

HardenedBSD/src 1782bc9lib/libc/arm/aeabi aeabi_unwind_cpp.c

libc/arm: use __builtin_trap() instead of abort() in aeabi_unwind stubs

This avoids a dependency on the abort symbol in libsys.

PR:             292539
Reviewed by:    mmel
Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55255
DeltaFile
+6-6lib/libc/arm/aeabi/aeabi_unwind_cpp.c
+6-61 files

HardenedBSD/src 8efcc64lib/libc/stdlib reallocarray.3, share/man/man3 stdbit.3

Summary: *.3: misc man page fixes

Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55249
DeltaFile
+1-1share/man/man3/stdbit.3
+1-1lib/libc/stdlib/reallocarray.3
+2-22 files

HardenedBSD/src 2cfca8eusr.bin/diff3 diff3.c, usr.bin/diff3/tests diff3_test.sh Makefile

diff3: fix merge mode

Make the merge mode compatible with GNU diff3
Add tests for all the changes, those tests are extracted from the
etcupdate testsuite.

This version passes the etcupdate testsuite and the diffutils diff3
test suite.

MFC After:      1 week
DeltaFile
+25-26usr.bin/diff3/diff3.c
+42-3usr.bin/diff3/tests/diff3_test.sh
+15-1usr.bin/diff3/tests/Makefile
+16-0usr.bin/diff3/tests/passwd-Em.out
+15-0usr.bin/diff3/tests/passwd-test.txt
+12-0usr.bin/diff3/tests/passwd-new.txt
+125-309 files not shown
+168-3015 files

HardenedBSD/src a8b8fectests/atf_python/sys/net vnet.py

atf_python/vnet: Make it possible to set the FIB of vnet interfaces

Reviewed by:    zlei, ngie
MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54972
DeltaFile
+15-1tests/atf_python/sys/net/vnet.py
+15-11 files

HardenedBSD/src 3cbdcabusr.sbin/ngctl main.c msg.c

ngctl: Modernize code somewhat

* Replace fgets(3) with getline(3)

* Replace select(2) with poll(2)

* Avoid needlessly copying text around

* Correct use of getopt(3)

* Pick some style and whitespace nits

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55257
DeltaFile
+110-125usr.sbin/ngctl/main.c
+16-23usr.sbin/ngctl/msg.c
+6-8usr.sbin/ngctl/list.c
+4-6usr.sbin/ngctl/write.c
+4-6usr.sbin/ngctl/status.c
+4-5usr.sbin/ngctl/config.c
+144-1739 files not shown
+164-21215 files

HardenedBSD/src 585190dusr.sbin/ngctl write.c

ngctl: Check hook name length

Check the length of the hook name when copying it into the sockaddr.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55258
DeltaFile
+14-4usr.sbin/ngctl/write.c
+14-41 files

HardenedBSD/src 59906a1usr.sbin/ngctl config.c

ngctl: Fix buffer overflow in config command

Keep track of our buffer length when assembling the argument list.

PR:             293075
MFC after:      1 week
Reviewed by:    zlei, markj
Differential Revision:  https://reviews.freebsd.org/D55259
DeltaFile
+14-8usr.sbin/ngctl/config.c
+14-81 files

HardenedBSD/src e7f86f8sys/kern kern_event.c

kqtimer_proc_continue(): correct calculation of 'now'

It must be sbinuptime(), this is how kc->next is set up.

PR:     293141
Noted and reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D55264
DeltaFile
+1-4sys/kern/kern_event.c
+1-41 files

HardenedBSD/src 75a30easys/kern kern_event.c

filt_timerexpire_l(): re-insert restarted timer into head instead of tail

of the resumed timers list, so that kqtimer_proc_continue() does not
iterated into the same timer again.

PR:     293141
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D55264
DeltaFile
+6-1sys/kern/kern_event.c
+6-11 files

HardenedBSD/src bf149f2sys/kern subr_msan.c

kmsan: Implement __msan_test_shadow()

This is needed when building OpenZFS with KMSAN enabled, as the bundled
zstd uses it.

MFC after:      1 week
DeltaFile
+18-0sys/kern/subr_msan.c
+18-01 files

HardenedBSD/src 394201clib/libarchive/tests functional_test.sh, usr.bin/bsdcat/tests functional_test.sh

tests: Simplify libarchive tests

The ATF tests work by first running the test program with an invalid
flag, which causes it to print an error message, a summary of options,
and a list of available test cases.  Switch to the new -l option which
simply prints the list, and simplify the awk script used to parse the
output.  No functional change.

MFC after:      1 week
DeltaFile
+2-2usr.bin/tar/tests/functional_test.sh
+1-1usr.bin/unzip/tests/functional_test.sh
+1-1usr.bin/cpio/tests/functional_test.sh
+1-1lib/libarchive/tests/functional_test.sh
+1-1usr.bin/bsdcat/tests/functional_test.sh
+6-65 files

HardenedBSD/src 1e2eea5sys/dev/nvme nvme_private.h nvme_sysctl.c

nvme: Change fail_on_reset to bool

This is safe since sysctl_handle_bool() handles ints transparently.

Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55263
DeltaFile
+1-1sys/dev/nvme/nvme_private.h
+1-1sys/dev/nvme/nvme_sysctl.c
+2-22 files

HardenedBSD/src 8d442cfusr.bin/diff3 diff3.c

diff3: fix diff3 -A

for cases where file2 differs but file1 and file3 agrees, the code
stored the file2 and file3 line numbers in the de[] editing script
entries but used them as if they were file1 line numbers.

Reviewed by:            thj
Differential Revision:  https://reviews.freebsd.org/D55276
DeltaFile
+24-7usr.bin/diff3/diff3.c
+24-71 files

HardenedBSD/src cb81a9csys/x86/include x86_var.h, sys/x86/x86 cpu_machdep.c

x86: provide extended description for x86_msr_op(9)

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision: https://reviews.freebsd.org/D55045
DeltaFile
+43-0sys/x86/x86/cpu_machdep.c
+2-4sys/x86/include/x86_var.h
+45-42 files

HardenedBSD/src 36ceb55sys/x86/x86 cpu_machdep.c

x86_msr_op(9): consistently return the value read from MSR

If the operation is executed on more than one CPU, a random instance of
the read value is returned.

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55045
DeltaFile
+15-4sys/x86/x86/cpu_machdep.c
+15-41 files

HardenedBSD/src af99e40sys/x86/include x86_var.h, sys/x86/x86 cpu_machdep.c

x86: add a safe variant of MSR_OP_SCHED* operations for x86_msr_op(9)

The modifier executes the operation using msr{read,write}_safe()
functions instead of plain msr reads and writes.  Returns EFAULT if any
MSR access caused #GP.

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55045
DeltaFile
+68-7sys/x86/x86/cpu_machdep.c
+2-1sys/x86/include/x86_var.h
+70-82 files

HardenedBSD/src 2bdec2esys/dev/e1000 if_em.c

e1000: Increase FC pause/refresh time on PCH2 and newer

This corresponds to Linux f74dc880098b4a29f76d756b888fb31d81ad9a0c

That commit does not provide any public background detail, but it's been
in use for over 5 years and corresponds to previous chip bugs w.r.t.
automatic generation of PAUSE frames.

Reviewed by:    kgalazka
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54555
DeltaFile
+2-2sys/dev/e1000/if_em.c
+2-21 files

HardenedBSD/src 1a6bdd6sys/dev/asmc asmc.c

asmc: Convert driver to CTLFLAG_MPSAFE

Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls.
The driver already uses spin mutexes (sc->sc_mtx) for hardware
access protection and does not require the Giant lock.

This improves scalability by allowing concurrent sysctl access
without Giant serialization.

Reviewed by:    ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D54613
DeltaFile
+14-14sys/dev/asmc/asmc.c
+14-141 files

HardenedBSD/src fa9dadc. RELNOTES, sys/dev/smartpqi smartpqi_ioctl.c smartpqi_defines.h

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+199-0sys/dev/smartpqi/smartpqi_ioctl.c
+8-3sys/dev/smartpqi/smartpqi_defines.h
+8-1sys/dev/smartpqi/smartpqi_ioctl.h
+6-2sys/dev/smartpqi/smartpqi_controllers.h
+7-0RELNOTES
+2-2sys/dev/smartpqi/smartpqi_event.c
+230-811 files not shown
+244-1917 files

HardenedBSD/src afe55aesys/dev/cxgbe t4_main.c

cxgbe(4): Fix assertion in timer calibration

The calibration callout is stopped when the adapter is marked off limits
but not when the adapter is merely stopped.

MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+1-1sys/dev/cxgbe/t4_main.c
+1-11 files

HardenedBSD/src 4ca74af. RELNOTES

RELNOTES:  Add entry for 0c370a416b68
DeltaFile
+7-0RELNOTES
+7-01 files

HardenedBSD/src 0c370a4sys/dev/smartpqi smartpqi_ioctl.c smartpqi_defines.h

smartpqi: Update to vendor version 14.4690.0.2008 - 15.2.0.2008

Update to versions:
FreeBSD14 14.4690.2008
FreeBSD15 15.2.0.2008

Included in this update are:
 - Support for new controllers
 - Add code that utilizes the new BIG_IOCTL_Command_struct and allows
   the I/O buffer size for a single passthrough ioctl to be stored as a
   32 bit integer instead of the original 16 bit integer.
 - Update occurrences of Microsemi to Microchip
 - Some format changes including converting comments from C++ to C
   style, remove instances of /* $FreeBSD$ */, and updating copyright
   dates.

Update to versions:
FreeBSD14 14.4690.2008
FreeBSD15 15.2.0.2008

    [24 lines not shown]
DeltaFile
+199-0sys/dev/smartpqi/smartpqi_ioctl.c
+8-3sys/dev/smartpqi/smartpqi_defines.h
+8-1sys/dev/smartpqi/smartpqi_ioctl.h
+6-2sys/dev/smartpqi/smartpqi_controllers.h
+2-2sys/dev/smartpqi/smartpqi_event.c
+2-2sys/dev/smartpqi/smartpqi_queue.c
+225-1010 files not shown
+237-1916 files

HardenedBSD/src a6af590sys/netpfil/pf pf.h

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+1-1sys/netpfil/pf/pf.h
+1-11 files

HardenedBSD/src d03b6bbtests/sys/netpfil/pf loginterface.sh

pf tests: verify blocked count on log interface

Also check the IPv6 pass/block numbers.

PR:             291763
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+13-1tests/sys/netpfil/pf/loginterface.sh
+13-11 files

HardenedBSD/src 1e7665elib/libpfctl libpfctl.c

libpfctl: verify all parsers

List all currently defined parsers in 'all_parsers', and pass them to
SNL_VERIFY_PARSERS(). This will detect incorrect odering in parsers,
which will help us detect otherwise subtle bugs.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+40-12lib/libpfctl/libpfctl.c
+40-121 files

HardenedBSD/src 363b57dlib/libpfctl libpfctl.c

libpfctl: Sort order of  snl attribute parser

snl atttribute parsers must be sorted by type, so PF_GS_BCOUNTERS
(16) must follow PF_GF_PCOUNTERS (15). Fix ordering and add a call
to SNL_VERIFY_PARSERS.

Without this fix, byte counters reported by 'pfctl -s info' with
a loginterface are always zero.

PR:             291763
MFC after:      1 week
Reviewed by:    kp
Signed-off-by:  eborisch at gmail.com
DeltaFile
+7-1lib/libpfctl/libpfctl.c
+7-11 files