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

FreeBSD/src c870340sbin/nvmecontrol fabrics.c

nvmecontrol: Fix a sign compare mismatch

Even though mqes (uint16_t) and queue_size (u_int) are both unsigned,
the expression 'mqes + 1' gets promoted to int which is signed.  Keep
the value unsigned by explicitly promoting mqes to u_int before
incrementing the value.

Reported by:    GCC
DeltaFile
+2-2sbin/nvmecontrol/fabrics.c
+2-21 files

FreeBSD/src 29d7e39sys/dev/nvme nvme.h

nvme: Bump the alignment of struct nvme_health_information_page to 8

This ensures that embedded uint64_t values used for statistics
counters are aligned when allocating a structure on the stack or as
part of a containing structure.  In particular this quiets
-Waddress-of-packed-member warnings from GCC when compiling the code
in nvmfd to update the stats.

Reported by:    GCC
DeltaFile
+1-1sys/dev/nvme/nvme.h
+1-11 files

FreeBSD/src 766c4adcddl/lib/libzpool Makefile

libzpool: Disable -Wpointer-to-int-cast warnings for GCC

This warning is already disabled for zfs.ko.
DeltaFile
+2-0cddl/lib/libzpool/Makefile
+2-01 files

FreeBSD/src 6ca0468lib/libcbor Makefile

libcbor: Ignore errors for unknown #pragmas

libcbor embeds clang-specific #pragmas that GCC then warns about.

Reviewed by:    emaste
DeltaFile
+1-0lib/libcbor/Makefile
+1-01 files

FreeBSD/src 6102863lib/clang/include/llvm/Config llvm-config.h AsmPrinters.def

lib/clang: clean out old llvm/clang Sparc target remnants

The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.

PR:             276104
Approved by:    re (cperciva)
MFC after:      3 days

(cherry picked from commit 6f444019009a55aac18d18054d154155fbf606c9)
(cherry picked from commit 0b8cdac883f5028c8716aa7442c07c68ac1f780b)
DeltaFile
+0-4lib/clang/include/llvm/Config/llvm-config.h
+0-3lib/clang/include/llvm/Config/AsmPrinters.def
+0-3lib/clang/include/llvm/Config/AsmParsers.def
+0-3lib/clang/include/llvm/Config/Disassemblers.def
+0-3lib/clang/include/llvm/Config/Targets.def
+0-165 files

FreeBSD/src 8210cd3lib/clang/include VCSVersion.inc, lib/clang/include/clang/Basic Version.inc

Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

Update version numbers, config headers, etc. Git tricked me into losing
these before pushing.

PR:             276104
Approved by:    re (cperciva)
Fixes:          d67fc74b9249
MFC after:      3 days

(cherry picked from commit 894cb08f0d3656fdb81f4d89085bedc4235f3cb6)
(cherry picked from commit a17c251dd68567d879bb80e62f9828abb3967c64)
DeltaFile
+3-3lib/clang/include/clang/Basic/Version.inc
+3-3lib/clang/include/VCSVersion.inc
+3-3lib/clang/include/lldb/Version/Version.inc
+2-2lib/clang/include/llvm/Config/config.h
+2-2lib/clang/include/llvm/Config/llvm-config.h
+1-1lib/clang/include/llvm/Support/VCSRevision.h
+14-141 files not shown
+15-157 files

FreeBSD/src 90a5e98contrib/llvm-project/clang/lib/CodeGen CGObjCGNU.cpp CGBuiltin.cpp, contrib/llvm-project/clang/lib/Format UnwrappedLineParser.cpp

Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9.

PR:             276104
Approved by:    re (cperciva)
MFC after:      3 days

(cherry picked from commit 5678d1d98a348f315453555377ccb28821a2ffcd)
(cherry picked from commit fe72d8ecb98dd51a9faf62b1e14d4dde25d61e5b)
DeltaFile
+28-20contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+23-17contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
+20-14contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp
+16-13contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
+14-11contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
+16-4contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+117-7921 files not shown
+200-12827 files

FreeBSD/src e5e6242lib/clang/include/llvm/Config llvm-config.h AsmPrinters.def

lib/clang: clean out old llvm/clang Sparc target remnants

The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.

PR:             276104
MFC after:      3 days

(cherry picked from commit 6f444019009a55aac18d18054d154155fbf606c9)
DeltaFile
+0-4lib/clang/include/llvm/Config/llvm-config.h
+0-3lib/clang/include/llvm/Config/AsmPrinters.def
+0-3lib/clang/include/llvm/Config/Disassemblers.def
+0-3lib/clang/include/llvm/Config/Targets.def
+0-3lib/clang/include/llvm/Config/AsmParsers.def
+0-165 files

FreeBSD/src 3c6fe83lib/clang/include VCSVersion.inc, lib/clang/include/clang/Basic Version.inc

Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

Update version numbers, config headers, etc. Git tricked me into losing
these before pushing.

PR:             276104
Fixes:          d67fc74b9249
MFC after:      3 days

(cherry picked from commit 894cb08f0d3656fdb81f4d89085bedc4235f3cb6)
DeltaFile
+3-3lib/clang/include/lldb/Version/Version.inc
+3-3lib/clang/include/clang/Basic/Version.inc
+3-3lib/clang/include/VCSVersion.inc
+2-2lib/clang/include/llvm/Config/config.h
+2-2lib/clang/include/llvm/Config/llvm-config.h
+1-1lib/clang/include/llvm/Support/VCSRevision.h
+14-141 files not shown
+15-157 files

FreeBSD/src 67df63fcontrib/llvm-project/clang/lib/CodeGen CGObjCGNU.cpp CGBuiltin.cpp, contrib/llvm-project/clang/lib/Format UnwrappedLineParser.cpp

Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9.

PR:             276104
MFC after:      3 days

(cherry picked from commit 5678d1d98a348f315453555377ccb28821a2ffcd)
DeltaFile
+28-20contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+23-17contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
+20-14contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp
+16-13contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
+14-11contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
+16-4contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+117-7921 files not shown
+200-12827 files

FreeBSD/src 0b8cdaclib/clang/include/llvm/Config llvm-config.h AsmPrinters.def

lib/clang: clean out old llvm/clang Sparc target remnants

The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.

PR:             276104
MFC after:      3 days

(cherry picked from commit 6f444019009a55aac18d18054d154155fbf606c9)
DeltaFile
+0-4lib/clang/include/llvm/Config/llvm-config.h
+0-3lib/clang/include/llvm/Config/AsmPrinters.def
+0-3lib/clang/include/llvm/Config/AsmParsers.def
+0-3lib/clang/include/llvm/Config/Disassemblers.def
+0-3lib/clang/include/llvm/Config/Targets.def
+0-165 files

FreeBSD/src a17c251lib/clang/include VCSVersion.inc, lib/clang/include/clang/Basic Version.inc

Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

Update version numbers, config headers, etc. Git tricked me into losing
these before pushing.

PR:             276104
Fixes:          d67fc74b9249
MFC after:      3 days

(cherry picked from commit 894cb08f0d3656fdb81f4d89085bedc4235f3cb6)
DeltaFile
+3-3lib/clang/include/clang/Basic/Version.inc
+3-3lib/clang/include/VCSVersion.inc
+3-3lib/clang/include/lldb/Version/Version.inc
+2-2lib/clang/include/llvm/Config/config.h
+2-2lib/clang/include/llvm/Config/llvm-config.h
+1-1lib/clang/include/llvm/Support/VCSRevision.h
+14-141 files not shown
+15-157 files

FreeBSD/src fe72d8econtrib/llvm-project/clang/lib/CodeGen CGObjCGNU.cpp CGBuiltin.cpp, contrib/llvm-project/clang/lib/Format UnwrappedLineParser.cpp

Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9.

PR:             276104
MFC after:      3 days

(cherry picked from commit 5678d1d98a348f315453555377ccb28821a2ffcd)
DeltaFile
+28-20contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+23-17contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
+20-14contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp
+16-13contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
+14-11contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
+16-4contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+117-7921 files not shown
+200-12827 files

FreeBSD/src 0612538sys/dev/clk/starfive jh7110_clk_pll.c jh7110_clk.c

jh7110: Add StarFive JH7110 clock/reset generator drivers

Implement a core clknode driver for the JH7110 (StarFive VisionFive v2)
platform.

Add clock/reset generator drivers for the PLL, SYS, and AON clock
groupings.

Co-authored-by: mhorne
Reviewed by:    mhorne
Sponsored by:   The FreeBSD Foundation (mhorne's contributions)
Differential Revision:  https://reviews.freebsd.org/D43037
DeltaFile
+386-0sys/dev/clk/starfive/jh7110_clk_pll.c
+277-0sys/dev/clk/starfive/jh7110_clk.c
+261-0sys/dev/clk/starfive/jh7110_clk_sys.c
+211-0sys/dev/clk/starfive/jh7110_clk_pll.h
+168-0sys/dev/clk/starfive/jh7110_clk_aon.c
+72-0sys/dev/clk/starfive/jh7110_clk.h
+1,375-01 files not shown
+1,379-07 files