FreeBSD/src 4b17776sys/compat/freebsd32 freebsd32_misc.c

compat/freebsd32: set uio_rw for trailer's uio in freebsd32_sendfile()

PR:     297516
Reported by:    asomers
Fixes:  dfad790c8cca ("sendfile: stop abusing kern_writev()")
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+2-0sys/compat/freebsd32/freebsd32_misc.c
+2-01 files

FreeBSD/src 01d4e3csys/netipsec xform_ipcomp.c

netipsec/xform_ipcomp.c: fix sockaddr type set in ipcomp6_nonexp_encapcheck()

Noted and reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58646
DeltaFile
+1-1sys/netipsec/xform_ipcomp.c
+1-11 files

FreeBSD/src cba481asys/netipsec key.c

PF_KEY socket: limit the length of copied socket address

for SADB_UPDATE op SADB_X_EXT_NEW_ADDRESS_SRC/DST extensions, by
checking the sa_len matching the address family requirements before
doing the copy.

Also convert KEY_SETSECASIDX() and KEY_SETSECSPIDX() to functions and
apply the sa_len clamping there.

See https://github.com/0xdeadbeefnetwork/pfkey-sadb-overflow

PR:     297264
Tested by:      Wafa Hamzah <wafah at nvidia.com> (previous version)
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58646
DeltaFile
+69-59sys/netipsec/key.c
+69-591 files

FreeBSD/src fbe9aa7sys/netipsec key.c

netipsec/key.c::key_checksockaddrs(): constify src/dst address buffer pointers

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58646
DeltaFile
+4-1sys/netipsec/key.c
+4-11 files

FreeBSD/src 1a71d24sys/kern sys_process.c

kern/sys_process.c: make vmspace_rwmem() similar to io functions

In particular, if there were any bytes moved, and then vm_fault()
faulted, do not return an error, but report the short io instead.

PR:     297512
Reviewed by:    markj
Tested by:      Stéphane D'Alu <sdalu at sdalu.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58838
DeltaFile
+5-4sys/kern/sys_process.c
+5-41 files

FreeBSD/src f6000e9sys/kern kern_proc.c

kern/kern_proc.c: do not throw out read data in get_ps_strings()

Since vmspace_iop()/proc_readmem() might return -1 on error from
vmspace_rwmem(), account for this and stop reading but return already
accumulated data if any, instead of returning an error.

PR:     297512
Reported and tested by: Stéphane D'Alu <sdalu at sdalu.com>
Reviewed by:    markj
Fixes:  e1b0d051bbf7 ("proc: Allow to make proc_rwmem() operate on a consistent address space")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58838
DeltaFile
+4-1sys/kern/kern_proc.c
+4-11 files

FreeBSD/src d9cf2a8usr.bin/login login.conf

Increase the default mlock limit from 64k to 256k

The current default has been unchanged for 14 years.  Increase it to
keep pace with modern hardware and software.  security/pinentry-gnome,
in particular, can sometimes need 112 kB.

PR:             297452
MFC after:      2 weeks
Sponsored by:   ConnectWise
Reviewed by:    cye, emaste
Differential Revision: https://reviews.freebsd.org/D58811
DeltaFile
+1-1usr.bin/login/login.conf
+1-11 files

FreeBSD/src 065396esys/dev/vmware/vmxnet3 if_vmx.c

if_vmx: fix panic during kldload

Just like vmxnet3_intr_disable_all, iflib may invoke this routine
before vmxnet3_attach_post() has run, which is before the top-level
shared data area is initialized and the device made aware of it.

PR:             294312
Sponsored by:   Dell Inc.

(cherry picked from commit 01b0690c495e1043a72cae9ee945f9f2c2adc216)
DeltaFile
+6-1sys/dev/vmware/vmxnet3/if_vmx.c
+6-11 files

FreeBSD/src 930edc2sys/dev/vmware/vmxnet3 if_vmx.c

if_vmx: fix panic during kldload

Just like vmxnet3_intr_disable_all, iflib may invoke this routine
before vmxnet3_attach_post() has run, which is before the top-level
shared data area is initialized and the device made aware of it.

PR:             294312
Sponsored by:   Dell Inc.

(cherry picked from commit 01b0690c495e1043a72cae9ee945f9f2c2adc216)
DeltaFile
+6-1sys/dev/vmware/vmxnet3/if_vmx.c
+6-11 files

FreeBSD/src d0f0a3blibexec/rc rc.subr

etc/rc.subr: svcj - use the filename for services

We have ports and basesystem services, where the internal name and the
filename differ. While the documentation recommends to keep them in
sync, the reality is different. For service jails use the basename of
the service filename.
Fixes:          2efbd48 rc: add service jails framework
Suggested by:   joneum
MFC after:      1 week
MFC to:         stable/15
DeltaFile
+6-6libexec/rc/rc.subr
+6-61 files

FreeBSD/src 84d8d28libexec/rc/rc.d bgfsck

rc.d/bgfsck: use the correct variable name

The name of the script and the name used internally for rc.conf differ,
as such the hardcoded disabling of service jails for the didn't work.
Fix by using the correct name.
Fixes:          f99f0ee14e3af rc.d: add a service jails config to all base system services
DeltaFile
+1-1libexec/rc/rc.d/bgfsck
+1-11 files

FreeBSD/src 6c41d92sys/net/route route_tables.c

routing: Fix table sizes

Tables that have one element per protocol or address family were
previously sized by AF_MAX + 1 since AF_MAX was off by one.  Now that
AF_MAX has been corrected, we need to apply the opposite correction to
these tables.

Fixes:          ddd850aa7720 ("sys/socket.h: Fix AF_MAX")
MFC after:      3 days
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    pouria, kevans, glebius
Differential Revision:  https://reviews.freebsd.org/D58826
DeltaFile
+9-9sys/net/route/route_tables.c
+9-91 files

FreeBSD/src 79a6ad6lib/libifconfig libifconfig_internal.h

libifconfig: Fix table size

Tables that have one element per protocol or address family were
previously sized by AF_MAX + 1 since AF_MAX was off by one.  Now that
AF_MAX has been corrected, we need to apply the opposite correction to
these tables.

Fixes:          ddd850aa7720 ("sys/socket.h: Fix AF_MAX")
MFC after:      3 days
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D58827
DeltaFile
+1-1lib/libifconfig/libifconfig_internal.h
+1-11 files

FreeBSD/src 19a1025usr.sbin/pkg FreeBSD.conf.quarterly-release

Remove minor version from kmods repo

We don't have a kmods_quarterly_5 repo for releng/14.5 so don't point
users at it.

Direct commit to releng/14.5, hopefully to be reverted once the repo
exists.

Approved by:    re (cperciva)
Sponsored by:   OpenSats Initiative
DeltaFile
+1-1usr.sbin/pkg/FreeBSD.conf.quarterly-release
+1-11 files

FreeBSD/src 8bca5d0sys/conf newvers.sh

14.5: Update to BETA2

Approved by:    re (implicit)
Sponsored by:   OpenSats Initiative
DeltaFile
+1-1sys/conf/newvers.sh
+1-11 files

FreeBSD/src c33f8ddlib/libifconfig libifconfig_internal.c libifconfig.c, sys/net rtsock.c

Revert "sys/socket.h: Fix AF_MAX"

Back out this change for 14.5-BETA2.  It might come back with
changes, but in its current form it breaks ABI.

This reverts commit f77a60a27ad64e3acf26f3dc088c6e80fdd15754.

Approved by:    re (cperciva)
DeltaFile
+3-3sys/netlink/route/rt.c
+1-3sys/sys/socket.h
+2-2sys/net/rtsock.c
+2-2sys/net/route/route_helpers.c
+2-2lib/libifconfig/libifconfig.c
+1-1lib/libifconfig/libifconfig_internal.c
+11-133 files not shown
+14-169 files

FreeBSD/src 2cc2d2fsys/fs/pseudofs pseudofs.c

pseudofs: Don't purge the cache on shutdown

This is a waste of time and results in a use-after-free if linsysfs is
loaded and a USB network interface is in use, since USB devices are
disconnected at shutdown, which triggers a call into linsysfs, which
then tries to destroy a pseudofs node which has already been purged.

Approved by:    re (cperciva)
MFC after:      1 week
Reviewed by:    glebius
Differential Revision:  https://reviews.freebsd.org/D58359

(cherry picked from commit 4ebcdb8dd9a7bdddbc97ff6ee47e0a7556c76b5a)
(cherry picked from commit ea65604407f4c2c73e889cfba07f5c65fb208996)
DeltaFile
+0-1sys/fs/pseudofs/pseudofs.c
+0-11 files

FreeBSD/src c555236contrib/unbound config.h.in configure, contrib/unbound/doc Changelog

unbound: Update to 1.26.0

Release notes at
        https://community.nlnetlabs.nl/t/unbound-1-26-0-released

Merge commit '84ffc29dc8ddb0c946db5cb3b3c1310bec6a9e6c'

Approved by:    re (cperciva)

(cherry picked from commit 7a789145f88a6aceacc59029a0cafe7de7aeefea)
(cherry picked from commit ceb764f65dcdc7349abc0b27b934a89d2209180d)
DeltaFile
+3,512-3,494contrib/unbound/util/configlexer.c
+2,874-1,942contrib/unbound/configure
+2,148-2,099contrib/unbound/util/configparser.c
+577-0contrib/unbound/doc/Changelog
+223-181lib/libunbound/config.h
+220-178contrib/unbound/config.h.in
+9,554-7,894108 files not shown
+12,570-8,977114 files

FreeBSD/src a8347f4tools/tools/git git-arc.1 git-arc.sh

git-arc: Add a diff subcommand

Show the differences between local commits and their associated
Phabricator reviews, i.e., what "git arc update" would upload.  For
each commit, the review's current raw diff is applied to the commit's
parent in a temporary index and the resulting tree is compared against
the commit itself.  An empty diff means the commit and the review are
in sync.

This makes it easy to check whether local amendments have diverged
from the posted review before updating it, or to confirm that a
review is current before landing.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58789
DeltaFile
+41-4tools/tools/git/git-arc.sh
+22-1tools/tools/git/git-arc.1
+63-52 files

FreeBSD/src 3baada8sys/kern uipc_usrreq.c, tests/sys/kern unix_connectat.c

unix: only treat an empty sun_path as a peer descriptor for connectat(2)

connect(2) passes AT_FDCWD to unp_connectat(), so the empty-path
descriptor branch added in 6563dcb6b1f5 turned any sockaddr whose
sun_path begins with a NUL byte into getsock(AT_FDCWD), failing with
EBADF where the pathname lookup historically failed with ENOENT.

Linux abstract namespace names are exactly that: the linuxulator
passes them through with the leading NUL intact, and libxcb tries the
abstract socket first, falling back to the pathname socket only on
ENOENT or ECONNREFUSED. The EBADF made every Linux X11 client fail
at startup with "Missing X server or $DISPLAY".

Restrict the descriptor interpretation to fd != AT_FDCWD, matching
the contract stated in 6563dcb6b1f5's commit message ("Accept an
empty sun_path when fd is not AT_FDCWD"): connect(2) again reaches
the pathname lookup and fails with ENOENT as it always did.

Add a regression test: a NUL-leading, nonzero-length sun_path through

    [7 lines not shown]
DeltaFile
+34-0tests/sys/kern/unix_connectat.c
+1-1sys/kern/uipc_usrreq.c
+35-12 files

FreeBSD/src 7271ee7share/examples/jails jng

jng: Fix mislabeled stats output

Reviewed by:    dteske, pouria
Approved by:    dteske (mentor), pouria
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2129
DeltaFile
+1-1share/examples/jails/jng
+1-11 files

FreeBSD/src 6c41d1econtrib/ofed/libcxgb4 t4.h qp.c, lib/ofed/libcxgb4 Makefile

libcxgb4: Use t4fw_interface.h from the cxgbe driver sources

In Linux these are maintained in separate places so a separate copy is
needed, but in FreeBSD take advantage of the shared tree to avoid
having a duplicate copy that can be stale.

Reviewed by:    np
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D58575
DeltaFile
+0-3,260contrib/ofed/libcxgb4/t4fw_api.h
+0-756contrib/ofed/libcxgb4/t4fw_ri_api.h
+3-3contrib/ofed/libcxgb4/qp.c
+2-2contrib/ofed/libcxgb4/t4.h
+1-0lib/ofed/libcxgb4/Makefile
+6-4,0215 files

FreeBSD/src ec8985alibexec/rtld-elf rtld.c

rtld: Remove a stale #ifdef PIC

rtld has always been built PIC since commit
7ca8e6a67068e8357e251bd3ea86253c8a751d59.  The stale #ifdef might
confuse a reader by thinking rtld can be built as non-PIC.

Reviewed by:    kib
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D58623
DeltaFile
+0-2libexec/rtld-elf/rtld.c
+0-21 files

FreeBSD/src f9dfe9blib/libc/stdlib bsearch.3, lib/libc/string memchr.3 strchr.3

libc: Use C23 pseudo-types in qualifier-preserving man page synopses

Reviewed by:    fuz
Approved by:    fuz (mentor)
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2288
DeltaFile
+10-10lib/libc/string/wmemchr.3
+8-8lib/libc/string/strstr.3
+8-8lib/libc/string/string.3
+6-6lib/libc/string/strchr.3
+4-4lib/libc/string/memchr.3
+2-2lib/libc/stdlib/bsearch.3
+38-383 files not shown
+44-449 files

FreeBSD/src d08296cinclude wchar.h string.h, lib/libc/string string.3 strstr.3

libc: Implement qualifier-preserving standard library functions

Several standard library functions are specified to return an unqualified
pointer while accepting a pointer to a potentially const-qualified object.
N3020 addresses this behaviour, discarding qualifiers due to incompatible
pointer types, by introducing qualifier-preserving macros for the affected
set of standard library functions.

Add `__qualsel()` helper to `<sys/cdefs.h>`, implemented using the generic
selection, and define qualifier-preserving macros for that set of functions
in `<string.h>`, `<wchar.h>`, and `<stdlib.h>`.

Macros are gated on `_STDC_VERSION__ >= 202311L && !__cplusplus`, therefore
there is no behavioural change for earlier C modes or C++ translation units.
The kernel is likewise unaffected, as it does not include userland headers.

As function-like macros, they are transparent except at a call site where
the address-of operator is applied, the macro is suppressed via `#undef`,
or the identifier appears in parenthesised form; all of which cause the

    [6 lines not shown]
DeltaFile
+46-10lib/libc/string/wmemchr.3
+28-0include/string.h
+17-4lib/libc/string/strstr.3
+21-0sys/sys/cdefs.h
+11-5lib/libc/string/string.3
+14-0include/wchar.h
+137-197 files not shown
+187-3313 files

FreeBSD/src 4a8bf4dtests/sys/netpfil/pf pfsync.sh

pfsync test: reduce the number of states to bulk-sync

We created so many states that our bulk-sync occasionally caused epair
to drop packets, which in turn caused the test to fail. That's not what
we're testing here, make it more robust by creating fewer states.

PR:             297307
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1tests/sys/netpfil/pf/pfsync.sh
+1-11 files

FreeBSD/src 49749f2release/riscv GENERICSD.conf

release/riscv: tweak GENERICSD partition placement

Increase EFI partition size to begin rootfs at 64mb. I believe this was
my original intention. I have a microSD card with 8mb block size which
emits an advisory in verbose dmesg about the misaligned partition.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1release/riscv/GENERICSD.conf
+1-11 files

FreeBSD/src 1c1bce5lib/libusb Symbol.map

libusb: Mark defualt smybol tag as latest stable version

As we might change the libusb ABI in 16, we should mark thje first
version as FBSD_1.8 instead of 1.9. Since versioning patch has not
landed for a long time, it makes sense to change it directly.

Discussed with: kib
Fixes: 527a82474cb3 ("libusb: versioning symbols")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1lib/libusb/Symbol.map
+1-11 files

FreeBSD/src 98b5640share/man/man4 bnxt.4, sys/dev/bnxt/bnxt_en bnxt_hwrm.h bnxt.h

bnxt: Add led(4) identification support

Query the firmware for the LEDs on each physical port and expose
/dev/led/bnxt* only when alternate blinking is supported.  Configure
every LED in the advertised group for identification and restore its
default firmware state before a function reset.

This follows the DPDK and Linux bnxt HWRM identification paths.

Reviewed against: DPDK, Linux

Reviewed by:    Sumit Saxena <sumit.saxena at broadcom.com>
MFC after:      2 weeks
Sponsored by:   BBOX.io
DeltaFile
+105-1sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
+41-0sys/dev/bnxt/bnxt_en/if_bnxt.c
+15-0sys/dev/bnxt/bnxt_en/bnxt.h
+6-1share/man/man4/bnxt.4
+2-0sys/dev/bnxt/bnxt_en/bnxt_hwrm.h
+169-25 files

FreeBSD/src 6747bf7sys/compat/linuxkpi/common/include/linux sched.h, sys/compat/linuxkpi/common/src linux_compat.c

linuxkpi: stop inlining accesses to curthread->td_lkpi_task

This should provide much higher resistence against struct thread layout
changes for out-of-tree modules depending on linuxkpi.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58733
DeltaFile
+10-0sys/compat/linuxkpi/common/src/linux_compat.c
+2-5sys/compat/linuxkpi/common/include/linux/sched.h
+12-52 files