FreeBSD/src a2eb089. UPDATING, sys/netinet6 nd6_rtr.c

sys/netinet6: switch net.inet6.ip6.use_stableaddr to on by default

This change switches to using RFC 7217 algorithm as the default to
generate SLAAC addresses for IPv6 interfaces configured with
accept_rtadv.

Reviewed by:            pouria, glebius, zlei
Approved by:            zlei
Relnotes:               yes
Differential Revision:  https://reviews.freebsd.org/D55138
DeltaFile
+9-0UPDATING
+1-1sys/netinet6/nd6_rtr.c
+10-12 files

FreeBSD/src 302120bsys/amd64/conf SYZKALLER

amd64/conf: Remove a config committed by accident

Reported by:    kib, kp
Fixes:          350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails")

(cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e)
DeltaFile
+0-5sys/amd64/conf/SYZKALLER
+0-51 files

FreeBSD/src 3b0f13csys/amd64/conf SYZKALLER

amd64/conf: Remove a config committed by accident

Reported by:    kib, kp
Fixes:          350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails")

(cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e)
DeltaFile
+0-5sys/amd64/conf/SYZKALLER
+0-51 files

FreeBSD/src e912723sbin/ifconfig ifconfig.8

ifconfig.8: Start new sentence on new line

This change was forgotten by me in the previous commit to this file.

Reported by:    kib
Approved by:    implicit (change omitted from previous commit)
Fixes:          31ec8b6407fdd5a87d70265762457c67ce618283
DeltaFile
+2-1sbin/ifconfig/ifconfig.8
+2-11 files

FreeBSD/src 1c9ca4c. ObsoleteFiles.inc

ObsoleteFiles.inc: remove stale allwinner pages

These were moved out of man/man4/arm into man/man4. Add entries to catch
the stale copies.

Fixes:  15c79c6fa608 ("man4: move allwinner pages and logic to a standard place")
DeltaFile
+8-0ObsoleteFiles.inc
+8-01 files

FreeBSD/src 9c800a1. ObsoleteFiles.inc

ObsoleteFiles.inc: correct entry for zpfind.9.gz

It needs the .gz suffix.

Fixes:  2ace05b65a2c9 ("pfind(9): follow-up fixes and improvements")
DeltaFile
+1-1ObsoleteFiles.inc
+1-11 files

FreeBSD/src 4a7d42fsys/riscv/include cpufunc.h, sys/riscv/vmm vmm_riscv.c

riscv: Add macro for hfence.gvma instruction

Add an inline function hfence_gvma() for hfence.gvma instruction.

Signed-off-by:  Doongar Singh <doonbsd at gmail.com>
Reviewed by:    mhorne, markj
Differential Revision:  https://reviews.freebsd.org/D54857

(cherry picked from commit 972c488bf4117d9eb29e5753c6c5a2250154df3d)
DeltaFile
+7-0sys/riscv/include/cpufunc.h
+1-1sys/riscv/vmm/vmm_riscv.c
+8-12 files

FreeBSD/src db0c875sys/riscv/riscv pmap.c

riscv: smarter DMAP construction (again)

Extend pmap_bootstrap_dmap() to build the DMAP with 4K-page granularity.

Recently we have been approximating it with 2MB mappings. The motivation
again is the problematic FU540 hardware, which seems to require more
accurate mappings still to avoid triggering its PMP errata.

Although this hardware alone is of little consequence, constructing the
DMAP accurately/correctly may help avoid future surprises.

The implementation contains some repetitive code. This could be
expressed differently, but my guiding principle for these early routines
is that being simple and explicit about what we are doing makes them
easier to comprehend.

See also 762a3224cde6 ("riscv: smarter DMAP construction).

Tested by:      Klaus Küchemann <maciphone2 at googlemail.com>

    [5 lines not shown]
DeltaFile
+83-15sys/riscv/riscv/pmap.c
+83-151 files

FreeBSD/src b9d3945sys/dev/ahci ahci_pci.c

ahci: Restrict NVMe redirection by BAR size

Attempts to access vendor-specific registers on emulator of older
Intel hardware was reported to confuse one.  Since the redirection
obviously require BAR size bigger than normal 2KB of AHCI, add
the condition, similar to what Linux is doing.

Requested by:   kib
MFC after:      2 weeks
DeltaFile
+2-1sys/dev/ahci/ahci_pci.c
+2-11 files

FreeBSD/src 87632ddsys/contrib/openzfs/include/os/freebsd/spl/sys types32.h, sys/contrib/openzfs/lib/libspl/include/sys types32.h

openzfs sys/types32.h: use abi_compat.h for time32_t

The time32_t typedef leaks into openzfs compilation environment
through sys/event.h.  Simultaneously, openzfs provides its own
definition that is only correct for amd64 on FreeBSD.

Try to fix it by using sys/abi_compat.h directly.  Since toolchain build
from the make buildworld uses host abi_compat.h, add a preprocessor
symbol __HAVE_TIME32_T to signal consumers that time32_t is typedef'ed.
If not defined, fall back to old and wrong time32_t, which is enough for
bootstraping toolchain.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+6-1sys/sys/abi_compat.h
+5-0sys/contrib/openzfs/lib/libspl/include/sys/types32.h
+2-1sys/contrib/openzfs/include/os/freebsd/spl/sys/types32.h
+13-23 files

FreeBSD/src ec6cf0csys/sys user.h

sys/user.h: remove XXXSKE markers

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+3-3sys/sys/user.h
+3-31 files

FreeBSD/src 154778esys/compat/freebsd32 freebsd32.h, sys/kern kern_proc.c

sys/compat/freebsd32: ki_pd is missing from struct kinfo_proc32

This is missed by the sizeof(struct kinfo_proc32) assert due to another
bug: namely, the use of uint64_t type that has different alignment on
i386 than on amd64 host.

Fixes:  85078b8573332c2c83a79adea8a61b519fb3b6af
Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+1-0sys/kern/kern_proc.c
+1-0sys/compat/freebsd32/freebsd32.h
+2-02 files

FreeBSD/src c3a04a9sys/sys abi_compat.h

sys/abi_compat.h: normalize include guard name

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+3-3sys/sys/abi_compat.h
+3-31 files

FreeBSD/src 3dc7210sys/compat/freebsd32 freebsd32_misc.c freebsd32.h

sys/compat/freebsd32: use freebsd32_uint64_t for struct ffclock_estimate32

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+2-2sys/compat/freebsd32/freebsd32_misc.c
+1-1sys/compat/freebsd32/freebsd32.h
+3-32 files

FreeBSD/src beee894sys/compat/freebsd32 freebsd32.h freebsd32_misc.c

sys/compat/freebsd32: use freebsd32_uint64_t for several struct stat's

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+5-5sys/compat/freebsd32/freebsd32.h
+4-4sys/compat/freebsd32/freebsd32_misc.c
+9-92 files

FreeBSD/src 485e916sys/compat/freebsd32 freebsd32_misc.c freebsd32.h

sys/compat/freebsd32: use freebsd32_uint64_t for struct kinfo_knote32

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+3-28sys/compat/freebsd32/freebsd32_misc.c
+3-3sys/compat/freebsd32/freebsd32.h
+6-312 files

FreeBSD/src 9ce0c19sys/sys abi_compat.h

sys/abi_compat.h: add Foundation copyright for uint64_t stuff

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+5-0sys/sys/abi_compat.h
+5-01 files

FreeBSD/src 31fab77sys/compat/freebsd32 freebsd32.h, sys/kern kern_proc.c

sys/compat/freebsd32: use freebsd32_uint64_t for struct kinfo_proc32

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+2-2sys/compat/freebsd32/freebsd32.h
+2-2sys/kern/kern_proc.c
+4-42 files

FreeBSD/src ad63940sys/compat/freebsd32 freebsd32_misc.c, sys/sys event.h

sys/event.h: use freebsd32_uint64_t for kevent32 64bit members

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+6-32sys/compat/freebsd32/freebsd32_misc.c
+4-2sys/sys/event.h
+1-5usr.bin/kdump/kdump.c
+11-393 files

FreeBSD/src e651c64sys/compat/freebsd32 freebsd32.h, sys/dev/mfi mfi.c

sys/abi_compat.h: move freebsd32_uint64_t and FU64_CP() there

Use private names for uintXX_t types.
Remove conflicting (but equal) PTR_IN() definition from dev/mfi.c.

Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55135
DeltaFile
+21-1sys/sys/abi_compat.h
+0-18sys/compat/freebsd32/freebsd32.h
+0-2sys/dev/mfi/mfi.c
+21-213 files

FreeBSD/src 24038d6sys/amd64/include pcb.h, sys/arm/include pcb.h

Revert "pcb.h: mark struct pcb to be preserved"

kgdb only uses the marked fields from dumppcb for initial frame
reconstruction.

This reverts commit 8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3.
DeltaFile
+10-11sys/amd64/include/pcb.h
+8-9sys/i386/include/pcb.h
+0-5sys/arm64/include/pcb.h
+0-5sys/powerpc/include/pcb.h
+0-5sys/riscv/include/pcb.h
+0-4sys/arm/include/pcb.h
+18-396 files

FreeBSD/src 8066b89sys/compat/linux linux_file.c, sys/kern vfs_mount.c

kern/vfs_unmount.c: promote flags to uint64_t

to prevent sign-extension, causing unexpected flags to be passed to
dounmount().  The mnt_flags and MNT_* constants are 64bit wide.

Suggested and reviewed by:      jah
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55197
DeltaFile
+2-2sys/kern/vfs_mount.c
+1-1sys/compat/linux/linux_file.c
+1-1sys/sys/syscallsubr.h
+4-43 files

FreeBSD/src 997bfa2. RELNOTES

RELNOTES: Add some entries for recent commits

Reviewed by:    olce, jhb
Differential Revision:  https://reviews.freebsd.org/D55150
DeltaFile
+41-0RELNOTES
+41-01 files

FreeBSD/src c997713tests/sys/kern unix_passfd_test.c Makefile

unix/tests: Add a regression test for fd transfer across jails

MFC after:      3 weeks

(cherry picked from commit 5843b8ee02e99527c28f579acfc1f48e10033529)
DeltaFile
+132-2tests/sys/kern/unix_passfd_test.c
+1-0tests/sys/kern/Makefile
+133-22 files

FreeBSD/src c8dad68tests/sys/netpfil/pf divert-to.sh

pf tests: Set require.kmods in divert-to tests

Tests should declare their dependencies rather than testing for them at
runtime.

Reviewed by:    igoro, kp, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54846

(cherry picked from commit 8934c3dc780d6631cb23e4d98c7b988da9a5b703)
DeltaFile
+8-23tests/sys/netpfil/pf/divert-to.sh
+8-231 files

FreeBSD/src 2ca0b72sys/arm64/vmm vmm_mmu.c

arm64/vmm: Simplify vmmpmap_remove()

This function handles invalid intermediate PTP entries, but there's no
reason for this: the passed range should be mapped.  In particular, we
assert that all L3 entries encountered are mapped.  So let's simplify
the code a bit.  No functional change intended.

Reviewed by:    andrew
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54738

(cherry picked from commit 31e5decb18a6633f5137848b5734310b41fc3bdc)
DeltaFile
+6-21sys/arm64/vmm/vmm_mmu.c
+6-211 files

FreeBSD/src 4775399sys/netpfil/pf pf.c

pf: Rationalize the ip_divert_ptr test

If a rule has a divert port set, then we can reasonably predict that
ipdivert.ko is loaded, and in particular that ip_divert_ptr is set.

Moreover, in this case, if ipdivert.ko is not loaded we should just drop
the packet instead of ignoring the divert rule.

Reviewed by:    igoro, kp, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54845

(cherry picked from commit 39878d24a690feb4da3fc223649c6a5fd166d09d)
DeltaFile
+10-5sys/netpfil/pf/pf.c
+10-51 files

FreeBSD/src 7855f83tests/sys/netinet6 test_ip6_output.py

ip6_output tests: Remove an unused import

No functional change intended.

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

(cherry picked from commit 1539a657adb4363e7f12d6fd4c1c8ed2e2d842af)
DeltaFile
+0-1tests/sys/netinet6/test_ip6_output.py
+0-11 files

FreeBSD/src 10b4ff3sys/netinet6 ip6_mroute.c

ip6_mroute: Remove unnecessary casts

No functional change intended.

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

(cherry picked from commit 56e1cba88bb82f2a6af0212c72182ff6303a1554)
DeltaFile
+3-4sys/netinet6/ip6_mroute.c
+3-41 files

FreeBSD/src 0e67516usr.sbin/syslogd/tests syslogd_test_common.sh syslogd_test.sh

syslogd/tests: Fix flakiness in forwarding tests

syslogd_start() waits for the local log socket to appear before
returning, to ensure that the daemon is ready to handle log messages.
Some tests start two daemons, so by default the socket already exists
when the second daemon is started, so syslogd_start() returns early.
The test subsequently sends a message to this second daemon, which
sometimes isn't ready.

Define a separate log socket for the second daemon.  Add a check to
syslogd_start() to help catch this type of bug.

Reviewed by:    jlduran
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54800

(cherry picked from commit 14dce731d70686e08ed689729f53c6a5e2225498)
DeltaFile
+7-2usr.sbin/syslogd/tests/syslogd_test_common.sh
+5-3usr.sbin/syslogd/tests/syslogd_test.sh
+12-52 files