FreeBSD/src f27c1dashare/man/man4 ntsync.4

ntsync.4: be explicit about the effect of automatic vs manual event on waiters

(cherry picked from commit 65251c43415aa0993b7d43962cbb71d772870c83)
DeltaFile
+7-1share/man/man4/ntsync.4
+7-11 files

FreeBSD/src 0b9f4c6sys/fs/nfsserver nfs_nfsdserv.c

nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools

Some ZFS pools do not support va_birthtime and will return
EINVAL when a VOP_SETATTR() of it is attempted.  The MacOS
NFSv4 client sets va_birthtime (TimeCreate) in the same
Setattr with ctime/mtime and other attributes after a new
file is created.  The EINVAL failure leaves these new files
messed up (mode == 0).

This patch pretends the setting of TimeCreate succeeded if
ctime/mtime were also set in the same Setattr RPC, which
resolves the problem for the MacOS client.

If this fix is not sufficient, a new pathconf name to detect
if a file system supports birthtime may be needed.

PR:     296066

(cherry picked from commit b1af05406b5117d76f567056fba0a023a6374465)
DeltaFile
+10-0sys/fs/nfsserver/nfs_nfsdserv.c
+10-01 files

FreeBSD/src 76badd2sys/fs/nfsserver nfs_nfsdserv.c

nfs_nfsdserv.c: Fix setting of birthtime for some ZFS pools

Some ZFS pools do not support va_birthtime and will return
EINVAL when a VOP_SETATTR() of it is attempted.  The MacOS
NFSv4 client sets va_birthtime (TimeCreate) in the same
Setattr with ctime/mtime and other attributes after a new
file is created.  The EINVAL failure leaves these new files
messed up (mode == 0).

This patch pretends the setting of TimeCreate succeeded if
ctime/mtime were also set in the same Setattr RPC, which
resolves the problem for the MacOS client.

If this fix is not sufficient, a new pathconf name to detect
if a file system supports birthtime may be needed.

PR:     296066

(cherry picked from commit b1af05406b5117d76f567056fba0a023a6374465)
DeltaFile
+10-0sys/fs/nfsserver/nfs_nfsdserv.c
+10-01 files

FreeBSD/src cf85111sys/x86/include specialreg.h, sys/x86/x86 identcpu.c

x86: add CPUID bits for SHA512/SM3/SM4

Reviewed by:    mav
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58003
DeltaFile
+3-0sys/x86/x86/identcpu.c
+3-0sys/x86/include/specialreg.h
+6-02 files

FreeBSD/src 6d9bc46usr.sbin/jail config.c

jail: prevent a null derefence on array parameter assignment

The same variable was used as a counter for an inner and out loop.
Add a new one for the inner loop.

PR:             283934
Reported by:    crest at rlwinm.de
DeltaFile
+4-3usr.sbin/jail/config.c
+4-31 files

FreeBSD/src de68720cddl/lib/libzfs Makefile, cddl/lib/libzpool Makefile

zfs: fix SIMD defines to match OpenZFS HAVE_SIMD() macro

The OpenZFS merge 80aae8a3f8aa introduced HAVE_SIMD() which checks for
HAVE_TOOLCHAIN_* defines via simd_config.h.  The kernel module Makefile
was updated, but kern.pre.mk (static kernel build) and the libzpool/libzfs
Makefiles were missed, still using the old HAVE_SSE2 etc. names.  This
caused all vectorized raidz, fletcher, and blake3 implementations to be
compiled out.
DeltaFile
+5-3sys/conf/kern.pre.mk
+3-3cddl/lib/libzpool/Makefile
+3-2cddl/lib/libzfs/Makefile
+11-83 files

FreeBSD/src 2a4b8fdsys/kern uipc_usrreq.c

unix: Fix a socket refcount leak in uipc_sendfile_wait()

Fixes:          d15792780760 ("unix: new implementation of unix/stream & unix/seqpacket")
Reviewed by:    glebius
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57967
DeltaFile
+3-1sys/kern/uipc_usrreq.c
+3-11 files

FreeBSD/src 524fb04share/man/man9 fetch.9

fetch.9: fix a typo

Fixes:          a1c52e05f571 ("CHERI: declare fueptr and suptr")
Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
DeltaFile
+1-1share/man/man9/fetch.9
+1-11 files

FreeBSD/src 17602ebsys/libkern bcopy.c

CHERI: make mem{cpy,move}(9) CHERI compatible

- Use intptr_t in place of long as the word type in the core copying
  loop where aligned words a copied.  This preserved the provenance of
  any copied pointers.
- When working with the address of src or dst use ptraddr_t rather than
  uintptr_t.  This avoid ambigious provenance in expressions involving
  multiple addresses.

As a minor tweak, rename the function to memmove since that is the
interface it implements (overlapping src and dst are permitted) and make
memcpy the alias rather than the other way around.

Reviewed by:    kib, markj
Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D57965
DeltaFile
+11-9sys/libkern/bcopy.c
+11-91 files

FreeBSD/src f14bdfeshare/man/man9 socket.9, sys/kern uipc_socket.c

CHERI: add sooptcopyinptr to preserve pointer provenance

Most socket options don't involve pointers so make the default
sooptcopyin discard provenance and add a sooptcopyinptr that preserves.

Reviewed by:    markj, emaste
Effort:         CHERI upstreaming
Sponsored by:   DARPA, AFRL, Innovate UK
Differential Revision:  https://reviews.freebsd.org/D57665
DeltaFile
+28-6sys/kern/uipc_socket.c
+12-1share/man/man9/socket.9
+6-0sys/sys/sockopt.h
+46-73 files

FreeBSD/src 7f55dbeshare/man/man9 memcpy.9 memmove.9, sys/sys systm.h

CHERI: declare mem{cpy,move}_data

Declare kernel-only, provenance-discarding memcpy_data, and memmove_data
APIs intended to copy raw data which does not contain pointers (e.g.,
buffers on their way to or from network or storage devices).  On CHERI
architectures, they will explicitly remove tags from capabilities,
removing any provenance.  This reduces the risk of accidental spread of
pointers on CHERI systems.

Document that bcopy preserves pointer provenance.

Reviewed by:    ziaee, kib, adrian, markj
Effort:         CHERI upstreaming
Sponsored by:   DARPA, AFRL, Innovate UK
Differential Revision:  https://reviews.freebsd.org/D57662
DeltaFile
+23-7share/man/man9/memcpy.9
+24-5share/man/man9/memmove.9
+9-0sys/sys/systm.h
+4-2share/man/man9/bcopy.9
+2-0share/man/man9/Makefile
+62-145 files

FreeBSD/src 402a657lib/libsysdecode mktables

libsysdecode: Fix shutdownhow table

MFC after:      1 week
Fixes:          c3276e02beab ("sockets: make shutdown(2) how argument a enum")
Reviewed by:    glebius
Differential Revision:  https://reviews.freebsd.org/D57915
DeltaFile
+1-1lib/libsysdecode/mktables
+1-11 files

FreeBSD/src 29b07efsys/fs/autofs autofs_vfsops.c

autofs: rename sx lock description for am_lock

Rename am_lock description from autofslk -> autfsm.

The lock description, autofslk, is used as the description for
autofs_softc->sc_lock, which is used to protect autofs requests and the
like as opposed to am_lock which protects autofs nodes for a given
mount.

This change allows witness to distinguish different lock orders for each
lock.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D57972
DeltaFile
+1-1sys/fs/autofs/autofs_vfsops.c
+1-11 files

FreeBSD/src 2fc95fesys/compat/linux linux_xattr.c

linuxulator: Add linux_extattr_get_vp() for atomic getxattr

Move the atomic size-probe-and-read logic into a new
linux_extattr_get_vp() function in linux_xattr.c instead of
modifying the generic extattr_get_vp() in vfs_extattr.c.
This keeps Linux-specific getxattr semantics (ERANGE on
too-small buffer, EOPNOTSUPP to ENOATTR mapping)
self-contained within the linuxulator.

The function probes the attribute size and reads the data
under a single vnode lock, preventing a TOCTOU race between
the size probe and data read.

Signed-off-by:  YAO, Xin <mr.yaoxin at outlook.com>
Reviewed by:    kib
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2263
DeltaFile
+94-11sys/compat/linux/linux_xattr.c
+94-111 files

FreeBSD/src 2c90545sys/compat/linux linux_xattr.c, sys/kern vfs_extattr.c

linuxulator: Fix O_PATH file descriptors errno for f*xattr(2)

LTP open13 expects these operations to fail with EBADF, matching
Linux behavior, but FreeBSD currently returns EOPNOTSUPP
for fgetxattr() on an O_PATH fd

Look up Linux fd-based xattr descriptors with getvnode()
and route the operations through shared kern_extattr_*_fp()
helpers so the O_PATH check and the extattr operation use the
same referenced file.

Apply the same EBADF handling to fsetxattr(), fremovexattr(), and
flistxattr() so the xattr paths stay consistent.

Signed-off-by:  YAO, Xin <mr.yaoxin at outlook.com>
PR:             295537
Reviewed by:    kib
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2263
DeltaFile
+71-10sys/compat/linux/linux_xattr.c
+40-7sys/kern/vfs_extattr.c
+10-0sys/sys/syscallsubr.h
+121-173 files

FreeBSD/src c9991e0lib/msun Symbol_f128.map, lib/msun/ld128 s_logl.c

powerpc64le: switch from calling wrappers to weak references

Fixes:  255538cd906045095d0c2113ae6c4731ce36c0cf
Differential Revision: https://reviews.freebsd.org/D57850
Reviewed by:    adrian
DeltaFile
+61-0lib/msun/Symbol_f128.map
+0-43lib/msun/powerpc/ld128_compat.c
+0-36lib/msun/powerpc/Symbol_f128.map
+5-0lib/msun/ld128/s_logl.c
+5-0lib/msun/src/e_lgammal.c
+5-0lib/msun/src/e_remainderl.c
+76-7950 files not shown
+271-8256 files

FreeBSD/src 07db030tests/sys/netinet socket_afinet.c

tests/socket_afinet: make multibind test more verbose on failure
DeltaFile
+5-1tests/sys/netinet/socket_afinet.c
+5-11 files

FreeBSD/src 51eb574tests/sys/netinet socket_afinet.c

tests/netinet/socket_afinet: reduce tautology in test cases names

Just avoid repeating the test program name in every test case name.
No functional change.

Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D56727
DeltaFile
+31-31tests/sys/netinet/socket_afinet.c
+31-311 files

FreeBSD/src 0bc0b0ctests/sys/netinet socket_afinet.c

tests/socket_afinet: extend bind_connected_port_test to cover more cases

- Test SOCK_DGRAM (UDP) sockets.
- Test binding to 0:port and to a addr:port in presence of connected socket
  using the port.

Differential Revision:  https://reviews.freebsd.org/D56707
DeltaFile
+105-28tests/sys/netinet/socket_afinet.c
+105-281 files

FreeBSD/src 57cc010tests/sys/netinet socket_afinet.c

tests/socket_afinet: make child_bind() return a full spectre of results

There is no functional change for existing tests, but allows to write a test
that would expect an immediate success of bind(2).
DeltaFile
+31-22tests/sys/netinet/socket_afinet.c
+31-221 files

FreeBSD/src 6b75f8fsys/netinet6 in6_pcb.c

inpcb: use correct mask in in6_pcblookup_lbgroup()

There is no visible bug fixed as in current tree masks are the same.

Fixes:  6883b120c53735ff1681ef96d257f376731f56b3
DeltaFile
+1-1sys/netinet6/in6_pcb.c
+1-11 files

FreeBSD/src 4f293e3cddl/usr.bin/ctfmerge ctfmerge.1

ctfmerge.1: Fix uniqlabel typos

The flag is -D, but it was written as a second -d. Add a period too.

MFC after:      3 days
DeltaFile
+2-2cddl/usr.bin/ctfmerge/ctfmerge.1
+2-21 files

FreeBSD/src a88932bsys/powerpc/conf QORIQ64

powerpc/conf: Remove temporary additions from QORIQ64

These were added during the DPAA driver rewrite, and should not have
gone in then.  Remove them.
DeltaFile
+0-3sys/powerpc/conf/QORIQ64
+0-31 files

FreeBSD/src 21ae611sys/powerpc/conf MPC85XX

powerpc: Remove DPAA from MPC85XX, it's 64-bit only now
DeltaFile
+0-1sys/powerpc/conf/MPC85XX
+0-11 files

FreeBSD/src 17f02f7sys/powerpc/booke pmap_32.c

powerpc/pmap: Fix 32-bit Book-E build
DeltaFile
+2-2sys/powerpc/booke/pmap_32.c
+2-21 files

FreeBSD/src a8566c7sys/dev/iicbus/rtc hym8563.c, sys/modules/i2c/hym8563 Makefile

hym8563: Fix 32-bit powerpc build

Depend on clknode_if.h in the module Makefile, so that it gets
explicitly built for the module.  Also, reduce the #if guards to only
the new clock output code, and gate them on all powerpc, not just
powerpc64.

Fixes:  6b77d34f("HYM8563: Add support for clock output.")
Reviewed by:    mmel
Differential Revision:  https://reviews.freebsd.org/D57795
DeltaFile
+11-7sys/dev/iicbus/rtc/hym8563.c
+1-0sys/modules/i2c/hym8563/Makefile
+12-72 files

FreeBSD/src 2b5d1d8sys/dev/rge if_rge.c

rge: Fix 32-bit powerpc build

Book-E powerpc has 64-bit bus_addr_t but only a 32-bit bus_size_t.  Use
the right macros for maxsize and maxsegsize to fix the build.

Fixes:  4bf8ce037 ("if_rge: initial import of if_rge driver from OpenBSD.")
Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57794
DeltaFile
+2-2sys/dev/rge/if_rge.c
+2-21 files

FreeBSD/src 08cda4bshare/man/man4 ktls.4, sys/kern uipc_ktls.c

ktls: Add a tunable to disable TLS receive

TLS receive offload is really only beneficial for in-kernel use cases
(such as NFS over TLS) or when using a hardware offload.  In addition,
several recent SAs have involved the TLS receive path, but the only
current mitigation for those is to disable TLS offload entirely.

Reviewed by:    ziaee, gallatin, markj
Relnotes:       yes
Sponsored by:   Netflix
Sponsored by:   Chelsio Communications
Co-authored-by: John Baldwin <jhb at FreeBSD.org>
Differential Revision:  https://reviews.freebsd.org/D57974
DeltaFile
+58-32tests/sys/kern/ktls_test.c
+6-1sys/kern/uipc_ktls.c
+3-1share/man/man4/ktls.4
+67-343 files

FreeBSD/src 9cee481sys/kern uipc_ktls.c

ktls: Centralize the check for CBC ciphers

Move the check out of ktls_enable_(rx|tx) and into ktls_create_session.

Reviewed by:    gallatin, markj
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D57973
DeltaFile
+3-6sys/kern/uipc_ktls.c
+3-61 files

FreeBSD/src 43b1adelib/libpkgconf Makefile, lib/libpkgconf/libpkgconf config.h

pkgconf: match the update to version 2.9.93

This update brings spdxtool(1), with the ability to generate software
bill of material files (SBOM) in the SPDX 3.0.1 format (JSON-LD).

Reviewed by:    markj
Approved by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57953
DeltaFile
+58-35lib/libpkgconf/libpkgconf/config.h
+29-4lib/libpkgconf/Makefile
+30-0usr.bin/spdxtool/Makefile
+4-4packages/pkgconf/pkgconf.ucl
+2-0usr.bin/pkgconf/Makefile
+1-0usr.bin/bomtool/Makefile
+124-431 files not shown
+125-437 files