FreeBSD/src 84090d7 — tools/build/mk OptionalObsoleteFiles.inc

build: fix `delete-old` removal of efisign bits

There's a second appearance of the examples when MK_EXAMPLES == no that
we must also change.

Reported by:    llm-postcr
Fixes:  537dca4c0bc3 ("uefisign: rename to efisign")
DeltaFile
+2-2tools/build/mk/OptionalObsoleteFiles.inc
+2-21 files

FreeBSD/src 9f00a36 — sbin/zfsbootcfg zfsbootcfg.8

zfsbootcfg.8: list each form in the synopsis and document -d

The synopsis listed every option as optional in a single form, which
doesn't show that -k needs -v, and it didn't mention -d at all.  List
the distinct forms instead: setting boot.config(5) options (or printing
them, with none), setting or deleting a key, and printing the bootenv
area.  Document -d alongside the other options.

Reviewed by:    avg, bcr
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D61834
DeltaFile
+22-8sbin/zfsbootcfg/zfsbootcfg.8
+22-81 files

FreeBSD/src 7391171 — sbin/zfsbootcfg zfsbootcfg.c

zfsbootcfg: don't crash on bad or incomplete options

getopt() errors fell through the switch without a default case, so
zfsbootcfg carried on with whatever options it had.  Setting a key
without a value, whether with -k alone or after such an error, then
crashed in add_pair() on a NULL value.

Print a usage message and fail for unknown options, missing option
arguments, and a key with no value to set it to.

While we're here, clean up some pre-existing style issues and ensure we
properly route warnings/errors to stderr.

Reviewed by:    avg, des
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D61833
DeltaFile
+32-13sbin/zfsbootcfg/zfsbootcfg.c
+32-131 files

FreeBSD/src d40d299 — sys/netipsec ipsec_output.c, tests/sys/netipsec/tunnel Makefile bundle.sh

netipsec: Send the packet when the rest of a bundle is skipped

A policy can bundle several requests, for example an ESP tunnel and an AH
transport request.  A request at level "use" that has no SA is skipped (as
is "default", which the net.inet.ipsec.*_deflev and
net.inet6.ipsec6.*_deflev sysctls make "use" by default), and the packet
is meant to leave with the transforms of the other requests.

ipsec_process_done() applies the next request of a bundle once a transform
completes.  When all remaining requests are skipped,
ipsec{4,6}_perform_request() returns EJUSTRETURN and leaves the packet to
its caller, but ipsec_process_done() returned that to the transform, which
does not send the packet or free it.  Keep the references to the SP and the
SA across the call, and on EJUSTRETURN send the packet with the transforms
applied so far, after the UDP encapsulation of the last SA applied.

ipcomp_output() calls ipsec_process_done() directly for packets below the
compression threshold and passed the EJUSTRETURN on to ip_output(), which
then went on with a packet that tunnel mode encapsulation had already

    [7 lines not shown]
DeltaFile
+63-0tests/sys/netipsec/tunnel/bundle.sh
+20-8sys/netipsec/ipsec_output.c
+1-0tests/sys/netipsec/tunnel/Makefile
+84-83 files

FreeBSD/src f3c80fc — usr.sbin/efisign Makefile

efisign: add to the efi-tools package

Reviewed by:    emaste, imp, ziaee
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D58186
DeltaFile
+2-0usr.sbin/efisign/Makefile
+2-01 files

FreeBSD/src 537dca4 — usr.sbin/efisign child.c efisign.c, usr.sbin/uefisign child.c uefisign.c

uefisign: rename to efisign

uefisign seems to have come first, but the efi* naming has won out in
our UEFI tooling and consistency is good.  This fixes it so that
"efi<tab>" gives a reasonable view of what efitools we have in base.

uefi* links are added for compatibility, at least for now.  Maybe it's
a reasonable idea to add such links for all of the efi tools, but I'm
punting on that for a moment.

Reviewed by:    emaste, imp (both previous version), ziaee
Relnotes:       maybe
Differential Revision:  https://reviews.freebsd.org/D58187
DeltaFile
+0-570usr.sbin/uefisign/pe.c
+570-0usr.sbin/efisign/pe.c
+0-438usr.sbin/uefisign/uefisign.c
+438-0usr.sbin/efisign/efisign.c
+0-270usr.sbin/uefisign/child.c
+270-0usr.sbin/efisign/child.c
+1,278-1,27819 files not shown
+1,606-1,59625 files

FreeBSD/src 83c94a8 — sys/kern syscalls.master

syscalls.master: Add a capsicum note about sync(2)

Allowing sync(2) is technically a violation of Capsicum's "no global
namespace access" requirement, but sync does not leak or modify user-
visible state.

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61675
DeltaFile
+2-0sys/kern/syscalls.master
+2-01 files

FreeBSD/src b48a073 — sys/conf files.powerpc files.arm64

kern: Have .m rules depend on sys/tools/makeobjops.awk

Generated _if.[ch] files have to be rebuilt after commit bf362c1b41c8
("kobj: convert KOBJOPLOOKUP() to returning pointer to function").  Add
dependencies on the build tool in files.*.

Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61821
DeltaFile
+2-2sys/conf/files.powerpc
+2-2sys/conf/files.arm64
+2-2sys/conf/files.amd64
+6-63 files

FreeBSD/src 55b89b7 — sys/dev/sound/pcm dsp.c

sound: Unlock the channel when chn_reset() fails in dsp_chn_alloc()

If chn_reset() fails, dsp_chn_alloc() returns with the channel lock
held, dsp_open() calls dsp_close() as part of its cdevpriv error path,
and this causes both a mutex recursion on the channel lock in
dsp_close(), as well a lock order reversal.

Fixes:          02d4eeabfd73 ("sound: Allocate vchans on-demand")
Reported by:    llm-postcr
MFC after:      Immediately
Sponsored by:   The FreeBSD Foundation
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D61793

(cherry picked from commit 01a8cd5ebe9368fd115fb5060bcb1e60d1bbdf1f)
DeltaFile
+3-1sys/dev/sound/pcm/dsp.c
+3-11 files

FreeBSD/src 01a8cd5 — sys/dev/sound/pcm dsp.c

sound: Unlock the channel when chn_reset() fails in dsp_chn_alloc()

If chn_reset() fails, dsp_chn_alloc() returns with the channel lock
held, dsp_open() calls dsp_close() as part of its cdevpriv error path,
and this causes both a mutex recursion on the channel lock in
dsp_close(), as well a lock order reversal.

Fixes:          02d4eeabfd73 ("sound: Allocate vchans on-demand")
Reported by:    llm-postcr
MFC after:      Immediately
Sponsored by:   The FreeBSD Foundation
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D61793
DeltaFile
+3-1sys/dev/sound/pcm/dsp.c
+3-11 files

FreeBSD/src 2cb4abf — sys/compat/linux linux_if.c

linux: Destroy the per-VNET unit allocator after the cloners

linux_ifnet_vnet_uninit() deletes the unit number allocator that
linux_ifnet_departure() frees into.  It ran at SI_SUB_INIT_IF,
SI_ORDER_ANY, the same slot in which lagg, vlan, edsc and ng_eiface
destroy the interfaces left in a dying vnet.  Destructors of equal order
run in the reverse of the order their modules were loaded, so with
linux_common loaded after if_lagg the allocator was gone by the time
vnet_lagg_uninit() detached its interfaces, and removing a vnet jail that
still held a lagg interface panicked in free_unr().

Commit a23901a37be9 moved the destructor from SI_SUB_PROTO_IF to
SI_SUB_INIT_IF for the cloners that tear down earlier, which left this
tie.

Run the destructor at SI_ORDER_FIRST, which is after every destructor of
a later order in the same subsystem, whatever the load order.  Move the
constructor with it.


    [6 lines not shown]
DeltaFile
+6-2sys/compat/linux/linux_if.c
+6-21 files

FreeBSD/src af641e9 — sys/compat/linuxkpi/common/include/linux mm.h io.h, sys/dev/qat/include/common qat_freebsd.h

LinuxKPI: Include <linux/fs.h> from <linux/mm.h>

and <linux/kernel.h> from <linux/io.h>.
This reproduces the same namespace pollution as Linux and will help us
to fix historical bug when these files were included from <linux/fb.h>.
Fix conflicting Linux name leakage appeared in qat(4) as result.

Differential Revision:  https://reviews.freebsd.org/D60798
DeltaFile
+9-0sys/dev/qat/include/common/qat_freebsd.h
+1-0sys/compat/linuxkpi/common/include/linux/mm.h
+1-0sys/compat/linuxkpi/common/include/linux/io.h
+11-03 files

FreeBSD/src 40e7264 — sys/compat/linuxkpi/common/include/linux page-flags.h pagemap.h

LinuxKPI: Add mapping_gfp_mask() and four more folio/pagemap helpers

Adds mapping_gfp_mask(), mapping_gfp_constraint(), mapping_set_unevictable(),
folio_page() and folio_file_page(), which Linux's drm_gem_get_pages() uses.
drm-kmod carries them in an overlay for virtio-gpu (freebsd/drm-kmod#517) today.

The mask is GFP_KERNEL, as shmem page allocation may sleep and ignores
the other flags. folio_page() and folio_file_page() are exact copies
from D58763, to not clash with it.

Signed-off-by:  Denis Borovikov <denis.borovikov at gmail.com>
Reviewed by:    wulf
Differential Revision:  https://reviews.freebsd.org/D61217
DeltaFile
+24-0sys/compat/linuxkpi/common/include/linux/pagemap.h
+8-0sys/compat/linuxkpi/common/include/linux/page-flags.h
+32-02 files

FreeBSD/src 9e4dfe6 — sys/compat/linuxkpi/common/src linux_pci.c, sys/modules/linuxkpi Makefile

LinuxKPI: Add PCI method for transferring framebuffer parameters

from LKPI video driver to FreeBSD native framebuffer driver.
This makes possible to attach framebuffer driver in traditional way
using newbus interface rather than direct calls into vt internals.
It is required to make LKPI framebuffer driver compatible with
fbd/vt_fb. As a consequence that allows us to switch back to vt_fb on
radeon driver where vt_drmfb regressions have been reported [1].

The method expects fbd device ivars pointed to FreeBSD fb_info
structure embedded in to Linux fb_info structure. See linux/fb.h.
Note that some out-of-tree non-PCI drm drivers may require similar
changes in parent bus drivers.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285088

PR:             285088
Differential Revision:  https://reviews.freebsd.org/D60038
DeltaFile
+23-0sys/compat/linuxkpi/common/src/linux_pci.c
+1-1sys/modules/linuxkpi/Makefile
+24-12 files

FreeBSD/src 2f1acc5 — sys/conf kern.post.mk

kern: Have .m rules depend sys/tools/makeobjops.awk

Generated _if.[ch] files have to be rebuilt after commit bf362c1b41c8
("kobj: convert KOBJOPLOOKUP() to returning pointer to function").  Add
a dependency on the build tool, similar to kmod.mk.

Build rules using NORMAL_M (defined in kern.pre.mk) presumably need a
similar treatment, but this restores (most of) the incremental build
now.

Reviewed by:    jrtc27
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61821
DeltaFile
+2-2sys/conf/kern.post.mk
+2-21 files

FreeBSD/src e61c4b8 — lib/libexecinfo/tests sigtramp_test.c

tests/sigtramp_test: re-enable test on aarch64

This now passes on both aarch64 (since 6a936d939b88)
and amd64. It still fails on other architectures, so
keep the xfail.

PR:             289096
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-6lib/libexecinfo/tests/sigtramp_test.c
+2-61 files

FreeBSD/src 138bce7 — usr.sbin/chroot chroot.8 chroot.c

chroot(8): add altroot mode

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+36-14usr.sbin/chroot/chroot.c
+25-0usr.sbin/chroot/chroot.8
+61-142 files

FreeBSD/src 25f21bb — sys/sys user.h

sys/user.h: make KF_FD_TYPE macros safer

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+6-6sys/sys/user.h
+6-61 files

FreeBSD/src c97671a — usr.bin/procstat procstat.1 procstat_files.c

procstat(1): teach about altroot

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+1-1usr.bin/procstat/procstat.1
+2-0usr.bin/procstat/procstat_files.c
+3-12 files

FreeBSD/src face51f — usr.bin/fstat fuser.c fstat.c

fstat(1), fuser(1): teach about altroot

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+4-1usr.bin/fstat/fuser.1
+4-1usr.bin/fstat/fstat.1
+2-0usr.bin/fstat/fstat.c
+1-0usr.bin/fstat/fuser.c
+11-24 files

FreeBSD/src f92ba77 — lib/libprocstat libprocstat.h libprocstat.c

libprocstat(3): teach about altroot

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+9-0lib/libprocstat/libprocstat.c
+1-0lib/libprocstat/libprocstat.h
+10-02 files

FreeBSD/src 8cfae68 — sys/kern kern_descrip.c, sys/sys user.h

kinfo: export altroot

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+7-0sys/kern/kern_descrip.c
+1-0sys/sys/user.h
+8-02 files

FreeBSD/src 29691ec — lib/libsys cap_enter.2

cap_enter.2: document clearing altroot

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+2-0lib/libsys/cap_enter.2
+2-01 files

FreeBSD/src dae40d1 — lib/libsys chroot.2

fchroot.2: document ENOTCAPABLE for O_RESOLVE_BENEATH

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+9-0lib/libsys/chroot.2
+9-01 files

FreeBSD/src 14016b7 — sys/compat/freebsd32 freebsd32_syscall.h freebsd32_systrace_args.c, sys/kern systrace_args.c

Regen
DeltaFile
+44-0sys/kern/systrace_args.c
+44-0sys/compat/freebsd32/freebsd32_systrace_args.c
+10-0sys/sys/sysproto.h
+3-1sys/sys/syscall.mk
+3-1sys/sys/syscall.h
+3-1sys/compat/freebsd32/freebsd32_syscall.h
+107-36 files not shown
+123-312 files

FreeBSD/src 9757c0c — sys/kern syscalls.master vfs_syscalls.c, sys/sys unistd.h

chaltroot(2) and fchaltroot(2): new syscalls

to change the altroot AKA ABI root for native processes

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+85-0sys/kern/vfs_syscalls.c
+10-0sys/kern/syscalls.master
+2-0sys/sys/unistd.h
+97-03 files

FreeBSD/src 06ec614 — sys/kern kern_descrip.c

pwd_altroot(9): expand herald comment

Requested and reviewed by:      markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+5-1sys/kern/kern_descrip.c
+5-11 files

FreeBSD/src 4333964 — sys/kern kern_descrip.c

pwd_altroot(): avoid creating new pwd structure if altroot does not change

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+13-16sys/kern/kern_descrip.c
+13-161 files

FreeBSD/src 06c455d — sys/compat/linux linux_util.c, sys/kern kern_descrip.c

vfs: guard against altroot pointing to not a directory

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+7-2sys/compat/linux/linux_util.c
+4-1sys/kern/kern_descrip.c
+1-1sys/sys/filedesc.h
+12-43 files

FreeBSD/src f2ee207 — include unistd.h, lib/libsys Symbol.sys.map

chaltroot(2)/fchaltroot(2): make accessible to userspace

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60035
DeltaFile
+2-0lib/libsys/Symbol.sys.map
+2-0include/unistd.h
+4-02 files