FreeBSD/src 324b3c2lib/libsys membarrier.2

membarrier.2: document MEMBARRIER_CMD_GET_REGISTRATIONS

Reviewed by:    markj, Ricardo Branco <rbranco at suse.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56507
DeltaFile
+6-0lib/libsys/membarrier.2
+6-01 files

FreeBSD/src aaa1039sys/kern kern_membarrier.c, sys/sys membarrier.h

membarrier(2): implement the MEMBARRIER_CMD_GET_REGISTRATIONS command

Reported by:    Ricardo Branco <rbranco at suse.com>
Reviewed by:    markj, Ricardo Branco <rbranco at suse.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56507
DeltaFile
+17-3sys/kern/kern_membarrier.c
+3-0sys/sys/membarrier.h
+20-32 files

FreeBSD/src 950fd59sys/kern kern_membarrier.c

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

Reviewed by:    markj, Ricardo Branco <rbranco at suse.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56507
DeltaFile
+7-6sys/kern/kern_membarrier.c
+7-61 files

FreeBSD/src 9b844b4libexec/rtld-elf rtld.c

rtld: fix processing of preloaded z_initfirst objects

After we found some preloaded z_initfirst object, we must process till
the end of the preload list still, not stopping on the first found
object.

Reported by:    des
Reviewed by:    des, markj, siderop1 at netapp.com
Fixes:  78aaab9f1cf359f3b7325e4369653f6b50593393
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56466
DeltaFile
+5-0libexec/rtld-elf/rtld.c
+5-01 files

FreeBSD/src 4b79ee8usr.sbin/ctld ctld.cc

ctld: Update nchildren directly in wait_for_children

This results in slightly less duplicated code.

Reviewed by:    asomers
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D56526
DeltaFile
+12-16usr.sbin/ctld/ctld.cc
+12-161 files

FreeBSD/src 7bb2b38usr.sbin/ctld ctld.cc ctld.hh

ctld: Support multiple physical ports in a target

PR:             293076
Reported by:    Ken J. Thomson <thomsonk at yandex.com>
Reviewed by:    asomers
Fixes:          969876fcee57 ("ctld: parse config file independently of getting kernel info")
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D55767
DeltaFile
+37-35usr.sbin/ctld/ctld.cc
+5-6usr.sbin/ctld/ctld.hh
+2-2usr.sbin/ctld/conf.cc
+1-1usr.sbin/ctld/parse.y
+1-1usr.sbin/ctld/conf.h
+1-1usr.sbin/ctld/uclparse.cc
+47-466 files

FreeBSD/src e56687busr.sbin/ctld ctld.cc

ctld: Return from the inner "main" loop on EINTR

This ensures that child processes are reaped in the outer loop in
main().

PR:             294035
Reviewed by:    asomers
Fixes:          66b107e82b2f ("ctld: Use kevent(2) for socket events rather than select(2)")
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D56525
DeltaFile
+1-1usr.sbin/ctld/ctld.cc
+1-11 files

FreeBSD/src 505f381sys/dev/cxgbe/nvmf nvmf_che.c

nvmf_che: Don't leak a socket if an error occurs finalizing the socket

If soreserve() or sosetopt() (to set TCP_NODELAY) fails after claiming
the socket from the file descriptor, explicitly close the socket
before returning failure.

Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D55493
DeltaFile
+1-0sys/dev/cxgbe/nvmf/nvmf_che.c
+1-01 files

FreeBSD/src f49f61fsys/net iflib.c

iflib: Add a missing CURVNET_RESTORE() in the error path

Signed-off-by:  Peter Ganzhorn <peter.ganzhorn at gmail.com>
Reviewed by:    zlei
Fixes:          6d49b41ee84b iflib: Add pfil hooks
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2150
DeltaFile
+3-1sys/net/iflib.c
+3-11 files

FreeBSD/src 0d16792lib/geom/part geom_part.c

geom_part: Restore the human readable format of size

Prior to the change 4f809ffec69c, the sizes are formated by
humanize_number(3) with the flag HN_DECIMAL, which displays the result
using one decimal place when it is less than 10. That is more accurate
and useful. Add equivalent field modifier hn-decimal to xo_emit() to
restore the previous behavior.

Reported by:    Mark Millard
Reviewed by:    js
Fixes:          4f809ffec69c gpart: add libxo support for "show" subcommand + man page updates
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56514
DeltaFile
+4-4lib/geom/part/geom_part.c
+4-41 files

FreeBSD/src ffad36esys/netpfil/pf pf.c

pf: Use MTX_DUPOK to initialize hash chain mutexes

pf_udp_mapping_insert() may lock more than one row at a time.

Fixes:          cd5ff4e841fb ("pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes")
Reviewed by:    kp
Differential Revision:  https://reviews.freebsd.org/D56501
DeltaFile
+1-0sys/netpfil/pf/pf.c
+1-01 files

FreeBSD/src 019a487sys/contrib/openzfs/cmd/zpool zpool_vdev.c

zfs: Fix the build on 32-bit platforms

Fixes:          d8fbbd371ca1 ("zfs: merge openzfs/zfs at 1644e2ffd")
Reported by:    Jenkins
DeltaFile
+1-1sys/contrib/openzfs/cmd/zpool/zpool_vdev.c
+1-11 files

FreeBSD/src 9592b08tests/sys/aio aio_test.c

tests/aio: Avoid skipping zvol tests

The underlying bugs which caused them to be flaky are now fixed.

PR:             258766
DeltaFile
+0-5tests/sys/aio/aio_test.c
+0-51 files

FreeBSD/src c348c92lib/libsys ntp_adjtime.2

ntp_adjtime.2: Increase visibility

+ s/ntp/ntpd/ for correctness + apropos results in document description
+ silence a linter warning by escaping a period with a zero-width space

MFC after:      3 days

(cherry picked from commit b49b3ccd40bda02f530c679f23f42ba9e0e4b2e2)
DeltaFile
+3-3lib/libsys/ntp_adjtime.2
+3-31 files

FreeBSD/src 689a8b5share/man/man7 freebsd-base.7

freebsd-base.7: Break examples into subsections

Break the examples into subsections, so that we can have multi-step
examples.

MFC after:              3 days (to 15 only)
Discussed with:         ivy
Differential Revision:  https://reviews.freebsd.org/D55526

(cherry picked from commit 5f922bd20d81af4b5759b8f104d5c22ee3e5cd1b)
DeltaFile
+6-5share/man/man7/freebsd-base.7
+6-51 files

FreeBSD/src abde7feshare/man/man7 freebsd-base.7

freebsd-base.7: Add an example for unregistering

MFC after:              3 days
Reviewed by:            ivy, emaste
Discussed with:         bapt, des, emaste, ivy, phk, pi
Differential Revision:  https://reviews.freebsd.org/D55458

(cherry picked from commit 998d501ae61a3e3c800e6d102d8ab5253c7c1b91)
DeltaFile
+35-1share/man/man7/freebsd-base.7
+35-11 files

FreeBSD/src a5ac63fshare/skel dot.profile, usr.bin/apply apply.1

Bourne shell -> POSIX shell

The FreeBSD shell is a POSIX compatible shell. It evolved over several
decades from the Almquist shell, which was preceeded a decade before
that by the Bourne shell. Most readers today have never seen a Bourne
shell. If someone wants to learn to use our shell, they need to look for
tutorials on the POSIX shell. Align descriptions through out the tree
with this reality, consistent with it's manual and common parlance.

We made a similar change to the doc tree in b4d6eb01540fe.

MFC after:              3 days
Reviewed by:            carlavilla
Differential Revision:  https://reviews.freebsd.org/D56382

(cherry picked from commit dc140a9fc151f3717bce2157f49070daafa13ec0)
DeltaFile
+2-2usr.bin/fortune/datfiles/freebsd-tips
+2-2usr.bin/script/script.1
+1-1usr.sbin/adduser/adduser.8
+1-1share/skel/dot.profile
+1-1usr.bin/apply/apply.1
+1-1usr.bin/chpass/chpass.1
+8-86 files

FreeBSD/src 91f03cdlib/libvmmapi vmmapi.c, usr.sbin/bhyve bhyverun.c

libvmmapi: Check for allocation failure in vm_vcpu_open()

vm_vcpu_open() really should check the value returned from malloc() and
return NULL on failure. Also, all users of vm_vcpu_open() need to check
the returned value for NULL, too.

Reviewed by:    corvink, markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56346
DeltaFile
+13-0usr.sbin/bhyve/bhyverun.c
+7-0usr.sbin/bhyvectl/bhyvectl.c
+4-0lib/libvmmapi/vmmapi.c
+2-0usr.sbin/bhyveload/bhyveload.c
+26-04 files

FreeBSD/src d3d0466tests/sys/netinet socket_afinet.c

tests/socket_afinet: Fix the bind_connected_port test

The test verifies that a socket can bind to a local address assigned by
connect(2) to a different socket.  It was however trying to bind to the
wrong address, and the check of the result was inverted, so this went
unnoticed.  It also needs to set SO_REUSEADDR for this to succeed.

Reported by:    glebius
MFC after:      1 week
DeltaFile
+7-7tests/sys/netinet/socket_afinet.c
+7-71 files

FreeBSD/src 18de44esbin/pfctl pfctl.8 pfctl.c

pfctl: fix man page and error message for -S option

The `pfctl -S` flag was added to disable DNS resolution in
<https://reviews.freebsd.org/D50724> but documentation and error
messages refer to a `pfctl -N` flag for the same purpose. The `pfctl -N`
flag performs an unrelated function, so the docs and error messages need
to be changed. Caught this when revising documentation for the `-N`
flag.

Reviewed by:    kp
Signed-off-by:  Ross Williams <ross at ross-williams.net>
DeltaFile
+2-2sbin/pfctl/pfctl.8
+1-1sbin/pfctl/pfctl.c
+3-32 files

FreeBSD/src 19eecf9sbin/pfctl pfctl.8

pfctl: clarify usage of load option flags

`pfctl -A`, `-N`, `-O`, and `-R` restrict which rule types and options
are loaded. The man page language ("Load only...") does not make it
clear that these options can be combined to (re)load multiple rule types
and/or options without reloading the entire packet filter.

Add language to make it explicitly clear that these flags combine.

Reviewed by:    kp
Signed-off-by:  Ross Williams <ross at ross-williams.net>
DeltaFile
+24-0sbin/pfctl/pfctl.8
+24-01 files

FreeBSD/src ff76ec3sys/netpfil/pf pf_if.c

pf: be more robust against interface name conflicts

pf assumes that interface names are unique (and share a namespace with
interface group names).
Unfortunately the FreeBSD network stack has a few edge cases where this
assumption can be violated. Try to be more robust against this: rather
than changing the association between a kif and ifp just ignore the next
interface with the same name.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+7-0sys/netpfil/pf/pf_if.c
+7-01 files

FreeBSD/src 4cdbcc2sys/netinet sctp_output.c

sctp: initialize inp to avoid uninitialized use

If we take an early goto out_unlocked inp is uninitialized and then
may be used in SCTP_LTRACE_ERR_RET().  Initialize inp to NULL
to avoid warnings.

Found with:     gcc15 tinderbox build
MFC after:      3 days
Reviewed by:    tuexen, pouria
Differential Revision: https://reviews.freebsd.org/D56503
DeltaFile
+1-0sys/netinet/sctp_output.c
+1-01 files

FreeBSD/src 395c8f0sys/fs/nfsserver nfs_nfsdstate.c

nfs: make no-IP kernels compile

Compiling a LINT-NOIP kernel (assumingly also a NOINET) port and ip
are set but not used in nfsrv_getclientipaddr().

Hide the variables behind #ifdef checks and do likewise for the parsing
results.  Admittingly the code probably wants to be rewritten one day.

Found with:     gcc15 tinderbox build
MFC after:      3 days
Reviewed by:    rmacklem
Differential Revision: https://reviews.freebsd.org/D56502
DeltaFile
+10-0sys/fs/nfsserver/nfs_nfsdstate.c
+10-01 files

FreeBSD/src 26b162dsys/netinet sctp_structs.h

sctp(4): Fix a typo in a source code comment

- s/initited/initiated/

Obtained from:  NetBSD

(cherry picked from commit a154d72775cbf3f0679fb2f989b3d1a035ae41c9)
DeltaFile
+1-1sys/netinet/sctp_structs.h
+1-11 files

FreeBSD/src 4d36709sys/netinet sctp_structs.h

sctp(4): Fix a typo in a source code comment

- s/initited/initiated/

Obtained from:  NetBSD

(cherry picked from commit a154d72775cbf3f0679fb2f989b3d1a035ae41c9)
DeltaFile
+1-1sys/netinet/sctp_structs.h
+1-11 files

FreeBSD/src e6f8afdlibexec/rc rc.conf

rc.conf: Fix typo in comment

The correct path is /etc/defaults/rc.conf (defaults in plural).

Reviewed by:    netchild
Fixes:          cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56456

(cherry picked from commit 8e08080ee581dfd30c128d032035da7b6ae44463)
DeltaFile
+1-1libexec/rc/rc.conf
+1-11 files

FreeBSD/src f5e1bc1libexec/rc rc.conf

rc.conf: Fix typo in comment

The correct path is /etc/defaults/rc.conf (defaults in plural).

Reviewed by:    netchild
Fixes:          cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56456

(cherry picked from commit 8e08080ee581dfd30c128d032035da7b6ae44463)
DeltaFile
+1-1libexec/rc/rc.conf
+1-11 files

FreeBSD/src 16719d3libexec/rc rc.conf

rc.conf: Fix typo in comment

The correct path is /etc/defaults/rc.conf (defaults in plural).

Reviewed by:    netchild
Fixes:          cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56456

(cherry picked from commit 8e08080ee581dfd30c128d032035da7b6ae44463)
DeltaFile
+1-1libexec/rc/rc.conf
+1-11 files

FreeBSD/src 4a6d7fcsys/dev/dpaa2 dpaa2_frame.c dpaa2_ni.c

dpaa2: Extract checksum statuses on ingress

In order to enable RX checksum offloading we need to check the
meta-information for the (good) frames to see if the L3/4 checksums
were calculated and if there was an error.

The way the buffere are setup, the needed frame meta-information is
already requested. All we have to do is make sure it is really part
of the RX frame, that it is valid, and if the respective bits are set.

Also do not forget to set the (dummy) csum_data as otherwise upper
layers will just be cranky. An artefact of the past which likely
should disappear.

PR:             292006
Reviewed by:    bz, tuexen
Tested by:      bz, tuexen
Approved by:    tuexen
Obtained from:  bz (initial version, D55320)

    [3 lines not shown]
DeltaFile
+88-12sys/dev/dpaa2/dpaa2_frame.c
+74-2sys/dev/dpaa2/dpaa2_ni.c
+61-2sys/dev/dpaa2/dpaa2_frame.h
+4-2sys/dev/dpaa2/dpaa2_ni.h
+227-184 files