FreeBSD/src c5cc084sbin/ipfw ipfw.8

ipfw.8: clarify a difference between reset and reset6 actions

PR:             298348
MFC after:      2 weeks

(cherry picked from commit 009940e3d4d398f0cba8b689d284bd8585e2ad5a)
DeltaFile
+3-3sbin/ipfw/ipfw.8
+3-31 files

FreeBSD/src 1511b29sbin/ipfw ipfw.8

ipfw.8: more grammar fixes

(cherry picked from commit b31db8d8de6785804f6b552bc9d7d1960a47eea5)
DeltaFile
+3-3sbin/ipfw/ipfw.8
+3-31 files

FreeBSD/src f38dfbfsbin/ipfw ipfw.8

ipfw.8: whitespace police

(cherry picked from commit b891252f209bf22938c9492496d166da96fcba1f)
DeltaFile
+1-1sbin/ipfw/ipfw.8
+1-11 files

FreeBSD/src fd3ded8sbin/ipfw ipfw.8

ipfw.8: grammar

(cherry picked from commit 055a726ca6324eead24df4177effd9c69755f386)
DeltaFile
+8-8sbin/ipfw/ipfw.8
+8-81 files

FreeBSD/src 10a3562sys/kern kern_jail.c

jail: set default root directory for a jail to its parent's root.

All default jail parameter values are an empty or otherwise standard
value, or are copied the jail's parent.  A notable exception is the
root directory, which is instead copied from the creating process's
jail.  Fix that to be in line with everything else.

This change affects only the default when no path is specified; if
a path of "/" is explicitly given, that will still be the creating
process's root directory.
DeltaFile
+1-1sys/kern/kern_jail.c
+1-11 files

FreeBSD/src 0bd6348sys/fs/fuse fuse_vnops.c fuse_ipc.c, tests/sys/fs/fusefs utils.hh mockfs.cc

fusefs: fix a deadlock caused by daemons that never initialize

If a daemon never responds to FUSE_INIT, but some process attempts to
access the mountpoint, and a different process (possibly the daemon
itself) attempts to unmount, a deadlock would result.

Fix this bug by blocking any thread that enters fuse_vfsop_root until
the daemon responds to FUSE_INIT or it times out.  That will block any
thread attempting to lookup a path in the fuse mountpoint, before it
even gets to fuse VOPs.  Remove less thorough initialization checks in
fuse_ticket_fetch and fuse_vnop_access that are no longer necessary.
And add a test case.

PR:             287431
MFC after:      2 weeks
Sponsored by:   ConnectWise
Reviewed by:    js
Differential Revision: https://reviews.freebsd.org/D59737
DeltaFile
+75-11tests/sys/fs/fusefs/pre-init.cc
+31-0sys/fs/fuse/fuse_vfsops.c
+1-23sys/fs/fuse/fuse_ipc.c
+0-14sys/fs/fuse/fuse_vnops.c
+7-1tests/sys/fs/fusefs/mockfs.cc
+2-0tests/sys/fs/fusefs/utils.hh
+116-493 files not shown
+118-529 files

FreeBSD/src ddaa674usr.sbin/sesutil sesutil.8

sesutil.8: Concise document description, tag SPDX

While here, fix two trivial typos.

MFC after:      3 days
DeltaFile
+8-5usr.sbin/sesutil/sesutil.8
+8-51 files

FreeBSD/src c934939usr.sbin/apm apm.8

apm.8: Don't claim that zzz(8) invokes apm(8)

Fixes:          aba599a6cc55 ("zzz: Rewrite to use new power device")
DeltaFile
+1-3usr.sbin/apm/apm.8
+1-31 files

FreeBSD/src 9cfc15b. ObsoleteFiles.inc

ObsoleteFiles.inc: Add another entry for perfmon.4.gz

This was installed in two different places.
DeltaFile
+1-0ObsoleteFiles.inc
+1-01 files

FreeBSD/src e702b1asys/conf files.i386 files, sys/i386/conf NOTES

sys: Remove orphaned build glue for le(4)

Fixes:          7a323f873662 ("sys: Retire le(4)")
DeltaFile
+0-5sys/i386/conf/NOTES
+0-4sys/conf/files
+0-1sys/conf/files.i386
+0-103 files

FreeBSD/src 600c16csys/x86/conf NOTES

x86/NOTES: Drop stale comments about si(4)

This driver was removed several years ago.

Fixes:          c1c9764296e5 ("Remove the si(4) driver and sicontrol(8) for Specialix serial cards.")
DeltaFile
+0-7sys/x86/conf/NOTES
+0-71 files

FreeBSD/src df7b905sys/modules/dtrace Makefile Makefile.inc

dtrace: Remove bogus Makefile.inc

This was added in the initial import of dtrace and overrides the
normal load/unload targets with a custom target that loads a hardcoded
set of modules.  Over time, the set of modules has not been updated
and is now incomplete.  It's also not really useful compared to the
default implementation of these targets used for loading or unloading
an individual module being actively developed.

This functionality is also available via dtraceall.ko which is how
users commonly load the full suite of dtrace modules.

Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D59821
DeltaFile
+0-23sys/modules/dtrace/Makefile.inc
+0-2sys/modules/dtrace/Makefile
+0-252 files

FreeBSD/src 72e3910lib/libsys stat.2

stat(2): Document st_bsdflags and SFBSD_NAMEDATTR

Those are FreeBSD-specific member and flag still better to be
documented.

Reviewed by:    kib
Sponsored by:   Sippy Software, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59915
DeltaFile
+19-2lib/libsys/stat.2
+19-21 files

FreeBSD/src 7fab248release/tools vmimage.subr

vmimage.subr: Include dangling symlinks in images

When creating VM images, we filter the METALOG file created by pkg(8)
when installing non-base packages, rejecting any lines which correspond
to files which don't exist; this solves a problem which arose when a
package was installed and then deinstalled (or upgraded) later in the
image-building process.

Unfortunately [ -e ... ] follows symlinks and is not basedir-aware, so
an absolute symlink which is valid *inside* the image is omitted from
the image if it points to something which isn't present in the build
host system.

Replace [ -e ... ] with [ -e ... ] || [ -L ... ] so that symlinks are
included even if dangling.

While I'm here, add quoting in case future paths become problematic.

Sponsored by:   Amazon

    [3 lines not shown]
DeltaFile
+2-1release/tools/vmimage.subr
+2-11 files

FreeBSD/src fb039d4release/tools ec2_setpass

ec2-desktop: Fix shell expansion in ec2_setpass

Using a backtick inside a backtick-expansion isn't a good idea; switch
instead to using $( ... ).

Fixes:  a9710349513f ("EC2: Add desktop flavour")
Sponsored by:   Amazon

(cherry picked from commit 28cad382a2bb5fc398bd11f8e7b3637ad6c03334)
DeltaFile
+1-1release/tools/ec2_setpass
+1-11 files

FreeBSD/src 73aca6brelease/tools ec2-desktop.conf

ec2-desktop: Don't enable firstboot_pkgs

We don't have any packages to install by default when the instance
first boots, so (as with the "small" flavour) don't enable the
firstboot_pkgs script.  If someone wants to launch a desktop with
packages autoinstalled at first boot, they can enable the script at
the same time as they provide the list of packages.

Sponsored by:   Amazon

(cherry picked from commit eca31490322f181a415c14c6bf03e656e81fb4aa)
DeltaFile
+1-1release/tools/ec2-desktop.conf
+1-11 files

FreeBSD/src 80c5a04release Makefile.vm, release/tools ec2_setpass ec2_desktop_extras

EC2: Add desktop flavour

Desktop AMIs have xrdp enabled and boot to a KDE desktop; they are
as compatible as possible with EC2 Windows AMIs, setting a random
password and printing it to the console in encrypted format to be
retrieved using the EC2 GetPasswordData API.

Two rc.d scripts are included in this commit which will not exist
in the long term: ec2_addpass will become part of the ec2-scripts
package, and ec2_desktop_extras will go away once its functionality
is included elsewhere.

MFC After:      1 month
Relnotes:       yes
Sponsored by:   Amazon

(cherry picked from commit a9710349513f4c6ccb8bcff34fa9ea186fae6114)
DeltaFile
+73-0release/tools/ec2-desktop.conf
+60-0release/tools/ec2_desktop_extras
+58-0release/tools/ec2_setpass
+2-1release/Makefile.vm
+193-14 files

FreeBSD/src 2449fa9lib/libpmc pmclog.h, lib/libpmcstat libpmcstat_image.c

hwpmc: hwpmc: record page size to fix analysis in some case

This fixes a bug where a binary linked using max-page-size=0x200000
can result in a bogus relocation offset when running on a system
with a smaller page size.  This causes samples  to fall outside
the image mapping or be translated to the wrong address (resulting
in symbol resolution, or incorrect symbol resolution).  We noticed
this at Netflix because we run a patchset enabling 16k pages on
amd64 and have been compiling userspace with a 2MB page size.
Since we started doing this profiling userspace binaries has been
wonky.

Reviewed by: ali_mashtizadeh.com
Differential Revision: https://reviews.freebsd.org/D59771
Sponsored by: Netflix
DeltaFile
+17-2lib/libpmcstat/libpmcstat_image.c
+11-6usr.sbin/pmc/view.cc
+7-1sys/sys/pmclog.h
+7-0lib/libpmc/pmclog.h
+5-1sys/dev/hwpmc/hwpmc_logging.c
+2-1usr.sbin/pmc/view.hh
+49-113 files not shown
+52-129 files

FreeBSD/src ac9c07asys/compat/linuxkpi/common/src linux_pci.c

linuxkpi: Fix double-cleanup in linux_pci_attach_device() error path

put_device() already triggers lkpi_pci_dev_release(), which removes
pdev from pci_devices, frees pdev->bus, destroys pcie_cap_lock, and
uninits the DMA private data.

Reported by:    gallatin
Fixes:          66b25ddf9125 ("LinuxKPI: pci detach: implement a proper detach (release) path")
Reviewed by:    kib, gallatin, bz
Sponsored by:   NVidia networking
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D59913
DeltaFile
+7-12sys/compat/linuxkpi/common/src/linux_pci.c
+7-121 files

FreeBSD/src 34f131fsys/dev/nvme nvme_ctrlr.c

nvme: bound the AER error log byte-swap by the fetched length

The Get Log Page request for the error log is clamped to
NVME_MAX_AER_LOG_SIZE, but the byte-swap loop iterated ELPE + 1
entries. A controller reporting more than 63 entries makes the loop
overrun the 4 KiB log page buffer.

Reviewed by:    ngie, imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59626
DeltaFile
+1-1sys/dev/nvme/nvme_ctrlr.c
+1-11 files

FreeBSD/src ad57f21sys/dev/nvme nvme_private.h nvme_pci.c

nvme: do not touch INTMS/INTMC when configured for MSI-X

The single-vector MSI-X fallback installs the shared interrupt
handler, which masks interrupts through INTMS/INTMC around the
completion poll.
INTx and MSI are unaffected. Only MSI-X track the interrupt mode
and skip un/masking

Reviewed by:    ngie, imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59637
DeltaFile
+5-2sys/dev/nvme/nvme_ctrlr.c
+1-0sys/dev/nvme/nvme_private.h
+1-0sys/dev/nvme/nvme_pci.c
+7-23 files

FreeBSD/src ba974fasys/kern uipc_shm.c

posixshm: Fix a double unlock in shm_partial_page_invalidate()

For some reason, shm_partial_page_invalidate() unlocks the object upon
an error, but its callers don't expect this.  Don't do any special error
handling.  Keep the subroutine anyway since the name is a bit clearer
than vm_page_grab_zero_partial().

While here, normalize the object pointer used for locking in
shm_deallocate().

Reviewed by:    kib
Fixes:          454bc887f250 ("uipc_shm: Implements fspacectl(2) support")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59877
DeltaFile
+2-7sys/kern/uipc_shm.c
+2-71 files

FreeBSD/src 7c5e457sys/kern uipc_ktls.c, tests/sys/kern ktls_test.c

ktls: Fix an off-by-one bug in tls13_find_record_type()

If the entire plaintext is zero-filled, the backwards walk in
tls13_find_record_type() would return the offset of the last byte of the
TLS header.  This causes an underflow when decrypting, resulting in a
null pointer dereference.

Fix the bug and add a regression test.

Reviewed by:    gallatin, jhb
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59767
DeltaFile
+66-5tests/sys/kern/ktls_test.c
+2-2sys/kern/uipc_ktls.c
+68-72 files

FreeBSD/src 14c7492usr.bin/sdiff sdiff.c sdiff.1

sdiff.1: Document exit status and --help

MFC after:      3 days
Approved by:    bnovkov (mentor)
Sponsored by:   fme AG
Differential Revision:  https://reviews.freebsd.org/D59927
DeltaFile
+22-1usr.bin/sdiff/sdiff.1
+1-0usr.bin/sdiff/sdiff.c
+23-12 files

FreeBSD/src 30ed27fsys/powerpc/powerpc elf64_machdep.c

sys/powerpc/powerpc/elf64_machdep.c: enable ASLR on ELFv2

Turns out that ever since introducing ELFv2 support, it was missing
ASLR, it was only used for ELFv1 processes.

Reviewed by:    jhibbits (via IRC #powerpc64)
MFC after:      1 week
DeltaFile
+1-1sys/powerpc/powerpc/elf64_machdep.c
+1-11 files

FreeBSD/src 044cae0tests/sys/netpfil/ipfw Makefile unmapped.sh

ipfw tests: cover layer-2 filtering of unmapped mbufs

Test that ipfw's layer-2 hook copes with unmapped mbufs, on the pass
and on the deny path.

Reviewed by:    glebius
Assisted-by:    Claude Code (Fable 5, Opus 5)
Differential Revision:  https://reviews.freebsd.org/D59390
DeltaFile
+189-0tests/sys/netpfil/ipfw/unmapped.sh
+2-1tests/sys/netpfil/ipfw/Makefile
+191-12 files

FreeBSD/src 3897678sys/kern vfs_init.c

vfs_register: prevent kernel crash

vfs_register hashes the filesystem name and uses it for sysctl oids.
A filesystem name which hashes to 0 crashes in sysctl_register_oid().

Map 0 to 1 to prevent the kernel crash.

This can be tested with "udf2" as the filesystem name.

MFC after:      1 month
MFC to:         stable/15 stable/14
Reviewed by:    kib
Differential Revision: https://reviews.freebsd.org/D59839
DeltaFile
+2-0sys/kern/vfs_init.c
+2-01 files

FreeBSD/src 7399be2. UPDATING, sbin/nvmecontrol nvmecontrol.8

misc: Avoid use of Unicode closing single quote

The Unicode closing single quotation mark is classified as a homoglyph
and can trip automated code quality checks in downstream CI pipelines or
cause code review UIs to refuse to display a file.  If used as an
apostrophe, use the ASCII single quote instead.  If used as a closing
single quote, replace with double quotes or no quotes at all.

Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    ziaee, obiwac, olce
Differential Revision:  https://reviews.freebsd.org/D59911
DeltaFile
+7-7sys/net/sff8472.h
+3-3sys/x86/x86/mp_x86.c
+2-2sys/dev/oce/oce_hw.h
+2-2sbin/nvmecontrol/nvmecontrol.8
+1-1sys/arm/annapurna/alpine/alpine_pci_msix.c
+1-1UPDATING
+16-1610 files not shown
+26-2616 files

FreeBSD/src 72bb9ebbin/pwd pwd.c

pwd(1): De-obfuscate, style(9)

In getcwd_logical(), test for a '.' or '..' component in one of the most
straightforward and intelligible ways possible.

In particular, this removes a superfluous re-test of the the component's
first character being '.' when the first one did not pass and, more
importantly, prevents the second test from relying on a side-effect in
the first.

While here, for better clarity, replace the loop that searches for '/'
with a simple call to strchrnul().

Add high-level comments about what is going on.

While here, test explicitly that pointed 'char' values are not 0 ('\0')
(style(9)).

While here, separate the successive steps of getcwd_logical() with blank

    [9 lines not shown]
DeltaFile
+14-7bin/pwd/pwd.c
+14-71 files

FreeBSD/src 9d08596sys/powerpc/aim mmu_radix.c

powerpc/radix: fix double page offset in mmu_radix_sync_icache()

mmu_radix_sync_icache() adds the offset of va within its page to the
physical address it gets from mmu_radix_extract_locked().  That address
already includes the offset - the extract routines return the physical
address of the byte, not of the frame - so the offset is counted twice
and __syncicache() is handed frame + 2 * offset.

The hash MMU counterpart, moea64_sync_icache(), has to add the offset
because PVO_PADDR() yields only the frame.  Here the addition is wrong.

Fixes:  6f0b2a235a13 ("powerpc/pmap: Add pmap_sync_icache() for radix pmap")
Reviewed by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59870
DeltaFile
+1-3sys/powerpc/aim/mmu_radix.c
+1-31 files