FreeBSD/src f60defbsys/conf std.nodebug

conf/std.nodebug: disable DEBUG_LOCKS

(cherry picked from commit 85a04bea5a54d6879c8fbf49eea20aba7ca24692)
DeltaFile
+1-0sys/conf/std.nodebug
+1-01 files

FreeBSD/src fad4e7bsys/kern kern_membarrier.c

membarrier(2): use atomic for lockless read of curproc->p_flag2

(cherry picked from commit 950fd59955e10429c1325c327f0141a7e97fcfe5)
DeltaFile
+7-6sys/kern/kern_membarrier.c
+7-61 files

FreeBSD/src ea8fd84lib/libkvm kvm_proc.c, sys/compat/freebsd32 freebsd32.h

kern/proc: expose reaper PID and subtree root in struct kinfo_proc

PR:     293871

(cherry picked from commit 0f89380a3d208d67698f2d35afd35257e5fdbe09)
DeltaFile
+8-0lib/libkvm/kvm_proc.c
+3-1sys/compat/freebsd32/freebsd32.h
+4-0sys/kern/kern_proc.c
+3-1sys/sys/user.h
+18-24 files

FreeBSD/src b024a8dlib/libsys membarrier.2

membarrier.2: document MEMBARRIER_CMD_GET_REGISTRATIONS

(cherry picked from commit 324b3c2892a53e5fd9b1d8795a31a59ee835c5de)
DeltaFile
+6-0lib/libsys/membarrier.2
+6-01 files

FreeBSD/src 342ce4bsys/kern kern_membarrier.c, sys/sys membarrier.h

membarrier(2): implement the MEMBARRIER_CMD_GET_REGISTRATIONS command

(cherry picked from commit aaa10396a997bafc28ce6551e92563620caf3df4)
DeltaFile
+17-3sys/kern/kern_membarrier.c
+3-0sys/sys/membarrier.h
+20-32 files

FreeBSD/src f7bf9fdsys/netinet tcp_hpts_test.c

tests/tcp_hpts_test: Fix resource leaks

When a KTEST_EQUAL assertion fails, the test function returns, but this
can cause it to leak locks, which can trigger a panic under witness.
Add a variant which causes control flow to jump to a label in case of
failure, and use that to prevent this problem.

Reviewed by:    Nick Banks <nickbanks at netflix.com>, tuexen
MFC after:      1 weeks
Differential Revision:  https://reviews.freebsd.org/D56647
DeltaFile
+22-5sys/netinet/tcp_hpts_test.c
+22-51 files

FreeBSD/src 16ed84dinclude stdbit.h, sys/sys stdint.h

include/stdbit.h: declare size_t, (u)int*_t, and (u)int_least*_t

These are required by ISO/IEC 9899:2024 § 7.18.1 ¶ 1 but were forgotten
in my initial work.

The current approach leaks intptr_t, uintptr_t, intmax_t, and uintmax_t
through <sys/_stdint.h>.  This could be avoided using a more complicated
approach if desired.

PR:             294131
Fixes:          6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64
Reported by:    Collin Funk <collin.funk1 at gmail.com>
Reviewed by:    imp
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56515

(cherry picked from commit c8c9324c94dfd4eeecbcfe4a1d3daa047420d3e5)
DeltaFile
+21-1include/stdbit.h
+3-0sys/sys/stdint.h
+24-12 files

FreeBSD/src 92e5f6esys/x86/x86 ucode_subr.c

x86/ucode: fix gcc uninitialised warning

This fixes the case where selected_size is never set to anything
in the loop.  Whilst here, also set selected_fw to NULL so the case
of "no firmware" correctly sets everything to NULL/0.

```
  --- ucode_subr.o ---
  /workspace/src/sys/x86/x86/ucode_subr.c: In function 'ucode_amd_find':
  /workspace/src/sys/x86/x86/ucode_subr.c:237:25: warning: 'selected_size' may be used uninitialized [-Wmaybe-uninitialized]
    237 |         *selected_sizep = selected_size;
        |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/  workspace/src/sys/x86/x86/ucode_subr.c:105:16: note: 'selected_size' was declared here
    105 |         size_t selected_size;
        |                ^~~~~~~~~~~~~
```

Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D55439
DeltaFile
+2-2sys/x86/x86/ucode_subr.c
+2-21 files

FreeBSD/src 4feeca3usr.bin/tail reverse.c

tail(1): Fix -r (reverse) to work on pseudo filesystems

Pseudo filesystems (e.g., procfs) advertise a zero file size.
Fix reverse() to handle such a case similarly as forward() so
that '-r' works on pseudo filesystems.

Signed-off-by:  Aaron LI <aly at aaronly.me>
Reviewed by:    pouria, Ricardo Branco <rbranco at suse.de>, des
Fixes:          1fb3caee7 ("tail: Do not trust st_size if it equals zero.")
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2080
DeltaFile
+1-1usr.bin/tail/reverse.c
+1-11 files

FreeBSD/src 8a9c94cpackages/bhyve Makefile

packages: make bhyve depend on acpi

bhyve(8) on amd64 needs iasl(8) to run, otherwise it fails with:

  /bin/sh: /usr/sbin/iasl: not found
  bhyve: BASL failed @ build_dsdt:484
      Failed to execute basl_compile(ctx, basl_fwrite_dsdt): Unknown
  error: 32512
  bhyve: BASL failed @ acpi_build:899
      Failed to execute build_dsdt(ctx): Unknown error: 32512
  Assertion failed: (error == 0), function bhyve_init_platform_late, file
  /home/pkgbuild/worktrees/main/usr.sbin/bhyve/amd64/bhyverun_machdep.c,
  line 394.

Register the "acpi" package which provides iasl(8) as a dependency for
bhyve on amd64.

Reviewed by:            markj (previous revision), ivy
Differential Revision:  https://reviews.freebsd.org/D56498
Sponsored by:           The FreeBSD Foundation
DeltaFile
+5-0packages/bhyve/Makefile
+5-01 files

FreeBSD/src 1abfe75tools/build depend-cleanup.sh

depends-cleanup: Fix typos in comment

Fixes:          4dd97955e68d ("libpkgconf: Fix paths")
DeltaFile
+1-1tools/build/depend-cleanup.sh
+1-11 files

FreeBSD/src 4f9f09dsys/compat/linprocfs linprocfs.c

compat/linprocfs: Add some entries to /proc/sys/fs and /proc/sys/kernel

Add following sys/fs entries to linprocfs(4):
* proc/sys/fs/file-max
* proc/sys/fs/file-nr
* proc/sys/fs/nr_open
* proc/sys/fs/overflowuid
* proc/sys/fs/overflowgid
* proc/sys/fs/suid_dumpable
* proc/sys/fs/protected_hardlinks
Also, add /proc/sys/kernel/threads-max

Signed-off-by:  Ricardo Branco <rbranco at suse.de>
PR:             294713
Reviewed by:    markj, pouria
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2159
DeltaFile
+150-0sys/compat/linprocfs/linprocfs.c
+150-01 files

FreeBSD/src b7daab8libexec/rc/rc.d Makefile, packages Makefile.i386 Makefile.powerpc

apm: Only install rc script on i386

The apm(8) rc script only works on i386, but it's installed on all
platforms.  Only install it on i386, which avoids creating a useless
FreeBSD-apm package on other platforms.

While here, build the acpi package on i386.

MFC after:      2 weeks
Reviewed by:    imp
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56629
DeltaFile
+18-0packages/Makefile.i386
+3-3libexec/rc/rc.d/Makefile
+0-6packages/apm/Makefile
+3-0tools/build/mk/OptionalObsoleteFiles.inc
+0-1packages/Makefile.powerpc
+0-1packages/Makefile.arm
+24-112 files not shown
+24-138 files

FreeBSD/src 6e30854usr.sbin/service service.sh

service(8): Replace indentation in usage()

The -d option was indented with spaces instead of tabs, and this broke
formatting.

Before:

-d                Enable debugging of rc.d scripts
-j              Perform actions within the named jail

After:

-d              Enable debugging of rc.d scripts
-j              Perform actions within the named jail

MFC after:      1 week

(cherry picked from commit 554f5aa526266057672740e22af0a75cc32bddd5)
DeltaFile
+1-1usr.sbin/service/service.sh
+1-11 files

FreeBSD/src 4dd9795lib/libpkgconf Makefile, tools/build depend-cleanup.sh

libpkgconf: Fix paths

${LOCALBASE:U} evaluates to exactly the same thing as ${LOCALBASE}.
Presumably what was meant was ${LOCALBASE:U/usr/local}.

Fixes:          b8352da33f34 ("pkgconf: import into the base system")
Reviewed by:    khorben
Differential Revision:  https://reviews.freebsd.org/D56642
DeltaFile
+2-2lib/libpkgconf/Makefile
+4-0tools/build/depend-cleanup.sh
+6-22 files

FreeBSD/src 4fc1503tests/sys/netpfil/pf pass_block.sh

pf: fix duplicate rule detection for automatic tables

We should look at the table name for automatic tables as well. These
are different tables, so the rules using them are (or can be) different
as well.

MFC after:      3 days
Reported by:    Michael Sinatra <michael at burnttofu.net>
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fb838352751767e756bd45cd2040fa464ed4de20)
DeltaFile
+42-0tests/sys/netpfil/pf/pass_block.sh
+42-01 files

FreeBSD/src fdcc60fsys/netpfil/pf pf_ioctl.c, tests/sys/netpfil/pf pass_block.sh

pf: fix duplicate rule detection for automatic tables

We should look at the table name for automatic tables as well. These
are different tables, so the rules using them are (or can be) different
as well.

MFC after:      3 days
Reported by:    Michael Sinatra <michael at burnttofu.net>
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fb838352751767e756bd45cd2040fa464ed4de20)
DeltaFile
+42-0tests/sys/netpfil/pf/pass_block.sh
+1-3sys/netpfil/pf/pf_ioctl.c
+43-32 files

FreeBSD/src 28932dcsys/net if_tuntap.c

tuntap: add SIOCGIFCAP and SIOCSIFCAP ioctls

Add SIOCGIFCAP ioctl-command for tun/tap character device to be used
by bhyve for offloading in the future.
Add SIOCSIFCAP for symmetry.

Reviewed by:            markj, pouria, tuexen
MFC after:              1 week
Event:                  Wiesbaden Hackathon 2026
Differential Revision:  https://reviews.freebsd.org/D51289
DeltaFile
+17-0sys/net/if_tuntap.c
+17-01 files

FreeBSD/src 1bfd392share/man/man4 vtnet.4, sys/arm/allwinner if_awg.c

vtnet: remove loader tunable fixup_needs_csum

Removes the deprecated loader tunable fixup_needs_csum. Removes also
the sysctl counter rx_csum_bad_offset that is no longer in use.

Reviewed by:            tuexen
Event:                  Wiesbaden Hackathon 2026
Differential Revision:  https://reviews.freebsd.org/D55588
DeltaFile
+12-66sys/dev/virtio/network/if_vtnet.c
+2-22share/man/man4/vtnet.4
+7-7sys/arm/allwinner/if_awg.c
+21-953 files

FreeBSD/src 724ad12sys/netinet tcp_timewait.c

tcp: use RFC 6191 for connection recycling in TIME-WAIT

Implement the criteria specified in RFC 6191 for recycling TCP
connections in TIME-WAIT.

Reviewed by:            rscheff, Marius Halden
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D56321
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit 3a54aa3b0911bef15e014b8a8185e116efb0a918)
DeltaFile
+8-3sys/netinet/tcp_timewait.c
+8-31 files

FreeBSD/src 8e62978sys/net bpf.c

bpf: fix handling the read timeout on ppc64

On platforms other than amd64, BIOCSRTIMEOUT is equal to
BIOCSRTIMEOUT32. Therefore, running the COMPAT_FREEBSD32 code
basically clears tv_usec on big endian platforms. When tcpdump is
used, the timeout requested is 100ms, which gets cleared to 0 on
ppc64 platforms. This results in tcpdump showing the packets only
when the read buffer is full.
Thanks to kib for guiding me to the correct fix.

Reported by:            ivy
Reviewed by:            adrian, kib
Differential Revision:  https://reviews.freebsd.org/D56399
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit 04b994d19eec68a6b5d27ff4b0fa223a05f00e1f)
DeltaFile
+22-20sys/net/bpf.c
+22-201 files

FreeBSD/src b063cfbshare/man/man4 virtio.4

virtio.4: fix typo

Reviewed by:    tuexen
Fixes:          c70755bc0d8f ("virtio: add loader tunables to sysctl")
Event:          Wiesbaden Hackathon 2026

(cherry picked from commit 39c44fc55f0ed595623fb6d66a4060b7be32fa51)
DeltaFile
+2-2share/man/man4/virtio.4
+2-21 files

FreeBSD/src d3e3c9asys/netinet tcp_var.h, sys/netinet/tcp_stacks rack.c

tcp: retire TF_SENTSYN

This TF_-flag is only used in the RACK stack and not really needed.
So replace it, since glebius@ needs a TF_ flag and right now all
of them are taken.
No functional change intended.

Reviewed by:            rrs, glebius, rscheff, Nick Banks
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D56025
Event:                  Wiesbaden Hackathon 2024

(cherry picked from commit 32cc4beb0a8c3cadc0de4c255ba512fd7b196607)
DeltaFile
+1-3sys/netinet/tcp_stacks/rack.c
+2-2sys/netinet/tcp_var.h
+3-52 files

FreeBSD/src c8fa77dsys/netinet tcp_subr.c

tcp: improve NOINET builds

Reported by:    bz
Sponsored by:   Netflix, Inc.
Event:          Wiesbaden Hackathon 2026

(cherry picked from commit 3d69387ece535fc33821d089aab241bfb9551d69)
DeltaFile
+3-0sys/netinet/tcp_subr.c
+3-01 files

FreeBSD/src 8e13e98share/man/man4 virtio.4, sys/dev/virtio virtio.c

virtio: add loader tunables to sysctl

virtio_pci uses two loader tunables that should be more visible.
This patch adds these loader tunables to sysctl and describes them
in the virtio(4) man page.

Reviewed by:            imp (erlier version), tuexen
Differential Revision:  https://reviews.freebsd.org/D55533
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit c70755bc0d8f703dbaa1520c15e8213a95847dd5)
DeltaFile
+26-2share/man/man4/virtio.4
+6-1sys/dev/virtio/pci/virtio_pci.c
+6-1sys/dev/virtio/pci/virtio_pci_modern.c
+4-0sys/dev/virtio/virtio.c
+42-44 files

FreeBSD/src 09bcf5asys/arm64/arm64 pmap.c, sys/arm64/include vm.h

arm64/pmap: fix pmap_is_valid_memattr()

The function pmap_is_valid_memattr(pmap, mode) checks whether the
given variable mode is between the two constant values
VM_MEMATTR_DEVICE and VM_MEMATTR_WRITE_THROUGH.
After the code for this function was written, the value of
VM_MEMATTR_DEVICE changed from 0 to 4. Since VM_MEMATTR_WRITE_THROUGH
is still 3, the condition is always false.
This patch changes the condition to check whether mode is equal to any
of the VM_MEMATTR* constants.

Reviewed by:            andrew, tuexen
Differential Revision:  https://reviews.freebsd.org/D55534
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit 0272359ada144aa540c28fefaf996afa30dc0aa5)
DeltaFile
+1-1sys/arm64/arm64/pmap.c
+1-0sys/arm64/include/vm.h
+2-12 files

FreeBSD/src 8860389sys/netinet tcp_timewait.c

tcp: improve handling of segments in TIME WAIT

The check for excluding duplicate ACKs needs to consider only TH_SYN
and TH_FIN. We know that TH_ACK is set and TH_RST is cleared. All
other flags, in particular TH_ECE, TH_CWR, and TH_AE needs to be
ignored for the check.

PR:                     292293
Reviewed by:            rrs
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D55489
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit f3364d3c8c876074a9a6f68168e5eb8bd60207de)
DeltaFile
+1-1sys/netinet/tcp_timewait.c
+1-11 files

FreeBSD/src 5a29c53sys/netinet tcp_timewait.c

tcp: BBLog incoming packets in TCPS_TIME_WAIT

PR:                     292293
Reviewed by:            rrs, rscheff, pouria, Nick Banks, Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D5546
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit 8d2f910ceb0f1c366bcf2146a5ba1d1074d07933)
DeltaFile
+3-0sys/netinet/tcp_timewait.c
+3-01 files

FreeBSD/src 902f201sys/kern uipc_socket.c, sys/netinet sctp_syscalls.c

sctp: fix so_proto when peeling off a socket

Reported by:            glebius
Reviewed by:            rrs
Fixes:                  d195b3783fa4 ("sctp: fix socket type created by sctp_peeloff()")
Differential Revision:  https://reviews.freebsd.org/D55454
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit 454212b9718b55b43781f81bef252658e20e0fd3)
DeltaFile
+3-1sys/netinet/sctp_syscalls.c
+2-2sys/kern/uipc_socket.c
+1-1sys/sys/socketvar.h
+6-43 files

FreeBSD/src f2d2ce0sys/dev/usb/net if_ure.c

ure: improve receive checksum offloading

Let the receive checksum offload for TCP/IPv6 and UDP/IPv6 be
controlled by ifconfig rxcsum6 and not by ifconfig rxcsum.
While there, make the code more compact and improve stlye.9
conformity.

Reviewed by:            Timo Völker
Differential Revision:  https://reviews.freebsd.org/D55188
Event:                  Wiesbaden Hackathon 2026

(cherry picked from commit 378577393e407fa2cd9677392da2287e37b4dd33)
DeltaFile
+15-23sys/dev/usb/net/if_ure.c
+15-231 files