HardenedBSD/src 647688dlibexec/nuageinit nuageinit, libexec/nuageinit/tests nuageinit.sh

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+67-46libexec/nuageinit/nuageinit
+45-54sys/netpfil/pf/pf_nl.c
+4-2release/tools/gce.conf
+5-1sys/dev/acpica/Osd/OsdSchedule.c
+4-0libexec/nuageinit/tests/nuageinit.sh
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S
+126-1042 files not shown
+128-1068 files

HardenedBSD/src 2b966dalibexec/nuageinit nuageinit, libexec/nuageinit/tests nuageinit.sh

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+67-46libexec/nuageinit/nuageinit
+45-54sys/netpfil/pf/pf_nl.c
+4-2release/tools/gce.conf
+5-1sys/dev/acpica/Osd/OsdSchedule.c
+4-0libexec/nuageinit/tests/nuageinit.sh
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S
+126-1042 files not shown
+128-1068 files

HardenedBSD/src 0df9054sys/netpfil/pf pf_nl.c

pf: handle nlattr_add_nested() failure

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+45-0sys/netpfil/pf/pf_nl.c
+45-01 files

HardenedBSD/src bf19253sys/netpfil/pf pf_nl.c

pf: remove redundant zeroing

nlmsg_reserve_object() already zeroes the header before it gives it to
us, so there's no need to explicitly zero these fields again.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-54sys/netpfil/pf/pf_nl.c
+0-541 files

HardenedBSD/src c0df8f6sys/dev/acpica/Osd OsdSchedule.c

acpi: Make taskqueue only run on BSP

This is needed because when we add the suspend-to-idle loop, we only
want to break the BSP out of idle to process the taskqueue while keeping
all the others idled.

Currently assuming BSP to be CPU0, which may not always be the case on
non-x86.

Reviewed by:    kib
Approved by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54406
DeltaFile
+5-1sys/dev/acpica/Osd/OsdSchedule.c
+5-11 files

HardenedBSD/src 65e77d3libexec/nuageinit/tests nuageinit.sh

nuageinit: fix test after recent behaviour change

with recent change nuageinit always create a "freebsd" user, if no
users are specified, which means we do need to get the rootdir in the
testsuite containing a group file otherwise pw complains and the tests
fails.
DeltaFile
+4-0libexec/nuageinit/tests/nuageinit.sh
+4-01 files

HardenedBSD/src cae2809libexec/nuageinit nuageinit

nuageinit: set the hostname when user-data is missing

This address the situation reported here
https://github.com/freebsd/freebsd-src/pull/1952#issuecomment-3720210259

The user-data file was missing and the `sethostname` function is never
called. This commit adjusts slightly the logic to avoid the `exit()` call
when the `user-data` file is missing.

MFC After:      1 week
Signed-off-by: Gonéri Le Bouder <goneri at lebouder.net>
Differential Revision:  https://github.com/freebsd/freebsd-src/pull/1953
DeltaFile
+67-46libexec/nuageinit/nuageinit
+67-461 files

HardenedBSD/src 9ae4335release/tools gce.conf

GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0.

This is required for MSI support on GCE ARM64 instances which is
prerequisite to gve(4) not panicking at boot, and nvme(4) also has
a real sad time without interrupts. Tested on a variety of c4a VMs.

This is meant to be a temporary hack; long term fix would be to
check for the hypervisor and quirk gve(4) device with
PCI_QUIRK_ENABLE_MSI_VM.

PR:             kern/292081
MFC after:      1 week
DeltaFile
+3-0release/tools/gce.conf
+3-01 files

HardenedBSD/src 709c104release/tools gce.conf

GCE: Fix growfs path

The sed command was missing the ${DESTDIR} prefix, meaning it was
attempting to modify the build host's /etc/rc.d/growfs instead of
the target image's script. Tested in an arm64 builder that builds
as non-root.

PR:             kern/292081
MFC after:      1 day
DeltaFile
+1-1release/tools/gce.conf
+1-11 files

HardenedBSD/src f604d84release/tools gce.conf

GCE: Enable vtnet(4) Multiqueue.

Removes hw.vtnet.mq_disable=1.

This workaround was originally introduced nearly a decade ago to
address stability issues on KVM that have long since been resolved
in both the FreeBSD driver and the GCE hypervisor. Removing this
allows network interrupts to scale across multiple vCPUs.

Tested on n2-highcpu-16 VM with 15.0-RELEASE and confirmed multiple
queue pairs active and interrupts handling across cores.

PR:             kern/292081
MFC after:      1 day
DeltaFile
+0-1release/tools/gce.conf
+0-11 files

HardenedBSD/src eb1b6ecsys/contrib/openzfs/module/icp/asm-x86_64/modes aesni-gcm-avx2-vaes.S aesni-gcm-x86_64.S

zfs: emit .note.GNU-stack section for all ELF targets

On FreeBSD, linking the zfs kernel module with binutils ld 2.44 shows
the following warning:

    ld: warning: aesni-gcm-avx2-vaes.o: missing .note.GNU-stack section implies executable stack
    ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Some of the `.S` files under `module/icp/asm-x86_64/modes` check whether
to emit the `.note.GNU-stack` section using:

    #if defined(__linux__) && defined(__ELF__)

We could add `&& defined(__FreeBSD__)` to the test, but since all other
`.S` files in the OpenZFS tree use:

    #ifdef __ELF__

it would seem more logical to use that instead. Any recent ELF platform

    [5 lines not shown]
DeltaFile
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S
+3-33 files

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