FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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
+6-1sys/x86/include/apicreg.h
+5-2sys/x86/x86/local_apic.c
+11-32 files

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

FreeBSD/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

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

fusefs: style

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

FreeBSD/src ffb747dtests/sys/fs/fusefs destroy.cc mockfs.cc

fusefs: Add tests for the new -o auto_unmount feature

Add tests for mount_fusefs's new -o auto_unmount feature, recently added
by arrowd.

MFC with:       10037d0978f "fusefs: Implement support for the auto_unmount"
DeltaFile
+81-0tests/sys/fs/fusefs/destroy.cc
+11-1tests/sys/fs/fusefs/mockfs.cc
+7-1tests/sys/fs/fusefs/utils.cc
+4-1tests/sys/fs/fusefs/mockfs.hh
+5-0tests/sys/fs/fusefs/utils.hh
+108-35 files

FreeBSD/src c2b5133tools/test/stress2/misc swap8.sh unionfs21.sh

stress2: Added two new test scenarios
DeltaFile
+141-0tools/test/stress2/misc/swap8.sh
+44-0tools/test/stress2/misc/unionfs21.sh
+185-02 files

FreeBSD/src 833f929tools/test/stress2/misc syzkaller88.sh syzkaller89.sh

stress2: Added two syzkaller reproducers. Updated the exclude file
DeltaFile
+317-0tools/test/stress2/misc/syzkaller88.sh
+210-0tools/test/stress2/misc/syzkaller89.sh
+4-0tools/test/stress2/misc/all.exclude
+531-03 files

FreeBSD/src 44b0f31sys/dev/e1000 if_em.c e1000_phy.c

Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"

We've gotten a report of this breaking a fixed no autoneg setup.

Since no link is worse than what this intends to fix (negotiating full
duplex at forced speed), revert for the undeway 15.0 release cycle
until this can be further reviewed.

PR:             288827
Differential Revision:  https://reviews.freebsd.org/D47336

This reverts commit 645c45e297c0fcbbb9d2d24cdeeb124234825019.

(cherry picked from commit 3ff0231c87f360afa4521e635b46f6c711dc4ee3)
DeltaFile
+6-38sys/dev/e1000/if_em.c
+2-3sys/dev/e1000/e1000_phy.c
+8-412 files

FreeBSD/src e4730bbsys/dev/e1000 if_em.c e1000_phy.c

Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"

We've gotten a report of this breaking a fixed no autoneg setup.

Since no link is worse than what this intends to fix (negotiating full
duplex at forced speed), revert for the undeway 15.0 release cycle
until this can be further reviewed.

PR:             288827
Differential Revision:  https://reviews.freebsd.org/D47336

This reverts commit 645c45e297c0fcbbb9d2d24cdeeb124234825019.

(cherry picked from commit 3ff0231c87f360afa4521e635b46f6c711dc4ee3)
DeltaFile
+6-38sys/dev/e1000/if_em.c
+2-3sys/dev/e1000/e1000_phy.c
+8-412 files

FreeBSD/src 10037d0sbin/mount_fusefs mount_fusefs.8 mount_fusefs.c, sys/fs/fuse fuse_device.c fuse_ipc.h

fusefs: Implement support for the auto_unmount option kernel-side

libfuse clients may pass the "-o auto_unmount" flag to ensure that the mountpoint
will get unmounted even if the server terminate abnormally. Without this flag
sending KILL to a FUSE daemon leaves its mountpoint mounted.

Approved by:    asomers
Differential Revision:  https://reviews.freebsd.org/D53086
DeltaFile
+5-1sys/fs/fuse/fuse_device.c
+4-1sbin/mount_fusefs/mount_fusefs.8
+2-1sys/fs/fuse/fuse_ipc.h
+2-0sbin/mount_fusefs/mount_fusefs.c
+1-0sys/fs/fuse/fuse_vfsops.c
+14-35 files

FreeBSD/src 04f6b99sys/netlink/route iface.c

netlink: use caller's credentials in rtnl_handle_newlink

Make sure rtnl_handle_newlink sets the caller's credential
during calls to ifc_create_ifp_nl and ifc_modify_ifp_nl

Reviewed by: glebius, melifaro
Approved by: glebius (mentor)
Differential Revision: https://reviews.freebsd.org/D54109
DeltaFile
+10-2sys/netlink/route/iface.c
+10-21 files

FreeBSD/src 40c0d67sys/netgraph/netflow netflow_v9.c

ng_netflow v9: fix template re-announcement using packet count

Increment fe->sent_packets after export9_send().
Previously, NetFlow v9 templates were only re-announced based on
time, ignoring the packet count parameter (`templ_packets`).

PR:             270083
Reviewed by:    glebius pouria
Approved by:    glebius (mentor)
MFC after:      1 week
Sponsored by:   Subcarpathian BSD User Group

(cherry picked from commit d836dae9f0d888d441234ea11e3cd91614c86aa2)
DeltaFile
+1-0sys/netgraph/netflow/netflow_v9.c
+1-01 files

FreeBSD/src f51e0f5sys/netgraph/netflow netflow_v9.c

ng_netflow v9: fix template re-announcement using packet count

Increment fe->sent_packets after export9_send().
Previously, NetFlow v9 templates were only re-announced based on
time, ignoring the packet count parameter (`templ_packets`).

PR:             270083
Reviewed by:    glebius pouria
Approved by:    glebius (mentor)
MFC after:      1 week
Sponsored by:   Subcarpathian BSD User Group

(cherry picked from commit d836dae9f0d888d441234ea11e3cd91614c86aa2)
DeltaFile
+1-0sys/netgraph/netflow/netflow_v9.c
+1-01 files

FreeBSD/src cd730betools/tools/nanobsd defaults.sh

nanobsd: Use mtree -C to produce the metalog

Prefer an mtree -C output, which is guaranteed to be mtree-compatible.
Add "gname", "uname", and "tags" to the default keyword set, while
removing "size" and "time", the latter being set on kernel file entries
and taking precedence over makefs -T (when paired with -F).

As a side effect, this produces a cleaner file with sorted keywords.

Note that passing "-u" to sort in order to pipe to mtree is no longer
necessary, but we'll do it out of habit.

Reviewed by:    imp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54854
DeltaFile
+3-3tools/tools/nanobsd/defaults.sh
+3-31 files

FreeBSD/src 202e310sys/amd64/include md_var.h, sys/amd64/vmm vmm_host.h

amd64: Fix sys/pcpu.h usage in vmm_host.h and md_var.h

Include sys/pcpu in vmm_host.h as its structs and functions are used
there, and add a forward declaration of struct pcpu to md_var.h as it
is used in some function prototypes.

Reviewed by:    corvink, markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D51550
DeltaFile
+2-0sys/amd64/vmm/vmm_host.h
+1-0sys/amd64/include/md_var.h
+3-02 files

FreeBSD/src 6fd7e55sys/fs/nfsserver nfs_nfsdsubs.c nfs_nfsdport.c

nfsd: Fix handling of hidden/system during Open/Create

When an NFSv4.n client specifies settings for the archive,
hidden and/or system attributes during a Open/Create, the
Open/Create fails for ZFS.  This is caused by ZFS doing
a secpolicy_xvattr() call, which fails for non-root.
If this check is bypassed, ZFS panics.

This patch resolves the problem by disabling va_flags
for the VOP_CREATE() call in the NFSv4.n server and
then setting the flags with a subsequent VOP_SETATTR().

This problem only affects FreeBSD-15 and main, since the
archive, system and hidden attributes are not enabled
for FreeBSD-14.

I think a similar problem exists for the NFSv4.n
Open/Create/Exclusive_41, but that will be resolved
in a future commit.

    [8 lines not shown]
DeltaFile
+38-0sys/fs/nfsserver/nfs_nfsdsubs.c
+11-0sys/fs/nfsserver/nfs_nfsdport.c
+49-02 files