HardenedBSD/src 072af59sys/netlink/route iface.c

netlink: make compile without VIMAGE

Add the #include for proc.h which seems to be there in the VIMAGE
case through some other includes only.

Sponsored by:   The FreeBSD Foundation
Fixes:          04f6b99947d2
DeltaFile
+1-0sys/netlink/route/iface.c
+1-01 files

HardenedBSD/src 0a57589sys/compat/linuxkpi/common/include/linux dma-mapping.h, sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: implement dmam_free_coherent()

dmam_free_coherent() is used by an updated mt76 driver at v6.19-rc6.
We need to surgically find the devres information and destroy it before
calling dma_free_coherent.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D54810
DeltaFile
+36-0sys/compat/linuxkpi/common/src/linux_pci.c
+9-0sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+45-02 files

HardenedBSD/src 44d1153sys/compat/linuxkpi/common/include/linux minmax.h

LinuxKPI: add umin()

Add a version of umin() simply using MIN() assuming that the Linux
upstream code properly check that the arguments are unsigned, etc.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D54807
DeltaFile
+3-0sys/compat/linuxkpi/common/include/linux/minmax.h
+3-01 files

HardenedBSD/src 7e4a2b3sys/compat/linuxkpi/common/include/linux bitops.h

LinuxKPI: improve hweight<n> if complie time constant

rtw89(4) uses a static_assert() with hweight<n> calls.  In order to
avoid compile time errors, deal with the case when the arguments to
hweight<n> are complie time constant.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D54806
DeltaFile
+6-6sys/compat/linuxkpi/common/include/linux/bitops.h
+6-61 files

HardenedBSD/src bf4aa75sys/compat/linuxkpi/common/include/linux ptp_clock_kernel.h

LinuxKPI: PTP add (*settime64) to struct ptp_clock_info

While iwlwifi supportes PTP, LinuxKPI does not and we only add the
definitons to avoid mangling upstream drivers.
iwlwifi(4) does not even support the (*settime64) callback but only
returns -EOPNOTSUPP.

Sponosred by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D54802
DeltaFile
+1-0sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h
+1-01 files

HardenedBSD/src 4f09377tools/tools/nanobsd defaults.sh

nanobsd: Fix _populate_part()

- Avoid unnecessary subshell execution
- Fix removing the temporary and empty /cfg directory
- Do not remove the generated metalog file for /cfg or /data partitions

Fixes:          61ac7309c366 ("nanobsd: Add a provisional populate_part function")
MFC after:      3 days
DeltaFile
+4-5tools/tools/nanobsd/defaults.sh
+4-51 files

HardenedBSD/src e188d1blib/libfetch fetch.3 common.c, sys/netlink ktest_netlink_message_writer.c ktest_netlink_message_writer.h

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+8-4lib/libfetch/fetch.3
+10-0lib/libfetch/common.c
+0-5sys/netlink/ktest_netlink_message_writer.c
+1-1sys/netlink/ktest_netlink_message_writer.h
+19-104 files

HardenedBSD/src edf3b67lib/libfetch fetch.3 common.c

MFC: libfetch: allow disabling TLS v1.3 when negotiating the connection

(cherry picked from commit 129aec72250266e60c07ff4643623188f7c27a9d)
DeltaFile
+8-4lib/libfetch/fetch.3
+2-0lib/libfetch/common.c
+10-42 files

HardenedBSD/src 8ec5623lib/libfetch common.c

MFC: libfetch: apply timeout to SSL_read()

Currently, fetchTimeout works for non-SSL connections only, so does fetch -T.
Fix it applying specified timeout to SSL_read().

(cherry picked from commit 8f8a7f6fffd7dca09013f7c4bfa075bc3825fb8e)
DeltaFile
+8-0lib/libfetch/common.c
+8-01 files

HardenedBSD/src a900227sys/netlink ktest_netlink_message_writer.c ktest_netlink_message_writer.h

tests/ktest_netlink_message_writer: remove INVARIANTS requirement

INVARIANTS is meant to be used to enable extra sanity checking for
internal structures, not enable/disable tests in the freebsd kyua
test suite.

STABLE branches include a GENERIC kernconf without INVARIANTS, so
ktest_netlink_message_writer is broken on such branches:

https://ci.freebsd.org/job/FreeBSD-stable-15-amd64-test/253/testReport/sys.netlink.test_netlink_message_writer/py/__test_cases_list__/

Reviewed by:    lwhsu, imp
Approved by:    lwhsu (mentor)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1889
Signed-off-by:  Siva Mahadevan <siva at FreeBSD.org>
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 8352e24d0bc59f9730980986600bde7d8cdce21d)
DeltaFile
+0-5sys/netlink/ktest_netlink_message_writer.c
+1-1sys/netlink/ktest_netlink_message_writer.h
+1-62 files

HardenedBSD/src aecc6delib/libthr/tests pthread_tryjoin_test.c, lib/libthr/thread thr_join.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+184-24sys/x86/x86/local_apic.c
+54-22lib/libthr/thread/thr_join.c
+62-0lib/libthr/tests/pthread_tryjoin_test.c
+23-3share/man/man3/pthread_join.3
+11-1sys/kern/init_main.c
+8-0sys/vm/vm_init.c
+342-506 files not shown
+357-5612 files

HardenedBSD/src 854e0e4sys/x86/x86 local_apic.c

x86 lapic: Dump LVTs from the ddb show lapic command

(cherry picked from commit dfc4186c6dcf2986b510fac108784011a236554d)
DeltaFile
+34-6sys/x86/x86/local_apic.c
+34-61 files

HardenedBSD/src 4f004c7lib/libthr/tests pthread_tryjoin_test.c Makefile

lib/libthr: add pthread_tryjoin(3) test

(cherry picked from commit 902e3057cd5c7a076b78dd559b7b264610af59aa)
DeltaFile
+62-0lib/libthr/tests/pthread_tryjoin_test.c
+1-0lib/libthr/tests/Makefile
+63-02 files

HardenedBSD/src c4522eflib/libthr/thread thr_join.c

libthr/thread/thr_join.c: deduplicate backout_join() helper

(cherry picked from commit ce16be73707eedc798b26e0741dcd70d1168ac10)
DeltaFile
+13-8lib/libthr/thread/thr_join.c
+13-81 files

HardenedBSD/src 21dd894sys/amd64/amd64 machdep.c, sys/kern init_main.c

sys: do not allow entering vm_fault() on boot until VM is initialized

(cherry picked from commit 83d98828867591b5d842573ed6edcec7392f82df)
DeltaFile
+11-1sys/kern/init_main.c
+8-0sys/vm/vm_init.c
+1-4sys/amd64/amd64/machdep.c
+20-53 files

HardenedBSD/src d1ac644share/man/man3 pthread_join.3 Makefile

Document pthread_tryjoin_np(3)

(cherry picked from commit 7f026a58691db1763203ab8c7c8f34f738bfd9d5)
DeltaFile
+23-3share/man/man3/pthread_join.3
+2-1share/man/man3/Makefile
+25-42 files

HardenedBSD/src a8891c2include pthread_np.h, lib/libthr pthread.map

libthr: add pthread_tryjoin_np()

(cherry picked from commit afa70a8496e90fa751418be8d1b55e3d559a281a)
DeltaFile
+41-14lib/libthr/thread/thr_join.c
+4-0lib/libthr/pthread.map
+1-0include/pthread_np.h
+46-143 files

HardenedBSD/src dfd4c87sys/x86/x86 local_apic.c

x88/local_apic.c: for each lvt element, add LVT register index

(cherry picked from commit 87ed56a5c43521d97975d936df4fc36184f1b685)
DeltaFile
+12-0sys/x86/x86/local_apic.c
+12-01 files

HardenedBSD/src 7c59e09sys/x86/x86 local_apic.c

x86/local_apic.c: convert lvts[] and elvts[] arrays to designated initializers

(cherry picked from commit 4938ee8064868f120413405f1b3aa40344a6fabd)
DeltaFile
+92-13sys/x86/x86/local_apic.c
+92-131 files

HardenedBSD/src 7d327e4sys/x86/include apicreg.h, sys/x86/x86 local_apic.c

x86/local_apic.c: Properly calculate the number of LVT entries

(cherry picked from commit 709a53c8b20b5770f7e2f117d4799b5617479976)
DeltaFile
+5-2sys/x86/x86/local_apic.c
+6-1sys/x86/include/apicreg.h
+11-32 files

HardenedBSD/src 2079e58sys/x86/x86 local_apic.c

x86: mask all LAPIC vectors early, before BSP interrupts are enabled

(cherry picked from commit 11f954b021a1aadde1d03d40ed5d6b529e14da98)
DeltaFile
+28-0sys/x86/x86/local_apic.c
+28-01 files

HardenedBSD/src 9286d8fsys/x86/x86 local_apic.c

x86/local_apic.c: add lapic_maxlvt() helper

(cherry picked from commit ad5e3cb950344f9822dbbd90f5ac7c256f97fa4c)
DeltaFile
+15-5sys/x86/x86/local_apic.c
+15-51 files

HardenedBSD/src da59b31tests/sys/fs/fusefs Makefile

Account for the ctl test needing the ctl(4) module

This testcase does not function unless the /dev/ctl/... node exists,
which is created by the ctl(4) module. Require the ctl(4) module to be
loaded so the test can be executed.

MFC after: 1 week
Differential Revision:  https://reviews.freebsd.org/D54518
DeltaFile
+3-0tests/sys/fs/fusefs/Makefile
+3-01 files

HardenedBSD/src ec2b3d7stand/fdt fdt_loader_cmd.c

loader: Only warn for !FDT && !ACPI take two

For unclear reasons, we used to print two warnings about not having a
DTB: First,
        printf("No valid device tree blob found!\n");
and immediately later a second,
        printf("WARNING! Trying to fire up the kernel, but no "
            "device tree blob found!\n");

A previous commit silenced the second warning in the event that the
acpi.revision environment variable was set, on the theory that systems
which have ACPI might not need a DTB; this commit silences the first
of the two warnings under the same condition.

Reviewed by:    andrew
Fixes:  3989a3d81701 ("loader: Only warn when we have neither FDT nor ACPI")
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D54772
DeltaFile
+1-1stand/fdt/fdt_loader_cmd.c
+1-11 files

HardenedBSD/src f0ecf35release/tools vmimage.subr

vmimage.subr: Install pkg on pkgbase images

When building VM and Cloud images with a packaged base system, install
the pkg package; this makes it possible for the base system to be
updated without installing pkg from the FreeBSD-ports repository.

Sponsored by:   Amazon
DeltaFile
+3-0release/tools/vmimage.subr
+3-01 files

HardenedBSD/src 7101676sys/compat/linuxkpi/common/include/linux seq_buf.h, sys/compat/linuxkpi/common/src linux_seq_buf.c

linuxkpi: Implement <linux/seq_buf.h>

It is a wrapper above a `char *` to track the overall available space in
the buffer as well as the used space. This wrapper does not manage
memory allocation.

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

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54488
DeltaFile
+73-0sys/compat/linuxkpi/common/include/linux/seq_buf.h
+64-0sys/compat/linuxkpi/common/src/linux_seq_buf.c
+2-0sys/conf/files
+1-0sys/modules/linuxkpi/Makefile
+140-04 files

HardenedBSD/src c56b2f7share/man/man4 vt.4, tests/sys/fs/fusefs destroy.cc mockfs.cc

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+81-0tests/sys/fs/fusefs/destroy.cc
+11-1tests/sys/fs/fusefs/mockfs.cc
+7-1tests/sys/fs/fusefs/utils.cc
+5-1share/man/man4/vt.4
+5-0tests/sys/fs/fusefs/utils.hh
+4-1tests/sys/fs/fusefs/mockfs.hh
+113-41 files not shown
+115-67 files

HardenedBSD/src 4bd4f5fshare/man/man4 vt.4, tests/sys/fs/fusefs destroy.cc mockfs.cc

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+81-0tests/sys/fs/fusefs/destroy.cc
+11-1tests/sys/fs/fusefs/mockfs.cc
+7-1tests/sys/fs/fusefs/utils.cc
+5-1share/man/man4/vt.4
+4-1tests/sys/fs/fusefs/mockfs.hh
+5-0tests/sys/fs/fusefs/utils.hh
+113-41 files not shown
+115-67 files

HardenedBSD/src 2876400share/man/man4 vt.4

vt.4: Document that hw.vga.textmode does not apply for UEFI(8) boot

PR:             292598
Approved by:    ziaee, imp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54842
DeltaFile
+5-1share/man/man4/vt.4
+5-11 files

HardenedBSD/src 52ddca7sys/fs/fuse fuse_ipc.h

fusefs: style

Reorder macro definitions.
DeltaFile
+2-2sys/fs/fuse/fuse_ipc.h
+2-21 files