FreeBSD/src d47c1c2sbin/setkey setkey.c

sbin/setkey: add -Z option to disable receive timeouts

Sponsored by:   NVidia networking
MFC after:      1 week
DeltaFile
+15-9sbin/setkey/setkey.c
+15-91 files

FreeBSD/src 96e697bsys/amd64/include ifunc.h, sys/i386/include ifunc.h

x86: add machine/ifunc.h

(cherry picked from commit 2b1db07bec92e9447e6574a74366d4dd606e80a6)
DeltaFile
+5-0sys/amd64/include/ifunc.h
+5-0sys/i386/include/ifunc.h
+10-02 files

FreeBSD/src a984c23sys/compat/freebsd32 freebsd32.h, sys/sys abi_compat.h

compat32: provide a type and a macro for (u)int64_t handling on non-x86 arches

(cherry picked from commit 96acaa960023c20e852e04e7cc5c6a5faca36c67)
DeltaFile
+10-1sys/compat/freebsd32/freebsd32.h
+8-0sys/sys/abi_compat.h
+18-12 files

FreeBSD/src a68d541sys/compat/freebsd32 freebsd32_misc.c

freebsd32_rusage_out(): bzero the compat32 structure

(cherry picked from commit 6af3cf27ed0072f2dcb17380ab63228f9aa28708)
DeltaFile
+1-0sys/compat/freebsd32/freebsd32_misc.c
+1-01 files

FreeBSD/src 3b85009sys/kern kern_ktrace.c

ktrace: do not enqueue request if the process' ktrioparams are freed

(cherry picked from commit 6bb3f208617b58a54e2204eb31bae3f9a86117a7)
DeltaFile
+8-2sys/kern/kern_ktrace.c
+8-21 files

FreeBSD/src dc46f06sys/compat/freebsd32 freebsd32.h, sys/sys abi_compat.h

sys/abi_compat.h: fix UB for bintime32 handling

(cherry picked from commit be1b2da855cc38531733b5c97891cd4a40a993bc)
DeltaFile
+1-1sys/compat/freebsd32/freebsd32.h
+1-1sys/sys/abi_compat.h
+2-22 files

FreeBSD/src 69de2b4sys/dev/bnxt/bnxt_en if_bnxt.c

bnxt: don't set media status if link is down

When the link is down don't set flags other than IFM_AVALID & IFM_ETHER
This avoids `media: Ethernet autoselect (Unknown <full-duplex>)` on ifconfig

Reviewed by:    zlei, pouria
Approved by:    glebius (mentor)
MFC after:      1 week
Sponsored by:   Stormshield
Differential Revision: https://reviews.freebsd.org/D54573
DeltaFile
+3-4sys/dev/bnxt/bnxt_en/if_bnxt.c
+3-41 files

FreeBSD/src d1a8f1asys/netpfil/ipfw ip_fw_dynamic.c

ipfw: don't use the upper half lock to walk dynamic states buckets

The lock is sleepable and we can't grab it in dyn_tick().  Use the
individual bucket locks instead.

Fixes:  e3caa360d5d0a73af0de1d293d5b8ff6e900ceb4
DeltaFile
+4-14sys/netpfil/ipfw/ip_fw_dynamic.c
+4-141 files

FreeBSD/src 1db1e4busr.sbin/bhyve pci_emul.c pci_emul.h, usr.sbin/bhyve/amd64 pci_lpc.c

bhyve: Use PCIOCGETCONF to find the host LPC bridge

pci_host_read_config() requires write access to /dev/pci so cannot be
used with unprivileged bhyve.  The lpc init code uses it to find the
host system's LPC bridge device and so was generating warnings with
bhyve running as a non-root user.

Refactor the implementation to use PCIOCGETCONF instead, which doesn't
require any special privileges.  This isn't formally necessary, as we
only care about copying the host system's identifiers in order to
support Intel GPU passthrough (see commit f4ceaff56ddaa), but it's
straightforward and lets an unprivileged user run bhyve without seeing
warnings about failing to open /dev/pci with write permissions.

Reviewed by:    corvink, rew
MFC after:      3 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54851
DeltaFile
+49-34usr.sbin/bhyve/amd64/pci_lpc.c
+12-10usr.sbin/bhyve/pci_emul.c
+1-1usr.sbin/bhyve/pci_emul.h
+62-453 files

FreeBSD/src 31e5decsys/arm64/vmm vmm_mmu.c

arm64/vmm: Simplify vmmpmap_remove()

This function handles invalid intermediate PTP entries, but there's no
reason for this: the passed range should be mapped.  In particular, we
assert that all L3 entries encountered are mapped.  So let's simplify
the code a bit.  No functional change intended.

Reviewed by:    andrew
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54738
DeltaFile
+6-21sys/arm64/vmm/vmm_mmu.c
+6-211 files

FreeBSD/src 77c5f29lib/libc/gen posix_spawnattr_getprocdescp_np.3 posix_spawn.3

libc: document posix_spawnattr_{get,set}procdescp_np(3)

Reviewed by:    asomers
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54899
DeltaFile
+94-0lib/libc/gen/posix_spawnattr_getprocdescp_np.3
+2-0lib/libc/gen/posix_spawn.3
+2-0lib/libc/gen/Makefile.inc
+98-03 files

FreeBSD/src 6253212contrib/openbsm/etc audit_event, contrib/openbsm/sys/bsm audit_kevents.h

Add pdrfork to OpenBSM

It's necessary for auditd to be able to log its events.  Note that the
recently added pdwait() syscall is only auditable because an audit event
of that name was preemptively added back in 2012.

PR:             292739
MFC after:      1 week
Fixes:          5c2ee618d5e "sys: add pdrfork(2)"
Sponsored by:   ConnectWise
Reviewed by:    kib
Differential Revision: https://reviews.freebsd.org/D54897
DeltaFile
+1-0contrib/openbsm/sys/bsm/audit_kevents.h
+1-0contrib/openbsm/etc/audit_event
+2-02 files

FreeBSD/src 20351c1share/man/man4 capsicum.4

capsicum.4: Replace 'fi' ligature and smart quotation mark

While here, wrap the line to 80 characters.

Reviewed by:    jlduran
Fixes:          c54534e60263 ("capsicum.4: Add some more detail from the Capsicum paper")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54761

(cherry picked from commit e6bafbeb1ee7a61ddfe92ba052c476c7646c405b)
DeltaFile
+5-5share/man/man4/capsicum.4
+5-51 files

FreeBSD/src f9ecb74share/man/man4 capsicum.4

capsicum.4: Replace 'fi' ligature and smart quotation mark

While here, wrap the line to 80 characters.

Reviewed by:    jlduran
Fixes:          c54534e60263 ("capsicum.4: Add some more detail from the Capsicum paper")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54761

(cherry picked from commit e6bafbeb1ee7a61ddfe92ba052c476c7646c405b)
DeltaFile
+5-5share/man/man4/capsicum.4
+5-51 files

FreeBSD/src fb4b0c9share/man/man4 witness.4, sys/kern subr_witness.c

witness: Provide facility to print detailed lock tree

When witness(4) detects lock order reversals (LORs), it prints
information about the stack trace which caused the LOR. If available,
it can also print information about the first stack trace which
established the other lock ordering. However, it only does this for
"simple" LORs where the two locks in question were directly locked
in the opposite order. When the lock order was established through
a more complex pattern of intermediate locks, WITNESS only prints
the stack trace where it detected the LOR.

This commit provides new functionality to provide more verbose
information about the lock chain(s) which established the lock
ordering. The new functionality can be disabled by setting the
debug.witness.trace sysctl/tunable to 1. The new functionality
is also available through the debug.witness.badstacks sysctl,
which has been modified to always show the more verbose
information.


    [4 lines not shown]
DeltaFile
+321-22sys/kern/subr_witness.c
+47-3share/man/man4/witness.4
+368-252 files

FreeBSD/src fe962e3lib/libc/gen Makefile.inc, share/man Makefile

METALOG: Order keyword entries

To facilitate comparison with mtree -C generated output, keep the
keywords ordered.

No functional change intended.

Reviewed by:    imp
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54872
DeltaFile
+3-3lib/libc/gen/Makefile.inc
+2-2share/man/Makefile
+1-1sys/conf/kmod.mk
+1-1sys/modules/Makefile
+1-1usr.sbin/services_mkdb/Makefile
+8-85 files

FreeBSD/src 2a5b083lib/libc/gen posix_spawnattr_getexecfd_np.3

posix_spawnattr_getexecfd_np.3: add closing .Fc

Fixes:  9bf69c37f43e96292e97e41bf942d7aca4101362
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-0lib/libc/gen/posix_spawnattr_getexecfd_np.3
+1-01 files

FreeBSD/src 080d8edinclude spawn.h, lib/libc/gen posix_spawn.c Symbol.map

libc: add posix_spawnattr_{get,set}procdescp_np

Reviewed by:    asomers
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54879
DeltaFile
+49-5lib/libc/gen/posix_spawn.c
+4-0include/spawn.h
+2-0lib/libc/gen/Symbol.map
+55-53 files

FreeBSD/src 74a2bf1lib/libsys/amd64 pdrfork_thread.S Symbol.sys.map, lib/libsys/i386 pdrfork_thread.S Symbol.sys.map

libsys: add pdrfork_thread() on x86

Reviewed by:    asomers
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54879
DeltaFile
+101-0lib/libsys/i386/pdrfork_thread.S
+83-0lib/libsys/amd64/pdrfork_thread.S
+4-0lib/libsys/amd64/Symbol.sys.map
+4-0lib/libsys/i386/Symbol.sys.map
+2-1lib/libsys/amd64/Makefile.sys
+1-1lib/libsys/i386/Makefile.sys
+195-21 files not shown
+196-27 files

FreeBSD/src 37908beusr.bin/mkimg mkimg.1 mkimg.c

mkimg(1): Sync mkimg(1) and usage() with the implementation

Reviewed by:    imp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54419

(cherry picked from commit 3aa8d5395c4223f1613f28d6f39904c2df4f92d4)
DeltaFile
+34-20usr.bin/mkimg/mkimg.1
+3-0usr.bin/mkimg/mkimg.c
+37-202 files

FreeBSD/src 97ee3aeusr.bin/mkimg mkimg.1 mkimg.c

mkimg(1): Sync mkimg(1) and usage() with the implementation

Reviewed by:    imp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54419

(cherry picked from commit 3aa8d5395c4223f1613f28d6f39904c2df4f92d4)
DeltaFile
+34-20usr.bin/mkimg/mkimg.1
+3-0usr.bin/mkimg/mkimg.c
+37-202 files

FreeBSD/src 8934c3dtests/sys/netpfil/pf divert-to.sh

pf tests: Set require.kmods in divert-to tests

Tests should declare their dependencies rather than testing for them at
runtime.

Reviewed by:    igoro, kp, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54846
DeltaFile
+8-23tests/sys/netpfil/pf/divert-to.sh
+8-231 files

FreeBSD/src 39878d2sys/netpfil/pf pf.c

pf: Rationalize the ip_divert_ptr test

If a rule has a divert port set, then we can reasonably predict that
ipdivert.ko is loaded, and in particular that ip_divert_ptr is set.

Moreover, in this case, if ipdivert.ko is not loaded we should just drop
the packet instead of ignoring the divert rule.

Reviewed by:    igoro, kp, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54845
DeltaFile
+10-5sys/netpfil/pf/pf.c
+10-51 files

FreeBSD/src 49ec19fsys/dev/acpica acpivar.h

acpi: Add ACPI_SPMC debug layer define

Reported by:    des
Fixes:  c5daa5a4c32c ("acpi_spmc: Add system power management controller driver")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0sys/dev/acpica/acpivar.h
+1-01 files

FreeBSD/src 0eb2c9dsys/compat/freebsd32 freebsd32.h

freebsd32: Fix includes

The previous commit added <sys/cdefs.h>, which isn't actually needed.
Conversely, <sys/event.h> is needed (and has been for a long time) but
was not included.

MFC after:      1 week
Fixes:          a11d132f6c62 ("devstat: Provide 32-bit compatibility")
Reported by:    gallatin@
DeltaFile
+1-1sys/compat/freebsd32/freebsd32.h
+1-11 files

FreeBSD/src 972c488sys/riscv/include cpufunc.h, sys/riscv/vmm vmm_riscv.c

riscv: Add macro for hfence.gvma instruction

Add an inline function hfence_gvma() for hfence.gvma instruction.

Signed-off-by:  Doongar Singh <doonbsd at gmail.com>
Reviewed by:    mhorne, markj
Differential Revision:  https://reviews.freebsd.org/D54857
DeltaFile
+7-0sys/riscv/include/cpufunc.h
+1-1sys/riscv/vmm/vmm_riscv.c
+8-12 files

FreeBSD/src f34fe1alib/libiconv_modules/mapper_std citrus_mapper_std.c

libiconv: Fix typo in comment

(cherry picked from commit dec3ea45b65442b4f3cafcd8a672f1e13b69a066)
(cherry picked from commit 14dc55c7a03d4d3b3fae9a8ed38649cb2d3fbc52)
DeltaFile
+1-1lib/libiconv_modules/mapper_std/citrus_mapper_std.c
+1-11 files

FreeBSD/src 518c01bsys/dev/sym sym_hipd.c

sym(4): Provide a DEVICE_DETACH(9) method

This also fixes sym_cam_free() to tear things down correctly, i. e. in
opposite order of setup, as well as sym_cam_attach() to not free devq
and SIM twice in the failure case.
DeltaFile
+19-15sys/dev/sym/sym_hipd.c
+19-151 files

FreeBSD/src e769bc7sys/dev/sym sym_hipd.c

sym(4): Employ memory barriers also on x86

In an MP world, it doesn't hold that x86 requires no memory barriers.

This change should also fix panics due to out-of-sync data seen with
FreeBSD VMs on top of OpenStack and HBAs of type lsiLogic. [1]

While at it:
- Improve the granularity somewhat by distinguishing between read and
  write memory barriers as well as refer to existing *mb(9) functions
  instead of duplicating these [2], unless IO barriers are also used.
- Nuke the unused SYM_DRIVER_NAME macro.

PR:             270816 [1]
Obtained from:  BSD-licensed Linux sym53c8xx driver [2]
MFC after:      1 week
DeltaFile
+14-26sys/dev/sym/sym_hipd.c
+14-261 files

FreeBSD/src c8e9479sys/dev/sym sym_hipd.c

sym(4): Use memcpy(9) instead of bcopy(9)

The overlap handling of bcopy(9) is not required in these cases.

Obtained from:  BSD-licensed Linux sym53c8xx driver
DeltaFile
+5-5sys/dev/sym/sym_hipd.c
+5-51 files