FreeBSD/src afea1a2 — libexec/rtld-elf rtld.c

rtld: release rtld_bind_lock around calls to .preinit_array initializers

PR:     298943

(cherry picked from commit ef758b59a44e6b5b2d2dc178b97c01cde1b34570)
DeltaFile
+5-3libexec/rtld-elf/rtld.c
+5-31 files

FreeBSD/src bdcfeac — lib/libsys sysarch.2, lib/libsys/x86 Makefile.sys sysarch.x86.2

sysarch.x86.2: manual page for the sysarch(2) functions on x86

Reviewed by:    ziaee
Discussed with: jhb
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60047
DeltaFile
+659-0lib/libsys/x86/sysarch.x86.2
+2-1lib/libsys/x86/Makefile.sys
+2-1lib/libsys/sysarch.2
+663-23 files

FreeBSD/src bfb7ee5 — usr.sbin/tcpsso tcpsso.8

tcpsso.8: fix a cosmetic nit and make mandoc -Tlint happy
DeltaFile
+1-1usr.sbin/tcpsso/tcpsso.8
+1-11 files

FreeBSD/src c7cf285 — usr.sbin/tcpsso tcpsso.c

tcpsso: fix the level error messages

tcpsso incorrectly referred to the optname instead of
the level name/number.

MFC after:      2 weeks
DeltaFile
+3-3usr.sbin/tcpsso/tcpsso.c
+3-31 files

FreeBSD/src d7cf2e7 — sys/net if_bridge.c rtsock.c, sys/netinet ip_icmp.c tcp_subr.c

net*: remove remnants of caddr_t

caddr_t is a typedef for a character pointer (char *) that originated in
Version 7 Unix, released by AT&T in 1979.  It became obsolete in 1989,
when ANSI C introduced void *.

What's left:

* ioctl(9) KPI still uses caddr_t, thus network related ioctl method
  still use it.
* if_clone KPI, to be done separately.
* bpf(4), to be done separately.
* SCTP, let maintainers decide.
* iflib(4), let maintainers decide.

Reviewed by:            zlei
Differential Revision:  https://reviews.freebsd.org/D60738
DeltaFile
+20-20sys/netinet6/icmp6.c
+17-17sys/net/rtsock.c
+15-18sys/netinet/tcp_subr.c
+10-10sys/netinet6/ip6_input.c
+8-9sys/netinet/ip_icmp.c
+8-8sys/net/if_bridge.c
+78-8246 files not shown
+202-20452 files

FreeBSD/src 690c3fb — sys/kern uipc_mbuf.c, sys/sys mbuf.h

mbuf: remove remnants of caddr_t

caddr_t is a typedef for a character pointer (char *) that originated in
Version 7 Unix, released by AT&T in 1979.  It became obsolete in 1989,
when ANSI C introduced void *.

There is a lot of code that uses m->m_data for arithmetics, thus we can't
switch it to void * easily.  Let's at least stop proliferation of caddr_t.
We have developers that are twice younger than obsoletion of this type.

Reviewed by:            zlei, tuexen, adrian
Differential Revision:  https://reviews.freebsd.org/D60736
DeltaFile
+15-12sys/kern/uipc_mbuf.c
+5-5sys/sys/mbuf.h
+20-172 files

FreeBSD/src 9bcc1e9 — sys/netpfil/ipfw ip_fw_compat.c ip_dummynet.c, sys/netpfil/ipfw/nat64 ip_fw_nat64.c

ipfw: cleanup SYSINIT(9)s

Make them all belong to SI_SUB_PROTO_FIREWALL and explicitly specify
order.  Prefer SYSINIT() over modevent, for those subsystems that don't
have dependencies.  All subsystems just depend on the main module and they
don't depend on each other, except dummynet which also has submodules.
Thus, keep DECLARE_MODULE() only for the main module and dummynet.

Differential Revision:  https://reviews.freebsd.org/D60685
DeltaFile
+11-49sys/netpfil/ipfw/ip_fw2.c
+6-38sys/netpfil/ipfw/ip_fw_nat.c
+4-32sys/netpfil/ipfw/nat64/ip_fw_nat64.c
+6-12sys/netpfil/ipfw/nptv6/ip_fw_nptv6.c
+5-5sys/netpfil/ipfw/ip_dummynet.c
+2-7sys/netpfil/ipfw/ip_fw_compat.c
+34-1431 files not shown
+35-1447 files

FreeBSD/src a44c119 — sys/net if_loop.c

loopback: set MTU to IF_MAXMTU

It was temporarily reduced in af78195e0024 in 1994 to hide some bugs with
signed short overflow.  We believe all these bugs were sorted out by
today. :)

Note that earlier ba582a82b0e36 reduced the MTU be rounded to a longword
with a reference "NFS likes it to be rounded".  We have had several
refactors of the NFS code since that.

Reviewed by:            pouria, zlei, tuexen
Differential Revision:  https://reviews.freebsd.org/D59450
DeltaFile
+1-9sys/net/if_loop.c
+1-91 files

FreeBSD/src 4f2f26f — sys/compat/linuxkpi/common/include/linux hardirq.h

linuxkpi: implement irqs_disabled

This adds a function which is used from various places in drm-kmod
to detect if the code can sleep or not. Currently, these locations
(such as intel_guc_send_busy_loop) are ifdeffed to freebsd specific
solutions (usually drm_can_sleep).

This change implements irqs_disabled. We check td_pinned as spinlocks
will call sched_pin, and td_critnest to check if we are in a critical
section.

Approved by:    wulf, khng (mentor)
Differential Revision:  https://reviews.freebsd.org/D57782
DeltaFile
+20-0sys/compat/linuxkpi/common/include/linux/hardirq.h
+20-01 files

FreeBSD/src b383632 — sys/compat/linux linux_event.c

linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK

Linuxulator implements epoll instances using kqueues. Currently,
epoll_create_common() creates the backing kqueue with copy-on-fork
disabled. When fork() copies the descriptor table, the kqueue is
omitted from the child's table.

This differs from Linux, where an epoll descriptor survives fork(),
including when it was created with EPOLL_CLOEXEC. That flag controls
descriptor lifetime across exec(), not fork().

The missing descriptor breaks dbus-daemon daemonization. The daemon
creates its epoll instance before forking and continues using the
saved descriptor number in the child. F_GETFD initially fails with
EBADF. Once another open reuses that number, subsequent epoll_ctl()
calls fail with EINVAL because the descriptor no longer refers to
an epoll instance. The daemon then exits, preventing applications
that depend on the session bus from starting correctly.


    [31 lines not shown]
DeltaFile
+1-1sys/compat/linux/linux_event.c
+1-11 files

FreeBSD/src 43c79c6 — sys/amd64/include floatingpoint.h, sys/arm/include floatingpoint.h

machine/floatingpoing.h: harmonize all arches

Reported by:    fluffy
Reviewed by:    jhibbits (previous version)
Discussed with: imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D60255
DeltaFile
+2-34sys/i386/include/floatingpoint.h
+2-34sys/amd64/include/floatingpoint.h
+2-33sys/arm/include/floatingpoint.h
+2-29sys/powerpc/include/floatingpoint.h
+8-0sys/riscv/include/floatingpoint.h
+8-0sys/arm64/include/floatingpoint.h
+24-1306 files

FreeBSD/src 495bc19 — sys/dev/pty pty.c

pty: preserve O_NONBLOCK when opening /dev/ptmx

ptmx_fdopen() masks the supplied file flags to FREAD | FWRITE before
passing them to pts_alloc(). This discards FNONBLOCK even when the
caller explicitly requests O_NONBLOCK.

As a result, open("/dev/ptmx", O_RDWR | O_NOCTTY | O_NONBLOCK) succeeds,
but the returned file is blocking. F_GETFL reports O_NONBLOCK cleared,
and a subsequent read can block instead of returning EAGAIN when no
data is available.

This causes Linux xfce4-terminal/VTE running under Linuxulator to
freeze. VTE opens the PTY master with O_NONBLOCK and relies on
nonblocking reads while draining terminal output. Once the available
data has been consumed, the main UI thread blocks in ptsdev_read(),
leaving the window unresponsive even though the child shell has
started successfully.

Include FNONBLOCK in the flags passed to pts_alloc(). Blocking opens

    [20 lines not shown]
DeltaFile
+1-1sys/dev/pty/pty.c
+1-11 files

FreeBSD/src 38479a4 — sys/netinet sctp_indata.c

sctp: improve locking validation

Ensure that the TCB lock is hold in sctp_calc_rwnd().

Reviewed by:    tuexen
MFC after:      1 week
MFC to:         stable/14
MFC to:         stable/15
DeltaFile
+2-0sys/netinet/sctp_indata.c
+2-01 files

FreeBSD/src 294dc04 — sys/netpfil/pf pf_ioctl.c

pf: only log that we're not creating a tag in verbose mode

While here get rid of the aesthetically unpleasing '== false' construct.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+3-2sys/netpfil/pf/pf_ioctl.c
+3-21 files

FreeBSD/src 32a9814 — sys/kern uipc_ktls.c

ktls: Fix capability checks in ktls_reset_receive_tag()

IFCAP2_RXTLS4 and IFCAP2_RXTLS6 are bit numbers, not masks, so
ktls_reset_receive_tag() tested if_capenable2 against 0 for IPv4 and against the
RXTLS4 bit for IPv6. An IPv4 connection with NIC receive TLS offload thus never
got a new receive tag after its packets moved to another interface, and fell
back to software decryption for good.
c721694 fixed the same checks in ktls_alloc_rcv_tag(); use IFCAP2_BIT() here
as well.

Fixes: fe8c78f ("ktls: Add full support for TLS RX offloading via network interface.")

Approved by:    gallatin, kib
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D60757
DeltaFile
+2-2sys/kern/uipc_ktls.c
+2-21 files

FreeBSD/src c9599b8 — sys/kern uipc_sockbuf.c

ktls: Take the receiving interface of each packet in sbappend_ktls_rx()

sbappend_ktls_rx() read the receiving interface of each packet header it
demotes from the chain's first mbuf, whose header it had zeroed on the first
pass. A chain of two packets or more thus had no interface, and a change of
input interface went unnoticed: the TLS receive tag stayed on the old interface
until a later append of one packet.
Read it from the packet being demoted, as the decrypted mark is.

Fixes: fe8c78f0d202 ("ktls: Add full support for TLS RX offloading via network interface.")

Approved by:    gallatin
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D60758
DeltaFile
+1-1sys/kern/uipc_sockbuf.c
+1-11 files

FreeBSD/src a719556 — sys/dev/iwm if_iwm_time_event.c if_iwm.c

iwm: rename iwm_stop_session_protection() -> iwm_unprotect_session()

This matches OpenBSD's driver naming.

Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674

Reviewed by:    mizhka
Differential Revision:  https://reviews.freebsd.org/D60287
DeltaFile
+1-2sys/dev/iwm/if_iwm_time_event.h
+1-1sys/dev/iwm/if_iwm_time_event.c
+1-1sys/dev/iwm/if_iwm.c
+3-43 files

FreeBSD/src 0a12ff6 — sys/dev/iwm if_iwm_util.h if_iwm_sta.c

iwm: add iwm_enable_ac_txq(); use it for command queue setup

Port iwm_enable_ac_txq() from OpenBSD.  It's effictively the
command FIFO path in the existing iwm_enable_txq().

The OpenBSD driver does a bunch of TX aggregation queue setup in
iwm_enable_txq() which isn't relevant here just quite yet and
it doesn't currently hurt to leave the existing one here
whilst I figure out the next steps.

Locally tested:

* 3160, 7260, 8260, 9260 - STA mode

Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674

Differential Revision:  https://reviews.freebsd.org/D60696
DeltaFile
+50-2sys/dev/iwm/if_iwm.c
+8-5sys/dev/iwm/if_iwm_sta.c
+1-0sys/dev/iwm/if_iwm_util.h
+59-73 files

FreeBSD/src 401434a — sys/dev/iwm if_iwmvar.h if_iwm.c

iwm: add phy/mac context tasks; clean up task stop; add net80211 MAC methods

* Add phy/mac tasks, the phy task is currently a placeholder
* Add in the MAC methods from net80211 that are called whenever
  the VAP mode needs updating
* Mark the hardware as STOPPED during shutdown so scheduled tasks
  don't run

The fun side of this work:

* detaching net80211 causes the parent method to be called which leads
  to iwm_stop() being called, and at least one of the entry paths
  into iwm_stop() has IWM_LOCK held, and we can't do a taskqueue_drain()
  or taskqueue_drain_all() call with any lock held as it will sleep.

* the net80211 detach path is calling at least one of the MAC methods
  during detach, and since the taskqueue is being deleted /before/
  the net80211 detach path, we have to make sure nothing is actually
  going to do taskqueue work after that!

    [12 lines not shown]
DeltaFile
+168-1sys/dev/iwm/if_iwm.c
+6-0sys/dev/iwm/if_iwmvar.h
+174-12 files

FreeBSD/src 05635cc — sys/dev/iwm if_iwmvar.h if_iwm.c

iwm: add qenablemsk to track enabled TXQs

This isn't yet used by anything; it's a precursor to TX queue
tracking needed for dynamically assigned TX aggregate queues.

Tested:

* 3160, 7260, 8260, 9260, STA mode

Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674

Differential Revision:  https://reviews.freebsd.org/D60286
DeltaFile
+2-0sys/dev/iwm/if_iwm.c
+1-0sys/dev/iwm/if_iwmvar.h
+3-02 files

FreeBSD/src 03d2620 — sys/contrib/zlib gzwrite.c

MFC: MFV: zlib: Fix buffer overflow bug in non-blocking gzwrite.

DIfferential revision:  https://reviews.freebsd.org/D60695

(cherry picked from commit 7fe1d8abad3f55f127634c1ada7718bc1982089e)
DeltaFile
+4-1sys/contrib/zlib/gzwrite.c
+4-11 files

FreeBSD/src ea13f18 — cddl/usr.sbin/dwatch dwatch dwatch.1

dwatch(1): Use mdo(1) instead of sudo(8) when configured

Reviewed by:    dteske, olce
Approved by:    christos (mentor)
MFC after:      1 week
Sponsored by:   fme AG
Differential Revision:  https://reviews.freebsd.org/D60408

(cherry picked from commit b6a573aa771e4a4b239a7bfeb074d1d25e811c1b)
DeltaFile
+4-2cddl/usr.sbin/dwatch/dwatch.1
+2-1cddl/usr.sbin/dwatch/dwatch
+6-32 files

FreeBSD/src f4fe4c3 — sys/netpfil/pf pf_table.c, tests/sys/netpfil/pf limiters.sh

pf: Remove a table entry regardless of its mark

pfr_remove_kentry() returns without removing an entry whose mark is
set.  The mark is scratch space for the operations that handle a list
of addresses: each resets it before use and leaves it set on the
entries it kept, so after "pfctl -T replace" or "pfctl -T zero" of an
address the entry stays marked.  An address a source limiter put in
its table is then never taken out again when the source falls below
the low-water mark.

Remove the entry whether it is marked or not; nothing else is in the
work queue.

Add a regression test.

Reviewed by:            kp
Fixes:                  461648121230 ("pf: introduce source and state limiters")
Sponsored by:           Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D60530
DeltaFile
+56-0tests/sys/netpfil/pf/limiters.sh
+0-4sys/netpfil/pf/pf_table.c
+56-42 files

FreeBSD/src d561278 — sbin/umbctl umbctl.8, share/man/man4 umb.4

Revert "umb: Update man page HISTORY"

Oops, pushed in error from a staging branch.

This reverts commit ed797306243f3bdbbfd5d8223ec8698b9d7fe319.
DeltaFile
+1-1share/man/man4/umb.4
+1-1sbin/umbctl/umbctl.8
+2-22 files

FreeBSD/src 98b7f63 — share/man/man4 Makefile

man4: Install mgb.4 on all architectures

mgb(4) is not x86-only now, so install its manpage everywhere and make
if_mgb.4 link creation work, which is already on all architectures.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-2share/man/man4/Makefile
+1-21 files

FreeBSD/src ed79730 — sbin/umbctl umbctl.8, share/man/man4 umb.4

umb: Update man page HISTORY

It was merged to stable/14 prior to FreeBSD 14.4.
DeltaFile
+1-1share/man/man4/umb.4
+1-1sbin/umbctl/umbctl.8
+2-22 files

FreeBSD/src 617c700 — sys/conf newvers.sh

newvers.sh: Report -dirty also with staged changes

We add -dirty to the uname version string if the tree does not match the
reported hash. Previously, staged but uncommitted changes were ignored.
Noted by naddy@ in D60606.

Reviewed by:    cperciva, imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60722
DeltaFile
+1-1sys/conf/newvers.sh
+1-11 files

FreeBSD/src 79d491b — cddl/lib/libdtrace libproc_compat.h, cddl/usr.bin/ctfconvert ctfconvert.1

Remove "All Rights Reserved" from FreeBSD Foundation copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder.
DeltaFile
+1-1contrib/elftoolchain/libelftc/elftc_timestamp.3
+1-1contrib/elftoolchain/libelftc/elftc_reloc_type_str.3
+0-1cddl/usr.bin/ctfmerge/ctfmerge.1
+0-1cddl/usr.bin/ctfdump/ctfdump.1
+0-1cddl/usr.bin/ctfconvert/ctfconvert.1
+0-1cddl/lib/libdtrace/libproc_compat.h
+2-631 files not shown
+2-3737 files

FreeBSD/src a143197 — sbin/dhclient/tests Makefile functional.py

dhclient: Add some regression tests

Add tests for some recently fixed bugs in dhclient.  All of these tests
set up two VNET jails connected by an epair.  dhclient runs in one jail,
and the test code runs on the other end.  It uses scapy to inject
"interesting" packets in response to DHCPDISCOVER messages from
dhclient, then checks the configured interface and lease file.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60485
DeltaFile
+242-0sbin/dhclient/tests/functional.py
+2-0sbin/dhclient/tests/Makefile
+244-02 files

FreeBSD/src 368a1bf — sbin/dhclient dhclient.c

dhclient: Avoid out-of-bounds reads in check_classless_option()

The loop did not verify that the option buffer is large enough before
reading an address.

Reported by:    Andrew Griffiths <andrew at calif.io>
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60484
DeltaFile
+43-31sbin/dhclient/dhclient.c
+43-311 files