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

FreeBSD/src 48eee74sys/dev/sym sym_hipd.c

sym(4): Consistently use device_printf(9) where applicable
DeltaFile
+114-108sys/dev/sym/sym_hipd.c
+114-1081 files

FreeBSD/src 14dc55clib/libiconv_modules/mapper_std citrus_mapper_std.c

libiconv: Fix typo in comment

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

FreeBSD/src f0fbaa7sys/sys namei.h

namei: clear internal flags in NDREINIT()

same as it is done for NDRESTART()

Fixes:  e05e33041c252
Reported and tested by: pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 58b2bd33aff71c0268d99d63e9c83f6544d3beb3)
DeltaFile
+1-0sys/sys/namei.h
+1-01 files

FreeBSD/src babac9dsys/vm vm_fault.c

vm_fault: only rely on PG_ZERO when the page was newly allocated

(cherry picked from commit cff67bc43df14d492ccc08ec92fddceadd069953)
DeltaFile
+5-1sys/vm/vm_fault.c
+5-11 files

FreeBSD/src 38e5564. Makefile.inc1

native-xtools: use static LLVM libraries

Set the MK_LLVM_LINK_STATIC_LIBRARIES knob to "yes" when building the
native-xtools target. This reverts to the behaviour prior to
2e47f35be5dc.

This avoids a build failure that occurs otherwise, where compilation
fails looking for a libllvmprivate.so that was not built.

It is unclear if this addresses the issue in all instances---some
replies in the PRs indicate otherwise. Still, some report success, and
in my own testing this fixed creation of a cross-compiled poudriere
jail. Commit this while we continue to investigate...

PR:             286710, 291409
Tested by:      marck, rdunkle at smallcatbrain.com
Reviewed by:    emaste
MFC after:      3 days
Fixes:  2e47f35be5dc ("Convert libllvm, libclang and liblldb into private shared libraries").

    [2 lines not shown]
DeltaFile
+1-0Makefile.inc1
+1-01 files

FreeBSD/src 1dc8b62sys/vm vm_object.c

vm_object_page_remove(): clear pager even if there is no resident pages

(cherry picked from commit 72a447d0bc768c7fe8a9c972f710c75afebd581b)
DeltaFile
+2-1sys/vm/vm_object.c
+2-11 files

FreeBSD/src 27595besys/riscv/riscv pmap.c

riscv: smarter DMAP construction (again)

Extend pmap_bootstrap_dmap() to build the DMAP with 4K-page granularity.

Recently we have been approximating it with 2MB mappings. The motivation
again is the problematic FU540 hardware, which seems to require more
accurate mappings still to avoid triggering its PMP errata.

Although this hardware alone is of little consequence, constructing the
DMAP accurately/correctly may help avoid future surprises.

The implementation contains some repetitive code. This could be
expressed differently, but my guiding principle for these early routines
is that being simple and explicit about what we are doing makes them
easier to comprehend.

See also 762a3224cde6 ("riscv: smarter DMAP construction).

Tested by:      Klaus Küchemann <maciphone2 at googlemail.com>

    [3 lines not shown]
DeltaFile
+83-15sys/riscv/riscv/pmap.c
+83-151 files

FreeBSD/src bcd6bb8sys/arm64/arm64 exec_machdep.c

arm64: Correctly align the SVE signal context

The SVE signal context needs to be correctly aligned. Fix this by
creating a new macro to calculate the needed size to provide this
alignment, and use it when setting and checking the saved SVE signal
context.

Reported by:    cperciva
Reviewed by:    cperciva, markj
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54396

(cherry picked from commit a9e77eb7016df70723c208fc09fbd01ec23a732d)
DeltaFile
+9-5sys/arm64/arm64/exec_machdep.c
+9-51 files

FreeBSD/src 277539atests/sys/kern pdwait.c Makefile

Add tests for pdwait

MFC With:       4d707825bf62ee73a32b615846eff9c4a9bda538
Sponsored by:   ConnectWise
DeltaFile
+295-0tests/sys/kern/pdwait.c
+1-0tests/sys/kern/Makefile
+296-02 files

FreeBSD/src d1e6057tests/sys/kern pdrfork.c Makefile

Add tests for pdrfork

MFC With:       5c2ee618d5ec21f110c4da40e9f17833b2ab8b76
Sponsored by:   ConnectWise
DeltaFile
+187-0tests/sys/kern/pdrfork.c
+1-0tests/sys/kern/Makefile
+188-02 files

FreeBSD/src e35df41tests/sys/kern procdesc.c Makefile

procdesc: Add a test for pid recycling behavior

MFC With:       09984871d8caff9263b955a94bb9fb5354af1b4c
Sponsored by:   ConnectWise
DeltaFile
+98-0tests/sys/kern/procdesc.c
+1-0tests/sys/kern/Makefile
+99-02 files

FreeBSD/src c5daa5ashare/man/man4 acpi.4, sys/conf files

acpi_spmc: Add system power management controller driver

Add SPMC (system power management controller) driver as acpi_spmc. This
is the device which provides the LPI device D-state constraints and
allows for OSPM to send S0ix/modern standby entry/exit notifications.
This supports the original Intel DSM
(https://uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf,
untested), the AMD DSM (tested), and the Microsoft DSM (tested).

Before entry, acpi_spmc_check_constraints is called to notify of any
violated power constraints. This will use acpi_pwr_get_state to get
current device D-states when that gets added back.

Reviewed by:    olce
Tested by:      jkim, Oleksandr Kryvulia, Matthias Lanter
Approved by:    olce
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48387
DeltaFile
+618-0sys/dev/acpica/acpi_spmc.c
+3-1share/man/man4/acpi.4
+1-0sys/dev/acpica/acpi.c
+1-0sys/conf/files
+623-14 files