FreeBSD/src ec2b6b1lib/libthr/thread thr_syscalls.c thr_private.h

libthr: avoid varargs in fcntl and openat interposers

Align these signatures with the ones in syscalls.master (and thus
libsys.h).  There's no reason to do va_args twice and in some ABIs
(e.g,, CheriABI) you can't access fixed arguments as varargs if you
weren't called with varargs signature.

Reviewed by:    imp, kib, jhibbits
Obtained from:  CheriBSD
Differential Revision:  https://reviews.freebsd.org/D45126
DeltaFile
+5-20lib/libthr/thread/thr_syscalls.c
+2-2lib/libthr/thread/thr_private.h
+7-222 files

FreeBSD/src 7b65987sys/sys sdt.h

sdt: Add macros which expand to probe and provider structure names

No functional change intended.

MFC after:      1 week

(cherry picked from commit 4afce4473db4f51acd034333b8506294b4fb61e6)
DeltaFile
+21-16sys/sys/sdt.h
+21-161 files

FreeBSD/src f4ab464sys/netgraph ng_pipe.c

ng_pipe: Replace deprecated random() with prng32_bounded()

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

MFC after:      2 weeks
Reviewed by:    markj
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit a3ecf8c7863683e53c77a17f96ab7012352265b9)
DeltaFile
+3-2sys/netgraph/ng_pipe.c
+3-21 files

FreeBSD/src a3ca254sys/netgraph ng_pipe.c

ng_pipe: Remove node when all hooks are disconnected

This is the behavior described in the man page.

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

Discussed with: glebius
Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit bb2ab7a374b9d81f8368acc506c9700af20a22d6)
DeltaFile
+7-0sys/netgraph/ng_pipe.c
+7-01 files

FreeBSD/src a709ac6sys/netgraph ng_pipe.c

ng_pipe: Fix whitespace

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit 8512311fb5004444f43701eb122b6d77c76d7564)
DeltaFile
+8-8sys/netgraph/ng_pipe.c
+8-81 files

FreeBSD/src f55be6dcontrib/netbsd-tests/fs/tmpfs t_times.sh

tmpfs tests: Remove an xfail annotation

This test passes after commit 08f3d5b60cdf ("copy_file_range: Call
vn_rdwr() at least once").

PR:             274615
MFC after:      1 month

(cherry picked from commit 8eb21b4ff0082a707517f805cf14616f91d9218e)
DeltaFile
+0-2contrib/netbsd-tests/fs/tmpfs/t_times.sh
+0-21 files

FreeBSD/src 50af25esys/netgraph ng_pipe.c

ng_pipe: Do not panic when memory allocations fail

Signed-off-by: Martin Vahlensieck <git at academicsolutions.ch>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1181

(cherry picked from commit d44c78074d8738db67a2fa6bf07b630c61eee6ab)
DeltaFile
+30-15sys/netgraph/ng_pipe.c
+30-151 files

FreeBSD/src e3b27ccsys/kern vfs_vnops.c

copy_file_range: Call vn_rdwr() at least once

This ensures that we invoke VOP_READ on the input file even if it's
empty, which in turn helps ensure that filesystems update the atime of
the file.

PR:             274615
Reviewed by:    olce, rmacklem, kib
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D43524

(cherry picked from commit 08f3d5b60cdfff434e391d96cdffc5a90c550b07)
DeltaFile
+12-4sys/kern/vfs_vnops.c
+12-41 files

FreeBSD/src 95cb702sys/arm/include armreg.h

arm: Remove duplicate definitions in armreg.h

No functional change intended.

MFC after:      1 week

(cherry picked from commit 4a5e2ddbd8943baf7add831ab835594ac60f94d1)
DeltaFile
+0-2sys/arm/include/armreg.h
+0-21 files

FreeBSD/src 3f6515csys/dev/iicbus if_ic.c, sys/dev/wg if_wg.c

bpf: Make BPF interop consistent with if_loop

The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:             256587
Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/876

(cherry picked from commit 2cb0fce24d64039090dc9243cdf0715ee80c91b1)
DeltaFile
+2-2sys/dev/iicbus/if_ic.c
+2-1sys/net/if_gre.c
+2-1sys/dev/wg/if_wg.c
+2-1sys/net/if_gif.c
+2-1sys/net/if_me.c
+1-1sys/netgraph/ng_iface.c
+11-72 files not shown
+13-98 files

FreeBSD/src ebc5b3busr.bin/ctags C.c ctags.c

ctags: Use C99 bool instead of defining our own

Use stdbool.h definitions instead of defining non-standard ones.

Signed-off-by: Collin Funk <collin.funk1 at gmail.com>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1107

(cherry picked from commit 87b0195ace1a71a1a07244890be3aaef72e1ffcd)
DeltaFile
+38-38usr.bin/ctags/C.c
+11-11usr.bin/ctags/ctags.c
+6-6usr.bin/ctags/fortran.c
+5-6usr.bin/ctags/ctags.h
+5-5usr.bin/ctags/yacc.c
+4-4usr.bin/ctags/lisp.c
+69-701 files not shown
+70-717 files

FreeBSD/src 2a9aae9sys/netinet tcp_output.c tcp_var.h, usr.bin/netstat inet.c

tcp: add counter to track when SACK loss recovery uses TSO

Add a counter to track how frequently SACK has transmitted
more than one MSS using TSO. Instances when this will be
beneficial is the use of PRR, or when ACK thinning due to
GRO/LRO or ACK discards by the network are present.

Reviewed By:            tuexen, #transport
Sponsored by:           NetApp, Inc.
Differential Revision:  https://reviews.freebsd.org/D45070
DeltaFile
+5-3usr.bin/netstat/inet.c
+3-0sys/netinet/tcp_output.c
+2-1sys/netinet/tcp_var.h
+1-0sys/netinet/in_kdtrace.c
+1-0sys/netinet/in_kdtrace.h
+12-45 files

FreeBSD/src dcdfe44sys/netinet tcp_sack.c tcp_output.c

tcp: add sysctl to allow/disallow TSO during SACK loss recovery

Introduce net.inet.tcp.sack.tso for future use when TSO is ready
to be used during loss recovery.

Reviewed By:            tuexen, #transport
Sponsored by:           NetApp, Inc.
Differential Revision:  https://reviews.freebsd.org/D45068
DeltaFile
+5-0sys/netinet/tcp_sack.c
+1-1sys/netinet/tcp_output.c
+2-0sys/netinet/tcp_var.h
+8-13 files

FreeBSD/src cbf3575sys/netinet tcp_sack.c

tcp: filter small SACK blocks

While the SACK Scoreboard in the base stack limits
the number of holes by default to only 128 per connection
in order to prevent CPU load attacks by splitting SACKs,
filtering out SACK blocks of unusually small size can
further improve the actual processing of SACK loss recovery.

Reviewed By:            tuexen, #transport
Sponsored by:           NetApp, Inc.
Differential Revision:  https://reviews.freebsd.org/D45075
DeltaFile
+4-1sys/netinet/tcp_sack.c
+4-11 files

FreeBSD/src 301ec2csys/netpfil/pf pf.c

pf: always mark states as unlinked before detaching them

Users have reported crashes in pf_test_state_udp() where at least one state key
is NULL.

That suggests that pf_detach_state() ran concurrently with pf_test_state_udp().
pf_test_state_udp() holds the state lock (aka the id lock), but
pf_detach_state() does not.
The intent is that detached states are not returned by STATE_LOOKUP/
pf_find_state(), as the state's timeout is set to PFTM_UNLINKED and thus
pf_find_state() does not find the state.

There are other paths to pf_detach_state() (outside of pf_unlink_state())
though, where we did not set the timeout to PFTM_UNLINKED. Fix those, and assert
that the timeout is set correctly when we enter pf_detach_state().

MFC after:      1 week
See also:       https://redmine.pfsense.org/issues/15413
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D45101
DeltaFile
+3-0sys/netpfil/pf/pf.c
+3-01 files

FreeBSD/src 601438fsys/netinet ip_carp.c

carp: refactor packet tagging for ether_output()

- Separate HMAC preparation (CARP specific) from tagging.
- In unicast mode (CARP specific) don't put tag at all.
- Don't put pointer to software context into the tag.  Putting just vhid,
  an integer value, is a safer design.

Reviewed by:    kp
Differential Revision:  https://reviews.freebsd.org/D45038
DeltaFile
+14-23sys/netinet/ip_carp.c
+14-231 files

FreeBSD/src a254d68sys/netinet ip_carp.c

carp: isolate VRRP from CARP

There is only one functional change here - we don't allow SIOCSVH (or
netlink request) to change sc->sc_version.  I'm convinced that allowing
such a change doesn't brings any practical value, but creates enless
minefields in front of both developers and end users (sysadmins).  If
you want to switch from VRRP to CARP or vice versa, you'd need to recreate
the VHID.

Oh, one tiny funtional change: carp_ioctl_set() won't modify any fields
if it returns EINVAL.  Previously you could provide valid advbase with
invalid advskew - that used to modify advbase and return EINVAL.

All other changes is a sweep around not ever using CARP fields when
we are in VRRP mode and vice versa.  Also adding assertions on sc_version
where necessary.

Do not send VRRP vars in CARP mode via NetLink and vice versa.  However
in compat ioctl SIOCGVH for VRRP mode the CARP fields would be zeroes.

    [6 lines not shown]
DeltaFile
+199-159sys/netinet/ip_carp.c
+199-1591 files

FreeBSD/src cda57d9sys/netinet ip_carp.c

carp: assert that we are calling correct input function. We are.

Reviewed by:    kp
Differential Revision:  https://reviews.freebsd.org/D45037
DeltaFile
+4-3sys/netinet/ip_carp.c
+4-31 files

FreeBSD/src 5ee92cbsys/netinet ip_carp.c

carp: don't chain call vrrp_send_ad via carp_send_ad

Provide inline send_ad_locked() that switches between protocol
specific sending function.

Rename carp_send_ad() to carp_callout() to avoid getting lost in
all these multiple foo_send_ad.

No functional change intended.

Reviewed by:    kp
Differential Revision:  https://reviews.freebsd.org/D45036
DeltaFile
+22-14sys/netinet/ip_carp.c
+22-141 files

FreeBSD/src 0d446a4sbin/ifconfig ifconfig.8, share/man/man4 carp.4

carp: document the new VRRPv3 support

Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44776
DeltaFile
+15-1sbin/ifconfig/ifconfig.8
+12-1share/man/man4/carp.4
+27-22 files

FreeBSD/src 5311e73tests/sys/netinet carp.sh carp.py

netinet tests: basic VRRP tests

Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44775
DeltaFile
+97-1tests/sys/netinet/carp.sh
+14-0tests/sys/netinet/carp.py
+111-12 files

FreeBSD/src 3711515lib/libifconfig libifconfig_carp.c libifconfig.h, sbin/ifconfig carp.c

carp: support VRRPv3

Allow carp(4) to use the VRRPv3 protocol (RFC 5798). We can distinguish carp and
VRRP based on the protocol version number (carp is 2, VRRPv3 is 3), and support
both from the carp(4) code.

Reviewed by:    glebius
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44774
DeltaFile
+568-86sys/netinet/ip_carp.c
+57-11sbin/ifconfig/carp.c
+51-4sys/netinet/ip_carp.h
+6-0lib/libifconfig/libifconfig_carp.c
+3-0lib/libifconfig/libifconfig.h
+3-0sys/netinet/ip_carp_nl.h
+688-1016 files

FreeBSD/src 3fe25a9sys/dev/mii rgephy.c miidevs

mii: Add support for Realtek RTL8211F-VD PHY

The RTL8211F-VD is a replacement/upgrade for the RTL8211F. Based on
https://github.com/torvalds/linux/commit/bb726b753f75a4eeda291438f89dfd9b94783569,
the only difference is the lack of the PCR2 register, which FreeBSD
doesn't use.

This fixes autonegotiation problems using the RTL8211F with ukphy(4).
Reviewed by:    manu, bz
MFC after:      1 month
Differential Revision:  <https://reviews.freebsd.org/D45109
DeltaFile
+4-2sys/dev/mii/rgephy.c
+1-0sys/dev/mii/miidevs
+1-0sys/dev/mii/rgephyreg.h
+6-23 files

FreeBSD/src b54d4a1sys/modules/dtb/rockchip Makefile

dtb: rockchip: Add Radxa ROCK 4C Plus to the build.

The ROCK 4C Plus is a cost-reduced variant of the ROCK Pi 4 based on
the RockChip RK3399-T.

Reviewed by:    manu
MFC after:      1 week
Differential Revision:  <https://reviews.freebsd.org/D45110
DeltaFile
+1-0sys/modules/dtb/rockchip/Makefile
+1-01 files

FreeBSD/src 3c1f3cfrelease Makefile.mirrors

release: Stage non-UFS images in vm-images-stage

When the VM image building code was updated to support building
non-UFS images, the vm-images-stage target was not updated to
install those newly built images to the FTP site.  As a result, we
have been sending weekly snapshot announcements since August claiming
that ZFS VM images are available when they are not in fact present
anywhere publicly accessible.

Fixes:  32ae9a6b3937 "release: Build UFS and ZFS VM images"
Reported by:    Michael Dexter
MFC after:      5 days

(cherry picked from commit f4b08097d8e274e1a8526d864c31462ea42d9e9f)
DeltaFile
+14-0release/Makefile.mirrors
+14-01 files

FreeBSD/src 54bbcc0. ObsoleteFiles.inc

ObsoleteFiles.inc: Remove /var/db/portsnap

This is a followup to commit "Remove remnants of portsnap(8)"
(9b30b96c1fa4).  I wasn't aware of OLD_DIRS.

Approved by:            markj (mentor)
MFC after:              1 day
MFC with:               9b30b96c1fa4
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45023
DeltaFile
+3-0ObsoleteFiles.inc
+3-01 files

FreeBSD/src a803837sys/arm64/arm64 pmap.c

arm64 pmap: Add ATTR_CONTIGUOUS support [Part 3]

Introduce L3C promotion of base page mappings.  When the base page size
is 4KB, use ATTR_CONTIGUOUS to promote 16 aligned, contiguous base page
mappings to a 64KB mapping.  Alternatively, when the base page size is
16KB, use ATTR_CONTIGUOUS to promote 128 aligned, contiguous base page
mappings to a 2MB mapping.

Given the frequency of L3C counter updates, switch to per-CPU counters
to avoid cache line ping ponging.

Revise the L3C counter descriptions to reflect the fact that the size
of an L3C mapping varies depending on the base page size.

Co-authored-by: Eliot Solomon <ehs3 at rice.edu>
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D44983
DeltaFile
+154-14sys/arm64/arm64/pmap.c
+154-141 files

FreeBSD/src f696311sys/netinet6 in6_rmx.c

in6_rmx: remove unnecessary socketvar.h
DeltaFile
+0-1sys/netinet6/in6_rmx.c
+0-11 files

FreeBSD/src b6b4ac2sys/netinet tcp_hostcache.c

tcp_hostcache: remove unnecessary socketvar.h
DeltaFile
+0-1sys/netinet/tcp_hostcache.c
+0-11 files

FreeBSD/src b925d71sys/netinet6 icmp6.c, sys/sys protosw.h

sockets: garbage collect PRCOREQUESTS and stale comment

The code deleted predates FreeBSD history.  The comment deleted is 99%
outdated.  Why KAME decided to use these constants instead of normal ones
also lost in centuries.
DeltaFile
+0-24sys/sys/protosw.h
+2-2sys/netinet6/icmp6.c
+2-262 files