HardenedBSD/src fc3312ecddl/lib/libdtrace cam.d, share/man/man4 dtrace_cam.4

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+194-0cddl/lib/libdtrace/cam.d
+89-0tools/cam/cam_all_but_scsi.d
+42-0share/man/man4/dtrace_cam.4
+27-4tools/test/hwpmc/pmctest.py
+13-13sys/dev/sdhci/sdhci_pci.c
+21-1sys/cam/cam_xpt.c
+386-189 files not shown
+437-3615 files

HardenedBSD/src e4c685acddl/lib/libdtrace cam.d, share/man/man4 dtrace_cam.4

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+194-0cddl/lib/libdtrace/cam.d
+89-0tools/cam/cam_all_but_scsi.d
+42-0share/man/man4/dtrace_cam.4
+27-4tools/test/hwpmc/pmctest.py
+13-13sys/dev/sdhci/sdhci_pci.c
+21-1sys/cam/cam_xpt.c
+386-189 files not shown
+437-3615 files

HardenedBSD/src cd1aa5ftools/cam cam_all_but_scsi.d README

tools/cam: Start to add the testing tools for CAM

Create a directory for testing tools arond CAM. These are snippets of
what will eventually be camio. At the moment, it was written using fbt
traces. This is OK, but fragile, so they need to be re-written with the
cam provider. cam_all_but_scsi.d is the first step. It shows how to do
this with the new cam dtrace provider.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54472
DeltaFile
+89-0tools/cam/cam_all_but_scsi.d
+9-0tools/cam/README
+98-02 files

HardenedBSD/src efb7795cddl/lib/libdtrace cam.d Makefile

dtrace: Add definitiosn for the cam dtrace provider

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54471
DeltaFile
+194-0cddl/lib/libdtrace/cam.d
+2-1cddl/lib/libdtrace/Makefile
+196-12 files

HardenedBSD/src aaec2a9sys/cam/scsi scsi_all.c

cam: When inq data isn't valid, pass NULL

When the device isn't there, we don't have valid inq data. Pass NULL in
this case. All the routines that receive this test against NULL already.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54470
DeltaFile
+8-10sys/cam/scsi/scsi_all.c
+8-101 files

HardenedBSD/src 1a7151fshare/man/man4 dtrace_cam.4 Makefile, sys/cam cam_xpt.c

cam: Add probes for xpt actions

cam::xpt:action(union ccb *)
cam::xpt:done((union ccb *)
cam::xpt:async-cb(void *cbarg, uint32_t async_code, struct cam_path
        *path, void *async_arg);

Called when xpt_action(), xpt_done*() and the xpt async callbacks are
called.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54469
DeltaFile
+42-0share/man/man4/dtrace_cam.4
+21-1sys/cam/cam_xpt.c
+1-0share/man/man4/Makefile
+64-13 files

HardenedBSD/src ecb1f46sys/cam cam.h cam.c

cam: Start adding dtrace provider 'cam'

Start to provide robust tracing in cam now that clang has broken my
fbt-based dtrace scripts a couple of times.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54468
DeltaFile
+14-0sys/cam/cam.h
+5-0sys/cam/cam.c
+19-02 files

HardenedBSD/src 3989a3dstand/efi/loader bootinfo.c

loader: Only warn when we have neither FDT nor ACPI

Sponsored by:           Netflix
Reviewed by:            adrian, andrew
Differential Revision:  https://reviews.freebsd.org/D54510
DeltaFile
+2-1stand/efi/loader/bootinfo.c
+2-11 files

HardenedBSD/src d82698astand/efi/loader main.c

loader.efi: Only use SPCR if enabled.

SerialPort in the SPCR is zeroed when serial redirection is disabled,
rather than the SPCR being omitted from the ACPI tables ony many
systems. Check to see that SerialPort.Address is non-zero before using.

FreeBSD would fail to boot on systems that could have a serial port
redireciton, but don't have it enabled because the loader would create a
bogus hw.uart.console. While one could unset this value to boot, you
couldn't do that automatically very easily. Instead, don't even look
at the SPCR table if the SerialPort is zero'd.

PR: 292206
MFC After: 3 days
Sponsored by: Netflix
Co-authored-by: Warner Losh <imp at FreeBSD.org>
Closes:  https://github.com/freebsd/freebsd-src/pull/1948
DeltaFile
+9-5stand/efi/loader/main.c
+9-51 files

HardenedBSD/src e2bedc7tools/test/hwpmc pmctest.py

Extend the script to collect gprof data

While we're at it, switch to simple waiting from communicate() calls.
DeltaFile
+27-4tools/test/hwpmc/pmctest.py
+27-41 files

HardenedBSD/src 9b5d6absys/dev/sdhci sdhci_pci.c

sdhci_pci(4): Remove incorrect __unused

The slot parameter actually is used as index into the memory resource.

Fixes:  c11bbc7d
DeltaFile
+13-13sys/dev/sdhci/sdhci_pci.c
+13-131 files

HardenedBSD/src 61002e0sys/kern tty.c

tty(4): Consistently use ISO C99 bool

Fixes:  9750d9e5
DeltaFile
+1-1sys/kern/tty.c
+1-11 files

HardenedBSD/src 7991435sys/compat/linuxkpi/common/include/linux kmsg_dump.h font.h, sys/compat/linuxkpi/common/include/media cec.h cec-notifier.h

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+147-35sys/net/iflib.c
+51-0sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
+33-0sys/compat/linuxkpi/common/include/linux/font.h
+23-0sys/compat/linuxkpi/common/include/media/cec.h
+20-0sys/compat/linuxkpi/common/include/linux/spinlock.h
+17-0sys/compat/linuxkpi/common/include/media/cec-notifier.h
+291-357 files not shown
+332-3913 files

HardenedBSD/src 27dd91fsys/compat/linuxkpi/common/include/linux kmsg_dump.h font.h, sys/compat/linuxkpi/common/include/media cec.h cec-notifier.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+147-35sys/net/iflib.c
+51-0sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
+33-0sys/compat/linuxkpi/common/include/linux/font.h
+23-0sys/compat/linuxkpi/common/include/media/cec.h
+20-0sys/compat/linuxkpi/common/include/linux/spinlock.h
+17-0sys/compat/linuxkpi/common/include/media/cec-notifier.h
+291-357 files not shown
+332-3913 files

HardenedBSD/src dcb8062sys/vm vm_object.h

vm_object.h: tweak OBJ_ONEMAPPING comment even more

The formulation that pages are allowed to have at most one mapping is
not quite clear.  Nothing prevents pages from having more than one
mapping, but the flag must be cleared then.

Reviewed by:    alc, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D54570
DeltaFile
+2-3sys/vm/vm_object.h
+2-31 files

HardenedBSD/src 6c0bcd1sys/compat/linuxkpi/common/include/linux bitops.h

linuxkpi: Add `rol32()`

`rol64()` and `rol32()` are used by <linux/siphash.h>. The former was
added previously, before <linux/siphash.h> was added. However the latter
was not, and it broke the build on armv7.

Reported by:    adrian
Reviewed by:    adrian, rpokala
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54588
DeltaFile
+6-0sys/compat/linuxkpi/common/include/linux/bitops.h
+6-01 files

HardenedBSD/src 10c6f1fsys/compat/linuxkpi/common/include/linux cec-funcs.h cec.h, sys/compat/linuxkpi/common/include/media cec.h cec-notifier.h

linuxkpi: Replicate the chain of #include in the `cec*.h` headers

The i915 DRM driver depends on this namespace pollution to access
`debugfs_*` functions, after several explicit #include of
<linux/debugfs.h> were removed in Linux 6.10.

Reviewed by:    bz, christos
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54494
DeltaFile
+23-0sys/compat/linuxkpi/common/include/media/cec.h
+17-0sys/compat/linuxkpi/common/include/media/cec-notifier.h
+16-0sys/compat/linuxkpi/common/include/linux/cec-funcs.h
+3-0sys/compat/linuxkpi/common/include/linux/cec.h
+0-0sys/compat/linuxkpi/dummy/include/media/cec-notifier.h
+59-05 files

HardenedBSD/src e86e4f1sys/compat/linuxkpi/common/include/linux kmsg_dump.h

linuxkpi: Add <linux/kmsg_dump.h>

This header declares register/unregister functions to allow a piece of
code to tell what function to call in case of a panic. Several panic
handlers may be registered.

The DRM generic code started to use it in Linux 6.10 as part of the
panic handler.

Reviewed by:    bz, christos
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54492
DeltaFile
+51-0sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
+51-01 files

HardenedBSD/src 3942e85sys/compat/linuxkpi/common/include/linux ratelimit.h

linuxkpi: Add WARN_RATELIMIT()

The i915 DRM driver started to use it in Linux 6.10.

Reviewed by:    bz, christos
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54493
DeltaFile
+7-0sys/compat/linuxkpi/common/include/linux/ratelimit.h
+7-01 files

HardenedBSD/src 514d37fsys/compat/linuxkpi/common/include/linux font.h

linuxkpi: Add <linux/font.h>

The header defines the minimum to allow the DRM generic code to build.
The only function used so far is `get_default_font()`, as part of a
DRM-specific panic handler. We do not use this panic handler on FreeBSD.

For now, it returns a NULL value. It should probably map to a vt(4)
font.

The DRM generic code started to use it in Linux 6.10 as part of the
panic handler.

Reviewed by:    bz, christos
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54491
DeltaFile
+33-0sys/compat/linuxkpi/common/include/linux/font.h
+33-01 files

HardenedBSD/src ac34135sys/compat/linuxkpi/common/include/linux spinlock.h

linuxkpi: Define `raw_spinlock_t` in <linux/spinlock.h>

For now, it is synonymous to `spinlock_t`. The DRM generic code uses the
`struct raw_spinlock` and not `raw_spinlock_t`, that's why the
definition is a struct embedding a `struct mtx`, compared to
`spinlock_t` which is a simpler typedef.

The DRM generic code started to use it in Linux 6.10.

Reviewed by:    bz, christos
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54489
DeltaFile
+20-0sys/compat/linuxkpi/common/include/linux/spinlock.h
+20-01 files

HardenedBSD/src 14d93f6share/man/man4 iflib.4, sys/net iflib.c

iflib: Drop tx lock when freeing mbufs using simple_transmit

Freeing completed transmit mbufs can be time consuming (due to them
being cold in cache, and due to ext free routines taking locks),
especially when we batch tx completions. If we do this when holding
the tx ring mutex, this can cause lock contention on the tx ring mutex
when using iflib_simple_transmit.

To resolve this, this patch opportunistically copies completed mbuf
pointers into a new array (ifsd_m_defer) so they can be freed after
dropping the transmit mutex. The ifsd_m_defer array is
opportunistically used, and may be NULL. If its NULL, then we free
mbufs in the old way. The ifsd_m_defer array is atomically nulled
when a thread is using it, and atomically restored when the freeing
thread is done with it. The use of atomics here avoids
acquire/release of the tx lock to restore the array after freeing
mbufs.

Since we're no longer always freeing mbufs inline, peeking into them to see if a

    [17 lines not shown]
DeltaFile
+147-35sys/net/iflib.c
+7-1share/man/man4/iflib.4
+154-362 files

HardenedBSD/src 8c530a2release/tools openstack.conf vagrant.conf, stand/lua core.lua

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+8-5usr.sbin/bhyve/aarch64/bhyverun_machdep.c
+5-6usr.bin/netstat/inet.c
+0-6release/tools/openstack.conf
+0-6release/tools/vagrant.conf
+6-0stand/lua/core.lua
+0-4release/tools/arm.subr
+19-2710 files not shown
+27-3716 files

HardenedBSD/src a059074release/tools openstack.conf vagrant.conf, stand/lua core.lua

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+8-5usr.sbin/bhyve/aarch64/bhyverun_machdep.c
+5-6usr.bin/netstat/inet.c
+0-6release/tools/openstack.conf
+0-6release/tools/vagrant.conf
+6-0stand/lua/core.lua
+0-4release/tools/arm.subr
+19-2710 files not shown
+27-3716 files

HardenedBSD/src e30086astand/lua core.lua

lualoader: fix pruning of non-existent default kernel

Removing the kernel from the list of available kernels is sufficient to
avoid rendering it in the list, but we need more for booting to actually
work.  Notably, the 'kernel' loader.conf var was left intact to its
default value, so if one didn't use the kernel selector in the menu then
we'd try to boot the nonexistent 'kernel' instead of the new default
(first autodetected).

There's room to improve the error messages here, but for now let's just
make it actually work correctly.

PR:             292232
Fixes:  d04415c520b03 ("loader: lua: remove the default kernel [...]")
DeltaFile
+6-0stand/lua/core.lua
+6-01 files

HardenedBSD/src 47015e4tests/sys/fs/fusefs Makefile, tests/sys/fs/tarfs tarfs_test.sh

tests: Increase timeout

Bump the timeout value, to avoid cutoff on emulated architectures on
ci.freebsd.org.

Reported by:    Jenkins
Reviewed by:    ngie
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54550
DeltaFile
+1-1tests/sys/fs/fusefs/Makefile
+1-1tests/sys/fs/tarfs/tarfs_test.sh
+1-1tests/sys/geom/class/eli/reentrancy_test.sh
+1-1tests/sys/kern/jailmeta.sh
+1-1tests/sys/mac/portacl/Makefile
+1-1tests/sys/netpfil/pf/rules_counter.sh
+6-61 files not shown
+7-67 files

HardenedBSD/src 301bc14tests/sys/netpfil/pf killstate.sh

pf: tests: Require python3

Reported by:    Jenkins
Reviewed by:    kp, ngie
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54549
DeltaFile
+1-0tests/sys/netpfil/pf/killstate.sh
+1-01 files

HardenedBSD/src 9fc7fe6usr.sbin/bhyve/aarch64 bhyverun_machdep.c

bhyve: improve console error reporting on arm64

Currently, on arm64, if bhyve fails to initialize the console,
it falls into assert(), which does not look particularly pretty
for users.

Replace the assert with proper error handling so bhyve prints
a meaningful error message and exits with status code 4 (error).
That matches the behavior on amd64.

Approved by:            markj
Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D54504
DeltaFile
+8-5usr.sbin/bhyve/aarch64/bhyverun_machdep.c
+8-51 files

HardenedBSD/src 3b6615eusr.bin/netstat inet.c

netstat: fix a segfault with --libxo

Fix a segfault when printing the "protocol" field.  The field-format and
encoding-format were expecting different numbers of arguments.

Also, fix the width of the tcp-state field in encoded output.

PR:             292228
Fixes:          c2b08c13c20 netstat: add support for UDP-Lite endpoints
MFC after:      1 week
Sponsored by:   ConnectWise
Reviewed by:    tuexen, js, des
Differential Revision: https://reviews.freebsd.org/D54567
DeltaFile
+5-6usr.bin/netstat/inet.c
+5-61 files

HardenedBSD/src d07198frelease Makefile, release/tools vagrant.conf openstack.conf

release: stop disabling sendmail

sendmail is already disabled by default everywhere since 14.0

MFC After:      1 week
Approved by:    emaste (re)
Reviewed by:    emaste (re)
Differential Revision:  https://reviews.freebsd.org/D54575
DeltaFile
+0-6release/tools/vagrant.conf
+0-6release/tools/openstack.conf
+0-4release/tools/arm.subr
+0-3release/Makefile
+0-1release/tools/oracle.conf
+0-205 files