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

FreeBSD/src 9137de9sys/kern kern_fork.c

kern_fork.c: style

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+1-1sys/kern/kern_fork.c
+1-11 files

FreeBSD/src eba4039lib/libc/gen sysconf.c

libc: set close-on-exec for temp socket used to detect IPv6 support

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50509
DeltaFile
+1-1lib/libc/gen/sysconf.c
+1-11 files

FreeBSD/src 1a6a36abin/cp/tests cp_test.sh, contrib/atf/atf-c check_test.c

atf: Don't be deterred by weird umasks.

If the current umask is weird, ATF goes to great lengths to tell us that
it can't possibly work in these conditions, instead of just dealing with
it.  This makes it unreasonably hard to use ATF to test how our own code
handles unusual umasks.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    igoro, kevans, ngie
Differential Revision:  https://reviews.freebsd.org/D50267
DeltaFile
+8-83contrib/atf/atf-c/detail/fs.c
+22-22contrib/atf/atf-c/detail/fs_test.c
+11-13contrib/atf/atf-sh/atf-check_test.sh
+1-10bin/cp/tests/cp_test.sh
+2-6contrib/atf/atf-c/check_test.c
+44-1345 files

FreeBSD/src 6a97fbesys/netinet ip_carp.c

carp: fix mbuf_tag usage in carp_macmatch6

carp_macmatch6() had two issues that affect IPv6 processing:
1) it returns sc->sc_addr pointer that might become invalid after
   softc destroying.
2) carp_output() expects carp vhid to be stored in the mtag,
   not the pointer to softc.

Fix these issues. Allocate enough space in mtag to keep both vhid and
mac address. Copy vhid first to fix issue with carp_output(), then
copy sc_addr and return pointer to this copy. mtag will be alive
until mbuf is used.
This fixes problem when IPv6 packets originated from CARP IPv6 address
use incorrect mac address due to mbuf_tag has invalid data.

Reviewed by:    zlei, kp, glebius
Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC
Differential Revision:  https://reviews.freebsd.org/D50455
DeltaFile
+17-10sys/netinet/ip_carp.c
+17-101 files

FreeBSD/src a48dc9b. ObsoleteFiles.inc, share/zoneinfo Makefile

zoneinfo: don't install version

The commit teaching the build to install tzdata.zi for libcxx also
instals version.  It turns out this makes at least one piece of third
party software cry: rubygem-tzinfo expects any file in zoneinfo to be at
least 44 bytes long.  Clearly this is a bug in rubygem-tzinfo but since
nothing actually uses version, we may as well not install it ... as we
did previously.

Reported by:    delphij
Fixes:          91506dba7f2e zoneinfo: also install tzdata.zi and version
MFC after:      1 day
Approved by:    re (cperciva)

(cherry picked from commit 23a0c88b037625745b88d1661b9552f1ebe97ebc)
(cherry picked from commit 16ad4d77121dd117513c6044c0f076df144fa368)
DeltaFile
+3-0ObsoleteFiles.inc
+0-2share/zoneinfo/Makefile
+3-22 files

FreeBSD/src df16df7. ObsoleteFiles.inc, share/zoneinfo Makefile

zoneinfo: don't install version

The commit teaching the build to install tzdata.zi for libcxx also
instals version.  It turns out this makes at least one piece of third
party software cry: rubygem-tzinfo expects any file in zoneinfo to be at
least 44 bytes long.  Clearly this is a bug in rubygem-tzinfo but since
nothing actually uses version, we may as well not install it ... as we
did previously.

Reported by:    delphij
Fixes:          91506dba7f2e zoneinfo: also install tzdata.zi and version
MFC after:      1 day

(cherry picked from commit 23a0c88b037625745b88d1661b9552f1ebe97ebc)
DeltaFile
+3-0ObsoleteFiles.inc
+0-2share/zoneinfo/Makefile
+3-22 files

FreeBSD/src 16ad4d7. ObsoleteFiles.inc, share/zoneinfo Makefile

zoneinfo: don't install version

The commit teaching the build to install tzdata.zi for libcxx also
instals version.  It turns out this makes at least one piece of third
party software cry: rubygem-tzinfo expects any file in zoneinfo to be at
least 44 bytes long.  Clearly this is a bug in rubygem-tzinfo but since
nothing actually uses version, we may as well not install it ... as we
did previously.

Reported by:    delphij
Fixes:          91506dba7f2e zoneinfo: also install tzdata.zi and version
MFC after:      1 day

(cherry picked from commit 23a0c88b037625745b88d1661b9552f1ebe97ebc)
DeltaFile
+3-0ObsoleteFiles.inc
+0-2share/zoneinfo/Makefile
+3-22 files

FreeBSD/src 9c20010share/mk bsd.suffixes-extra.mk bsd.README

share/mk: pass SHARED_CFLAGS to PIC and PIE from assembly

This matches what we do with C sources.  Document SHARED_CFLAGS.

PR:             286975
Reviewed by:    jhb, emaste
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D50466
DeltaFile
+6-4share/mk/bsd.suffixes-extra.mk
+3-0share/mk/bsd.README
+9-42 files

FreeBSD/src cba6bf5share/mk bsd.README

share/mk/bsd.README: refer to the linker, not the loader

We're invoking the linker to create programs or libraries from one or
more object files not the loader to load them in to memory.

Reviewed by:    jhb, emaste
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D50481
DeltaFile
+3-3share/mk/bsd.README
+3-31 files