FreeBSD/src a40e695tests/sys/kern socket_splice.c

socket_splice tests: Explicitly bind to the loopback address

Otherwise, when connecting to the value returned by getsockname(), we
inadvertently end up connecting to INADDR_ANY, which stopped working
after commit cd240957d7ba ("netinet: Disallow connections to
INADDR_ANY").

Fixes:  cd240957d7ba ("netinet: Disallow connections to INADDR_ANY")
DeltaFile
+2-2tests/sys/kern/socket_splice.c
+2-21 files

FreeBSD/src e57eeafshare/man/man3 pthread_signals_block_np.3 pthread_np.3

pthread_signals_block_np(3): document

(cherry picked from commit 1393f9a36b9c471d4af3518a3d3bb56c2a6adc58)
DeltaFile
+81-0share/man/man3/pthread_signals_block_np.3
+6-0share/man/man3/pthread_np.3
+3-0share/man/man3/Makefile
+90-03 files

FreeBSD/src c200e18sys/kern kern_fork.c

kern_fork.c: style

(cherry picked from commit 9137de9a1b5fdbd77880344820d55e2f05883e53)
DeltaFile
+1-1sys/kern/kern_fork.c
+1-11 files

FreeBSD/src 39f4425include pthread_np.h, lib/libthr/thread thr_switch_np.c

pthread_switch_add_np(3): remove

(cherry picked from commit c0fdd2bf944bb646116c6cd9879560579ebaa563)
DeltaFile
+0-86share/man/man3/pthread_switch_add_np.3
+0-10share/man/man3/pthread_np.3
+0-7include/pthread_np.h
+4-1lib/libthr/thread/thr_switch_np.c
+0-2share/man/man3/Makefile
+4-1065 files

FreeBSD/src b318894include pthread_np.h, lib/libthr pthread.map

libthr: add stable user interface for sigfastblock(2)

(cherry picked from commit 31760ee65ae3e79434fb257d93e17a6de6021f48)
DeltaFile
+19-0lib/libthr/thread/thr_sig.c
+2-0include/pthread_np.h
+2-0lib/libthr/pthread.map
+23-03 files

FreeBSD/src 9ce5410share/man/man5 src.conf.5

src.conf: regen

This appears to be reflecting the default witch for LLVM_BINUTILS in
1cae7121c667d9 ("Enable LLVM_BINUTILS by default").
DeltaFile
+17-17share/man/man5/src.conf.5
+17-171 files

FreeBSD/src 0596b4asys/kern vfs_cache.c

vfs_cache.c: Use CACHE_FPL_SUPPORTED_CN_FLAGS

Commit 2ec2ba7e232d added some code to cache_can_fplookup()
which worked (ensuring an abort when OPENNNAMED was set),
but showed I didn't understand what
CACHE_FPL_SUPPORTED_CN_FLAGS was used for.

This patch cleans it up.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D50524
Fixes:  2ec2ba7e232d ("vfs: Add VFS/syscall support for Solaris style extended attributes")
DeltaFile
+1-5sys/kern/vfs_cache.c
+1-51 files

FreeBSD/src b0ada42libexec/rc safe_eval.sh

safe_eval allow : and + in values
DeltaFile
+14-3libexec/rc/safe_eval.sh
+14-31 files

FreeBSD/src 68e3875sys/vm vm_object.c

vm_object: drop reverse walk from collect_flush

In vm_object_page_collect_flush, following a forward walk from page p
seeking more pages to which vm_object_page_remove_write might be
applied, a backward walk from page p is attempted. It never finds a
page, and so this change removes that walk, and renames the function
to better indicate its use for one specific application only.

It never finds a page because collect_flush() is only called from one
place, in vm_object_page_clean(). If there was a page p-1 to be found,
then either it is less than tstart, or it would have been found in the
previous iteration. If it less than tstart, then page_clean()
shouldn't be messing with it. If it was found in the previous
iteration, then vm_object_page_collect_flush() would have been called
in that iteration, and page p would have been the first page in the
forward walk from p-1, and it would have been processed then, and so p
would not be passed to vm_object_page_collect_flush now.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D50517
DeltaFile
+26-43sys/vm/vm_object.c
+26-431 files

FreeBSD/src 142bcdasys/vm vm_page.c

vm_page: drop mpred from grab_valid_iter()

Variable mpred in vm_page_grab_valid_iter() has become a write-only
variable. Drop it.

In grab_valid_iter(), drop a pctrie_iter_reset() call already handled
in vm_page_alloc_iter().

Reviewed by:    alc
Differential Revision:  https://reviews.freebsd.org/D50424
DeltaFile
+3-5sys/vm/vm_page.c
+3-51 files

FreeBSD/src fae33d1lib/libsys open.2

open.2: add a note about conversion of a file descriptor into O_PATH

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D50511
DeltaFile
+7-0lib/libsys/open.2
+7-01 files

FreeBSD/src 8aad1e6usr.bin/systat main.c, usr.bin/top machine.c

systat/top: Update ZFS sysctl names

Some of ARC statistic sysctls changed years ago, but those tools
are still using legacy shims, that are going to be removed.

MFC after:      3 days
DeltaFile
+3-3usr.bin/systat/main.c
+3-3usr.bin/top/machine.c
+6-62 files

FreeBSD/src 249f14csys/net80211 ieee80211_scan.c ieee80211_freebsd.c

net80211: remove direct references to ifp->if_xname

* change ieee80211_get_vap_ifname() to use if_name()
* migrate the other references of ifp->if_xname to
  ieee80211_get_vap_ifname()

Differential Revision:  https://reviews.freebsd.org/D50407
Reviewed by:    bz
DeltaFile
+2-2sys/net80211/ieee80211_scan.c
+1-1sys/net80211/ieee80211_freebsd.c
+1-1sys/net80211/ieee80211_wds.c
+4-43 files

FreeBSD/src a278d11sys/net80211 ieee80211_freebsd.c ieee80211_scan_sw.c

net80211: refactor out ifp->if_broadcastaddr into ieee80211_freebsd.c

* create ieee80211_vap_get_broadcast_address() to fetch the broadcast
  MAC address for the given VAP
* refactor references to ifp->if_broadcastaddr ->
  ieee80211_vap_get_broadcast_address()

Differential Revision:  https://reviews.freebsd.org/D50406
Reviewed by:    bz
DeltaFile
+12-0sys/net80211/ieee80211_freebsd.c
+6-5sys/net80211/ieee80211_scan_sw.c
+5-4sys/net80211/ieee80211_hostap.c
+4-2sys/net80211/ieee80211_ioctl.c
+2-2sys/net80211/ieee80211_output.c
+2-1sys/net80211/ieee80211_adhoc.c
+31-142 files not shown
+34-158 files

FreeBSD/src ed987e1sys/net80211 ieee80211_freebsd.c ieee80211_proto.c

net80211: migrate if_flags, if_drvflags out of most source files

Migrate both if_flags and if_drvflags out of most source files.
Ideally it'd only be referenced in ieee80211_freebsd.c, but for now
it also ignores references in ieee80211_ioctl.c.

* migrate if_flags set to if_setflags
* migrate if_flags get to if_getflags
* migrate if_drvflags get to if_getdrvflags
* add ieee80211_vap_ifp_check_is_monitor() and
  ieee8021_vap_ifp_check_is_simplex() to abstract out the IFF_MONITOR
  and IFF_SIMPLEX flag checks.
* add ieee80211_vap_ifp_check_is_running() and
  ieee80211_vap_ifp_set_running_state() to represent what IFF_DRV_RUNNING
  means (ie, mark the underlying OS network interface as active and
  inactive.)

Notably this doesn't yet clear up OACTIVE; I need to better describe
that.

    [3 lines not shown]
DeltaFile
+57-0sys/net80211/ieee80211_freebsd.c
+5-6sys/net80211/ieee80211_proto.c
+7-3sys/net80211/ieee80211_freebsd.h
+2-2sys/net80211/ieee80211_sta.c
+1-1sys/net80211/ieee80211_ioctl.c
+1-1sys/net80211/ieee80211_output.c
+73-131 files not shown
+74-147 files

FreeBSD/src 3f6a84fsys/net80211 ieee80211_freebsd.c ieee80211_hostap.c

net80211: refactor the if_input call into ieee80211_vap_deliver_data()

Refactor the two places where NET_EPOCH_ENTER; if_input; NET_EPOCH_EXIT
are called into a single spot in ieee80211_freebsd.c.

This removes both if_input references and puts all the NET_EPOCH stuff
into ieee80211_freebsd.c.

Differential Revision:  https://reviews.freebsd.org/D50404
Reviewed by:    bz
DeltaFile
+21-0sys/net80211/ieee80211_freebsd.c
+2-5sys/net80211/ieee80211_hostap.c
+2-4sys/net80211/ieee80211_input.c
+1-0sys/net80211/ieee80211_freebsd.h
+26-94 files

FreeBSD/src e035e86sys/net80211 ieee80211_freebsd.c ieee80211_ioctl.c

net80211: move references to IF_LLADDR() into ieee80211_freebsd.c

* Move references to IF_LLADDR() into ieee80211_freebsd.c
* Add a comment on one that I need to verify before I move it
* Implement ieee80211_vap_sync_mac_address() which syncs the VAP
  mac address from the network interface MAC address.
  This uses FreeBSD-isms (network epoch, IF_LLADDR()) so it shouldn't
  be in net80211 itself.

Differential Revision:  https://reviews.freebsd.org/D50023
DeltaFile
+44-0sys/net80211/ieee80211_freebsd.c
+1-17sys/net80211/ieee80211_ioctl.c
+2-2sys/net80211/ieee80211_sta.c
+2-1sys/net80211/ieee80211.c
+3-0sys/net80211/ieee80211_freebsd.h
+52-205 files

FreeBSD/src 259eac0lib/libefivar efivar-dp-format.c efivar-dp-parse.c

efivar: Kill needless sys/cdefs.h

Sponsored by:           Netflix
DeltaFile
+0-1lib/libefivar/efivar-dp-format.c
+0-1lib/libefivar/efivar-dp-parse.c
+0-1lib/libefivar/efivar.c
+0-1lib/libefivar/uefi-dputil.c
+0-44 files

FreeBSD/src 1c12934contrib/llvm-project/libcxx/include/__locale_dir locale_base_api.h

libc++: fix compiling <locale> with -fmodules

In /usr/include/c++/v1/__locale_dir/locale_base_api.h, xlocale.h is
included without first including stdio.h and stdlib.h, which causes
functions like strtoll_l() or sscanf_l() to not be declared.

When compiling with -fmodules, locale_base_api.h is processed separately
due to a declaration in /usr/include/c++/v1/module.modulemap, and this
will cause errors due to the above undeclared symbols.

Meanwhile, upstream has substantially reorganized this part of libc++'s
headers, so apply a minimalistic workaround: specifically when compiling
with -fmodules, add includes of stdio.h and stdlib.h.

PR:             286342
MFC after:      1 week

(cherry picked from commit c809b0184d0a6543bc5327d4252fa56a07ce4689)
DeltaFile
+7-1contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h
+7-11 files

FreeBSD/src cab0290contrib/llvm-project/libcxx/include/__locale_dir locale_base_api.h

libc++: fix compiling <locale> with -fmodules

In /usr/include/c++/v1/__locale_dir/locale_base_api.h, xlocale.h is
included without first including stdio.h and stdlib.h, which causes
functions like strtoll_l() or sscanf_l() to not be declared.

When compiling with -fmodules, locale_base_api.h is processed separately
due to a declaration in /usr/include/c++/v1/module.modulemap, and this
will cause errors due to the above undeclared symbols.

Meanwhile, upstream has substantially reorganized this part of libc++'s
headers, so apply a minimalistic workaround: specifically when compiling
with -fmodules, add includes of stdio.h and stdlib.h.

PR:             286342
MFC after:      1 week

(cherry picked from commit c809b0184d0a6543bc5327d4252fa56a07ce4689)
DeltaFile
+7-1contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h
+7-11 files

FreeBSD/src 2013ad7sys/fs/nullfs null_vnops.c

nullfs lookup: cn_flags is 64bit

(cherry picked from commit 89549c2348170921cc4270ac95bfabfd78d42739)
DeltaFile
+3-3sys/fs/nullfs/null_vnops.c
+3-31 files

FreeBSD/src a28f7ebrelease Makefile

release: Avoid pipe in tarball creation

Previously errors from invoking tar for src.txz or ports.txz were eaten
by the pipeline.  If something fails in creating these tarballs we want
the build to fail rather than producing subtly broken artifacts.  Use
${TAR_XZ_CMD} to add -J to tar's commandline rather than | xz.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50459
DeltaFile
+5-6release/Makefile
+5-61 files

FreeBSD/src 7866f12share/mk bsd.own.mk

bsd.own.mk: Introduce TAR_XZ_CMD

It is TAR_CMD with -J added, and can be used to avoid a tar | xz pipe
that could mask errors.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50473
DeltaFile
+2-0share/mk/bsd.own.mk
+2-01 files

FreeBSD/src bada381sys/fs/nfsclient nfs_clvnops.c

nfs_clvnops.c: Add an initialization mistakenly removed

Commit e4c7b2b6053f mistakenly removed an initialization of "newvp",
which could result in crashes.

This patch puts the initialization back in.

Reported by:    cy
Tested by:      cy
Fixes:  e4c7b2b6053f ("nfsv4: Add support to NFSv4 for named attributes")
DeltaFile
+1-0sys/fs/nfsclient/nfs_clvnops.c
+1-01 files

FreeBSD/src a8b9eeashare/man/man4 ddb.4

ddb4: improve formatting

Improve the consistency of the formatting.

Reviewed by:            ziaee
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D50514
DeltaFile
+2-2share/man/man4/ddb.4
+2-21 files

FreeBSD/src b6dd8c5. RELNOTES

RELNOTES: Add note for INADDR_ANY change

Ref commit cd240957d7ba ("netinet: Disallow connections to INADDR_ANY")
DeltaFile
+5-0RELNOTES
+5-01 files

FreeBSD/src cd24095sys/netinet in_pcb.c

netinet: Disallow connections to INADDR_ANY

Previously connect() or sendto() to INADDR_ANY reached some socket bound
to some host interface address. Although this was intentional it was an
artifact of a different era, and is not desirable now.

In 417b35a97b76 markj added support to disallow connect() to INADDR_ANY.
Take the next logical step and disable it by default.

PR:             280705
Reviewed by:    markj, jhb, zlei
Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47740
DeltaFile
+1-1sys/netinet/in_pcb.c
+1-11 files

FreeBSD/src ab4edcdusr.bin/m4 misc.c

m4: Fix OOB access displaying MIN_INT

Previously displaying INT_MIN resulted in an out of bounds access to
digits[-8].  In twos-complement -INT_MIN is still negative.

PR:             287013
Reviewed by:    emaste
DeltaFile
+1-1usr.bin/m4/misc.c
+1-11 files

FreeBSD/src ac196a5usr.bin/m4 eval.c

m4: Allow empty base argument in eval()

POSIX specifies "The second argument, if specified, shall set the radix
for the result; if the argument is blank or unspecified, the default
is 10."  Previously we reported an invalid

PR:             287015
Reviewed by:    emaste
DeltaFile
+1-1usr.bin/m4/eval.c
+1-11 files

FreeBSD/src 4eabcb7share/man/man5 elf.5

elf.5: Document .init_array and .fini_array

And note that .init and .fini are legacy interfaces.

Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50380
DeltaFile
+30-3share/man/man5/elf.5
+30-31 files