FreeBSD/src c8918d6. UPDATING, lib/csu/common crtbrand.S

Update in preparation for 14.2-RELEASE

- Bump BRANCH to RELEASE
- Add the anticipated RELEASE announcement date
- Set a static __FreeBSD_version

Approved by:    re (implicit)
Sponsored by:   Amazon
DeltaFile
+3-0UPDATING
+1-1lib/csu/common/crtbrand.S
+1-1sys/conf/newvers.sh
+5-23 files

FreeBSD/src b9c0321sys/net pfvar.h, sys/netpfil/pf pf.c pf_lb.c

pf: Fix source node locking

Source nodes are created quite early in pf_create_state(), even before
the state is allocated, locked and inserted into its hash row. They are
prone to being freed by source node killing or clearing ioctl while
pf_create_state() is still running.

The function pf_map_addr_sn() can be called in two very different paths.

One is for filter rules where it is called from
pf_create_state() after pf_insert_src_node(). In this case it is called
with a given source node and does not perform its own search and must
return the source node.

The other one is for NAT rules where it is called from
pf_get_translation() or its descendants. In this case it is called with
no known source node and performs its own search for source nodes. This
source node is then passed back to pf_create_state() without locking.


    [29 lines not shown]
DeltaFile
+87-61sys/netpfil/pf/pf.c
+42-24sys/netpfil/pf/pf_lb.c
+9-6tests/sys/netpfil/pf/src_track.sh
+5-3sys/net/pfvar.h
+143-944 files

FreeBSD/src de852d7sys/dev/hwpmc hwpmc_logging.c

hwpmc: Restore line lost in previous commit

MFC after:      3 days
DeltaFile
+1-0sys/dev/hwpmc/hwpmc_logging.c
+1-01 files

FreeBSD/src a2f5446sys/netlink/route iface.c

netlink/route: Fix the argument list for rtnl_handle_iflink()

This function is registered as a ifnet_link_event and so should have the
corresponding argument list.

PR:             282870
Reported by:    nakayamakenjiro at gmail.com
MFC after:      1 week

(cherry picked from commit 0289db3259532d51ebe58bc0b2647a0d9e6cae66)
DeltaFile
+1-1sys/netlink/route/iface.c
+1-11 files

FreeBSD/src e59a3bbcontrib/netbsd-tests/lib/libc/sys t_access.c, sys/kern vfs_default.c

vfs: Fix vop_stdis_text()

atomic(9) primitives are documented as operating on unsigned types.
Here, we need a cast to avoid a tautological comparison.

Add a regression test for access(2), which was affected by the bug.

Reported by:    NetApp
Reviewed by:    kib
Fixes:          e511bd1406fa ("vfs: fully lockless v_writecount adjustment")
MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Differential Revision:  https://reviews.freebsd.org/D47672

(cherry picked from commit 4ff291ebe80a226295351936d99fc6e3e7fce48a)
DeltaFile
+35-0contrib/netbsd-tests/lib/libc/sys/t_access.c
+1-1sys/kern/vfs_default.c
+36-12 files

FreeBSD/src 9917a13tests/sys/netinet Makefile

fibs_test: Run in a jail

These tests assume exclusive use of one or more FIBs and so can't be run
in parallel.  Running them in a VNET jail sidesteps this problem.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield

(cherry picked from commit a079f2b52aae74b5469f18dcbef1aff680b80282)
DeltaFile
+2-0tests/sys/netinet/Makefile
+2-01 files

FreeBSD/src c9f9f1ausr.sbin/makefs makefs.8

makefs.8: Clarify that makefs-generated zpools always have the same GUID

PR:             282832
MFC after:      1 week

(cherry picked from commit a20249443be111e8a3cb3b7bbe4a0d0e460a6058)
DeltaFile
+18-1usr.sbin/makefs/makefs.8
+18-11 files

FreeBSD/src 34182e5sys/vm swap_pager.c

swap_pager: Ensure that swapoff puts swapped-in pages in page queues

Readahead/behind pages are handled by the swap pager, but the get_pages
caller is responsible for putting fetched pages into queues (or wiring
them beforehand).

Note that the VM object lock prevents the newly queued page from being
immediately reclaimed in the window before it is marked dirty by
swap_pager_swapoff_object().

Reported by:    pho
Tested by:      pho
Reviewed by:    dougm, alc, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47526

(cherry picked from commit d11d407aee4835fd50811a5980125bb46748fa0b)
DeltaFile
+1-0sys/vm/swap_pager.c
+1-01 files

FreeBSD/src ee0c917sys/dev/hwpmc hwpmc_logging.c

hwpmc: Fix whitespace in logging macros

MFC after:      1 week
Sponsored by:   Klara, Inc.

(cherry picked from commit 3c29734502c330fc8f8e345213791722aeaf55c1)
DeltaFile
+65-61sys/dev/hwpmc/hwpmc_logging.c
+65-611 files

FreeBSD/src 906d603sys/netinet in_pcb.c, sys/netinet6 in6_pcb.c

inpcb: Make some cosmetic improvements to in_pcbbind()

- Use the local var "laddr" instead of sin->sin_addr in one block.
- Use in_nullhost() instead of explicit comparisons with INADDR_ANY.
- Combine multiple socket options checks into one.
- Fix indentation.
- Remove some unhelpful comments.

This is in preparation for some simplification and bug-fixing.

No functional change intended.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield
Differential Revision:  https://reviews.freebsd.org/D47451

(cherry picked from commit 45a77bf23fa2f36bf2169f7ba2a33b31f4c35adb)
DeltaFile
+20-24sys/netinet/in_pcb.c
+8-11sys/netinet6/in6_pcb.c
+28-352 files

FreeBSD/src 03fdd4flibexec Makefile

atf: Guard libexec/atf with WITH_TESTS_SUPPORT

Other atf components are guarded by WITH_TESTS_SUPPORT already.
WITH_TESTS is for actual tests.

Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47660

(cherry picked from commit 43e045c1733d50fad79f3a53e05140b8dc0d7fa6)
DeltaFile
+4-1libexec/Makefile
+4-11 files

FreeBSD/src 062b69blibexec/comsat comsat.c

comsat: Improve use of setuid()

Just return from jkfprintf if either (a) user lookup fails (that is,
getpwnam fails) or (b) setuid() to the user's uid fails.  If comsat is
invoked from inetd using the default of tty:tty we will now return due
to setuid() failing rather than fopen() failing.

PR:             270404
Reviewed by:    kevans
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47823
DeltaFile
+4-2libexec/comsat/comsat.c
+4-21 files

FreeBSD/src ab6a6a0sys/kern vfs_cache.c

kern___realpathat(): style

(cherry picked from commit 31784ee1e37dc0337637493721c4c9b98547089b)
DeltaFile
+5-3sys/kern/vfs_cache.c
+5-31 files

FreeBSD/src 1c65ea2sys/dev/efidev efirt.c

efirt: Fix the TDP_EFIRT assertion

(cherry picked from commit 07593d13fa2ad6fe4d962b7473c6020aef2a0414)
DeltaFile
+1-1sys/dev/efidev/efirt.c
+1-11 files

FreeBSD/src 5f5b47esys/amd64/amd64 trap.c

amd64 efi rt: handle #BP

PR:     282860

(cherry picked from commit e6ec41fa86d88f80bd663e55455a6844619a9b24)
DeltaFile
+12-0sys/amd64/amd64/trap.c
+12-01 files

FreeBSD/src 7efa3a6lib/libc/sys fhreadlink.2

fhreadlink.2: fix old typo in the manpage

PR: 282967

(cherry picked from commit fb4cdd51608f3008f035d01f6a499811cda41735)
DeltaFile
+1-1lib/libc/sys/fhreadlink.2
+1-11 files

FreeBSD/src 617e683sys/dev/efidev efirt.c, sys/sys proc.h

efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag

For MFC purposes, the TDP_EFIRT flag is moved to td_pflags2.

(cherry picked from commit a03957a706a05bb0c2f627183b19d84f6d96dbb7)
DeltaFile
+7-1sys/dev/efidev/efirt.c
+1-0sys/sys/proc.h
+8-12 files

FreeBSD/src 2e2699ctools/test/stress2/misc tmpfs26.sh tmpfs28.sh

stress2: Added new tmpfs test scenarios
DeltaFile
+179-0tools/test/stress2/misc/tmpfs26.sh
+61-0tools/test/stress2/misc/tmpfs28.sh
+49-0tools/test/stress2/misc/tmpfs27.sh
+289-03 files

FreeBSD/src 949190csys/netinet udp_usrreq.c

udp: Prefer memcpy() over bcopy()

The variable b[] is on the stack, thus cannot overlap with ipov, which
points to the heap area, so prefer memcpy() over memmove(), aka bcopy().

No functional change intended.

Reviewed by:    cc, rrs, cy, #transport, #network
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47713
DeltaFile
+2-2sys/netinet/udp_usrreq.c
+2-21 files

FreeBSD/src 1811fa6share/man/man4 Makefile

Install pvscsi man page

This was lost during the initial introduction of the pvscsi driver [1].
Later the driver was enabled on arm64 [2], so also install the man page
on arm64.

1. 052e12a5084f Add the pvscsi driver to the tree
2. 375d797b8191 Enable pvscsi and vmx in arm64 GENERIC

Reviewed by:    emaste, Alexander Ziaee <concussious.bugzilla_runbox.com> (manpages)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47712
DeltaFile
+2-0share/man/man4/Makefile
+2-01 files

FreeBSD/src 4de4f81share/man/man4 Makefile

Install vmx man page also on arm64

Fixes:          375d797b8191 Enable pvscsi and vmx in arm64 GENERIC
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47711
DeltaFile
+2-2share/man/man4/Makefile
+2-21 files

FreeBSD/src 1a5dc6esys/netpfil/pf pf_table.c

pf: Set cleared time when zeroing stats for table addresses

Reviewed by:            kp
Approved by:            kp (mentor)
Sponsored by:           InnoGames GmbH
Differential Revision:  https://reviews.freebsd.org/D47697
DeltaFile
+1-1sys/netpfil/pf/pf_table.c
+1-11 files

FreeBSD/src 9f9cf83sys/netpfil/pf pf.c

pf: Use a single pointer to state in pf_src_connlimit()

There's no need for a double pointer, the function pf_src_connlimit()
does not modify the state.

Reviewed by:            kp
Approved by:            kp (mentor)
Sponsored by:           InnoGames GmbH
Differential Revision:  https://reviews.freebsd.org/D47758
DeltaFile
+23-23sys/netpfil/pf/pf.c
+23-231 files

FreeBSD/src 4566664sys/kern vfs_subr.c

Speed up syncer shutdown

When shutting down, the syncer kernel deamon needs to iterate over all
32 of its queues, pausing for 1/4 of second each time waiting for essentially
nothing.  Bump the SYNCER_SHUTDOWN_SPEEDUP so that it takes just a second to
iterate.  It will still wait for another second afterwards; that bit is left
unchanged.

Reviewed By:    kib
Differential Revision:  https://reviews.freebsd.org/D47647
DeltaFile
+3-2sys/kern/vfs_subr.c
+3-21 files

FreeBSD/src 5c15094sys/dev/cxgbe t4_iov.c t4_main.c

cxgbe(4): Update the board names of the T6 OCP cards.

MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+3-3sys/dev/cxgbe/t4_iov.c
+3-3sys/dev/cxgbe/t4_main.c
+3-3sys/dev/cxgbe/t4_vf.c
+9-93 files

FreeBSD/src edfcccesys/powerpc/powerpc intr_machdep.c

powerpc: Remove unnecessary prototype.

This crept in with the interrupt rework back in 2019.
DeltaFile
+0-1sys/powerpc/powerpc/intr_machdep.c
+0-11 files

FreeBSD/src 700f7e7sys/powerpc/powerpc intr_machdep.c

powerpc: Get rid of interrupt subterfuge for IPIs

Instead of playing games with the interrupt event structure after the
fact when setting up IPIs, do the work in the interrupt initializer.
DeltaFile
+20-12sys/powerpc/powerpc/intr_machdep.c
+20-121 files

FreeBSD/src b872bb7usr.sbin/syslogd/tests syslogd_test.sh

syslogd: Split up basic test case

The basic case previously tested if messages are correctly logged over
UNIX, INET, and INET6 transport. This single case can be split up into
three separate cases to decrease code complexity and offer more granular
results.

Both INET and INET6 cases will be skipped if the kernel does not
support the corresponding transport.

Reviewed by:    zlei, markj
Differential Revision:  https://reviews.freebsd.org/D47650
DeltaFile
+61-24usr.sbin/syslogd/tests/syslogd_test.sh
+61-241 files

FreeBSD/src 8b63477usr.sbin/syslogd/tests syslogd_test.sh Makefile

syslogd: Add host forwarding test

Test communication between hosts by setting up two syslogd instances,
each binded to their own addresses, and sending a message from one to
the other. The tests passes if the message was delivered and logged
successfully.

This required some tweaking to the syslogd start and stop routines so
they could handle launching multiple syslogd instances with different
runtime files.

Run the tests in jails with an isolated VNET so they don't fail due to
an address bind collision in the host's VNET.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D47649
DeltaFile
+106-19usr.sbin/syslogd/tests/syslogd_test.sh
+4-0usr.sbin/syslogd/tests/Makefile
+110-192 files

FreeBSD/src 4ecbee2usr.sbin/syslogd syslogd.c syslogd_cap_config.c

syslogd: Open forwarding socket descriptors

Previously, when forwarding a message to a remote address, the target's
addrinfo was saved at config-parse-time. When message-deliver-time came,
the message's addrinfo was passed into sendmsg(2) and delivered by the
first available inet socket.

Passing an addrinfo into sendmsg(2) is prohibited in Capsicum capability
mode, so sockets are now opened and connected to their remote peers at
config-parse-time when executing outside of the capability sandbox.

These connected socket descriptors are saved and passed into sendmsg(2),
allowing forwarding to be performed inside of the capability sandbox.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D47104
DeltaFile
+99-46usr.sbin/syslogd/syslogd.c
+14-21usr.sbin/syslogd/syslogd_cap_config.c
+2-1usr.sbin/syslogd/syslogd.h
+115-683 files