From nobody Mon Mar 30 04:05:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkd2B6rzjz6W6m9 for ; Mon, 30 Mar 2026 04:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkd2B6Wvzz3jrG for ; Mon, 30 Mar 2026 04:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774843522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G71a8ecfNwciWHU9tOognNUmOHuODWbb7I9VQG319u0=; b=uJFm4GcdcfU+gmEkREcI1ItCosKq89Jrmqld995alkmZ9I4Y11WtTTbk6dr4BaAmWNX6i+ RMOD3/l22EAIaLh1+OsF6nfSvMVg2dmcvGz/fTi97SKaNJIb0WGHbI9Z2JUVXoPremOKSB WchNsyZDQUW4UkDwSRecrGiS07+XjufjWhEbqERzMuaROSZk1j/8M92GIuzeLcmpDCgyUf JYRJGwqxmNCY0BjK3i0aKZV6J75SURuhbyMYApzB6KnO9rYNttCDSWaoG22TGlkhDgSh0g Ya4jZ7QYdSQJT5QxgVa3/Sh8ZCLDfzlCOY88gKAPqUPteXSqjyblYY3wLADXew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774843522; a=rsa-sha256; cv=none; b=E9jzRXJFBUmbf4YWBpemVNMw8nMEqU5AsIZULgJDlbMAfaebq5fNBDmrgpL4Xd+GY8Hnli yYN5EJG8BQx+RvNkjz47CXpnU+XaQX1kowmdUwfEJd+AR1OicelxYtYh35/ZZ/PScvAEBS AK9tDgapDDqeV1rFRmzm8u6a37FwlsgQwHmlW60eJbk5D14RMeGndbfta0Kcn64QBAsj2p zfICuAlWM8lMAaApS+wLF1ZoPzKKraGiipE+yw2MA3Suji/wnCsPb/jtbS2KbaDy0m8mXQ Hd6W0M4bQIWDBpRrhGwAuoNYIYjTtvCY1warljseP7df5KUueqDZNH037fkGkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774843522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G71a8ecfNwciWHU9tOognNUmOHuODWbb7I9VQG319u0=; b=u+WTbQH43I1UTUSWbEDfkE385t+HJGNncI6DCyUt4suiY1gv264pVDPPylJYLkAih6weQ+ 67QcEcyC+XpjnExzHdIuRDttHlFXQLlcoFQGrUnlivw7Vkc+geTQdgkq5s0yiv4us3fPJX QZEoQL3PbVLXmiwCPWntnCvvojBz+PshoGdpBf87ToCYU9twM/f/buDN56oOHyW+5UB/OH 47ATFPNRUEQS4m349/y8VEHUrG5gBHDv/U8BFR/feIldw5kygKVB8G8C0GewQzxBpOpERj VHDfyrSbZCqQa4bcNDhb3dIXBYnec/MJeXOG5R+nodg0H+5yAA4ihQNmRrhReg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkd2B65dYz9fZ for ; Mon, 30 Mar 2026 04:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 364b3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 04:05:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: e8166d7f378b - main - LinuxKPI wlan drivers: update makefiles to not use WITH_ List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8166d7f378bb449315aff535909c153f3e71daf Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 04:05:22 +0000 Message-Id: <69c9f682.364b3.741e2c0f@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e8166d7f378bb449315aff535909c153f3e71daf commit e8166d7f378bb449315aff535909c153f3e71daf Author: Bjoern A. Zeeb AuthorDate: 2026-03-19 23:02:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-03-30 03:53:51 +0000 LinuxKPI wlan drivers: update makefiles to not use WITH_ Up to now the LinuxKPI wlan drivers were using local variables starting with a WITH_ prefix in their Makefiles. That is likely to collide with other mechanisms like WITH_ and WITHOUT_ from src.conf. Adjust the local variables to use a driver name prefix for now to control what is built and what is not. These variables are mainly for the time of development so we can turn off/on a feature or bus attachment while working on it. Otherwise they are there for documentation purposes. The only reason one would change them locally would be if someone was to build a very custom image and not want certain bits (e.g., USB support) being compiled into the modules. While here, try to harmonize some parts of the Makefiles. Suggested by: imp Discussed with: imp Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55977 --- sys/modules/ath10k/Makefile | 38 ++++++++-------- sys/modules/ath11k/Makefile | 12 ++++- sys/modules/ath12k/Makefile | 8 +++- sys/modules/athk_common/Makefile | 13 +++--- sys/modules/brcm80211/brcmfmac/Makefile | 80 ++++++++++++++++++--------------- sys/modules/brcm80211/brcmutil/Makefile | 16 +++---- sys/modules/iwlwifi/Makefile | 18 ++++---- sys/modules/mt76/Makefile | 6 +++ sys/modules/mt76/Makefile.inc | 44 ++++++++++-------- sys/modules/mt76/core/Makefile | 34 +++++++------- sys/modules/mt76/mt7615/Makefile | 23 ++++++---- sys/modules/mt76/mt7915/Makefile | 35 +++++++++------ sys/modules/mt76/mt7921/Makefile | 36 ++++++++------- sys/modules/mt76/mt7925/Makefile | 24 +++++----- sys/modules/mt76/mt7996/Makefile | 31 ++++++++----- sys/modules/rtw88/Makefile | 58 ++++++++++++------------ sys/modules/rtw89/Makefile | 57 +++++++++++------------ 17 files changed, 300 insertions(+), 233 deletions(-) diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile index 16f481116357..2ffa8532ff47 100644 --- a/sys/modules/ath10k/Makefile +++ b/sys/modules/ath10k/Makefile @@ -3,11 +3,11 @@ DEVATH10KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath10k .PATH: ${DEVATH10KDIR} # Bus attachments. -WITH_PCI= 1 -WITH_USB= 0 # Never finished upstream, not working. +ATH10K_PCI= 1 +ATH10K_USB= 0 # Currently not working again, upstream kaputt. -WITH_CONFIG_FWLOG= 1 -WITH_LEDS= 0 +ATH10K_CONFIG_FWLOG= 1 +ATH10K_LEDS= 0 KMOD= if_ath10k @@ -17,31 +17,32 @@ SRCS+= txrx.c wmi.c wmi-tlv.c SRCS+= p2p.c swap.c # PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. -.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} +.if defined(ATH10K_PCI) && ${ATH10K_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c .endif # USB parts; USB can be loaded and is unconditional on any kernel config. -.if defined(WITH_USB) && ${WITH_USB} > 0 +.if defined(ATH10K_USB) && ${ATH10K_USB} > 0 SRCS+= usb.c .endif -# Other -SRCS+= ${LINUXKPI_GENSRCS} -SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h - -.if defined(WITH_CONFIG_FWLOG) && ${WITH_CONFIG_FWLOG} > 0 +.if defined(ATH10K_CONFIG_FWLOG) && ${ATH10K_CONFIG_FWLOG} > 0 SRCS+= fwlog.c -CFLAGS+= -DCONFIG_FWLOG=${WITH_CONFIG_FWLOG} +CFLAGS+= -DCONFIG_FWLOG .endif -.if defined(WITH_LEDS) && ${WITH_LEDS} > 0 +.if defined(ATH10K_LEDS) && ${ATH10K_LEDS} > 0 CFLAGS+= -DCONFIG_ATH10K_LEDS SRCS+= leds.c .endif -CFLAGS+= -DKBUILD_MODNAME='"ath10k"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +# Always on for now. +CFLAGS+= -DCONFIG_ATH10K_DEBUG +CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI + +# Other +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h CFLAGS+= -I${DEVATH10KDIR} CFLAGS+= -I${DEVATH10KDIR}/.. @@ -49,9 +50,7 @@ CFLAGS+= ${LINUXKPI_INCLUDES} # Helpful after fresh imports. #CFLAGS+= -ferror-limit=0 -CFLAGS+= -DCONFIG_ATH10K_DEBUG -CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI - +# TODO: further options and SRCS files. #CFLAGS+= -DCONFIG_ATH10K_AHB #CFLAGS+= -DCONFIG_ATH10K_DEBUGFS #CFLAGS+= -DCONFIG_ATH10K_DFS_CERTIFIED @@ -65,4 +64,7 @@ CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI #CFLAGS+= -DCONFIG_PM_SLEEP #CFLAGS+= -DCONFIG_THERMAL +CFLAGS+= -DKBUILD_MODNAME='"ath10k"' +CFLAGS+= -DLINUXKPI_VERSION=61900 + .include diff --git a/sys/modules/ath11k/Makefile b/sys/modules/ath11k/Makefile index d17e76255802..b1eb2422cc3d 100644 --- a/sys/modules/ath11k/Makefile +++ b/sys/modules/ath11k/Makefile @@ -2,6 +2,9 @@ DEVATH11KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath11k .PATH: ${DEVATH11KDIR} +ATH11K_PCI= 1 +ATH11K_AHB= 0 + ATH11K_DEBUGFS= 0 ATH11K_TRACE= 0 ATH11K_THERMAL= 0 @@ -18,10 +21,15 @@ SRCS+= ce.c peer.c dbring.c hw.c pcic.c SRCS+= fw.c p2p.c # PCI +.if defined(ATH11K_PCI) && ${ATH11K_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= mhi.c pci.c +CFLAGS+= -DCONFIG_ATH11K_PCI +.endif -# AHB -#SRCS+= ahb.c +.if defined(ATH11K_AHB) && ${ATH11K_AHB} > 0 +SRCS+= ahb.c +CFLAGS+= -DCONFIG_ATH11K_AHB +.endif .if defined(ATH11K_DEBUGFS) && ${ATH11K_DEBUGFS} > 0 SRCS+= debugfs.c debugfs_htt_stats.c debugfs_sta.c diff --git a/sys/modules/ath12k/Makefile b/sys/modules/ath12k/Makefile index ff61769bd99e..018504812995 100644 --- a/sys/modules/ath12k/Makefile +++ b/sys/modules/ath12k/Makefile @@ -2,8 +2,10 @@ DEVATH12KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath12k .PATH: ${DEVATH12KDIR} -ATH12K_ACPI= 0 +ATH12K_PCI= 1 ATH12K_AHB= 0 + +ATH12K_ACPI= 0 ATH12K_COREDUMP= 0 ATH12K_DEBUGFS= 0 ATH12K_PM= 0 @@ -16,7 +18,11 @@ SRCS+= wmi.c mac.c reg.c htc.c qmi.c SRCS+= dp.c dp_tx.c dp_rx.c dp_mon.c debug.c SRCS+= ce.c peer.c dbring.c hw.c fw.c p2p.c +.if defined(ATH12K_PCI) && ${ATH12K_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= mhi.c pci.c +.else +.error ath12k requires PCI support compiled in at this point +.endif .if defined(ATH12K_AHB) && ${ATH12K_AHB} > 0 CFLAGS+= -DCONFIG_ATH12K_AHB diff --git a/sys/modules/athk_common/Makefile b/sys/modules/athk_common/Makefile index 5400cfa7723d..d058d19cbe80 100644 --- a/sys/modules/athk_common/Makefile +++ b/sys/modules/athk_common/Makefile @@ -4,19 +4,19 @@ DEVDIR= ${SRCTOP}/sys/contrib/dev/athk KMOD= athk_common -WITH_ATH_DEBUG= 1 -WITH_ATH_TRACEPOINTS= 0 +ATHK_COMMON_ATH_DEBUG= 1 +ATHK_COMMON_ATH_TRACEPOINTS= 0 SRCS= main.c SRCS+= dfs_pattern_detector.c dfs_pri_detector.c SRCS+= hw.c key.c regd.c -.if defined(WITH_ATH_DEBUG) && ${WITH_ATH_DEBUG} > 0 +.if defined(ATHK_COMMON_ATH_DEBUG) && ${ATHK_COMMON_ATH_DEBUG} > 0 SRCS+= debug.c CFLAGS+= -DCONFIG_ATH_DEBUG .endif -.if defined(WITH_ATH_TRACEPOINTS) && ${WITH_ATH_TRACEPOINTS} > 0 +.if defined(ATHK_COMMON_ATH_TRACEPOINTS) && ${ATHK_COMMON_ATH_TRACEPOINTS} > 0 SRCS+= trace.c CFLAGS+= -DCONFIG_ATH_TRACEPOINTS .endif @@ -25,11 +25,12 @@ CFLAGS+= -DCONFIG_ATH_TRACEPOINTS SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h -CFLAGS+= -DKBUILD_MODNAME='"athk_common"' - CFLAGS+= -I${DEVDIR} CFLAGS+= ${LINUXKPI_INCLUDES} # Helpful after fresh imports. #CFLAGS+= -ferror-limit=0 +CFLAGS+= -DKBUILD_MODNAME='"athk_common"' +CFLAGS+= -DLINUXKPI_VERSION=61900 + .include diff --git a/sys/modules/brcm80211/brcmfmac/Makefile b/sys/modules/brcm80211/brcmfmac/Makefile index b0c4d75a3d17..107914c2dc27 100644 --- a/sys/modules/brcm80211/brcmfmac/Makefile +++ b/sys/modules/brcm80211/brcmfmac/Makefile @@ -3,14 +3,16 @@ DEVDIR= ${SRCTOP}/sys/contrib/dev/broadcom/brcm80211/brcmfmac .PATH: ${DEVDIR} # Should split this up into a core driver and 3 more -WITH_PCI=1 -WITH_SDIO=0 -WITH_USB=0 +BRCMFMAC_PCI= 1 +BRCMFMAC_USB= 0 +BRCMFMAC_SDIO= 0 -WITH_DMI=0 -WITH_OF=0 -WITH_DEBUG=1 -WITH_TRACING=0 # ftrace probes; simple enough to change possibly; keep 0! +BRCMFMAC_PROTO_BCDC= 0 # SDIO, USB -- do not set manually +BRCMFMAC_DEBUG= 1 +BRCMFMAC_TRACING= 0 # ftrace probes; simple enough to change possibly; keep 0! +BRCMFMAC_OF= 0 +BRCMFMAC_DMI= 0 +BRCMFMAC_ACPI= 0 KMOD= if_brcmfmac @@ -21,46 +23,57 @@ SRCS+= fweh.c fwil.c fwvid.c p2p.c pno.c proto.c vendor.c xtlv.c SRCS+= wcc/core.c cyw/core.c bca/core.c # PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. -.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} -SRCS+= pcie.c msgbuf.c commonring.c flowring.c -CFLAGS+= -DCONFIG_BRCMFMAC_PCIE=1 +.if defined(BRCMFMAC_PCI) && ${BRCMFMAC_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} +SRCS+= pcie.c +CFLAGS+= -DCONFIG_BRCMFMAC_PCIE +SRCS+= msgbuf.c commonring.c flowring.c +CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_MSGBUF .endif # SDIO parts; SDIO depends on an MMCCAM kernel. -.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +.if defined(BRCMFMAC_SDIO) && ${BRCMFMAC_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} SRCS+= sdio.c bcmsdh.c SRCS+= sdio_if.h SRCS+= sdiodevs.h -CFLAGS+= -DCONFIG_BRCMFMAC_SDIO=1 +CFLAGS+= -DCONFIG_BRCMFMAC_SDIO +BRCMFMAC_PROTO_BCDC= 1 .endif # USB parts; USB can be loaded and is unconditional on any kernel config. -.if defined(WITH_USB) && ${WITH_USB} > 0 +.if defined(BRCMFMAC_USB) && ${BRCMFMAC_USB} > 0 SRCS+= usb.c -CFLAGS+= -DCONFIG_BRCMFMAC_USB=1 +CFLAGS+= -DCONFIG_BRCMFMAC_USB +BRCMFMAC_PROTO_BCDC= 1 .endif -.if (defined(WITH_SDIO) && ${WITH_SDIO} > 0) || \ - (defined(WITH_USB) && ${WITH_USB} > 0) -CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_BCDC=1 +.if defined(BRCMFMAC_PROTO_BCDC) && ${BRCMFMAC_PROTO_BCDC} > 0 +CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_BCDC SRCS+= bcdc.c fwsignal.c .endif -.if defined(WITH_DMI) && ${WITH_DMI} > 0 -SRCS+= dmi.c +.if defined(BRCMFMAC_DEBUG) && ${BRCMFMAC_DEBUG} > 0 +CFLAGS+= -DDEBUG -DCONFIG_BRCMDBG +SRCS+= debug.c .endif -.if defined(WITH_OF) && ${WITH_OF} > 0 +.if defined(BRCMFMAC_TRACING) && ${BRCMFMAC_TRACING} > 0 +SRCS+= tracepoint.c +CFLAGS+= -DCONFIG_BRCM_TRACING +.endif + +.if defined(BRCMFMAC_OF) && ${BRCMFMAC_OF} > 0 SRCS+= of.c +CFLAGS+= -DCONFIG_OF .endif -.if defined(WITH_DEBUG) && ${WITH_DEBUG} > 0 -CFLAGS+= -DDEBUG=${WITH_DEBUG} -SRCS+= debug.c +.if defined(BRCMFMAC_DMI) && ${BRCMFMAC_DMI} > 0 +SRCS+= dmi.c +CFLAGS+= -DCONFIG_DMI .endif -.if defined(WITH_TRACING) && ${WITH_TRACING} > 0 -SRCS+= tracepoint.c +.if defined(BRCMFMAC_ACPI) && ${BRCMFMAC_ACPI} > 0 +SRCS+= acpi.c +CFLAGS+= -DCONFIG_ACPI .endif # Other @@ -68,25 +81,18 @@ SRCS+= bus_if.h device_if.h pci_if.h vnode_if.h SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h -CFLAGS+= -DKBUILD_MODNAME='"brcmfmac"' -CFLAGS+= -DLINUXKPI_VERSION=61700 - CFLAGS+= -I${DEVDIR} CFLAGS+= -I${DEVDIR}/../include CFLAGS+= ${LINUXKPI_INCLUDES} -CFLAGS+= -ferror-limit=0 - -#CFLAGS+= -DCONFIG_BRCM_TRACING=${WITH_TRACING} -CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_MSGBUF=${WITH_PCI} -CFLAGS+= -DCONFIG_BRCMDBG=${WITH_DEBUG} - -#CFLAGS+= -DCONFIG_DMI=${WITH_DMI} -#CFLAGS+= -DCONFIG_OF=${WITH_OF} +# Helpful after fresh imports. +#CFLAGS+= -ferror-limit=0 #CFLAGS+= -DCONFIG_PM_SLEEP= -#CFLAGS+= -DCONFIG_ACPI=0 #CFLAGS+= -DCONFIG_PM #CFLAGS+= -DCONFIG_IPV6=0 +CFLAGS+= -DKBUILD_MODNAME='"brcmfmac"' +CFLAGS+= -DLINUXKPI_VERSION=61900 + .include diff --git a/sys/modules/brcm80211/brcmutil/Makefile b/sys/modules/brcm80211/brcmutil/Makefile index 3fc01f4894fd..7ef89be18bf9 100644 --- a/sys/modules/brcm80211/brcmutil/Makefile +++ b/sys/modules/brcm80211/brcmutil/Makefile @@ -2,27 +2,27 @@ DEVDIR= ${SRCTOP}/sys/contrib/dev/broadcom/brcm80211/brcmutil .PATH: ${DEVDIR} -WITH_DEBUG=1 +BRCMUTIL_DEBUG= 1 KMOD= brcmutil SRCS= d11.c utils.c +.if defined(BRCMUTIL_DEBUG) && ${BRCMUTIL_DEBUG} > 0 +CFLAGS+= -DDEBUG +.endif + # Other SRCS+= ${LINUXKPI_GENSRCS} SRCS+= bus_if.h device_if.h pci_if.h vnode_if.h SRCS+= opt_wlan.h opt_inet6.h opt_inet.h -CFLAGS+= -DKBUILD_MODNAME='"brcmutil"' -CFLAGS+= -DLINUXKPI_VERSION=61700 - -.if defined(WITH_DEBUG) && ${WITH_DEBUG} > 0 -CFLAGS+= -DDEBUG=${WITH_DEBUG} -.endif - CFLAGS+= -I${DEVDIR} CFLAGS+= -I${DEVDIR}/../include CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -ferror-limit=0 +CFLAGS+= -DKBUILD_MODNAME='"brcmutil"' +CFLAGS+= -DLINUXKPI_VERSION=61900 + .include diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index b5441744d77a..399e35b79d61 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -4,10 +4,10 @@ DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi .PATH: ${DEVIWLWIFIDIR} -WITH_CONFIG_PM= 0 -WITH_DEBUGFS= 0 +IWLWIFI_CONFIG_PM= 0 +IWLWIFI_DEBUGFS= 0 .if ${KERN_OPTS:MDEV_ACPI} -WITH_CONFIG_ACPI= 1 +IWLWIFI_CONFIG_ACPI= 1 .endif KMOD= if_iwlwifi @@ -49,21 +49,21 @@ SRCS+= mld/regulatory.c mld/roc.c mld/rx.c mld/scan.c SRCS+= mld/session-protect.c mld/sta.c mld/stats.c mld/thermal.c SRCS+= mld/time_sync.c mld/tlc.c mld/tx.c -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +.if defined(IWLWIFI_DEBUGFS) && ${IWLWIFI_DEBUGFS} > 0 SRCS+= fw/debugfs.c SRCS+= mvm/debugfs.c mvm/debugfs-vif.c SRCS+= mld/debugfs.c CFLAGS+= -DCONFIG_IWLWIFI_DEBUGFS CFLAGS+= -DCONFIG_MAC80211_DEBUGFS .endif -.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0 +.if defined(IWLWIFI_CONFIG_PM) && ${IWLWIFI_CONFIG_PM} > 0 SRCS+= mvm/d3.c SRCS+= mld/d3.c CFLAGS+= -DCONFIG_PM CFLAGS+= -DCONFIG_PM_SLEEP .endif -.if defined(WITH_CONFIG_ACPI) && ${WITH_CONFIG_ACPI} > 0 +.if defined(IWLWIFI_CONFIG_ACPI) && ${IWLWIFI_CONFIG_ACPI} > 0 SRCS.DEV_ACPI+= fw/acpi.c CFLAGS+= -DCONFIG_ACPI .endif @@ -74,9 +74,6 @@ CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h -CFLAGS+= -DKBUILD_MODNAME='"iwlwifi"' -CFLAGS+= -DLINUXKPI_VERSION=61700 - CFLAGS+= -I${DEVIWLWIFIDIR} CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_IWLDVM=0 @@ -96,6 +93,9 @@ CFLAGS+= -DCONFIG_IWLWIFI_DEVICE_TRACING=1 #CFLAGS+= -DCONFIG_THERMAL=1 #CFLAGS+= -DCONFIG_EFI=1 +CFLAGS+= -DKBUILD_MODNAME='"iwlwifi"' +CFLAGS+= -DLINUXKPI_VERSION=61900 + CWARNFLAGS.clang.drv.c+= -Wno-initializer-overrides CWARNFLAGS.drv.c+= -Wno-override-init ${CWARNFLAGS.${COMPILER_TYPE}.${.IMPSRC:T}} diff --git a/sys/modules/mt76/Makefile b/sys/modules/mt76/Makefile index 5abae4c5ad7c..726f7759e9be 100644 --- a/sys/modules/mt76/Makefile +++ b/sys/modules/mt76/Makefile @@ -1,8 +1,14 @@ +.include + SUBDIR= core SUBDIR+= mt7615 +.if ${KERN_OPTS:MDEV_PCI} SUBDIR+= mt7915 +.endif SUBDIR+= mt7921 SUBDIR+= mt7925 +.if ${KERN_OPTS:MDEV_PCI} SUBDIR+= mt7996 +.endif .include diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc index 41b18651e985..b44dcd2e2e82 100644 --- a/sys/modules/mt76/Makefile.inc +++ b/sys/modules/mt76/Makefile.inc @@ -1,16 +1,21 @@ # Common information shared by all submodule builds. COMMONDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76 +DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/${MT76_DRIVER_NAME} -# Bus attachments. -WITH_PCI= 1 -WITH_USB= 0 -WITH_SDIO= 0 +KMOD?= if_${MT76_DRIVER_NAME} -# Options. -WITH_CONFIG_PM= 0 -WITH_DEBUGFS= 0 -WITH_SOC_WED= 0 +# Bus attachment for the core part and that each driver can check +# what the common code supports. +MT76_PCI= 1 +MT76_SDIO= 0 +MT76_USB= 0 + +# General options for common code so drivers can check. +MT76_ACPI?= 0 +MT76_CONFIG_PM?= 0 +MT76_DEBUGFS?= 0 +MT76_SOC_WED?= 0 # Other SRCS+= ${LINUXKPI_GENSRCS} @@ -19,23 +24,26 @@ SRCS+= opt_wlan.h opt_inet6.h opt_inet.h # This is true for all architectures we build for. CFLAGS+= -DCONFIG_ARCH_DMA_ADDR_T_64BIT -# Helpful after fresh imports. -#CFLAGS+= -ferror-limit=0 - -.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0 -CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} +.if defined(MT76_CONFIG_PM) && ${MT76_CONFIG_PM} > 0 +CFLAGS+= -DCONFIG_PM .endif -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 -CFLAGS+= -DCONFIG_MAC80211_DEBUGFS=${WITH_DEBUGFS} +.if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0 +CFLAGS+= -DCONFIG_MAC80211_DEBUGFS .endif -.if defined(WITH_SOC_WED) && ${WITH_SOC_WED} > 0 -CFLAGS+= CONFIG_NET_MEDIATEK_SOC_WED +.if defined(MT76_SOC_WED) && ${MT76_SOC_WED} > 0 +CFLAGS+= -DCONFIG_NET_MEDIATEK_SOC_WED .endif CFLAGS+= -I${COMMONDIR} +.if ${MT76_DRIVER_NAME} != "mt76_core" +CFLAGS+= -I${DEVDIR} +.endif CFLAGS+= ${LINUXKPI_INCLUDES} +# Helpful after fresh imports. +#CFLAGS+= -ferror-limit=0 + +CFLAGS+= -DKBUILD_MODNAME='"${MT76_DRIVER_NAME}"' CFLAGS+= -DLINUXKPI_VERSION=61900 -# end diff --git a/sys/modules/mt76/core/Makefile b/sys/modules/mt76/core/Makefile index f2aec9dfcf4c..e4e65d8e3c24 100644 --- a/sys/modules/mt76/core/Makefile +++ b/sys/modules/mt76/core/Makefile @@ -1,25 +1,30 @@ +MT76_DRIVER_NAME= mt76_core + .include -.PATH: ${COMMONDIR} +KMOD= ${MT76_DRIVER_NAME} -KMOD= mt76_core +.PATH: ${COMMONDIR} # Basic stuff. -SRCS= mac80211.c mmio.c util.c dma.c eeprom.c tx.c agg-rx.c mcu.c +SRCS+= mac80211.c mmio.c util.c dma.c eeprom.c tx.c agg-rx.c mcu.c SRCS+= channel.c scan.c wed.c -#SRCS+= trace.c -# Bus stuff. # PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. -.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} +.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c .endif -.if defined(WITH_USB) && ${WITH_USB} > 0 -SRCS+= usb.c # usb_trace.c +# SDIO parts; SDIO depends on an MMCCAM kernel. +.if defined(MT76_SDIO) && ${MT76_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +SRCS+= sdio.c sdio_txrx.c .endif -#SRCS+= sdio.c sdio_txrx.c +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(MT76_USB) && ${MT76_USB} > 0 +SRCS+= usb.c +#SRCS+= usb_trace.c +.endif # Connac-Lib stuff. SRCS+= mt76_connac_mac.c mt76_connac_mcu.c mt76_connac3_mac.c @@ -30,22 +35,21 @@ SRCS+= mt76_connac_mac.c mt76_connac_mcu.c mt76_connac3_mac.c # MT792X-LIB stuff. SRCS+= mt792x_core.c mt792x_mac.c mt792x_dma.c #SRCS+= mt792x_trace.c -.if defined(WITH_ACPI) && ${WITH_ACPI} > 0 +.if defined(MT76_ACPI) && ${MT76_ACPI} > 0 SRCS+= mt792x_acpi_sar.c .endif -.if defined(WITH_USB) && ${WITH_USB} > 0 +.if defined(MT76_USB) && ${MT76_USB} > 0 SRCS+= mt792x_usb.c .endif -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +.if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0 SRCS+= mt792x_debugfs.c .endif -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +.if defined(MT76_DEBUGFS) && ${MT76_DEBUGFS} > 0 SRCS+= debugfs.c .endif -CFLAGS+= -DKBUILD_MODNAME='"mt76_core"' -CFLAGS+= -DCONFIG_MAC80211_DEBUGFS=${WITH_DEBUGFS} +#SRCS+= trace.c EXPORT_SYMS= YES diff --git a/sys/modules/mt76/mt7615/Makefile b/sys/modules/mt76/mt7615/Makefile index 6d7cb945a32d..6eb650a8439a 100644 --- a/sys/modules/mt76/mt7615/Makefile +++ b/sys/modules/mt76/mt7615/Makefile @@ -1,26 +1,31 @@ -DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7615 +MT76_DRIVER_NAME= mt7615 + +.include .PATH: ${DEVDIR} -WITH_DEBUGFS= 0 -WITH_DEV_COREDUMP= 0 +MT7615_PCI= 1 -KMOD= if_mt7615 +MT7615_DEBUGFS= 0 +MT7615_DEV_COREDUMP= 0 # Common stuff. -SRCS= init.c main.c mac.c mcu.c eeprom.c +SRCS+= init.c main.c mac.c mcu.c eeprom.c # PCIe (7622_WMAC ignored) +.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \ + defined(MT7615_PCI) && ${MT7615_PCI} > 0 SRCS+= dma.c mmio.c pci.c pci_init.c pci_mac.c +.endif # USB + SDIO ignored currently. -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +.if defined(MT7615_DEBUGFS) && ${MT7615_DEBUGFS} > 0 SRCS+= debugfs.c -CFLAGS+= -DCONFIG_MT7915_DEBUGFS=${WITH_DEBUGFS} +CFLAGS+= -DCONFIG_MT7915_DEBUGFS .endif -CFLAGS+= -DKBUILD_MODNAME='"mt7615"' -CFLAGS+= -I${DEVDIR} +.if defined(MT7615_DEV_COREDUMP) && ${MT7615_DEV_COREDUMP} > 0 +.endif .include diff --git a/sys/modules/mt76/mt7915/Makefile b/sys/modules/mt76/mt7915/Makefile index 049c919949f6..580fde3b7aa7 100644 --- a/sys/modules/mt76/mt7915/Makefile +++ b/sys/modules/mt76/mt7915/Makefile @@ -1,30 +1,37 @@ -DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7915 +MT76_DRIVER_NAME= mt7915 + +.include .PATH: ${DEVDIR} -WITH_DEBUGFS= 0 -WITH_DEV_COREDUMP= 1 +MT7915_PCI= 1 + +MT7915_WMAC= 0 +MT7915_DEBUGFS= 0 +MT7915_DEV_COREDUMP= 1 -KMOD= if_mt7915 +SRCS+= init.c main.c mac.c mcu.c mmio.c eeprom.c -# Common stuff. -SRCS= init.c main.c mac.c mcu.c mmio.c eeprom.c +# PCI only driver so it better be there (otherwise nothing will attach at least). +.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \ + defined(MT7915_PCI) && ${MT7915_PCI} > 0 SRCS+= pci.c dma.c +.endif # SOC+6E stuff. -#SRCS+= soc.c +.if defined(MT7915_WMAC) && ${MT7915_WMAC} > 0 +SRCS+= soc.c +CFLAGS+= -DCONFIG_MT798X_WMAC +.endif -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +.if defined(MT7915_DEBUGFS) && ${MT7915_DEBUGFS} > 0 SRCS+= debugfs.c -CFLAGS+= -DCONFIG_MT7915_DEBUGFS=${WITH_DEBUGFS} +CFLAGS+= -DCONFIG_MT7915_DEBUGFS .endif -.if defined(WITH_DEV_COREDUMP) && ${WITH_DEV_COREDUMP} > 0 +.if defined(MT7915_DEV_COREDUMP) && ${MT7915_DEV_COREDUMP} > 0 SRCS+= coredump.c -CFLAGS+= -DCONFIG_DEV_COREDUMP=${WITH_DEV_COREDUMP} +CFLAGS+= -DCONFIG_DEV_COREDUMP .endif -CFLAGS+= -DKBUILD_MODNAME='"mt7915"' -CFLAGS+= -I${DEVDIR} - .include diff --git a/sys/modules/mt76/mt7921/Makefile b/sys/modules/mt76/mt7921/Makefile index 1b53df04357c..b6dbe88204a3 100644 --- a/sys/modules/mt76/mt7921/Makefile +++ b/sys/modules/mt76/mt7921/Makefile @@ -1,35 +1,39 @@ -.include +MT76_DRIVER_NAME= mt7921 -DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7921 +.include .PATH: ${DEVDIR} -KMOD= if_mt7921 +MT7921_PCI= 1 +MT7921_SDIO= 0 +MT7921_USB= 0 + +MT7921_DEBUGFS= 0 # Common stuff. -SRCS= init.c main.c mac.c mcu.c +SRCS+= init.c main.c mac.c mcu.c # PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. -.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} +.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \ + defined(MT7921_PCI) && ${MT7921_PCI} > 0 SRCS+= pci.c pci_mac.c pci_mcu.c .endif -# USB parts; USB can be loaded and is unconditional on any kernel config. -.if defined(WITH_USB) && ${WITH_USB} > 0 -SRCS+= usb.c -.endif - # SDIO parts; SDIO depends on an MMCCAM kernel. -.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +.if defined(MT76_SDIO) && ${MT76_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} && \ + defined(MT7921_SDIO) && ${MT7921_SDIO} > 0 SRCS+= sdio.c sdio_mac.c sdio_mcu.c .endif -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 -SRCS+= debugfs.c -CFLAGS+= -DCONFIG_MT7921_DEBUGFS=${WITH_DEBUGFS} +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(MT76_USB) && ${MT76_USB} > 0 && \ + defined(MT7921_USB) && ${MT7921_USB} > 0 +SRCS+= usb.c .endif -CFLAGS+= -DKBUILD_MODNAME='"mt7921"' -CFLAGS+= -I${DEVDIR} +.if defined(MT7921_DEBUGFS) && ${MT7921_DEBUGFS} > 0 +SRCS+= debugfs.c +CFLAGS+= -DCONFIG_MT7921_DEBUGFS +.endif .include diff --git a/sys/modules/mt76/mt7925/Makefile b/sys/modules/mt76/mt7925/Makefile index ee79f09dba1c..c8477eadd7f5 100644 --- a/sys/modules/mt76/mt7925/Makefile +++ b/sys/modules/mt76/mt7925/Makefile @@ -1,30 +1,32 @@ -.include +MT76_DRIVER_NAME= mt7925 -DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7925 +.include .PATH: ${DEVDIR} -KMOD= if_mt7925 +MT7925_PCI= 1 +MT7925_USB= 1 + +MT7925_DEBUGFS= 0 # Common stuff. -SRCS= init.c main.c mac.c mcu.c regd.c +SRCS+= init.c main.c mac.c mcu.c regd.c # PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. -.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} +.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \ + defined(MT7925_PCI) && ${MT7925_PCI} > 0 SRCS+= pci.c pci_mac.c pci_mcu.c .endif # USB parts; USB can be loaded and is unconditional on any kernel config. -.if defined(WITH_USB) && ${WITH_USB} > 0 +.if defined(MT76_USB) && ${MT76_USB} > 0 && \ + defined(MT7925_USB) && ${MT7925_USB} > 0 SRCS+= usb.c .endif -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +.if defined(MT7925_DEBUGFS) && ${MT7925_DEBUGFS} > 0 SRCS+= debugfs.c -CFLAGS+= -DCONFIG_MT7925_DEBUGFS=${WITH_DEBUGFS} +CFLAGS+= -DCONFIG_MT7925_DEBUGFS .endif -CFLAGS+= -DKBUILD_MODNAME='"mt7925"' -CFLAGS+= -I${DEVDIR} - .include diff --git a/sys/modules/mt76/mt7996/Makefile b/sys/modules/mt76/mt7996/Makefile index a43721b6079e..97de923c84ab 100644 --- a/sys/modules/mt76/mt7996/Makefile +++ b/sys/modules/mt76/mt7996/Makefile @@ -1,27 +1,36 @@ -DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7996 +MT76_DRIVER_NAME= mt7996 + +.include .PATH: ${DEVDIR} -WITH_DEBUGFS= 0 -WITH_DEV_COREDUMP= 1 +MT7996_PCI= 1 -KMOD= if_mt7996 +MT7996_DEBUGFS= 0 +MT7996_DEV_COREDUMP= 1 +MT7996_NPU= 0 # Common stuff. -SRCS= init.c main.c mac.c mcu.c mmio.c eeprom.c +SRCS+= init.c main.c mac.c mcu.c mmio.c eeprom.c +# PCI only driver so it better be there (otherwise nothing will attach at least). +.if defined(MT76_PCI) && ${MT76_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} && \ + defined(MT7996_PCI) && ${MT7996_PCI} > 0 SRCS+= pci.c dma.c +.endif -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +.if defined(MT7996_DEBUGFS) && ${MT7996_DEBUGFS} > 0 SRCS+= debugfs.c -CFLAGS+= -DCONFIG_MT7996_DEBUGFS=${WITH_DEBUGFS} +CFLAGS+= -DCONFIG_MT7996_DEBUGFS .endif -.if defined(WITH_DEV_COREDUMP) && ${WITH_DEV_COREDUMP} > 0 +.if defined(MT7996_DEV_COREDUMP) && ${MT7996_DEV_COREDUMP} > 0 SRCS+= coredump.c -CFLAGS+= -DCONFIG_DEV_COREDUMP=${WITH_DEV_COREDUMP} +CFLAGS+= -DCONFIG_DEV_COREDUMP .endif -CFLAGS+= -DKBUILD_MODNAME='"mt7996"' -CFLAGS+= -I${DEVDIR} +.if defined(MT7996_NPU) && ${MT7996_NPU} > 0 +SRCS+= npu.c +CFLAGS+= -DCONFIG_MT7996_NPU +.endif .include diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 2347093db1a5..04000dd66e95 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -5,14 +5,14 @@ DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 .PATH: ${DEVRTW88DIR} # Bus attachments. -WITH_PCI= 1 -WITH_USB= 0 -WITH_SDIO= 0 +RTW88_PCI= 1 +RTW88_SDIO= 0 +RTW88_USB= 0 # Options. -WITH_CONFIG_PM= 0 -WITH_DEBUGFS= 1 -WITH_LEDS= 0 +RTW88_CONFIG_PM= 0 +RTW88_DEBUGFS= 1 +RTW88_LEDS= 0 KMOD= if_rtw88 @@ -22,11 +22,6 @@ SRCS+= bf.c coex.c debug.c efuse.c fw.c mac.c mac80211.c SRCS+= phy.c ps.c regd.c SRCS+= rx.c sar.c sec.c tx.c util.c -.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0 -SRCS+= wow.c -CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} -.endif - # Common SRCS+= rtw8723x.c # 87x3 common SRCS+= rtw8703b.c rtw8703b_tables.c # 11n @@ -37,7 +32,7 @@ SRCS+= rtw8822b.c rtw8822b_table.c # 11ac SRCS+= rtw8822c.c rtw8822c_table.c # 11ac # PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. -.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} +.if defined(RTW88_PCI) && ${RTW88_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c SRCS+= rtw8723de.c SRCS+= rtw8814ae.c @@ -46,8 +41,17 @@ SRCS+= rtw8822be.c SRCS+= rtw8822ce.c .endif +# SDIO parts; SDIO depends on an MMCCAM kernel. +.if defined(RTW88_SDIO) && ${RTW88_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +SRCS+= rtw8723cs.c +SRCS+= rtw8723ds.c +SRCS+= rtw8821cs.c +SRCS+= rtw8822bs.c +SRCS+= rtw8822cs.c +.endif + # USB parts; USB can be loaded and is unconditional on any kernel config. -.if defined(WITH_USB) && ${WITH_USB} > 0 +.if defined(RTW88_USB) && ${RTW88_USB} > 0 SRCS+= usb.c SRCS+= rtw8723du.c SRCS+= rtw88xxa.c # 88xxa common @@ -57,41 +61,35 @@ SRCS+= rtw8821a.c rtw8821a_table.c rtw8821au.c SRCS+= rtw8821cu.c SRCS+= rtw8822bu.c SRCS+= rtw8822cu.c - CFLAGS+= -DCONFIG_RTW88_USB .endif -# SDIO parts; SDIO depends on an MMCCAM kernel. -.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} -SRCS+= rtw8723cs.c -SRCS+= rtw8723ds.c -SRCS+= rtw8821cs.c -SRCS+= rtw8822bs.c -SRCS+= rtw8822cs.c +.if defined(RTW88_CONFIG_PM) && ${RTW88_CONFIG_PM} > 0 +SRCS+= wow.c +CFLAGS+= -DCONFIG_PM=${RTW88_CONFIG_PM} .endif -.if defined(WITH_LEDS) && ${WITH_LEDS} > 0 -CFLAGS+= -DCONFIG_RTW88_LEDS *** 133 LINES SKIPPED *** From nobody Mon Mar 30 07:20:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkjLm5h8Jz6WSfj for ; Mon, 30 Mar 2026 07:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkjLm58KJz42BM for ; Mon, 30 Mar 2026 07:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774855200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJ6RYce2k9OboJErySCfbdD4HKPTXYj/xFmduOsQaOo=; b=obQK48nP1cl18GXRwIHPPFPSFKgE7FagyOogY1+HsNfcaC5eOdrYszrmuaZ4hLDJLIRa0W aVr4ZBRXcil/DYXDwhfaJF6nGOa/9a3wVkweiZM+7VXJ9Xa8R9MsSFG4IxsrxvN3/uUxba LLE2oOZcprqNz4HMeQPKHMVLMXkQB8eSott3+RWW0Gya+4378EI0P25Vo/G4UmLHQmCc2y 7APrxLIPD0HJhWqW3ARzrFE2SB2ijhIGUBjq81RPvaGCMopra3jbq9oFB9JWYdvM3WzJ/U lyH4PkeQ9vqkolVkrADnXV6oAo09SRQq0d6e7NJMHdb/ewsFCm9smwQzxApFBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774855200; a=rsa-sha256; cv=none; b=UDTkQ1evIRAu7LXEDcmZRjzFBRzhHOtrwHLTI9yZeEayQrn2e3zf5JUUP5vdLxiD/RFINt jIjasL1/rpzim8G9Futbe+D9Bf8S3Go5c0djIDHsEXT9uAUJSqv4+SYpTR1D3cxPeRehh5 nO1lnywL7rSE+h/l4wHbU0WdzVakubie6F3BacmHGiUQ4xWGA7i699C7qmbv1lOLds5dLs TU/Rnm/kRR5hXZea2muWlDmsvZ/98WV92UjEB16g+L3VHu5qn+kiBQzUEqO2cwhiH+oTPq uEj1eTCnYy6MSlkmgJO3GqNfvhAdUv2I7Ga5Y0M+EyxwlemJ/LKJKyMrmLPQdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774855200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJ6RYce2k9OboJErySCfbdD4HKPTXYj/xFmduOsQaOo=; b=D8pb9uJPX2NbKPzHEmt8JAOQTJ0lLVoAaGJ7fHDkjd4L8SfsWyhrgY2YuBqIOrqMMC0SPr v5yjb0n/Bi1JyGxIgWkNhG08rcnjqW8yKBxEXCH0Zma6C/HM1ZDSwybVc5bGTUZk+ZAouR I/r7textnQ/vUPUeORB1DFo0vSrYVVgsXqsO4zM8GW0oWEeVj+tPQqmU2mve5Pujyxu7XZ j2iDiOYmFDEJrufI9vgPFZqmfUV1fw+l/Er8tzPHpS5ddyhBbl6Iwcb9/LT+Ib2QuTrFRr dpOvaneDkUYT2Nh/SVpt3ZeQYtLJfdeeYHfyooI98qfFTGA3+9HRFyRBUD0oiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkjLm4fG1zYqk for ; Mon, 30 Mar 2026 07:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18dc3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 07:20:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: e6eba5076929 - main - vmm: Add missing AVX instructions for AVX512 in cpuid stdext List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6eba5076929d0b193c9c94b2658c7e8f5da0669 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 07:20:00 +0000 Message-Id: <69ca2420.18dc3.73859074@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=e6eba5076929d0b193c9c94b2658c7e8f5da0669 commit e6eba5076929d0b193c9c94b2658c7e8f5da0669 Author: ShengYi Hung AuthorDate: 2026-03-22 02:26:56 +0000 Commit: ShengYi Hung CommitDate: 2026-03-30 07:19:44 +0000 vmm: Add missing AVX instructions for AVX512 in cpuid stdext Reported by: Tom Reviewed by: markj Tested by: Tom MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56021 --- sys/amd64/vmm/x86.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 6794110f067a..4ac008499999 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -446,10 +446,19 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, CPUID_STDEXT_AVX512ER | CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA | CPUID_STDEXT_AVX512BW | - CPUID_STDEXT_AVX512VL; + CPUID_STDEXT_AVX512VL | + CPUID_STDEXT_AVX512IFMA; regs[2] &= CPUID_STDEXT2_VAES | - CPUID_STDEXT2_VPCLMULQDQ; - regs[3] &= CPUID_STDEXT3_MD_CLEAR; + CPUID_STDEXT2_VPCLMULQDQ | + CPUID_STDEXT2_AVX512VBMI | + CPUID_STDEXT2_AVX512VBMI2 | + CPUID_STDEXT2_AVX512VNNI | + CPUID_STDEXT2_AVX512BITALG | + CPUID_STDEXT2_AVX512VPOPCNTDQ; + regs[3] &= CPUID_STDEXT3_MD_CLEAR | + CPUID_STDEXT3_AVX5124VNNIW | + CPUID_STDEXT3_AVX5124FMAPS | + CPUID_STDEXT3_AVX512VP2INTERSECT; /* Advertise RDPID if it is enabled. */ error = vm_get_capability(vcpu, VM_CAP_RDPID, From nobody Mon Mar 30 09:25:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkm7F509Sz6WgmL for ; Mon, 30 Mar 2026 09:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkm7F0HgKz3FZn for ; Mon, 30 Mar 2026 09:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774862713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9lBkgsdiXqmArLmOd3V/nCBKmLDfs6DzIrbtaHhJOKU=; b=v0lCixYgpmsvuCErxImK1rdsxd9EaWimxx2wNfqjAj1TReHvOoZAxFRha6HgHN3KTZWv4w XyBoLuRd28XHgAt+lWWnH1fYSE7Rk7kuD6xcEZiG419X3W4IOkVBeRcRCdo/8zCRi9AJru 8Dx3oyqaj2GZeMonnTIz4lWzCWlqOmIVwXQseHRBpr5rwb197O0ZxzGenMD60vqW6rJi6U DiC4z5CNSM+y5dw20uds/R+O+9tn1jZwuqAuSajJWWnM8dN5vrl7JpN6NZ0bB+36IMfoYF wZBPqUSQXthuCuveuBZGbLYT4jW9HaluwbsOw9z9mWtUJz4kQToyiXbBe5gTPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774862713; a=rsa-sha256; cv=none; b=ETj31tuCxtgwAMoGDSl1Gr8Qm7njvberl0lMxLzDKFaBlMnKRHpdESZGUbYskFLYKg6u0x sQdF6oH/FszN2zWDSKBTzkcPbnp9qASIEVVQLfv0IU1lXGMjtWoIblBQiaZwpwrCqRpeHv QEuOfuRJnPw69++kl46qLr2+v1qRzXRhYN5bXpRRXJwZaIp1JPnbGyrUFq+QhA5g7xxMeZ e4/y9PwY2HBGbQCDr0/EQGR6j4/vDXOzyJ7pGgba2fd9URK7T/ApT0r5Yter6cXZcG+BNZ rqnR+RqlMl10yfY2JEb8PH2LISFj/ng6j1FpQUbiNFp9sYaE6io0r8YA0XEqtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774862713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9lBkgsdiXqmArLmOd3V/nCBKmLDfs6DzIrbtaHhJOKU=; b=bU7XfHm0DpRpLWfPT00v97ziPZRxSVqxxDiesXmKpUzHTscTQ3lDSAuQPGPOz5XW1d/2GN Q4OrguykTUJ3YktRxOK7MqxNk0ASDsWx912VqkBBXXgj/hsmmOpxsowjNG5U5K9y9pZSlV Thp7qxE5jnKWHDYa/N9vP0yNQvYvtR+fBdwTiXnydlN4rGGQgSiFSli317ai+yGA5TZPf3 1sINs4pZfWnC5uz6jl3XFO28Q/37y/YpNhh5TYWnV4lHucUGGeluB7O7V1tfHd4KtzhXag GW1cvSngFbHchWH7l1DAM2TgLuzsem7tK6+J9INDYy8Y0l4J3n/Pq8rYbeL9GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkm7D69knzcyv for ; Mon, 30 Mar 2026 09:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27070 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 09:25:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 4deb934c1a10 - main - vfs: Simplify vfs_write_resume()/vn_start_write_refed() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4deb934c1a1051d7ef41e9309d066742722ce180 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 09:25:12 +0000 Message-Id: <69ca4178.27070.49cd4f61@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4deb934c1a1051d7ef41e9309d066742722ce180 commit 4deb934c1a1051d7ef41e9309d066742722ce180 Author: Olivier Certner AuthorDate: 2026-03-27 12:43:24 +0000 Commit: Olivier Certner CommitDate: 2026-03-30 09:24:23 +0000 vfs: Simplify vfs_write_resume()/vn_start_write_refed() The call to vn_start_write_refed() from vfs_write_resume() with 'mplocked' set to 'true' exactly boils down to doing an increment of 'mnt_writeopcount', albeit with lots of unnecessary verifications. Replace it with an inline incrementation. As the original call was the last with 'mplocked' with 'true', remove the 'mplocked' parameter from vfs_write_resume(), simplifying its code accordingly ('mplocked' always false). While here, in vfs_write_resume(), initialize 'error' out of the mount lock. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56108 --- sys/kern/vfs_vnops.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index ea8f8437b743..4061b2272193 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -2078,26 +2078,22 @@ vn_closefile(struct file *fp, struct thread *td) * suspension is over, and then proceed. */ static int -vn_start_write_refed(struct mount *mp, int flags, bool mplocked) +vn_start_write_refed(struct mount *mp, int flags) { struct mount_pcpu *mpcpu; int error, mflags; - if (__predict_true(!mplocked) && (flags & V_XSLEEP) == 0 && - vfs_op_thread_enter(mp, mpcpu)) { + if ((flags & V_XSLEEP) == 0 && vfs_op_thread_enter(mp, mpcpu)) { MPASS((mp->mnt_kern_flag & MNTK_SUSPEND) == 0); vfs_mp_count_add_pcpu(mpcpu, writeopcount, 1); vfs_op_thread_exit(mp, mpcpu); return (0); } - if (mplocked) - mtx_assert(MNT_MTX(mp), MA_OWNED); - else - MNT_ILOCK(mp); - error = 0; + MNT_ILOCK(mp); + /* * Check on status of suspension. */ @@ -2165,7 +2161,7 @@ vn_start_write(struct vnode *vp, struct mount **mpp, int flags) if (vp == NULL) vfs_ref(mp); - error = vn_start_write_refed(mp, flags, false); + error = vn_start_write_refed(mp, flags); if (error != 0 && (flags & V_NOWAIT) == 0) *mpp = NULL; return (error); @@ -2373,10 +2369,12 @@ vfs_write_resume(struct mount *mp, int flags) if ((flags & VR_NO_SUSPCLR) == 0) VFS_SUSP_CLEAN(mp); vfs_op_exit(mp); - } else if ((flags & VR_START_WRITE) != 0) { - MNT_REF(mp); - vn_start_write_refed(mp, 0, true); } else { + if ((flags & VR_START_WRITE) != 0) { + MNT_REF(mp); + mp->mnt_writeopcount++; + } + MNT_IUNLOCK(mp); } } From nobody Mon Mar 30 09:25:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkm7G1YCZz6WgPf for ; Mon, 30 Mar 2026 09:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkm7F6K9Zz3FZr for ; Mon, 30 Mar 2026 09:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774862713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h5vRgVQnDOv0z5dvLPz90uepS2hT3gPk94viqHLPw5c=; b=fGiGJGgAbokXyyAjmst+FOgIzDGgSgZdQN7H1+l2fpcrCGItBscqZYtpPblYiyKQRqG8/u uJ8LdRFGFT3rowg46bK361INSmjbP7Zy0Vc8QgOdiNRNa+XAWWo3o/zRLGva1iNo5d/mdj 85jDXkx5HUvAYnKGpuXGlPta3AzQGhwUZAE8CJd2NRTLBuclibcyKYKxlcpoN371HxZSD3 J3H7iSg2PixIM/fiJfx/N87aSr46KLh+bMXeH6/S7xHPaC3ZOoC2XWQ4hXML5Ukcd9spls u25FyN3WfyhcSRv1YyL1SX0MiW9ELaqLGR3HlhY2zcLRWtMjlC1mxvFMWVOSWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774862713; a=rsa-sha256; cv=none; b=ZpkEthh/MjokcfekWUTbuo11uxECrx6d1AGCIJat/kjwMNN4DS8hOyvvrNK2FIFjRr5ZCJ lolZnT6eTEuK/2MPEI0WUdX0CJJGNwaCOKgWv5iTiflaIXD6iBeZ5KDYh66/X3k2v7UsKt eMK9eAzUxpU5brJtjkOtNkbsqM2JvvbSB0f6kSQSF+19SgkKqC2XOEHPHQfgGYbG65ZEHg prVic/sg0BdUoM5pMhhbiwrS8RG92NioQ39DUgpsVNHr02qbHMmFWwleQyrlEY68qmC/kg hOOJp5y5vqULIY5qADdLWbf/GgbYteCZrbb51YxPzW4kISNXH1XYiT9jxcis5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774862713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h5vRgVQnDOv0z5dvLPz90uepS2hT3gPk94viqHLPw5c=; b=dMUr5hjf7qnEqC93f8CwysWe/o7hHEJW16mMneK0SvbNAw7aV6V+e8PqZQ7tKCnA3xK0qs wMC5ENzfqc7F+IzAvf5E7HsGiQsoZJ179hY0UjU9seSPnW0cDGdUb4cCXEu/qejh/cCif7 NWFbNQLveuVrYpNRxrDSSQx7+QZhD0SKP2LeMJAOYTz2SOZq0yELnTncfGMbu0fHWw98Lf wV4SJn6Q+1Vau79nqyM2KgguM61mX1wXBZ8WV6YiVYuQmuyFWt3PeS5oqMmlYSK0xqHKhp 6I7SNgzuKBylSokgIRP/QjrwWA7FSlOX48lCSKFsCGzYD8IBYWJniLg5ZNsovg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkm7F5w0pzcPK for ; Mon, 30 Mar 2026 09:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 268b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 09:25:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: e220af9cee74 - main - nvme_sim: Fix name in module version metadata List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e220af9cee74082841db9e80cbb73f570f3a570f Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 09:25:13 +0000 Message-Id: <69ca4179.268b8.22038dea@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e220af9cee74082841db9e80cbb73f570f3a570f commit e220af9cee74082841db9e80cbb73f570f3a570f Author: Olivier Certner AuthorDate: 2026-03-30 09:17:04 +0000 Commit: Olivier Certner CommitDate: 2026-03-30 09:24:34 +0000 nvme_sim: Fix name in module version metadata MFC after: 1 week Fixes: 1e39b5d4833e ("nvme_sim: Attach as a child of nvme") Sponsored by: The FreeBSD Foundation --- sys/dev/nvme/nvme_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index a4bb5df4e456..b9f09c8d1f61 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -496,4 +496,4 @@ static driver_t nvme_sim_driver = { }; DRIVER_MODULE(nvme_sim, nvme, nvme_sim_driver, NULL, NULL); -MODULE_VERSION(nvme_shim, 1); +MODULE_VERSION(nvme_sim, 1); From nobody Mon Mar 30 12:10:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkqp012WXz6WDZj; Mon, 30 Mar 2026 12:10:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkqp008rsz3ZXk; Mon, 30 Mar 2026 12:10:32 +0000 (UTC) (envelope-from gbe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774872632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+zNPG0gAJsVww1NHh7okm3hjNfMA0YlpSLLkyQIluYo=; b=jKScTHVj1vTmh7gAYAVuc9VU6cvHTtfqX3KYB6Qc/Ur7IUxdkRobxYDjnBfAHInErXWy+0 mOPaQN2cH/8xdK7xKpGThSxPb9fVg5yMak4xz4Zmp3+yKlsSK5SZexb1YG7vpFeKBllj5Z qTjANobMdiksszw1NjVhdbn9eK3OfAPtiR1zGiuzzNg0/u3LycAsD60kJkdriDsn7MsPF9 b4FNsC88Qs4ZXiYUeDdV0b/IqnKZhNAwPZmvKc4xyS1ULLi/8B+rtkkUnygQd5VLLH/n/1 8+2zBXi2oKRbB0uO1hQqRsZh0ikFLMYtXNiCEQ0TxSmFe2biJ3NYLlqXWhnXIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774872632; a=rsa-sha256; cv=none; b=kahhTfZvygQQUDtt4wKIfIIszXwAcjPll3IZb0zRwGHMiAE7UHNqfPf4XG43mg/qXhroeW wKBMkhtvVxfITGBCGoJv5CKGctITBL8Nhi4JRiwfG1N4ZyirZ3JhtUAHBWMFk0sRY+wG/l 39WwxvCNxcyuKgj9x13mjlAScTopbIh/kWFMPsqhxJV+i68xo+dzBFpH7qtEd4eKUhz2BX 7eFwxKqeKSsmofhQQVc/VXwC8GvBvEtCCuPaIZ3dMghqbSBpfOm5RwRe95wdf3bleprRwZ FnYbuLG3xev8AfcCpMgoSBTZkrN+QSbtddld5Jy0KDZgJQms6h2BdEmQQsXRxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774872632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+zNPG0gAJsVww1NHh7okm3hjNfMA0YlpSLLkyQIluYo=; b=U4ooeTtjbfsuW7CHtjIC8fS8ZuCrRqUamkZ7+p+5CnoLVJv+my0qERnMG6zP/0DTMAmrTr Xkw1miQhw/YwBXAr/3FtZ+ixTavI1RvG+9rj5JspHxojM3GaeL6u8OAFakm8dwZOPSvg6v i29Q1w5VTsdeeua3dJ856LDFLfOEOcIHNPYd8QzetOaVIt8zBTYaxSdG4p46py4pHKL5z7 lZwXnj+jv6KrJXiktccmUtymdzTYL0vGMdGxP9wrR51iHvtQDgUYc1y1CXrgKSQWRlify/ HkLkCPjXFcXXKxyCDmDyK4uoWND1f6huvhkz1mpr8UHR/t88M5MxFkLl15xRow== Received: from localhost (p200300cb870ac9417dd91433b5db3990.dip0.t-ipconnect.de [IPv6:2003:cb:870a:c941:7dd9:1433:b5db:3990]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fkqnz38TWzH2D; Mon, 30 Mar 2026 12:10:31 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Mon, 30 Mar 2026 14:10:24 +0200 From: Gordon Bergling To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aed3bc80fe03 - main - ofed: Fix a typo in a source code comment Message-ID: References: <69c62ad6.45a08.7da2a3bb@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zSqfAH2+gJlVz7yR" Content-Disposition: inline In-Reply-To: X-Url: X-Operating-System: FreeBSD 14.3-RELEASE-p10 amd64 X-Host-Uptime: 1:28PM up 4 days, 5:01, 3 users, load averages: 0.11, 0.13, 0.09 --zSqfAH2+gJlVz7yR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi John, On Fri, Mar 27, 2026 at 09:00:47AM +0000, John Baldwin wrote: > On 3/27/26 06:59, Gordon Bergling wrote: > > The branch main has been updated by gbe: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Daed3bc80fe033ab28e8f01ca= d49e73deb761516b > >=20 > > commit aed3bc80fe033ab28e8f01cad49e73deb761516b > > Author: Gordon Bergling > > AuthorDate: 2026-03-27 06:59:19 +0000 > > Commit: Gordon Bergling > > CommitDate: 2026-03-27 06:59:19 +0000 > >=20 > > ofed: Fix a typo in a source code comment > > - s/refereced/referenced/ > > MFC after: 3 days > > --- > > sys/ofed/include/rdma/ib_mad.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/sys/ofed/include/rdma/ib_mad.h b/sys/ofed/include/rdma/ib_= mad.h > > index 454db78dbde5..45f5ee2ff2ca 100644 > > --- a/sys/ofed/include/rdma/ib_mad.h > > +++ b/sys/ofed/include/rdma/ib_mad.h > > @@ -558,7 +558,7 @@ struct ib_mad_send_wc { > > * ib_mad_recv_buf - received MAD buffer information. > > * @list: Reference to next data buffer for a received RMPP MAD. > > * @grh: References a data buffer containing the global route header. > > - * The data refereced by this buffer is only valid if the GRH is > > + * The data referenced by this buffer is only valid if the GRH is > > * valid. > > * @mad: References the start of the received MAD. >=20 > Please refrain from future fixes in sys/ofed as it is really vendor code > (similar to sys/contrib) and local diffs like this can create conflicts f= or > merges from upstream. I realize it is a bit confusing as it is not under > sys/contrib. :-/ sorry, I wasn't aware of it. In my find commands I ommit contrib and sys/co= ntrib and have a few drivers on my list that are vendor code. I have added sys/of= ed to the list and will not commit any typo fixes to it. --Gordon --zSqfAH2+gJlVz7yR Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEYbWI0KY5X7yH/Fy4OQX2V8rP09wFAmnKaCAACgkQOQX2V8rP 09yaYAf/YtY+TKnjCV8ntM5xS1tJLum+v864zQi2OhG511rBF9af2GiE/kDZHBTE EviFOMRfBw1juxGwFFRq2faSy6njZ2aKX3pxYebZNJOGyKR0wqq2fe6CDYCLkf/y BYWg0RIpJF4A2F7mrEMqg8/c6uZdjz6gfOCs5ypTVLRIfbhseu0JvQgXdSp9lpo8 QgnpQL2fikHTwU0Uy0rQRaYwS9kJoTnZlnyCuxKByvhoXdk0R5PKPQjPSjvzYAHq OnwUENDbVPQVztOL4/ES+MBsmULR+1z/Tna4dxCAGZ4VnL3kQi18kR4iV6C+WRQQ 22PEAqDFe2aWx5SersNTig2pAS/XVA== =i5Q5 -----END PGP SIGNATURE----- --zSqfAH2+gJlVz7yR-- From nobody Mon Mar 30 13:41:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fksq24Qrmz6WQGC for ; Mon, 30 Mar 2026 13:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fksq223h1z3lF8 for ; Mon, 30 Mar 2026 13:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774878094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FH/xQnVaF5MkwlUqWWi93xxwGqF78wCGetBs9JAKBA=; b=mNt3WEPyCYyeSc2AS2/ybKmJ6XbcTpx68n2vulyrPgaykXA0LqKr/QDKQCMamqerfZUTdw VGk6h0mr5LQrsjPo2AOUFpm3DtGHuJ2pTx5SmkOylKBdW1MgfhsLKiEYEL9+oaJYwqBts8 gEc2e3BwlK17r8ej+38W4uERrxOsk3SqqQIM61+jKAQEUqoplB2zzzIjQsbTCjQf56jl+Y qDXoHQDrrSSmeeQm0jRwjQ+rvPx2p3gWNHVWByP196b93gYqGR452Ii7OzAC3p72Bksmal fIP7J1g4pYYxgSOBTa1Bkdv2OxbnyMXXNYYijkJpPES0vNJF/WO3faKjEAPASQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774878094; a=rsa-sha256; cv=none; b=XMO3vf/YA6wWBd5jNUNxzwuiyws7yZbgS2kIAgBK0CeDiKtMYkNditDV8b/AN/2dt/GfwH nGKM3ek/L6HpK/o/sHeQ2RGMGUpBxJqJSk19eeVCBcYQej1JmcbBimVGQnkLGBLMZizK/z MMNMQmNuRLP/4Py5NkPNf6R9MjJl1P7uV4ROgD6eQzz1Ron9+ni4Y1g5ACKfRgrD4xpGbs XdImCgiNr0Ac7NGUe4ilweKdCi757B69nEbfbOy9OaQyTk94Q9viRXRpdAlkj2700oAvHy dtqj3KcQpAjgnR1HqmOsxQTKR+FMNizCZVbQPdMXa1yg3JCNd5A8ViubVRhXqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774878094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FH/xQnVaF5MkwlUqWWi93xxwGqF78wCGetBs9JAKBA=; b=nsjmCHVwLxisJGThSwcMu24yfeaHofvYbX4vn/S4RM36oV1Wy8rZ+fNgdJop4B/rJ2zmQL VxMzHWxEIkmOj/jiaLJlIiACFRb/t22vfkDBpTwidgag49SxlO4M5JHnXgRWxkvzMOmpJ0 SJWnjBx7T1A/j4CoLsok36y08CLSSt9qgRLYSmhaxoBID5uoHT+RTzfsM6pLHuYcowOKJs G3ItYJ9zXu/ZnilIG3xWZO6x5Q3z2FVQUWC00POSREov3spTi8G58WVuRzD1ZEMsp7HbNd O1qIqtWllRIordlcZzp5/ggomj9hPCfcc55a+fAGnKoGO3XmQO1pElLjZ7vdNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fksq213R7zls9 for ; Mon, 30 Mar 2026 13:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 245f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 13:41:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: cc2715cf1f86 - main - acpi_apm: Narrow scope of ACPI_LOCK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc2715cf1f864345ab175db691d4e152d5fb84af Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 13:41:34 +0000 Message-Id: <69ca7d8e.245f6.17fbbc14@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc2715cf1f864345ab175db691d4e152d5fb84af commit cc2715cf1f864345ab175db691d4e152d5fb84af Author: John Baldwin AuthorDate: 2026-03-30 13:38:54 +0000 Commit: John Baldwin CommitDate: 2026-03-30 13:41:06 +0000 acpi_apm: Narrow scope of ACPI_LOCK This lock doesn't need to be held across seldrain/knlist_destroy. It is also redundant (and a bug) to hold it across knlist_add and knlist_remove since it is the mutex for the knlist. PR: 293901 Reported by: Jiaming Zhang Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55994 --- sys/x86/acpica/acpi_apm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index 919f76949dd4..71e2573d5fde 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -243,9 +243,9 @@ apmdtor(void *data) /* Remove this clone's data from the list and free it. */ ACPI_LOCK(acpi); STAILQ_REMOVE(&acpi_sc->apm_cdevs, clone, apm_clone_data, entries); + ACPI_UNLOCK(acpi); seldrain(&clone->sel_read); knlist_destroy(&clone->sel_read.si_note); - ACPI_UNLOCK(acpi); free(clone, M_APMDEV); } @@ -408,11 +408,9 @@ apmkqfilter(struct cdev *dev, struct knote *kn) struct apm_clone_data *clone; devfs_get_cdevpriv((void **)&clone); - ACPI_LOCK(acpi); kn->kn_hook = clone; kn->kn_fop = &apm_readfiltops; knlist_add(&clone->sel_read.si_note, kn, 0); - ACPI_UNLOCK(acpi); return (0); } @@ -421,10 +419,8 @@ apmreadfiltdetach(struct knote *kn) { struct apm_clone_data *clone; - ACPI_LOCK(acpi); clone = kn->kn_hook; knlist_remove(&clone->sel_read.si_note, kn, 0); - ACPI_UNLOCK(acpi); } static int @@ -433,8 +429,8 @@ apmreadfilt(struct knote *kn, long hint) struct apm_clone_data *clone; int sleeping; - ACPI_LOCK(acpi); clone = kn->kn_hook; + ACPI_LOCK(acpi); sleeping = clone->acpi_sc->acpi_next_stype != POWER_STYPE_AWAKE; ACPI_UNLOCK(acpi); return (sleeping); From nobody Mon Mar 30 14:04:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fktKC6w3Jz6WSYv for ; Mon, 30 Mar 2026 14:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fktKC5PSVz3pls for ; Mon, 30 Mar 2026 14:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774879455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KbLvfYA406bwTCtx8HPoMRkVEz+e0j+3XOXvUjtc9o=; b=Dvvd4IDXjflmsnArP+QcC68fj6Ljg0Eam7b91VxLlbyXr7xzUltw7PjQm7FhEjK+wMCPN1 zM7z1kX7GTQGtBwjDX76Dk18/1Ig1r45N6jwmWuwfgOPADXrNwtqN6KRDbnneC9fcp9bQG w7KT1hRI3+RaX2ea5WtF3jdezVMSDE9szwjke//0zW+guf28u7Pkj5JebrvhK1UpI4iC4t tZZwLapIHFDoXIighv6jWmePsFg9O3s61Xz+vVnyULaIJRigO4c8eo71ga9eaNYGrI7Iu2 DSGKHWKYfqIT3ggm8SoyA5Mn49vXRd5ob0aUsTKNg3eRTqIChs+1z3DbbOc2nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774879455; a=rsa-sha256; cv=none; b=MwxAwaFY+Lw5w4VOMe4G21KzHz7cBy1xLeuGl5QvF91rTNleXwe+ihtqyvabrNtTq6MHoS cF8wUyAv16WTJMs4zWUnJOsv4RVOfL0OoP8DM/ingUThpIFtk5OLzoLOc/42IY422Y+42s HnKncrcKCazewLLuzaP961J+J5sC2qSMibpkmzv4J4qy+65v4aT8oguBPXrWKzTtznmJrS mFRcBdj2fG91OJ1Sedif0a7LdpeHWfZawPaKGQYQu1127+DvKtDn1PvUv8l8V6bEqSNAgS Xz5/qtfa+wg+Wq6oj5hzF+wviEED5oZQVJdWoRFWJM4fTuXcwd9O8DWsBoMaMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774879455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KbLvfYA406bwTCtx8HPoMRkVEz+e0j+3XOXvUjtc9o=; b=FHLZQtkrvUvGpouF3mLJMjWabzjtCK8a8swB7jjn79PSygiF7JSecvcd1YczSw4XqpD2lS 55JCz+HAArGBfHS44MlsPAtpGKuR+OCu2UZ+Khvitn3Z19GrzPvxae6vPHnZp9TKFoVjQ4 7Kab/6FE+t1OJ/w6us+s7YAtdX9USNfMYyPc/KrkcX8bW73Fdxo01dyUzw1tvxV4Jz7ycm w9pLKDHPbiaXggEkbE6uCtljKAPaz5D5uWU3/KLMSvUVBVkUhJZ9/JXrNNkJTYorPgp6KX OgtiXVAD0cidfU6noeSLEAARn/Ufe9p9tz4QcFDo26cBgxfTL41GC6SX3+MFng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fktKC4V5gzm23 for ; Mon, 30 Mar 2026 14:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24de6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 14:04:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 0a6dbf51d8ea - main - pkgbase: Move all of ATF into the atf package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a6dbf51d8ea112a1d164be260004ec795b4368d Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 14:04:15 +0000 Message-Id: <69ca82df.24de6.2baba8c0@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0a6dbf51d8ea112a1d164be260004ec795b4368d commit 0a6dbf51d8ea112a1d164be260004ec795b4368d Author: Dag-Erling Smørgrav AuthorDate: 2026-03-30 14:03:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-03-30 14:03:29 +0000 pkgbase: Move all of ATF into the atf package Parts of ATF (including the licence and some of the documentation) were for some reason part of the tests package instead of the atf package. Moving them to where they logically belong poses no problem since tests already depends on atf. PR: 294129 MFC after: 1 week Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D56158 --- etc/mtree/BSD.usr.dist | 4 ++-- libexec/atf/atf-sh/Makefile | 1 - share/doc/atf/Makefile | 12 ++++++------ share/man/man1/Makefile | 10 +++++----- share/man/man4/Makefile | 10 +++++----- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index b9ee785ab8b2..7fa3f769e53a 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -199,7 +199,7 @@ sbin .. share - atf tags=package=tests + atf tags=package=atf .. bhyve gdb @@ -236,7 +236,7 @@ doc IPv6 .. - atf tags=package=tests + atf tags=package=atf .. kyua tags=package=tests .. diff --git a/libexec/atf/atf-sh/Makefile b/libexec/atf/atf-sh/Makefile index afd848581f36..a76b59e9a1aa 100644 --- a/libexec/atf/atf-sh/Makefile +++ b/libexec/atf/atf-sh/Makefile @@ -71,7 +71,6 @@ FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr -SUBRTAGS= package=tests HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/share/doc/atf/Makefile b/share/doc/atf/Makefile index 27f820bf86a0..e4a345f9b092 100644 --- a/share/doc/atf/Makefile +++ b/share/doc/atf/Makefile @@ -24,13 +24,13 @@ # SUCH DAMAGE. # -ATF= ${SRCTOP}/contrib/atf -.PATH: ${ATF} ${ATF}/doc +ATFTOP= ${SRCTOP}/contrib/atf +.PATH: ${ATFTOP} ${ATFTOP}/doc -FILESGROUPS= TOP +FILESGROUPS= ATF -TOPDIR= ${SHAREDIR}/doc/atf -TOP= AUTHORS COPYING NEWS README -TOPTAGS= package=tests +ATFDIR= ${SHAREDIR}/doc/atf +ATF= AUTHORS COPYING NEWS README +ATFPACKAGE= atf .include diff --git a/share/man/man1/Makefile b/share/man/man1/Makefile index c4ba33ff086b..19d6a655ced6 100644 --- a/share/man/man1/Makefile +++ b/share/man/man1/Makefile @@ -100,11 +100,11 @@ RUNTIMELINKS=\ builtin.1 while.1 .if ${MK_TESTS} != "no" -MANGROUPS+= TESTS -ATF= ${SRCTOP}/contrib/atf -.PATH: ${ATF}/doc -TESTS= atf-test-program.1 -TESTSPACKAGE= tests +MANGROUPS+= ATF +ATFTOP= ${SRCTOP}/contrib/atf +.PATH: ${ATFTOP}/doc +ATF= atf-test-program.1 +ATFPACKAGE= atf .endif .include diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 7612bead9580..ade0168cb0a6 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1054,11 +1054,11 @@ MAN+= mlx5io.4 .endif .if ${MK_TESTS} != "no" -MANGROUPS+= TESTS -ATF= ${SRCTOP}/contrib/atf -.PATH: ${ATF}/doc -TESTS= atf-test-case.4 -TESTSPACKAGE= tests +MANGROUPS+= ATF +ATFTOP= ${SRCTOP}/contrib/atf +.PATH: ${ATFTOP}/doc +ATF= atf-test-case.4 +ATFPACKAGE= atf .endif .if ${MK_PF} != "no" From nobody Mon Mar 30 14:04:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fktKF0PGBz6WSLM for ; Mon, 30 Mar 2026 14:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fktKD5wF4z3pp0 for ; Mon, 30 Mar 2026 14:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774879456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1XC7+cJATj5iiSkHO4JfaUFIF7K9OA2XEUitlGu5RM=; b=nSC0bM/v2xJHVKfpVFU7ppIzFHrMilvok950YFJk5kYe4G3Wi3KweLu8uQuh9iBymMRc8G 37tL7KTSbOAuy/ayx5GM6shXKNt8/PA5oPXEtV+oNI4BdmVcaYGDgQLw4BxzViiZ4zgtVe Oo91Ky+7CsjyS5/Q4QD8OauAOGlu9QCUZ+93sZY4wyNxqF/d7dwwRjbzrWH6/7odm2p4pn APDFyn/fykZLIRujW6NE3kdtafyqUg8ppKaSv07ugn0YApiS5eQG2wkfJ4eGwyLKrwRXJS G5f0NNllAO+ChqKy2MhndAGI6hQnywn5Br8cBAfwG6rQdPZCF25X6qpVwxeyaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774879456; a=rsa-sha256; cv=none; b=G641UL4SXDRgZpgmPyvJ0a033VTx15SAqReP6k/sUOPFJ3T3g+ZhJSP381iY+mQ8w6YJTI MUbSPPO3vY0eez0zF2HaK50B/FpFIrjOHT9qarxuar8E34OE4lYzV4kQiKAVjRilXTAFWI +RG63dnGGzlGM2VccueeJZ8sOmkWJIeoubHezG2nUFrhmZQytT1wWuRX0FqcJTsrFSpQqe VCU7V/RS7z3B4B0smXdGjydPhr3AkfYj2KSnIxXr11weh3nRwrgb1We3ZGQ0+Jvop8Be2J fbBok5chJBVFMhowU2vGsd9G7SqV9Si6ly9S7jkwl3ylpDJxtDExuWXU37YV2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774879456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t1XC7+cJATj5iiSkHO4JfaUFIF7K9OA2XEUitlGu5RM=; b=NqY6Ch4xSwQ/MYVW1a3p9nipnHtcHwdYiILNV30xPaZie68h+5GQ7eVP7CzAUTZrEgNL/I 8+KpLsL/eB1RYUZkoq+G/F0xAygEUrkdRCk1d/F2x1Kb5eQ+T5R1sqCFW1VqjSvNjM8YBl /0fJZa83FkZN5nT46/2uaIYEtz68xdh/+LulACR6jrU0qDGR4lOfoX6jtgWU62Gg81kLqK VGEOylScluXYQX6E+OJZYkGUXZTfUmbiVTF4uxGcuL+/XVPJj9JeWva7S18NbbdX1pB3kG HtmilYkB262zvzxgNzw8PLStHsV9MOdTPEKbeUn9AATMdKSDDnJNcNjO03avsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fktKD5L7FzmTZ for ; Mon, 30 Mar 2026 14:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25ce3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 14:04:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 40e8afadc393 - main - pkgbase: Move all of Kyua into the kyua package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40e8afadc393a102f4199228ae2047d3e6c71251 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 14:04:16 +0000 Message-Id: <69ca82e0.25ce3.2be5a68f@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=40e8afadc393a102f4199228ae2047d3e6c71251 commit 40e8afadc393a102f4199228ae2047d3e6c71251 Author: Dag-Erling Smørgrav AuthorDate: 2026-03-30 14:03:18 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-03-30 14:03:29 +0000 pkgbase: Move all of Kyua into the kyua package Some Kyua directories were improperly tagged as belonging to the tests package. Move them to the kyua package, which contains all of the files found in these directories. PR: 294129 MFC after: 1 week Reviewed by: ivy, emaste Differential Revision: https://reviews.freebsd.org/D56159 --- etc/mtree/BSD.root.dist | 2 +- etc/mtree/BSD.usr.dist | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 95a3361b3c61..d5ef29c51a92 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -63,7 +63,7 @@ .. jail.conf.d tags=package=jail .. - kyua tags=package=tests + kyua tags=package=kyua .. mail tags=package=runtime .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 7fa3f769e53a..f9577e3c8085 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -238,7 +238,7 @@ .. atf tags=package=atf .. - kyua tags=package=tests + kyua tags=package=kyua .. legal .. @@ -334,7 +334,7 @@ .. .. .. - kyua tags=package=tests + kyua tags=package=kyua .. libusb20 .. @@ -483,10 +483,10 @@ .. .. .. - kyua tags=package=tests - misc tags=package=tests + kyua tags=package=kyua + misc tags=package=kyua .. - store tags=package=tests + store tags=package=kyua .. .. locale From nobody Mon Mar 30 14:13:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fktWm4ys0z6WTFY for ; Mon, 30 Mar 2026 14:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fktWm2sWfz3rQw for ; Mon, 30 Mar 2026 14:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774880004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Le+QZZLTs7d2kbt+xatWmeFoImfThkn7wLd0LpBqig=; b=U6Odr8V0W4vsI32+maw1KXqwPcEWZn8eLv1DDIMax/g1AlFCV1GxdE//pKsPmzctXkhC0e kasA8jV7EqQ1S6cpnAFW9A37M326bSGkmbLAGHQukW9xi9UH8kEyZJQYN/7qRoWJQm3YFh 1Ydotoe1u/6iKu/fTZvx5ErzIlcg3VXJzCmLdCWW5Hyo97ZDr+zn7lrYkUcLGFyILxoZ7S eIZ1c1Vy2KXa64xUUP5mNS+PgnnSw67y4CtWzNK0tXqc/4QCg/ecR60iJOu8VxPhGWnj6M K8fuRRRwDLN2wKVdY4swce4GDJirNzgzRohihhjB2bYWX8wHxInvrKEXBlLIPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774880004; a=rsa-sha256; cv=none; b=phdamG7B5pBQ9e8GInVMPj/HYoyMVpoeEGuvLqhBb9ZqfdGf9Jb2CcMfuHrBo4EbqwCvyx crmd+vohEJS2aq5eTwl6THSK4sUidJ+YwdqMHq71i42Dlp9HbbKKE5zICBcMKfFA+jHhns nzLyEdY3Yt6Yz+FACBRw9PCDahCmhdFHHWTo56h8GHNuIQI1rnJtj3B2x8+/lKXePKAQVe a/XvTAKjiMrwyMu4wxqNRKI0TkGOvqYgu800J5ptz7bRHPtNLyD+fU0nppoya1hfsFlkKi /ylPkEl8U07+NvNhgvNVj3Iv5vIgMQ7zh7AODrrilRsMR/jfN80doypbzIyReQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774880004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Le+QZZLTs7d2kbt+xatWmeFoImfThkn7wLd0LpBqig=; b=QUdc8w04IU330xK3QYddxhr6+QyEGaiis5JXwTJTBcd9Dyp1Bj4ZVasf8rRFPZJuOMQGBt G+vEs0bQpDbYyiVSBkGfUFsPbH1aqHiDwTGZ/YNxYnlbrNHvu1413u76FqkLHUZi5jk7gJ rWSDyPQ7NHk6Si4Hfhz+hAF6Jv9tEQ9cT9uEEZH3cvuxcSNEv7Yb5jM3JQ2Wu3tVyXPLc2 XU+H42Tb5LyyYIpi1n6Pm7U7vn8Bnmm3uoapOrFKtZmpExS6eBkrcYzCnhPQgkQyGx/G/U 8TCB+xbdE59/p33xSVlT47lbUXhvIf6TLQCmcCaNW48X75j0kYAjvDlqSYaO6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fktWm2SjDzmXd for ; Mon, 30 Mar 2026 14:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2609c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 14:13:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 0efd33382504 - main - snd_uaudio: Retire sndcard_func usage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0efd33382504d3172734fa21325fcabef9c7f063 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 14:13:24 +0000 Message-Id: <69ca8504.2609c.5ed38d62@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0efd33382504d3172734fa21325fcabef9c7f063 commit 0efd33382504d3172734fa21325fcabef9c7f063 Author: Christos Margiolis AuthorDate: 2026-03-30 14:13:16 +0000 Commit: Christos Margiolis CommitDate: 2026-03-30 14:13:16 +0000 snd_uaudio: Retire sndcard_func usage This is effectively a no-op, as it does not make use of the sndcard_func->varinfo field, so eventually ua_probe() always succeeds. Also change ua_probe()'s value to 0. There is no need to return BUS_PROBE_DEFAULT, because snd_uaudio() attaches the sound(4)'s children with bus_attach_children(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56160 --- sys/dev/sound/usb/uaudio.c | 5 ----- sys/dev/sound/usb/uaudio_pcm.c | 13 +------------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index dd8aa8c9fafe..65976ced8a75 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -367,7 +367,6 @@ struct uaudio_softc_child { }; struct uaudio_softc { - struct sndcard_func sc_sndcard_func; struct uaudio_chan sc_rec_chan[UAUDIO_MAX_CHILD]; struct uaudio_chan sc_play_chan[UAUDIO_MAX_CHILD]; struct umidi_chan sc_midi_chan; @@ -1112,8 +1111,6 @@ uaudio_attach(device_t dev) /* attach the children */ - sc->sc_sndcard_func.func = SCF_PCM; - /* * Only attach a PCM device if we have a playback, recording * or mixer device present: @@ -1130,8 +1127,6 @@ uaudio_attach(device_t dev) DPRINTF("out of memory\n"); goto detach; } - device_set_ivars(sc->sc_child[i].pcm_device, - &sc->sc_sndcard_func); } bus_attach_children(dev); diff --git a/sys/dev/sound/usb/uaudio_pcm.c b/sys/dev/sound/usb/uaudio_pcm.c index 0b3da9b20440..c24c111f983c 100644 --- a/sys/dev/sound/usb/uaudio_pcm.c +++ b/sys/dev/sound/usb/uaudio_pcm.c @@ -190,18 +190,7 @@ MIXER_DECLARE(ua_mixer); static int ua_probe(device_t dev) { - struct sndcard_func *func; - - /* the parent device has already been probed */ - - func = device_get_ivars(dev); - - if ((func == NULL) || - (func->func != SCF_PCM)) { - return (ENXIO); - } - - return (BUS_PROBE_DEFAULT); + return (0); } static int From nobody Mon Mar 30 14:46:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkvGH1FNlz6WXSn for ; Mon, 30 Mar 2026 14:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkvGH0bXfz3vxV for ; Mon, 30 Mar 2026 14:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774882007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N4Y3xB4IMOe1lOIoFnpzVRHcmRJzpErX/+ryOno9fQw=; b=sQ1lfO5AYnQxCS5HkZuh+jQb49+tguWv4if2oWJ4QMPsfiWtdJ5RluCeZuSO+JY/Xa//P2 EA4sR65lTKB9z4LeTw8CPcSoSVO3c7DNf/w5Jr/y7SNzqY8PkKEJvv8vFAMjPiiRb9aApD pMjoB2wMvx1UNQGdDjgiwt0yc5NonkEo9XCSDfBLFf1FuPwqVtxf4ggHHrQIM7a/tNe4va WodUid7AQzYwdVuDkZcih5HPHEld3pKq2lUXKo0GEbqQ9QNqaQdtpmxrFWF5NNyIzk/DDK OzzS6LP6J9Twp+9hcG24XGjmPEaPXSLhMmtvn4b38+iTpf0D5TQLKDwVxqkODA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774882007; a=rsa-sha256; cv=none; b=v3tu/YPwCo9l07w5nN38kLIz0o1GEJmPRWXhcmoJ7p06hMZUc6cmgQE7+Us2ooW+HvrkNC QuOXkrRxcscaqqoJ0mz/ttlUdCx7m7cBsBH3BL+c4MCpdLOOuCEq7n2uzyPtusU5mPDBPT HR9yLR3O/0KVIIJRNkrpacP+I0xUhslMaUk2rMyt16IF3ntnsthuBGsVCrXST6dlK78/Ub fvfMpM618CNs4BlrbIxi1BXuGLQEM1+ICNlANaq90+rwkm2FeTGdMgEm3kNQQTMlSBbGb/ PDJaU6l7seoT0r2KRDeHh3Afbvjs/kUgmL/iI9grzGh2eb+ja4IHNj0yLaRANA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774882007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N4Y3xB4IMOe1lOIoFnpzVRHcmRJzpErX/+ryOno9fQw=; b=m6mXNTKKgYBQB5kY2R7R/FHzq1naYmBtoP2FBwjsRX0OZpoQJFh9+40e9Yqbqr8uQT4gk1 /EDaPF84jLDjF13mJvzB2BCy7ZVxcCNTHSJZW8HA2AOnbzMmyfPdKnCAWCON0CjmQ4u7+W n4FvhtVKxVyKYKqEtcU5v4ugZzKcdG+ehiP+5a07FMV8Mu1FN/TEFnSe1sS1SR68xENjVj V07Slw79y9xozw9G8VTAhcg/+6z4t5WHyUOKNeFXAi+GY6j/CvGBt0FqafmFEFW9hBsMFc KUKwmsBwaV/9r6QWPymttgpiM1YRdGldGC0lWYp50rzYLO7k0QdXiOGMpTISIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkvGG6z26znSy for ; Mon, 30 Mar 2026 14:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30ec2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 14:46:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Popov Subject: git: 0f147784de10 - main - stat(2): Send to sticky(7) in the S_ISVTX description List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f147784de1037a662b0bd0aaa5f7f7bd7876e37 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 14:46:46 +0000 Message-Id: <69ca8cd6.30ec2.35ebef7b@gitrepo.freebsd.org> The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/src/commit/?id=0f147784de1037a662b0bd0aaa5f7f7bd7876e37 commit 0f147784de1037a662b0bd0aaa5f7f7bd7876e37 Author: Gleb Popov AuthorDate: 2026-03-21 11:11:15 +0000 Commit: Gleb Popov CommitDate: 2026-03-30 14:46:38 +0000 stat(2): Send to sticky(7) in the S_ISVTX description Approved by: ziaee Differential Revision: https://reviews.freebsd.org/D56015 --- lib/libsys/stat.2 | 2 +- sys/sys/stat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libsys/stat.2 b/lib/libsys/stat.2 index 8107740bd901..b31975ee068f 100644 --- a/lib/libsys/stat.2 +++ b/lib/libsys/stat.2 @@ -295,7 +295,7 @@ has these bits: #define S_IFWHT 0160000 /* whiteout */ #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ -#define S_ISVTX 0001000 /* save swapped text even after use */ +#define S_ISVTX 0001000 /* sticky(7) bit is set */ #define S_IRWXU 0000700 /* RWX mask for owner */ #define S_IRUSR 0000400 /* read permission, owner */ #define S_IWUSR 0000200 /* write permission, owner */ diff --git a/sys/sys/stat.h b/sys/sys/stat.h index 6aa536732efd..0c58838094ed 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -273,7 +273,7 @@ struct nstat { #define S_IFREG 0100000 /* regular */ #define S_IFLNK 0120000 /* symbolic link */ #define S_IFSOCK 0140000 /* socket */ -#define S_ISVTX 0001000 /* save swapped text even after use */ +#define S_ISVTX 0001000 /* sticky(7) bit is set */ #endif #if __BSD_VISIBLE #define S_IFWHT 0160000 /* whiteout */ From nobody Mon Mar 30 16:02:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkwxJ4td2z6WhVF for ; Mon, 30 Mar 2026 16:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkwxJ41xvz47GV for ; Mon, 30 Mar 2026 16:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774886532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g863N5nPu3sdp8yoWgaapcFfuXv8W4PyiaKyuRJXXto=; b=Zh4bQvxc6PfLbfFLJlNy4noBTHYD1/ykKzoX6bufKywF0ID5czfkqSxa1OLX3igMRscbuc V3cbNaT2MCE4C3xmqgeziZKIb23rVQvPRYM9V8lJkAYA1pGcPi/yL1yaqE2B1zJxILN00u +KFBQ2BFLMQ9Bc4xXvYZUR0AtEHmEw5Zj6NYLAz6eQG+O7iDEoNLLu+QI4mJvojBIEBD11 bFItvjPq6FPAX7GtorGCkEOsIsSpbtJhW8OUnmE8fwJlhiZ8ey9yQsrRQbjrkpIM9qEMyc XkmmbzVmafjQlsYckwzUD02bDrBN6m1EESin3lbo7Y5NBEKRQPImLGEISZhMEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774886532; a=rsa-sha256; cv=none; b=uorq2uxQi3WMbUCEtZyJEtL9NsxyZpOwmmEVYnxUgnKp877rlJG0ysLqXuXc1K2RTP1TPw yLkkYWLQkGdGut4SbEEiXGoROXwbXL/mx+JyDRLTUZcuiWl333ru0ktYtVpRlfXQnIN+a6 mNGe8FuTJ2phM2mOGnn3bwqOd5PtM0bNFs3g3d62SkZ+vHSALhDfoAnH8v3IsfmwWws80M Nr97005Wgn0gCmscIczCOdGakf2QjGeZqqhvyIIz59BK3Uyci/+wJAlO2GMMRlskkqgSO7 vrClh0WG1Ybhm8l6A3X61uq6KynijJ8ProW+1xKkHkhspBi+E4IY+udr0q1W8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774886532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g863N5nPu3sdp8yoWgaapcFfuXv8W4PyiaKyuRJXXto=; b=kWMYm3KmSapUS/qVdldlhePu8VbEfITu7NZ0eUCoHX+p3CxTwyLv8CyYF5wZ2OxNAyQJLE SsIsaKGCpmqI7MA+O5FLbQEpJKHBkNOKw/P+mtNAriYJI3myt+ok4qA7NhTW7tEopKS2WZ /ws7Qroa9zOyS5HbeCNLHvOdvsRaK8JtTsy2au3NxU3daHtZiEVw3nI2UvtXi+1hmhllo3 dMiRxg5lKHn8RewrCFr1iM/utfK85PW33391xOcmkUKZPG9+crXXbx/FIDmyujJ/norJBx AJ0ukNchXTmOaJUTvk0nLBS8vz/CSkfzPQsyMjYrbllvc39QO1Zgd82DVPPFZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkwxJ3YgrzqLV for ; Mon, 30 Mar 2026 16:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39858 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:02:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: ee9456ce3753 - main - ifnet: Fix races in if_vmove_reclaim() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee9456ce37539da5b651945eea18502f290eb133 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:02:12 +0000 Message-Id: <69ca9e84.39858.1a21c3c1@gitrepo.freebsd.org> The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ee9456ce37539da5b651945eea18502f290eb133 commit ee9456ce37539da5b651945eea18502f290eb133 Author: Zhenlei Huang AuthorDate: 2026-03-30 16:00:01 +0000 Commit: Zhenlei Huang CommitDate: 2026-03-30 16:00:01 +0000 ifnet: Fix races in if_vmove_reclaim() The thread running if_vmove_reclaim() may race with other threads those running if_detach(), if_vmove_loan() or if_vmove_reclaim(). In case the current thread loses race, two issues arise, 1. It is unstable and unsafe to access ifp->if_vnet, 2. The interface is removed from "active" list, hence if_unlink_ifnet() can fail. For the first case, check against source prison's vnet instead, given the interface is obtained from that vnet. For the second one, return ENODEV to indicate the interface was on the list but the current thread loses race, to distinguish from ENXIO, which means the interface or child prison is not found. This is the same with if_vmove_loan(). Reviewed by: kp, pouria Fixes: a779388f8bb3 if: Protect V_ifnet in vnet_if_return() MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55997 --- sys/net/if.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 41084ecf0516..bdb5671c1afb 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1242,7 +1242,7 @@ if_vmove_reclaim(struct thread *td, char *ifname, int jid) struct prison *pr; struct vnet *vnet_dst; struct ifnet *ifp; - int found __diagused; + int found; /* Try to find the prison within our visibility. */ sx_slock(&allprison_lock); @@ -1255,16 +1255,16 @@ if_vmove_reclaim(struct thread *td, char *ifname, int jid) /* Make sure the named iface exists in the source prison/vnet. */ CURVNET_SET(pr->pr_vnet); - ifp = ifunit(ifname); /* XXX Lock to avoid races. */ + ifp = ifunit(ifname); if (ifp == NULL) { CURVNET_RESTORE(); prison_free(pr); return (ENXIO); } - /* Do not try to move the iface from and to the same prison. */ + /* Do not try to move the iface from and to the same vnet. */ vnet_dst = TD_TO_VNET(td); - if (vnet_dst == ifp->if_vnet) { + if (vnet_dst == pr->pr_vnet) { CURVNET_RESTORE(); prison_free(pr); return (EEXIST); @@ -1272,7 +1272,11 @@ if_vmove_reclaim(struct thread *td, char *ifname, int jid) /* Get interface back from child jail/vnet. */ found = if_unlink_ifnet(ifp, true); - MPASS(found); + if (! found) { + CURVNET_RESTORE(); + prison_free(pr); + return (ENODEV); + } sx_xlock(&ifnet_detach_sxlock); if_vmove(ifp, vnet_dst); sx_xunlock(&ifnet_detach_sxlock); From nobody Mon Mar 30 16:15:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDm08fLz6WyXC for ; Mon, 30 Mar 2026 16:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDl6HcPz49h4 for ; Mon, 30 Mar 2026 16:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v/0FLCqnIz+FoLeJcRVtEIr1EufYsDO5xTIQCgvMbfs=; b=tSLnvwTcYnCBjU1vS3mmCxGO22BZpoLv0/X5JrzwMORctNYG56BOOHKAfB/QrDUrQCib20 TBFgPvPIUREBERPwf0XWIsgjaQ6aTOxhRIryQ6kfbNBNh7Qyv4dxMNGavLVTQWGev2IQMl ggkN8OSHWomv4IaTXke8AHhODrCaHchRsu2N7IpkoHVY8nXxlVHjTNG3y9EJ5n2gDQBxLx JtgRaeWJaJaA77YhXKSruUrKqXWhIF+QJ4tZrGVqYJwAVFVvRESBXacYxONWV28SguF1r4 QPJpYrE6vFCzHADP49Oq11nBZEktvD6Wy9ZXw2IQlvolzddUzKOlFExNvt9ocg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887335; a=rsa-sha256; cv=none; b=FYiRcS8I9ivTHYh03j+krGboMapqttcU+y491Esv4y4Zp+XqgpOfPaZNyevecq1oAjfC4f wCHdpQgBLvK1a0nqBsKZKohMTSkH4z+Xju2ugSgg4rmSnCSQTj65gERl0RI25NQ6A0zH4a UED8CxFlg2wQKcxnmCFbuifIiKzjzvJcwfBBTLlIKJfzJ9RTSYBPORUmB3uYYNm+AyPgvM zpWBwkyqFA6gUzv6ZoYd5gtIGT2Wa5el+o1lftEDi/wQj6+l2PBGX/uWO34gqinXUprMdy TMkwNhz6LfIVZ64Ld1t6m1cInyfHRl2omPyXKyTHnWFt4PRRLKQ7XyiQ+EmAAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v/0FLCqnIz+FoLeJcRVtEIr1EufYsDO5xTIQCgvMbfs=; b=BtCIOUNlueWgnh+QflwnAMy3ogFYAMTXD+qklFF3Ici97QrVZz+OxE0kRvzbfDAq4/AcY3 PLHFT/h8XDkQpwHEKu1QcNZ/S4Vip35YWfmYZ2fXBAKVAKqpLJZEgAAHEyuAaBPVmgGaKQ QTMVXgjiWLtgsCPz0IFWh0DbJoLe0L//m46lDeVulmgE/rZ1I2zgI76Qwed23Tg1ukvaao kvhPnTghbRy3Mf/HAos2KWoH1F8Up/8sVFE0Opd9xNZ2gM1pTTmeubg+C6LzU0h1B8XlHx 0tZr9cjS4bPCRm4X3FPSakiBXK4+YiuvxwwjAtV6CcGM7E8DT8Q5mf5aDR8tjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDl5Z5YzqWQ for ; Mon, 30 Mar 2026 16:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b9c2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d50d0c002b98 - main - ip_mroute: Start moving globals into a structure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d50d0c002b982f193e36ede9fa2669d5dcf8467b Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:35 +0000 Message-Id: <69caa1a7.3b9c2.3d515715@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d50d0c002b982f193e36ede9fa2669d5dcf8467b commit d50d0c002b982f193e36ede9fa2669d5dcf8467b Author: Mark Johnston AuthorDate: 2026-03-30 13:27:52 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:20 +0000 ip_mroute: Start moving globals into a structure I would like to support per-FIB multicast routing tables, such that one can run a routing daemon per-FIB, with each daemon oblivious to the existence of others. Currently the multicast routing code is completely unaware of FIBs. To that end, start collecting various global variables in ip_mroute.c into a per-VNET struct mfctable. In a future patch this will be expanded into an array of mfctable structures, one per FIB. For now, all of the state is collected into V_mfctables[0]. Each mfctable contains, among other things: - a pointer to the routing socket, if routing is enabled, - a hash table of routing cache entries, - an table of network interfaces participating in the routing configuration This change has no functional effect, it is just factoring out these global variables to make the subsequent patches simpler. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55237 --- sys/netinet/ip_mroute.c | 473 +++++++++++++++++++++++++++--------------------- 1 file changed, 266 insertions(+), 207 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 7a197e20a62f..6e5b739f1da8 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -169,8 +169,26 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_ip, OID_AUTO, mrtstat, struct mrtstat, mrtstat, "IPv4 Multicast Forwarding Statistics (struct mrtstat, " "netinet/ip_mroute.h)"); -VNET_DEFINE_STATIC(struct socket *, ip_mrouter); -#define V_ip_mrouter VNET(ip_mrouter) +struct mfctable { + struct socket *router; + LIST_HEAD(mfchashhdr, mfc) *mfchashtbl; + u_char *nexpire; + vifi_t numvifs; + struct vif viftable[MAXVIFS]; + + struct buf_ring *bw_upcalls; + struct mtx bw_upcalls_mtx; + + struct ifnet *register_if; + vifi_t register_vif; + + uint32_t api_config; + int pim_assert_enabled; + struct timeval pim_assert_interval; +}; + +VNET_DEFINE_STATIC(struct mfctable *, mfctables); +#define V_mfctables VNET(mfctables) VNET_DEFINE_STATIC(u_long, mfchash); #define V_mfchash VNET(mfchash) @@ -182,28 +200,17 @@ VNET_DEFINE_STATIC(u_long, mfchash); static u_long mfchashsize = MFCHASHSIZE; /* Hash size */ SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN, &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size"); -VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ -#define V_nexpire VNET(nexpire) -VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); -#define V_mfchashtbl VNET(mfchashtbl) + VNET_DEFINE_STATIC(struct taskqueue *, task_queue); #define V_task_queue VNET(task_queue) VNET_DEFINE_STATIC(struct task, task); #define V_task VNET(task) -VNET_DEFINE_STATIC(vifi_t, numvifs); -#define V_numvifs VNET(numvifs) -VNET_DEFINE_STATIC(struct vif *, viftable); -#define V_viftable VNET(viftable) - static eventhandler_tag if_detach_event_tag = NULL; VNET_DEFINE_STATIC(struct callout, expire_upcalls_ch); #define V_expire_upcalls_ch VNET(expire_upcalls_ch) -VNET_DEFINE_STATIC(struct mtx, buf_ring_mtx); -#define V_buf_ring_mtx VNET(buf_ring_mtx) - #define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */ #define UPCALL_EXPIRE 6 /* number of timeouts */ @@ -218,10 +225,6 @@ static MALLOC_DEFINE(M_BWMETER, "bwmeter", "multicast upcall bw meters"); */ VNET_DEFINE_STATIC(struct callout, bw_upcalls_ch); #define V_bw_upcalls_ch VNET(bw_upcalls_ch) -VNET_DEFINE_STATIC(struct buf_ring *, bw_upcalls_ring); -#define V_bw_upcalls_ring VNET(bw_upcalls_ring) -VNET_DEFINE_STATIC(struct mtx, bw_upcalls_ring_mtx); -#define V_bw_upcalls_ring_mtx VNET(bw_upcalls_ring_mtx) #define BW_UPCALLS_PERIOD (hz) /* periodical flush of bw upcalls */ @@ -296,11 +299,6 @@ static struct pim_encap_pimhdr pim_encap_pimhdr = { 0 /* flags */ }; -VNET_DEFINE_STATIC(vifi_t, reg_vif_num) = VIFI_INVALID; -#define V_reg_vif_num VNET(reg_vif_num) -VNET_DEFINE_STATIC(struct ifnet *, multicast_register_if); -#define V_multicast_register_if VNET(multicast_register_if) - /* * Private variables. */ @@ -332,14 +330,16 @@ static void free_bw_list(struct bw_meter *); static int get_sg_cnt(struct sioc_sg_req *); static int get_vif_cnt(struct sioc_vif_req *); static void if_detached_event(void *, struct ifnet *); -static int ip_mdq(struct mbuf *, struct ifnet *, struct mfc *, vifi_t); +static int ip_mdq(struct mfctable *, struct mbuf *, struct ifnet *, + struct mfc *, vifi_t); static int ip_mrouter_init(struct socket *, int); static __inline struct mfc * - mfc_find(struct in_addr *, struct in_addr *); + mfc_find(const struct mfctable *mfct, const struct in_addr *, + const struct in_addr *); static void phyint_send(struct ip *, struct vif *, struct mbuf *); static struct mbuf * pim_register_prepare(struct ip *, struct mbuf *); -static int pim_register_send(struct ip *, struct vif *, +static int pim_register_send(struct mfctable *, struct ip *, struct vif *, struct mbuf *, struct mfc *); static int pim_register_send_rp(struct ip *, struct vif *, struct mbuf *, struct mfc *); @@ -363,29 +363,20 @@ static const uint32_t mrt_api_support = (MRT_MFC_FLAGS_DISABLE_WRONGVIF | MRT_MFC_FLAGS_BORDER_VIF | MRT_MFC_RP | MRT_MFC_BW_UPCALL); -VNET_DEFINE_STATIC(uint32_t, mrt_api_config); -#define V_mrt_api_config VNET(mrt_api_config) -VNET_DEFINE_STATIC(int, pim_assert_enabled); -#define V_pim_assert_enabled VNET(pim_assert_enabled) -static struct timeval pim_assert_interval = { 3, 0 }; /* Rate limit */ /* * Find a route for a given origin IP address and multicast group address. * Statistics must be updated by the caller. */ -static __inline struct mfc * -mfc_find(struct in_addr *o, struct in_addr *g) +static struct mfc * +mfc_find(const struct mfctable *mfct, const struct in_addr *o, + const struct in_addr *g) { struct mfc *rt; - /* - * Might be called both RLOCK and WLOCK. - * Check if any, it's caller responsibility - * to choose correct option. - */ MRW_LOCK_ASSERT(); - LIST_FOREACH(rt, &V_mfchashtbl[MFCHASH(*o, *g)], mfc_hash) { + LIST_FOREACH(rt, &mfct->mfchashtbl[MFCHASH(*o, *g)], mfc_hash) { if (in_hosteq(rt->mfc_origin, *o) && in_hosteq(rt->mfc_mcastgrp, *g) && buf_ring_empty(rt->mfc_stall_ring)) @@ -403,8 +394,7 @@ mfc_alloc(void) if (rt == NULL) return rt; - rt->mfc_stall_ring = buf_ring_alloc(MAX_UPQ, M_MRTABLE, - M_NOWAIT, &V_buf_ring_mtx); + rt->mfc_stall_ring = buf_ring_alloc(MAX_UPQ, M_MRTABLE, M_NOWAIT, NULL); if (rt->mfc_stall_ring == NULL) { free(rt, M_MRTABLE); return NULL; @@ -419,6 +409,7 @@ mfc_alloc(void) static int X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) { + struct mfctable *mfct; int error, optval; vifi_t vifi; struct vifctl vifc; @@ -426,7 +417,8 @@ X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) struct bw_upcall bw_upcall; uint32_t i; - if (so != V_ip_mrouter && sopt->sopt_name != MRT_INIT) + mfct = &V_mfctables[0]; + if (so != mfct->router && sopt->sopt_name != MRT_INIT) return EPERM; error = 0; @@ -458,7 +450,7 @@ X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) * select data size depending on API version. */ if (sopt->sopt_name == MRT_ADD_MFC && - V_mrt_api_config & MRT_API_FLAGS_ALL) { + (mfct->api_config & MRT_API_FLAGS_ALL) != 0) { error = sooptcopyin(sopt, &mfc, sizeof(struct mfcctl2), sizeof(struct mfcctl2)); } else { @@ -515,24 +507,27 @@ X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) static int X_ip_mrouter_get(struct socket *so, struct sockopt *sopt) { + struct mfctable *mfct; int error; + mfct = &V_mfctables[0]; + switch (sopt->sopt_name) { case MRT_VERSION: error = sooptcopyout(sopt, &mrt_api_version, sizeof mrt_api_version); break; case MRT_ASSERT: - error = sooptcopyout(sopt, &V_pim_assert_enabled, - sizeof V_pim_assert_enabled); + error = sooptcopyout(sopt, &mfct->pim_assert_enabled, + sizeof(mfct->pim_assert_enabled)); break; case MRT_API_SUPPORT: error = sooptcopyout(sopt, &mrt_api_support, sizeof mrt_api_support); break; case MRT_API_CONFIG: - error = sooptcopyout(sopt, &V_mrt_api_config, - sizeof V_mrt_api_config); + error = sooptcopyout(sopt, &mfct->api_config, + sizeof(mfct->api_config)); break; default: error = EOPNOTSUPP; @@ -577,7 +572,7 @@ get_sg_cnt(struct sioc_sg_req *req) struct mfc *rt; MRW_RLOCK(); - rt = mfc_find(&req->src, &req->grp); + rt = mfc_find(&V_mfctables[0], &req->src, &req->grp); if (rt == NULL) { MRW_RUNLOCK(); req->pktcnt = req->bytecnt = req->wrong_if = 0xffffffff; @@ -596,18 +591,20 @@ get_sg_cnt(struct sioc_sg_req *req) static int get_vif_cnt(struct sioc_vif_req *req) { + struct mfctable *mfct; struct vif *vif; vifi_t vifi; + mfct = &V_mfctables[0]; vifi = req->vifi; MRW_RLOCK(); - if (vifi >= V_numvifs) { + if (vifi >= mfct->numvifs) { MRW_RUNLOCK(); return EINVAL; } - vif = &V_viftable[vifi]; + vif = &mfct->viftable[vifi]; mtx_lock(&vif->v_mtx); req->icount = vif->v_pkt_in; req->ocount = vif->v_pkt_out; @@ -622,10 +619,13 @@ get_vif_cnt(struct sioc_vif_req *req) static void if_detached_event(void *arg __unused, struct ifnet *ifp) { + struct mfctable *mfct; vifi_t vifi; u_long i, vifi_cnt = 0; struct ifnet *free_ptr, *multi_leave; + mfct = &V_mfctables[0]; + MRW_WLOCK(); if (!V_ip_mrouting_enabled) { MRW_WUNLOCK(); @@ -641,13 +641,14 @@ if_detached_event(void *arg __unused, struct ifnet *ifp) * 4. Free vif state. This should disable ALLMULTI on the interface. */ restart: - for (vifi = 0; vifi < V_numvifs; vifi++) { - if (V_viftable[vifi].v_ifp != ifp) + for (vifi = 0; vifi < mfct->numvifs; vifi++) { + if (mfct->viftable[vifi].v_ifp != ifp) continue; for (i = 0; i < mfchashsize; i++) { struct mfc *rt, *nrt; - LIST_FOREACH_SAFE(rt, &V_mfchashtbl[i], mfc_hash, nrt) { + LIST_FOREACH_SAFE(rt, &mfct->mfchashtbl[i], mfc_hash, + nrt) { if (rt->mfc_parent == vifi) { expire_mfc(rt); } @@ -693,12 +694,14 @@ ip_mrouter_upcall_thread(void *arg, int pending __unused) static int ip_mrouter_init(struct socket *so, int version) { + struct mfctable *mfct; CTR2(KTR_IPMF, "%s: so %p", __func__, so); if (version != 1) return ENOPROTOOPT; + mfct = &V_mfctables[0]; MRW_TEARDOWN_WLOCK(); MRW_WLOCK(); @@ -708,25 +711,26 @@ ip_mrouter_init(struct socket *so, int version) return ENOPROTOOPT; } - if (V_ip_mrouter != NULL) { + if (mfct->router != NULL) { MRW_WUNLOCK(); MRW_TEARDOWN_WUNLOCK(); return EADDRINUSE; } - V_mfchashtbl = hashinit_flags(mfchashsize, M_MRTABLE, &V_mfchash, + mfct->mfchashtbl = hashinit_flags(mfchashsize, M_MRTABLE, &V_mfchash, HASH_NOWAIT); - if (V_mfchashtbl == NULL) { + if (mfct->mfchashtbl == NULL) { MRW_WUNLOCK(); MRW_TEARDOWN_WUNLOCK(); return (ENOMEM); } /* Create upcall ring */ - mtx_init(&V_bw_upcalls_ring_mtx, "mroute upcall buf_ring mtx", NULL, MTX_DEF); - V_bw_upcalls_ring = buf_ring_alloc(BW_UPCALLS_MAX, M_MRTABLE, - M_NOWAIT, &V_bw_upcalls_ring_mtx); - if (!V_bw_upcalls_ring) { + mtx_init(&mfct->bw_upcalls_mtx, "mroute upcall buf_ring mtx", NULL, + MTX_DEF); + mfct->bw_upcalls = buf_ring_alloc(BW_UPCALLS_MAX, M_MRTABLE, M_NOWAIT, + &mfct->bw_upcalls_mtx); + if (mfct->bw_upcalls == NULL) { MRW_WUNLOCK(); MRW_TEARDOWN_WUNLOCK(); return (ENOMEM); @@ -741,13 +745,11 @@ ip_mrouter_init(struct socket *so, int version) callout_reset(&V_bw_upcalls_ch, BW_UPCALLS_PERIOD, expire_bw_upcalls_send, curvnet); - V_ip_mrouter = so; + mfct->router = so; + mfct->pim_assert_interval.tv_sec = 3; V_ip_mrouting_enabled = true; atomic_add_int(&ip_mrouter_cnt, 1); - /* This is a mutex required by buf_ring init, but not used internally */ - mtx_init(&V_buf_ring_mtx, "mroute buf_ring mtx", NULL, MTX_DEF); - MRW_WUNLOCK(); MRW_TEARDOWN_WUNLOCK(); @@ -762,14 +764,17 @@ ip_mrouter_init(struct socket *so, int version) static void X_ip_mrouter_done(struct socket *so) { + struct mfctable *mfct; struct ifnet **ifps; int nifp; u_long i; vifi_t vifi; struct bw_upcall *bu; + mfct = &V_mfctables[0]; + MRW_TEARDOWN_WLOCK(); - if (so != V_ip_mrouter) { + if (so != mfct->router) { MRW_TEARDOWN_WUNLOCK(); return; } @@ -777,10 +782,10 @@ X_ip_mrouter_done(struct socket *so) /* * Detach/disable hooks to the reset of the system. */ - V_ip_mrouter = NULL; + mfct->router = NULL; V_ip_mrouting_enabled = false; atomic_subtract_int(&ip_mrouter_cnt, 1); - V_mrt_api_config = 0; + mfct->api_config = 0; /* * Wait for all epoch sections to complete to ensure the new value of @@ -800,11 +805,11 @@ X_ip_mrouter_done(struct socket *so) taskqueue_cancel(V_task_queue, &V_task, NULL); /* Destroy upcall ring */ - while ((bu = buf_ring_dequeue_mc(V_bw_upcalls_ring)) != NULL) { + while ((bu = buf_ring_dequeue_mc(mfct->bw_upcalls)) != NULL) { free(bu, M_MRTABLE); } - buf_ring_free(V_bw_upcalls_ring, M_MRTABLE); - mtx_destroy(&V_bw_upcalls_ring_mtx); + buf_ring_free(mfct->bw_upcalls, M_MRTABLE); + mtx_destroy(&mfct->bw_upcalls_mtx); /* * For each phyint in use, prepare to disable promiscuous reception @@ -813,16 +818,19 @@ X_ip_mrouter_done(struct socket *so) * sx locks in their ioctl routines, which is not allowed while holding * a non-sleepable lock. */ - KASSERT(V_numvifs <= MAXVIFS, ("More vifs than possible")); - for (vifi = 0, nifp = 0; vifi < V_numvifs; vifi++) { - if (!in_nullhost(V_viftable[vifi].v_lcl_addr) && - !(V_viftable[vifi].v_flags & (VIFF_TUNNEL | VIFF_REGISTER))) { - ifps[nifp++] = V_viftable[vifi].v_ifp; + KASSERT(mfct->numvifs <= MAXVIFS, ("More vifs than possible")); + for (vifi = 0, nifp = 0; vifi < mfct->numvifs; vifi++) { + struct vif *vif; + + vif = &mfct->viftable[vifi]; + if (!in_nullhost(vif->v_lcl_addr) && + (vif->v_flags & (VIFF_TUNNEL | VIFF_REGISTER)) == 0) { + ifps[nifp++] = vif->v_ifp; } } - bzero((caddr_t)V_viftable, sizeof(*V_viftable) * MAXVIFS); - V_numvifs = 0; - V_pim_assert_enabled = 0; + bzero(mfct->viftable, sizeof(*mfct->viftable) * MAXVIFS); + mfct->numvifs = 0; + mfct->pim_assert_enabled = 0; callout_stop(&V_expire_upcalls_ch); callout_stop(&V_bw_upcalls_ch); @@ -834,18 +842,15 @@ X_ip_mrouter_done(struct socket *so) for (i = 0; i < mfchashsize; i++) { struct mfc *rt, *nrt; - LIST_FOREACH_SAFE(rt, &V_mfchashtbl[i], mfc_hash, nrt) { + LIST_FOREACH_SAFE(rt, &mfct->mfchashtbl[i], mfc_hash, nrt) { expire_mfc(rt); } } - free(V_mfchashtbl, M_MRTABLE); - V_mfchashtbl = NULL; - - bzero(V_nexpire, sizeof(V_nexpire[0]) * mfchashsize); + free(mfct->mfchashtbl, M_MRTABLE); + mfct->mfchashtbl = NULL; - V_reg_vif_num = VIFI_INVALID; - - mtx_destroy(&V_buf_ring_mtx); + bzero(mfct->nexpire, sizeof(mfct->nexpire[0]) * mfchashsize); + mfct->register_vif = VIFI_INVALID; MRW_WUNLOCK(); MRW_TEARDOWN_WUNLOCK(); @@ -870,7 +875,7 @@ set_assert(int i) if ((i != 1) && (i != 0)) return EINVAL; - V_pim_assert_enabled = i; + V_mfctables[0].pim_assert_enabled = i; return 0; } @@ -881,6 +886,7 @@ set_assert(int i) int set_api_config(uint32_t *apival) { + struct mfctable *mfct; u_long i; /* @@ -890,11 +896,12 @@ set_api_config(uint32_t *apival) * - pim_assert is not enabled * - the MFC table is empty */ - if (V_numvifs > 0) { + mfct = &V_mfctables[0]; + if (mfct->numvifs > 0) { *apival = 0; return EPERM; } - if (V_pim_assert_enabled) { + if (mfct->pim_assert_enabled) { *apival = 0; return EPERM; } @@ -902,7 +909,7 @@ set_api_config(uint32_t *apival) MRW_RLOCK(); for (i = 0; i < mfchashsize; i++) { - if (LIST_FIRST(&V_mfchashtbl[i]) != NULL) { + if (LIST_FIRST(&mfct->mfchashtbl[i]) != NULL) { MRW_RUNLOCK(); *apival = 0; return EPERM; @@ -911,8 +918,8 @@ set_api_config(uint32_t *apival) MRW_RUNLOCK(); - V_mrt_api_config = *apival & mrt_api_support; - *apival = V_mrt_api_config; + mfct->api_config = *apival & mrt_api_support; + *apival = mfct->api_config; return 0; } @@ -923,7 +930,8 @@ set_api_config(uint32_t *apival) static int add_vif(struct vifctl *vifcp) { - struct vif *vifp = V_viftable + vifcp->vifc_vifi; + struct mfctable *mfct; + struct vif *vifp; struct sockaddr_in sin = {sizeof sin, AF_INET}; struct ifaddr *ifa; struct ifnet *ifp; @@ -931,6 +939,10 @@ add_vif(struct vifctl *vifcp) if (vifcp->vifc_vifi >= MAXVIFS) return EINVAL; + + mfct = &V_mfctables[0]; + vifp = &mfct->viftable[vifcp->vifc_vifi]; + /* rate limiting is no longer supported by this code */ if (vifcp->vifc_rate_limit != 0) { log(LOG_ERR, "rate limiting is no longer supported\n"); @@ -967,11 +979,11 @@ add_vif(struct vifctl *vifcp) CTR1(KTR_IPMF, "%s: tunnels are no longer supported", __func__); return EOPNOTSUPP; } else if (vifcp->vifc_flags & VIFF_REGISTER) { - ifp = V_multicast_register_if = if_alloc(IFT_LOOP); + ifp = mfct->register_if = if_alloc(IFT_LOOP); CTR2(KTR_IPMF, "%s: add register vif for ifp %p", __func__, ifp); - if (V_reg_vif_num == VIFI_INVALID) { - if_initname(V_multicast_register_if, "register_vif", 0); - V_reg_vif_num = vifcp->vifc_vifi; + if (mfct->register_vif == VIFI_INVALID) { + if_initname(mfct->register_if, "register_vif", 0); + mfct->register_vif = vifcp->vifc_vifi; } } else { /* Make sure the interface supports multicast */ if ((ifp->if_flags & IFF_MULTICAST) == 0) @@ -987,7 +999,7 @@ add_vif(struct vifctl *vifcp) if (!in_nullhost(vifp->v_lcl_addr)) { if (ifp) - V_multicast_register_if = NULL; + mfct->register_if = NULL; MRW_WUNLOCK(); if (ifp) if_free(ifp); @@ -1008,8 +1020,8 @@ add_vif(struct vifctl *vifcp) mtx_init(&vifp->v_mtx, vifp->v_mtx_name, NULL, MTX_DEF); /* Adjust numvifs up if the vifi is higher than numvifs */ - if (V_numvifs <= vifcp->vifc_vifi) - V_numvifs = vifcp->vifc_vifi + 1; + if (mfct->numvifs <= vifcp->vifc_vifi) + mfct->numvifs = vifcp->vifc_vifi + 1; MRW_WUNLOCK(); @@ -1026,17 +1038,19 @@ add_vif(struct vifctl *vifcp) static int del_vif_locked(vifi_t vifi, struct ifnet **ifp_multi_leave, struct ifnet **ifp_free) { + struct mfctable *mfct; struct vif *vifp; + mfct = &V_mfctables[0]; *ifp_free = NULL; *ifp_multi_leave = NULL; MRW_WLOCK_ASSERT(); - if (vifi >= V_numvifs) { + if (vifi >= mfct->numvifs) { return EINVAL; } - vifp = &V_viftable[vifi]; + vifp = &mfct->viftable[vifi]; if (in_nullhost(vifp->v_lcl_addr)) { return EADDRNOTAVAIL; } @@ -1045,10 +1059,10 @@ del_vif_locked(vifi_t vifi, struct ifnet **ifp_multi_leave, struct ifnet **ifp_f *ifp_multi_leave = vifp->v_ifp; if (vifp->v_flags & VIFF_REGISTER) { - V_reg_vif_num = VIFI_INVALID; + mfct->register_vif = VIFI_INVALID; if (vifp->v_ifp) { - if (vifp->v_ifp == V_multicast_register_if) - V_multicast_register_if = NULL; + if (vifp->v_ifp == mfct->register_if) + mfct->register_if = NULL; *ifp_free = vifp->v_ifp; } } @@ -1060,10 +1074,10 @@ del_vif_locked(vifi_t vifi, struct ifnet **ifp_multi_leave, struct ifnet **ifp_f CTR2(KTR_IPMF, "%s: delete vif %d", __func__, (int)vifi); /* Adjust numvifs down */ - for (vifi = V_numvifs; vifi > 0; vifi--) - if (!in_nullhost(V_viftable[vifi-1].v_lcl_addr)) + for (vifi = mfct->numvifs; vifi > 0; vifi--) + if (!in_nullhost(mfct->viftable[vifi - 1].v_lcl_addr)) break; - V_numvifs = vifi; + mfct->numvifs = vifi; return 0; } @@ -1091,18 +1105,18 @@ del_vif(vifi_t vifi) * update an mfc entry without resetting counters and S,G addresses. */ static void -update_mfc_params(struct mfc *rt, struct mfcctl2 *mfccp) +update_mfc_params(struct mfctable *mfct, struct mfc *rt, struct mfcctl2 *mfccp) { int i; rt->mfc_parent = mfccp->mfcc_parent; - for (i = 0; i < V_numvifs; i++) { + for (i = 0; i < mfct->numvifs; i++) { rt->mfc_ttls[i] = mfccp->mfcc_ttls[i]; - rt->mfc_flags[i] = mfccp->mfcc_flags[i] & V_mrt_api_config & + rt->mfc_flags[i] = mfccp->mfcc_flags[i] & mfct->api_config & MRT_MFC_FLAGS_ALL; } /* set the RP address */ - if (V_mrt_api_config & MRT_MFC_RP) + if (mfct->api_config & MRT_MFC_RP) rt->mfc_rp = mfccp->mfcc_rp; else rt->mfc_rp.s_addr = INADDR_ANY; @@ -1112,12 +1126,12 @@ update_mfc_params(struct mfc *rt, struct mfcctl2 *mfccp) * fully initialize an mfc entry from the parameter. */ static void -init_mfc_params(struct mfc *rt, struct mfcctl2 *mfccp) +init_mfc_params(struct mfctable *mfct, struct mfc *rt, struct mfcctl2 *mfccp) { rt->mfc_origin = mfccp->mfcc_origin; rt->mfc_mcastgrp = mfccp->mfcc_mcastgrp; - update_mfc_params(rt, mfccp); + update_mfc_params(mfct, rt, mfccp); /* initialize pkt counters per src-grp */ rt->mfc_pkt_cnt = 0; @@ -1156,13 +1170,16 @@ static int add_mfc(struct mfcctl2 *mfccp) { struct mfc *rt; + struct mfctable *mfct; struct rtdetq *rte; u_long hash = 0; u_short nstl; struct epoch_tracker et; + mfct = &V_mfctables[0]; + MRW_WLOCK(); - rt = mfc_find(&mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp); + rt = mfc_find(mfct, &mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp); /* If an entry already exists, just update the fields */ if (rt) { @@ -1170,7 +1187,7 @@ add_mfc(struct mfcctl2 *mfccp) __func__, ntohl(mfccp->mfcc_origin.s_addr), (u_long)ntohl(mfccp->mfcc_mcastgrp.s_addr), mfccp->mfcc_parent); - update_mfc_params(rt, mfccp); + update_mfc_params(mfct, rt, mfccp); MRW_WUNLOCK(); return (0); } @@ -1181,7 +1198,7 @@ add_mfc(struct mfcctl2 *mfccp) nstl = 0; hash = MFCHASH(mfccp->mfcc_origin, mfccp->mfcc_mcastgrp); NET_EPOCH_ENTER(et); - LIST_FOREACH(rt, &V_mfchashtbl[hash], mfc_hash) { + LIST_FOREACH(rt, &mfct->mfchashtbl[hash], mfc_hash) { if (in_hosteq(rt->mfc_origin, mfccp->mfcc_origin) && in_hosteq(rt->mfc_mcastgrp, mfccp->mfcc_mcastgrp) && !buf_ring_empty(rt->mfc_stall_ring)) { @@ -1194,15 +1211,15 @@ add_mfc(struct mfcctl2 *mfccp) if (nstl++) CTR1(KTR_IPMF, "%s: multiple matches", __func__); - init_mfc_params(rt, mfccp); + init_mfc_params(mfct, rt, mfccp); rt->mfc_expire = 0; /* Don't clean this guy up */ - V_nexpire[hash]--; + mfct->nexpire[hash]--; /* Free queued packets, but attempt to forward them first. */ while (!buf_ring_empty(rt->mfc_stall_ring)) { rte = buf_ring_dequeue_mc(rt->mfc_stall_ring); if (rte->ifp != NULL) - ip_mdq(rte->m, rte->ifp, rt, -1); + ip_mdq(mfct, rte->m, rte->ifp, rt, -1); m_freem(rte->m); free(rte, M_MRTABLE); } @@ -1215,12 +1232,12 @@ add_mfc(struct mfcctl2 *mfccp) */ if (nstl == 0) { CTR1(KTR_IPMF, "%s: adding mfc w/o upcall", __func__); - LIST_FOREACH(rt, &V_mfchashtbl[hash], mfc_hash) { + LIST_FOREACH(rt, &mfct->mfchashtbl[hash], mfc_hash) { if (in_hosteq(rt->mfc_origin, mfccp->mfcc_origin) && in_hosteq(rt->mfc_mcastgrp, mfccp->mfcc_mcastgrp)) { - init_mfc_params(rt, mfccp); + init_mfc_params(mfct, rt, mfccp); if (rt->mfc_expire) - V_nexpire[hash]--; + mfct->nexpire[hash]--; rt->mfc_expire = 0; break; /* XXX */ } @@ -1233,14 +1250,14 @@ add_mfc(struct mfcctl2 *mfccp) return (ENOBUFS); } - init_mfc_params(rt, mfccp); + init_mfc_params(mfct, rt, mfccp); rt->mfc_expire = 0; rt->mfc_bw_meter_leq = NULL; rt->mfc_bw_meter_geq = NULL; /* insert new entry at head of hash chain */ - LIST_INSERT_HEAD(&V_mfchashtbl[hash], rt, mfc_hash); + LIST_INSERT_HEAD(&mfct->mfchashtbl[hash], rt, mfc_hash); } } @@ -1255,6 +1272,7 @@ add_mfc(struct mfcctl2 *mfccp) static int del_mfc(struct mfcctl2 *mfccp) { + struct mfctable *mfct; struct in_addr origin; struct in_addr mcastgrp; struct mfc *rt; @@ -1265,9 +1283,11 @@ del_mfc(struct mfcctl2 *mfccp) CTR3(KTR_IPMF, "%s: delete mfc orig 0x%08x group %lx", __func__, ntohl(origin.s_addr), (u_long)ntohl(mcastgrp.s_addr)); + mfct = &V_mfctables[0]; MRW_WLOCK(); - LIST_FOREACH(rt, &V_mfchashtbl[MFCHASH(origin, mcastgrp)], mfc_hash) { + LIST_FOREACH(rt, &mfct->mfchashtbl[MFCHASH(origin, mcastgrp)], + mfc_hash) { if (in_hosteq(rt->mfc_origin, origin) && in_hosteq(rt->mfc_mcastgrp, mcastgrp)) break; @@ -1321,6 +1341,7 @@ X_ip_mforward(struct ip *ip, struct ifnet *ifp, struct mbuf *m, struct ip_moptions *imo) { struct mfc *rt; + struct mfctable *mfct; int error; vifi_t vifi; struct mbuf *mb0; @@ -1347,14 +1368,16 @@ X_ip_mforward(struct ip *ip, struct ifnet *ifp, struct mbuf *m, return (1); } + mfct = &V_mfctables[0]; + /* * BEGIN: MCAST ROUTING HOT PATH */ MRW_RLOCK(); - if (imo && ((vifi = imo->imo_multicast_vif) < V_numvifs)) { + if (imo && ((vifi = imo->imo_multicast_vif) < mfct->numvifs)) { if (ip->ip_ttl < MAXTTL) ip->ip_ttl++; /* compensate for -1 in *_send routines */ - error = ip_mdq(m, ifp, NULL, vifi); + error = ip_mdq(mfct, m, ifp, NULL, vifi); MRW_RUNLOCK(); return error; } @@ -1373,11 +1396,11 @@ mfc_find_retry: * Determine forwarding vifs from the forwarding cache table */ MRTSTAT_INC(mrts_mfc_lookups); - rt = mfc_find(&ip->ip_src, &ip->ip_dst); + rt = mfc_find(mfct, &ip->ip_src, &ip->ip_dst); /* Entry exists, so forward if necessary */ if (rt != NULL) { - error = ip_mdq(m, ifp, rt, -1); + error = ip_mdq(mfct, m, ifp, rt, -1); /* Generic unlock here as we might release R or W lock */ MRW_UNLOCK(); return error; @@ -1427,8 +1450,7 @@ mfc_find_retry: /* is there an upcall waiting for this flow ? */ hash = MFCHASH(ip->ip_src, ip->ip_dst); - LIST_FOREACH(rt, &V_mfchashtbl[hash], mfc_hash) - { + LIST_FOREACH(rt, &mfct->mfchashtbl[hash], mfc_hash) { if (in_hosteq(ip->ip_src, rt->mfc_origin) && in_hosteq(ip->ip_dst, rt->mfc_mcastgrp) && !buf_ring_empty(rt->mfc_stall_ring)) @@ -1445,10 +1467,10 @@ mfc_find_retry: * Locate the vifi for the incoming interface for this packet. * If none found, drop packet. */ - for (vifi = 0; vifi < V_numvifs && - V_viftable[vifi].v_ifp != ifp; vifi++) + for (vifi = 0; vifi < mfct->numvifs && + mfct->viftable[vifi].v_ifp != ifp; vifi++) ; - if (vifi >= V_numvifs) /* vif not found, drop packet */ + if (vifi >= mfct->numvifs) /* vif not found, drop packet */ goto non_fatal; /* no upcall, so make a new entry */ @@ -1474,7 +1496,7 @@ mfc_find_retry: MRTSTAT_INC(mrts_upcalls); k_igmpsrc.sin_addr = ip->ip_src; - if (socket_send(V_ip_mrouter, mm, &k_igmpsrc) < 0) { + if (socket_send(mfct->router, mm, &k_igmpsrc) < 0) { CTR0(KTR_IPMF, "ip_mforward: socket queue full"); MRTSTAT_INC(mrts_upq_sockfull); fail1: free(rt, M_MRTABLE); @@ -1488,8 +1510,8 @@ mfc_find_retry: rt->mfc_origin.s_addr = ip->ip_src.s_addr; rt->mfc_mcastgrp.s_addr = ip->ip_dst.s_addr; rt->mfc_expire = UPCALL_EXPIRE; - V_nexpire[hash]++; - for (i = 0; i < V_numvifs; i++) { + mfct->nexpire[hash]++; + for (i = 0; i < mfct->numvifs; i++) { rt->mfc_ttls[i] = 0; rt->mfc_flags[i] = 0; } @@ -1509,7 +1531,7 @@ mfc_find_retry: buf_ring_enqueue(rt->mfc_stall_ring, rte); /* Add RT to hashtable as it didn't exist before */ - LIST_INSERT_HEAD(&V_mfchashtbl[hash], rt, mfc_hash); + LIST_INSERT_HEAD(&mfct->mfchashtbl[hash], rt, mfc_hash); } else { /* determine if queue has overflowed */ if (buf_ring_full(rt->mfc_stall_ring)) { @@ -1537,19 +1559,21 @@ mfc_find_retry: static void expire_upcalls(void *arg) { + struct mfctable *mfct; u_long i; CURVNET_SET((struct vnet *) arg); - /*This callout is always run with MRW_WLOCK taken. */ + MRW_LOCK_ASSERT(); + mfct = &V_mfctables[0]; for (i = 0; i < mfchashsize; i++) { struct mfc *rt, *nrt; - if (V_nexpire[i] == 0) + if (mfct->nexpire[i] == 0) continue; - LIST_FOREACH_SAFE(rt, &V_mfchashtbl[i], mfc_hash, nrt) { + LIST_FOREACH_SAFE(rt, &mfct->mfchashtbl[i], mfc_hash, nrt) { if (buf_ring_empty(rt->mfc_stall_ring)) continue; @@ -1575,7 +1599,8 @@ expire_upcalls(void *arg) * Packet forwarding routine once entry in the cache is made */ static int -ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif) +ip_mdq(struct mfctable *mfct, struct mbuf *m, struct ifnet *ifp, struct mfc *rt, + vifi_t xmt_vif) { struct ip *ip = mtod(m, struct ip *); struct vif *vif; @@ -1591,11 +1616,12 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif) * * (since vifi_t is u_short, -1 becomes MAXUSHORT, which > numvifs.) */ - if (xmt_vif < V_numvifs) { - if (V_viftable[xmt_vif].v_flags & VIFF_REGISTER) - pim_register_send(ip, V_viftable + xmt_vif, m, rt); + if (xmt_vif < mfct->numvifs) { + if (mfct->viftable[xmt_vif].v_flags & VIFF_REGISTER) + pim_register_send(mfct, ip, &mfct->viftable[xmt_vif], m, + rt); else - phyint_send(ip, V_viftable + xmt_vif, m); + phyint_send(ip, &mfct->viftable[xmt_vif], m); return 1; } @@ -1603,8 +1629,8 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif) * Don't forward if it didn't arrive from the parent vif for its origin. */ vifi = rt->mfc_parent; - vif = &V_viftable[vifi]; - if (vifi >= V_numvifs || vif->v_ifp != ifp) { + vif = &mfct->viftable[vifi]; + if (vifi >= mfct->numvifs || vif->v_ifp != ifp) { CTR4(KTR_IPMF, "%s: rx on wrong ifp %p (vifi %d, v_ifp %p)", __func__, ifp, (int)vifi, vif->v_ifp); MRTSTAT_INC(mrts_wrong_if); @@ -1617,21 +1643,23 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif) * can complete the SPT switch, regardless of the type * of the iif (broadcast media, GRE tunnel, etc). */ - if (V_pim_assert_enabled && (vifi < V_numvifs) && + if (mfct->pim_assert_enabled && (vifi < mfct->numvifs) && vif->v_ifp != NULL) { - if (ifp == V_multicast_register_if) + if (ifp == mfct->register_if) PIMSTAT_INC(pims_rcv_registers_wrongiif); /* Get vifi for the incoming packet */ - for (vifi = 0; vifi < V_numvifs && V_viftable[vifi].v_ifp != ifp; vifi++) + for (vifi = 0; vifi < mfct->numvifs && + mfct->viftable[vifi].v_ifp != ifp; vifi++) ; - if (vifi >= V_numvifs) + if (vifi >= mfct->numvifs) return 0; /* The iif is not found: ignore the packet. */ if (rt->mfc_flags[vifi] & MRT_MFC_FLAGS_DISABLE_WRONGVIF) return 0; /* WRONGVIF disabled: ignore the packet */ - if (ratecheck(&rt->mfc_last_assert, &pim_assert_interval)) { + if (ratecheck(&rt->mfc_last_assert, + &mfct->pim_assert_interval)) { struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET }; struct igmpmsg *im; int hlen = ip->ip_hl << 2; @@ -1650,7 +1678,8 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif) MRTSTAT_INC(mrts_upcalls); k_igmpsrc.sin_addr = im->im_src; - if (socket_send(V_ip_mrouter, mm, &k_igmpsrc) < 0) { + if (socket_send(mfct->router, mm, + &k_igmpsrc) < 0) { CTR1(KTR_IPMF, "%s: socket queue full", __func__); MRTSTAT_INC(mrts_upq_sockfull); return ENOBUFS; @@ -1680,13 +1709,13 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif) * - the ttl exceeds the vif's threshold * - there are group members downstream on interface */ - for (vifi = 0; vifi < V_numvifs; vifi++) + for (vifi = 0; vifi < mfct->numvifs; vifi++) if ((rt->mfc_ttls[vifi] > 0) && (ip->ip_ttl > rt->mfc_ttls[vifi])) { - vif = &V_viftable[vifi]; + vif = &mfct->viftable[vifi]; *** 425 LINES SKIPPED *** From nobody Mon Mar 30 16:15:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDn2mJDz6WyJx for ; Mon, 30 Mar 2026 16:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDm6sGxz49Rt for ; Mon, 30 Mar 2026 16:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2byraYkaPfVmULkHvARHwdUmI9ATXXvxA+q6P7bn9h4=; b=yDI+va3WPqzCnMDQJb4/CAg4En0kKNiIIBXJaxt3FnjUhIXtMmJsBiFiLuZaN6+Xfmq8UK bDJAvoLiY4Hm9vDNMV5vZMt7tDpQX+SHBEVYrx2sPD94rFHHB9074VGmFbcobAGe5guNIo 25/DgMiYZKCqE/BWJb4VhqtKfyrvjc2du8jJZLK37sPXFwAR2ESYvCHlsHtkZ8twFckA+k 9V/EJZQe09coQdEFgRFvcy734osMiuPa/DMaea6GeOu8dooDecLzc1vmHhSAZIUDo68FXQ DPasoJZn3+IHsg3QWCKa4TW+vvj7EysGou0+sv2NTOKsddLsMK2Sx1oK9qquNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887336; a=rsa-sha256; cv=none; b=MDp4T9cYCfX4yFr6Z+DKlhM6P2/o2MmSlrq/r5dvTUTcZ/at2mUPBtDnSdEFwvg8NL+UjQ mpMiO2uBWRj79caY5ndbSsWLcUVQd4rxPQBX18gPkGDl3dsx3Kbm8kSMCgIiRAL7jGORLC ieo8au0KcYRUCAqV2kJjqH6uNRKYho41KXIFWQSHzX+4O4NqUWAtpaxW8RYhLBW520S61P 6om1+cUNYl536HoeEECqf3y3M+2lJFDjam8qJMUNgZi2EOuEgyjPFrt/9YHFpDDb/ashMF hnGip9TAMrKgqoSMxRcW/OIlQvqZTVFM3g3OXCm9XNmofCpHrOaIZkicYJ/ADw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2byraYkaPfVmULkHvARHwdUmI9ATXXvxA+q6P7bn9h4=; b=Zi61hfhzMyLLVDTgK6EdYc0ewPGE71sTyI+N94r132AQbGoU3rK4aeNClBHHUB9VyqlmzE DBGuFM/it5XhjNfu+/lVFQCR80YQc754O3b3ZUF5v+UNzdRoaRfzWJuBK9To6DTAvyFTgx kZq+Ef+vNM5W9WWIbowoBrlRFo/vbYxquZelxok2nt7i5kTJlXGz3wHeGC1OAtt3NEiDta JNDS+DZX2PgmDihn7e1m9fyKk6PtBSW0YjEVeGMKOZBr5diImDTu0ttesMhkM7Qz2W8GHt anlQqjCQXwcvl1QWJzaBSfsGK93/ogyaWpqMYAa3UXNxEx/mODdA33l/F6NdIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDm6RD0zqPj for ; Mon, 30 Mar 2026 16:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bf3e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a223d6c489c7 - main - ip6_mroute: Start putting global variables into a structure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a223d6c489c7ea9a384f3d2bbda1b05b00d4502d Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:36 +0000 Message-Id: <69caa1a8.3bf3e.c1eaaab@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a223d6c489c7ea9a384f3d2bbda1b05b00d4502d commit a223d6c489c7ea9a384f3d2bbda1b05b00d4502d Author: Mark Johnston AuthorDate: 2026-03-30 13:29:01 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:20 +0000 ip6_mroute: Start putting global variables into a structure As in the IPv4 version of this change, I added a struct mf6ctable structure which holds all global routing table state, soon to become per-FIB state. Note that much of the v6 multicast routing code was not VNETified; this change fixes that too. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55238 --- sys/netinet6/ip6_mroute.c | 391 +++++++++++++++++++++++++++------------------- 1 file changed, 229 insertions(+), 162 deletions(-) diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index a8313e1753a6..912bbfda2486 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -106,6 +106,7 @@ #include #include #include +#include #include #include @@ -124,9 +125,13 @@ static MALLOC_DEFINE(M_MRTABLE6, "mf6c", "multicast forwarding cache entry"); -static int ip6_mdq(struct mbuf *, struct ifnet *, struct mf6c *); +struct mf6ctable; + +static int ip6_mdq(struct mf6ctable *, struct mbuf *, struct ifnet *, + struct mf6c *); static void phyint_send(struct ip6_hdr *, struct mif6 *, struct mbuf *); -static int register_send(struct ip6_hdr *, struct mif6 *, struct mbuf *); +static int register_send(struct mf6ctable *, struct ip6_hdr *, mifi_t, + struct mbuf *); static int set_pim6(int *); static int socket_send(struct socket *, struct mbuf *, struct sockaddr_in6 *); @@ -146,9 +151,6 @@ static const struct encap_config ipv6_encap_cfg = { .input = pim6_input }; -VNET_DEFINE_STATIC(int, ip6_mrouter_ver) = 0; -#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver) - SYSCTL_DECL(_net_inet6); SYSCTL_DECL(_net_inet6_ip6); static SYSCTL_NODE(_net_inet6, IPPROTO_PIM, pim, @@ -172,15 +174,6 @@ static struct sx mrouter6_mtx; #define MROUTER6_LOCK_INIT() sx_init(MROUTER6_LOCKPTR(), "mrouter6") #define MROUTER6_LOCK_DESTROY() sx_destroy(MROUTER6_LOCKPTR()) -VNET_DEFINE_STATIC(struct socket *, ip6_mrouter); -#define V_ip6_mrouter VNET(ip6_mrouter) - -static struct mf6c *mf6ctable[MF6CTBLSIZ]; -SYSCTL_OPAQUE(_net_inet6_ip6, OID_AUTO, mf6ctable, CTLFLAG_RD, - &mf6ctable, sizeof(mf6ctable), "S,*mf6ctable[MF6CTBLSIZ]", - "IPv6 Multicast Forwarding Table (struct *mf6ctable[MF6CTBLSIZ], " - "netinet6/ip6_mroute.h)"); - static struct mtx mfc6_mtx; #define MFC6_LOCKPTR() (&mfc6_mtx) #define MFC6_LOCK() mtx_lock(MFC6_LOCKPTR()) @@ -191,9 +184,42 @@ static struct mtx mfc6_mtx; NULL, MTX_DEF) #define MFC6_LOCK_DESTROY() mtx_destroy(MFC6_LOCKPTR()) -static u_char n6expire[MF6CTBLSIZ]; +struct mf6ctable { + struct socket *router; + int router_ver; + struct mf6c *mfchashtbl[MF6CTBLSIZ]; + u_char nexpire[MF6CTBLSIZ]; + int nummifs; + struct mif6 miftable[MAXMIFS]; + + /* + * 'Interfaces' associated with decapsulator (so we can tell packets + * that went through it from ones that get reflected by a broken + * gateway). Different from IPv4 register_if, these interfaces are + * linked into the system ifnet list, because per-interface IPv6 + * statistics are maintained in ifp->if_afdata. But it does not have + * any routes point to them. I.e., packets can't be sent this way. + * They only exist as a placeholder for multicast source verification. + */ + struct ifnet *register_if; + mifi_t register_mif; +}; + +VNET_DEFINE_STATIC(struct mf6ctable *, mfctables); +#define V_mfctables VNET(mfctables) + +static int +sysctl_mfctable(SYSCTL_HANDLER_ARGS) +{ + return (SYSCTL_OUT(req, &V_mfctables[0].mfchashtbl, + sizeof(V_mfctables[0].mfchashtbl))); +} +SYSCTL_PROC(_net_inet6_ip6, OID_AUTO, mf6ctable, + CTLTYPE_OPAQUE | CTLFLAG_RD, + NULL, 0, sysctl_mfctable, "S,*mf6c[MF6CTBLSIZ]", + "IPv6 Multicast Forwarding Table (struct mf6c *[MF6CTBLSIZ], " + "netinet6/ip6_mroute.h)"); -static struct mif6 mif6table[MAXMIFS]; static int sysctl_mif6table(SYSCTL_HANDLER_ARGS) { @@ -203,17 +229,20 @@ sysctl_mif6table(SYSCTL_HANDLER_ARGS) out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, M_WAITOK | M_ZERO); for (int i = 0; i < MAXMIFS; i++) { - out[i].m6_flags = mif6table[i].m6_flags; - out[i].m6_rate_limit = mif6table[i].m6_rate_limit; - out[i].m6_lcl_addr = mif6table[i].m6_lcl_addr; - if (mif6table[i].m6_ifp != NULL) - out[i].m6_ifp = mif6table[i].m6_ifp->if_index; + struct mif6_sctl *outp = &out[i]; + struct mif6 *mifp = &V_mfctables[0].miftable[i]; + + outp->m6_flags = mifp->m6_flags; + outp->m6_rate_limit = mifp->m6_rate_limit; + outp->m6_lcl_addr = mifp->m6_lcl_addr; + if (mifp->m6_ifp != NULL) + outp->m6_ifp = mifp->m6_ifp->if_index; else - out[i].m6_ifp = 0; - out[i].m6_pkt_in = mif6table[i].m6_pkt_in; - out[i].m6_pkt_out = mif6table[i].m6_pkt_out; - out[i].m6_bytes_in = mif6table[i].m6_bytes_in; - out[i].m6_bytes_out = mif6table[i].m6_bytes_out; + outp->m6_ifp = 0; + outp->m6_pkt_in = mifp->m6_pkt_in; + outp->m6_pkt_out = mifp->m6_pkt_out; + outp->m6_bytes_in = mifp->m6_bytes_in; + outp->m6_bytes_out = mifp->m6_bytes_out; } error = SYSCTL_OUT(req, out, sizeof(struct mif6_sctl) * MAXMIFS); free(out, M_TEMP); @@ -257,25 +286,6 @@ static void expire_upcalls(void *); #define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */ #define UPCALL_EXPIRE 6 /* number of timeouts */ -/* - * 'Interfaces' associated with decapsulator (so we can tell - * packets that went through it from ones that get reflected - * by a broken gateway). Different from IPv4 register_if, - * these interfaces are linked into the system ifnet list, - * because per-interface IPv6 statistics are maintained in - * ifp->if_afdata. But it does not have any routes point - * to them. I.e., packets can't be sent this way. They - * only exist as a placeholder for multicast source - * verification. - */ -static struct ifnet *multicast_register_if6; - -/* - * Private variables. - */ -static mifi_t nummifs = 0; -static mifi_t reg_mif_num = (mifi_t)-1; - static struct pim6stat pim6stat; SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RW, &pim6stat, pim6stat, @@ -335,7 +345,8 @@ static int del_m6if_locked(mifi_t *); static int get_mif6_cnt(struct sioc_mif_req6 *); static int get_sg_cnt(struct sioc_sg_req6 *); -static struct callout expire_upcalls_ch; +VNET_DEFINE_STATIC(struct callout, expire_upcalls_ch); +#define V_expire_upcalls_ch VNET(expire_upcalls_ch) static int X_ip6_mforward(struct ip6_hdr *, struct ifnet *, struct mbuf *); static void X_ip6_mrouter_done(struct socket *); @@ -344,12 +355,13 @@ static int X_ip6_mrouter_get(struct socket *, struct sockopt *); static int X_mrt6_ioctl(u_long, caddr_t); static struct mf6c * -mf6c_find(const struct in6_addr *origin, const struct in6_addr *group) +mf6c_find(const struct mf6ctable *mfct, const struct in6_addr *origin, + const struct in6_addr *group) { MFC6_LOCK_ASSERT(); - for (struct mf6c *rt = mf6ctable[MF6CHASH(*origin, *group)]; rt != NULL; - rt = rt->mf6c_next) { + for (struct mf6c *rt = mfct->mfchashtbl[MF6CHASH(*origin, *group)]; + rt != NULL; rt = rt->mf6c_next) { if (IN6_ARE_ADDR_EQUAL(&rt->mf6c_origin.sin6_addr, origin) && IN6_ARE_ADDR_EQUAL(&rt->mf6c_mcastgrp.sin6_addr, group) && rt->mf6c_stall == NULL) @@ -365,13 +377,15 @@ mf6c_find(const struct in6_addr *origin, const struct in6_addr *group) static int X_ip6_mrouter_set(struct socket *so, struct sockopt *sopt) { + struct mf6ctable *mfct; int error = 0; int optval; struct mif6ctl mifc; struct mf6cctl mfcc; mifi_t mifi; - if (so != V_ip6_mrouter && sopt->sopt_name != MRT6_INIT) + mfct = &V_mfctables[0]; + if (so != mfct->router && sopt->sopt_name != MRT6_INIT) return (EPERM); switch (sopt->sopt_name) { @@ -433,9 +447,11 @@ X_ip6_mrouter_set(struct socket *so, struct sockopt *sopt) static int X_ip6_mrouter_get(struct socket *so, struct sockopt *sopt) { + struct mf6ctable *mfct; int error = 0; - if (so != V_ip6_mrouter) + mfct = &V_mfctables[0]; + if (so != mfct->router) return (EACCES); switch (sopt->sopt_name) { @@ -486,8 +502,8 @@ get_sg_cnt(struct sioc_sg_req6 *req) ret = 0; MFC6_LOCK(); - - rt = mf6c_find(&req->src.sin6_addr, &req->grp.sin6_addr); + rt = mf6c_find(&V_mfctables[0], &req->src.sin6_addr, + &req->grp.sin6_addr); if (rt == NULL) { ret = ESRCH; } else { @@ -495,7 +511,6 @@ get_sg_cnt(struct sioc_sg_req6 *req) req->bytecnt = rt->mf6c_byte_cnt; req->wrong_if = rt->mf6c_wrong_if; } - MFC6_UNLOCK(); return (ret); @@ -507,21 +522,25 @@ get_sg_cnt(struct sioc_sg_req6 *req) static int get_mif6_cnt(struct sioc_mif_req6 *req) { + struct mf6ctable *mfct; mifi_t mifi; int ret; ret = 0; mifi = req->mifi; + mfct = &V_mfctables[0]; MIF6_LOCK(); - if (mifi >= nummifs) { + if (mifi >= mfct->nummifs) { ret = EINVAL; } else { - req->icount = mif6table[mifi].m6_pkt_in; - req->ocount = mif6table[mifi].m6_pkt_out; - req->ibytes = mif6table[mifi].m6_bytes_in; - req->obytes = mif6table[mifi].m6_bytes_out; + struct mif6 *mif = &mfct->miftable[mifi]; + + req->icount = mif->m6_pkt_in; + req->ocount = mif->m6_pkt_out; + req->ibytes = mif->m6_bytes_in; + req->obytes = mif->m6_bytes_out; } MIF6_UNLOCK(); @@ -546,32 +565,33 @@ set_pim6(int *i) static int ip6_mrouter_init(struct socket *so, int v, int cmd) { + struct mf6ctable *mfct; MRT6_DLOG(DEBUG_ANY, "%s: socket %p", __func__, so); if (v != 1) return (ENOPROTOOPT); + mfct = &V_mfctables[0]; MROUTER6_LOCK(); - if (V_ip6_mrouter != NULL) { + if (mfct->router != NULL) { MROUTER6_UNLOCK(); return (EADDRINUSE); } MFC6_LOCK(); V_ip6_mrouting_enabled = true; - V_ip6_mrouter = so; - V_ip6_mrouter_ver = cmd; + mfct->router = so; + mfct->router_ver = cmd; - bzero((caddr_t)mf6ctable, sizeof(mf6ctable)); - bzero((caddr_t)n6expire, sizeof(n6expire)); + bzero(&mfct->mfchashtbl, sizeof(mfct->mfchashtbl)); + bzero(&mfct->nexpire, sizeof(mfct->nexpire)); V_pim6 = 0;/* used for stubbing out/in pim stuff */ - callout_init_mtx(&expire_upcalls_ch, MFC6_LOCKPTR(), 0); - callout_reset(&expire_upcalls_ch, EXPIRE_TIMEOUT, - expire_upcalls, NULL); + callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls, + curvnet); MFC6_UNLOCK(); MROUTER6_UNLOCK(); @@ -587,14 +607,16 @@ ip6_mrouter_init(struct socket *so, int v, int cmd) static void X_ip6_mrouter_done(struct socket *so) { + struct mf6ctable *mfct; mifi_t mifi; u_long i; struct mf6c *rt; struct rtdetq *rte; + mfct = &V_mfctables[0]; MROUTER6_LOCK(); - if (V_ip6_mrouter != so) { + if (mfct->router != so) { MROUTER6_UNLOCK(); return; } @@ -603,15 +625,16 @@ X_ip6_mrouter_done(struct socket *so) * For each phyint in use, disable promiscuous reception of all IPv6 * multicasts. */ - for (mifi = 0; mifi < nummifs; mifi++) { - if (mif6table[mifi].m6_ifp && - !(mif6table[mifi].m6_flags & MIFF_REGISTER)) { - if_allmulti(mif6table[mifi].m6_ifp, 0); + for (mifi = 0; mifi < mfct->nummifs; mifi++) { + struct mif6 *mif = &mfct->miftable[mifi]; + + if (mif->m6_ifp && !(mif->m6_flags & MIFF_REGISTER)) { + if_allmulti(mif->m6_ifp, 0); } } MFC6_LOCK(); - bzero((caddr_t)mif6table, sizeof(mif6table)); - nummifs = 0; + bzero(mfct->miftable, sizeof(mfct->miftable)); + mfct->nummifs = 0; V_pim6 = 0; /* used to stub out/in pim specific code */ @@ -619,7 +642,7 @@ X_ip6_mrouter_done(struct socket *so) * Free all multicast forwarding cache entries. */ for (i = 0; i < MF6CTBLSIZ; i++) { - rt = mf6ctable[i]; + rt = mfct->mfchashtbl[i]; while (rt) { struct mf6c *frt; @@ -635,23 +658,21 @@ X_ip6_mrouter_done(struct socket *so) free(frt, M_MRTABLE6); } } - bzero((caddr_t)mf6ctable, sizeof(mf6ctable)); - - V_ip6_mrouter = NULL; + mfct->router = NULL; + mfct->router_ver = 0; V_ip6_mrouting_enabled = false; - V_ip6_mrouter_ver = 0; - MFC6_UNLOCK(); - callout_drain(&expire_upcalls_ch); + bzero(mfct->mfchashtbl, sizeof(mfct->mfchashtbl)); + MFC6_UNLOCK(); /* * Reset register interface */ - if (reg_mif_num != (mifi_t)-1 && multicast_register_if6 != NULL) { - if_detach(multicast_register_if6); - if_free(multicast_register_if6); - reg_mif_num = (mifi_t)-1; - multicast_register_if6 = NULL; + if (mfct->register_mif != (mifi_t)-1 && mfct->register_if != NULL) { + if_detach(mfct->register_if); + if_free(mfct->register_if); + mfct->register_mif = (mifi_t)-1; + mfct->register_if = NULL; } MROUTER6_UNLOCK(); @@ -666,6 +687,7 @@ static struct sockaddr_in6 sin6 = { sizeof(sin6), AF_INET6 }; static int add_m6if(struct mif6ctl *mifcp) { + struct mf6ctable *mfct; struct epoch_tracker et; struct mif6 *mifp; struct ifnet *ifp; @@ -677,7 +699,8 @@ add_m6if(struct mif6ctl *mifcp) MIF6_UNLOCK(); return (EINVAL); } - mifp = mif6table + mifcp->mif6c_mifi; + mfct = &V_mfctables[0]; + mifp = &mfct->miftable[mifcp->mif6c_mifi]; if (mifp->m6_ifp != NULL) { MIF6_UNLOCK(); return (EADDRINUSE); /* XXX: is it appropriate? */ @@ -692,14 +715,14 @@ add_m6if(struct mif6ctl *mifcp) NET_EPOCH_EXIT(et); /* XXXGL: unsafe ifp */ if (mifcp->mif6c_flags & MIFF_REGISTER) { - if (reg_mif_num == (mifi_t)-1) { + if (mfct->register_mif == (mifi_t)-1) { ifp = if_alloc(IFT_OTHER); if_initname(ifp, "register_mif", 0); ifp->if_flags |= IFF_LOOPBACK; if_attach(ifp); - multicast_register_if6 = ifp; - reg_mif_num = mifcp->mif6c_mifi; + mfct->register_if = ifp; + mfct->register_mif = mifcp->mif6c_mifi; /* * it is impossible to guess the ifindex of the * register interface. So mif6c_pifi is automatically @@ -707,7 +730,7 @@ add_m6if(struct mif6ctl *mifcp) */ mifcp->mif6c_pifi = ifp->if_index; } else { - ifp = multicast_register_if6; + ifp = mfct->register_if; } } else { /* Make sure the interface supports multicast */ @@ -733,8 +756,8 @@ add_m6if(struct mif6ctl *mifcp) mifp->m6_bytes_out = 0; /* Adjust nummifs up if the mifi is higher than nummifs */ - if (nummifs <= mifcp->mif6c_mifi) - nummifs = mifcp->mif6c_mifi + 1; + if (mfct->nummifs <= mifcp->mif6c_mifi) + mfct->nummifs = mifcp->mif6c_mifi + 1; MIF6_UNLOCK(); MRT6_DLOG(DEBUG_ANY, "mif #%d, phyint %s", mifcp->mif6c_mifi, @@ -749,14 +772,17 @@ add_m6if(struct mif6ctl *mifcp) static int del_m6if_locked(mifi_t *mifip) { - struct mif6 *mifp = mif6table + *mifip; + struct mf6ctable *mfct; + struct mif6 *mifp; mifi_t mifi; struct ifnet *ifp; MIF6_LOCK_ASSERT(); - if (*mifip >= nummifs) + mfct = &V_mfctables[0]; + if (*mifip >= mfct->nummifs) return (EINVAL); + mifp = &mfct->miftable[*mifip]; if (mifp->m6_ifp == NULL) return (EINVAL); @@ -765,23 +791,23 @@ del_m6if_locked(mifi_t *mifip) ifp = mifp->m6_ifp; if_allmulti(ifp, 0); } else { - if (reg_mif_num != (mifi_t)-1 && - multicast_register_if6 != NULL) { - if_detach(multicast_register_if6); - if_free(multicast_register_if6); - reg_mif_num = (mifi_t)-1; - multicast_register_if6 = NULL; + if (mfct->register_mif != (mifi_t)-1 && + mfct->register_if != NULL) { + if_detach(mfct->register_if); + if_free(mfct->register_if); + mfct->register_mif = (mifi_t)-1; + mfct->register_if = NULL; } } - bzero((caddr_t)mifp, sizeof(*mifp)); + bzero(mifp, sizeof(*mifp)); /* Adjust nummifs down */ - for (mifi = nummifs; mifi > 0; mifi--) - if (mif6table[mifi - 1].m6_ifp) + for (mifi = mfct->nummifs; mifi > 0; mifi--) + if (mfct->miftable[mifi - 1].m6_ifp != NULL) break; - nummifs = mifi; - MRT6_DLOG(DEBUG_ANY, "mif %d, nummifs %d", *mifip, nummifs); + mfct->nummifs = mifi; + MRT6_DLOG(DEBUG_ANY, "mif %d, nummifs %d", *mifip, mfct->nummifs); return (0); } @@ -804,15 +830,17 @@ del_m6if(mifi_t *mifip) static int add_m6fc(struct mf6cctl *mfccp) { + struct mf6ctable *mfct; struct mf6c *rt; u_long hash; struct rtdetq *rte; u_short nstl; char ip6bufo[INET6_ADDRSTRLEN], ip6bufg[INET6_ADDRSTRLEN]; - MFC6_LOCK(); + mfct = &V_mfctables[0]; - rt = mf6c_find(&mfccp->mf6cc_origin.sin6_addr, + MFC6_LOCK(); + rt = mf6c_find(mfct, &mfccp->mf6cc_origin.sin6_addr, &mfccp->mf6cc_mcastgrp.sin6_addr); /* If an entry already exists, just update the fields */ if (rt) { @@ -833,7 +861,7 @@ add_m6fc(struct mf6cctl *mfccp) */ hash = MF6CHASH(mfccp->mf6cc_origin.sin6_addr, mfccp->mf6cc_mcastgrp.sin6_addr); - for (rt = mf6ctable[hash], nstl = 0; rt; rt = rt->mf6c_next) { + for (rt = mfct->mfchashtbl[hash], nstl = 0; rt; rt = rt->mf6c_next) { if (IN6_ARE_ADDR_EQUAL(&rt->mf6c_origin.sin6_addr, &mfccp->mf6cc_origin.sin6_addr) && IN6_ARE_ADDR_EQUAL(&rt->mf6c_mcastgrp.sin6_addr, @@ -866,12 +894,12 @@ add_m6fc(struct mf6cctl *mfccp) rt->mf6c_wrong_if = 0; rt->mf6c_expire = 0; /* Don't clean this guy up */ - n6expire[hash]--; + mfct->nexpire[hash]--; /* free packets Qed at the end of this entry */ for (rte = rt->mf6c_stall; rte != NULL; ) { struct rtdetq *n = rte->next; - ip6_mdq(rte->m, rte->ifp, rt); + ip6_mdq(mfct, rte->m, rte->ifp, rt); m_freem(rte->m); #ifdef UPCALL_TIMING collate(&(rte->t)); @@ -892,7 +920,7 @@ add_m6fc(struct mf6cctl *mfccp) ip6_sprintf(ip6bufg, &mfccp->mf6cc_mcastgrp.sin6_addr), mfccp->mf6cc_parent); - for (rt = mf6ctable[hash]; rt; rt = rt->mf6c_next) { + for (rt = mfct->mfchashtbl[hash]; rt; rt = rt->mf6c_next) { if (IN6_ARE_ADDR_EQUAL(&rt->mf6c_origin.sin6_addr, &mfccp->mf6cc_origin.sin6_addr)&& IN6_ARE_ADDR_EQUAL(&rt->mf6c_mcastgrp.sin6_addr, @@ -907,7 +935,7 @@ add_m6fc(struct mf6cctl *mfccp) rt->mf6c_wrong_if = 0; if (rt->mf6c_expire) - n6expire[hash]--; + mfct->nexpire[hash]--; rt->mf6c_expire = 0; } } @@ -932,8 +960,8 @@ add_m6fc(struct mf6cctl *mfccp) rt->mf6c_stall = NULL; /* link into table */ - rt->mf6c_next = mf6ctable[hash]; - mf6ctable[hash] = rt; + rt->mf6c_next = mfct->mfchashtbl[hash]; + mfct->mfchashtbl[hash] = rt; } } @@ -976,12 +1004,14 @@ del_m6fc(struct mf6cctl *mfccp) #ifdef MRT6DEBUG char ip6bufo[INET6_ADDRSTRLEN], ip6bufg[INET6_ADDRSTRLEN]; #endif + struct mf6ctable *mfct; struct sockaddr_in6 origin; struct sockaddr_in6 mcastgrp; struct mf6c *rt; struct mf6c **nptr; u_long hash; + mfct = &V_mfctables[0]; origin = mfccp->mf6cc_origin; mcastgrp = mfccp->mf6cc_mcastgrp; hash = MF6CHASH(origin.sin6_addr, mcastgrp.sin6_addr); @@ -992,7 +1022,7 @@ del_m6fc(struct mf6cctl *mfccp) MFC6_LOCK(); - nptr = &mf6ctable[hash]; + nptr = &mfct->mfchashtbl[hash]; while ((rt = *nptr) != NULL) { if (IN6_ARE_ADDR_EQUAL(&origin.sin6_addr, &rt->mf6c_origin.sin6_addr) && @@ -1054,6 +1084,7 @@ socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in6 *src) static int X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) { + struct mf6ctable *mfct; struct rtdetq *rte; struct mbuf *mb0; struct mf6c *rt; @@ -1103,18 +1134,19 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) return (0); } + mfct = &V_mfctables[0]; MFC6_LOCK(); /* * Determine forwarding mifs from the forwarding cache table */ - rt = mf6c_find(&ip6->ip6_src, &ip6->ip6_dst); + rt = mf6c_find(mfct, &ip6->ip6_src, &ip6->ip6_dst); MRT6STAT_INC(mrt6s_mfc_lookups); /* Entry exists, so forward if necessary */ if (rt) { MFC6_UNLOCK(); - return (ip6_mdq(m, ifp, rt)); + return (ip6_mdq(mfct, m, ifp, rt)); } /* @@ -1150,7 +1182,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) /* is there an upcall waiting for this packet? */ hash = MF6CHASH(ip6->ip6_src, ip6->ip6_dst); - for (rt = mf6ctable[hash]; rt; rt = rt->mf6c_next) { + for (rt = mfct->mfchashtbl[hash]; rt; rt = rt->mf6c_next) { if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &rt->mf6c_origin.sin6_addr) && IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, @@ -1192,7 +1224,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) #ifdef MRT6_OINIT oim = NULL; #endif - switch (V_ip6_mrouter_ver) { + switch (mfct->router_ver) { #ifdef MRT6_OINIT case MRT6_OINIT: oim = mtod(mm, struct omrt6msg *); @@ -1214,11 +1246,11 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) } MRT6_DLOG(DEBUG_FORWARD, "getting the iif info in the kernel"); - for (mifp = mif6table, mifi = 0; - mifi < nummifs && mifp->m6_ifp != ifp; mifp++, mifi++) - ; + for (mifp = mfct->miftable, mifi = 0; + mifi < mfct->nummifs && mifp->m6_ifp != ifp; mifp++, mifi++) + ; - switch (V_ip6_mrouter_ver) { + switch (mfct->router_ver) { #ifdef MRT6_OINIT case MRT6_OINIT: oim->im6_mif = mifi; @@ -1229,7 +1261,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) break; } - if (socket_send(V_ip6_mrouter, mm, &sin6) < 0) { + if (socket_send(mfct->router, mm, &sin6) < 0) { log(LOG_WARNING, "ip6_mforward: ip6_mrouter " "socket queue full\n"); MRT6STAT_INC(mrt6s_upq_sockfull); @@ -1251,12 +1283,12 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) rt->mf6c_mcastgrp.sin6_len = sizeof(struct sockaddr_in6); rt->mf6c_mcastgrp.sin6_addr = ip6->ip6_dst; rt->mf6c_expire = UPCALL_EXPIRE; - n6expire[hash]++; + mfct->nexpire[hash]++; rt->mf6c_parent = MF6C_INCOMPLETE_PARENT; /* link into table */ - rt->mf6c_next = mf6ctable[hash]; - mf6ctable[hash] = rt; + rt->mf6c_next = mfct->mfchashtbl[hash]; + mfct->mfchashtbl[hash] = rt; /* Add this entry to the end of the queue */ rt->mf6c_stall = rte; } else { @@ -1294,21 +1326,24 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) * Call from the Slow Timeout mechanism, every half second. */ static void -expire_upcalls(void *unused) +expire_upcalls(void *arg) { #ifdef MRT6DEBUG char ip6bufo[INET6_ADDRSTRLEN], ip6bufg[INET6_ADDRSTRLEN]; #endif + struct mf6ctable *mfct; struct rtdetq *rte; struct mf6c *mfc, **nptr; u_long i; MFC6_LOCK_ASSERT(); + CURVNET_SET((struct vnet *)arg); + mfct = &V_mfctables[0]; for (i = 0; i < MF6CTBLSIZ; i++) { - if (n6expire[i] == 0) + if (mfct->nexpire[i] == 0) continue; - nptr = &mf6ctable[i]; + nptr = &mfct->mfchashtbl[i]; while ((mfc = *nptr) != NULL) { rte = mfc->mf6c_stall; /* @@ -1333,7 +1368,7 @@ expire_upcalls(void *unused) rte = n; } while (rte != NULL); MRT6STAT_INC(mrt6s_cache_cleanups); - n6expire[i]--; + mfct->nexpire[i]--; *nptr = mfc->mf6c_next; free(mfc, M_MRTABLE6); @@ -1342,15 +1377,18 @@ expire_upcalls(void *unused) } } } - callout_reset(&expire_upcalls_ch, EXPIRE_TIMEOUT, - expire_upcalls, NULL); + callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, + expire_upcalls, curvnet); + + CURVNET_RESTORE(); } /* * Packet forwarding routine once entry in the cache is made */ static int -ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) +ip6_mdq(struct mf6ctable *mfct, struct mbuf *m, struct ifnet *ifp, + struct mf6c *rt) { struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); mifi_t mifi, iif; @@ -1367,13 +1405,13 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) * for its origin. */ mifi = rt->mf6c_parent; - if (mifi >= nummifs || mif6table[mifi].m6_ifp != ifp) { + if (mifi >= mfct->nummifs || mfct->miftable[mifi].m6_ifp != ifp) { MRT6STAT_INC(mrt6s_wrong_if); rt->mf6c_wrong_if++; - if (mifi >= nummifs) + if (mifi >= mfct->nummifs) return (0); - mifp = &mif6table[mifi]; + mifp = &mfct->miftable[mifi]; MRT6_DLOG(DEBUG_FORWARD, "wrong if: ifid %d mifi %d mififid %x", ifp->if_index, mifi, mifp->m6_ifp->if_index); @@ -1412,7 +1450,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) oim = NULL; #endif im = NULL; - switch (V_ip6_mrouter_ver) { + switch (mfct->router_ver) { #ifdef MRT6_OINIT case MRT6_OINIT: oim = mtod(mm, struct omrt6msg *); @@ -1430,12 +1468,12 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) return (EINVAL); } - for (mifp = mif6table, iif = 0; - iif < nummifs && mifp->m6_ifp != ifp; + for (mifp = mfct->miftable, iif = 0; + iif < mfct->nummifs && mifp->m6_ifp != ifp; mifp++, iif++) ; - switch (V_ip6_mrouter_ver) { + switch (mfct->router_ver) { #ifdef MRT6_OINIT case MRT6_OINIT: oim->im6_mif = iif; @@ -1450,7 +1488,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) MRT6STAT_INC(mrt6s_upcalls); - if (socket_send(V_ip6_mrouter, mm, &sin6) < 0) { + if (socket_send(mfct->router, mm, &sin6) < 0) { MRT6_DLOG(DEBUG_ANY, "ip6_mrouter socket queue full"); MRT6STAT_INC(mrt6s_upq_sockfull); @@ -1460,14 +1498,16 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) return (0); } + mifp = &mfct->miftable[mifi]; + /* If I sourced this packet, it counts as output, else it was input. */ if (m->m_pkthdr.rcvif == NULL) { /* XXX: is rcvif really NULL when output?? */ - mif6table[mifi].m6_pkt_out++; - mif6table[mifi].m6_bytes_out += plen; + mifp->m6_pkt_out++; + mifp->m6_bytes_out += plen; } else { - mif6table[mifi].m6_pkt_in++; - mif6table[mifi].m6_bytes_in += plen; + mifp->m6_pkt_in++; + mifp->m6_bytes_in += plen; } rt->mf6c_pkt_cnt++; rt->mf6c_byte_cnt += plen; @@ -1483,7 +1523,8 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) IP6STAT_INC(ip6s_badscope); return (error); } - for (mifp = mif6table, mifi = 0; mifi < nummifs; mifp++, mifi++) { + for (mifp = mfct->miftable, mifi = 0; mifi < mfct->nummifs; + mifp++, mifi++) { if (IF_ISSET(mifi, &rt->mf6c_ifset)) { /* * check if the outgoing packet is going to break @@ -1491,12 +1532,12 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) * XXX For packets through PIM register tunnel * interface, we believe a routing daemon. */ - if (!(mif6table[rt->mf6c_parent].m6_flags & + if (!(mfct->miftable[rt->mf6c_parent].m6_flags & MIFF_REGISTER) && - !(mif6table[mifi].m6_flags & MIFF_REGISTER)) { - if (in6_setscope(&src0, mif6table[mifi].m6_ifp, + !(mifp->m6_flags & MIFF_REGISTER)) { + if (in6_setscope(&src0, mifp->m6_ifp, &oszone) || - in6_setscope(&dst0, mif6table[mifi].m6_ifp, + in6_setscope(&dst0, mifp->m6_ifp, &odzone) || iszone != oszone || idzone != odzone) { @@ -1508,7 +1549,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) mifp->m6_pkt_out++; mifp->m6_bytes_out += plen; if (mifp->m6_flags & MIFF_REGISTER) - register_send(ip6, mifp, m); + register_send(mfct, ip6, mifi, m); else phyint_send(ip6, mifp, m); } @@ -1619,7 +1660,8 @@ phyint_send(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) } static int -register_send(struct ip6_hdr *ip6, struct mif6 *mif, struct mbuf *m) +register_send(struct mf6ctable *mfct, struct ip6_hdr *ip6, mifi_t mifi, + struct mbuf *m) { #ifdef MRT6DEBUG char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; @@ -1663,12 +1705,12 @@ register_send(struct ip6_hdr *ip6, struct mif6 *mif, struct mbuf *m) im6->im6_msgtype = MRT6MSG_WHOLEPKT; im6->im6_mbz = 0; - im6->im6_mif = mif - mif6table; + im6->im6_mif = mifi; /* iif info is not given for reg. encap.n */ MRT6STAT_INC(mrt6s_upcalls); - if (socket_send(V_ip6_mrouter, mm, &sin6) < 0) { + if (socket_send(mfct->router, mm, &sin6) < 0) { MRT6_DLOG(DEBUG_ANY, "ip6_mrouter socket queue full"); MRT6STAT_INC(mrt6s_upq_sockfull); return (ENOBUFS); @@ -1700,11 +1742,14 @@ pim6_encapcheck(const struct mbuf *m __unused, int off __unused, static int pim6_input(struct mbuf *m, int off, int proto, void *arg __unused) { - struct pim *pim; /* pointer to a pim struct */ + struct mf6ctable *mfct; + struct pim *pim; struct ip6_hdr *ip6; int pimlen; int minlen; + mfct = &V_mfctables[0]; + PIM6STAT_INC(pim6s_rcv_total); /* @@ -1792,9 +1837,10 @@ pim6_input(struct mbuf *m, int off, int proto, void *arg __unused) PIM6STAT_INC(pim6s_rcv_registers); - if ((reg_mif_num >= nummifs) || (reg_mif_num == (mifi_t) -1)) { + if (mfct->register_mif >= mfct->nummifs || + mfct->register_mif == (mifi_t)-1) { MRT6_DLOG(DEBUG_PIM, "register mif not set: %d", - reg_mif_num); + mfct->register_mif); m_freem(m); return (IPPROTO_DONE); } @@ -1861,10 +1907,10 @@ pim6_input(struct mbuf *m, int off, int proto, void *arg __unused) MRT6_DLOG(DEBUG_PIM, "forwarding decapsulated register: " "src %s, dst %s, mif %d", ip6_sprintf(ip6bufs, &eip6->ip6_src), - ip6_sprintf(ip6bufd, &eip6->ip6_dst), reg_mif_num); + ip6_sprintf(ip6bufd, &eip6->ip6_dst), mfct->register_mif); - if_simloop(mif6table[reg_mif_num].m6_ifp, m, - dst.sin6_family, 0); + if_simloop(mfct->miftable[mfct->register_mif].m6_ifp, m, + dst.sin6_family, 0); /* prepare the register head to send to the mrouting daemon */ m = mcp; @@ -1880,6 +1926,27 @@ pim6_input(struct mbuf *m, int off, int proto, void *arg __unused) return (rip6_input(&m, &off, proto)); } +static void +vnet_mroute_init(const void *unused __unused) +{ + V_mfctables = mallocarray(V_rt_numfibs, sizeof(*V_mfctables), + M_MRTABLE6, M_WAITOK | M_ZERO); + + callout_init_mtx(&V_expire_upcalls_ch, MFC6_LOCKPTR(), 0); +} +VNET_SYSINIT(vnet_mroute6_init, SI_SUB_PROTO_MC, SI_ORDER_ANY, vnet_mroute_init, + NULL); + +static void +vnet_mroute_uninit(const void *unused __unused) +{ + callout_drain(&V_expire_upcalls_ch); + free(V_mfctables, M_MRTABLE6); + V_mfctables = NULL; +} +VNET_SYSUNINIT(vnet_mroute6_uninit, SI_SUB_PROTO_MC, SI_ORDER_ANY, + vnet_mroute_uninit, NULL); + static int ip6_mroute_modevent(module_t mod, int type, void *unused) { From nobody Mon Mar 30 16:15:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDp3RNGz6WyDH for ; Mon, 30 Mar 2026 16:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDp1Dwtz49pF for ; Mon, 30 Mar 2026 16:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6TDNf5vqQlkepVufqm5P4WB44/h8XH7bSMrOblId/8=; b=U4MUuCsCw8ODseHVl3iICSclsLon9Qfrs3MA30yqsHx5v3FUAlpT1keGcTvhJNkmgQK+6R w4yBrqGtVwSDfYhEnrrAwVoKnyq+pYXqM1ifMhwxz6FO0NLHRrCCU1e5UTacsHD9hs5Nam RUOnAjKEO2fiw480/8Km23OXflf4n+WKSi0KK2mvQpLH5q60e9nfC7QUiiSrR8pXeNgRNc LhFZbjuv1KNVT0Cl0KsQGxrKZn6vxDgZdpG3OnN4MNu1ZhUFEARk8RIxvKjZRl2xbZ2XK8 dCrHFZX3TXNztPyvBcf55ZcO5X/G7WVJ4/e96mgx5epM1XPjHypZwfy8pwvvwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887338; a=rsa-sha256; cv=none; b=BQgdJED3kCpVz6TiSpCYvW3qrm8H0WmS4d0vVE6otWHebFhw7podwr7l+KQL+32yazVWqH Tbc4QudBJsICTv6X1CCHppBYvY7PqU5YJLBDIwQNPhNEVlTOUDlj7XfU0f1/SamEI7ZHGG Qtm9l21UjDVPG7bZq9hoBLN1IVo2FQDYuwVkbgyQvsFyLfxBz1bFbBgjWRoVLj25VNDZe/ RQOoL3rIcRzvXz5NZILinXeyolMUv0GfelgU/TN1cIYjXX++z1JVuZz/9NKHLJoFVZKB2J ughiD/Apo1YZoN61hEhjJ2QlYpAtmDWmBJkmJ1SMPHD+E/J1B40U3scCnvJa/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6TDNf5vqQlkepVufqm5P4WB44/h8XH7bSMrOblId/8=; b=rSlXEv0PpZnDNgyuvLwKXFzYsNK1XyMc6DDNvNg1l+W2qkY+VW4GjPdKPMtLTMCKFMp8dI XstWmjIX+ScIrkl+EYtFXPnWEK1/g3aGE2cENvXaH5IggdS+2DwHWUzq1BWtFfuFvb+kd6 PF6+ZDWZ7RTK/yFtm96PpV6D7uMn6lNdvlrLc2CI2qTpLGSY9h/aJXiM7E3vnLhFQke1Ti H50HFM2QpfC3MjhpUS3zR7mWYzygmuGReX9VeweB8O1/P02B6CN7SDJB5T89NLnWl/xQmy xX7mkiOOCWEUV514vP4yoGXXbH/2x36mKUCl8HEa3Wpk0vuhzo2pntKPmEHWPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDp06vYzqkZ for ; Mon, 30 Mar 2026 16:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c02d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 81dbacbb7d71 - main - net/route: Add an eventhandler for rt_numfibs changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81dbacbb7d71a53eef99ce73f7e589a165c3e1d6 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:38 +0000 Message-Id: <69caa1aa.3c02d.318c3993@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=81dbacbb7d71a53eef99ce73f7e589a165c3e1d6 commit 81dbacbb7d71a53eef99ce73f7e589a165c3e1d6 Author: Mark Johnston AuthorDate: 2026-03-30 13:30:19 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:20 +0000 net/route: Add an eventhandler for rt_numfibs changes The multicast routing code will start implementing per-FIB routing tables. As a part of this, it needs to be notified when the number of FIBs changes, so that it can expand its tables. Add an eventhandler for this purpose. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55239 --- sys/net/route.h | 6 ++++++ sys/net/route/route_tables.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/net/route.h b/sys/net/route.h index 49bb7abd9726..34df3297d6d4 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -32,6 +32,9 @@ #ifndef _NET_ROUTE_H_ #define _NET_ROUTE_H_ +#ifdef _KERNEL +#include +#endif #include /* @@ -124,6 +127,9 @@ VNET_DECLARE(u_int, rt_add_addr_allfibs); /* Announce interfaces to all fibs */ #define V_fib_hash_outbound VNET(fib_hash_outbound) VNET_DECLARE(u_int, fib_hash_outbound); +typedef void (*rtnumfibs_change_t)(void *, uint32_t); +EVENTHANDLER_DECLARE(rtnumfibs_change, rtnumfibs_change_t); + /* Outbound flowid generation rules */ #ifdef RSS #define fib4_calc_packet_hash xps_proto_software_hash_v4 diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c index 749ef063e125..571f1db9c40d 100644 --- a/sys/net/route/route_tables.c +++ b/sys/net/route/route_tables.c @@ -33,10 +33,10 @@ * Which is the new name for an in kernel routing (next hop) table. * ***********************************************************************/ -#include #include "opt_route.h" #include +#include #include #include #include @@ -268,6 +268,8 @@ grow_rtables(uint32_t num_tables) old_rt_tables = V_rt_tables; V_rt_tables = new_rt_tables; + EVENTHANDLER_INVOKE(rtnumfibs_change, num_tables); + /* Wait till all cpus see new pointers */ atomic_thread_fence_rel(); NET_EPOCH_WAIT(); From nobody Mon Mar 30 16:15:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDq4kSGz6WyZr for ; Mon, 30 Mar 2026 16:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDq1Vshz49m7 for ; Mon, 30 Mar 2026 16:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W60lmRWiCenpXxQCV/yjFp3rretIVQ5i8/B73quN4Uc=; b=EhgrR1ShfgAnxZzsGivxYMkY7Np2unBEqPQLOGlTMaTONaskhJkoEBQwi5LgiKu9BajWhO 52g3IB5oQ7+SnPbNVOvaMYHIbzbZg70iNTeSTAh+WS0zJtW/hD006LTD1i4nd10bqcLOD0 9b5OrTMV8//9Rv0Nqupwaa7+n/AfzOc+hoXx2i2y57CW+2SgiiAsnaB8RfP5dp+RVtdvE6 ADLaLFdOoSZQ8r8eZS9RHmtjSq9Jw4pSDI8WIb7olHPWxn0daF3rjAOQTj9FHYttXaXqNs X6amzDMdLIY6JCxTeSsJQM0yIdfW8rH5yHGXhD7Ub6c9RqXBIEtEiSkiATl5YQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887339; a=rsa-sha256; cv=none; b=nP66UXx5W4iCJdXnQJsFN5nrd5k46OC9xr1s+vQGTH8DrDmlOiVwkxrMkQU0yNNWwBqIrF +czyosQvK4bV+peYPU6yS1PwkG5NIOBgvP6HuUnXyL4MAm9ZcjNiel6USVQeVA/jYamrUl XlCOXHWOYoZoe8jaQwwTedEXHkYttjnj5CTg3NlT3ffeLE9Q3O1bMvukdryHrUgD4TMW33 mj/ZWUxUrrU8D43K82Px09htfsrjDAgOEG7H1vnuqChrItxz5MJunvo+opTaFjIQysfLny JXGBV7jrVRGDVn5x9UYZG40eItrdG+Q/hatV4m691QqRY1r8bcRY3RKmk1JJEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W60lmRWiCenpXxQCV/yjFp3rretIVQ5i8/B73quN4Uc=; b=FAKy9eew4fSE2RpnnBP1MWpMZHhJjdArismiumgfqIXUScb5w51hmDoWIiaDL7Y2i8VUvv FZnkjvfDEQQMd1BR7am7v/GRty3yeb451z6lVxek30nbhAAKfi7Q8ITY8xzO6yJyqzMjGX MfFU6nPOLAMX1++0QM471HaJX7gWpGf3HNybDOFlYv8d3vxi08tKtphGy3J9NclTLtiNnf 7ymSvgHPBAM6kUoBiwQSJ+eosJqIIy3V+WWZVwbxxixHGqwwMTWP6OdZ+GYcUjgRMC2c2F BGSN06eV8P1xWZmk4mOrEuVaGPDv+0lLsv5l2VbXDgVexFqtDRBlF9HxJGW7yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDq10cCzqWT for ; Mon, 30 Mar 2026 16:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3adf0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 97a4bc9a0da7 - main - ip(6)_mroute: Grow the routing tables when the number of FIBs changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97a4bc9a0da7cd63c660ce59a9dd7c87efe1f218 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:39 +0000 Message-Id: <69caa1ab.3adf0.13ae3610@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=97a4bc9a0da7cd63c660ce59a9dd7c87efe1f218 commit 97a4bc9a0da7cd63c660ce59a9dd7c87efe1f218 Author: Mark Johnston AuthorDate: 2026-03-30 13:30:38 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:21 +0000 ip(6)_mroute: Grow the routing tables when the number of FIBs changes Use the new rtnumfibs_change event to expand the mfctable array when the number of FIBs increases. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55240 --- sys/netinet/ip_mroute.c | 54 ++++++++++++++++++++++++++++++++++++++--------- sys/netinet6/ip6_mroute.c | 43 ++++++++++++++++++++++++++++++++++--- 2 files changed, 84 insertions(+), 13 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 6e5b739f1da8..9ecaa9a669d6 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -189,6 +189,8 @@ struct mfctable { VNET_DEFINE_STATIC(struct mfctable *, mfctables); #define V_mfctables VNET(mfctables) +VNET_DEFINE_STATIC(uint32_t, nmfctables); +#define V_nmfctables VNET(nmfctables) VNET_DEFINE_STATIC(u_long, mfchash); #define V_mfchash VNET(mfchash) @@ -206,7 +208,8 @@ VNET_DEFINE_STATIC(struct taskqueue *, task_queue); VNET_DEFINE_STATIC(struct task, task); #define V_task VNET(task) -static eventhandler_tag if_detach_event_tag = NULL; +static eventhandler_tag if_detach_event_tag; +static eventhandler_tag rtnumfibs_change_tag; VNET_DEFINE_STATIC(struct callout, expire_upcalls_ch); #define V_expire_upcalls_ch VNET(expire_upcalls_ch) @@ -2808,7 +2811,6 @@ out_locked: MRW_RUNLOCK(); return (error); } - static SYSCTL_NODE(_net_inet_ip, OID_AUTO, mfctable, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_mfctable, "IPv4 Multicast Forwarding Table " @@ -2838,26 +2840,51 @@ sysctl_viflist(SYSCTL_HANDLER_ARGS) MRW_RUNLOCK(); return (error); } - SYSCTL_PROC(_net_inet_ip, OID_AUTO, viftable, CTLTYPE_OPAQUE | CTLFLAG_VNET | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_viflist, "S,vif[MAXVIFS]", "IPv4 Multicast Interfaces (struct vif[MAXVIFS], netinet/ip_mroute.h)"); static void -vnet_mroute_init(const void *unused __unused) +ip_mroute_rtnumfibs_change(void *arg __unused, uint32_t ntables) { - V_mfctables = mallocarray(V_rt_numfibs, sizeof(*V_mfctables), M_MRTABLE, + struct mfctable *mfctables, *omfctables; + + KASSERT(ntables >= V_nmfctables, + ("%s: ntables %u nmfctables %u", __func__, ntables, V_nmfctables)); + + mfctables = mallocarray(ntables, sizeof(*mfctables), M_MRTABLE, M_WAITOK | M_ZERO); - for (int i = 0; i < V_rt_numfibs; i++) { + omfctables = V_mfctables; + + for (int i = V_nmfctables; i < ntables; i++) { struct mfctable *mfct; - mfct = &V_mfctables[i]; + mfct = &mfctables[i]; mfct->nexpire = malloc(mfchashsize, M_MRTABLE, M_WAITOK | M_ZERO); mfct->register_vif = VIFI_INVALID; } + MRW_TEARDOWN_WLOCK(); + MRW_WLOCK(); + for (int i = 0; i < V_nmfctables; i++) + memcpy(&mfctables[i], &omfctables[i], sizeof(*mfctables)); + atomic_store_rel_ptr((uintptr_t *)&V_mfctables, (uintptr_t)mfctables); + MRW_WUNLOCK(); + MRW_TEARDOWN_WUNLOCK(); + + NET_EPOCH_WAIT(); + + V_nmfctables = ntables; + free(omfctables, M_MRTABLE); +} + +static void +vnet_mroute_init(const void *unused __unused) +{ + ip_mroute_rtnumfibs_change(NULL, V_rt_numfibs); + callout_init_rw(&V_expire_upcalls_ch, &mrouter_lock, 0); callout_init_rw(&V_bw_upcalls_ch, &mrouter_lock, 0); @@ -2895,8 +2922,12 @@ ip_mroute_modevent(module_t mod, int type, void *unused) MRW_TEARDOWN_LOCK_INIT(); MRW_LOCK_INIT(); - if_detach_event_tag = EVENTHANDLER_REGISTER(ifnet_departure_event, - if_detached_event, NULL, EVENTHANDLER_PRI_ANY); + if_detach_event_tag = EVENTHANDLER_REGISTER( + ifnet_departure_event, if_detached_event, NULL, + EVENTHANDLER_PRI_ANY); + rtnumfibs_change_tag = EVENTHANDLER_REGISTER( + rtnumfibs_change, ip_mroute_rtnumfibs_change, + NULL, EVENTHANDLER_PRI_ANY); if (!powerof2(mfchashsize)) { printf("WARNING: %s not a power of 2; using default\n", @@ -2937,7 +2968,10 @@ ip_mroute_modevent(module_t mod, int type, void *unused) ip_mrouter_unloading = 1; MRW_WUNLOCK(); - EVENTHANDLER_DEREGISTER(ifnet_departure_event, if_detach_event_tag); + EVENTHANDLER_DEREGISTER(rtnumfibs_change, + rtnumfibs_change_tag); + EVENTHANDLER_DEREGISTER(ifnet_departure_event, + if_detach_event_tag); if (pim_encap_cookie) { ip_encap_detach(pim_encap_cookie); diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 912bbfda2486..fff68a7ff47d 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -83,6 +83,7 @@ #include #include #include +#include #include #include #include @@ -207,6 +208,10 @@ struct mf6ctable { VNET_DEFINE_STATIC(struct mf6ctable *, mfctables); #define V_mfctables VNET(mfctables) +VNET_DEFINE_STATIC(uint32_t, nmfctables); +#define V_nmfctables VNET(nmfctables) + +static eventhandler_tag rtnumfibs_change_tag; static int sysctl_mfctable(SYSCTL_HANDLER_ARGS) @@ -1926,11 +1931,36 @@ pim6_input(struct mbuf *m, int off, int proto, void *arg __unused) return (rip6_input(&m, &off, proto)); } +static void +ip6_mroute_rtnumfibs_change(void *arg __unused, uint32_t ntables) +{ + struct mf6ctable *mfctables, *omfctables; + + KASSERT(ntables >= V_nmfctables, + ("%s: ntables %u nmfctables %u", __func__, ntables, V_nmfctables)); + + mfctables = mallocarray(ntables, sizeof(*mfctables), M_MRTABLE6, + M_WAITOK | M_ZERO); + omfctables = V_mfctables; + + MROUTER6_LOCK(); + MFC6_LOCK(); + for (int i = 0; i < V_nmfctables; i++) + memcpy(&mfctables[i], &omfctables[i], sizeof(*mfctables)); + atomic_store_rel_ptr((uintptr_t *)&V_mfctables, (uintptr_t)mfctables); + MFC6_UNLOCK(); + MROUTER6_UNLOCK(); + + NET_EPOCH_WAIT(); + + V_nmfctables = ntables; + free(omfctables, M_MRTABLE6); +} + static void vnet_mroute_init(const void *unused __unused) { - V_mfctables = mallocarray(V_rt_numfibs, sizeof(*V_mfctables), - M_MRTABLE6, M_WAITOK | M_ZERO); + ip6_mroute_rtnumfibs_change(NULL, V_rt_numfibs); callout_init_mtx(&V_expire_upcalls_ch, MFC6_LOCKPTR(), 0); } @@ -1957,6 +1987,10 @@ ip6_mroute_modevent(module_t mod, int type, void *unused) MFC6_LOCK_INIT(); MIF6_LOCK_INIT(); + rtnumfibs_change_tag = EVENTHANDLER_REGISTER( + rtnumfibs_change, ip6_mroute_rtnumfibs_change, + NULL, EVENTHANDLER_PRI_ANY); + pim6_encap_cookie = ip6_encap_attach(&ipv6_encap_cfg, NULL, M_WAITOK); if (pim6_encap_cookie == NULL) { @@ -1978,6 +2012,9 @@ ip6_mroute_modevent(module_t mod, int type, void *unused) if (V_ip6_mrouting_enabled) return (EBUSY); + EVENTHANDLER_DEREGISTER(rtnumfibs_change, + rtnumfibs_change_tag); + if (pim6_encap_cookie) { ip6_encap_detach(pim6_encap_cookie); pim6_encap_cookie = NULL; @@ -2007,4 +2044,4 @@ static moduledata_t ip6_mroutemod = { 0 }; -DECLARE_MODULE(ip6_mroute, ip6_mroutemod, SI_SUB_PROTO_MC, SI_ORDER_ANY); +DECLARE_MODULE(ip6_mroute, ip6_mroutemod, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE); From nobody Mon Mar 30 16:15:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDr5c52z6WyDL for ; Mon, 30 Mar 2026 16:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDr3Rcmz49Y7 for ; Mon, 30 Mar 2026 16:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKjecw1NBVkBxlqq41lpxr/HE6Ns3CJ9R6/NVpEc70o=; b=KmrYJXja03huPByySzvn7ODYw7HF3RzRgqDSF2/nK0QFggfigNaWW1e+wj5nvx3JIs2kzV n1sSbI+9FBnbRrGlRTYGDivZEaXQS6t7nj41tIydjmszX33f9IrX3NBm8Wu1MuX2NF0bFz r7NbJj0rdMZ67YhElYzXWBzBjf31XI6gBzwjy187GgiMoRBAPLKs+nGmkqAp0w10nKa2QE kyy0Ivs4PqAlY+mWw47bxaVZH7lZS14QOwUaW5kWqaZkG2e8EAeF0Go6bdmeq85ZKk5Yz5 xyHPp3YyqS9G1TUI0djFCWpxhYOVrhIgdHRTQxyiEcri5iQoEMneITX0kTZz2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887340; a=rsa-sha256; cv=none; b=aRaWnCkgOka7HSTmmL+UefT9od3K7+txU73UajpIqkr+Ru+lerL6xGtaL+FwhTzEExcik9 nJX1bsxmL3OHQJXnvbrAEGSTDnA8E3+1ACVrlIjNBhIcITMVYY66NJBYmcPTRxV+10q/vn QYYxJp4DHYgUcRqfN2EK5loqniTWGJmzTZaWIR1m2SjG0LcKsAKhnS7RO3M20rpqHZq9Id PFr7YMM5dUyCKM69dBVPBf8ySxpkHig59k4qEy197rPWhHMd5O3vWxX4P67h2qwxnj7PB6 SoPyPrkFW/4BbGiL3F9XtcMx9RHQ37UEsW/wdSZ2HTf7AIHUfbSGdEIlAGC7lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKjecw1NBVkBxlqq41lpxr/HE6Ns3CJ9R6/NVpEc70o=; b=xoFLLH+Ni3cxC++MYCDCX1HXvUB1e/B4JqmOWt+9188tBkmrye8Bgjg7aMsRLWVzM4amtV gWifaRGi9X68rLbE1UdSsDHizLcIkJSnsAri3+PNFgNFy6JMH0A404I4Ecpi4e3haT1Tru 4KfslurGL7VBvaerBrubahG+x13PtI8AwfgHVENsVot9IeQs+CPvv+KJ2rrCg7t2H66op7 HH5Vm0cxkLkA6wJ90B52QpFIaUyk/uWxZez5T9WT754EyB7FnJCx8Am1bZaRPb8XVnZ1ns TNG4+OLxs2tucb4TlVTuQPnmgEuncb/dTYp4hUzSjhexZjEWxu4haYEnYWSvjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDr1mtnzqwP for ; Mon, 30 Mar 2026 16:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c306 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4c486fe40267 - main - ip_mroute: FIBify List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c486fe402673c49443293cfb70ad4da61d39916 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:40 +0000 Message-Id: <69caa1ac.3c306.1426a84@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4c486fe402673c49443293cfb70ad4da61d39916 commit 4c486fe402673c49443293cfb70ad4da61d39916 Author: Mark Johnston AuthorDate: 2026-03-30 13:31:29 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:21 +0000 ip_mroute: FIBify Modify the control plane (ioctl and socket option handlers) to use the routing socket FIB to index into the mfctable array. Modify the forwarding plane to use the mbuf's FIB to determine which routing table to use. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55241 --- sys/netinet/in_mcast.c | 3 +- sys/netinet/ip_mroute.c | 319 +++++++++++++++++++++++++----------------------- sys/netinet/ip_mroute.h | 5 +- sys/netinet/ip_output.c | 11 +- sys/netinet/raw_ip.c | 4 +- 5 files changed, 180 insertions(+), 162 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 20e6f9d8b322..6b9bb599a475 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -2702,7 +2702,8 @@ inp_setmoptions(struct inpcb *inp, struct sockopt *sopt) error = sooptcopyin(sopt, &vifi, sizeof(int), sizeof(int)); if (error) break; - if (!legal_vif_num(vifi) && (vifi != -1)) { + if (!legal_vif_num(inp->inp_socket->so_fibnum, vifi) && + vifi != -1) { error = EINVAL; break; } diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 9ecaa9a669d6..6f2bf8248dd8 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -306,32 +306,35 @@ static struct pim_encap_pimhdr pim_encap_pimhdr = { * Private variables. */ -static u_long X_ip_mcast_src(int); +static u_long X_ip_mcast_src(int, int); static int X_ip_mforward(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *); static void X_ip_mrouter_done(struct socket *); static int X_ip_mrouter_get(struct socket *, struct sockopt *); static int X_ip_mrouter_set(struct socket *, struct sockopt *); -static int X_legal_vif_num(int); +static int X_legal_vif_num(int, int); static int X_mrt_ioctl(u_long, caddr_t, int); -static int add_bw_upcall(struct bw_upcall *); -static int add_mfc(struct mfcctl2 *); -static int add_vif(struct vifctl *); +static int add_bw_upcall(struct mfctable *, struct bw_upcall *); +static int add_mfc(struct mfctable *, struct mfcctl2 *); +static int add_vif(struct mfctable *, int, struct vifctl *); static void bw_meter_prepare_upcall(struct bw_meter *, struct timeval *); static void bw_meter_geq_receive_packet(struct bw_meter *, int, struct timeval *); -static void bw_upcalls_send(void); -static int del_bw_upcall(struct bw_upcall *); -static int del_mfc(struct mfcctl2 *); -static int del_vif(vifi_t); -static int del_vif_locked(vifi_t, struct ifnet **, struct ifnet **); +static void bw_upcalls_send(struct mfctable *); +static void bw_upcalls_send_all(void); +static int del_bw_upcall(struct mfctable *, struct bw_upcall *); +static int del_mfc(struct mfctable *, struct mfcctl2 *); +static int del_vif(struct mfctable *, vifi_t); +static int del_vif_locked(struct mfctable *, vifi_t, struct ifnet **, + struct ifnet **); static void expire_bw_upcalls_send(void *); static void expire_mfc(struct mfc *); -static void expire_upcalls(void *); +static void expire_upcalls(struct mfctable *); +static void expire_upcalls_all(void *); static void free_bw_list(struct bw_meter *); -static int get_sg_cnt(struct sioc_sg_req *); -static int get_vif_cnt(struct sioc_vif_req *); +static int get_sg_cnt(struct mfctable *, struct sioc_sg_req *); +static int get_vif_cnt(struct mfctable *, struct sioc_vif_req *); static void if_detached_event(void *, struct ifnet *); static int ip_mdq(struct mfctable *, struct mbuf *, struct ifnet *, struct mfc *, vifi_t); @@ -344,13 +347,13 @@ static struct mbuf * pim_register_prepare(struct ip *, struct mbuf *); static int pim_register_send(struct mfctable *, struct ip *, struct vif *, struct mbuf *, struct mfc *); -static int pim_register_send_rp(struct ip *, struct vif *, - struct mbuf *, struct mfc *); -static int pim_register_send_upcall(struct ip *, struct vif *, - struct mbuf *, struct mfc *); +static int pim_register_send_rp(struct mfctable *, struct ip *, + struct vif *, struct mbuf *, struct mfc *); +static int pim_register_send_upcall(struct mfctable *, struct ip *, + struct vif *, struct mbuf *, struct mfc *); static void send_packet(struct vif *, struct mbuf *); -static int set_api_config(uint32_t *); -static int set_assert(int); +static int set_api_config(struct mfctable *, uint32_t *); +static int set_assert(struct mfctable *, int); static int socket_send(struct socket *, struct mbuf *, struct sockaddr_in *); @@ -406,6 +409,17 @@ mfc_alloc(void) return rt; } +static struct mfctable * +somfctable(struct socket *so) +{ + int fib; + + fib = atomic_load_int(&so->so_fibnum); + KASSERT(fib >= 0 && fib < V_nmfctables, + ("%s: so_fibnum %d out of range", __func__, fib)); + return (&V_mfctables[fib]); +} + /* * Handle MRT setsockopt commands to modify the multicast forwarding tables. */ @@ -420,7 +434,7 @@ X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) struct bw_upcall bw_upcall; uint32_t i; - mfct = &V_mfctables[0]; + mfct = somfctable(so); if (so != mfct->router && sopt->sopt_name != MRT_INIT) return EPERM; @@ -439,13 +453,13 @@ X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) error = sooptcopyin(sopt, &vifc, sizeof vifc, sizeof vifc); if (error) break; - error = add_vif(&vifc); + error = add_vif(mfct, so->so_fibnum, &vifc); break; case MRT_DEL_VIF: error = sooptcopyin(sopt, &vifi, sizeof vifi, sizeof vifi); if (error) break; - error = del_vif(vifi); + error = del_vif(mfct, vifi); break; case MRT_ADD_MFC: case MRT_DEL_MFC: @@ -465,22 +479,22 @@ X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) if (error) break; if (sopt->sopt_name == MRT_ADD_MFC) - error = add_mfc(&mfc); + error = add_mfc(mfct, &mfc); else - error = del_mfc(&mfc); + error = del_mfc(mfct, &mfc); break; case MRT_ASSERT: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); if (error) break; - set_assert(optval); + set_assert(mfct, optval); break; case MRT_API_CONFIG: error = sooptcopyin(sopt, &i, sizeof i, sizeof i); if (!error) - error = set_api_config(&i); + error = set_api_config(mfct, &i); if (!error) error = sooptcopyout(sopt, &i, sizeof i); break; @@ -492,9 +506,9 @@ X_ip_mrouter_set(struct socket *so, struct sockopt *sopt) if (error) break; if (sopt->sopt_name == MRT_ADD_BW_UPCALL) - error = add_bw_upcall(&bw_upcall); + error = add_bw_upcall(mfct, &bw_upcall); else - error = del_bw_upcall(&bw_upcall); + error = del_bw_upcall(mfct, &bw_upcall); break; default: @@ -513,8 +527,7 @@ X_ip_mrouter_get(struct socket *so, struct sockopt *sopt) struct mfctable *mfct; int error; - mfct = &V_mfctables[0]; - + mfct = somfctable(so); switch (sopt->sopt_name) { case MRT_VERSION: error = sooptcopyout(sopt, &mrt_api_version, @@ -543,20 +556,23 @@ X_ip_mrouter_get(struct socket *so, struct sockopt *sopt) * Handle ioctl commands to obtain information from the cache */ static int -X_mrt_ioctl(u_long cmd, caddr_t data, int fibnum __unused) +X_mrt_ioctl(u_long cmd, caddr_t data, int fibnum) { + struct mfctable *mfct; int error; error = priv_check(curthread, PRIV_NETINET_MROUTE); if (error) return (error); + + mfct = &V_mfctables[fibnum]; switch (cmd) { - case (SIOCGETVIFCNT): - error = get_vif_cnt((struct sioc_vif_req *)data); + case SIOCGETVIFCNT: + error = get_vif_cnt(mfct, (struct sioc_vif_req *)data); break; - case (SIOCGETSGCNT): - error = get_sg_cnt((struct sioc_sg_req *)data); + case SIOCGETSGCNT: + error = get_sg_cnt(mfct, (struct sioc_sg_req *)data); break; default: @@ -570,12 +586,12 @@ X_mrt_ioctl(u_long cmd, caddr_t data, int fibnum __unused) * returns the packet, byte, rpf-failure count for the source group provided */ static int -get_sg_cnt(struct sioc_sg_req *req) +get_sg_cnt(struct mfctable *mfct, struct sioc_sg_req *req) { struct mfc *rt; MRW_RLOCK(); - rt = mfc_find(&V_mfctables[0], &req->src, &req->grp); + rt = mfc_find(mfct, &req->src, &req->grp); if (rt == NULL) { MRW_RUNLOCK(); req->pktcnt = req->bytecnt = req->wrong_if = 0xffffffff; @@ -592,13 +608,11 @@ get_sg_cnt(struct sioc_sg_req *req) * returns the input and output packet and byte counts on the vif provided */ static int -get_vif_cnt(struct sioc_vif_req *req) +get_vif_cnt(struct mfctable *mfct, struct sioc_vif_req *req) { - struct mfctable *mfct; struct vif *vif; vifi_t vifi; - mfct = &V_mfctables[0]; vifi = req->vifi; MRW_RLOCK(); @@ -619,35 +633,26 @@ get_vif_cnt(struct sioc_vif_req *req) return 0; } -static void -if_detached_event(void *arg __unused, struct ifnet *ifp) +/* + * Tear down multicast forwarder state associated with this ifnet. + * 1. Walk the vif list, matching vifs against this ifnet. + * 2. Walk the multicast forwarding cache (mfc) looking for + * inner matches with this vif's index. + * 3. Expire any matching multicast forwarding cache entries. + * 4. Free vif state. This should disable ALLMULTI on the interface. + */ +static int +detach_ifnet(struct mfctable *mfct, struct ifnet *ifp) { - struct mfctable *mfct; - vifi_t vifi; - u_long i, vifi_cnt = 0; struct ifnet *free_ptr, *multi_leave; + int count; - mfct = &V_mfctables[0]; - - MRW_WLOCK(); - if (!V_ip_mrouting_enabled) { - MRW_WUNLOCK(); - return; - } - - /* - * Tear down multicast forwarder state associated with this ifnet. - * 1. Walk the vif list, matching vifs against this ifnet. - * 2. Walk the multicast forwarding cache (mfc) looking for - * inner matches with this vif's index. - * 3. Expire any matching multicast forwarding cache entries. - * 4. Free vif state. This should disable ALLMULTI on the interface. - */ + count = 0; restart: - for (vifi = 0; vifi < mfct->numvifs; vifi++) { + for (vifi_t vifi = 0; vifi < mfct->numvifs; vifi++) { if (mfct->viftable[vifi].v_ifp != ifp) continue; - for (i = 0; i < mfchashsize; i++) { + for (u_long i = 0; i < mfchashsize; i++) { struct mfc *rt, *nrt; LIST_FOREACH_SAFE(rt, &mfct->mfchashtbl[i], mfc_hash, @@ -657,9 +662,9 @@ restart: } } } - del_vif_locked(vifi, &multi_leave, &free_ptr); + del_vif_locked(mfct, vifi, &multi_leave, &free_ptr); if (free_ptr != NULL) - vifi_cnt++; + count++; if (multi_leave) { MRW_WUNLOCK(); if_allmulti(multi_leave, 0); @@ -667,15 +672,26 @@ restart: goto restart; } } + return (count); +} + +static void +if_detached_event(void *arg __unused, struct ifnet *ifp) +{ + int count; + + MRW_WLOCK(); + if (!V_ip_mrouting_enabled) { + MRW_WUNLOCK(); + return; + } + count = 0; + for (int i = 0; i < V_nmfctables; i++) + count += detach_ifnet(&V_mfctables[i], ifp); MRW_WUNLOCK(); - /* - * Free IFP. We don't have to use free_ptr here as it is the same - * that ifp. Perform free as many times as required in case - * refcount is greater than 1. - */ - for (i = 0; i < vifi_cnt; i++) + for (int i = 0; i < count; i++) if_free(ifp); } @@ -685,7 +701,7 @@ ip_mrouter_upcall_thread(void *arg, int pending __unused) CURVNET_SET((struct vnet *) arg); MRW_WLOCK(); - bw_upcalls_send(); + bw_upcalls_send_all(); MRW_WUNLOCK(); CURVNET_RESTORE(); @@ -704,7 +720,7 @@ ip_mrouter_init(struct socket *so, int version) if (version != 1) return ENOPROTOOPT; - mfct = &V_mfctables[0]; + mfct = somfctable(so); MRW_TEARDOWN_WLOCK(); MRW_WLOCK(); @@ -743,7 +759,7 @@ ip_mrouter_init(struct socket *so, int version) taskqueue_cancel(V_task_queue, &V_task, NULL); taskqueue_unblock(V_task_queue); - callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls, + callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls_all, curvnet); callout_reset(&V_bw_upcalls_ch, BW_UPCALLS_PERIOD, expire_bw_upcalls_send, curvnet); @@ -774,7 +790,7 @@ X_ip_mrouter_done(struct socket *so) vifi_t vifi; struct bw_upcall *bu; - mfct = &V_mfctables[0]; + mfct = somfctable(so); MRW_TEARDOWN_WLOCK(); if (so != mfct->router) { @@ -835,9 +851,6 @@ X_ip_mrouter_done(struct socket *so) mfct->numvifs = 0; mfct->pim_assert_enabled = 0; - callout_stop(&V_expire_upcalls_ch); - callout_stop(&V_bw_upcalls_ch); - /* * Free all multicast forwarding cache entries. * Do not use hashdestroy(), as we must perform other cleanup. @@ -873,12 +886,12 @@ X_ip_mrouter_done(struct socket *so) * Set PIM assert processing global */ static int -set_assert(int i) +set_assert(struct mfctable *mfct, int i) { if ((i != 1) && (i != 0)) return EINVAL; - V_mfctables[0].pim_assert_enabled = i; + mfct->pim_assert_enabled = i; return 0; } @@ -887,9 +900,8 @@ set_assert(int i) * Configure API capabilities */ int -set_api_config(uint32_t *apival) +set_api_config(struct mfctable *mfct, uint32_t *apival) { - struct mfctable *mfct; u_long i; /* @@ -899,7 +911,6 @@ set_api_config(uint32_t *apival) * - pim_assert is not enabled * - the MFC table is empty */ - mfct = &V_mfctables[0]; if (mfct->numvifs > 0) { *apival = 0; return EPERM; @@ -931,9 +942,8 @@ set_api_config(uint32_t *apival) * Add a vif to the vif table */ static int -add_vif(struct vifctl *vifcp) +add_vif(struct mfctable *mfct, int fibnum, struct vifctl *vifcp) { - struct mfctable *mfct; struct vif *vifp; struct sockaddr_in sin = {sizeof sin, AF_INET}; struct ifaddr *ifa; @@ -943,7 +953,6 @@ add_vif(struct vifctl *vifcp) if (vifcp->vifc_vifi >= MAXVIFS) return EINVAL; - mfct = &V_mfctables[0]; vifp = &mfct->viftable[vifcp->vifc_vifi]; /* rate limiting is no longer supported by this code */ @@ -974,6 +983,10 @@ add_vif(struct vifctl *vifcp) return EADDRNOTAVAIL; } ifp = ifa->ifa_ifp; + if (ifp->if_fib != fibnum) { + NET_EPOCH_EXIT(et); + return EADDRNOTAVAIL; + } /* XXX FIXME we need to take a ref on ifp and cleanup properly! */ NET_EPOCH_EXIT(et); } @@ -1039,12 +1052,11 @@ add_vif(struct vifctl *vifcp) * Delete a vif from the vif table */ static int -del_vif_locked(vifi_t vifi, struct ifnet **ifp_multi_leave, struct ifnet **ifp_free) +del_vif_locked(struct mfctable *mfct, vifi_t vifi, + struct ifnet **ifp_multi_leave, struct ifnet **ifp_free) { - struct mfctable *mfct; struct vif *vifp; - mfct = &V_mfctables[0]; *ifp_free = NULL; *ifp_multi_leave = NULL; @@ -1086,13 +1098,13 @@ del_vif_locked(vifi_t vifi, struct ifnet **ifp_multi_leave, struct ifnet **ifp_f } static int -del_vif(vifi_t vifi) +del_vif(struct mfctable *mfct, vifi_t vifi) { int cc; struct ifnet *free_ptr, *multi_leave; MRW_WLOCK(); - cc = del_vif_locked(vifi, &multi_leave, &free_ptr); + cc = del_vif_locked(mfct, vifi, &multi_leave, &free_ptr); MRW_WUNLOCK(); if (multi_leave) @@ -1170,17 +1182,14 @@ expire_mfc(struct mfc *rt) * Add an mfc entry */ static int -add_mfc(struct mfcctl2 *mfccp) +add_mfc(struct mfctable *mfct, struct mfcctl2 *mfccp) { struct mfc *rt; - struct mfctable *mfct; struct rtdetq *rte; u_long hash = 0; u_short nstl; struct epoch_tracker et; - mfct = &V_mfctables[0]; - MRW_WLOCK(); rt = mfc_find(mfct, &mfccp->mfcc_origin, &mfccp->mfcc_mcastgrp); @@ -1273,9 +1282,8 @@ add_mfc(struct mfcctl2 *mfccp) * Delete an mfc entry */ static int -del_mfc(struct mfcctl2 *mfccp) +del_mfc(struct mfctable *mfct, struct mfcctl2 *mfccp) { - struct mfctable *mfct; struct in_addr origin; struct in_addr mcastgrp; struct mfc *rt; @@ -1286,7 +1294,6 @@ del_mfc(struct mfcctl2 *mfccp) CTR3(KTR_IPMF, "%s: delete mfc orig 0x%08x group %lx", __func__, ntohl(origin.s_addr), (u_long)ntohl(mcastgrp.s_addr)); - mfct = &V_mfctables[0]; MRW_WLOCK(); LIST_FOREACH(rt, &mfct->mfchashtbl[MFCHASH(origin, mcastgrp)], @@ -1371,12 +1378,15 @@ X_ip_mforward(struct ip *ip, struct ifnet *ifp, struct mbuf *m, return (1); } - mfct = &V_mfctables[0]; + mfct = &V_mfctables[M_GETFIB(m)]; /* * BEGIN: MCAST ROUTING HOT PATH */ MRW_RLOCK(); + if (__predict_false(mfct->router == NULL)) + return (EADDRNOTAVAIL); + if (imo && ((vifi = imo->imo_multicast_vif) < mfct->numvifs)) { if (ip->ip_ttl < MAXTTL) ip->ip_ttl++; /* compensate for -1 in *_send routines */ @@ -1556,21 +1566,10 @@ mfc_find_retry: return 0; } -/* - * Clean up the cache entry if upcall is not serviced - */ static void -expire_upcalls(void *arg) +expire_upcalls(struct mfctable *mfct) { - struct mfctable *mfct; - u_long i; - - CURVNET_SET((struct vnet *) arg); - - MRW_LOCK_ASSERT(); - - mfct = &V_mfctables[0]; - for (i = 0; i < mfchashsize; i++) { + for (u_long i = 0; i < mfchashsize; i++) { struct mfc *rt, *nrt; if (mfct->nexpire[i] == 0) @@ -1591,8 +1590,22 @@ expire_upcalls(void *arg) expire_mfc(rt); } } +} + +/* + * Clean up the cache entry if upcall is not serviced + */ +static void +expire_upcalls_all(void *arg) +{ + CURVNET_SET((struct vnet *)arg); + + MRW_LOCK_ASSERT(); + + for (int i = 0; i < V_nmfctables; i++) + expire_upcalls(&V_mfctables[i]); - callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls, + callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls_all, curvnet); CURVNET_RESTORE(); @@ -1757,16 +1770,18 @@ ip_mdq(struct mfctable *mfct, struct mbuf *m, struct ifnet *ifp, struct mfc *rt, * Check if a vif number is legal/ok. This is used by in_mcast.c. */ static int -X_legal_vif_num(int vif) +X_legal_vif_num(int fibnum, int vif) { + struct mfctable *mfct; int ret; ret = 0; if (vif < 0) return (ret); + mfct = &V_mfctables[fibnum]; MRW_RLOCK(); - if (vif < V_mfctables[0].numvifs) + if (vif < mfct->numvifs) ret = 1; MRW_RUNLOCK(); @@ -1777,17 +1792,19 @@ X_legal_vif_num(int vif) * Return the local address used by this vif */ static u_long -X_ip_mcast_src(int vifi) +X_ip_mcast_src(int fibnum, int vifi) { + struct mfctable *mfct; in_addr_t addr; addr = INADDR_ANY; if (vifi < 0) return (addr); + mfct = &V_mfctables[fibnum]; MRW_RLOCK(); - if (vifi < V_mfctables[0].numvifs) - addr = V_mfctables[0].viftable[vifi].v_lcl_addr.s_addr; + if (vifi < mfct->numvifs) + addr = mfct->viftable[vifi].v_lcl_addr.s_addr; MRW_RUNLOCK(); return (addr); @@ -1838,8 +1855,6 @@ send_packet(struct vif *vifp, struct mbuf *m) * the loopback interface, thus preventing looping. */ error = ip_output(m, NULL, NULL, IP_FORWARDING, &imo, NULL); - CTR3(KTR_IPMF, "%s: vif %td err %d", __func__, - (ptrdiff_t)(vifp - V_mfctables[0].viftable), error); } /* @@ -1945,9 +1960,8 @@ expire_bw_meter_leq(void *arg) * Add a bw_meter entry */ static int -add_bw_upcall(struct bw_upcall *req) +add_bw_upcall(struct mfctable *mfct, struct bw_upcall *req) { - struct mfctable *mfct; struct mfc *mfc; struct timeval delta = { BW_UPCALL_THRESHOLD_INTERVAL_MIN_SEC, BW_UPCALL_THRESHOLD_INTERVAL_MIN_USEC }; @@ -1955,8 +1969,6 @@ add_bw_upcall(struct bw_upcall *req) struct bw_meter *x, **bwm_ptr; uint32_t flags; - mfct = &V_mfctables[0]; - if (!(mfct->api_config & MRT_MFC_BW_UPCALL)) return EOPNOTSUPP; @@ -1978,7 +1990,7 @@ add_bw_upcall(struct bw_upcall *req) * Find if we have already same bw_meter entry */ MRW_WLOCK(); - mfc = mfc_find(&V_mfctables[0], &req->bu_src, &req->bu_dst); + mfc = mfc_find(mfct, &req->bu_src, &req->bu_dst); if (mfc == NULL) { MRW_WUNLOCK(); return EADDRNOTAVAIL; @@ -2022,6 +2034,7 @@ add_bw_upcall(struct bw_upcall *req) x->bm_flags = flags; x->bm_time_next = NULL; x->bm_mfc = mfc; + x->bm_mfctable = mfct; x->arg = curvnet; sprintf(x->bm_mtx_name, "BM mtx %p", x); mtx_init(&x->bm_mtx, x->bm_mtx_name, NULL, MTX_DEF); @@ -2063,14 +2076,11 @@ free_bw_list(struct bw_meter *list) * Delete one or multiple bw_meter entries */ static int -del_bw_upcall(struct bw_upcall *req) +del_bw_upcall(struct mfctable *mfct, struct bw_upcall *req) { - struct mfctable *mfct; struct mfc *mfc; struct bw_meter *x, **bwm_ptr; - mfct = &V_mfctables[0]; - if (!(mfct->api_config & MRT_MFC_BW_UPCALL)) return EOPNOTSUPP; @@ -2191,14 +2201,11 @@ bw_meter_geq_receive_packet(struct bw_meter *x, int plen, struct timeval *nowp) static void bw_meter_prepare_upcall(struct bw_meter *x, struct timeval *nowp) { - struct mfctable *mfct; struct timeval delta; struct bw_upcall *u; MRW_LOCK_ASSERT(); - mfct = &V_mfctables[0]; - /* * Compute the measured time interval */ @@ -2231,9 +2238,9 @@ bw_meter_prepare_upcall(struct bw_meter *x, struct timeval *nowp) if (x->bm_flags & BW_METER_LEQ) u->bu_flags |= BW_UPCALL_LEQ; - if (buf_ring_enqueue(mfct->bw_upcalls, u)) + if (buf_ring_enqueue(x->bm_mfctable->bw_upcalls, u)) log(LOG_WARNING, "bw_meter_prepare_upcall: cannot enqueue upcall\n"); - if (buf_ring_count(mfct->bw_upcalls) > (BW_UPCALLS_MAX / 2)) { + if (buf_ring_count(x->bm_mfctable->bw_upcalls) > (BW_UPCALLS_MAX / 2)) { taskqueue_enqueue(V_task_queue, &V_task); } } @@ -2241,9 +2248,8 @@ bw_meter_prepare_upcall(struct bw_meter *x, struct timeval *nowp) * Send the pending bandwidth-related upcalls */ static void -bw_upcalls_send(void) +bw_upcalls_send(struct mfctable *mfct) { - struct mfctable *mfct; struct mbuf *m; int len = 0; struct bw_upcall *bu; @@ -2259,8 +2265,6 @@ bw_upcalls_send(void) { 0 } /* im_dst */ }; - mfct = &V_mfctables[0]; - MRW_LOCK_ASSERT(); if (buf_ring_empty(mfct->bw_upcalls)) @@ -2295,6 +2299,18 @@ bw_upcalls_send(void) } } +static void +bw_upcalls_send_all(void) +{ + for (int i = 0; i < V_nmfctables; i++) { + struct mfctable *mfct; + + mfct = &V_mfctables[i]; + if (mfct->router != NULL) + bw_upcalls_send(mfct); + } +} + /* * A periodic function for sending all upcalls that are pending delivery */ @@ -2305,7 +2321,7 @@ expire_bw_upcalls_send(void *arg) /* This callout is run with MRW_RLOCK taken */ - bw_upcalls_send(); + bw_upcalls_send_all(); callout_reset(&V_bw_upcalls_ch, BW_UPCALLS_PERIOD, expire_bw_upcalls_send, curvnet); @@ -2350,9 +2366,10 @@ pim_register_send(struct mfctable *mfct, struct ip *ip, struct vif *vifp, ip = mtod(mm, struct ip *); if ((mfct->api_config & MRT_MFC_RP) && !in_nullhost(rt->mfc_rp)) { - pim_register_send_rp(ip, vifp, mm, rt); + pim_register_send_rp(mfct, ip, vifp, mm, rt); } else { - pim_register_send_upcall(ip, vifp, mm, rt); + pim_register_send_upcall(mfct, ip, vifp, mm, + rt); } } } @@ -2414,10 +2431,9 @@ pim_register_prepare(struct ip *ip, struct mbuf *m) * Send an upcall with the data packet to the user-level process. */ static int -pim_register_send_upcall(struct ip *ip, struct vif *vifp, +pim_register_send_upcall(struct mfctable *mfct, struct ip *ip, struct vif *vifp, struct mbuf *mb_copy, struct mfc *rt) { - struct mfctable *mfct; struct mbuf *mb_first; int len = ntohs(ip->ip_len); struct igmpmsg *im; @@ -2425,8 +2441,6 @@ pim_register_send_upcall(struct ip *ip, struct vif *vifp, MRW_LOCK_ASSERT(); - mfct = &V_mfctables[0]; - /* * Add a new mbuf with an upcall header */ @@ -2469,10 +2483,9 @@ pim_register_send_upcall(struct ip *ip, struct vif *vifp, * Encapsulate the data packet in PIM Register message and send it to the RP. */ static int -pim_register_send_rp(struct ip *ip, struct vif *vifp, struct mbuf *mb_copy, - struct mfc *rt) +pim_register_send_rp(struct mfctable *mfct, struct ip *ip, struct vif *vifp, + struct mbuf *mb_copy, struct mfc *rt) { - struct mfctable *mfct; struct mbuf *mb_first; struct ip *ip_outer; struct pim_encap_pimhdr *pimhdr; @@ -2481,7 +2494,6 @@ pim_register_send_rp(struct ip *ip, struct vif *vifp, struct mbuf *mb_copy, MRW_LOCK_ASSERT(); - mfct = &V_mfctables[0]; if (vifi >= mfct->numvifs || in_nullhost(mfct->viftable[vifi].v_lcl_addr)) { m_freem(mb_copy); @@ -2572,7 +2584,7 @@ pim_input(struct mbuf *m, int off, int proto, void *arg __unused) int datalen = ntohs(ip->ip_len) - iphlen; int ip_tos; - mfct = &V_mfctables[0]; + mfct = &V_mfctables[M_GETFIB(m)]; /* Keep statistics */ PIMSTAT_INC(pims_rcv_total_msgs); @@ -2789,7 +2801,7 @@ sysctl_mfctable(SYSCTL_HANDLER_ARGS) if (req->newptr) return (EPERM); - mfct = &V_mfctables[0]; + mfct = &V_mfctables[curthread->td_proc->p_fibnum]; if (mfct->mfchashtbl == NULL) /* XXX unlocked */ return (0); error = sysctl_wire_old_buffer(req, 0); @@ -2828,7 +2840,7 @@ sysctl_viflist(SYSCTL_HANDLER_ARGS) if (error) return (error); - mfct = &V_mfctables[0]; + mfct = &V_mfctables[curthread->td_proc->p_fibnum]; MRW_RLOCK(); /* Copy out user-visible portion of vif entry. */ for (i = 0; i < MAXVIFS; i++) { @@ -2909,6 +2921,9 @@ vnet_mroute_uninit(const void *unused __unused) free(mfct->nexpire, M_MRTABLE); } free(V_mfctables, M_MRTABLE); + + callout_drain(&V_expire_upcalls_ch); + callout_drain(&V_bw_upcalls_ch); } VNET_SYSUNINIT(vnet_mroute_uninit, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE, vnet_mroute_uninit, NULL); diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h index 5c2527ea64e5..d7e53b678474 100644 --- a/sys/netinet/ip_mroute.h +++ b/sys/netinet/ip_mroute.h @@ -348,6 +348,7 @@ struct bw_meter { struct bw_data bm_measured; /* the measured bw */ struct timeval bm_start_time; /* abs. time */ #ifdef _KERNEL + struct mfctable *bm_mfctable; /* Routing table */ struct callout bm_meter_callout; /* Periodic callout */ void* arg; /* custom argument */ struct mtx bm_mtx; /* meter lock */ @@ -366,7 +367,7 @@ struct mbuf; struct socket; struct sockopt; -extern u_long (*ip_mcast_src)(int); +extern u_long (*ip_mcast_src)(int, int); extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *); extern void (*ip_mrouter_done)(struct socket *); @@ -376,7 +377,7 @@ extern int (*ip_mrouter_set)(struct socket *, struct sockopt *); extern void (*ip_rsvp_force_done)(struct socket *); extern int (*ip_rsvp_vif)(struct socket *, struct sockopt *); -extern int (*legal_vif_num)(int); +extern int (*legal_vif_num)(int, int); extern int (*mrt_ioctl)(u_long, caddr_t, int); extern int (*rsvp_input_p)(struct mbuf **, int *, int); #endif /* _KERNEL */ diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 9431d5f0d7b2..200f281f34a7 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -561,12 +561,13 @@ again: * See if the caller provided any multicast options */ if (imo != NULL) { + int vif; + + vif = imo->imo_multicast_vif; ip->ip_ttl = imo->imo_multicast_ttl; - if (imo->imo_multicast_vif != -1) - ip->ip_src.s_addr = - ip_mcast_src ? - ip_mcast_src(imo->imo_multicast_vif) : - INADDR_ANY; + if (vif != -1) + ip->ip_src.s_addr = ip_mcast_src ? + ip_mcast_src(fibnum, vif) : INADDR_ANY; } else ip->ip_ttl = IP_DEFAULT_MULTICAST_TTL; /* diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 9b17d0d80327..a8a4fc1df9e2 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -118,8 +118,8 @@ void (*ip_mrouter_done)(struct socket *); int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *); int (*mrt_ioctl)(u_long, caddr_t, int); -int (*legal_vif_num)(int); -u_long (*ip_mcast_src)(int); +int (*legal_vif_num)(int, int); +u_long (*ip_mcast_src)(int, int); int (*rsvp_input_p)(struct mbuf **, int *, int); int (*ip_rsvp_vif)(struct socket *, struct sockopt *); From nobody Mon Mar 30 16:15:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDs4Mh1z6WjB0 for ; Mon, 30 Mar 2026 16:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDs2Y4Pz49pc for ; Mon, 30 Mar 2026 16:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kq9hTY49LSY+OSCs3FFnIt9YE/HtUaJXP9xjI4lX94I=; b=mdxZYOvrbGTp0TwkuAlnYuF7uVk3oxWGhgjLnzTGkVNPuATopqksRmY0MB8wUqq2i0WsNM cH6YzqTpfRoNIPQRZiSXeBCcTiEdj0r3WZxPPXz6pPsWnzD70Xxcbx5oy6Btomm2LKOZEp HV51279eV5qoUpDUhQbOIkLvtZAPlXc9z7mrUrvHxRPZtJHsNkgX+4oEIaNRzFJp09vzfQ /PRyCGCiQVvrSC3eOpkSoeFsTqTIZm0FzMtPV+rU3T86AjrY4+7KL05pjEnocsW5VMDK2b Yg6xMh4jeqGceueDEj5as2n857fyalVJy5TNEJDyRuPQOaYQ+OrWmcwhloHb1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887341; a=rsa-sha256; cv=none; b=TjjcE4hZJSeEsESG/i65ZKAC+G/okn1MgFRiMWTyrEEIAC/BaiQirX7xPxif5mZ+zBbR/d lVvKXU6GvclP9amJ7SswfEbsG5hCKWGhbHwd6T9Yg8mJe2dirSLjD9BgXXe7gFkFrSnCf/ U5E+AXnUtyse9Yb1RY6UMIXaR898CWkZP6kKJMkn2eMM+MSS3W1bitR+nufwTTfJphObnT Q0cvKvkGe+NCjb/NanJbms/Kec9sgRRl2f7ImemVA+x3IsF7rzcgcYcB2nXykg3dKhNqmf Y1ardIvMjubFgJSXfV6OZw2+g0O7cn6D2IxzUmQ59/+W04fwkD+k8g+h/t+p6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kq9hTY49LSY+OSCs3FFnIt9YE/HtUaJXP9xjI4lX94I=; b=aiNxnUM3Lzmiq9oOnhDz8yC0g6lQWZutCkH22u3WGTDFcX+l0IcYYR3KHRNFt/VYGGyBLI v2S+28aBltlDBB/d3gzYz6I17tKTXln/bCnPZ07MxbizmYf9LfwEER0uzd+SYdf5XGZhIr PLA3B1NctgfqyQBlNvARMEvSK70y9TBhsMhuHaZlojWLXeKffKHmoUmaNJ+Hq6P10PNtkP aXJxJTw4BfdgEom9dwvKFA1JLWIE9nTtlWUTG5RLYcAECcS4kXOaPEKL9MeTHyZ4ihhbKG 0Ai8q55El1pz/O0zD9/8jvuETafXp/V7ySbeV2c/46MHFbOS5m7qKnG9yoTagQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDs25nJzqtl for ; Mon, 30 Mar 2026 16:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c307 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0bb9c2b665d9 - main - ip6_mroute: FIBify List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bb9c2b665d90934ae16eee152b6b4f4f4be0dd5 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:41 +0000 Message-Id: <69caa1ad.3c307.55d18a69@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0bb9c2b665d90934ae16eee152b6b4f4f4be0dd5 commit 0bb9c2b665d90934ae16eee152b6b4f4f4be0dd5 Author: Mark Johnston AuthorDate: 2026-03-30 13:31:55 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:21 +0000 ip6_mroute: FIBify Modify the control plane (ioctl and socket option handlers) to use the routing socket FIB to index into the mfctable array. Modify the forwarding plane to use the mbuf's FIB to determine which routing table to use. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55242 --- sys/netinet6/in6.c | 17 +++--- sys/netinet6/ip6_mroute.c | 131 +++++++++++++++++++++++++++------------------- sys/netinet6/ip6_mroute.h | 2 +- sys/netinet6/raw_ip6.c | 2 +- 4 files changed, 85 insertions(+), 67 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index eb6c327de76f..cf2720cac036 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -279,17 +279,6 @@ in6_control_ioctl(u_long cmd, void *data, ifra->ifra_vhid = 0; } - switch (cmd) { - case SIOCGETSGCNT_IN6: - case SIOCGETMIFCNT_IN6: - /* - * XXX mrt_ioctl has a 3rd, unused, FIB argument in route.c. - * We cannot see how that would be needed, so do not adjust the - * KPI blindly; more likely should clean up the IPv4 variant. - */ - return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP); - } - switch (cmd) { case SIOCAADDRCTL_POLICY: case SIOCDADDRCTL_POLICY: @@ -615,6 +604,12 @@ int in6_control(struct socket *so, u_long cmd, void *data, struct ifnet *ifp, struct thread *td) { + switch (cmd) { + case SIOCGETSGCNT_IN6: + case SIOCGETMIFCNT_IN6: + return (mrt6_ioctl ? + mrt6_ioctl(cmd, data, so->so_fibnum) : EOPNOTSUPP); + } return (in6_control_ioctl(cmd, data, ifp, td ? td->td_ucred : NULL)); } diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index fff68a7ff47d..52fd319ba4f4 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -216,8 +216,11 @@ static eventhandler_tag rtnumfibs_change_tag; static int sysctl_mfctable(SYSCTL_HANDLER_ARGS) { - return (SYSCTL_OUT(req, &V_mfctables[0].mfchashtbl, - sizeof(V_mfctables[0].mfchashtbl))); + int fibnum; + + fibnum = curthread->td_proc->p_fibnum; + return (SYSCTL_OUT(req, &V_mfctables[fibnum].mfchashtbl, + sizeof(struct mfc6c *) * MF6CTBLSIZ)); } SYSCTL_PROC(_net_inet6_ip6, OID_AUTO, mf6ctable, CTLTYPE_OPAQUE | CTLFLAG_RD, @@ -229,13 +232,15 @@ static int sysctl_mif6table(SYSCTL_HANDLER_ARGS) { struct mif6_sctl *out; + struct mf6ctable *mfct; int error; + mfct = &V_mfctables[curthread->td_proc->p_fibnum]; out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, M_WAITOK | M_ZERO); for (int i = 0; i < MAXMIFS; i++) { struct mif6_sctl *outp = &out[i]; - struct mif6 *mifp = &V_mfctables[0].miftable[i]; + struct mif6 *mifp = &mfct->miftable[i]; outp->m6_flags = mifp->m6_flags; outp->m6_rate_limit = mifp->m6_rate_limit; @@ -287,7 +292,8 @@ VNET_DEFINE_STATIC(u_int, mrt6debug) = 0; /* debug level */ #define MRT6_DLOG(m, fmt, ...) #endif -static void expire_upcalls(void *); +static void expire_upcalls(struct mf6ctable *); +static void expire_upcalls_all(void *); #define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */ #define UPCALL_EXPIRE 6 /* number of timeouts */ @@ -342,13 +348,13 @@ static void collate(struct timeval *); #endif /* UPCALL_TIMING */ static int ip6_mrouter_init(struct socket *, int, int); -static int add_m6fc(struct mf6cctl *); -static int add_m6if(struct mif6ctl *); -static int del_m6fc(struct mf6cctl *); -static int del_m6if(mifi_t *); -static int del_m6if_locked(mifi_t *); -static int get_mif6_cnt(struct sioc_mif_req6 *); -static int get_sg_cnt(struct sioc_sg_req6 *); +static int add_m6fc(struct mf6ctable *, struct mf6cctl *); +static int add_m6if(struct mf6ctable *, int, struct mif6ctl *); +static int del_m6fc(struct mf6ctable *, struct mf6cctl *); +static int del_m6if(struct mf6ctable *, mifi_t *); +static int del_m6if_locked(struct mf6ctable *, mifi_t *); +static int get_mif6_cnt(struct mf6ctable *, struct sioc_mif_req6 *); +static int get_sg_cnt(struct mf6ctable *, struct sioc_sg_req6 *); VNET_DEFINE_STATIC(struct callout, expire_upcalls_ch); #define V_expire_upcalls_ch VNET(expire_upcalls_ch) @@ -357,7 +363,7 @@ static int X_ip6_mforward(struct ip6_hdr *, struct ifnet *, struct mbuf *); static void X_ip6_mrouter_done(struct socket *); static int X_ip6_mrouter_set(struct socket *, struct sockopt *); static int X_ip6_mrouter_get(struct socket *, struct sockopt *); -static int X_mrt6_ioctl(u_long, caddr_t); +static int X_mrt6_ioctl(u_long, caddr_t, int); static struct mf6c * mf6c_find(const struct mf6ctable *mfct, const struct in6_addr *origin, @@ -376,6 +382,17 @@ mf6c_find(const struct mf6ctable *mfct, const struct in6_addr *origin, return (NULL); } +static struct mf6ctable * +somfctable(struct socket *so) +{ + int fib; + + fib = atomic_load_int(&so->so_fibnum); + KASSERT(fib >= 0 && fib < V_nmfctables, + ("%s: so_fibnum %d out of range", __func__, fib)); + return (&V_mfctables[fib]); +} + /* * Handle MRT setsockopt commands to modify the multicast routing tables. */ @@ -389,7 +406,7 @@ X_ip6_mrouter_set(struct socket *so, struct sockopt *sopt) struct mf6cctl mfcc; mifi_t mifi; - mfct = &V_mfctables[0]; + mfct = somfctable(so); if (so != mfct->router && sopt->sopt_name != MRT6_INIT) return (EPERM); @@ -411,25 +428,25 @@ X_ip6_mrouter_set(struct socket *so, struct sockopt *sopt) error = sooptcopyin(sopt, &mifc, sizeof(mifc), sizeof(mifc)); if (error) break; - error = add_m6if(&mifc); + error = add_m6if(mfct, so->so_fibnum, &mifc); break; case MRT6_ADD_MFC: error = sooptcopyin(sopt, &mfcc, sizeof(mfcc), sizeof(mfcc)); if (error) break; - error = add_m6fc(&mfcc); + error = add_m6fc(mfct, &mfcc); break; case MRT6_DEL_MFC: error = sooptcopyin(sopt, &mfcc, sizeof(mfcc), sizeof(mfcc)); if (error) break; - error = del_m6fc(&mfcc); + error = del_m6fc(mfct, &mfcc); break; case MRT6_DEL_MIF: error = sooptcopyin(sopt, &mifi, sizeof(mifi), sizeof(mifi)); if (error) break; - error = del_m6if(&mifi); + error = del_m6if(mfct, &mifi); break; case MRT6_PIM: error = sooptcopyin(sopt, &optval, sizeof(optval), @@ -455,7 +472,7 @@ X_ip6_mrouter_get(struct socket *so, struct sockopt *sopt) struct mf6ctable *mfct; int error = 0; - mfct = &V_mfctables[0]; + mfct = somfctable(so); if (so != mfct->router) return (EACCES); @@ -471,24 +488,27 @@ X_ip6_mrouter_get(struct socket *so, struct sockopt *sopt) * Handle ioctl commands to obtain information from the cache */ static int -X_mrt6_ioctl(u_long cmd, caddr_t data) +X_mrt6_ioctl(u_long cmd, caddr_t data, int fibnum) { + struct mf6ctable *mfct; int error; error = priv_check(curthread, PRIV_NETINET_MROUTE); if (error) return (error); - error = EINVAL; + + mfct = &V_mfctables[fibnum]; switch (cmd) { case SIOCGETSGCNT_IN6: - error = get_sg_cnt((struct sioc_sg_req6 *)data); + error = get_sg_cnt(mfct, (struct sioc_sg_req6 *)data); break; case SIOCGETMIFCNT_IN6: - error = get_mif6_cnt((struct sioc_mif_req6 *)data); + error = get_mif6_cnt(mfct, (struct sioc_mif_req6 *)data); break; default: + error = EINVAL; break; } @@ -499,7 +519,7 @@ X_mrt6_ioctl(u_long cmd, caddr_t data) * returns the packet, byte, rpf-failure count for the source group provided */ static int -get_sg_cnt(struct sioc_sg_req6 *req) +get_sg_cnt(struct mf6ctable *mfct, struct sioc_sg_req6 *req) { struct mf6c *rt; int ret; @@ -507,8 +527,7 @@ get_sg_cnt(struct sioc_sg_req6 *req) ret = 0; MFC6_LOCK(); - rt = mf6c_find(&V_mfctables[0], &req->src.sin6_addr, - &req->grp.sin6_addr); + rt = mf6c_find(mfct, &req->src.sin6_addr, &req->grp.sin6_addr); if (rt == NULL) { ret = ESRCH; } else { @@ -525,16 +544,14 @@ get_sg_cnt(struct sioc_sg_req6 *req) * returns the input and output packet and byte counts on the mif provided */ static int -get_mif6_cnt(struct sioc_mif_req6 *req) +get_mif6_cnt(struct mf6ctable *mfct, struct sioc_mif_req6 *req) { - struct mf6ctable *mfct; mifi_t mifi; int ret; ret = 0; mifi = req->mifi; - mfct = &V_mfctables[0]; MIF6_LOCK(); if (mifi >= mfct->nummifs) { @@ -559,6 +576,7 @@ set_pim6(int *i) if ((*i != 1) && (*i != 0)) return (EINVAL); + /* XXX-MJ */ V_pim6 = *i; return (0); @@ -577,7 +595,7 @@ ip6_mrouter_init(struct socket *so, int v, int cmd) if (v != 1) return (ENOPROTOOPT); - mfct = &V_mfctables[0]; + mfct = somfctable(so); MROUTER6_LOCK(); if (mfct->router != NULL) { @@ -595,7 +613,7 @@ ip6_mrouter_init(struct socket *so, int v, int cmd) V_pim6 = 0;/* used for stubbing out/in pim stuff */ - callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls, + callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls_all, curvnet); MFC6_UNLOCK(); @@ -618,7 +636,7 @@ X_ip6_mrouter_done(struct socket *so) struct mf6c *rt; struct rtdetq *rte; - mfct = &V_mfctables[0]; + mfct = somfctable(so); MROUTER6_LOCK(); if (mfct->router != so) { @@ -690,9 +708,8 @@ static struct sockaddr_in6 sin6 = { sizeof(sin6), AF_INET6 }; * Add a mif to the mif table */ static int -add_m6if(struct mif6ctl *mifcp) +add_m6if(struct mf6ctable *mfct, int fibnum, struct mif6ctl *mifcp) { - struct mf6ctable *mfct; struct epoch_tracker et; struct mif6 *mifp; struct ifnet *ifp; @@ -704,7 +721,6 @@ add_m6if(struct mif6ctl *mifcp) MIF6_UNLOCK(); return (EINVAL); } - mfct = &V_mfctables[0]; mifp = &mfct->miftable[mifcp->mif6c_mifi]; if (mifp->m6_ifp != NULL) { MIF6_UNLOCK(); @@ -743,6 +759,10 @@ add_m6if(struct mif6ctl *mifcp) MIF6_UNLOCK(); return (EOPNOTSUPP); } + if (ifp->if_fib != fibnum) { + MIF6_UNLOCK(); + return (EADDRNOTAVAIL); + } error = if_allmulti(ifp, 1); if (error) { @@ -775,16 +795,14 @@ add_m6if(struct mif6ctl *mifcp) * Delete a mif from the mif table */ static int -del_m6if_locked(mifi_t *mifip) +del_m6if_locked(struct mf6ctable *mfct, mifi_t *mifip) { - struct mf6ctable *mfct; struct mif6 *mifp; mifi_t mifi; struct ifnet *ifp; MIF6_LOCK_ASSERT(); - mfct = &V_mfctables[0]; if (*mifip >= mfct->nummifs) return (EINVAL); mifp = &mfct->miftable[*mifip]; @@ -818,12 +836,12 @@ del_m6if_locked(mifi_t *mifip) } static int -del_m6if(mifi_t *mifip) +del_m6if(struct mf6ctable *mfct, mifi_t *mifip) { int cc; MIF6_LOCK(); - cc = del_m6if_locked(mifip); + cc = del_m6if_locked(mfct, mifip); MIF6_UNLOCK(); return (cc); @@ -833,17 +851,14 @@ del_m6if(mifi_t *mifip) * Add an mfc entry */ static int -add_m6fc(struct mf6cctl *mfccp) +add_m6fc(struct mf6ctable *mfct, struct mf6cctl *mfccp) { - struct mf6ctable *mfct; struct mf6c *rt; u_long hash; struct rtdetq *rte; u_short nstl; char ip6bufo[INET6_ADDRSTRLEN], ip6bufg[INET6_ADDRSTRLEN]; - mfct = &V_mfctables[0]; - MFC6_LOCK(); rt = mf6c_find(mfct, &mfccp->mf6cc_origin.sin6_addr, &mfccp->mf6cc_mcastgrp.sin6_addr); @@ -1004,19 +1019,17 @@ collate(struct timeval *t) * Delete an mfc entry */ static int -del_m6fc(struct mf6cctl *mfccp) +del_m6fc(struct mf6ctable *mfct, struct mf6cctl *mfccp) { #ifdef MRT6DEBUG char ip6bufo[INET6_ADDRSTRLEN], ip6bufg[INET6_ADDRSTRLEN]; #endif - struct mf6ctable *mfct; struct sockaddr_in6 origin; struct sockaddr_in6 mcastgrp; struct mf6c *rt; struct mf6c **nptr; u_long hash; - mfct = &V_mfctables[0]; origin = mfccp->mf6cc_origin; mcastgrp = mfccp->mf6cc_mcastgrp; hash = MF6CHASH(origin.sin6_addr, mcastgrp.sin6_addr); @@ -1139,7 +1152,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) return (0); } - mfct = &V_mfctables[0]; + mfct = &V_mfctables[M_GETFIB(m)]; MFC6_LOCK(); /* @@ -1331,20 +1344,17 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) * Call from the Slow Timeout mechanism, every half second. */ static void -expire_upcalls(void *arg) +expire_upcalls(struct mf6ctable *mfct) { #ifdef MRT6DEBUG char ip6bufo[INET6_ADDRSTRLEN], ip6bufg[INET6_ADDRSTRLEN]; #endif - struct mf6ctable *mfct; struct rtdetq *rte; struct mf6c *mfc, **nptr; u_long i; MFC6_LOCK_ASSERT(); - CURVNET_SET((struct vnet *)arg); - mfct = &V_mfctables[0]; for (i = 0; i < MF6CTBLSIZ; i++) { if (mfct->nexpire[i] == 0) continue; @@ -1382,8 +1392,21 @@ expire_upcalls(void *arg) } } } - callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, - expire_upcalls, curvnet); +} + +/* + * Clean up the cache entry if upcall is not serviced + */ +static void +expire_upcalls_all(void *arg) +{ + CURVNET_SET((struct vnet *)arg); + + for (int i = 0; i < V_nmfctables; i++) + expire_upcalls(&V_mfctables[i]); + + callout_reset(&V_expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls_all, + curvnet); CURVNET_RESTORE(); } @@ -1753,7 +1776,7 @@ pim6_input(struct mbuf *m, int off, int proto, void *arg __unused) int pimlen; int minlen; - mfct = &V_mfctables[0]; + mfct = &V_mfctables[M_GETFIB(m)]; PIM6STAT_INC(pim6s_rcv_total); diff --git a/sys/netinet6/ip6_mroute.h b/sys/netinet6/ip6_mroute.h index fda8c4308e86..c8388c3836bb 100644 --- a/sys/netinet6/ip6_mroute.h +++ b/sys/netinet6/ip6_mroute.h @@ -288,7 +288,7 @@ extern int (*ip6_mrouter_set)(struct socket *so, struct sockopt *sopt); extern int (*ip6_mrouter_get)(struct socket *so, struct sockopt *sopt); extern void (*ip6_mrouter_done)(struct socket *so); -extern int (*mrt6_ioctl)(u_long, caddr_t); +extern int (*mrt6_ioctl)(u_long, caddr_t, int); #endif /* _KERNEL */ #endif /* !_NETINET6_IP6_MROUTE_H_ */ diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 9e51005d7c2e..a92035831c6c 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -145,7 +145,7 @@ int (*ip6_mrouter_set)(struct socket *, struct sockopt *); int (*ip6_mrouter_get)(struct socket *, struct sockopt *); void (*ip6_mrouter_done)(struct socket *); int (*ip6_mforward)(struct ip6_hdr *, struct ifnet *, struct mbuf *); -int (*mrt6_ioctl)(u_long, caddr_t); +int (*mrt6_ioctl)(u_long, caddr_t, int); struct rip6_inp_match_ctx { struct ip6_hdr *ip6; From nobody Mon Mar 30 16:15:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDt6QN1z6WyXc for ; Mon, 30 Mar 2026 16:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDt3PzTz4B1Q for ; Mon, 30 Mar 2026 16:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XEz7d73ucQk9d8jcKKu24XOX68wUaXJLECF85QALbEk=; b=s2ePrrfPpoUJxGnOlLO95esA7EOMIeN0BRoFd5K+aajV7wpfhiFtJTg5rM8aIGeE1JnnWg WdSWVSVtcBTx7mvbf/V/OuQGohjTaWjGCEnGItFHMzOBSFWcjNvnwvSJdmGFeWThAbA6XP 2FVaSOVvvX6FeSr7NXOGGgN8tpeFZNf9qorY11QUBgFYCIG3H+Ll1aIC6+hbWovbasQ4jK p4Th4qmxxiNsd0VFRYtaMxWsM+Zv3vgn3Maz7952vEkvmKPLWA05y5Cva2QtyjFoCGQMur 5M5uqcSeKfKx8hGspLoTdgoZicta7Vubf55mOXhm3cDGJPec+gvtfWtLzZPuRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887342; a=rsa-sha256; cv=none; b=gQMMt3W+KfIL/aCHxVcUQEHtnjZ471Qpspm2bTvyxsqDCAPapUfDPiN3xCRx4k9SCuyyqg 8Ooe35+mfUprFC4IE/O5lj0EVjLWTruDrL0teeA6elNMin/ejNJnzus0mfFzBGrGX52U58 aJqz9fNwjega83VnFVuN7GWzW/7D8AMqCWu6fGYwZXdNn+xiKcxjIpLkM9EH+Naq41+VPL 2MRUi2JqJF1R+XJVZM+Ty0kxoxEf8eWTzP7tXebi2ppMWbIyp0VxlBJvPaCZMPjgMuZZtk yEFfNZHkpA1TSo4hslqUE0b7tPXaGLeLVTjPJ3I4RxcJGgW3ZzQWGtgjcjndUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XEz7d73ucQk9d8jcKKu24XOX68wUaXJLECF85QALbEk=; b=eqjr6eyaTa9LsEH/Ghjg+Fd/8vew/x3HM2mwZJQBGzioA56oZxzqNzH4uxsBDlK9hzjrx8 T5NJX5HF73h2E+aLTqMnisPc1nnHVOHUOZwiI4hqi5WKEd91NX4hwJ0Na4lQifZseFX3Es mA0O+tMAUvve3LH5vMQf6V1XHG5zc5xuFjV8PJxM+fTOOlmMQVT6+OzYIYaLT5hVEpDlEm uzay3reWfafPHEWpwvr6tX+OzrbO6MLPCIR1aGZZMNrCOEtN5P3PhiCujZ3+SG5f5Tny5K uBBMZpqv/yTTre/b5rjmVRFXGBUqOA0Cu5UNPKy1V47woOaVCwS+0g6J45U+Pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDt2tn7zqtn for ; Mon, 30 Mar 2026 16:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39bbb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d4339cebbe8e - main - ip6_mroute: Make ip6_mroute.h more self-contained List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4339cebbe8e0b26f92a74eb5d4d9a20403c2ad1 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:42 +0000 Message-Id: <69caa1ae.39bbb.8e9a71e@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d4339cebbe8e0b26f92a74eb5d4d9a20403c2ad1 commit d4339cebbe8e0b26f92a74eb5d4d9a20403c2ad1 Author: Mark Johnston AuthorDate: 2026-03-30 13:32:13 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:21 +0000 ip6_mroute: Make ip6_mroute.h more self-contained MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55243 --- sys/netinet6/ip6_mroute.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet6/ip6_mroute.h b/sys/netinet6/ip6_mroute.h index c8388c3836bb..8ae98678934b 100644 --- a/sys/netinet6/ip6_mroute.h +++ b/sys/netinet6/ip6_mroute.h @@ -48,6 +48,9 @@ #ifndef _NETINET6_IP6_MROUTE_H_ #define _NETINET6_IP6_MROUTE_H_ +#include +#include + /* * Multicast Routing set/getsockopt commands. */ From nobody Mon Mar 30 16:15:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDv659Yz6Wyd8 for ; Mon, 30 Mar 2026 16:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDv4BHrz49vW for ; Mon, 30 Mar 2026 16:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KllWILuUYQFjLq2DFuWT3ASMKiZtP7ihwfh0rmjtEgU=; b=uiGUIUhq0Tt6MVa2NW6M6Qb5LIXjBeniE+gXWy1T3/xOHV1pOqfXwe52teqOQ55aDEMRKb Npo2uz2GYt/krxOBcfkDQu7EGGdCVlKq093/NQ8+4faVDzgIWhHDMCIHUTahH3KWj6L17f RLCTPCcGddBzIxbvTgb+S8nJAPEy5tcpCYwrNn5CU9v6Cs8q+4pfPMzfxcPOHwtR1abFJK uaEKkJj53xUsx05Ipbp5owftxfrCGrMOQR+LwSzXZlntcQhUnvYCgdmFIr2AnVZ8FGiUVH 3eIkqgFJrS6tMibbCIygUgc4J2Nef5SyuJDThMaP//VXA5ZxhPIZuDuAwLVROw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887343; a=rsa-sha256; cv=none; b=L/lWMQ6tFe5F41nrz7b+R4CuI8Txp6FOGImm4veN3oLs//B2gnNu3gI9dywi+pC4bcJHHq R6HIJwzcG9I+lzz0jaS531HiYh8/hTQyodIAyzag8YzstgtmqpKtCxbHyGKnSdyaOiQowF ARImpLkXPIw2CkmBIBuLovD1yDjJWm/NlEkInhuZeSLVb2CUyILajFSJUMcOV+X3QsQuke iLB7pvMIxWy15dWfh1v9OhkW4pTAvQdEZMJMJ1AbO+Yz9RDwEYry6e91Dj24FPcftlN1OO pcRSIn5aswRKW0udosZ4UnTAdstZVkcdZhnPtr5LItf+u/n2Ucf7TTVQCI5z1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KllWILuUYQFjLq2DFuWT3ASMKiZtP7ihwfh0rmjtEgU=; b=hKrnUpE1KeCeAU200zzHVt8DB9zfNNRzC2QKLM/A8sk7owbDZmygc1/41t6itLcocWDjX7 Ldax3jj5kNJlR2cqPyKCULkq8dc6xruk0gqw/GobN/BAQ246ZVrn5UCSSnkLLURTTxGjrH rtcvDAPU/1TxDly0lHsGBXtptPuC7XLW2djBtCARIwBVLtEeBpDKXxOCqUH+79qrbqBJC3 2RNJEOjvo/Nh4oa+YyoMM7GBdRfjTLgAweDRYs1Jca8ZAWGFn0eFFsEO4HEtasYPR00MIT S0AQ/h0J92wW2T+6nM3CxvLjVKlMpQccDk3asB3DdzB/b9oKNYsuJAEcIqupBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDv3kZPzqwR for ; Mon, 30 Mar 2026 16:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bdf7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 09e702ad40af - main - tests: Add some simple regression tests for ip_mroute List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09e702ad40af0067017613070b42d72cbc2bec3a Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:43 +0000 Message-Id: <69caa1af.3bdf7.24600de@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=09e702ad40af0067017613070b42d72cbc2bec3a commit 09e702ad40af0067017613070b42d72cbc2bec3a Author: Mark Johnston AuthorDate: 2026-03-30 13:32:35 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:21 +0000 tests: Add some simple regression tests for ip_mroute These use atf_python to create a number of hosts linked to a router. The router runs pimd (for IPv4) or ip6_mrouter (simplistic IPv6 multicast router that I wrote since I couldn't find one in the ports tree). The vnet_host*_handler() methods are invoked in different VNET jails connected to the router; they register the connected epair with a multicast group and verify that they can send messages to each other. The tests are synchronized by sending messages over a unix domain socket. The flow is something like: 1) test startup_method() is called, the unix socket is created, 2) the superclass creates jails and links them together using the declared topology, 3) we wait for all child jails to start up and send a message on the unix socket indicating that they are ready 4) we start the routing daemon in the main jail, 5) the test actually starts; starttest() kicks off the vnet_host*_handlers(), which mostly just verify that they can send messages to each other using multicast packets 6) once they finish running, they signal their completion, and waittest() returns once they're all done There are two tests, repeated for v4 and v6. One just exchanges packets between two hosts, and the other has four hosts divided across two FIBs. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55244 --- tests/sys/netinet/Makefile | 13 +- tests/sys/netinet/ip6_mrouted.c | 191 ++++++++++++++++++ tests/sys/netinet/ip_mroute.py | 428 ++++++++++++++++++++++++++++++++++++++++ tests/sys/netinet6/Makefile | 1 + 4 files changed, 629 insertions(+), 4 deletions(-) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index 42906aa2dd93..a13b0b42e2bc 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -29,9 +29,10 @@ ATF_TESTS_SH= arp \ output \ redirect -ATF_TESTS_PYTEST+= carp.py -ATF_TESTS_PYTEST+= igmp.py -ATF_TESTS_PYTEST+= tcp_hpts_test.py +ATF_TESTS_PYTEST+= carp.py \ + igmp.py \ + ip_mroute.py \ + tcp_hpts_test.py LIBADD.so_reuseport_lb_test= pthread LIBADD.udp_bindings= pthread @@ -54,7 +55,11 @@ TEST_METADATA.raw+= execenv="jail" \ execenv_jail_params="vnet allow.raw_sockets" TEST_METADATA.redirect+= required_programs="python" -PROGS= udp_dontroute tcp_user_cookie multicast-send multicast-receive +PROGS= ip6_mrouted \ + multicast-send \ + multicast-receive \ + tcp_user_cookie \ + udp_dontroute ${PACKAGE}FILES+= redirect.py diff --git a/tests/sys/netinet/ip6_mrouted.c b/tests/sys/netinet/ip6_mrouted.c new file mode 100644 index 000000000000..f3df8330df10 --- /dev/null +++ b/tests/sys/netinet/ip6_mrouted.c @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2026 Stormshield + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A dead-simple IPv6 multicast routing daemon. It registers itself with the + * multicast routing code and then waits for messages from the kernel. Received + * messages are handled by installing multicast routes. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +struct mif { + const char *name; + int mifi; + int pifi; + STAILQ_ENTRY(mif) next; +}; +static STAILQ_HEAD(, mif) miflist = STAILQ_HEAD_INITIALIZER(miflist); + +static void * +xmalloc(size_t size) +{ + void *ptr; + + ptr = malloc(size); + if (ptr == NULL) + err(1, "malloc"); + return (ptr); +} + +static void +usage(void) +{ + fprintf(stderr, + "usage: %s [-i ] [-m //]\n", + getprogname()); + exit(1); +} + +static void +add_route(int sd, const struct in6_addr *src, const struct in6_addr *group, + mifi_t mifi) +{ + struct mf6cctl mfcc; + struct mif *mif; + int error; + + memset(&mfcc, 0, sizeof(mfcc)); + mfcc.mf6cc_parent = mifi; + mfcc.mf6cc_origin.sin6_family = AF_INET6; + mfcc.mf6cc_origin.sin6_len = sizeof(struct sockaddr_in6); + mfcc.mf6cc_origin.sin6_addr = *src; + mfcc.mf6cc_mcastgrp.sin6_family = AF_INET6; + mfcc.mf6cc_mcastgrp.sin6_len = sizeof(struct sockaddr_in6); + mfcc.mf6cc_mcastgrp.sin6_addr = *group; + + STAILQ_FOREACH(mif, &miflist, next) { + if (mif->mifi != mifi) + IF_SET(mif->mifi, &mfcc.mf6cc_ifset); + } + + error = setsockopt(sd, IPPROTO_IPV6, MRT6_ADD_MFC, + &mfcc, sizeof(mfcc)); + if (error != 0) + err(1, "setsockopt(MRT6_ADD_MFC)"); +} + +static void +handle_upcalls(int sd) +{ + struct kevent ev; + int kq; + + kq = kqueue(); + if (kq < 0) + err(1, "kqueue"); + EV_SET(&ev, sd, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL); + if (kevent(kq, &ev, 1, NULL, 0, NULL) < 0) + err(1, "kevent"); + + for (;;) { + char buf1[INET6_ADDRSTRLEN], buf2[INET6_ADDRSTRLEN]; + struct mrt6msg msg; + ssize_t len; + int n; + + n = kevent(kq, NULL, 0, &ev, 1, NULL); + if (n < 0) { + if (errno == EINTR) + break; + err(1, "kevent"); + } + if (n == 0) + continue; + assert(n == 1); + assert(ev.filter == EVFILT_READ); + + len = recv(sd, &msg, sizeof(msg), 0); + if (len < 0) + err(1, "recv"); + if ((size_t)len < sizeof(msg)) { + warnx("short read on upcall, %zd bytes", len); + continue; + } + + printf("upcall received:\n"); + printf("msgtype=%d mif=%d src=%s dst=%s\n", + msg.im6_msgtype, msg.im6_mif, + inet_ntop(AF_INET6, &msg.im6_src, buf1, sizeof(buf1)), + inet_ntop(AF_INET6, &msg.im6_dst, buf2, sizeof(buf2))); + + add_route(sd, &msg.im6_src, &msg.im6_dst, msg.im6_mif); + } + + close(kq); +} + +int +main(int argc, char **argv) +{ + struct mif *mif; + int ch, error, mifi, sd, v; + + mifi = 0; + while ((ch = getopt(argc, argv, "i:m:")) != -1) { + switch (ch) { + case 'i': + mif = xmalloc(sizeof(*mif)); + mif->name = strdup(optarg); + mif->mifi = mifi++; + mif->pifi = if_nametoindex(optarg); + if (mif->pifi == 0) + errx(1, "unknown interface %s", optarg); + STAILQ_INSERT_TAIL(&miflist, mif, next); + break; + default: + usage(); + /* NOTREACHED */ + } + } + argc -= optind; + argv += optind; + + sd = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); + if (sd < 0) + err(1, "socket"); + + v = 1; + error = setsockopt(sd, IPPROTO_IPV6, MRT6_INIT, &v, sizeof(v)); + if (error != 0) + err(1, "setsockopt(MRT6_INIT)"); + + STAILQ_FOREACH(mif, &miflist, next) { + struct mif6ctl mifc; + + mifc.mif6c_mifi = mif->mifi; + mifc.mif6c_pifi = mif->pifi; + mifc.mif6c_flags = 0; + error = setsockopt(sd, IPPROTO_IPV6, MRT6_ADD_MIF, + &mifc, sizeof(mifc)); + if (error != 0) + err(1, "setsockopt(MRT6_ADD_MIF) on %s", mif->name); + } + + handle_upcalls(sd); + + error = setsockopt(sd, IPPROTO_IPV6, MRT6_DONE, NULL, 0); + if (error != 0) + err(1, "setsockopt(MRT6_DONE)"); + + return (0); +} diff --git a/tests/sys/netinet/ip_mroute.py b/tests/sys/netinet/ip_mroute.py new file mode 100644 index 000000000000..5416d824d3c2 --- /dev/null +++ b/tests/sys/netinet/ip_mroute.py @@ -0,0 +1,428 @@ +# +# Copyright (c) 2025 Stormshield +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import pytest +import socket +import struct +import subprocess +import time +from pathlib import Path + +from atf_python.sys.net.vnet import VnetTestTemplate + + +class MRouteTestTemplate(VnetTestTemplate): + """ + Helper class for multicast routing tests. Test classes should inherit from this one. + """ + COORD_SOCK = "coord.sock" + + @staticmethod + def _msgwait(sock: socket.socket, expected: bytes): + msg = sock.recv(1024) + assert msg == expected + + @staticmethod + def sendmsg(msg: bytes, path: str): + s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + s.sendto(msg, path) + s.close() + + @staticmethod + def _makesock(path: str): + s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + s.bind(path) + return s + + @staticmethod + def mcast_join_INET6(addr: str, port: int): + pass + + def jointest(self, vnet): + """Let the coordinator know that we're ready, and wait for go-ahead.""" + coord = self._makesock(vnet.alias + ".sock") + self.sendmsg(b"ok " + vnet.alias.encode(), self.COORD_SOCK) + self._msgwait(coord, b"join") + + def donetest(self): + """Let the coordinator that we completed successfully.""" + self.sendmsg(b"done", self.COORD_SOCK) + + def starttest(self, vnets: list[str]): + self.vnets = vnets + for vnet in vnets: + self.sendmsg(b"join", vnet + ".sock") + + def waittest(self): + for vnet in self.vnets: + self._msgwait(self.coord, b"done") + + def setup_method(self, method): + self.coord = self._makesock(self.COORD_SOCK) + super().setup_method(method) + + # Loop until all other hosts have sent the ok message. + received = set() + vnet_names = set(self.vnet_map.keys()) - {self.vnet.alias} + while len(received) < len(vnet_names): + msg = self.coord.recv(1024) + received.add(msg) + assert received == {b"ok " + name.encode() for name in vnet_names} + + +class MRouteINETTestTemplate(MRouteTestTemplate): + @staticmethod + def run_pimd(ident: str, ifaces: list[str], rpaddr: str, group: str, fib=0): + conf = f"pimd-{ident}.conf" + with open(conf, "w") as conf_file: + conf_file.write("no phyint\n") + for iface in ifaces: + conf_file.write(f"phyint {iface} enable\n") + conf_file.write(f"rp-address {rpaddr} {group}\n") + + cmd = f"setfib {fib} pimd -i {ident} -f {conf} -p pimd-{ident}.pid -n" + return subprocess.Popen(cmd.split(), stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL) + + @staticmethod + def mcast_join(addr: str, port: int): + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) + mreq = struct.pack("4si", socket.inet_aton(addr), socket.INADDR_ANY) + s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq) + s.bind((addr, port)) + time.sleep(1) # Give the kernel a bit of time to join the group. + return s + + @staticmethod + def mcast_sendto(addr: str, port: int, iface: str, msg: bytes): + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) + mreqn = struct.pack("iii", socket.INADDR_ANY, socket.INADDR_ANY, + socket.if_nametoindex(iface)) + s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, mreqn) + s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 64) + s.sendto(msg, (addr, port)) + s.close() + + def setup_method(self, method): + self.require_module("ip_mroute") + super().setup_method(method) + + +class MRouteINET6TestTemplate(MRouteTestTemplate): + @staticmethod + def run_ip6_mrouted(ident: str, ifaces: list[str], fib=0): + ifaces_str = ' '.join(f"-i {iface}" for iface in ifaces) + exepath = Path(__file__).parent / "ip6_mrouted" + cmd = f"setfib {fib} {exepath} {ifaces_str}" + return subprocess.Popen(cmd.split(), stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL) + + @staticmethod + def mcast_join(addr: str, port: int, iface: str): + s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP) + mreq = struct.pack("16si", socket.inet_pton(socket.AF_INET6, addr), + socket.if_nametoindex(iface)) + s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq) + s.bind((addr, port)) + time.sleep(1) # Give the kernel a bit of time to join the + return s + + @staticmethod + def mcast_sendto(addr: str, port: int, iface: str, msg: bytes): + s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP) + mreq = struct.pack("i", socket.if_nametoindex(iface)) + s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, mreq) + s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, 64) + s.sendto(msg, (addr, port)) + s.close() + + def setup_method(self, method): + self.require_module("ip6_mroute") + super().setup_method(method) + + +class Test1RBasicINET(MRouteINETTestTemplate): + """Basic multicast routing setup with 2 hosts connected via a router.""" + + TOPOLOGY = { + "vnet_router": {"ifaces": ["if1", "if2"]}, + "vnet_host1": {"ifaces": ["if1"]}, + "vnet_host2": {"ifaces": ["if2"]}, + "if1": {"prefixes4": [("192.168.1.1/24", "192.168.1.2/24")]}, + "if2": {"prefixes4": [("192.168.2.1/24", "192.168.2.2/24")]}, + } + MULTICAST_ADDR = "239.0.0.1" + + def setup_method(self, method): + # Create VNETs and start the handlers. + super().setup_method(method) + + ifaces = [self.vnet.iface_alias_map[i].name for i in ["if1", "if2"]] + self.pimd = self.run_pimd("test", ifaces, "127.0.0.1", self.MULTICAST_ADDR + "/32") + time.sleep(3) # Give pimd a bit of time to get itself together. + + def vnet_host1_handler(self, vnet): + self.jointest(vnet) + + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345) + + # Wait for host 2 to send a message, then send a reply. + self._msgwait(self.sock, b"Hello, Multicast!") + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Goodbye, Multicast!") + self._msgwait(self.sock, b"Goodbye, Multicast!") + self.donetest() + + def vnet_host2_handler(self, vnet): + self.jointest(vnet) + + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345) + + # Send a message to host 1, then wait for a reply. + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Hello, Multicast!") + self._msgwait(self.sock, b"Hello, Multicast!") + self._msgwait(self.sock, b"Goodbye, Multicast!") + self.donetest() + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["pimd"]) + @pytest.mark.timeout(30) + def test(self): + self.starttest(["vnet_host1", "vnet_host2"]) + self.waittest() + + +class Test1RCrissCrossINET(MRouteINETTestTemplate): + """ + Test a router connected to four hosts, with pairs of interfaces + in different FIBs. + """ + + TOPOLOGY = { + "vnet_router": {"ifaces": ["if1", "if2", "if3", "if4"]}, + "vnet_host1": {"ifaces": ["if1"]}, + "vnet_host2": {"ifaces": ["if2"]}, + "vnet_host3": {"ifaces": ["if3"]}, + "vnet_host4": {"ifaces": ["if4"]}, + "if1": { + "prefixes4": [("192.168.1.1/24", "192.168.1.2/24")], + "prefixes6": [], + "fib": (0, 0), + }, + "if2": { + "prefixes4": [("192.168.2.1/24", "192.168.2.2/24")], + "prefixes6": [], + "fib": (0, 0), + }, + "if3": { + "prefixes4": [("192.168.3.1/24", "192.168.3.2/24")], + "prefixes6": [], + "fib": (1, 0), + }, + "if4": { + "prefixes4": [("192.168.4.1/24", "192.168.4.2/24")], + "prefixes6": [], + "fib": (1, 0), + }, + } + MULTICAST_ADDR = "239.0.0.1" + + def setup_method(self, method): + # Create VNETs and start the handlers. + super().setup_method(method) + + # Start a pimd instance per FIB. + ifaces = [self.vnet.iface_alias_map[i].name for i in ["if1", "if2"]] + self.pimd0 = self.run_pimd("test0", ifaces, "127.0.0.1", self.MULTICAST_ADDR + "/32", + fib=0) + ifaces = [self.vnet.iface_alias_map[i].name for i in ["if3", "if4"]] + self.pimd1 = self.run_pimd("test1", ifaces, "127.0.0.1", self.MULTICAST_ADDR + "/32", + fib=1) + time.sleep(3) # Give pimd a bit of time to get itself together. + + def vnet_host1_handler(self, vnet): + self.jointest(vnet) + + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345) + self._msgwait(self.sock, b"Hello, Multicast on FIB 0!") + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Goodbye, Multicast on FIB 0!") + self.donetest() + + def vnet_host2_handler(self, vnet): + self.jointest(vnet) + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345) + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Hello, Multicast on FIB 0!") + self._msgwait(self.sock, b"Hello, Multicast on FIB 0!") + self._msgwait(self.sock, b"Goodbye, Multicast on FIB 0!") + self.donetest() + + def vnet_host3_handler(self, vnet): + self.jointest(vnet) + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345) + self._msgwait(self.sock, b"Hello, Multicast on FIB 1!") + self.mcast_sendto(self.MULTICAST_ADDR, 12345, + vnet.ifaces[0].name, b"Goodbye, Multicast on FIB 1!") + self.donetest() + + def vnet_host4_handler(self, vnet): + self.jointest(vnet) + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345) + time.sleep(1) + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Hello, Multicast on FIB 1!") + self._msgwait(self.sock, b"Hello, Multicast on FIB 1!") + self._msgwait(self.sock, b"Goodbye, Multicast on FIB 1!") + self.donetest() + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["pimd"]) + @pytest.mark.timeout(30) + def test(self): + self.starttest(["vnet_host1", "vnet_host2", "vnet_host3", "vnet_host4"]) + self.waittest() + + +class Test1RBasicINET6(MRouteINET6TestTemplate): + """Basic multicast routing setup with 2 hosts connected via a router.""" + + TOPOLOGY = { + "vnet_router": {"ifaces": ["if1", "if2"]}, + "vnet_host1": {"ifaces": ["if1"]}, + "vnet_host2": {"ifaces": ["if2"]}, + "if1": { + "prefixes6": [("2001:db8:0:1::1/64", "2001:db8:0:1::2/64")] + }, + "if2": { + "prefixes6": [("2001:db8:0:2::1/64", "2001:db8:0:2::2/64")] + }, + } + MULTICAST_ADDR = "ff05::1" + + def setup_method(self, method): + # Create VNETs and start the handlers. + super().setup_method(method) + + ifaces = [self.vnet.iface_alias_map[i].name for i in ["if1", "if2"]] + self.mrouted = self.run_ip6_mrouted("test", ifaces) + time.sleep(1) + + def vnet_host1_handler(self, vnet): + self.jointest(vnet) + + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name) + + # Wait for host 2 to send a message, then send a reply. + self._msgwait(self.sock, b"Hello, Multicast!") + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Goodbye, Multicast!") + self._msgwait(self.sock, b"Goodbye, Multicast!") + self.donetest() + + def vnet_host2_handler(self, vnet): + self.jointest(vnet) + + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name) + + # Send a message to host 1, then wait for a reply. + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Hello, Multicast!") + self._msgwait(self.sock, b"Hello, Multicast!") + self._msgwait(self.sock, b"Goodbye, Multicast!") + self.donetest() + + @pytest.mark.require_user("root") + @pytest.mark.timeout(30) + def test(self): + self.starttest(["vnet_host1", "vnet_host2"]) + self.waittest() + + +class Test1RCrissCrossINET6(MRouteINET6TestTemplate): + """ + Test a router connected to four hosts, with pairs of interfaces + in different FIBs. + """ + + TOPOLOGY = { + "vnet_router": {"ifaces": ["if1", "if2", "if3", "if4"]}, + "vnet_host1": {"ifaces": ["if1"]}, + "vnet_host2": {"ifaces": ["if2"]}, + "vnet_host3": {"ifaces": ["if3"]}, + "vnet_host4": {"ifaces": ["if4"]}, + "if1": { + "prefixes6": [("2001:db8:0:1::1/64", "2001:db8:0:1::2/64")], + "fib": (0, 0), + }, + "if2": { + "prefixes6": [("2001:db8:0:2::1/64", "2001:db8:0:2::2/64")], + "fib": (0, 0), + }, + "if3": { + "prefixes6": [("2001:db8:0:3::1/64", "2001:db8:0:3::2/64")], + "fib": (1, 0), + }, + "if4": { + "prefixes6": [("2001:db8:0:4::1/64", "2001:db8:0:4::2/64")], + "fib": (1, 0), + }, + } + MULTICAST_ADDR = "ff05::1" + + def setup_method(self, method): + # Create VNETs and start the handlers. + super().setup_method(method) + + # Start an ip6_mrouted instance per FIB. + ifaces = [self.vnet.iface_alias_map[i].name for i in ["if1", "if2"]] + self.pimd0 = self.run_ip6_mrouted("test0", ifaces, fib=0) + ifaces = [self.vnet.iface_alias_map[i].name for i in ["if3", "if4"]] + self.pimd1 = self.run_ip6_mrouted("test1", ifaces, fib=1) + time.sleep(1) # Give ip6_mrouted a bit of time to get itself together. + + def vnet_host1_handler(self, vnet): + self.jointest(vnet) + + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name) + self._msgwait(self.sock, b"Hello, Multicast on FIB 0!") + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Goodbye, Multicast on FIB 0!") + self.donetest() + + def vnet_host2_handler(self, vnet): + self.jointest(vnet) + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name) + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Hello, Multicast on FIB 0!") + self._msgwait(self.sock, b"Hello, Multicast on FIB 0!") + self._msgwait(self.sock, b"Goodbye, Multicast on FIB 0!") + self.donetest() + + def vnet_host3_handler(self, vnet): + self.jointest(vnet) + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name) + self._msgwait(self.sock, b"Hello, Multicast on FIB 1!") + self.mcast_sendto(self.MULTICAST_ADDR, 12345, + vnet.ifaces[0].name, b"Goodbye, Multicast on FIB 1!") + self.donetest() + + def vnet_host4_handler(self, vnet): + self.jointest(vnet) + self.sock = self.mcast_join(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name) + time.sleep(1) + self.mcast_sendto(self.MULTICAST_ADDR, 12345, vnet.ifaces[0].name, + b"Hello, Multicast on FIB 1!") + self._msgwait(self.sock, b"Hello, Multicast on FIB 1!") + self._msgwait(self.sock, b"Goodbye, Multicast on FIB 1!") + self.donetest() + + @pytest.mark.require_user("root") + @pytest.mark.timeout(30) + def test(self): + self.starttest(["vnet_host1", "vnet_host2", "vnet_host3", "vnet_host4"]) + self.waittest() diff --git a/tests/sys/netinet6/Makefile b/tests/sys/netinet6/Makefile index 26f1a18a8d32..f5a04a299dc6 100644 --- a/tests/sys/netinet6/Makefile +++ b/tests/sys/netinet6/Makefile @@ -1,6 +1,7 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/netinet6 +BINDIR= ${TESTSDIR} FILESDIR= ${TESTSDIR} ATF_TESTS_PYTEST= test_ip6_output.py From nobody Mon Mar 30 16:15:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDw6q2sz6Wyb7 for ; Mon, 30 Mar 2026 16:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDw52Bmz49n9 for ; Mon, 30 Mar 2026 16:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eu5veCcytXzV+kdh+9OkMhCBMspATGSE9aUF4A6vm84=; b=gYauoaFvaZ8v50WluiEMGybsjCidfRw3svx+BGaC8fA9QBTQABGxFDQACVjWi+wrOTGHs1 scbJa59KcvhhW6lfqaXGkrexF+ACNi9vB9fYI/AU+BEXu7Wh4n5YUSi9eKfmejLfZrNidN aqQzkvCNO/O8YgUkVOdEeslnknpCUnvhncnziQYI7cd6jLeduwJ6OyXHpjcgE1dnyBxwkW xGPwzuclcXcytkkWz7HWT/w0nqMoXu95waIEe8588v4VdL1RHrWm0zHRrkCgeIvRi6ncuG f/Lq91+LPAUle+Sno5uml7uPjl4CbPKgmQlutZxIrMmF0dvIazMQDwjfeat38w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887344; a=rsa-sha256; cv=none; b=fvOqB7zMKB1okRuwYyMuDXisFNc0RNu5DS6UlHOxjNoa+D2GLdba9L+8ZlusPErGv/YwOW 6Ia6Fx7rUHgzhR7PYqDvK4s4rMt0F+ETs4LeIwLH8wJ7aOx/XoURmuv6B9Hc7aH7eEOv3L HSkDmEPwzJYKSsS9TmTK5ww2MgOPLWkzM6jRBG3ZELJbitsabrbp1XtmHDHorTGBDEhKSZ pku4vgAJS5N1lZEZweGDV/pPI5D6lisyka1AwmiBGM380BXT5/MznRKQsvDl/ow8nBuGTh kPcYsbtBHRL7kuqncI4fPSdT+vkh51GGghfmUsoIcwkeDLaT0qzOoOSgaxvm2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eu5veCcytXzV+kdh+9OkMhCBMspATGSE9aUF4A6vm84=; b=fGmYFW/ROS330vue2Ydrkfj4XHWGA3lhcppbrMEZ/ZbFEN64umCommPYyYRx6/jRvDppLt 4WauneCjii/Mc4W8CX6KOtIh/ZW3POvsfhu0cTkzNuKP51gjP3+8gozqcNgbmBdwByZQYJ 1dctyOqJc+mZOfGUImcRB1eIhlul567qUdJDotNeiqRfV48dbkp9QJf9KTn0s/YaZ149aa v0dr87CBzXu6tbHAwkpkSb2TMWrrBjqnMWybBRvQmH3DUX/JWNj8Ajg+gkJYUSCpF9ysbP T3uisVulL4iIfEp4HivBfyr2PPpzK0zzHzKMOoUwqANZD5I7JsDAvK+QYv3M8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDw4ZBhzqkd for ; Mon, 30 Mar 2026 16:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bf42 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 82272cbf56aa - main - ip6_mroute: Pass the multicast interface number directly to del_m6if() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82272cbf56aa5646611c6f1049501cc345fcf6ec Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:44 +0000 Message-Id: <69caa1b0.3bf42.2c9af642@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=82272cbf56aa5646611c6f1049501cc345fcf6ec commit 82272cbf56aa5646611c6f1049501cc345fcf6ec Author: Mark Johnston AuthorDate: 2026-03-30 13:33:11 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:21 +0000 ip6_mroute: Pass the multicast interface number directly to del_m6if() There's no need to pass a pointer to the interface number. No functional change intended. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55245 --- sys/netinet6/ip6_mroute.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 52fd319ba4f4..f9541203a747 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -351,8 +351,8 @@ static int ip6_mrouter_init(struct socket *, int, int); static int add_m6fc(struct mf6ctable *, struct mf6cctl *); static int add_m6if(struct mf6ctable *, int, struct mif6ctl *); static int del_m6fc(struct mf6ctable *, struct mf6cctl *); -static int del_m6if(struct mf6ctable *, mifi_t *); -static int del_m6if_locked(struct mf6ctable *, mifi_t *); +static int del_m6if(struct mf6ctable *, mifi_t); +static int del_m6if_locked(struct mf6ctable *, mifi_t); static int get_mif6_cnt(struct mf6ctable *, struct sioc_mif_req6 *); static int get_sg_cnt(struct mf6ctable *, struct sioc_sg_req6 *); @@ -446,7 +446,7 @@ X_ip6_mrouter_set(struct socket *so, struct sockopt *sopt) error = sooptcopyin(sopt, &mifi, sizeof(mifi), sizeof(mifi)); if (error) break; - error = del_m6if(mfct, &mifi); + error = del_m6if(mfct, mifi); break; case MRT6_PIM: error = sooptcopyin(sopt, &optval, sizeof(optval), @@ -795,17 +795,17 @@ add_m6if(struct mf6ctable *mfct, int fibnum, struct mif6ctl *mifcp) * Delete a mif from the mif table */ static int -del_m6if_locked(struct mf6ctable *mfct, mifi_t *mifip) +del_m6if_locked(struct mf6ctable *mfct, mifi_t mifi) { struct mif6 *mifp; - mifi_t mifi; + mifi_t tmp; struct ifnet *ifp; MIF6_LOCK_ASSERT(); - if (*mifip >= mfct->nummifs) + if (mifi >= mfct->nummifs) return (EINVAL); - mifp = &mfct->miftable[*mifip]; + mifp = &mfct->miftable[mifi]; if (mifp->m6_ifp == NULL) return (EINVAL); @@ -826,22 +826,22 @@ del_m6if_locked(struct mf6ctable *mfct, mifi_t *mifip) bzero(mifp, sizeof(*mifp)); /* Adjust nummifs down */ - for (mifi = mfct->nummifs; mifi > 0; mifi--) - if (mfct->miftable[mifi - 1].m6_ifp != NULL) + for (tmp = mfct->nummifs; tmp > 0; tmp--) + if (mfct->miftable[tmp - 1].m6_ifp != NULL) break; - mfct->nummifs = mifi; - MRT6_DLOG(DEBUG_ANY, "mif %d, nummifs %d", *mifip, mfct->nummifs); + mfct->nummifs = tmp; + MRT6_DLOG(DEBUG_ANY, "mif %d, nummifs %d", mifi, mfct->nummifs); return (0); } static int -del_m6if(struct mf6ctable *mfct, mifi_t *mifip) +del_m6if(struct mf6ctable *mfct, mifi_t mifi) { int cc; MIF6_LOCK(); - cc = del_m6if_locked(mfct, mifip); + cc = del_m6if_locked(mfct, mifi); MIF6_UNLOCK(); return (cc); From nobody Mon Mar 30 16:15:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDy3hMpz6WyXp for ; Mon, 30 Mar 2026 16:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkxDx6KGJz49nH for ; Mon, 30 Mar 2026 16:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lht8sjD/RbZUEW15F5rufW6BSUF2D/1a4FLiq8KlnoY=; b=vleSCcxQuLYmE88I/KeCCTq3dnhzkYH+QK1tuBtetLTtqeBqEOx5o34tt7Sbz/ZNpW2j2t 8yEaxUjiuSLM2pjDmxeq6jL9V4bHiQPWcFcEFBEDMP5XYXZvcATTCiWPCKSCZ/Nt4sA8DJ m7mIeJAsf0/h0vq+zWwe1jZD5/g7mbOGlWh0TGOMcTxFC7K+z7Qzmbtypb6zZ/APT/55kO 2HHN3WbuLUWQogySQZXXm+w8+uY5OggapknbtiJKfAvtgHWRlVKroJUWKc/P717siSzLvo 1epdoNDrL7GEpzZp5DFCnhuL5nUbVtPCfxcJ73B7mHO9ZFqpXBh+/d4QnPzSVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774887346; a=rsa-sha256; cv=none; b=e6PDjZJbl/4J1+gQOkYgFYMp/CJWPnqMGnWZf8DYcWJUEEPWDAmdN515coV7S4/YfzxRjF KRWdsatt7lJ0ZsmHu/cmW3kgCY1hj2nxsftaobpFo15l2mSsje/9GZkL8dMQW8gh4VCwEf DVAVbYA7Dovo5/e6DKVR1B6qVJqHJeoyHM8RNycrJLZH1F3fGWpmt1UooNpytX7S/cBYj8 sB6bchOlxxsc95v1xchZRmqK0v630OnsjMQ9KtAyzNgbdMVxxWcPECIqwzta589zpnPOzC tqBtglhb3B0UoovV6B0Yfo3kDW8Ws/7/uWhGyUYrVpk/AuIuxlrrLreSpVLBaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774887346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lht8sjD/RbZUEW15F5rufW6BSUF2D/1a4FLiq8KlnoY=; b=st5xh198XUOnQP59bTgKPyQAQ/PK3y6JIJtoKK6KJ1lgvFJjuqRbHHMcCSxcZkRVWVgN4p DSijJDHMo/74CFmwied9GK06ZvaEiT+dWzEaTp/y+l0oGmRTJSbAvUIGXbS65wrTn4ZN8G m4Uwq7BVSf551PQZ7eOd2e6by+xrqhBh06yzTXIA/nt27N3dfd0yMhQv/B60YlLJzF43Nz W3jenBdr8iLobMnYW4vak+PplniM2n1p6jExmnq4DTL91pU8z74KIGS+fENcdRd6pEEGhp OPrZKxBHdMrjCKvKml1meajYVCEiRuRRcEw6254b7ewcQtVz0nM9KOBQxFcPaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkxDx5Lc6zqMC for ; Mon, 30 Mar 2026 16:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b8ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 16:15:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a1c042a9641c - main - ip6_mroute: Handle interface detach events List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1c042a9641c9df08010e87d0928703849ff9853 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 16:15:45 +0000 Message-Id: <69caa1b1.3b8ac.5985faa4@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a1c042a9641c9df08010e87d0928703849ff9853 commit a1c042a9641c9df08010e87d0928703849ff9853 Author: Mark Johnston AuthorDate: 2026-03-30 13:33:32 +0000 Commit: Mark Johnston CommitDate: 2026-03-30 16:08:21 +0000 ip6_mroute: Handle interface detach events When an interface goes away we need to make sure the v6 multicast routing tables don't carry any dangling references to the ifnet. The v4 code handles this already. Copy the approach there and use an eventhandler to purge the corresponding MIF, if one exists, and further go through all routes in the FIB and remove references to the interface. MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55246 --- sys/netinet6/ip6_mroute.c | 69 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index f9541203a747..9a7f611b8b4c 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -211,7 +211,7 @@ VNET_DEFINE_STATIC(struct mf6ctable *, mfctables); VNET_DEFINE_STATIC(uint32_t, nmfctables); #define V_nmfctables VNET(nmfctables) -static eventhandler_tag rtnumfibs_change_tag; +static eventhandler_tag ifdetach_tag, rtnumfibs_change_tag; static int sysctl_mfctable(SYSCTL_HANDLER_ARGS) @@ -791,6 +791,20 @@ add_m6if(struct mf6ctable *mfct, int fibnum, struct mif6ctl *mifcp) return (0); } +static void +expire_mf6c(struct mf6c *mfc) +{ + struct rtdetq *rte; + + while ((rte = mfc->mf6c_stall) != NULL) { + mfc->mf6c_stall = rte->next; + m_freem(rte->m); + free(rte, M_MRTABLE6); + } + + free(mfc, M_MRTABLE6); +} + /* * Delete a mif from the mif table */ @@ -810,9 +824,29 @@ del_m6if_locked(struct mf6ctable *mfct, mifi_t mifi) return (EINVAL); if (!(mifp->m6_flags & MIFF_REGISTER)) { - /* XXX: TODO: Maintain an ALLMULTI refcount in struct ifnet. */ ifp = mifp->m6_ifp; if_allmulti(ifp, 0); + + MFC6_LOCK(); + for (int i = 0; i < MF6CTBLSIZ; i++) { + struct mf6c *mfc, **nmfc; + + nmfc = &mfct->mfchashtbl[i]; + while ((mfc = *nmfc) != NULL) { + if (mfc->mf6c_parent == mifi) { + *nmfc = mfc->mf6c_next; + if (mfc->mf6c_expire) + mfct->nexpire[i]--; + expire_mf6c(mfc); + } else { + /* Remove this mif from the ifset */ + if (IF_ISSET(mifi, &mfc->mf6c_ifset)) + IF_CLR(mifi, &mfc->mf6c_ifset); + nmfc = &mfc->mf6c_next; + } + } + } + MFC6_UNLOCK(); } else { if (mfct->register_mif != (mifi_t)-1 && mfct->register_if != NULL) { @@ -1954,6 +1988,32 @@ pim6_input(struct mbuf *m, int off, int proto, void *arg __unused) return (rip6_input(&m, &off, proto)); } +static void +ip6_mrouter_ifdetach(void *arg __unused, struct ifnet *ifp) +{ + struct mf6ctable *mfct; + + if (!V_ip6_mrouting_enabled) + return; + for (int i = 0; i < V_nmfctables; i++) { + mfct = &V_mfctables[i]; + + MIF6_LOCK(); +restart: + for (mifi_t mifi = 0; mifi < mfct->nummifs; mifi++) { + int error __diagused; + + if (mfct->miftable[mifi].m6_ifp != ifp) + continue; + error = del_m6if_locked(mfct, mifi); + KASSERT(error == 0, + ("del_m6if_locked(%s) %d", ifp->if_xname, error)); + goto restart; + } + MIF6_UNLOCK(); + } +} + static void ip6_mroute_rtnumfibs_change(void *arg __unused, uint32_t ntables) { @@ -2010,6 +2070,9 @@ ip6_mroute_modevent(module_t mod, int type, void *unused) MFC6_LOCK_INIT(); MIF6_LOCK_INIT(); + ifdetach_tag = EVENTHANDLER_REGISTER( + ifnet_departure_event, ip6_mrouter_ifdetach, + NULL, EVENTHANDLER_PRI_ANY); rtnumfibs_change_tag = EVENTHANDLER_REGISTER( rtnumfibs_change, ip6_mroute_rtnumfibs_change, NULL, EVENTHANDLER_PRI_ANY); @@ -2035,6 +2098,8 @@ ip6_mroute_modevent(module_t mod, int type, void *unused) if (V_ip6_mrouting_enabled) return (EBUSY); + EVENTHANDLER_DEREGISTER(ifnet_departure_event, + ifdetach_tag); EVENTHANDLER_DEREGISTER(rtnumfibs_change, rtnumfibs_change_tag); From nobody Mon Mar 30 17:01:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyFY4XVMz6X3j7; Mon, 30 Mar 2026 17:01:21 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyFY4Ck8z3QCF; Mon, 30 Mar 2026 17:01:21 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RsHti/YNEolCE8eN0ClzLBX9WdJSGxHEdnm2qRkC7ak=; b=GW4RCVo+hGq7KtmyhVe0B+hnBLxJDzcay+DfUQYxDB+DfJkjiLYliWNxbZS/ynB4pFAiKm GcE9ACwlEOLctSmzokkx1BqCzRPA80Hmz1Yr3nHyYzUJjCQs5dJTxhszpWctjUX502kEqB YTbXTSdRl3wy7P9l++RT5xps16Ve/J8a3mAcMLyWr1y51eMM+lK5aKoNkZIgREHimyHh/U 0RnwDcc5kCRP/4m2ivWl337fle6Te+E3igStEEdg6wTLpC3mkfdfIPxzoYWq8S9ZgY8Ale 2HyhL2FXt25O5toOLfSp3kbbsTvxXl7pCgpVWyNrDuedILOf5z/5uTa10OBlfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890081; a=rsa-sha256; cv=none; b=nvsFuj4jdZ27YOKWw9c3t/Ms9ckva28iweI/QSj0bLWuWjlscm3T3z0JpRqF2zkOFXLqre bPgic+Mtm0OuCG73TN+CpYMp7/qYva5FrR/tP+TrnUO12j3yYN/iE0C15sYhq5AfBJsORj UHDI63WYxAH12X37Nf4RSFff2tiWvCuphnreCWsNTYMF/jeKNETCfBhfhjntTBaPrDtlEN AQUNxSS40bdDCZiLlOxxlqu0TaQHA0lfcLIOnplrn1UpDQvwH0UeccrYY836dC7GZx8ktw vPRkTtJPqKoysO9fXd6zkQuNq/h054fOGsofECSbD9vtLyotLyiFUzuQzE9y2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RsHti/YNEolCE8eN0ClzLBX9WdJSGxHEdnm2qRkC7ak=; b=qTwGrRJKCk7HU81Y/FKpBoU0GepzyAjbjOyIlSyqpbWpZy7ohd2Aee451p/XaBc7pVDkN2 8FMpUWf+jqj1mhbSmpBjDzeX8QJnTSvyzH7H8ZIn9NcjnXbVsI1Z/0uOPbKmnDMJYr4Ihx EK//irajgxaSsb5yeGaU35nAVkV8TbTwexLT3y4TyBIldbBfHSO/CyeTNNPyGVi+Fxx/jy kwSQ+/iA3Kz1RE0mD2Mb76zr/emmSBP1ZHed//1fSuDLCe7Z9/h7Cjc20R+2E06s+muRXS BDeu8AyHKgNCZjmjz0EQpkpnpodsicPlVEv3QUNhsi0mIK3RGa42pOYN4MOrDQ== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fkyFR57D4zPf1; Mon, 30 Mar 2026 17:01:15 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_39E69894-D44E-4325-8241-8609EC36E87E" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: d9c55b2e8cd6 - main - rss: Enable portions of RSS globally to enable symmetric hashing Date: Tue, 31 Mar 2026 01:01:06 +0800 In-Reply-To: <377ropo1-734p-q318-3p95-2179222sn9oq@mnoonqbm.arg> Cc: Andrew Gallatin , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: "Bjoern A. Zeeb" References: <6921c91b.2f53c.60323437@gitrepo.freebsd.org> <377ropo1-734p-q318-3p95-2179222sn9oq@mnoonqbm.arg> X-Mailer: Apple Mail (2.3696.120.41.1.10) --Apple-Mail=_39E69894-D44E-4325-8241-8609EC36E87E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 30, 2026, at 6:41 PM, Bjoern A. Zeeb = wrote: >=20 > On Sat, 22 Nov 2025, Andrew Gallatin wrote: >=20 >> The branch main has been updated by gallatin: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dd9c55b2e8cd6b79f6926278e10a79f1b= cca27a4b >>=20 >> commit d9c55b2e8cd6b79f6926278e10a79f1bcca27a4b >> Author: Andrew Gallatin >> AuthorDate: 2025-11-22 14:29:31 +0000 >> Commit: Andrew Gallatin >> CommitDate: 2025-11-22 14:29:31 +0000 >>=20 >> rss: Enable portions of RSS globally to enable symmetric hashing >>=20 >> We use the fact that all NICs that support hashing are using the >> same hash algorithm and hash key to enable symmetic hashing in >> TCP, where a software version of the same hash is used to >> establish hashes on outgoing connections. >>=20 >> Sponsored by: Netflix >> Reviewed by: adrian, zlei (both early version) >> Differential Revision: https://reviews.freebsd.org/D53089 >> --- >> sys/conf/files | 8 +++--- >> sys/net/rss_config.c | 66 = +++++++++++++++++++++++++++++++------------------- >> sys/net/rss_config.h | 20 +++++++++------ >> sys/netinet/in_rss.c | 3 +++ >> sys/netinet6/in6_rss.c | 3 +++ >> 5 files changed, 63 insertions(+), 37 deletions(-) >>=20 >> diff --git a/sys/conf/files b/sys/conf/files >> index 53fcb80f2b8d..3314274b47a8 100644 >> --- a/sys/conf/files >> +++ b/sys/conf/files >> @@ -4238,10 +4238,10 @@ net/route/route_rtentry.c standard >> net/route/route_subscription.c standard >> net/route/route_tables.c standard >> net/route/route_temporal.c standard >> -net/rss_config.c optional inet rss | inet6 rss >> +net/rss_config.c standard >=20 > Given this relies on toeplitz_hash which is inet | inet6 it doesn't = work for NO-IP > kernels: >=20 > 3 >>> Kernel build for LINT-NOIP started on Mon Mar 30 06:39:36 = UTC 2026 > .. > 36 linking kernel > 37 ld: error: undefined symbol: toeplitz_hash > 38 >>> referenced by rss_config.c > 39 >>> rss_config.o:(rss_hash) > 40 --- kernel --- > 41 *** [kernel] Error code 1 >=20 > Either this needs to be optional inet | inet6 or the topelitz parts = need to be > #if defined(INET6) || defined(INET) in the rss_config.c The net/toeplitz.c is independent with inet or inet6. So maybe it is = better to make it standard ? >=20 >=20 >=20 > Don't ask me why this is visible now but tells something about the = state of LINT > in the last months maybe? >=20 >> net/rtsock.c standard >> net/slcompress.c optional netgraph_vjc >> -net/toeplitz.c optional inet rss | inet6 rss | = route_mpath >> +net/toeplitz.c optional inet | inet6 | = route_mpath >> net/vnet.c optional vimage >> net80211/ieee80211.c optional wlan >> net80211/ieee80211_acl.c optional wlan wlan_acl >=20 > --=20 > Bjoern A. Zeeb = r15:7 Best regards, Zhenlei --Apple-Mail=_39E69894-D44E-4325-8241-8609EC36E87E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Mar 30, 2026, at 6:41 PM, Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net> wrote:

On Sat, 22 Nov 2025, Andrew Gallatin wrote:

The = branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd9c55b2e8cd6b79f69262= 78e10a79f1bcca27a4b

commit = d9c55b2e8cd6b79f6926278e10a79f1bcca27a4b
Author: =     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: = 2025-11-22 14:29:31 +0000
Commit: =     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: = 2025-11-22 14:29:31 +0000

  rss: = Enable portions of RSS globally to enable symmetric hashing

  We use the fact that all NICs that = support hashing are using the
  same hash = algorithm and hash key to enable symmetic hashing in
  TCP, where a software version of the same hash is = used to
  establish hashes on outgoing = connections.

  Sponsored by: = Netflix
  Reviewed by: adrian, zlei (both early = version)
  Differential Revision:  https://reviews.freebsd.org/D53089
---
sys/conf/files =         |  8 +++---
sys/net/rss_config.c   | 66 = +++++++++++++++++++++++++++++++-------------------
sys/net/rss_config.h   | 20 +++++++++------
sys/netinet/in_rss.c   |  3 +++
sys/netinet6/in6_rss.c |  3 +++
5 files = changed, 63 insertions(+), 37 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index 53fcb80f2b8d..3314274b47a8 100644
--- = a/sys/conf/files
+++ b/sys/conf/files
@@ = -4238,10 +4238,10 @@ net/route/route_rtentry.c = standard
net/route/route_subscription.c = standard
net/route/route_tables.c = standard
net/route/route_temporal.c = standard
-net/rss_config.c optional = inet rss | inet6 rss
+net/rss_config.c = standard

Given this relies on toeplitz_hash which is inet | inet6 it = doesn't work for NO-IP
kernels:

     3 >>> Kernel build for = LINT-NOIP started on Mon Mar 30 06:39:36 UTC 2026
..
    36 linking kernel
    37 ld: error: undefined symbol: = toeplitz_hash
    38 >>> referenced by = rss_config.c
    39 >>> =             &n= bsp; rss_config.o:(rss_hash)
    40 --- kernel ---
    41 *** [kernel] Error code = 1

Either this = needs to be optional inet | inet6   or the topelitz parts need = to be
#if = defined(INET6) || defined(INET) in the rss_config.c

The net/toeplitz.c is independent with inet = or inet6. So maybe it is better to make it standard ?




Don't ask me = why this is visible now but tells something about the state of = LINT
in the last = months maybe?

net/rtsock.c standard
net/slcompress.c optional netgraph_vjc
-net/toeplitz.c optional inet rss | inet6 rss | = route_mpath
+net/toeplitz.c optional inet | inet6 | = route_mpath
net/vnet.c optional vimage
net80211/ieee80211.c optional wlan
net80211/ieee80211_acl.c optional wlan wlan_acl

-- Bjoern A. = Zeeb =             &n= bsp;           &nbs= p;            =             &n= bsp;  r15:7

Best regards,
Zhenlei

= --Apple-Mail=_39E69894-D44E-4325-8241-8609EC36E87E-- From nobody Mon Mar 30 17:15:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ12xn0z6X5WT for ; Mon, 30 Mar 2026 17:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyZ12GMDz3T22 for ; Mon, 30 Mar 2026 17:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDi/2d8+UGwz34LQZE12jWZJDuWBlUTqLp1wNauGA+Q=; b=wW/UHnth5+prvaGfa/CDLxu1X0Z+EcpGYI+ur0rH2gbSVw5e65SqS+SURK6UuQJww0Z3il s4xIHhoR8SflSyScZG/lDLU1muvNNU8U3hR6Xqwme/hxlwtoc3DMG/lmlzSsTdrA8KRl0n ZIXLi4MGOgwHnDYR9d1v+YJ0GTyD5RvYwTXpZxv04CCbd0natKU8cu8ppgMpcOWqqWfzrq fghTVPVd9rKatbSim/CbpXGVEQcDgCGHJfnpGcVPRr9ZKHe1Ly3mIWj8HK9Ka6DRJvy7km NPQwR4u+FH4iZ9rq98z+78acqTZcsRODkYgtizhEcnPicA/qgIlzsge46T+z2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890937; a=rsa-sha256; cv=none; b=f8NM8PUSFrRB7bbw111KbsoBzh9aNhFfVdymDk3QxZrXcr+wzOgxqrdt1kAitaqCS1OsN2 N6R+0+2fLnLK4Kfl3lCSL1XL1BEedUFfSQpPSfioqWI/KbYWAb11qophozMYluoO4K4PqV I73XnI+YfWjO38GAkd6FIe5S7ELQAckRmhsrt8Uh00fYVC3BeAAnBOQDyrdZy5n2oMHE8P wugwWT66mmEMAnqSSGctx3QUh/MpJN+s/S8ELzFNpVhE0buvi45h0KcCuxm2j6k8YnXHSV I0cp54H1EqZiyVu6Nk7VExgaKcGV+l26rx7NZ3ErxXWcP2d/HUUC2oM0n295dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDi/2d8+UGwz34LQZE12jWZJDuWBlUTqLp1wNauGA+Q=; b=jtPFGhL6K4zN7OYCAM1tRS15GNdw/Jr4Xm+hFryqOjghhH5cYumiJbJzBwMReXqq5imktT B+j6MAFmCFH/hkblhDS87v+XzKYi0M1PaIEDRtczQlZiSl4bdeGJGS43GMCDtLPw0sfAIp aMlSD7Avvq5DkY4eiTP6gufXThH0iYrhQ3sT387u/7fY9Uv8ED/fF47LHKKGUmoGAvK15o 7NAfvTQpmoVBI+zDFsVdYHfAPnhEr1ByXw1QG/8eUi/vRO3hb20LAWUnGAtuOaQlkDnaPS CsIejS4pTWFNISuU7Nb3cSeHJ57eSjqkL9yMcR7RTGF+Bj+1Jms1CMQUwy09Rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ11nNYzsCt for ; Mon, 30 Mar 2026 17:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41be9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 17:15:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7cfffe25da3f - main - rtld: check for overflow in parse_integer() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cfffe25da3fbc2db4bcf073ff2d240f84233973 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 17:15:37 +0000 Message-Id: <69caafb9.41be9.20a25bdb@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7cfffe25da3fbc2db4bcf073ff2d240f84233973 commit 7cfffe25da3fbc2db4bcf073ff2d240f84233973 Author: Konstantin Belousov AuthorDate: 2026-03-29 22:45:13 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-30 16:56:52 +0000 rtld: check for overflow in parse_integer() Reviewed by: dim, emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56151 --- libexec/rtld-elf/rtld.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index e0de6d2e2214..1cf0d3e9ba28 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -6492,7 +6492,11 @@ parse_integer(const char *str) if (c < '0' || c > '9') return (-1); + if (n > INT_MAX / RADIX) + return (-1); n *= RADIX; + if (n > INT_MAX - (c - '0')) + return (-1); n += c - '0'; } From nobody Mon Mar 30 17:15:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ251Djz6X4y8 for ; Mon, 30 Mar 2026 17:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyZ234psz3TCW for ; Mon, 30 Mar 2026 17:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cfIILmeznote8oFR8wxEhNkiMiVM07ncqu4kcpPesys=; b=fK2r18B99PXxAxyFdihbqOCdBkvPB1ybQR+sH3xqjW/WlzEbAMH0SFzGdr4QTfuREKYUtZ wURECUnRA6+X/SUdSrzk1ft0pimDvJaqeR58DGdB1AF/jRdKUbKCnQZdS7ui+qgyvo61aY U1gMpNefo2FPjYH5k0RMUIA4DE0z2Ld4depOP0yh0D7SF9L3oyIPSNFYAsmnS0AZX7zR4o Ay2ZnXZFrXSSFBpwtG0bNGp4xJ63F3/VzF4dvvrawMz2KM95stlKMe940b6XIe9ogU/UNR qluEnEeU+pYaHo4keNHPtGb8guwd55zgYenemrTsu+BlI/m49h98+xmr6/a21g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890938; a=rsa-sha256; cv=none; b=D6jqhXueZeeO0LpkILQVVghDlXXYSBGq7JLGdRryhmZ8PQVJhVs3nkQJnb3rC4cYDr/hp2 UcalLqsXCNI2NjrHAS7eipfbHXydveCegDcYjFlhsmllEDioW9sdWW2MfF1Oe7QN2garjO 3cQovvPoI11C0HF58M1o1oBd7aQcW0GlEvDF8ywAcOeg/qqsw9kv6IEQP+mr4vy+e6M6ZY 3Fro1vYx6TggUO+cG5xI3OiDyjyeqMriLjSPPNaduXFlo0Ok+ZeEZfPjptYKsMGR/8OcaS 3hQHIK8d2RSRDTqluIrQ0qsHpvMPc6hBfQHlrbJlQ4RR2u9JEvigCoeucrD1Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cfIILmeznote8oFR8wxEhNkiMiVM07ncqu4kcpPesys=; b=LqlhfHEkKWhJaVTrGalSMoO8NczXQO9cnwY7hxAVNMzWLjEZORDe67YW0zRAC2kI2HNZJy xDltrQiWYS8KUU2IBWzJ1wwpeVtxsH3mbipOYgwsccFNPy+5UsqHnoBi6SOuo2vVl+fCE8 dAZ+PZv69LfL/0qha1L/hSeCtS4yOEMrTj7m1YGhXtFvESknmY/itHoJMN27ozs4PR3ydF EwZG7Oe92ALYvVow717d6dCXkqPPzJqvlRmYO9rNYIdcR60uCxMTxWnnZOvyPxORrVn5ip mKbgFJ7kiM9EpWnVAhlVVLniGMDT50+8fO15Xz0sR1u+Kjry3I3dSSwMomK02Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ22f2xzsRV for ; Mon, 30 Mar 2026 17:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41f04 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 17:15:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5bc64b7d417d - main - msun/x86: convert rest of the extern inline fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bc64b7d417dd1f105755e093f8e807bcdc2a666 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 17:15:38 +0000 Message-Id: <69caafba.41f04.6cb73a9a@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5bc64b7d417dd1f105755e093f8e807bcdc2a666 commit 5bc64b7d417dd1f105755e093f8e807bcdc2a666 Author: Konstantin Belousov AuthorDate: 2026-03-28 22:36:55 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-30 16:57:00 +0000 msun/x86: convert rest of the extern inline fenv functions to proper linkage namely fegetexceptflag(3) fetestexcept(3) fesetround(3) fegetround(3) fesetenv(3) Same as it was done in f39754d51b7dc65c4cf9f for feclearexcept(3). PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 --- lib/msun/amd64/fenv.c | 32 +++++++++++++++++++++++++++----- lib/msun/i387/fenv.c | 32 +++++++++++++++++++++++++++----- lib/msun/x86/fenv.h | 29 ++++++++++++++++++++--------- 3 files changed, 74 insertions(+), 19 deletions(-) diff --git a/lib/msun/amd64/fenv.c b/lib/msun/amd64/fenv.c index cd3b83d11585..5dd122cf457c 100644 --- a/lib/msun/amd64/fenv.c +++ b/lib/msun/amd64/fenv.c @@ -52,7 +52,11 @@ int return (__feclearexcept_int(excepts)); } -extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +int +(fegetexceptflag)(fexcept_t *flagp, int excepts) +{ + return (__fegetexceptflag_int(flagp, excepts)); +} int fesetexceptflag(const fexcept_t *flagp, int excepts) @@ -82,9 +86,23 @@ feraiseexcept(int excepts) return (0); } -extern inline int fetestexcept(int __excepts); -extern inline int fegetround(void); -extern inline int fesetround(int __round); +int +(fetestexcept)(int excepts) +{ + return (__fetestexcept_int(excepts)); +} + +int +(fegetround)(void) +{ + return (__fegetround_int()); +} + +int +(fesetround)(int round) +{ + return (__fesetround_int(round)); +} int fegetenv(fenv_t *envp) @@ -115,7 +133,11 @@ feholdexcept(fenv_t *envp) return (0); } -extern inline int fesetenv(const fenv_t *__envp); +int +(fesetenv)(const fenv_t *envp) +{ + return (__fesetenv_int(envp)); +} int feupdateenv(const fenv_t *envp) diff --git a/lib/msun/i387/fenv.c b/lib/msun/i387/fenv.c index e0485a3597f6..d3cdc2e1cafb 100644 --- a/lib/msun/i387/fenv.c +++ b/lib/msun/i387/fenv.c @@ -94,7 +94,11 @@ int return (__feclearexcept_int(excepts)); } -extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +int +(fegetexceptflag)(fexcept_t *flagp, int excepts) +{ + return (__fegetexceptflag_int(flagp, excepts)); +} int fesetexceptflag(const fexcept_t *flagp, int excepts) @@ -127,9 +131,23 @@ feraiseexcept(int excepts) return (0); } -extern inline int fetestexcept(int __excepts); -extern inline int fegetround(void); -extern inline int fesetround(int __round); +int +(fetestexcept)(int excepts) +{ + return (__fetestexcept_int(excepts)); +} + +int +(fegetround)(void) +{ + return (__fegetround_int()); +} + +int +(fesetround)(int round) +{ + return (__fesetround_int(round)); +} int fegetenv(fenv_t *envp) @@ -166,7 +184,11 @@ feholdexcept(fenv_t *envp) return (0); } -extern inline int fesetenv(const fenv_t *__envp); +int +(fesetenv)(const fenv_t *envp) +{ + return (__fesetenv_int(envp)); +} int feupdateenv(const fenv_t *envp) diff --git a/lib/msun/x86/fenv.h b/lib/msun/x86/fenv.h index b806222e5ef6..b5da37902083 100644 --- a/lib/msun/x86/fenv.h +++ b/lib/msun/x86/fenv.h @@ -108,7 +108,7 @@ int feraiseexcept(int __excepts); int feupdateenv(const fenv_t *__envp); __fenv_static inline int -fegetround(void) +__fegetround_int(void) { __uint16_t __control; @@ -144,7 +144,18 @@ fegetexcept(void) #endif /* __BSD_VISIBLE */ int feclearexcept(int); +int fegetexceptflag(fexcept_t *, int); +int fetestexcept(int); +int fesetround(int); +int fegetround(void); +int fesetenv(const fenv_t *); + #define feclearexcept(a) __feclearexcept_int(a) +#define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) +#define fetestexcept(a) __fetestexcept_int(a) +#define fesetround(a) __fesetround_int(a) +#define fegetround() __fegetround_int() +#define fesetenv(a) __fesetenv_int(a) #ifdef __i386__ @@ -188,7 +199,7 @@ __feclearexcept_int(int __excepts) } __fenv_static inline int -fegetexceptflag(fexcept_t *__flagp, int __excepts) +__fegetexceptflag_int(fexcept_t *__flagp, int __excepts) { __uint32_t __mxcsr; __uint16_t __status; @@ -203,7 +214,7 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts) } __fenv_static inline int -fetestexcept(int __excepts) +__fetestexcept_int(int __excepts) { __uint32_t __mxcsr; __uint16_t __status; @@ -217,7 +228,7 @@ fetestexcept(int __excepts) } __fenv_static inline int -fesetround(int __round) +__fesetround_int(int __round) { __uint32_t __mxcsr; __uint16_t __control; @@ -241,7 +252,7 @@ fesetround(int __round) } __fenv_static inline int -fesetenv(const fenv_t *__envp) +__fesetenv_int(const fenv_t *__envp) { fenv_t __env = *__envp; __uint32_t __mxcsr; @@ -283,7 +294,7 @@ __feclearexcept_int(int __excepts) } __fenv_static inline int -fegetexceptflag(fexcept_t *__flagp, int __excepts) +__fegetexceptflag_int(fexcept_t *__flagp, int __excepts) { __uint32_t __mxcsr; __uint16_t __status; @@ -295,7 +306,7 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts) } __fenv_static inline int -fetestexcept(int __excepts) +__fetestexcept_int(int __excepts) { __uint32_t __mxcsr; __uint16_t __status; @@ -306,7 +317,7 @@ fetestexcept(int __excepts) } __fenv_static inline int -fesetround(int __round) +__fesetround_int(int __round) { __uint32_t __mxcsr; __uint16_t __control; @@ -328,7 +339,7 @@ fesetround(int __round) } __fenv_static inline int -fesetenv(const fenv_t *__envp) +__fesetenv_int(const fenv_t *__envp) { /* From nobody Mon Mar 30 17:15:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ35p7Bz6X5dR for ; Mon, 30 Mar 2026 17:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyZ33wfTz3TCf for ; Mon, 30 Mar 2026 17:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irhnqA48VuUR3EypiJthEMdPASI1p8BVV8UKUVCw60g=; b=I9mdDuw4q9BVjZC8ghWuMFuJL+BlcnDg5wzjV1OqaYKjn8bnmRaNpA19fVua0HNuVr1TAm qT8Qftdzmy0GT7waawQcSdtO3Ql2ATdk38nTf7nC4k4awkabMvjrYamqzdOv7+hcNn8tle Yj7ewl6LUfsgYTAKzT91zWy79ugOxHYL2IC2oeLBJVyoElXWTR/JxsdVSi7OIZ2d1xpxki UJdDtY8vwsea0F69sNzp7xgB0XYYbxSlTuMwkqQTEcXs9E/ubinRGKD64lrhJ8ha6ZcSCU pA5CQ9ksoXZLdF91OHTa3rZfEsQsZEx0M/CLeTxWasX5bvhm/lmB7+y9BvoB2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890939; a=rsa-sha256; cv=none; b=wji/bl2r+r7NzLtfL/HjrqLAxJT1zyYk4zFcPxHE5tBZIfoX6Fsm7BEEVq4qMHH50YcpbI gJkjcCFWDU66nDiX77v3qTjZowapUtfEgOzTOBL6xiWpEGnacfrOAd19a0YvZNULbVFDcH 5TcOHN6SC8gVBpHfvzvL+jfFbVYSEKSqL1UdDpcVprDI+pJI+f9WMhqlBcXoBg3vbDeOIC z1hZDyxsqxlPLUcePYog60ZR9OWAs06IrmPs92vvQR1KSn26aM4uQ4/v3SDcPPenhehQQ1 +RJtQWObFrCVafcoQQBa39uXzqYy12IG9xeB85BUOVtRieRu6pFkR2tbzZMMDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irhnqA48VuUR3EypiJthEMdPASI1p8BVV8UKUVCw60g=; b=NWDHMZPd5YTJPQlnGOSn35sv4CBIClt/cCih23tUzuJzoXNMXnbcQxy9CauWsF8K7nn0yu LijARloW39x7cYJHCyTPpHcwPOS5PpSGITZdVr90JYAoamfqoZTzu86wplMiPC1NnHrohD TulrY4u3M7YsnEuGSJ9SzZDP07g9Q30aFzETkqPP6DQHXdm8jgNr7cHRLQuuwP95IFXlh3 xPx63/xqCqRJo03aoLn4lfV5DfWoNbFVsZw8iQ7Kp5HfBRHHBRMqXE7jJXyfqrAsA0Y7jN jwOpJi6y44RMOcBDdcmGbBujs3LaVhCjuH4gfp8fMjL4K0/mnbXKoXdkD77Dwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ33Qg8zsBM for ; Mon, 30 Mar 2026 17:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 408c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 17:15:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3a01e1e1a50c - main - msun/aarch64: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a01e1e1a50cb9a9594aac2148dc920a6b295428 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 17:15:39 +0000 Message-Id: <69caafbb.408c4.7b20a1e1@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3a01e1e1a50cb9a9594aac2148dc920a6b295428 commit 3a01e1e1a50cb9a9594aac2148dc920a6b295428 Author: Konstantin Belousov AuthorDate: 2026-03-28 23:13:44 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-30 16:57:00 +0000 msun/aarch64: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 --- lib/msun/aarch64/fenv.c | 72 ++++++++++++++++++++++++++++++++++++++++--------- lib/msun/aarch64/fenv.h | 41 +++++++++++++++++++++------- 2 files changed, 90 insertions(+), 23 deletions(-) diff --git a/lib/msun/aarch64/fenv.c b/lib/msun/aarch64/fenv.c index 4c54656be7d3..5d626f66516f 100644 --- a/lib/msun/aarch64/fenv.c +++ b/lib/msun/aarch64/fenv.c @@ -44,16 +44,62 @@ int return (__feclearexcept_int(excepts)); } -extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); -extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); -extern inline int feraiseexcept(int __excepts); -extern inline int fetestexcept(int __excepts); -extern inline int fegetround(void); -extern inline int fesetround(int __round); -extern inline int fegetenv(fenv_t *__envp); -extern inline int feholdexcept(fenv_t *__envp); -extern inline int fesetenv(const fenv_t *__envp); -extern inline int feupdateenv(const fenv_t *__envp); -extern inline int feenableexcept(int __mask); -extern inline int fedisableexcept(int __mask); -extern inline int fegetexcept(void); +int +(fegetexceptflag)(fexcept_t *flagp, int excepts) +{ + return (__fegetexceptflag_int(flagp, excepts)); +} + +int +(fesetexceptflag)(const fexcept_t *flagp, int excepts) +{ + return (__fesetexceptflag_int(flagp, excepts)); +} + +int +(feraiseexcept)(int excepts) +{ + return (__feraiseexcept_int(excepts)); +} + +int +(fetestexcept)(int excepts) +{ + return (__fetestexcept_int(excepts)); +} + +int +(fegetround)(void) +{ + return (__fegetround_int()); +} + +int +(fesetround)(int round) +{ + return (__fesetround_int(round)); +} + +int +(fegetenv)(fenv_t *envp) +{ + return (__fegetenv_int(envp)); +} + +int +(feholdexcept)(fenv_t *envp) +{ + return (__feholdexcept_int(envp)); +} + +int +(fesetenv)(const fenv_t *envp) +{ + return (__fesetenv_int(envp)); +} + +int +(feupdateenv)(const fenv_t *envp) +{ + return (__feupdateenv_int(envp)); +} diff --git a/lib/msun/aarch64/fenv.h b/lib/msun/aarch64/fenv.h index d125978b887b..32a03ee1eb49 100644 --- a/lib/msun/aarch64/fenv.h +++ b/lib/msun/aarch64/fenv.h @@ -82,7 +82,28 @@ extern const fenv_t __fe_dfl_env; #define __msr_fpsr(__r) __asm __volatile("msr fpsr, %0" : : "r" (__r)) int feclearexcept(int); +int fegetexceptflag(fexcept_t *, int); +int fesetexceptflag(const fexcept_t *, int); +int feraiseexcept(int); +int fetestexcept(int); +int fegetround(void); +int fesetround(int); +int fegetenv(fenv_t *); +int feholdexcept(fenv_t *); +int fesetenv(const fenv_t *); +int feupdateenv(const fenv_t *); + #define feclearexcept(a) __feclearexcept_int(a) +#define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) +#define fesetexceptflag(e, a) __fesetexceptflag_int(e, a) +#define feraiseexcept(a) __feraiseexcept_int(a) +#define fetestexcept(a) __fetestexcept_int(a) +#define fegetround() __fegetround_int() +#define fesetround(a) __fesetround_int(a) +#define fegetenv(e) __fegetenv_int(e) +#define feholdexcept(e) __feholdexcept_int(e) +#define fesetenv(e) __fesetenv_int(e) +#define feupdateenv(e) __feupdateenv_int(e) __fenv_static inline int __feclearexcept_int(int __excepts) @@ -96,7 +117,7 @@ __feclearexcept_int(int __excepts) } __fenv_static inline int -fegetexceptflag(fexcept_t *__flagp, int __excepts) +__fegetexceptflag_int(fexcept_t *__flagp, int __excepts) { fexcept_t __r; @@ -106,7 +127,7 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts) } __fenv_static inline int -fesetexceptflag(const fexcept_t *__flagp, int __excepts) +__fesetexceptflag_int(const fexcept_t *__flagp, int __excepts) { fexcept_t __r; @@ -118,7 +139,7 @@ fesetexceptflag(const fexcept_t *__flagp, int __excepts) } __fenv_static inline int -feraiseexcept(int __excepts) +__feraiseexcept_int(int __excepts) { fexcept_t __r; @@ -129,7 +150,7 @@ feraiseexcept(int __excepts) } __fenv_static inline int -fetestexcept(int __excepts) +__fetestexcept_int(int __excepts) { fexcept_t __r; @@ -138,7 +159,7 @@ fetestexcept(int __excepts) } __fenv_static inline int -fegetround(void) +__fegetround_int(void) { fenv_t __r; @@ -147,7 +168,7 @@ fegetround(void) } __fenv_static inline int -fesetround(int __round) +__fesetround_int(int __round) { fenv_t __r; @@ -161,7 +182,7 @@ fesetround(int __round) } __fenv_static inline int -fegetenv(fenv_t *__envp) +__fegetenv_int(fenv_t *__envp) { __uint64_t fpcr; __uint64_t fpsr; @@ -174,7 +195,7 @@ fegetenv(fenv_t *__envp) } __fenv_static inline int -feholdexcept(fenv_t *__envp) +__feholdexcept_int(fenv_t *__envp) { fenv_t __r; @@ -191,7 +212,7 @@ feholdexcept(fenv_t *__envp) } __fenv_static inline int -fesetenv(const fenv_t *__envp) +__fesetenv_int(const fenv_t *__envp) { __msr_fpcr((*__envp) >> 32); @@ -200,7 +221,7 @@ fesetenv(const fenv_t *__envp) } __fenv_static inline int -feupdateenv(const fenv_t *__envp) +__feupdateenv_int(const fenv_t *__envp) { fexcept_t __r; From nobody Mon Mar 30 17:15:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ5045jz6X5R0 for ; Mon, 30 Mar 2026 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyZ44kqbz3TT5 for ; Mon, 30 Mar 2026 17:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oNQ+mfUgFVnyIz+3WapqV7Z3Ku9eGDCm1z1ebHBCYbo=; b=VuW+lJ6fGSIgszYG8zrRikwUjQ7+OY1Ns8/grrikOJLwsAUXxnzvnZqaRR3bsBw6rH4Dum ulhQLFC0Z3YGl5gbl7yL6J3MElxeLdJPDCYjrXLs2re/xBDRHMxVVybqe1XsWuxKVWsqmM AS6qaw4Bj3CFoAe0hhItrytS/y0kLjR8fcFGktfInG7TWt13hLv7uyOoYq+oTi8lFfCiP2 fKX+mdJmH00w0RLAlLkYEeUxtW4HgsPaMOK9AJ+Id/GPXdeZdwYRxfGrqxkLWidmvJtxBw Efxn3rjU+KUbm9pdgadopwyM2Q7KKVW26gVrzUB8UzZIpeuWjtsbm3VRkhbCYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890940; a=rsa-sha256; cv=none; b=P10MpaYJfoCOhlEJxyPRr7Iub5tlUUsVmbZjvoyzuJ63eA0H4zFktd0ND2oIvm+effITpT cqG7Zw94cV3eOlxwYaisoH4IQX5FiCzx2BhQ96HNUO0l2JzqDwXdH6JulVYeCnFbrm/Rn2 XQjmVRfOHw4iu90TtcT0daJnmCYqZIgHpzNlo2bceTL+hgOFfGHJiMspfRhykxljiC0tGD zyA7DXdjzQYhDpugPoNRrsct5HZ4sW0jARjR4EmWVOx2BzIzboyYcd8qo7+5fSYRgXmn93 3fcU0ihUAR+gvfgI7/HyuD4auyS/jIf1erXxq9HyynKIOJuB4HKwkPYVa90ElQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oNQ+mfUgFVnyIz+3WapqV7Z3Ku9eGDCm1z1ebHBCYbo=; b=sHQ8NuXB+PsVsTKN88ejafNorLj0G3wVhQpTOj7piPpdVJsrJJe6SZFCRXDmYdI0JNKuvE haj03KMsizQawuS9W0ywiEXdSbSkGHlOYPUqHeJTIVU2vx92GXsjtLaPfs65j+IFTiGTUO e11dTFEF/Vp/9/LlAP0izTqyiLNNHwzmE/u2T6FdGCm1mLdpzaL5AbbBGlpTpM/rhbIjUU k9cK13VPICJvu14fYPByqpHgNGIvn8HmiDRlwi5HEpN8eCYrXUYdSJLrJHUF16oNDDpvR1 bCxDaxyJY+r1c+KbcLClziNFDdnqsSY1N2dSSrcB0CYdnjULXi+rs46KUPnvOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ44FKjzsGf for ; Mon, 30 Mar 2026 17:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41a15 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 17:15:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6b89f5360f84 - main - msun/riscv: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b89f5360f8441ffd1a3e8db7375ed3ccdba7d2a Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 17:15:40 +0000 Message-Id: <69caafbc.41a15.30d6ab0d@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6b89f5360f8441ffd1a3e8db7375ed3ccdba7d2a commit 6b89f5360f8441ffd1a3e8db7375ed3ccdba7d2a Author: Konstantin Belousov AuthorDate: 2026-03-29 01:27:30 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-30 16:57:01 +0000 msun/riscv: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 --- lib/msun/riscv/fenv.c | 84 +++++++++++++++++++++++++++++++++++++++++++-------- lib/msun/riscv/fenv.h | 51 +++++++++++++++++++++++-------- 2 files changed, 110 insertions(+), 25 deletions(-) diff --git a/lib/msun/riscv/fenv.c b/lib/msun/riscv/fenv.c index 4d1b2cb2f611..1f1f8eddc2d6 100644 --- a/lib/msun/riscv/fenv.c +++ b/lib/msun/riscv/fenv.c @@ -43,16 +43,74 @@ int return (__feclearexcept_int(excepts)); } -extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); -extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); -extern inline int feraiseexcept(int __excepts); -extern inline int fetestexcept(int __excepts); -extern inline int fegetround(void); -extern inline int fesetround(int __round); -extern inline int fegetenv(fenv_t *__envp); -extern inline int feholdexcept(fenv_t *__envp); -extern inline int fesetenv(const fenv_t *__envp); -extern inline int feupdateenv(const fenv_t *__envp); -extern inline int feenableexcept(int __mask); -extern inline int fedisableexcept(int __mask); -extern inline int fegetexcept(void); +int +(fegetexceptflag)(fexcept_t *flagp, int excepts) +{ + return (__fegetexceptflag_int(flagp, excepts)); +} + +int +(fesetexceptflag)(const fexcept_t *flagp, int excepts) +{ + return (__fesetexceptflag_int(flagp, excepts)); +} + +int +(feraiseexcept)(int excepts) +{ + return (__feraiseexcept_int(excepts)); +} + +int +(fetestexcept)(int excepts) +{ + return (__fetestexcept_int(excepts)); +} + +int +(fegetround)(void) +{ + return (__fegetround_int()); +} + +int +(fesetround)(int round) +{ + return (__fesetround_int(round)); +} + +int +(fegetenv)(fenv_t *envp) +{ + return (__fegetenv_int(envp)); +} + +int +(feholdexcept)(fenv_t *envp) +{ + return (__feholdexcept_int(envp)); +} + +int +(fesetenv)(const fenv_t *envp) +{ + return (__fesetenv_int(envp)); +} + +int +(feupdateenv)(const fenv_t *envp) +{ + return (__feupdateenv_int(envp)); +} + +int +(feenableexcept)(int mask) +{ + return (__feenableexcept_int(mask)); +} + +int +(fedisableexcept)(int mask) +{ + return (__fedisableexcept_int(mask)); +} diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h index 4e8f81aa04c1..1059744941f3 100644 --- a/lib/msun/riscv/fenv.h +++ b/lib/msun/riscv/fenv.h @@ -80,7 +80,28 @@ extern const fenv_t __fe_dfl_env; #define __wfs(__fcsr) __asm __volatile("csrw fcsr, %0" :: "r" (__fcsr)) int feclearexcept(int); +int fegetexceptflag(fexcept_t *, int); +int fesetexceptflag(const fexcept_t *, int); +int feraiseexcept(int); +int fetestexcept(int); +int fegetround(void); +int fesetround(int); +int fegetenv(fenv_t *); +int feholdexcept(fenv_t *); +int fesetenv(const fenv_t *); +int feupdateenv(const fenv_t *); + #define feclearexcept(a) __feclearexcept_int(a) +#define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) +#define fesetexceptflag(e, a) __fesetexceptflag_int(e, a) +#define feraiseexcept(a) __feraiseexcept_int(a) +#define fetestexcept(a) __fetestexcept_int(a) +#define fegetround() __fegetround_int() +#define fesetround(a) __fesetround_int(a) +#define fegetenv(e) __fegetenv_int(e) +#define feholdexcept(e) __feholdexcept_int(e) +#define fesetenv(e) __fesetenv_int(e) +#define feupdateenv(e) __feupdateenv_int(e) __fenv_static inline int __feclearexcept_int(int __excepts) @@ -92,7 +113,7 @@ __feclearexcept_int(int __excepts) } __fenv_static inline int -fegetexceptflag(fexcept_t *__flagp, int __excepts) +__fegetexceptflag_int(fexcept_t *__flagp, int __excepts) { fexcept_t __fcsr; @@ -103,7 +124,7 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts) } __fenv_static inline int -fesetexceptflag(const fexcept_t *__flagp, int __excepts) +__fesetexceptflag_int(const fexcept_t *__flagp, int __excepts) { fexcept_t __fcsr; @@ -115,7 +136,7 @@ fesetexceptflag(const fexcept_t *__flagp, int __excepts) } __fenv_static inline int -feraiseexcept(int __excepts) +__feraiseexcept_int(int __excepts) { __asm __volatile("csrs fflags, %0" :: "r"(__excepts)); @@ -124,7 +145,7 @@ feraiseexcept(int __excepts) } __fenv_static inline int -fetestexcept(int __excepts) +__fetestexcept_int(int __excepts) { fexcept_t __fcsr; @@ -134,7 +155,7 @@ fetestexcept(int __excepts) } __fenv_static inline int -fegetround(void) +__fegetround_int(void) { fexcept_t __fcsr; @@ -144,7 +165,7 @@ fegetround(void) } __fenv_static inline int -fesetround(int __round) +__fesetround_int(int __round) { fexcept_t __fcsr; @@ -160,7 +181,7 @@ fesetround(int __round) } __fenv_static inline int -fegetenv(fenv_t *__envp) +__fegetenv_int(fenv_t *__envp) { __rfs(*__envp); @@ -169,7 +190,7 @@ fegetenv(fenv_t *__envp) } __fenv_static inline int -feholdexcept(fenv_t *__envp __unused) +__feholdexcept_int(fenv_t *__envp __unused) { /* No exception traps. */ @@ -178,7 +199,7 @@ feholdexcept(fenv_t *__envp __unused) } __fenv_static inline int -fesetenv(const fenv_t *__envp) +__fesetenv_int(const fenv_t *__envp) { __wfs(*__envp); @@ -187,7 +208,7 @@ fesetenv(const fenv_t *__envp) } __fenv_static inline int -feupdateenv(const fenv_t *__envp) +__feupdateenv_int(const fenv_t *__envp) { fexcept_t __fcsr; @@ -200,8 +221,14 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE +int feenableexcept(int); +int fedisableexcept(int); + +#define feenableexcept(a) __feenableexcept_int(a) +#define fedisableexcept(a) __fedisableexcept_int(a) + __fenv_static inline int -feenableexcept(int __mask __unused) +__feenableexcept_int(int __mask __unused) { /* No exception traps. */ @@ -210,7 +237,7 @@ feenableexcept(int __mask __unused) } __fenv_static inline int -fedisableexcept(int __mask __unused) +__fedisableexcept_int(int __mask __unused) { /* No exception traps. */ From nobody Mon Mar 30 17:15:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ62fxSz6X5Wm for ; Mon, 30 Mar 2026 17:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyZ55TKsz3TQs for ; Mon, 30 Mar 2026 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3yOXkQVdxqoWfLrDNogpWj6t8JR0ViApXNlFQwVmpq8=; b=boscmRD1CO8xwWYhwCxqOkKW06j7C8HXOfmZCnLsPVxPWFM3Jxg09fQnsF69d8mPXc12Gy AldUxrGUlSMUTnY47ltxdKDZAS5eCBQlWZ3qbuE2a9UGlEV0LI6qW6oHUTVlnfmleUmsEN oC9rcn72tIeWRbkgKGZHgxUktvjE/nvZ9dzwkhw8jcFzndzWf0KBUtCrsraPA1q7S0AX/0 w5ogTdmlKcxP2Ifzub3ffTsYRbitD2V+JWs/2KUecXAfBmeignT8ahZGC+ewaxoc5Vx8XG DE9QtL5J5YPb22hKc3/Nnp3CQMw5O7xY4bUhdSO+dNju2Vn1JIPKrXGkqnLXWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890941; a=rsa-sha256; cv=none; b=V6qbwFzGFyeaIoA4mKJ2J7GVYNDm5j3QTn4IK7uDZdUSHLNBOGcuE5TfEFTn4gooOAZYV4 zYCGyAp/fSsKVaiy0Sx4grfQwcyao/O71KuNGpl6CF0ObbkWJjttMio6CYsxbgc1U9sDNT 7YDMTGBNZ5pJcG9jHnL2dUAWdDKhSVunEg1fxyrtT10xb9ZVgMyoCccwzP8tkNRLKBKtJB U8HxBrgnJpd3PY/9VHkSmIpMjfJzCAWYQM8rKsrgU9SWeZW2N29NV0eIB/QLXuSLJrNDd5 CQmXOikPTXi03v8EX17pCsCalMmpOkpo+65B+EJP+1v8DUQ4UCCHKZvDD7GV1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3yOXkQVdxqoWfLrDNogpWj6t8JR0ViApXNlFQwVmpq8=; b=O1vGZwzu7BqmsEMbGZajnl8pzgFWDN6I3wxESRMgDUzUEw+tx+1PNNnACQO/bKkQktd7IS pJQJKWyD6071vkd1v0VHEgr44WRwJ45hmhPUIZupLJqC23uU9UnwOsiWl17OWVJlvqR/K3 HRa630e2qPhsHmx0lhVVxgQaxEEJZR/FcSuBVXYFRWPLrsONqUa57QhO2mou6uCF7k4H3+ nKiPvC1BrAkJeAFSfqmuuomziKVaOpqfBjozz0CWVU5/+1s47jlHLFBWAHYBteIN9vflN/ KhUnFZouVsxBVpiXMGfFiFfpQcVRs486IRBsWLpXfKOp+Zol1X/2TUPfsO/rCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ54kD1zsGg for ; Mon, 30 Mar 2026 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41bed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 17:15:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e4505a58a77f - main - msun/powerpc: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4505a58a77f6f4f2df60d26ea99710af6c6b3cf Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 17:15:41 +0000 Message-Id: <69caafbd.41bed.3c70cfd0@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e4505a58a77f6f4f2df60d26ea99710af6c6b3cf commit e4505a58a77f6f4f2df60d26ea99710af6c6b3cf Author: Konstantin Belousov AuthorDate: 2026-03-29 02:06:02 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-30 16:57:01 +0000 msun/powerpc: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 --- lib/msun/powerpc/fenv.c | 83 ++++++++++++++++++++++++++++++++++++++++++------- lib/msun/powerpc/fenv.h | 51 +++++++++++++++++++++++------- 2 files changed, 110 insertions(+), 24 deletions(-) diff --git a/lib/msun/powerpc/fenv.c b/lib/msun/powerpc/fenv.c index bcf78d5c096e..d1926155d087 100644 --- a/lib/msun/powerpc/fenv.c +++ b/lib/msun/powerpc/fenv.c @@ -41,15 +41,74 @@ int return (__feclearexcept_int(excepts)); } -extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); -extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); -extern inline int feraiseexcept(int __excepts); -extern inline int fetestexcept(int __excepts); -extern inline int fegetround(void); -extern inline int fesetround(int __round); -extern inline int fegetenv(fenv_t *__envp); -extern inline int feholdexcept(fenv_t *__envp); -extern inline int fesetenv(const fenv_t *__envp); -extern inline int feupdateenv(const fenv_t *__envp); -extern inline int feenableexcept(int __mask); -extern inline int fedisableexcept(int __mask); +int +(fegetexceptflag)(fexcept_t *flagp, int excepts) +{ + return (__fegetexceptflag_int(flagp, excepts)); +} + +int +(fesetexceptflag)(const fexcept_t *flagp, int excepts) +{ + return (__fesetexceptflag_int(flagp, excepts)); +} + +int +(feraiseexcept)(int excepts) +{ + return (__feraiseexcept_int(excepts)); +} + +int +(fetestexcept)(int excepts) +{ + return (__fetestexcept_int(excepts)); +} + +int +(fegetround)(void) +{ + return (__fegetround_int()); +} + +int +(fesetround)(int round) +{ + return (__fesetround_int(round)); +} + +int +(fegetenv)(fenv_t *envp) +{ + return (__fegetenv_int(envp)); +} + +int +(feholdexcept)(fenv_t *envp) +{ + return (__feholdexcept_int(envp)); +} + +int +(fesetenv)(const fenv_t *envp) +{ + return (__fesetenv_int(envp)); +} + +int +(feupdateenv)(const fenv_t *envp) +{ + return (__feupdateenv_int(envp)); +} + +int +(feenableexcept)(int mask) +{ + return (__feenableexcept_int(mask)); +} + +int +(fedisableexcept)(int mask) +{ + return (__fedisableexcept_int(mask)); +} diff --git a/lib/msun/powerpc/fenv.h b/lib/msun/powerpc/fenv.h index 74a71ef39e5a..f6fb354470c7 100644 --- a/lib/msun/powerpc/fenv.h +++ b/lib/msun/powerpc/fenv.h @@ -112,7 +112,28 @@ union __fpscr { }; int feclearexcept(int); +int fegetexceptflag(fexcept_t *, int); +int fesetexceptflag(const fexcept_t *, int); +int feraiseexcept(int); +int fetestexcept(int); +int fegetround(void); +int fesetround(int); +int fegetenv(fenv_t *); +int feholdexcept(fenv_t *); +int fesetenv(const fenv_t *); +int feupdateenv(const fenv_t *); + #define feclearexcept(a) __feclearexcept_int(a) +#define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) +#define fesetexceptflag(e, a) __fesetexceptflag_int(e, a) +#define feraiseexcept(a) __feraiseexcept_int(a) +#define fetestexcept(a) __fetestexcept_int(a) +#define fegetround() __fegetround_int() +#define fesetround(a) __fesetround_int(a) +#define fegetenv(e) __fegetenv_int(e) +#define feholdexcept(e) __feholdexcept_int(e) +#define fesetenv(e) __fesetenv_int(e) +#define feupdateenv(e) __feupdateenv_int(e) __fenv_static inline int __feclearexcept_int(int __excepts) @@ -128,7 +149,7 @@ __feclearexcept_int(int __excepts) } __fenv_static inline int -fegetexceptflag(fexcept_t *__flagp, int __excepts) +__fegetexceptflag_int(fexcept_t *__flagp, int __excepts) { union __fpscr __r; @@ -138,7 +159,7 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts) } __fenv_static inline int -fesetexceptflag(const fexcept_t *__flagp, int __excepts) +__fesetexceptflag_int(const fexcept_t *__flagp, int __excepts) { union __fpscr __r; @@ -152,7 +173,7 @@ fesetexceptflag(const fexcept_t *__flagp, int __excepts) } __fenv_static inline int -feraiseexcept(int __excepts) +__feraiseexcept_int(int __excepts) { union __fpscr __r; @@ -165,7 +186,7 @@ feraiseexcept(int __excepts) } __fenv_static inline int -fetestexcept(int __excepts) +__fetestexcept_int(int __excepts) { union __fpscr __r; @@ -174,7 +195,7 @@ fetestexcept(int __excepts) } __fenv_static inline int -fegetround(void) +__fegetround_int(void) { union __fpscr __r; @@ -183,7 +204,7 @@ fegetround(void) } __fenv_static inline int -fesetround(int __round) +__fesetround_int(int __round) { union __fpscr __r; @@ -197,7 +218,7 @@ fesetround(int __round) } __fenv_static inline int -fegetenv(fenv_t *__envp) +__fegetenv_int(fenv_t *__envp) { union __fpscr __r; @@ -207,7 +228,7 @@ fegetenv(fenv_t *__envp) } __fenv_static inline int -feholdexcept(fenv_t *__envp) +__feholdexcept_int(fenv_t *__envp) { union __fpscr __r; @@ -219,7 +240,7 @@ feholdexcept(fenv_t *__envp) } __fenv_static inline int -fesetenv(const fenv_t *__envp) +__fesetenv_int(const fenv_t *__envp) { union __fpscr __r; @@ -229,7 +250,7 @@ fesetenv(const fenv_t *__envp) } __fenv_static inline int -feupdateenv(const fenv_t *__envp) +__feupdateenv_int(const fenv_t *__envp) { union __fpscr __r; @@ -242,8 +263,14 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE +int feenableexcept(int); +int fedisableexcept(int); + +#define feenableexcept(a) __feenableexcept_int(a) +#define fedisableexcept(a) __fedisableexcept_int(a) + __fenv_static inline int -feenableexcept(int __mask) +__feenableexcept_int(int __mask) { union __fpscr __r; fenv_t __oldmask; @@ -256,7 +283,7 @@ feenableexcept(int __mask) } __fenv_static inline int -fedisableexcept(int __mask) +__fedisableexcept_int(int __mask) { union __fpscr __r; fenv_t __oldmask; From nobody Mon Mar 30 17:15:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ714Fmz6X5mj for ; Mon, 30 Mar 2026 17:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyZ65n15z3TTT for ; Mon, 30 Mar 2026 17:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMcmYOrnnO6VnIq/saRBqzFvb9fVyYNQQreyfZH9si4=; b=W7BHeea9br/XubEHjIyjsK9Q5xWnol1hUF2RnDULQA+0apih3K6aeyhSyYFjnx1kHpJdgN E9BtQ9IBQ8AHJlW6ZEy3SehMMSeekPsIpR5KmBW16KtWAvXOFUVHKvxEzzyxH+oH5il0iw 2JL5hivemCwaKNUzFjGuKgAdZdSs44VzBkRk/vfg2VF3dcH8x/iCxIYAnsQGLaDkAjiMCR pMVu2oovyGEbynx4SLTUWpo3W3zvedSZ8Sq7SvaUX7ZocI+vDE5XjW2PdawJEABZPWE4aG HQfReIV7rPMzlP4I3Uz7Te6xZae3R+N9ala/aDbzejftM1NX6ZWHNPNfMuuNIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890942; a=rsa-sha256; cv=none; b=PCD7m1jt2dftS+J4BxqNLk1/toEl3vq9hbzaa9g2GPuNqys9xtvey8nGpuPpPUqLfsIR/l zGG3reh+3ZqPOipfPApkfYlVU/y984GtYXWj8rQ6kK+AeJBOXftOGdQWKYlhSSljF43otD tfAaNJkNezrcQknNt8Tr0yURRAI799J/wD9jxjOjeM382UgrhC2PNKPIeEMqArt7KUZpID txYm/fP2U3COPdDQNDtV8oWtbjctlP0nKo1M328VDJoLcIHZ4nHuqQSAggwycwXLzoUfTx vedweffxK6P/Rpj46ExwfgUMWoeCjZRpHudDHRIDwu/HPXpCG3uowFQzSIxdBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMcmYOrnnO6VnIq/saRBqzFvb9fVyYNQQreyfZH9si4=; b=j709bTFmhnY7GiTn5z49FW/QapHzexqMX5Knr+Yl6HGBbgfgFzUS1GlyGlOvxW42abC3XT k51M8rSDu9rXAx29yM7tMsVaczJ/PAHuzns8kpvgbIg9QGnu8yiEt5b8mETFd8zPyn8DAz AeRnj5U27bZmRDeFgyp3+Kvu02wFAj0YfkGw+FS1Ql0fbPr7mF/ycridDpg59DtM8ylztg GrqvcYKpJEOUhnoQPkcSjzew21F5QHxQ2pNbEzHEBozfkakr92VH9tT60txHNpc/nGr8Oj X++uKP5d/LeXtsHNgu1yqr5U9gozjdVT6w4VMqZfMWkox6VdDVjrUGOdqSzdAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ6563nzsBQ for ; Mon, 30 Mar 2026 17:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ff6d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 17:15:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 70674434e242 - main - msun/arm: convert fenv functions to proper linkage List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70674434e2424d61262322702d0415e54d8cc1a2 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 17:15:42 +0000 Message-Id: <69caafbe.3ff6d.6d944250@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=70674434e2424d61262322702d0415e54d8cc1a2 commit 70674434e2424d61262322702d0415e54d8cc1a2 Author: Konstantin Belousov AuthorDate: 2026-03-29 03:10:18 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-30 16:57:01 +0000 msun/arm: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 --- lib/msun/arm/fenv.c | 133 +++++++++++++++++++++++++++++++++++++++++----------- lib/msun/arm/fenv.h | 58 ++++++++++++++++++----- 2 files changed, 150 insertions(+), 41 deletions(-) diff --git a/lib/msun/arm/fenv.c b/lib/msun/arm/fenv.c index c8edf3fef037..620a05d51b90 100644 --- a/lib/msun/arm/fenv.c +++ b/lib/msun/arm/fenv.c @@ -76,19 +76,83 @@ int return (__feclearexcept_int(excepts)); } -extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); -extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); -extern inline int feraiseexcept(int __excepts); -extern inline int fetestexcept(int __excepts); -extern inline int fegetround(void); -extern inline int fesetround(int __round); -extern inline int fegetenv(fenv_t *__envp); -extern inline int feholdexcept(fenv_t *__envp); -extern inline int fesetenv(const fenv_t *__envp); -extern inline int feupdateenv(const fenv_t *__envp); -extern inline int feenableexcept(int __mask); -extern inline int fedisableexcept(int __mask); -extern inline int fegetexcept(void); +int +(fegetexceptflag)(fexcept_t *flagp, int excepts) +{ + return (__fegetexceptflag_int(flagp, excepts)); +} + +int +(fesetexceptflag)(const fexcept_t *flagp, int excepts) +{ + return (__fesetexceptflag_int(flagp, excepts)); +} + +int +(feraiseexcept)(int excepts) +{ + return (__feraiseexcept_int(excepts)); +} + +int +(fetestexcept)(int excepts) +{ + return (__fetestexcept_int(excepts)); +} + +int +(fegetround)(void) +{ + return (__fegetround_int()); +} + +int +(fesetround)(int round) +{ + return (__fesetround_int(round)); +} + +int +(fegetenv)(fenv_t *envp) +{ + return (__fegetenv_int(envp)); +} + +int +(feholdexcept)(fenv_t *envp) +{ + return (__feholdexcept_int(envp)); +} + +int +(fesetenv)(const fenv_t *envp) +{ + return (__fesetenv_int(envp)); +} + +int +(feupdateenv)(const fenv_t *envp) +{ + return (__feupdateenv_int(envp)); +} + +int +(feenableexcept)(int mask) +{ + return (__feenableexcept_int(mask)); +} + +int +(fedisableexcept)(int mask) +{ + return (__fedisableexcept_int(mask)); +} + +int +(fegetexcept)(void) +{ + return (__fegetexcept_int()); +} #else /* !FENV_MANGLE && SOFTFP_ABI */ /* Set by libc when the VFP unit is enabled */ @@ -158,7 +222,8 @@ __softfp_round_from_vfp(int round) } } -int feclearexcept(int __excepts) +int +(feclearexcept)(int __excepts) { if (_libc_arm_fpu_present) @@ -168,7 +233,8 @@ int feclearexcept(int __excepts) return (0); } -int fegetexceptflag(fexcept_t *__flagp, int __excepts) +int +(fegetexceptflag)(fexcept_t *__flagp, int __excepts) { fexcept_t __vfp_flagp; @@ -182,7 +248,8 @@ int fegetexceptflag(fexcept_t *__flagp, int __excepts) return (0); } -int fesetexceptflag(const fexcept_t *__flagp, int __excepts) +int +(fesetexceptflag)(const fexcept_t *__flagp, int __excepts) { if (_libc_arm_fpu_present) @@ -192,7 +259,8 @@ int fesetexceptflag(const fexcept_t *__flagp, int __excepts) return (0); } -int feraiseexcept(int __excepts) +int +(feraiseexcept)(int __excepts) { if (_libc_arm_fpu_present) @@ -202,7 +270,8 @@ int feraiseexcept(int __excepts) return (0); } -int fetestexcept(int __excepts) +int +(fetestexcept)(int __excepts) { int __got_excepts; @@ -214,7 +283,8 @@ int fetestexcept(int __excepts) return (__got_excepts); } -int fegetround(void) +int +(fegetround)(void) { if (_libc_arm_fpu_present) @@ -222,7 +292,8 @@ int fegetround(void) return __softfp_fegetround(); } -int fesetround(int __round) +int +(fesetround)(int __round) { if (_libc_arm_fpu_present) @@ -232,7 +303,8 @@ int fesetround(int __round) return (0); } -int fegetenv(fenv_t *__envp) +int +(fegetenv)(fenv_t *__envp) { fenv_t __vfp_envp; @@ -245,7 +317,8 @@ int fegetenv(fenv_t *__envp) return (0); } -int feholdexcept(fenv_t *__envp) +int +(feholdexcept)(fenv_t *__envp) { fenv_t __vfp_envp; @@ -258,7 +331,8 @@ int feholdexcept(fenv_t *__envp) return (0); } -int fesetenv(const fenv_t *__envp) +int +(fesetenv)(const fenv_t *__envp) { if (_libc_arm_fpu_present) @@ -268,7 +342,8 @@ int fesetenv(const fenv_t *__envp) return (0); } -int feupdateenv(const fenv_t *__envp) +int +(feupdateenv)(const fenv_t *__envp) { if (_libc_arm_fpu_present) @@ -278,7 +353,8 @@ int feupdateenv(const fenv_t *__envp) return (0); } -int feenableexcept(int __mask) +int +(feenableexcept)(int __mask) { int __unmasked; @@ -290,7 +366,8 @@ int feenableexcept(int __mask) return (__unmasked); } -int fedisableexcept(int __mask) +int +(fedisableexcept)(int __mask) { int __unmasked; @@ -302,7 +379,8 @@ int fedisableexcept(int __mask) return (__unmasked); } -int fegetexcept(void) +int +(fegetexcept)(void) { int __unmasked; @@ -315,4 +393,3 @@ int fegetexcept(void) } #endif - diff --git a/lib/msun/arm/fenv.h b/lib/msun/arm/fenv.h index 14638dd33aa7..78ca9ef0f589 100644 --- a/lib/msun/arm/fenv.h +++ b/lib/msun/arm/fenv.h @@ -112,7 +112,39 @@ int fegetexcept(void); #define _FPU_MASK_SHIFT 8 int feclearexcept(int); +int fegetexceptflag(fexcept_t *, int); +int fesetexceptflag(const fexcept_t *, int); +int feraiseexcept(int); +int fetestexcept(int); +int fegetround(void); +int fesetround(int); +int fegetenv(fenv_t *); +int feholdexcept(fenv_t *); +int fesetenv(const fenv_t *); +int feupdateenv(const fenv_t *); +int fegetexcept(void); +#if __BSD_VISIBLE +int feenableexcept(int); +int fedisableexcept(int); +int fegetexcept(void); +#endif + #define feclearexcept(a) __feclearexcept_int(a) +#define fegetexceptflag(e, a) __fegetexceptflag_int(e, a) +#define fesetexceptflag(e, a) __fesetexceptflag_int(e, a) +#define feraiseexcept(a) __feraiseexcept_int(a) +#define fetestexcept(a) __fetestexcept_int(a) +#define fegetround() __fegetround_int() +#define fesetround(a) __fesetround_int(a) +#define fegetenv(e) __fegetenv_int(e) +#define feholdexcept(e) __feholdexcept_int(e) +#define fesetenv(e) __fesetenv_int(e) +#define feupdateenv(e) __feupdateenv_int(e) +#if __BSD_VISIBLE +#define feenableexcept(a) __feenableexcept_int(a) +#define fedisableexcept(a) __fedisableexcept_int(a) +#define fegetexcept() __fegetexcept_int() +#endif __fenv_static inline int __feclearexcept_int(int __excepts) @@ -126,7 +158,7 @@ __feclearexcept_int(int __excepts) } __fenv_static inline int -fegetexceptflag(fexcept_t *__flagp, int __excepts) +__fegetexceptflag_int(fexcept_t *__flagp, int __excepts) { fexcept_t __fpsr; @@ -136,7 +168,7 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts) } __fenv_static inline int -fesetexceptflag(const fexcept_t *__flagp, int __excepts) +__fesetexceptflag_int(const fexcept_t *__flagp, int __excepts) { fexcept_t __fpsr; @@ -148,7 +180,7 @@ fesetexceptflag(const fexcept_t *__flagp, int __excepts) } __fenv_static inline int -feraiseexcept(int __excepts) +__feraiseexcept_int(int __excepts) { fexcept_t __ex = __excepts; @@ -157,7 +189,7 @@ feraiseexcept(int __excepts) } __fenv_static inline int -fetestexcept(int __excepts) +__fetestexcept_int(int __excepts) { fexcept_t __fpsr; @@ -166,7 +198,7 @@ fetestexcept(int __excepts) } __fenv_static inline int -fegetround(void) +__fegetround_int(void) { fenv_t __fpsr; @@ -175,7 +207,7 @@ fegetround(void) } __fenv_static inline int -fesetround(int __round) +__fesetround_int(int __round) { fenv_t __fpsr; @@ -187,7 +219,7 @@ fesetround(int __round) } __fenv_static inline int -fegetenv(fenv_t *__envp) +__fegetenv_int(fenv_t *__envp) { vmrs_fpscr(*__envp); @@ -195,7 +227,7 @@ fegetenv(fenv_t *__envp) } __fenv_static inline int -feholdexcept(fenv_t *__envp) +__feholdexcept_int(fenv_t *__envp) { fenv_t __env; @@ -207,7 +239,7 @@ feholdexcept(fenv_t *__envp) } __fenv_static inline int -fesetenv(const fenv_t *__envp) +__fesetenv_int(const fenv_t *__envp) { vmsr_fpscr(*__envp); @@ -215,7 +247,7 @@ fesetenv(const fenv_t *__envp) } __fenv_static inline int -feupdateenv(const fenv_t *__envp) +__feupdateenv_int(const fenv_t *__envp) { fexcept_t __fpsr; @@ -230,7 +262,7 @@ feupdateenv(const fenv_t *__envp) /* We currently provide no external definitions of the functions below. */ __fenv_static inline int -feenableexcept(int __mask) +__feenableexcept_int(int __mask) { fenv_t __old_fpsr, __new_fpsr; @@ -242,7 +274,7 @@ feenableexcept(int __mask) } __fenv_static inline int -fedisableexcept(int __mask) +__fedisableexcept_int(int __mask) { fenv_t __old_fpsr, __new_fpsr; @@ -254,7 +286,7 @@ fedisableexcept(int __mask) } __fenv_static inline int -fegetexcept(void) +__fegetexcept_int(void) { fenv_t __fpsr; From nobody Mon Mar 30 17:15:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ84DmYz6X5h3 for ; Mon, 30 Mar 2026 17:15:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fkyZ76NcYz3TWn for ; Mon, 30 Mar 2026 17:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t2JWxHrxvJ8gwBw7YPkWF64ctWZIqQ1+rCucvciGLp4=; b=sY6sgbo3SvmaNPXVQd3ZDROpG5I7GgvVzUhNVyI1Fkz/v+Bc4qomE+Kc44T/xKdxU1aVrl R7sd5yMD5KFIJicYnyTEfECDg8kt7bxTuJwnzsDKW97KvsNxAz3RXwfTPf/JAq4WHUK0zp 3L9p9AFoW82c6q1aEvfghl8tdxmKz4UoEfjP/n3185I4Zl9NApYqgNy19QCdXaMR/MFAbJ Hk4rgz3DZnPbslJKekxPjUiBMrKa8z2alFBJgA/MYf/I54tD4fQBV+oz/vO1M117fvnijO /pyh/J9SLgQF7vR4ndddt0fSSB4ZEmTu2HLqRShZ9+4W37AiHgCpvU4jfSAXSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774890943; a=rsa-sha256; cv=none; b=QEF9a/d6Es7fqqTASu654HW7RF2zpNNaohd7m+4hnFkuxTnzgNO8iL8EjYrlZVavj4aKoP RTqGT+c+YZQIsREf3BbROmgSQJU7TklVXyJCl7XJAWB3Ip361BxkvggmaNuXqV+7MU4sgq 5oplpL59KQDQlpo4g3Dbm87UecmAscrZvP1gdTpMsIB7XGLammQ64gFOof3S3h49Cz4i0P Y7DKxGAxbCTALRfA4xbRIIsBcAKSvux7l/w7IbaUqPGMrtusTGPPb2w2zNyOdv5PVQe6ZY t6Dq+q3MHWS3V0oO7ZEcOQk+iB5q6j45r7i1V8eLFo+jCQ5uNYiFEWPWdO3KIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774890943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t2JWxHrxvJ8gwBw7YPkWF64ctWZIqQ1+rCucvciGLp4=; b=IWio108clh2DdQ/n3Zg0kinrd/V4z3NuhAS3YbaTxWHN46RsFb0cBkrscZpOTWHhE2q/m/ C+pNfYXuCVBtWC0D/dozsAmA5tGmOqr3Mbrv94w1rHO0hg/j/IGU4I4ICf7dAo5pCXfxrS A88RKHlCOxx4wH9pyGFEvdKMs71Amf93qno1aa/xBwKiUGxW4usu1Lk4W4JU+D10/QD3LO Og8jRau/lVAKcOpM277odavVIZT7nGc+kULyP4tguQzYJsWmEImk4sm8zFvPgzy41mJDY9 9nL47qIFdSnAPG6vQ0tgjSlv75ImwOCqP8tBiGCqr1Gv3hAPNMlr1HxWi/zGsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fkyZ75wWbzsCw for ; Mon, 30 Mar 2026 17:15:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42681 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 30 Mar 2026 17:15:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d15733065c42 - main - msun: remove requirement to have C99 inline semantic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d15733065c4221dcd5bb3622d225760f271f6fc9 Auto-Submitted: auto-generated Date: Mon, 30 Mar 2026 17:15:43 +0000 Message-Id: <69caafbf.42681.4bf1f330@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d15733065c4221dcd5bb3622d225760f271f6fc9 commit d15733065c4221dcd5bb3622d225760f271f6fc9 Author: Konstantin Belousov AuthorDate: 2026-03-29 01:30:03 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-30 16:57:01 +0000 msun: remove requirement to have C99 inline semantic The 'extern inline' usage is removed. PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 --- lib/msun/aarch64/fenv.c | 5 ----- lib/msun/amd64/fenv.c | 5 ----- lib/msun/arm/fenv.c | 5 ----- lib/msun/i387/fenv.c | 5 ----- lib/msun/powerpc/fenv.c | 5 ----- lib/msun/riscv/fenv.c | 5 ----- 6 files changed, 30 deletions(-) diff --git a/lib/msun/aarch64/fenv.c b/lib/msun/aarch64/fenv.c index 5d626f66516f..a428a9d8a271 100644 --- a/lib/msun/aarch64/fenv.c +++ b/lib/msun/aarch64/fenv.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#define __fenv_static #include "fenv.h" /* @@ -34,10 +33,6 @@ */ const fenv_t __fe_dfl_env = 0; -#ifdef __GNUC_GNU_INLINE__ -#error "This file must be compiled with C99 'inline' semantics" -#endif - int (feclearexcept)(int excepts) { diff --git a/lib/msun/amd64/fenv.c b/lib/msun/amd64/fenv.c index 5dd122cf457c..fe9ecfff3b83 100644 --- a/lib/msun/amd64/fenv.c +++ b/lib/msun/amd64/fenv.c @@ -29,13 +29,8 @@ #include #include -#define __fenv_static #include "fenv.h" -#ifdef __GNUC_GNU_INLINE__ -#error "This file must be compiled with C99 'inline' semantics" -#endif - const fenv_t __fe_dfl_env = { { 0xffff0000 | __INITIAL_FPUCW__, 0xffff0000, diff --git a/lib/msun/arm/fenv.c b/lib/msun/arm/fenv.c index 620a05d51b90..2cf5bbdea28f 100644 --- a/lib/msun/arm/fenv.c +++ b/lib/msun/arm/fenv.c @@ -27,7 +27,6 @@ * SUCH DAMAGE. */ -#define __fenv_static #include "fenv.h" #include @@ -66,10 +65,6 @@ const fenv_t __fe_dfl_env = 0; #include "fenv-softfloat.h" #endif -#ifdef __GNUC_GNU_INLINE__ -#error "This file must be compiled with C99 'inline' semantics" -#endif - int (feclearexcept)(int excepts) { diff --git a/lib/msun/i387/fenv.c b/lib/msun/i387/fenv.c index d3cdc2e1cafb..bae8de2fb969 100644 --- a/lib/msun/i387/fenv.c +++ b/lib/msun/i387/fenv.c @@ -29,13 +29,8 @@ #include #include -#define __fenv_static #include "fenv.h" -#ifdef __GNUC_GNU_INLINE__ -#error "This file must be compiled with C99 'inline' semantics" -#endif - const fenv_t __fe_dfl_env = { __INITIAL_NPXCW__, 0x0000, diff --git a/lib/msun/powerpc/fenv.c b/lib/msun/powerpc/fenv.c index d1926155d087..3104b59d4dfb 100644 --- a/lib/msun/powerpc/fenv.c +++ b/lib/msun/powerpc/fenv.c @@ -26,13 +26,8 @@ * SUCH DAMAGE. */ -#define __fenv_static #include "fenv.h" -#ifdef __GNUC_GNU_INLINE__ -#error "This file must be compiled with C99 'inline' semantics" -#endif - const fenv_t __fe_dfl_env = 0x00000000; int diff --git a/lib/msun/riscv/fenv.c b/lib/msun/riscv/fenv.c index 1f1f8eddc2d6..7fdedca1f09c 100644 --- a/lib/msun/riscv/fenv.c +++ b/lib/msun/riscv/fenv.c @@ -24,13 +24,8 @@ * SUCH DAMAGE. */ -#define __fenv_static #include "fenv.h" -#ifdef __GNUC_GNU_INLINE__ -#error "This file must be compiled with C99 'inline' semantics" -#endif - /* * Hopefully the system ID byte is immutable, so it's valid to use * this as a default environment. From nobody Mon Mar 30 22:35:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fl5gK6Q8kz6Xdlh for ; Mon, 30 Mar 2026 22:35:41 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yx1-xb12e.google.com (mail-yx1-xb12e.google.com [IPv6:2607:f8b0:4864:20::b12e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fl5gJ0wT6z3G8s for ; Mon, 30 Mar 2026 22:35:40 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=WzCUwUSp; dmarc=pass (policy=none) header.from=gmail.com; arc=pass ("google.com:s=arc-20240605:i=1"); spf=pass (mx1.freebsd.org: domain of oliver.pntr@gmail.com designates 2607:f8b0:4864:20::b12e as permitted sender) smtp.mailfrom=oliver.pntr@gmail.com Received: by mail-yx1-xb12e.google.com with SMTP id 956f58d0204a3-6501d242e3fso2872821d50.0 for ; Mon, 30 Mar 2026 15:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774910138; cv=none; d=google.com; s=arc-20240605; b=AzFL1BAtFI9URET41KGZN+/jRsP4wlfeATN8uei7LirjgbaRWuWE3Wll950orKl7xP lb2zE0W3wf0mfvmIzvx7wT0haHRQzCqwaaJ/t5bgRO9Q40MHDCulHOEMmRYv9obRhw16 MlghtWoYUp7qK2sz6NY6eDb5wgwikTO0ZQzBQVptN2zf73Y1aSfAScFzkEB5GetBvjzW Rb5drCqT0IS1GdNsUyqTphvecnFP3Lug2iNRRuDEnrLqcc4T5Ycd5sL+/nHIOdYysb22 KrGltEpOCw1ijX7bEfiO+S+KpyBLHv4nvZ+oSU60Fw+fOI+B3mRy0giHy7zlz503uMJA rquw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:dkim-signature; bh=6pZN1rbb06+pRlxgOUdhheT7hnLkT1phAcUE9/uA79A=; fh=GwNNXh4m8Ky7Pwzb2nJ98PeGbC4YMAow1KKhdZO7Ylg=; b=ZwE+Vu1LRKOcE/y+nsbH5+6WzwtJ3n2pOlNMLAmOp82zZQv8jQKEveud3k89OXYucA F5AUgC+grhx778sgF8PonIYRsJR7yVeJzVr4FhGS8GnH4+s8DYn+41x6Rc6d0+1QOaxm Aq4G47sgHYNyvFHXoZT+B6OdSU3ceTjp04LPD8YMysMdJQjalHLacOJy4NyeesNuQI0k /HpGSIdkZpYknAIX2LYNCJpNP31uXfFeHNgiJFzxaO1OeedIUpFi3nKnj3ioa26iCmYM c1nSEIwCsZb/tZw53cLcHQ1/LUjGdrx+IvinuhIaEg2cHZBdt4OjftjjQTlZmIHAxat5 9bJA==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774910138; x=1775514938; darn=freebsd.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6pZN1rbb06+pRlxgOUdhheT7hnLkT1phAcUE9/uA79A=; b=WzCUwUSpvenH2GG0YTOELGlAIqFXDl9c1RWIFB9s6lsUXaCNgcsR9XnMl+NLLpycMm 0M6a4ejcF2/AgFO1aeXCGnz6FF9BMpRxmnpjBn0MVVpmEi7aE0j3zBAmY2W2Dm7HA21V Ds5b57boxbMKeuWZYlgtVfkUBd05gj5e8Xwbq0HbhAMknjsqgt/WPG0fA5VBUD9Tt31q KNGxczyUA/HXJRAEfnuKi3uybgNwOSlhwpWaAJUyP/DKKh4oAPGNUWNNuhsEOchQyXEr utBSjn9UGuDJo7JHtXzKnNpSPW7mTHHw2V11D/2zb3ByVxgLYjk7lhKR/vKNTjc04FM4 DoZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774910138; x=1775514938; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6pZN1rbb06+pRlxgOUdhheT7hnLkT1phAcUE9/uA79A=; b=fl0FJ6HBK/5xFIlJ9Xr2UpFD9gq/4Q0znQNXuSWFh7cPT3cGcgGzxSPuKoe4CHPQJh vxLcY22BbMV5TPvZ7xY1veTr71jhFCl1xrvp6Sahj7JJd7Zqm+zalZMzbQWahaLdvu6C Ls/T0WcTmL+nlLzkO8/HiqsUvfm47I4nx+Jnh7cAp0ZDz82o1vN8LBqzPu1k1vY6+8t4 +SzNpcHjZYtEfa8jdigSAzNlKLWVzHASYEJ4s021f+bqCIQ5ZMPfduPL7upLBK11TOdP GKIwnlUkFRdKhgjVheGdy/UE5IuD0GghNG7I+yN/yVc0017sbMwgw2jE7XZphxL9/0Bk +hTQ== X-Forwarded-Encrypted: i=1; AJvYcCULh6QYxrzGFDWt0vhdzm8QH/t4NFf8eloQUS0n+EsXpzIsi1YUZWRslcN4p2Ya5tuLANu8gWXieJTo6TWVIdBoGDnExw==@freebsd.org X-Gm-Message-State: AOJu0YwDqdUMnm2R3cyRPBtLtVdXr/zfIMMkf7Ravw/JO5ruYPryNhL4 Gym1GadIdukv+t5HdHFUJ/ulHD5FOWKhRraGtyq0e43HgcODJYwo7IlDn1Rh4iw/udLch47TmfZ y2GZI7UfR6Twkza4FFmScCNLy0vzWcX0= X-Gm-Gg: ATEYQzwHkdjuOPsRhGTtVZ3nnMeK1VcXD1LxKUXW1Y2zMOgF9hSQqVefgpBhViOFxnB RNcgCalS7N7FWMyB8+EeELC0uApby9NBek0pUBMlSL1uhqKuqZTZ38byHsx2AYTL/xNpbC247aR ANeje47MOKG+O5LP0Dv1aM1meYdp4ifE7J+voVrPZk8y3UZ+gAz3mSfCH2axameFab2c2Hp/Owl BkaxSs/71vpSTAG/Nqot6XjU+OTNtxrBHwEzvj1ipvziidWALXGUx8j/vtJh4FX74G6c0faV9Ju Ag4Z4HrorsTVngb2wVfq1OgSuc/R8b5f0R2TGJAOMQ== X-Received: by 2002:a05:690e:1484:b0:650:1d21:d681 with SMTP id 956f58d0204a3-6501d21da2amr4314449d50.39.1774910138213; Mon, 30 Mar 2026 15:35:38 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Received: by 2002:a05:7011:4893:b0:50c:2fa8:3e4e with HTTP; Mon, 30 Mar 2026 15:35:36 -0700 (PDT) In-Reply-To: <69c92678.206ec.39f0d32e@gitrepo.freebsd.org> References: <69c92678.206ec.39f0d32e@gitrepo.freebsd.org> From: Oliver Pinter Date: Mon, 30 Mar 2026 23:35:36 +0100 X-Gm-Features: AQROBzAKEmhlJAQvs5l96QQ91LmzAdr7lkWYXMyX-yNFIfbbdIQoMPibUj2q3No Message-ID: Subject: Re: git: bb8230f838c8 - main - hkbd(4): add some extra handy fn key bindings To: Vladimir Kondratyev Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Toby Slight Content-Type: multipart/alternative; boundary="0000000000004be9e7064e4578e5" X-Spamd-Result: default: False [-4.65 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.65)[-0.651]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20251104]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TAGGED_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b12e:from]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4fl5gJ0wT6z3G8s X-Spamd-Bar: ---- --0000000000004be9e7064e4578e5 Content-Type: text/plain; charset="UTF-8" Hi! Would you like to add these to man page as well? Thanks, Oliver On Sunday, March 29, 2026, Vladimir Kondratyev wrote: > The branch main has been updated by wulf: > > URL: https://cgit.FreeBSD.org/src/commit/?id= > bb8230f838c8d5f8d362a0dad4809908b44ae379 > > commit bb8230f838c8d5f8d362a0dad4809908b44ae379 > Author: Toby Slight > AuthorDate: 2026-03-29 13:16:57 +0000 > Commit: Vladimir Kondratyev > CommitDate: 2026-03-29 13:16:57 +0000 > > hkbd(4): add some extra handy fn key bindings > > - Fn+S for ScrollLock as it's very useful to have ScrollLock on > FreeBSD's TTY. > - Fn+P for PrtSc/SysRq, as it's another very handy but sadly missing > key on Macbooks. > - Some other Fn+ combinations duplicating existing keys. > > Apply the change to ukbd(4) as well. > > Signed-off-by: Toby Slight > > Reviewed by: wulf > MFC after: 1 month > Pull Request: https://github.com/freebsd/freebsd-src/pull/1998 > --- > sys/dev/hid/hkbd.c | 10 ++++++++++ > sys/dev/usb/input/ukbd.c | 10 ++++++++++ > 2 files changed, 20 insertions(+) > > diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c > index 9ab02e940089..c98f4be69169 100644 > --- a/sys/dev/hid/hkbd.c > +++ b/sys/dev/hid/hkbd.c > @@ -623,6 +623,16 @@ static uint32_t > hkbd_apple_fn(uint32_t keycode) > { > switch (keycode) { > + case 0x0b: return 0x50; /* H -> LEFT ARROW */ > + case 0x0d: return 0x51; /* J -> DOWN ARROW */ > + case 0x0e: return 0x52; /* K -> UP ARROW */ > + case 0x0f: return 0x4f; /* L -> RIGHT ARROW */ > + case 0x36: return 0x4a; /* COMMA -> HOME */ > + case 0x37: return 0x4d; /* DOT -> END */ > + case 0x18: return 0x4b; /* U -> PGUP */ > + case 0x07: return 0x4e; /* D -> PGDN */ > + case 0x16: return 0x47; /* S -> SCROLLLOCK */ > + case 0x13: return 0x46; /* P -> SYSRQ/PRTSC */ > case 0x28: return 0x49; /* RETURN -> INSERT */ > case 0x2a: return 0x4c; /* BACKSPACE -> DEL */ > case 0x50: return 0x4a; /* LEFT ARROW -> HOME */ > diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c > index 3ebdf1e9747d..37deb5c56fbd 100644 > --- a/sys/dev/usb/input/ukbd.c > +++ b/sys/dev/usb/input/ukbd.c > @@ -677,6 +677,16 @@ static uint32_t > ukbd_apple_fn(uint32_t keycode) > { > switch (keycode) { > + case 0x0b: return 0x50; /* H -> LEFT ARROW */ > + case 0x0d: return 0x51; /* J -> DOWN ARROW */ > + case 0x0e: return 0x52; /* K -> UP ARROW */ > + case 0x0f: return 0x4f; /* L -> RIGHT ARROW */ > + case 0x36: return 0x4a; /* COMMA -> HOME */ > + case 0x37: return 0x4d; /* DOT -> END */ > + case 0x18: return 0x4b; /* U -> PGUP */ > + case 0x07: return 0x4e; /* D -> PGDN */ > + case 0x16: return 0x47; /* S -> SCROLLLOCK */ > + case 0x13: return 0x46; /* P -> SYSRQ/PRTSC */ > case 0x28: return 0x49; /* RETURN -> INSERT */ > case 0x2a: return 0x4c; /* BACKSPACE -> DEL */ > case 0x50: return 0x4a; /* LEFT ARROW -> HOME */ > > --0000000000004be9e7064e4578e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi!

Would you like to add these to man page as well?

Thanks,
Oliver=C2=A0

On Sunday, Marc= h 29, 2026, Vladimir Kondratyev <wul= f@freebsd.org> wrote:
The branch m= ain has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbb8230f838c8d5f8d362a0dad4809908b44ae379

commit bb8230f838c8d5f8d362a0dad4809908b44ae379
Author:=C2=A0 =C2=A0 =C2=A0Toby Slight <tslight@pm.me>
AuthorDate: 2026-03-29 13:16:57 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2026-03-29 13:16:57 +0000

=C2=A0 =C2=A0 hkbd(4): add some extra handy fn key bindings

=C2=A0 =C2=A0 - Fn+S for ScrollLock as it's very useful to have ScrollL= ock on
=C2=A0 =C2=A0 =C2=A0 FreeBSD's TTY.
=C2=A0 =C2=A0 - Fn+P for PrtSc/SysRq, as it's another very handy but sa= dly missing
=C2=A0 =C2=A0 =C2=A0 key on Macbooks.
=C2=A0 =C2=A0 - Some other Fn+<key> combinations duplicating existing= keys.

=C2=A0 =C2=A0 Apply the change to ukbd(4) as well.

=C2=A0 =C2=A0 Signed-off-by: Toby Slight <tslight@pm.me>

=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 wulf
=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 1 month
=C2=A0 =C2=A0 Pull Request:=C2=A0 =C2=A0https://github.com/freebsd/freebsd-src/pull/1998
---
=C2=A0sys/dev/hid/hkbd.c=C2=A0 =C2=A0 =C2=A0 =C2=A0| 10 ++++++++++
=C2=A0sys/dev/usb/input/ukbd.c | 10 ++++++++++
=C2=A02 files changed, 20 insertions(+)

diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c
index 9ab02e940089..c98f4be69169 100644
--- a/sys/dev/hid/hkbd.c
+++ b/sys/dev/hid/hkbd.c
@@ -623,6 +623,16 @@ static uint32_t
=C2=A0hkbd_apple_fn(uint32_t keycode)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (keycode) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0b: return 0x50; /* H -> LEFT ARROW *= /
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0d: return 0x51; /* J -> DOWN ARROW *= /
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0e: return 0x52; /* K -> UP ARROW */<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0f: return 0x4f; /* L -> RIGHT ARROW = */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x36: return 0x4a; /* COMMA -> HOME */<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x37: return 0x4d; /* DOT -> END */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x18: return 0x4b; /* U -> PGUP */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x07: return 0x4e; /* D -> PGDN */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x16: return 0x47; /* S -> SCROLLLOCK *= /
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x13: return 0x46; /* P -> SYSRQ/PRTSC = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case 0x28: return 0x49; /* RETURN -> INSERT = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case 0x2a: return 0x4c; /* BACKSPACE -> DEL = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case 0x50: return 0x4a; /* LEFT ARROW -> HOM= E */
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index 3ebdf1e9747d..37deb5c56fbd 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -677,6 +677,16 @@ static uint32_t
=C2=A0ukbd_apple_fn(uint32_t keycode)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 switch (keycode) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0b: return 0x50; /* H -> LEFT ARROW *= /
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0d: return 0x51; /* J -> DOWN ARROW *= /
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0e: return 0x52; /* K -> UP ARROW */<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x0f: return 0x4f; /* L -> RIGHT ARROW = */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x36: return 0x4a; /* COMMA -> HOME */<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x37: return 0x4d; /* DOT -> END */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x18: return 0x4b; /* U -> PGUP */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x07: return 0x4e; /* D -> PGDN */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x16: return 0x47; /* S -> SCROLLLOCK *= /
+=C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x13: return 0x46; /* P -> SYSRQ/PRTSC = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case 0x28: return 0x49; /* RETURN -> INSERT = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case 0x2a: return 0x4c; /* BACKSPACE -> DEL = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case 0x50: return 0x4a; /* LEFT ARROW -> HOM= E */

--0000000000004be9e7064e4578e5-- From nobody Tue Mar 31 02:32:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flBwz5QgNz6WgZ9 for ; Tue, 31 Mar 2026 02:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flBwz3hJNz3qW7 for ; Tue, 31 Mar 2026 02:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774924371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwxVvhM6mcvRp0l8N+Db7hij/x+JJabq/rXAOHaeFcY=; b=qrRUt99R9V5Zd84ziN+n+40RjF/R0j6ti7/RoKTso5sy4b6c6scSxbeTyCiPCrnoMHQWxn eB21323Od7ZwPzb1jSWmluksNVwIcfG4DnJVZeG1/+eFT7VP535hwUbxilwxeqxGxpT5Rc r4ngMu3omdks2p2hynY4XpnVGBXIkGuFmvsYv4TaRjVPXlrhFDpN50ixMyEAutnOgdHdad QGmFajmSZ/Tyhe2gwiy01RkGQWjg5jR8Bq2f6DyqQDoVR6QIqy5G8T2TbcDpxRRBc1eZcl ZgFC7d7HgDRkSl+TCelFkYihVJl+vYT/Y/twdm6TrFcf7GWlt/anAeKFdeqwrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774924371; a=rsa-sha256; cv=none; b=rRh7Sy6ryVFIYyWWC8CAa1j9hTJQi4yz5L73sQ2bm7tAlKx30+ECJXQGrjC2aGzMHsra8a Kw5N4xTs/k5MHIonNo2Yaf4psTseXagzmYvvD0B0o4urBVBrnTZMcMq92YfUiEZk2Es6Fz d0uQwuG65EPxgmkNT5nrOJ81ADFNWnRVw2aPFYovDINB5KxgF9BgLhmDImkWcBSMZwfnzU Ato0GjVYv6z/9DFeu/fvAaxAWIMl8NJSdJcyAl0LBPZVfpeMOcCrTRkhkqENtWDzuTeLZv PpIJezc/SEgV6+U1QYrFlVzXwz56bRwhHNHJwzZihubtkzJjBaqQfePlA5UWsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774924371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwxVvhM6mcvRp0l8N+Db7hij/x+JJabq/rXAOHaeFcY=; b=m/pC5ieDnRNBLUH3uIbgU2yCWV5Ze4Jm5LQMcUwnwYz1GmL5kRotZ4qycOOjEIYYTgM1ke JogAont4BeLCYB4aRVdUlU7UyQNI9MnGRNyAGyCt1QdkH6bfoxLXPnn1J4I0yDL1++DLRI P2oja7izdEcL0LTdlqHY3UWlGXnh1MwUArcw2DiJHWkA0ixtVyndRjVyC/2WHNIPwhAmph +OcGUb2/QjdPF1+uJYRXPZmnfV2h+KmDSJXpk7FNNi2VTbiaBbUCEmJYew8L4HIrTeAY6V 8Y1K8C/n3qMfWnxwP9aG8TYB7mHYqapcA0Mul7entLISZMLtTFJwVHfd2j4YzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flBwz3991z18my for ; Tue, 31 Mar 2026 02:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 240c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 02:32:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Christos Longros From: Alexander Ziaee Subject: git: 59cb18f35617 - main - vmgenc.4: Add VM Generation ID Counter manual List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59cb18f35617d3a53f7d7e142b4f91ad7951f5e0 Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 02:32:51 +0000 Message-Id: <69cb3253.240c9.73903bbb@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=59cb18f35617d3a53f7d7e142b4f91ad7951f5e0 commit 59cb18f35617d3a53f7d7e142b4f91ad7951f5e0 Author: Christos Longros AuthorDate: 2026-03-31 02:24:16 +0000 Commit: Alexander Ziaee CommitDate: 2026-03-31 02:31:43 +0000 vmgenc.4: Add VM Generation ID Counter manual Document the vmgenc(4) ACPI driver which detects virtual machine cloning and snapshot restoration via the VM Generation ID specification. The driver reseeds the kernel entropy pool when a generation change is detected. MFC after: 3 days Reviewed by: cem (previous), ziaee Signed-off-by: Christos Longros Differential Revision: https://reviews.freebsd.org/D56011 --- share/man/man4/Makefile | 1 + share/man/man4/vmgenc.4 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index ade0168cb0a6..c35859b30b60 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -624,6 +624,7 @@ MAN= aac.4 \ virtio_random.4 \ virtio_scsi.4 \ ${_vmci.4} \ + vmgenc.4 \ vkbd.4 \ vlan.4 \ vxlan.4 \ diff --git a/share/man/man4/vmgenc.4 b/share/man/man4/vmgenc.4 new file mode 100644 index 000000000000..1938e7f70eac --- /dev/null +++ b/share/man/man4/vmgenc.4 @@ -0,0 +1,62 @@ +.\" +.\" Copyright (c) 2026 Christos Longros +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd March 21, 2026 +.Dt VMGENC 4 +.Os +.Sh NAME +.Nm vmgenc +.Nd ACPI virtual machine generation ID counter +.Sh SYNOPSIS +.Cd device vmgenc +.Pp +In +.Xr loader.conf 5 : +.Cd vmgenc_load="YES" +.Sh DESCRIPTION +The +.Nm +driver provides support for the Virtual Machine Generation ID, +a 128-bit unique identifier exposed by the hypervisor via ACPI. +The hypervisor changes this identifier whenever the virtual machine +is cloned, restored from a snapshot, or otherwise duplicated. +.Pp +When a generation ID change is detected, the +.Nm +driver feeds the new identifier into the kernel entropy pool via +.Xr random 4 , +ensuring that duplicated virtual machines do not share +cryptographic state. +The driver also sends a +.Xr devctl 4 +event and an internal kernel notification so that other subsystems +can respond to the duplication. +.Pp +The Virtual Machine Generation ID specification is supported by +QEMU, VMware ESXi, Microsoft Hyper-V, and Xen. +.Sh SYSCTL VARIABLES +The following variable is available: +.Bl -tag -width indent +.It Va dev.vmgenc.%d.guid +The current cached VM generation counter as a 128-bit value. +This value is updated each time the hypervisor signals a +generation change. +.El +.Sh SEE ALSO +.Xr acpi 4 , +.Xr random 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 13.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Conrad Meyer Aq Mt cem@FreeBSD.org . +.Pp +This manual page was written by +.An Christos Longros Aq Mt chris.longros@gmail.com . From nobody Tue Mar 31 04:51:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flG0v0XSWz6XBKQ for ; Tue, 31 Mar 2026 04:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flG0t6ddsz4689 for ; Tue, 31 Mar 2026 04:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774932686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnABuUxGcx5y8DXEwpiW48Tqt3MDF6BGqqV3j/bMAVQ=; b=E3fSmZ1sVz+5GVh0xDM2KVR+EHjYFtsqY9mwp5ll0DXpkTs22MAd4xmc47QDXbf3skdFDH +E8/wK0FOSySF5w7/kro5NUImrUAOA39fvaOTE3KJazgQ1Q+CjIHii0fb9GNOSZv/KxbHx juLoQp22iD639LbMcgnjh2Pgj0XqwffPS6FftzCKU76HM3BDskFPmtAKNPGWBfIYWxztKz GPQ4RKiVhGhQcQtGV5k7Hw1npPN63YzAD1gOwbtZ8LsuLZ6R6QBdCYNqTYAiP0SLJf1gLe JSnfbflgT0WXh5tSfDJWMk2n87c7uy9fxLc2/29+AEBh1+QmYRn47v5IbbaVgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774932686; a=rsa-sha256; cv=none; b=gAF3YDRK1BcFHikDHCgZdVpWW1MaEuWzxBe/iYpezMgRWYsdh4XAU+TSj3FhJHseZG13yO fQZKhdAmh84TWQo0EaxCcLTCBHaQ3/FHs1rb5p6PLwf8SFVzhqsy+Umg1TJYxYgzJA95bo p+QmvjXeSShHP6FS9jfXmyNRV9MnBQ9bBYZJ47/bqAsVFz1fumeJvJKLur4YjADu/M2CHM BfKa7HwfLwXyMlqpk50XTnfcYSQNPnhMMfJpbHWyrc1mJen3lfxR8k8C+B7lav72I+pbtu VWL4i5072q3dy08wSiGO/qy7F7CiK9K2jkjvudWn2q26jjXIe6vvbwEZHhDhNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774932686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jnABuUxGcx5y8DXEwpiW48Tqt3MDF6BGqqV3j/bMAVQ=; b=B5s2fPJmTLknj0yUgL/LfE9ZTZHVqCzlQDluquZj9ZTmmE4GeWgBMqaG9haIxDXbcQogMh gw1qCkVKKf+979h7p0Q+LkTpL5fymSBWWxgIFqOq4Cv3RY8B0E0Rzej5IImguMLZtzERfs RjhRF6BWpknwctpe5hDlema6KD8zb9k3u82NYBUXwUsa4IwillnhtPLgGmhuJXfxjpy9Fa oNCagW62LPNIat23kcAS/Ie4BBfS9qj3gxfK/ODI9wJqVUxDt1uU8KbSBGjoqFD++zRNlm NXFBZySGZxI2dS9MVKausATPdtFPqPbByAjqQKZsfh5aL5FXcXD1Aop/7J/gKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flG0t6FS4z1CHG for ; Tue, 31 Mar 2026 04:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bc58 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 04:51:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 69124109c5a0 - main - amdsmu: Cezanne support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69124109c5a00bb748cd8d3e9ede7291b34b577c Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 04:51:26 +0000 Message-Id: <69cb52ce.3bc58.6b33821b@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=69124109c5a00bb748cd8d3e9ede7291b34b577c commit 69124109c5a00bb748cd8d3e9ede7291b34b577c Author: Aymeric Wibo AuthorDate: 2026-02-28 15:43:26 +0000 Commit: Aymeric Wibo CommitDate: 2026-03-31 04:48:59 +0000 amdsmu: Cezanne support Add support for Cezanne chips. The only real difference vs Rembrandt/Phoenix is the idlemask register. Also simplify getting IP block count by having this straight in struct amdsmu_product and remove Strix Point from the list for now, as that doesn't support S0ix and our driver can't handle that. Reviewed by: mckusick Approved by: mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55594 --- sys/dev/amdsmu/amdsmu.c | 34 ++++++++++++---------------------- sys/dev/amdsmu/amdsmu.h | 19 +++++++++++++++---- sys/dev/amdsmu/amdsmu_reg.h | 5 ++++- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/sys/dev/amdsmu/amdsmu.c b/sys/dev/amdsmu/amdsmu.c index 9a6873b43517..7b97888887c5 100644 --- a/sys/dev/amdsmu/amdsmu.c +++ b/sys/dev/amdsmu/amdsmu.c @@ -58,9 +58,12 @@ amdsmu_identify(driver_t *driver, device_t parent) static int amdsmu_probe(device_t dev) { + struct amdsmu_softc *sc; + if (resource_disabled("amdsmu", 0)) return (ENXIO); - if (!amdsmu_match(device_get_parent(dev), NULL)) + sc = device_get_softc(dev); + if (!amdsmu_match(device_get_parent(dev), &sc->product)) return (ENXIO); device_set_descf(dev, "AMD System Management Unit"); @@ -154,28 +157,11 @@ static int amdsmu_get_ip_blocks(device_t dev) { struct amdsmu_softc *sc = device_get_softc(dev); - const uint16_t deviceid = pci_get_device(dev); int err; struct amdsmu_metrics *m = &sc->metrics; bool active; char sysctl_descr[32]; - /* Get IP block count. */ - switch (deviceid) { - case PCI_DEVICEID_AMD_REMBRANDT_ROOT: - sc->ip_block_count = 12; - break; - case PCI_DEVICEID_AMD_PHOENIX_ROOT: - sc->ip_block_count = 21; - break; - /* TODO How many IP blocks does Strix Point (and the others) have? */ - case PCI_DEVICEID_AMD_STRIX_POINT_ROOT: - default: - sc->ip_block_count = nitems(amdsmu_ip_blocks_names); - } - KASSERT(sc->ip_block_count <= nitems(amdsmu_ip_blocks_names), - ("too many IP blocks for array")); - /* Get and print out IP blocks. */ err = amdsmu_cmd(dev, SMU_MSG_GET_SUP_CONSTRAINTS, 0, &sc->active_ip_blocks); @@ -184,13 +170,13 @@ amdsmu_get_ip_blocks(device_t dev) return (err); } device_printf(dev, "Active IP blocks: "); - for (size_t i = 0; i < sc->ip_block_count; i++) { + for (size_t i = 0; i < sc->product->ip_block_count; i++) { active = (sc->active_ip_blocks & (1 << i)) != 0; sc->ip_blocks_active[i] = active; if (!active) continue; printf("%s%s", amdsmu_ip_blocks_names[i], - i + 1 < sc->ip_block_count ? " " : "\n"); + i + 1 < sc->product->ip_block_count ? " " : "\n"); } /* Create a sysctl node for IP blocks. */ @@ -203,7 +189,7 @@ amdsmu_get_ip_blocks(device_t dev) } /* Create a sysctl node for each IP block. */ - for (size_t i = 0; i < sc->ip_block_count; i++) { + for (size_t i = 0; i < sc->product->ip_block_count; i++) { /* Create the sysctl node itself for the IP block. */ snprintf(sysctl_descr, sizeof sysctl_descr, "Metrics about the %s AMD IP block", @@ -293,7 +279,7 @@ amdsmu_fetch_idlemask(device_t dev) { struct amdsmu_softc *sc = device_get_softc(dev); - sc->idlemask = amdsmu_read4(sc, SMU_REG_IDLEMASK); + sc->idlemask = amdsmu_read4(sc, sc->product->idlemask_reg); } static void @@ -301,6 +287,10 @@ amdsmu_suspend(device_t dev, enum power_stype stype) { if (stype != POWER_STYPE_SUSPEND_TO_IDLE) return; + /* + * XXX It seems that Cezanne needs a special workaround here for + * firmware versions < 64.53. See amd_pmc_verify_czn_rtc() in Linux. + */ if (amdsmu_cmd(dev, SMU_MSG_SLEEP_HINT, true, NULL) != 0) device_printf(dev, "failed to hint to SMU to enter sleep"); } diff --git a/sys/dev/amdsmu/amdsmu.h b/sys/dev/amdsmu/amdsmu.h index 857fa21cba4e..4286d515ae77 100644 --- a/sys/dev/amdsmu/amdsmu.h +++ b/sys/dev/amdsmu/amdsmu.h @@ -25,10 +25,20 @@ static const struct amdsmu_product { uint16_t amdsmu_vendorid; uint16_t amdsmu_deviceid; + int16_t idlemask_reg; + size_t ip_block_count; } amdsmu_products[] = { - { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_REMBRANDT_ROOT }, - { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_PHOENIX_ROOT }, - { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_STRIX_POINT_ROOT }, + { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_CEZANNE_ROOT, + SMU_REG_IDLEMASK_CEZANNE, 12 }, + { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_REMBRANDT_ROOT, + SMU_REG_IDLEMASK_PHOENIX, 12 }, + { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_PHOENIX_ROOT, + SMU_REG_IDLEMASK_PHOENIX, 21 }, + /* + * XXX Strix Point (PCI_DEVICEID_AMD_STRIX_POINT_ROOT) doesn't support + * S0i3 and thus doesn't have an idlemask. Since our driver doesn't + * yet understand this, don't attach to Strix Point for the time being. + */ }; static const char *const amdsmu_ip_blocks_names[] = { @@ -59,6 +69,8 @@ static const char *const amdsmu_ip_blocks_names[] = { CTASSERT(nitems(amdsmu_ip_blocks_names) <= 32); struct amdsmu_softc { + const struct amdsmu_product *product; + struct sysctl_ctx_list *sysctlctx; struct sysctl_oid *sysctlnode; @@ -76,7 +88,6 @@ struct amdsmu_softc { uint32_t active_ip_blocks; struct sysctl_oid *ip_blocks_sysctlnode; - size_t ip_block_count; struct sysctl_oid *ip_block_sysctlnodes[ nitems(amdsmu_ip_blocks_names)]; bool ip_blocks_active[ diff --git a/sys/dev/amdsmu/amdsmu_reg.h b/sys/dev/amdsmu/amdsmu_reg.h index d45fa60941d5..6afbcf006535 100644 --- a/sys/dev/amdsmu/amdsmu_reg.h +++ b/sys/dev/amdsmu/amdsmu_reg.h @@ -16,6 +16,7 @@ * out? Also, there are way more of these. I couldn't find a centralized place * which lists them though. */ +#define PCI_DEVICEID_AMD_CEZANNE_ROOT 0x1630 #define PCI_DEVICEID_AMD_REMBRANDT_ROOT 0x14B5 #define PCI_DEVICEID_AMD_PHOENIX_ROOT 0x14E8 #define PCI_DEVICEID_AMD_STRIX_POINT_ROOT 0x14A4 @@ -32,7 +33,9 @@ #define SMU_REG_MESSAGE 0x538 #define SMU_REG_RESPONSE 0x980 #define SMU_REG_ARGUMENT 0x9BC -#define SMU_REG_IDLEMASK 0xD14 + +#define SMU_REG_IDLEMASK_CEZANNE 0x94 +#define SMU_REG_IDLEMASK_PHOENIX 0xD14 enum amdsmu_res { SMU_RES_WAIT = 0x00, From nobody Tue Mar 31 10:02:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flNvn16nmz6WdDY for ; Tue, 31 Mar 2026 10:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flNvn04m6z3tSt for ; Tue, 31 Mar 2026 10:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774951349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Bxd9y0SRFL5J4VxJUsUINvAnPhP6NIJlZR5TED6q9o=; b=doOFMfP6YoQFcokCo44uVqIKinO/SgLh7BKz+RQ3p3cbjbaLfZg0OrR8WJNqtPjrUo0nSr 9T9Ewh2s2b/EiEfaWgGgeYsY98nIRR7poj457yTSDjva/G91XyY+kO3tSJyi6rpju/H+7a ergbB+QZLhE3Y4tFm4uaf0YVE9qM+wwokKWZ+5Q1+uX22FQRYLDNf712HW+t7EuuNWGAcm mybkAwNfGg9sbyciWuc973qz5h8BuxXKTZ7zJqTFOSY7TIfsFKhqCDz78C+HLvCGZNJ68U N0pEIBka0Qs+LHclNXIZ4+Xv7kVWSjr9sF6JRj2K5oE07HWh91yP5tGTjpDhFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774951349; a=rsa-sha256; cv=none; b=mp+MlCcsAvnOJpAGx8BAuwOxRz6zlfD1IOEwCR3eaj0NFNqGQhV+9UGtp0W3p9GnLN36Yp Kwd2OKagrZ4S4vccOFE401zceI3q5bL8amOUD3uKuRQH/+qIMaJvVTkr0xfcAA4l/FSvOa Db2TRPLqjjiCy5GxIGHd9ieY89q8vynYjwg1k/HsAqAZjMNZDkkFZ2WxaoymWbn11chwAZ /3KnqfyXK059eP1m+vPDKcqui0Y73v4WRYLBqdvspKPJkrK5KARpqQ8+KLeGpOi6wmE1BT AVTjN2WbrqW3zMAbIVnlG9jXFgE2CFrzVpc9fFAe0vE83YKTvlS2U6sG4WDMgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774951349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Bxd9y0SRFL5J4VxJUsUINvAnPhP6NIJlZR5TED6q9o=; b=f8z2Y8ED+g52ufQQpyKy32tuLhRdruDImoo+SxnGGmabaClS++G7Hyos6MqYjVSThbHYYq cm/w4yoAncMzOOhY7z3AV45N3nRykVhSp7hLh9Iq3LhkfxojxVxA0clLWUSGg3wUjx1/BD X9JHSr94aLErvB3JYXIo89fvYNnoSqiZx+FQ0QV1y5DXfHcNOrtexGHXKJaL9tOWsf1v6y x0/9wuJ+gBDAYWo0Kxps+CX5jc9Cl4hhmyCXwAikUd54sqlAp+Azxzky1LO4XcMtcZufXl S6e1advsnoFlQRFkyk81e3WErHRvmXrgoNOTuwvXtI83+t4TDq9iaJYg6INW0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flNvm6kSXz8jn for ; Tue, 31 Mar 2026 10:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d86f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 10:02:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 33e095ee097d - main - acpi_spmc: Improve device description List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33e095ee097d6a18dca95b8fae4edbda405bbb20 Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 10:02:28 +0000 Message-Id: <69cb9bb4.3d86f.38a9a2cd@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=33e095ee097d6a18dca95b8fae4edbda405bbb20 commit 33e095ee097d6a18dca95b8fae4edbda405bbb20 Author: Aymeric Wibo AuthorDate: 2026-03-31 10:01:08 +0000 Commit: Aymeric Wibo CommitDate: 2026-03-31 10:01:10 +0000 acpi_spmc: Improve device description "Low Power S0 Idle" doesn't mean that much. "System Power Management Controller" is what "SPMC" stands for in the first place. Sponsored by: The FreeBSD Foundation --- sys/dev/acpica/acpi_spmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index d6d4f2d34f2f..206d3a843f53 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -206,8 +206,8 @@ acpi_spmc_probe(device_t dev) if (sc->dsm_sets == 0) return (ENXIO); - device_set_descf(dev, "Low Power S0 Idle (DSM sets 0x%x)", - sc->dsm_sets); + device_set_descf(dev, "System Power Management Controller " + "(DSM sets 0x%x)", sc->dsm_sets); return (0); } From nobody Tue Mar 31 16:51:02 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flYzB4mXWz6WLXX for ; Tue, 31 Mar 2026 16:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flYzB3ZyWz44NH for ; Tue, 31 Mar 2026 16:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774975862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKi5gosmR7eC95az/xh5Vc91tKllzB5r4xPXMA7T8Ac=; b=Y2dCZotm34lEpnGQwFgIRhgGRs63c7M70qvbmedlSqHF+gdc7EMEETCYXudEmbOHakTVa2 KOuQI9rF8L8TnrGki1Pzd7BtyHUMejkRMQfP4+12p+P/0BIbSXjjIg5vPafNLWwxC14HFl UZ5IDAXEDiPoFuNMFAjbH2D1w+qM3puQTxYBqg6nrLNSocLRv2Kh8Xpq8zZBP42MhASLvs 4xkVuTaC71GgVzYC12fSm1nBXBvjCs3M6nrOBu8C4rAbHZF9OXhyjBJRhgtRyN2h1KWGgX 656Y3UHC+HfEc2MSvggBAELKYHRo+ePiDRMA6MGqw50xU5R4i/54FN9rul0upQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774975862; a=rsa-sha256; cv=none; b=OZ4vvosDgGFxw3wYL22n4vA3PXW3fcqN2JYGEwmlgbzC0mhzW03Gw5sCWIoWl/oKabHVYN wYdBcqKymXlDSPye9wVUI+yvQU3obBgajENGanIUC5ESoxmnhyFI6DUzSI/dBGn5FDwEqu ktI7dWmMVLP71vgWTYHtu8q2S8mHeyqfsXjuPg/sCdlvaj9YlutmvS6d967aNANgyQeGjS kwj/fTvOAiAISLBVE6jQ/QYY+vBPvyBTzr+pbXztcq1f1Sf5IxtkLnByGY2zYTqocrEti+ u8Vk/j29Ziej+yvftBLqRQD9iY7xWGinijpyfbgRr0jB/RjR0ZBrX9nQqt/ziw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774975862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKi5gosmR7eC95az/xh5Vc91tKllzB5r4xPXMA7T8Ac=; b=sLR9BKlaMHSDL+YmL5KFPwvAdgqdXEF/6LcVqe9rkBuhliicapslHCRqP/KjHYgsp2s8cF ScYQDShTjZA1PezkuzH4EZ7WGcJqvDaYgcHRRmrJ2uv9ljy5J/svImteR33Pag0fFHuINN kiqBi7ajSm/SnJ/lKRKjaC3/WPo8X1HZt0APDmziOMLlR79xV5gw+so4/3IbmhjCrTGvjL Ll8RNjMQ8vWf6/RW9fLE1kFdXi6oVDmkWKoWAxwthnixN/JWk+ePSX8FvoKkV4KNzRvoCd mNwE/T8PdMMhNovKpchMIYENSBEUBAtmgyM9OWEsf3uGVxle2QJmiGIe+Mvh4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flYzB2xc9zdr7 for ; Tue, 31 Mar 2026 16:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 403b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 16:51:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 407b1e498018 - main - rss: make toeplitz.c standard part of the kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 407b1e4980189252fade78438aa08191a9883cdc Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 16:51:02 +0000 Message-Id: <69cbfb76.403b1.24e43318@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=407b1e4980189252fade78438aa08191a9883cdc commit 407b1e4980189252fade78438aa08191a9883cdc Author: Gleb Smirnoff AuthorDate: 2026-03-31 16:34:51 +0000 Commit: Gleb Smirnoff CommitDate: 2026-03-31 16:34:51 +0000 rss: make toeplitz.c standard part of the kernel This will fix LINT-NOIP build. This actually adds very little to the kernel text, e.g. 500 bytes on amd64. A perfect solution would be to instead declare rss_config.c as 'optional inet | inet6', but that would fail to build LINT-NOIP in several NIC drivers, that use RSS and absolutely ignore that both INET and INET6 are optional. It is very unlikely that vendors who maintain these drivers will will ever chase the holy grail of a build that doesn't support IPv4 and IPv6. Fixes: d9c55b2e8cd6b79f6926278e10a79f1bcca27a4b --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index de13b76e71a4..347dadb1545f 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4263,7 +4263,7 @@ net/route/route_temporal.c standard net/rss_config.c standard net/rtsock.c standard net/slcompress.c optional netgraph_vjc -net/toeplitz.c optional inet | inet6 +net/toeplitz.c standard net/vnet.c optional vimage net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl From nobody Tue Mar 31 17:16:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flZXk0m4Pz6WP7R for ; Tue, 31 Mar 2026 17:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flZXj4kysz49PP for ; Tue, 31 Mar 2026 17:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774977397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwGEe+qrT4WjyUQyjyPsMoCU8Tllma+nmzj2slM5BsE=; b=T2dvVsynhiA2tMBEPEUNRxtn4fdSLFGNULnitlzOGx/Ng9KZVFloZx1wkw0yNXPnaWci5F J/PzTDaaWjwobOc6p2XZ/QqCIQ24A6NOCQUkhoWIz1SQEnMXIpplDqPPG1nH89vGpDXGbF 35V0BKNkRFHksSQszWzU/R1slxfCInY5sB3Z5EvJ7mjDZPuDpQkvcVVUWmjNmUxdBypIWH srxrQTE65gTqqWAHuEa9N5VI29z2hC0mvnKMkUEbZaJyhfWBg5+pKFh7j1UTBBKonZ1jLg PzHaYQDV9srkt5n6mmgfjy07B4JcF8cYU6p4HgFMFCAgE4BHyM8mQWiPv9O5KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774977397; a=rsa-sha256; cv=none; b=n5Ab7s41D293Qg8wjgGRbr7sodBlsh8n8X9jSM6lxmX7lDEmtDfGLALfvP2RJixz2oGpip WXBsp0yfU7j9VGHwZCLEx60rXueu0fpzFhcmG/T1fdrHtCELjNIP1ak7PRH2z+XPuw53ys 4ICVRj9Wjv0rZah7C1mFuXwMN8cQMX3g1VpN5wEibaYpoGYmlbpML/abBKbBwiYPe8L2mB N5tC/isVf58Gc5x1Ch2oSPgOGVuLVAIvPGIj1XZITq9oBAY0Oyz+ss2AXDRiDqF4YJ24wK 3un2Q+JUcosVjRS0quIjOssDdjnaKB6onxoVuVctxd1DCHSxRJr0k0Fy7mN5Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774977397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwGEe+qrT4WjyUQyjyPsMoCU8Tllma+nmzj2slM5BsE=; b=AYCcksShtK5RryqjlVp1KqsN3BYutGN4gozzLfj5I2N10wcvo/HYONCsyTOqJ5gTiPzcCw hw0mmwqZur7gYgl/bKUcMhsfhDs0pWWDL1l2wwFUNMmRDv2YJlP5QxAGXODWv+sTht8X1L rViRfar0aisFYV/YkwcR4dO+KvmUjXXLjg9EZn8Dz0EYZrPZRQo952ItrKkjAGFR63xset KYgx8wRVBznldnRUkbKwdRo+P+JUsBSWPwFov7wUl/PjR3dhQkX6tx4eCO8k41quVFEWl+ v0wmaGvDyXOUS5CzrLqEpiuDn2PlTQoE1ItM/1T71MpRHTNww54pQ593AxAGpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flZXj3wjbzfhb for ; Tue, 31 Mar 2026 17:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41da3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 17:16:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Artem Bunichev From: Alexander Ziaee Subject: git: c082e5656417 - main - _exit.2: Cross-reference atexit(3) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c082e5656417945bfa567114c60969844f3d7bdf Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 17:16:32 +0000 Message-Id: <69cc0170.41da3.180fe0ca@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=c082e5656417945bfa567114c60969844f3d7bdf commit c082e5656417945bfa567114c60969844f3d7bdf Author: Artem Bunichev AuthorDate: 2026-03-31 17:09:00 +0000 Commit: Alexander Ziaee CommitDate: 2026-03-31 17:13:02 +0000 _exit.2: Cross-reference atexit(3) atexit(3) is one of the cases when _exit(2) must be used instead of exit(3). MFC after: 3 days Reviewed by: mhorne, ziaee Differential Revision: https://reviews.freebsd.org/D54467 --- lib/libc/stdlib/atexit.3 | 3 ++- lib/libsys/_exit.2 | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/libc/stdlib/atexit.3 b/lib/libc/stdlib/atexit.3 index 4ff384813550..4082c887497c 100644 --- a/lib/libc/stdlib/atexit.3 +++ b/lib/libc/stdlib/atexit.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 6, 2002 +.Dd March 31, 2026 .Dt ATEXIT 3 .Os .Sh NAME @@ -90,6 +90,7 @@ function was called by a program that did not supply a implementation. .El .Sh SEE ALSO +.Xr _exit 2 , .Xr at_quick_exit 3 , .Xr exit 3 .Sh STANDARDS diff --git a/lib/libsys/_exit.2 b/lib/libsys/_exit.2 index 6f038f79f6ea..6e46e65ac86e 100644 --- a/lib/libsys/_exit.2 +++ b/lib/libsys/_exit.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 8, 2016 +.Dd March 31, 2026 .Dt EXIT 2 .Os .Sh NAME @@ -95,9 +95,9 @@ and all current access to the controlling terminal is revoked. .Pp Most C programs call the library routine .Xr exit 3 , -which flushes buffers, closes streams, unlinks temporary files, etc., -before -calling +which flushes buffers, closes streams, unlinks temporary files, invokes +.Xr atexit 3 +handlers, etc., before calling .Fn _exit . .Sh RETURN VALUES The @@ -108,6 +108,7 @@ can never return. .Xr fork 2 , .Xr sigaction 2 , .Xr wait 2 , +.Xr atexit 3 , .Xr exit 3 , .Xr init 8 .Sh STANDARDS From nobody Tue Mar 31 17:18:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flZbM4mcQz6WPWF for ; Tue, 31 Mar 2026 17:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flZbM3g0Xz4C4v for ; Tue, 31 Mar 2026 17:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774977535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZeJMZBuu/KnLFyhPIxBvJ281k7Gfe5mUDANCW5wUuqA=; b=QGISHAGE3dFeMpvy2PVbSb0OvInFWbf8Dbqr3ijoV4qHeu0uIkA/V0OAbXoY+4ElZW+gyk 3oEkPsrjPrDyZSG8sbfdEAkL6wDJTH5zWFa4xO2k0XRuqD49w7bWq+fSmjHcmNpegoH7PR aZJ9CJ+RkGoLXogfQgfW5wBOwQ9yRUk1sLA/j0rVJosPz1EjqI6L1x6urjznZxv8l+ZJXx U5Sp22qm46gidiFZmD+er49cQ27HiGOZjV9LnQG8PVUzt7OII97fRCFwNIEBR4PBFWVcI3 L74w/JvY/JTqixSjhy4buf/sesmT8Iwr9Onyj3e9dVM5OL3UPhHqmyv0WL3cfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774977535; a=rsa-sha256; cv=none; b=J609adzus3UpVdFDXStfnFXyJpB/9ijDX1f3f+CRQEXn36CdouNn/Jq6zUSeOoBEm6xMW0 oDrlAKSp0ZYYdaBDg/WcvLCsSTnwGEBIz/Tmu+jfSBr9RowQrzOMZpU6EP51y8baT4ExnV n5p/Vww4TLcz+/hpI2u6zK3vWWuGLnIN6S5Z+Bf+hbT10RQ+97LKJXKi+q3ttpigUo7tlf Uqp+9FvRw/CQAIJlCq8PMoFO5Cx6LwCLCbSahEMSQyt/L8kgIE4OiBDWvgTg8TAd+4zOAi EUYra3yHuiC5LXAYHMwf5Y7d9LZpiieM9YWvY8/ip53DsHj4LSQv1V9JYVw0WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774977535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZeJMZBuu/KnLFyhPIxBvJ281k7Gfe5mUDANCW5wUuqA=; b=MdrVvuIDCbgEiuxEpV4JiKT0cy0nHj3NhxPQIfBiHMSFs1Mab2bLgdlSqYio9zvWXj/tpL ImUqc7Pi69BYNGHOwbuIb6LzMR4JjviNPIrmSGYmP3OTCsugdOgH8spy4YZ8Nc3DH9DY9w 4GbVznttoHnWSmvlqk1Q/5F6nZQtQIuTTSVac6kB/4ymNMfwU0WQkYNR+B0SZydTvyhHAN CBrMVcn9MnpRc718darYl/H6yDIHPpacTy8uSpLQnIlSDP6ccKO5zZkBv2xYV+N0y9x5vz ydPnF+nT+IqHv5vZdtBAs1vK9E1Q5SpTCZ/Z8NoO8TxOnK/qdJEkj0La3fU0kA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flZbM27hkzfXs for ; Tue, 31 Mar 2026 17:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4244e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 17:18:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 9b1f77e647a8 - main - Makefile.inc1: Drop AS and RANLIB variables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b1f77e647a8a31993491ba3f5a64090756b7398 Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 17:18:55 +0000 Message-Id: <69cc01ff.4244e.50963094@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9b1f77e647a8a31993491ba3f5a64090756b7398 commit 9b1f77e647a8a31993491ba3f5a64090756b7398 Author: Ed Maste AuthorDate: 2026-03-18 17:06:36 +0000 Commit: Ed Maste CommitDate: 2026-03-31 17:18:32 +0000 Makefile.inc1: Drop AS and RANLIB variables These are not used in our world and kernel build targets. We use the compiler driver for assembly, and ar adds the archive index (symbol table) automatically. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55964 --- Makefile.inc1 | 10 +++++----- share/man/man5/src.conf.5 | 1 - tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 9c6ca7cbc882..92e01389b4cd 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -224,7 +224,7 @@ MK_SYSTEM_LINKER= no .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} .endif -XBINUTILS= AS AR ELFCTL LD NM OBJCOPY RANLIB SIZE STRINGS STRIPBIN +XBINUTILS= AR ELFCTL LD NM OBJCOPY SIZE STRINGS STRIPBIN .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) && \ exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}}) @@ -240,8 +240,8 @@ MK_LLD_BOOTSTRAP= no .endif # If full paths to all standard bintuils are given, don't build LLVM binutils. -.if ${XAR:M/*} && ${XNM:M/*} && ${XOBJCOPY:M/*} && ${XRANLIB:M/*} && \ - ${XSIZE:M/*} && ${XSTRINGS:M/*} && ${XSTRIPBIN:M/*} +.if ${XAR:M/*} && ${XNM:M/*} && ${XOBJCOPY:M/*} && ${XSIZE:M/*} && \ + ${XSTRINGS:M/*} && ${XSTRIPBIN:M/*} MK_LLVM_BINUTILS_BOOTSTRAP= no .endif @@ -855,9 +855,9 @@ HMAKE+= PATH=${TMPPATH:Q} METALOG=${METALOG} -DNO_ROOT CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCXXFLAGS} ${XCFLAGS}" \ CPP="${XCPP} ${XCFLAGS}" \ - AS="${XAS}" AR="${XAR}" ELFCTL="${XELFCTL}" LD="${XLD}" \ + AR="${XAR}" ELFCTL="${XELFCTL}" LD="${XLD}" \ LLVM_LINK="${XLLVM_LINK}" NM=${XNM} OBJCOPY="${XOBJCOPY}" \ - RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ + STRINGS=${XSTRINGS} \ SIZE="${XSIZE}" STRIPBIN="${XSTRIPBIN}" .if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 33ce061a1114..c277647a925f 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1013,7 +1013,6 @@ To be able to build the system alternate binary utilities must be provided via .Ev XAR , .Ev XNM , .Ev XOBJCOPY , -.Ev XRANLIB , .Ev XSIZE , .Ev XSTRINGS , and diff --git a/tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP b/tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP index 141679d4f6a9..b30e8135d28d 100644 --- a/tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP +++ b/tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP @@ -4,7 +4,6 @@ To be able to build the system alternate binary utilities must be provided via .Ev XAR , .Ev XNM , .Ev XOBJCOPY , -.Ev XRANLIB , .Ev XSIZE , .Ev XSTRINGS , and From nobody Tue Mar 31 17:23:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flZhf5sGGz6WPqc for ; Tue, 31 Mar 2026 17:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flZhf5725z4FPm for ; Tue, 31 Mar 2026 17:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774977810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qzDEJc073YJaPHbZvDyB8rDEsCR0Jqgf0TlOuHK4SxE=; b=Z+qMmBvuEdMgtEWLEXUnjiPlZfrAAH7jM8XpIxJd5UBPJ64V1FZcEz+77MB87Ilw2INCfY Zb/Z3JMpwlH8ukCQfJBJmVFRAlOtKqAWb6WRASEFlvWbpsRnT15FuMbG7/4joOimQgLQ/M +VxYrzqYaEv5123D6hBwEj4SCN5S9nHnRf4VZl/FGqzhvAlXbQKfnCpwgTJK4V/xoAvjCm hAfaS2fbjsLRcsu7rPW2/5uCBCZaUxWzthvWNh/sI+LyFJJkhhuDi59xJN5T88WaA9yhKR laDgMSVZvCL8M4oRKK5oNQd2QlSZ86JON9/UHMI37xDpmdeolbQd8a7LBqnQxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774977810; a=rsa-sha256; cv=none; b=Iq4h1jOml9FZj5UYfaSFjD1cmYIDr4kXHxSYKjDN965pSkTbfN3kxnux9z/BjMGlJ0m8aF x3nAN90g1ynMwhW3IPaK9iVJW7cRfPn15JzMmqlfo/zUDE4Zas1n1gbKGRoZAEALUGSmm0 HulDYexX50yGKhnzbejIfEyKvdcn36LV1CKgEaKiNsTe6/lbRRgOqNgKZqDxTxRNXLLEzm 4FQxidY7ysV5DVoksZ8Oi9Cm6OR7qKIC0MEh0OyRR4vJQdcm/8hiwcqd1XGNXCSsYdX5NG KcCHbvt2NOYumWwD8l+RgrcADmui82ewdNWZxFlkh6Q4QZ/t1TaJKQzx1Lplug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774977810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qzDEJc073YJaPHbZvDyB8rDEsCR0Jqgf0TlOuHK4SxE=; b=VZIanNlYQ/fWJqaqOVzZu7ZPQbb0dXV8Ga28r8udFH+tSuI0DJR73qLAjuKq0bzN2o0j8Q HvnwFgYO5rs68pe+qRw1q0JhSj4lcJLcQJkipRrucz32OWD8g27pmQgN3yak29cZPwoMiX liTeA9BUR/KRhWx6cLdg6t78LZKoAD7TRWdass0rZGJHfETcfcrkB46kZdT5p9KnvQKSYW YZuUdCZk8kIs0bj+xqjoi1z4qVPCmWWfI0fL0wZ1ibOmA6sdlcvG9ZPDpAkpay1xHRSrPA fERFwkWfPngNoO/27EoV2GnLY5oLdaGOLXLdi15nIBTpEzJhBmh0E0WAOqCdZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flZhf4h8VzfSL for ; Tue, 31 Mar 2026 17:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43d02 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 17:23:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger Subject: git: 6087050ef52c - main - Jail sysctls: deprecate generic sysctls in favour of allow-flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6087050ef52c4e45eeec5ffd773fcc25c9c768c9 Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 17:23:30 +0000 Message-Id: <69cc0312.43d02.7e1d559a@gitrepo.freebsd.org> The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=6087050ef52c4e45eeec5ffd773fcc25c9c768c9 commit 6087050ef52c4e45eeec5ffd773fcc25c9c768c9 Author: Alexander Leidinger AuthorDate: 2026-03-31 17:20:25 +0000 Commit: Alexander Leidinger CommitDate: 2026-03-31 17:23:26 +0000 Jail sysctls: deprecate generic sysctls in favour of allow-flags - add a missing sysctl to the deprecated list - add a comment to not add new generic sysctls and point to SYSCTL_JAIL_PARAM instead Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D51150 --- sys/kern/kern_jail.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 369b6aca926c..9f78cb42aeb1 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -4988,6 +4988,10 @@ sysctl_jail_default_allow(SYSCTL_HANDLER_ARGS) return (0); } +/* + * Do not add more here. Use SYSCTL_JAIL_PARAM (allow flags for jails) + * instead. + */ SYSCTL_PROC(_security_jail, OID_AUTO, set_hostname_allowed, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_SET_HOSTNAME, sysctl_jail_default_allow, "I", @@ -5015,7 +5019,7 @@ SYSCTL_PROC(_security_jail, OID_AUTO, mount_allowed, SYSCTL_PROC(_security_jail, OID_AUTO, mlock_allowed, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_MLOCK, sysctl_jail_default_allow, "I", - "Processes in jail can lock/unlock physical pages in memory"); + "Processes in jail can lock/unlock physical pages in memory (deprecated)"); static int sysctl_jail_default_level(SYSCTL_HANDLER_ARGS) From nobody Tue Mar 31 19:56:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flf5k6WbZz6Ww1B for ; Tue, 31 Mar 2026 19:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flf5k5tFKz3Mvp for ; Tue, 31 Mar 2026 19:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774987018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tdhwBtxwT928GBxm3dmTWdmBTqRHsD2OMuyf+eWoIQ0=; b=uA4XGNB2SOtk20Kg9i4elceEpkIe4dMJi+wNHs/JK6+FgttnG1wfO0LhgB+7cmDukZebTi Sd+RFhVgF58DC6W3zy/RgfU6KNPoyYjCEnzRlBSElQ6Qu61yX4wLxELufG30V5JtGxLb4C TWLVYsxuw9ORJ0SNHRRGmK0vJ7dVSd95daW8vhybdLKp5Rwa97GMWrIHKkslJIO0ZjkjE5 GtBePhcwGznRtt1ybBRIJ497hUquKvyr1m4HBxfEWca363hTUudRMUDDyGOtaezHyrI7iU d/P024IN+rVEUlsLuEc/ASw8LbVkcNWcp2UJMWMLcMgEhdqijub7nDC6HgqpAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774987018; a=rsa-sha256; cv=none; b=wApOwU9A7dj2C+wDtVJqOwHYPH0kvrNL+WHmzt2rUP6It/2Uc1VmevzW1InnymccleQtxU b2onz2+R8pySy/NHCQgajMe7fo5C2JW6Sl5zHlmMvyjYn3ZPxuwu4U5Y0bzOZu3z5NfEE0 Q++kwvNVgDSbZd1t076rKMxk6Moehg2S0DoIogckisdS6+EqivR7YcRbCqHAtkS0bzPBht izOZnyUW2vD3vieaEYJl9OQ4LIQRoxm0BhoOnf6r8OGm0WJg1eWvDp2kxfvAkL00eCaW7y NSLpTd4MfScH9zyRLjNsSPdGTiJN9vlz0uX1pIt1fyQdkrK6nEXiX/2mfYrV+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774987018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tdhwBtxwT928GBxm3dmTWdmBTqRHsD2OMuyf+eWoIQ0=; b=q7wof6ZKgDg+mCszaxXmaaxMC3V3R2PSaE+kJAx6DCAgwzfF3lPbv8Jidn+qYbQyNQO0IH YZEwlLwrfZLQO9erFYP5eIfzP1RqOXZj/9UthY0YCQvIQEN0FFqFjih6fUk5KNf0xxXmVL G5z3tW7MD4uLvUZbr2moae5CfACwtrEUkcYsqsAXMlyWvLpXGnboLWBD7kIVok5g0xBSh8 sJvOtzuD8L7tQfrnTxyYhGvTH6ZlJqk0giPqZjKPVrK47F9dpkd/xlzgMJ6PFOFaqZwFpR T39szKe/ENVs6dzxNlIPGzxdFOzZUtPL0h1toK4/TjC5q21sHLVUdSnbiqonrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flf5k5BBfzkCb for ; Tue, 31 Mar 2026 19:56:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21feb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 19:56:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: be79a42275ca - main - malloc.9: adjust flag table indentation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be79a42275cad21c6087d8bbd6a328735ea813fa Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 19:56:58 +0000 Message-Id: <69cc270a.21feb.13c11683@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=be79a42275cad21c6087d8bbd6a328735ea813fa commit be79a42275cad21c6087d8bbd6a328735ea813fa Author: Mitchell Horne AuthorDate: 2026-03-31 19:42:55 +0000 Commit: Mitchell Horne CommitDate: 2026-03-31 19:55:37 +0000 malloc.9: adjust flag table indentation The current indentation is shorter than all but one of these flags. This renders much more nicely. MFC after: 3 days --- share/man/man9/malloc.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index 01d224fc3cb3..06f5ed4ef360 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -222,7 +222,7 @@ The argument further qualifies .Fn malloc Ns 's operational characteristics as follows: -.Bl -tag -width indent +.Bl -tag -width "M_USE_RESERVE" .It Dv M_ZERO Causes the allocated memory to be set to all zeros. .It Dv M_NODUMP From nobody Tue Mar 31 19:56:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flf5q311vz6Wvxr for ; Tue, 31 Mar 2026 19:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flf5q0ZTjz3NFq for ; Tue, 31 Mar 2026 19:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774987023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RpNiBK0OFMXEky3WtGFc+w2zEq2wyNtti7OW426G2NE=; b=nqq7XRHHi7pH2jNOPN5kkzAnZO0Bm7WjuJv1N/GuyOK75i/53I2PhoO0AHK6AuMOkuNrgG 28W5dWg9QK+tsSqQp5XL9VfcHbnJ+8Zh0/t5WeP+ssmXwFb3G2qDnVTlNFKW1JDdzeY2zC uJlbTrWPIjN/R1Pi+SF6Bm+jvcUcd3znpjx3bL9kSQ/l14KOAMoYPVZ3u/TIhSnWMqNSNQ uybPTBpekYbhrQCut68nE3xL8YS884c84OT6nPSWADIXQ1Lx09HXUbUkZmNRwSnY8KOU/O ASMcDJW5MR0xvI3rVwaNtzpubaWOcDiOdTgFnTLfrFJ1D1K8CC+ZtAwQQO3RDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774987023; a=rsa-sha256; cv=none; b=NirVasuamY+skAi9ng302e5Cs9/HZH1eIFRynwDpdF6XxIK27PWgM6ervgcNWVNFcbhzgs JPpRf9e7PnCTSG+YITblkm1HaUmOnJ/pv7smJ0EVT3OgaJFjxUmqcmZPGWpYygFymU8Qe3 YRA+Ubk3O3IdbUuHqHgesh6fpYjUeKK8PgKjkGsNlRUg4YFNKcyUdPhNrVg2kfpAyuzhKf dTo7sIVSrzXYwL1KB2mCrCZ0AmWDA6FSW5v0C//lFwIPO+R4EgwcqAUeob9pFWN2oIbxkF FUlR7yQFcnPZtUdq/7qf10+xgUGGa3opQVAcykLZq5rQJbF/j85nzEfmVZi9cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774987023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RpNiBK0OFMXEky3WtGFc+w2zEq2wyNtti7OW426G2NE=; b=W9cmm8BYXIFztkERo1rcY/aPRGsoyAeqBC0ZiYf5DBrpB2Xs6TnQvTPAuYwFZVi81KstgY 2yKHZLdClfUAAs21tJ252Fnyo0ZTIC3lacOuY0aN7fE5SoRgOdI/92Hf6cl1JJsUPFxugJ IINAcxJR4XgzpjECFRPM11MHmEu5x4wzy2FJDNXA/BtofPY6+o+QqT8xh9cO+7E4Zl27Gb vlQ6WwXdisWzVPDphw0RByt1nWtgSayYXfUWi7I0XciLeUXNuLqAIxVBn0NO5XWO+kyH9Y SQhv23gVkmwfFr2h6FsVTe2tUKMZUMm4M1BQzYF7kYtGLRTiuu+SFzRKdwN8dA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flf5p5cq2zkmQ for ; Tue, 31 Mar 2026 19:57:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23772 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 19:56:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Tetsuya Uemura From: Mitchell Horne Subject: git: 84c68dbb59df - main - bcm2835_virtgpio: Add driver for virtual GPIO controller on some RPi models List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84c68dbb59df81d5371f0d1eea888d30561d428d Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 19:56:57 +0000 Message-Id: <69cc2709.23772.7a69904e@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=84c68dbb59df81d5371f0d1eea888d30561d428d commit 84c68dbb59df81d5371f0d1eea888d30561d428d Author: Tetsuya Uemura AuthorDate: 2026-03-30 15:24:38 +0000 Commit: Mitchell Horne CommitDate: 2026-03-31 19:54:21 +0000 bcm2835_virtgpio: Add driver for virtual GPIO controller on some RPi models This driver enables bcm2835-virtgpio GPIO controller found on RPi3B and some CM boards. On which, the ACT (green) LED is connected to this controller. It is essential for FreeBSD to have this driver to control this LED. It will be exposed via gpioled(4). Reviewed by: mhorne MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51456 --- sys/arm/broadcom/bcm2835/bcm2835_firmware.h | 12 + sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c | 347 ++++++++++++++++++++++++ sys/conf/files.arm64 | 1 + 3 files changed, 360 insertions(+) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_firmware.h b/sys/arm/broadcom/bcm2835/bcm2835_firmware.h index 8c77dac7d710..13116999d38c 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_firmware.h +++ b/sys/arm/broadcom/bcm2835/bcm2835_firmware.h @@ -195,6 +195,18 @@ union msg_set_gpio_config { } resp; }; +#define BCM2835_FIRMWARE_TAG_GET_GPIOVIRTBUF 0x00040010 +#define BCM2835_FIRMWARE_TAG_SET_GPIOVIRTBUF 0x00048020 + +union msg_gpiovirtbuf { + struct { + uint32_t addr; + } req; + struct { + uint32_t addr; + } resp; +}; + int bcm2835_firmware_property(device_t, uint32_t, void *, size_t); #endif diff --git a/sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c b/sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c new file mode 100644 index 000000000000..64ce6fda6306 --- /dev/null +++ b/sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c @@ -0,0 +1,347 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Tetsuya Uemura + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * This is a driver for bcm2835-virtgpio GPIO controller device found on some + * Raspberry Pi models (listed below but not limited to). On which, the green + * LED (ACT) is connected to this controller. With the help of this driver, a + * node corresponding to the green LED will be created under /dev/led, allowing + * us to control it. + * + * Applicable models (according to the FDTs of those models): + * Compute Module 2 (CM2) + * 3 Model B (not 3B+) + * Compute Module 3 (CM3) and possibly 3+ (CM3+) + * Compute Module 4 SODIMM (CM4S) + */ + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "gpio_if.h" + +#define RPI_VIRT_GPIO_PINS 2 + +struct rpi_virt_gpio_softc { + device_t busdev; + device_t firmware; + struct mtx sc_mtx; + + void *vaddr; /* Virtual address. */ + vm_paddr_t paddr; /* Physical address. */ + + struct gpio_pin gpio_pins[RPI_VIRT_GPIO_PINS]; + uint32_t state[RPI_VIRT_GPIO_PINS]; +}; + +#define RPI_VIRT_GPIO_LOCK(_sc) mtx_lock_spin(&(_sc)->sc_mtx) +#define RPI_VIRT_GPIO_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->sc_mtx) + +static struct ofw_compat_data compat_data[] = { + {"brcm,bcm2835-virtgpio", 1}, + {NULL, 0} +}; + +static device_t +rpi_virt_gpio_get_bus(device_t dev) +{ + struct rpi_virt_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} + +static int +rpi_virt_gpio_pin_max(device_t dev, int *maxpin) +{ + *maxpin = RPI_VIRT_GPIO_PINS - 1; + + return (0); +} + +static int +rpi_virt_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) +{ + if (pin >= RPI_VIRT_GPIO_PINS) + return (EINVAL); + + *caps = GPIO_PIN_OUTPUT; + + return (0); +} + +static int +rpi_virt_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) +{ + if (pin >= RPI_VIRT_GPIO_PINS) + return (EINVAL); + + *flags = GPIO_PIN_OUTPUT; + + return (0); +} + +static int +rpi_virt_gpio_pin_set(device_t dev, uint32_t pin, uint32_t value) +{ + struct rpi_virt_gpio_softc *sc; + uint32_t *ptr; + uint16_t on, off; + + if (pin >= RPI_VIRT_GPIO_PINS) + return (EINVAL); + + sc = device_get_softc(dev); + + RPI_VIRT_GPIO_LOCK(sc); + on = (uint16_t)(sc->state[pin] >> 16); + off = (uint16_t)sc->state[pin]; + + if (bootverbose) + device_printf(dev, "on: %hu, off: %hu, now: %d -> %u\n", + on, off, on - off, value); + + if ((value > 0 && on - off != 0) || (value == 0 && on - off == 0)) { + RPI_VIRT_GPIO_UNLOCK(sc); + return (0); + } + + if (value > 0) + ++on; + else + ++off; + + sc->state[pin] = (on << 16 | off); + ptr = (uint32_t *)sc->vaddr; + ptr[pin] = sc->state[pin]; + RPI_VIRT_GPIO_UNLOCK(sc); + + return (0); +} + +static int +rpi_virt_gpio_pin_get(device_t dev, uint32_t pin, uint32_t *val) +{ + struct rpi_virt_gpio_softc *sc; + uint32_t *ptr, v; + + if (pin >= RPI_VIRT_GPIO_PINS) + return (EINVAL); + + sc = device_get_softc(dev); + + ptr = (uint32_t *)sc->vaddr; + RPI_VIRT_GPIO_LOCK(sc); + v = ptr[pin]; + RPI_VIRT_GPIO_UNLOCK(sc); + *val = ((uint16_t)(v >> 16) - (uint16_t)v) == 0 ? 0 : 1; + + return (0); +} + +static int +rpi_virt_gpio_pin_toggle(device_t dev, uint32_t pin) +{ + int rv; + unsigned int val; + + if (pin >= RPI_VIRT_GPIO_PINS) + return (EINVAL); + + rv = rpi_virt_gpio_pin_get(dev, pin, &val); + if (rv != 0) + return (rv); + + rv = rpi_virt_gpio_pin_set(dev, pin, val == 0 ? 1 : 0); + + return (rv); +} + +static int +rpi_virt_gpio_probe(device_t dev) +{ + device_t firmware; + phandle_t gpio; + union msg_gpiovirtbuf cfg; + int rv; + + if (ofw_bus_status_okay(dev) == 0) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + gpio = ofw_bus_get_node(dev); + if (OF_hasprop(gpio, "gpio-controller") == 0) + return (ENXIO); + + /* Check whether the firmware is ready. */ + firmware = device_get_parent(dev); + rv = bcm2835_firmware_property(firmware, + BCM2835_FIRMWARE_TAG_GET_GPIOVIRTBUF, &cfg, sizeof(cfg)); + if (rv != 0) + return (ENXIO); + + device_set_desc(dev, "Raspberry Pi Virtual GPIO controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +rpi_virt_gpio_attach(device_t dev) +{ + struct rpi_virt_gpio_softc *sc; + union msg_gpiovirtbuf cfg; + int i, rv; + + sc = device_get_softc(dev); + sc->firmware = device_get_parent(dev); + mtx_init(&sc->sc_mtx, "Raspberry Pi virtgpio", NULL, MTX_SPIN); + + /* + * According to the Linux source at: + * https://github.com/raspberrypi/linux/blob/rpi-6.12.y/drivers/gpio/gpio-bcm-virt.c + * it first attempts to set the pre-allocated physical memory address + * in the firmware. If it is successfully acquired, access virtgpio via + * the virtual memory address mapped to that physical address. + * + * If the above fails, then as a fallback, attempts to obtain a + * physical memory address for accessing virtgpio from the firmware. + * And if obtained, link it to a virtual memory address and access + * virtgpio via it. + * + * An OpenWRT virtgpio driver I happened to see at first only + * implemented the fallback method. Then I implemented this method on + * FreeBSD and tested it with the 20240429 firmware, but it didn't + * work. + * + * At this point, I realised the first method in the source above. So I + * implemented this method on FreeBSD and tested it, and it worked. In + * my opinion, the second method was used until some time prior to + * 20240429, and then the firmware was modified and the first method + * was introduced. In my driver, only the first method exists. + */ + + /* Allocate a physical memory range for accessing virtgpio. */ + sc->vaddr = contigmalloc( + PAGE_SIZE, /* size */ + M_DEVBUF, M_ZERO, /* type, flags */ + 0, BCM2838_PERIPH_MAXADDR, /* low, high */ + PAGE_SIZE, 0); /* alignment, boundary */ + if (sc->vaddr == NULL) { + device_printf(dev, "Failed to allocate memory.\n"); + return ENOMEM; + } + sc->paddr = vtophys(sc->vaddr); + /* Mark it uncacheable. */ + pmap_change_attr((vm_offset_t)sc->vaddr, PAGE_SIZE, + VM_MEMATTR_UNCACHEABLE); + + if (bootverbose) + device_printf(dev, + "KVA alloc'd: virtual: %p, phys: %#jx\n", + sc->vaddr, (uintmax_t)sc->paddr); + + /* Set this address in firmware. */ + cfg.req.addr = (uint32_t)sc->paddr; + rv = bcm2835_firmware_property(sc->firmware, + BCM2835_FIRMWARE_TAG_SET_GPIOVIRTBUF, &cfg, sizeof(cfg)); + if (bootverbose) + device_printf(dev, "rv: %d, addr: 0x%x\n", rv, cfg.resp.addr); + if (rv != 0 || cfg.resp.addr != 0) + goto fail; + + /* Pins only support output. */ + for (i = 0; i < RPI_VIRT_GPIO_PINS; i++) { + sc->gpio_pins[i].gp_pin = i; + sc->gpio_pins[i].gp_caps = sc->gpio_pins[i].gp_flags + = GPIO_PIN_OUTPUT; + } + sc->busdev = gpiobus_add_bus(dev); + if (sc->busdev == NULL) + goto fail; + + bus_attach_children(dev); + return (0); + +fail: + /* Release resource if necessary. */ + free(sc->vaddr, M_DEVBUF); + mtx_destroy(&sc->sc_mtx); + + return (ENXIO); +} + +static int +rpi_virt_gpio_detach(device_t dev) +{ + return (EBUSY); +} + +static device_method_t rpi_virt_gpio_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rpi_virt_gpio_probe), + DEVMETHOD(device_attach, rpi_virt_gpio_attach), + DEVMETHOD(device_detach, rpi_virt_gpio_detach), + + /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, rpi_virt_gpio_get_bus), + DEVMETHOD(gpio_pin_max, rpi_virt_gpio_pin_max), + DEVMETHOD(gpio_pin_getcaps, rpi_virt_gpio_pin_getcaps), + DEVMETHOD(gpio_pin_getflags, rpi_virt_gpio_pin_getflags), + DEVMETHOD(gpio_pin_set, rpi_virt_gpio_pin_set), + DEVMETHOD(gpio_pin_get, rpi_virt_gpio_pin_get), + DEVMETHOD(gpio_pin_toggle, rpi_virt_gpio_pin_toggle), + + DEVMETHOD_END +}; + +static driver_t rpi_virt_gpio_driver = { + "gpio", + rpi_virt_gpio_methods, + sizeof(struct rpi_virt_gpio_softc), +}; + +EARLY_DRIVER_MODULE(rpi_virt_gpio, bcm2835_firmware, rpi_virt_gpio_driver, + 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index cb326a2229a4..2a607748db8d 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -629,6 +629,7 @@ arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 | arm/broadcom/bcm2835/bcm2838_pci.c optional soc_brcm_bcm2838 fdt pci arm/broadcom/bcm2835/bcm2838_xhci.c optional soc_brcm_bcm2838 fdt pci xhci arm/broadcom/bcm2835/raspberrypi_gpio.c optional soc_brcm_bcm2837 gpio fdt | soc_brcm_bcm2838 gpio fdt +arm/broadcom/bcm2835/raspberrypi_virtgpio.c optional soc_brcm_bcm2837 gpio fdt | soc_brcm_bcm2838 gpio fdt contrib/vchiq/interface/compat/vchi_bsd.c optional vchiq soc_brcm_bcm2837 fdt \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c optional vchiq soc_brcm_bcm2837 fdt \ From nobody Wed Apr 1 01:47:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flntP21BCz6YVlq for ; Wed, 01 Apr 2026 01:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flntP1Dtfz43q8 for ; Wed, 01 Apr 2026 01:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775008061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nS08LRf6WvIgHCINkirX4Z/cgkaxt+malPcqD82ZjnA=; b=VSzcIVBY7bYsLP0ACydffYAaIkX1hOVOxldXdvXORieQML+T+g6uy8aPvnzFDItlsFoTAH VW3or2RDLDJ+K8MOjScYgl3/n5zjcVUB4MeNys9QPGKu8jHSkzIFUJNyBgiJVEQa4lLuZk 6oEhJeegmccXRQ17MAY0Brq8+3Jr0nBWStTQtIZN/PMo2fQDSPekAmcccNjdphT1ooTshf KTTnfnpbAUw+no2XYV8GqJVQQgK7tlT7SP6CC2Aod0h2U3jjjmumgo8ddvEpVi5Xi1UqmX 65aTGKxTpiQy3saziI3AaKUSY/rfkKAE2+wFyNTUjCRZrDzcochS7ACub49e0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775008061; a=rsa-sha256; cv=none; b=KYGlnioeafo9HDVvjtqj+p6KEUgS2gynYX39kYZq6CZ9PbWYPg/bKnyHJb2ZFzHO8tFUK0 eFB4o5pFm/17hqrB9Tbx2nEo9ZXvUps3dSyNEPXivRmgRmfi8DnxNPSZw7Q2NK/7QrKPuN y9BobkwZvmjhuT5ZQyluKlQqJ52BU67pSkcu8P/Rcub5mJyF0iLFEy+Heoebh2sJgqTwso oOa5rHEoUbRlO1HJdmOXLrZA/8mUPzsS0J5502gvIzjI/3uI6Bfv9/TCnk1r8vimk/SSWW tlJRcALjD/AcsMlxMIgKIKgoEGnYUesy+NE5a7x/595F36IVZuyzXNpgiiGiCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775008061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nS08LRf6WvIgHCINkirX4Z/cgkaxt+malPcqD82ZjnA=; b=VE6RlLhRPegVFDRf8XCBCjQYQHevz9de99uWP4WBF0phplaXWN3FPgY4lAKAJ1tNjT0vk0 4JCqYpEgVQ+gps+m2lCb3ZHfU/cpnuaMYuIwllYCr8QS3Rcd8O3z3YOhTKvLdXKjiwQkL7 oRr4eFCLPk2485qJLvFxM5NQuxvC1xUsbtt912PjP06Hmeq0zCR08rkepvGqheFrH46jUQ KuwQmTqZ9FWdccKVw8Wwb8foVoc0V73y9cIDzCsWgdxuTWqrf4Afvq2J7lRImKwCaUUOlt R6niNeZUSKEI+ja1rWLg0WFOJBGIfk23EwCtZDJMBIaJoK2hqf8KOsMBErGfXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flntP0mv1zv7K for ; Wed, 01 Apr 2026 01:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c60 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 01:47:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: f81c1f4339cd - main - MFV: xz 5.8.3. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f81c1f4339cd20ea89dad51c0f7d96e0e34313a9 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 01:47:36 +0000 Message-Id: <69cc7938.26c60.4fd59079@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=f81c1f4339cd20ea89dad51c0f7d96e0e34313a9 commit f81c1f4339cd20ea89dad51c0f7d96e0e34313a9 Merge: be79a42275ca 788f701923e8 Author: Xin LI AuthorDate: 2026-04-01 01:45:14 +0000 Commit: Xin LI CommitDate: 2026-04-01 01:45:14 +0000 MFV: xz 5.8.3. Security: CVE-2026-34743 MFC after: 3 days contrib/xz/ChangeLog | 477 ++++++++++++++++++++++ contrib/xz/THANKS | 5 + contrib/xz/src/common/tuklib_gettext.h | 4 +- contrib/xz/src/common/tuklib_integer.h | 19 +- contrib/xz/src/common/tuklib_mbstr_wrap.h | 4 +- contrib/xz/src/common/tuklib_open_stdxxx.h | 2 +- contrib/xz/src/liblzma/api/lzma/version.h | 2 +- contrib/xz/src/liblzma/check/crc32_fast.c | 2 +- contrib/xz/src/liblzma/check/crc_x86_clmul.h | 2 +- contrib/xz/src/liblzma/common/index.c | 21 + contrib/xz/src/liblzma/liblzma.pc.in | 1 + contrib/xz/src/liblzma/rangecoder/range_decoder.h | 1 + contrib/xz/src/xz/file_io.c | 3 +- contrib/xz/src/xz/main.c | 10 + lib/liblzma/config.h | 10 +- 15 files changed, 541 insertions(+), 22 deletions(-) diff --cc lib/liblzma/config.h index af0ee2fefb39,000000000000..db2d4e9c6a0d mode 100644,000000..100644 --- a/lib/liblzma/config.h +++ b/lib/liblzma/config.h @@@ -1,658 -1,0 +1,662 @@@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* How many MiB of RAM to assume if the real amount cannot be determined. */ +#define ASSUME_RAM 128 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* FreeBSD - disabled intentionally */ +/* #undef ENABLE_NLS */ + +/* Define to 1 if ARM64 CRC32 instruction is supported. See configure.ac for + details. */ +/* #undef HAVE_ARM64_CRC32 */ + +/* Define to 1 if bswap_16 is available. */ +/* #undef HAVE_BSWAP_16 */ + +/* Define to 1 if bswap_32 is available. */ +/* #undef HAVE_BSWAP_32 */ + +/* Define to 1 if bswap_64 is available. */ +/* #undef HAVE_BSWAP_64 */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +#ifndef WITHOUT_CAPSICUM +/* Define to 1 if you have the 'cap_rights_limit' function. */ +#define HAVE_CAP_RIGHTS_LIMIT 1 +#endif + +/* Define to 1 if the system has the type 'CC_SHA256_CTX'. */ +/* #undef HAVE_CC_SHA256_CTX */ + +/* Define to 1 if you have the 'CC_SHA256_Init' function. */ +/* #undef HAVE_CC_SHA256_INIT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define to 1 if crc32 integrity check is enabled. */ +#define HAVE_CHECK_CRC32 1 + +/* Define to 1 if crc64 integrity check is enabled. */ +#define HAVE_CHECK_CRC64 1 + +/* Define to 1 if sha256 integrity check is enabled. */ +#define HAVE_CHECK_SHA256 1 + +/* Define to 1 if you have the 'clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if 'CLOCK_MONOTONIC' is declared in . */ +#define HAVE_CLOCK_MONOTONIC 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CPUID_H 1 + +/* Define to 1 if the 32-bit x86 CRC assembly files are used. */ +/* FreeBSD - only enabled for i386 */ +#if defined(__FreeBSD__) && defined(__i386__) +#define HAVE_CRC_X86_ASM 1 +#endif + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* FreeBSD - disabled intentionally */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if any of HAVE_DECODER_foo have been defined. */ +#define HAVE_DECODERS 1 + +/* Define to 1 if arm decoder is enabled. */ +#define HAVE_DECODER_ARM 1 + +/* Define to 1 if arm64 decoder is enabled. */ +#define HAVE_DECODER_ARM64 1 + +/* Define to 1 if armthumb decoder is enabled. */ +#define HAVE_DECODER_ARMTHUMB 1 + +/* Define to 1 if delta decoder is enabled. */ +#define HAVE_DECODER_DELTA 1 + +/* Define to 1 if ia64 decoder is enabled. */ +#define HAVE_DECODER_IA64 1 + +/* Define to 1 if lzma1 decoder is enabled. */ +#define HAVE_DECODER_LZMA1 1 + +/* Define to 1 if lzma2 decoder is enabled. */ +#define HAVE_DECODER_LZMA2 1 + +/* Define to 1 if powerpc decoder is enabled. */ +#define HAVE_DECODER_POWERPC 1 + +/* Define to 1 if riscv decoder is enabled. */ +#define HAVE_DECODER_RISCV 1 + +/* Define to 1 if sparc decoder is enabled. */ +#define HAVE_DECODER_SPARC 1 + +/* Define to 1 if x86 decoder is enabled. */ +#define HAVE_DECODER_X86 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the 'elf_aux_info' function. */ +/* #undef HAVE_ELF_AUX_INFO */ + +/* Define to 1 if any of HAVE_ENCODER_foo have been defined. */ +#define HAVE_ENCODERS 1 + +/* Define to 1 if arm encoder is enabled. */ +#define HAVE_ENCODER_ARM 1 + +/* Define to 1 if arm64 encoder is enabled. */ +#define HAVE_ENCODER_ARM64 1 + +/* Define to 1 if armthumb encoder is enabled. */ +#define HAVE_ENCODER_ARMTHUMB 1 + +/* Define to 1 if delta encoder is enabled. */ +#define HAVE_ENCODER_DELTA 1 + +/* Define to 1 if ia64 encoder is enabled. */ +#define HAVE_ENCODER_IA64 1 + +/* Define to 1 if lzma1 encoder is enabled. */ +#define HAVE_ENCODER_LZMA1 1 + +/* Define to 1 if lzma2 encoder is enabled. */ +#define HAVE_ENCODER_LZMA2 1 + +/* Define to 1 if powerpc encoder is enabled. */ +#define HAVE_ENCODER_POWERPC 1 + +/* Define to 1 if riscv encoder is enabled. */ +#define HAVE_ENCODER_RISCV 1 + +/* Define to 1 if sparc encoder is enabled. */ +#define HAVE_ENCODER_SPARC 1 + +/* Define to 1 if x86 encoder is enabled. */ +#define HAVE_ENCODER_X86 1 + +/* Define to 1 if __attribute__((__constructor__)) is supported for functions. + */ +#define HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR 1 + +/* Define to 1 if you have the 'futimens' function. */ +#define HAVE_FUTIMENS 1 + +/* Define to 1 if you have the 'futimes' function. */ +/* #undef HAVE_FUTIMES */ + +/* Define to 1 if you have the 'futimesat' function. */ +/* #undef HAVE_FUTIMESAT */ + +/* Define to 1 if you have the 'getauxval' function. */ +/* #undef HAVE_GETAUXVAL */ + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the 'getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the 'getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* FreeBSD - disabled intentionally */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if 'HWCAP_CRC32' is declared in . */ +/* #undef HAVE_HWCAP_CRC32 */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +/* FreeBSD - only with clang because the base gcc does not support it */ +#if defined(__clang__) && defined(__FreeBSD__) && defined(__amd64__) +#define HAVE_IMMINTRIN_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if Linux Landlock is supported. See configure.ac for details. + */ +/* #undef HAVE_LINUX_LANDLOCK */ + +/* Define to 1 if 64-bit LoongArch CRC32 instructions are supported. */ +/* #undef HAVE_LOONGARCH_CRC32 */ + +/* Define to 1 if .lz (lzip) decompression support is enabled. */ +#define HAVE_LZIP_DECODER 1 + +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 to enable bt2 match finder. */ +#define HAVE_MF_BT2 1 + +/* Define to 1 to enable bt3 match finder. */ +#define HAVE_MF_BT3 1 + +/* Define to 1 to enable bt4 match finder. */ +#define HAVE_MF_BT4 1 + +/* Define to 1 to enable hc3 match finder. */ +#define HAVE_MF_HC3 1 + +/* Define to 1 to enable hc4 match finder. */ +#define HAVE_MF_HC4 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if getopt.h declares extern int optreset. */ +#define HAVE_OPTRESET 1 + +/* Define to 1 if you have the 'pledge' function. */ +/* #undef HAVE_PLEDGE */ + +/* Define to 1 if you have the 'posix_fadvise' function. */ +#define HAVE_POSIX_FADVISE 1 + +/* Define to 1 if 'program_invocation_name' is declared in . */ +/* #undef HAVE_PROGRAM_INVOCATION_NAME */ + +/* Define to 1 if you have the 'pthread_condattr_setclock' function. */ +#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have the 'SHA256Init' function. */ +/* #undef HAVE_SHA256INIT */ + +/* Define to 1 if the system has the type 'SHA256_CTX'. */ +#define HAVE_SHA256_CTX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SHA256_H 1 + +/* Define to 1 if you have the 'SHA256_Init' function. */ +#define HAVE_SHA256_INIT 1 + +/* Define to 1 if the system has the type 'SHA2_CTX'. */ +/* #undef HAVE_SHA2_CTX */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SHA2_H */ + +/* Define to 1 if optimizing for size. */ +/* #undef HAVE_SMALL */ + +/* Define to 1 if stdbool.h conforms to C99. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if 'st_atimensec' is a member of 'struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 + +/* Define to 1 if 'st_atimespec.tv_nsec' is a member of 'struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 + +/* Define to 1 if 'st_atim.st__tim.tv_nsec' is a member of 'struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ + +/* Define to 1 if 'st_atim.tv_nsec' is a member of 'struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 + +/* Define to 1 if 'st_uatime' is a member of 'struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_UATIME */ + +/* Define to 1 to if GNU/Linux-specific details are unconditionally wanted for + symbol versioning. Define to 2 to if these are wanted only if also PIC is + defined (allows building both shared and static liblzma at the same time + with Libtool if neither --with-pic nor --without-pic is used). This define + must be used together with liblzma_linux.map. */ +/* #undef HAVE_SYMBOL_VERSIONS_LINUX */ + +/* Define to 1 if you have the 'sysctlbyname' function. */ +/* #undef HAVE_SYSCTLBYNAME */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BYTEORDER_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_CDEFS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_ENDIAN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if the system has the type 'uintptr_t'. */ +#define HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if _mm_set_epi64x and _mm_clmulepi64_si128 are usable. See + configure.ac for details. */ +#if defined(__FreeBSD__) && defined(__amd64__) +#define HAVE_USABLE_CLMUL 1 +#endif + +/* Define to 1 if you have the 'utime' function. */ +/* #undef HAVE_UTIME */ + +/* Define to 1 if you have the 'utimes' function. */ +/* #undef HAVE_UTIMES */ + +/* Define to 1 if you have the 'vasprintf' function. */ +#define HAVE_VASPRINTF 1 + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the 'wcwidth' function. */ +#define HAVE_WCWIDTH 1 + +/* Define to 1 if the system has the type '_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the '_futime' function. */ +/* #undef HAVE__FUTIME */ + +/* Define to 1 if _mm_movemask_epi8 is available. */ +#if defined(__FreeBSD__) && defined(__amd64__) +#define HAVE__MM_MOVEMASK_EPI8 1 +#endif + +/* Define to 1 if the GNU C extension __builtin_assume_aligned is supported. + */ +#define HAVE___BUILTIN_ASSUME_ALIGNED 1 + +/* Define to 1 if the GNU C extensions __builtin_bswap16/32/64 are supported. + */ +#define HAVE___BUILTIN_BSWAPXX 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 when using POSIX threads (pthreads). */ +#define MYTHREAD_POSIX 1 + +/* Define to 1 when using Windows Vista compatible threads. This uses features + that are not available on Windows XP. */ +/* #undef MYTHREAD_VISTA */ + +/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This + avoids use of features that were added in Windows Vista. */ +/* #undef MYTHREAD_WIN95 */ + +/* Define to 1 to disable debugging code. */ +#define NDEBUG 1 + +/* Name of package */ +#define PACKAGE "xz" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "xz@tukaani.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "XZ Utils" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "XZ Utils 5.8.2" ++#define PACKAGE_STRING "XZ Utils 5.8.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "xz" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://tukaani.org/xz/" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "5.8.2" ++#define PACKAGE_VERSION "5.8.3" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* The size of 'size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define to 1 if the number of available CPU cores can be detected with + cpuset(2). */ +#define TUKLIB_CPUCORES_CPUSET 1 + +/* Define to 1 if the number of available CPU cores can be detected with + pstat_getdynamic(). */ +/* #undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC */ + +/* Define to 1 if the number of available CPU cores can be detected with + sched_getaffinity() */ +/* #undef TUKLIB_CPUCORES_SCHED_GETAFFINITY */ + +/* Define to 1 if the number of available CPU cores can be detected with + sysconf(_SC_NPROCESSORS_ONLN) or sysconf(_SC_NPROC_ONLN). */ +/* #undef TUKLIB_CPUCORES_SYSCONF */ + +/* Define to 1 if the number of available CPU cores can be detected with + sysctl(). */ +/* #undef TUKLIB_CPUCORES_SYSCTL */ + +/* Define to 1 if the system supports fast unaligned access to 16-bit, 32-bit, + and 64-bit integers. */ +/* FreeBSD - derive from __NO_STRICT_ALIGNMENT */ +/* #undef TUKLIB_FAST_UNALIGNED_ACCESS */ + +/* Define to 1 if the amount of physical memory can be detected with + _system_configuration.physmem. */ +/* #undef TUKLIB_PHYSMEM_AIX */ + +/* Define to 1 if the amount of physical memory can be detected with + getinvent_r(). */ +/* #undef TUKLIB_PHYSMEM_GETINVENT_R */ + +/* Define to 1 if the amount of physical memory can be detected with + getsysinfo(). */ +/* #undef TUKLIB_PHYSMEM_GETSYSINFO */ + +/* Define to 1 if the amount of physical memory can be detected with + pstat_getstatic(). */ +/* #undef TUKLIB_PHYSMEM_PSTAT_GETSTATIC */ + +/* Define to 1 if the amount of physical memory can be detected with + sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES). */ +#define TUKLIB_PHYSMEM_SYSCONF 1 + +/* Define to 1 if the amount of physical memory can be detected with sysctl(). + */ +/* #undef TUKLIB_PHYSMEM_SYSCTL */ + +/* Define to 1 if the amount of physical memory can be detected with Linux + sysinfo(). */ +/* #undef TUKLIB_PHYSMEM_SYSINFO */ + +/* Define to 1 to use unsafe type punning, e.g. char *x = ...; *(int *)x = + 123; which violates strict aliasing rules and thus is undefined behavior + and might result in broken code. */ +/* #undef TUKLIB_USE_UNSAFE_TYPE_PUNNING */ + +/* Enable extensions on AIX, Interix, z/OS. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif ++/* Enable extensions on Cosmopolitan Libc. */ ++#ifndef _COSMO_SOURCE ++# define _COSMO_SOURCE 1 ++#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Version number of package */ - #define VERSION "5.8.2" ++#define VERSION "5.8.3" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined(__FreeBSD__) +#include +#if defined(__NO_STRICT_ALIGNMENT) +#define TUKLIB_FAST_UNALIGNED_ACCESS 1 +#endif +#include +#if _BYTE_ORDER == _BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +#endif +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ +/* #undef _LARGE_FILES */ + +/* Number of bits in time_t, on hosts where this is settable. */ +/* #undef _TIME_BITS */ + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* Define for Solaris 2.5.1 so the uint64_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT64_T */ + +/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT8_T */ + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +/* #undef __GETOPT_PREFIX */ + +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +/* #undef __MINGW_USE_VC2005_COMPAT */ + +/* Define to the type of a signed integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int32_t */ + +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + +/* Define to the type of an unsigned integer type of width exactly 16 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint16_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + +/* Define to the type of an unsigned integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint64_t */ + +/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint8_t */ + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +/* #undef uintptr_t */ From nobody Wed Apr 1 07:29:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flxTR47JMz6W7QV for ; Wed, 01 Apr 2026 07:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flxTR35hqz3dR1 for ; Wed, 01 Apr 2026 07:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775028603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ur2IU8iHwZzE3GBKC0K2NA0gTpEUaEDa8uUfBnOXf7o=; b=bsjGkIlM3u9FEOlshPIiWHNkHGDdpiHwTQgACUGqdSWM6isiweZt898wGPDfwHZOLhb3Yx zj8wL0ilbwvPRwY5bOdI6Ogv8oIUfPYX48bENYIIEU9BCRqKaW4izNZgPvybsRb4W+c2XQ EZ2SI/lMu90TS8/diQrwNKrLlgPVSX993+h6bVwxfSgHKJS+0LJTBaET81N1U61trOe8Ms nPlCOzKXqS2DVPlH3xY0HXTcTt1+XM6RDW2eAGzk8ooJiw0VVCuZwiUKu7oTt1wuag3OGo DLT17zNiuqGC5JWhpyEx5TOHRir6Wznsn/H0Zz3sFF6ySds6oS+4qHGah2663A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775028603; a=rsa-sha256; cv=none; b=Dy7tLrKOVsI4NouTFCTAUC+U1EZibMT5vq7OV0xv3L1MF8Yjt67e8VvqVWlrDJ+okQeKSX wTeSaHR7aaB9P++FQNxsII1QYQnxEPp2T2CplWYuB4BiDBzfQRQXDTf+SUiRnQhwtn/QqX DWSL9b+kSNme8XTJhqvaervGmLrTg4xD/9uqdYVZCQZ95vK2HfAtdV9/ils428N5t8Hjdr wDDA+iL/Fm+3NW1HCIBcNbzgG8gw5TA2MkQqSIPp84gq1KGvgtFJxyZQj3L0g2p8IOcPWA +1LXWZdPjWfuxAYGK3tgblA6AmK7qx2D/KDnzgBXc6gHGdywyAMpSM8lSVsK7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775028603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ur2IU8iHwZzE3GBKC0K2NA0gTpEUaEDa8uUfBnOXf7o=; b=ExsMJ+3MMiJnUv9rmfdxXAJUC9DJ4fHP2mDYvXNVMd481/fIrbfZ6v7Bb936JiWxsNyEQd fJt7kZ8dDhXI4DgBso9BtxvhnKlcLJf+PBhDrAwE+SBXIcCwg9seYUAwINPHOiuo9575xW K6HuBLRakz4g2+hHFi57e4H+MYfT2bKgxrDtJIGLcNsZeAjJNGjyKQcuuSCgaOa/p+OzHW DQ+acYfiYsj2RJwy9aLZ6e6KuKLgEOvIL7p094lfrXNuy5Ypyf2Vrjvkgm8Eqdcxr2D1ig XWsvkN1MvQKRTTZdIqYiYDxPX44SKuvQZpoNv9t5GNUkthnlJ2Q+s1ZZh64hTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flxTR2NDbz15WB for ; Wed, 01 Apr 2026 07:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24e0d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 07:29:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Weixie Cui From: Enji Cooper Subject: git: f3b59bf28504 - main - bce: Fix SYSCTL_IN error check in bce_sysctl_nvram_write() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3b59bf28504f901f4fcb568004a92c02fa371ed Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 07:29:58 +0000 Message-Id: <69ccc976.24e0d.305fe761@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f3b59bf28504f901f4fcb568004a92c02fa371ed commit f3b59bf28504f901f4fcb568004a92c02fa371ed Author: Weixie Cui AuthorDate: 2026-03-31 13:51:46 +0000 Commit: Enji Cooper CommitDate: 2026-04-01 07:29:46 +0000 bce: Fix SYSCTL_IN error check in bce_sysctl_nvram_write() The condition after SYSCTL_IN was inverted: success (error == 0) returned immediately and skipped the NVRAM write path, while failure fell through. Return only when SYSCTL_IN fails. Signed-off-by: Weixie Cui Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2113 --- sys/dev/bce/if_bce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 6cf39e035ea6..84992af0c6b8 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -8861,7 +8861,7 @@ bce_sysctl_nvram_write(SYSCTL_HANDLER_ARGS) bzero(sc->nvram_buf, sc->bce_flash_size); error = SYSCTL_IN(req, sc->nvram_buf, sc->bce_flash_size); - if (error == 0) + if (error != 0) return (error); if (req->newlen == sc->bce_flash_size) From nobody Wed Apr 1 08:13:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4flyS14RnRz6WCvg; Wed, 01 Apr 2026 08:13:53 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4flyS13fKgz3khK; Wed, 01 Apr 2026 08:13:53 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775031233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u2FNRcETE+5BEhkIP5ulDP+0JKUQQAoRsU+ud9B9rkA=; b=OtTdWNDjLmeDBXMbDYxJriRxI6PFlKh+WdENj3wZlRCeWHiRUekUWVemsosE15l9+ZDdDc 3cJY6gRo+8mnzEd+twa4wuOkrzRWYLmZkO4SAvqIS8dIf/EkcPlaZ4awNRNTi8FL2PKqud +IFx8b3OBgcOL969+KcjObcxivczltroN1Jo8qgCDjl+tl6hTIRf1rPx/rMFRUTB2l46ho F6o+acEgcDjLW7S6Stik0te+G+p8MqI3UqTNxPpNpkW44DSCDaU7HO9IDkJcwyBdcm+YqS UW05Aeu2UetiB5wYmxD+HPoRv/ZqGNc0AEOyoJvoLkD3+PLTVQCgf5pGH67t3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775031233; a=rsa-sha256; cv=none; b=Nibwm3JHoyGNFJqQzBbcx8E70gZw/xEa171XgMD7bdlPwQTwHtSBPnwXa/gxw4rOJHYkSN xE2JT+b4iV5k+MBfg3OMyM/8ETuePBv9wot60vH8H31nEE7gei+LHUMxSBGT67zs+Wyv55 06L5m2iIk2DBu5LHqB+HfQ5+/nKxkBRoojWAY6oqqmEnaC5h9ZyEY4uUA5n+3361zDuEOg Y7SJmc0y/ACpHOueREvvOtllc0mwTYrZHQLkbnEx3c0okHI5ayfTGPPJqGgI1VyDDnpiiR TCgaprDFw5Cmgk3r5SS3DsiR/eV0kJuNEDFXRWoDl2uiEqEH0/gZFl9tciRC9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775031233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u2FNRcETE+5BEhkIP5ulDP+0JKUQQAoRsU+ud9B9rkA=; b=Wh3ThlyJqOK4HIuZcNR9MsvJJr8ogXDcInjzXuzng4Hf1ob9EXLD2jU3mLSddUxnLSDGy8 lgY4JHOcDT7LQVPBBSEWMjQvKEbLeKfkiOLyGQijad4dXQGD/CMaQQpW7QTmiXDJ2FekIu JSfm5KhVrJ14BLr+WUZ48d+jk2op5bU4ROtJhnpD/CTMUvHCGSpHDWxnXxbtoZROLY4nMh HZ/H3w2C9sD0QuXyARFJM9mAgGFq+e/0oCKyznBfXuxbQ86tGDOyvDPVp+v4EeZqY7yjOH 4QS+aY/aRDqd9UCh74paL9Bu6TLg6y03F+1E8Rw5r9fZWavKtEvDGgpBVx+UcA== Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4flyS1276XzJWr; Wed, 01 Apr 2026 08:13:53 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 88FE35CA87; Wed, 01 Apr 2026 10:13:51 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jessica Clarke Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 47402c9422ec - main - cross-build: Provide mempcpy when building on macOS In-Reply-To: <69c17a22.38606.23d3192f@gitrepo.freebsd.org> (Jessica Clarke's message of "Mon, 23 Mar 2026 17:36:34 +0000") References: <69c17a22.38606.23d3192f@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 01 Apr 2026 10:13:51 +0200 Message-ID: <865x6bxfls.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jessica Clarke writes: > commit 47402c9422ec6c9ba76d96414f5a08bd35a9e1fd > Author: Jessica Clarke > AuthorDate: 2026-03-23 16:56:09 +0000 > Commit: Jessica Clarke > CommitDate: 2026-03-23 16:56:09 +0000 > > cross-build: Provide mempcpy when building on macOS >=20=20=20=20=20 > We could patch the tzcode config to not use it, but it's simple to > provide an implementation of it and avoid spreading cross-build > bootstrapping special cases. >=20=20=20=20=20 > Fixes: ff2c98b30b57 ("tzcode: Update to 2026a") > MFC after: 1 week Please merge to stable/15 and stable/14 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Wed Apr 1 11:16:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm2Vs1B4gz6WYMr for ; Wed, 01 Apr 2026 11:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm2Vs0gVkz3DCZ for ; Wed, 01 Apr 2026 11:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775042197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bCDuhT7JikDs2nMSmDlw78HXx7w6yunjul3BN5HMMjI=; b=g0WXEJGvvDxSxakXP7+O/gC/2LWDJAxK2eOKBMRFph59XXW/romoq8L3atKuY1Lk1dvRUb IHQv0fSvuHso/ZTAeM3CpdnH/PejvZwICkfdr5XJzqS/Rpap/cb7l2oL38iI7i6lZ9wbvg oMaCPEPJAze6Ob9zR2Q8EKv4NmZAFDbbQZniuVHKW6Q9SS7KZdUSmBBKyzRhUcYHz9Pkw1 sHVcZ2iYrQ+5hK6W3ixQDiM/3cQV+rlhvL8pb1pFF7fusqxCITrRwqL8wNBm83OSdVgDsf CQxkvDI68XL/3QZJ3snm4xZ1s0qbYut462biiAvif25cZdHmYy+lcFYAG+FzIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775042197; a=rsa-sha256; cv=none; b=ectcKu11NwPqEZ7aFDNhy20vpLi+8vY2WyIVYx/L3f0BcQzUHed30dwZxPmyz9oeowgIAp /4m1Wi/PC6zwJHJb4W2CGAkCF7xCpIEXaQyxzgoWSqqV3RLnNCO8xWpe2LLWIHLkBFAajj Ipyk4JrRl/m+pvOTrYou3quMWGUbcBcK7R8igktQvfKX1mjVyU65VNlQtPHosxcs6Mt5gY cX3BSfO22/1rC0LXcNQjqDoSdyg4CHqZ0SQZvAPEbinE95DiY/7Xv3u64Lml9AOI/pkVBI AMAhjt049zihMPUQ89vky6Me6BnnKOr0BlPfrMyhfT9t+yCNu3sRIWBw0gOekQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775042197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bCDuhT7JikDs2nMSmDlw78HXx7w6yunjul3BN5HMMjI=; b=j0seecHk6x3spov92tHmU3XzIcYrgd5SGQtVriIYhskpkq2NQ8QE4z3LQ5B0cMu4iHGE2L xSsyu8rx4Dz6IvRfcm+bEngaIsVXMS0sQS3wCutOqfdSxXYtWw/8sjP0L0tfenfb5t2gM4 SOSiku4TKdChzpXbMXSFv58LI9l7VKT52350KJLUP75H3cVyh/DxiKgsfz+ZAefEupLxQV SekEvABpaYFJ6fCGijBMntcyU6PKDIa/cYuSWPeOhI6eGuZ5qkpV1KXxl+sOo7Y8t3HdYZ gqvxAoUywHX46SxuuSQEGvAebntPtwyXICecE9Ym3yci1fihECxh2Wh0BPdDcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm2Vs0Gmcz1CbH for ; Wed, 01 Apr 2026 11:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43cd0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 11:16:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c6a1c1260f02 - main - pmap: Do not use PMAP_LOCK_INIT with kernel_pmap List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6a1c1260f02e44b7f44b1e3735ce5dbd785544d Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 11:16:36 +0000 Message-Id: <69ccfe94.43cd0.742774e2@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c6a1c1260f02e44b7f44b1e3735ce5dbd785544d commit c6a1c1260f02e44b7f44b1e3735ce5dbd785544d Author: Mark Johnston AuthorDate: 2026-04-01 09:15:26 +0000 Commit: Mark Johnston CommitDate: 2026-04-01 11:15:42 +0000 pmap: Do not use PMAP_LOCK_INIT with kernel_pmap The kernel_pmap lock is a bit special: it does not need the DUPOK flag, and it really belongs to a different lock class. If it belongs to the same class as regular pmap locks, then witness may report warnings when performing UMA allocations under a regular pmap lock, if the allocation triggers a pmap_growkernel() call. Replace instances of PMAP_LOCK_INIT(kernel_pmap) with inline mtx_init() calls to silence some witness warnings for harmless behaviour I see with some uncommitted test programs. Reviewed by: alc, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56185 --- sys/amd64/amd64/pmap.c | 2 +- sys/arm/arm/pmap-v6.c | 2 +- sys/arm64/arm64/pmap.c | 2 +- sys/i386/i386/pmap.c | 2 +- sys/powerpc/aim/mmu_oea.c | 2 +- sys/powerpc/aim/mmu_oea64.c | 2 +- sys/powerpc/aim/mmu_radix.c | 2 +- sys/powerpc/booke/pmap.c | 2 +- sys/riscv/riscv/pmap.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 8695dd61316e..956e9c5e78d2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2127,7 +2127,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) * DMAP_TO_PHYS()/PHYS_TO_DMAP() are functional only after * kva_layout is fixed. */ - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); if (la57) { kva_layout = kva_layout_la57; vtoptem = ((1ul << (NPTEPGSHIFT + NPDEPGSHIFT + NPDPEPGSHIFT + diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index d67267bba4e2..00f9766e9a54 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -1173,7 +1173,7 @@ pmap_bootstrap(vm_offset_t firstaddr) /* * Initialize the kernel pmap (which is statically allocated). */ - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); kernel_l1pa = (vm_paddr_t)kern_pt1; /* for libkvm */ kernel_pmap->pm_pt1 = kern_pt1; kernel_pmap->pm_pt2tab = kern_pt2tab; diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 86ef7359bbe9..678030f827dd 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1347,7 +1347,7 @@ pmap_bootstrap(void) /* Set this early so we can use the pagetable walking functions */ kernel_pmap_store.pm_l0 = pagetable_l0_ttbr1; - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); kernel_pmap->pm_l0_paddr = pmap_early_vtophys((vm_offset_t)kernel_pmap_store.pm_l0); TAILQ_INIT(&kernel_pmap->pm_pvchunk); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 2f9e6ccf43a8..fd5ac272a441 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -630,7 +630,7 @@ __CONCAT(PMTYPE, bootstrap)(vm_paddr_t firstaddr) * Count bootstrap data as being resident in case any of this data is * later unmapped (using pmap_remove()) and freed. */ - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); kernel_pmap->pm_pdir = IdlePTD; #ifdef PMAP_PAE_COMP kernel_pmap->pm_pdpt = IdlePDPT; diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index b1f74597aa42..adf5fd10e3de 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -878,7 +878,7 @@ moea_bootstrap(vm_offset_t kernelstart, vm_offset_t kernelend) /* * Initialize the kernel pmap (which is statically allocated). */ - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); for (i = 0; i < 16; i++) kernel_pmap->pm_sr[i] = EMPTY_SEGMENT + i; CPU_FILL(&kernel_pmap->pm_active); diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 22442c59fd30..247bd30e6bd4 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -1089,7 +1089,7 @@ moea64_mid_bootstrap(vm_offset_t kernelstart, vm_offset_t kernelend) CPU_FILL(&kernel_pmap->pm_active); RB_INIT(&kernel_pmap->pmap_pvo); - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); /* * Now map in all the other buffers we allocated earlier diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 85008de83870..1fc8a23269e5 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -1842,7 +1842,7 @@ mmu_radix_setup_pagetables(vm_size_t hwphyssz) vm_paddr_t l1phys; bzero(kernel_pmap, sizeof(struct pmap)); - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); vm_radix_init(&kernel_pmap->pm_radix); ptpages = allocpages(3); diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index f76f17bd8450..08516b151e6b 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -901,7 +901,7 @@ mmu_booke_bootstrap(vm_offset_t start, vm_offset_t kernelend) /*******************************************************/ /* Initialize (statically allocated) kernel pmap. */ /*******************************************************/ - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); debugf("kernel_pmap = 0x%"PRI0ptrX"\n", (uintptr_t)kernel_pmap); kernel_pte_alloc(virtual_avail, kernstart); diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 3fc261a15c06..e9f88f5d653e 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -921,7 +921,7 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) printf("pmap_bootstrap %lx %lx\n", kernstart, kernlen); - PMAP_LOCK_INIT(kernel_pmap); + mtx_init(&kernel_pmap->pm_mtx, "kernel pmap", NULL, MTX_DEF); TAILQ_INIT(&kernel_pmap->pm_pvchunk); vm_radix_init(&kernel_pmap->pm_root); From nobody Wed Apr 1 11:16:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm2Vt56xkz6WYCC for ; Wed, 01 Apr 2026 11:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm2Vt210tz3D1Q for ; Wed, 01 Apr 2026 11:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775042198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3VsU3Tk4VmBljxXzAx0SwsGS1/EtaliJyad6UD9Db8=; b=QYOTC+Tqg6A5ug0b2WbyDF2P3dGGP4ibtoGpAi7d56sK5NTL4mS1J/ljPZY/RpYA2cDC7e ZC+hyjXjEi+a7AM7SmLoNwN1LBxgvCbEoXFFhHv30EZAQaenLfnf2B96cddTKB3CsICSF7 iLzyuuhrzezARHmUrQfkIJE7P5SShHdM7Or9AWDBVJYLPdf7RfV3Ckn7gVuJGQ1wCWw+CJ Yr5s+lwEzhQAt/dFE4lSYXDuzTB/oEJDJyQ5RgUrIw3invuHSqnMmY27TvXNYDe2+MW/vR kVupvjv/a50SlCcjUubAKInAHhFfN44AXwAVX/JvoHU1iFyrjaZld8mjNDbQ+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775042198; a=rsa-sha256; cv=none; b=bOywqS+oO6rB7LraAREm5jrbFGHCBFXt4Zx9GPEd9x6O6tRlFCDXLb0WE9u8ZQYH6WFr+o h9k4v87B5buFUF7hs4IMDNNeVIVMevKmefOFjxgo0t18M5nUuRpeBatTMe8fEH6VWN5Ocp +cHTpJYkGCBOKIcBlGt0IXek8/Ht9MeuqGXQOS6j+XJaZQ5Gc1FADSkx6tg1WXfdaKjWd8 YB0eUL+bZ9D/IMDReS82RMZ1ZhB7bn0B68zHqs2ZT0JeV3b1bjR/T+rJp/NOcGu+RJa2HD Rx/w7oN1mFp/1mRUEvgdWlNoIarUIuLywrMUwb6iv+B90++X1WQtMrFUCl25iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775042198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3VsU3Tk4VmBljxXzAx0SwsGS1/EtaliJyad6UD9Db8=; b=WF9S7O2bCCXtcRETyEjKihBkCAWrp6FDb1BGnyytUh488mwD9m35zIZBSKGG3gXUnj3uaU UG3XuHIsM3pEd1wY8oQXd4Gf0laFWGP9ob/N9+O72eMqxfNccoyhXDyuefjk0uCU2Z42hK 3W+pfcbyJr5ZssY1JbRRJ4LLFUTlniODiMn/Just5NkQb7UWxw28auNKK4jTDnBdK/bjaG f+CvCCQWSuRKHGQpABWTiWfys8Mn3f32BRtsF2Ufe4+YLWNXlWwLkF3HN4ACUf3xhL3Wsb xMS59SIXS9eQjdQrwXI2Gl1tn2IvQEmMsldmo0+7RIjHzLRoNVo/+sWOmoPV0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm2Vt17hlz1CRC for ; Wed, 01 Apr 2026 11:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45285 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 11:16:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f3c772361f3b - main - vmm: Restore the ability to create VMs as root in a jail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3c772361f3b6213ec7ae7de993b6953357c7b48 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 11:16:38 +0000 Message-Id: <69ccfe96.45285.612d5bc7@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f3c772361f3b6213ec7ae7de993b6953357c7b48 commit f3c772361f3b6213ec7ae7de993b6953357c7b48 Author: Mark Johnston AuthorDate: 2026-04-01 09:25:27 +0000 Commit: Mark Johnston CommitDate: 2026-04-01 11:16:14 +0000 vmm: Restore the ability to create VMs as root in a jail The new PRIV_VMM_CREATE and DESTROY permissions should be allowed by jails, so need to be added to the list in prison_priv_check(). Then, modify vmmdev_create() to verify that the jail was created with the allow.vmm flag. This is already verified when opening /dev/vmmctl, but checking again doesn't hurt and ensures that one can't pass the allow.vmm policy by passing a vmmctl fd along a unix domain socket from outside the jail. Rename vmm_priv_check() to vmm_jail_priv_check() to make the function's purpose more clear. Reported by: novel Reviewed by: bnovkov Fixes: d4c05edd410e ("vmm: Add privilege checks to vmmctl operations") Differential Revision: https://reviews.freebsd.org/D56119 --- sys/dev/vmm/vmm_dev.c | 16 +++++++++++----- sys/kern/kern_jail.c | 8 ++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index ed8e5b2e0777..a2775023838a 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -114,7 +114,7 @@ static int devmem_create_cdev(struct vmmdev_softc *sc, int id, char *devmem); static void vmmdev_destroy(struct vmmdev_softc *sc); static int -vmm_priv_check(struct ucred *ucred) +vmm_jail_priv_check(struct ucred *ucred) { if (jailed(ucred) && (ucred->cr_prison->pr_allow & pr_allow_vmm_flag) == 0) @@ -371,7 +371,7 @@ vmmdev_open(struct cdev *dev, int flags, int fmt, struct thread *td) * A jail without vmm access shouldn't be able to access vmm device * files at all, but check here just to be thorough. */ - error = vmm_priv_check(td->td_ucred); + error = vmm_jail_priv_check(td->td_ucred); if (error != 0) return (error); @@ -940,7 +940,7 @@ sysctl_vmm_destroy(SYSCTL_HANDLER_ARGS) char *buf; int error, buflen; - error = vmm_priv_check(req->td->td_ucred); + error = vmm_jail_priv_check(req->td->td_ucred); if (error) return (error); @@ -1016,6 +1016,12 @@ vmmdev_create(const char *name, uint32_t flags, struct ucred *cred) "An unprivileged user must run VMs in monitor mode")); } + if ((error = vmm_jail_priv_check(cred)) != 0) { + sx_xunlock(&vmmdev_mtx); + return (EXTERROR(error, + "VMs cannot be created in the current jail")); + } + if (!chgvmmcnt(cred->cr_ruidinfo, 1, vm_maxvmms)) { sx_xunlock(&vmmdev_mtx); return (ENOMEM); @@ -1061,7 +1067,7 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) if (!vmm_initialized) return (ENXIO); - error = vmm_priv_check(req->td->td_ucred); + error = vmm_jail_priv_check(req->td->td_ucred); if (error != 0) return (error); @@ -1126,7 +1132,7 @@ vmmctl_open(struct cdev *cdev, int flags, int fmt, struct thread *td) int error; struct vmmctl_priv *priv; - error = vmm_priv_check(td->td_ucred); + error = vmm_jail_priv_check(td->td_ucred); if (error != 0) return (error); diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 9f78cb42aeb1..384825b7f8ac 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -4736,6 +4736,14 @@ prison_priv_check(struct ucred *cred, int priv) else return (EPERM); + case PRIV_VMM_CREATE: + case PRIV_VMM_DESTROY: + /* + * Jailed root can create and destroy VMs; the vmm module + * additionally checks for the allow.vmm flag. + */ + return (0); + case PRIV_VMM_PPTDEV: /* * Allow jailed root to manage passthrough devices. vmm(4) also From nobody Wed Apr 1 11:16:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm2Vw1LPLz6WXpB for ; Wed, 01 Apr 2026 11:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm2Vv5WPxz3D6S for ; Wed, 01 Apr 2026 11:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775042199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GThZ+8c+kY3/gcOfRD7iWJvrrNGk6PxwMVEED5/P+Q8=; b=YmTlwHpG+CxhpE4Dj9PU2Nn0qm/txDdZ4iLOSt1WvnUhNxlLL1oF4rCRII8IBnwNVC3i49 MqW67x3E2Bydg/3jjOQMnX3bDDP/j6X6wE3WqOIReXZcflEBmk0MlJZH2+mqwv8BDAWcGT um2WL8czIEucMkjJpCZFmCkoCEiPMuthu/4+F1ZVCTzpJkop240BtAxx3kZLAQlTQthRvh cypDYuWkL0RZgrBjSnaTzrZRfaf6yWPius+qmOJJfIcixQNkHDBmzp9zWx5MfbPvnkgJ7L ZAkoKmHcfQKUwFlDdZzKXeZRDCVB4hWg12E3lgtVLst4cH2U/zivevmlzgV6Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775042199; a=rsa-sha256; cv=none; b=XC0ZXksFGUIugumkJcGgOptI3gy+a7+rdcn331vJjjf1WDdYMKL2slwhOc2u1W6pXCWxJ/ ZRZzv3Y77vsSqoRGWW0dk9t1og1V2+JEdZqvJLAndjBXz3ucZrmDUm6lnXtUf2rFRSGtQH g6D4OR3pyYTEWUuJfOW6XSOsrMC8/eJA7rs0IEddv0AigurvQHleB4IT0I3TcRHltxx9aI orrJ8DTBy5s50OOTTKdcxVZBrSTkax/XWhnJvUX1J8CAQCUXZxyRnwNHpeYdS/ZkrNXbhG PLP3yyVY3U6OE9Yf4LsUM+nML1j3v4WmRKWY198b8dBAMZBCPsp+62YfhmzDvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775042199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GThZ+8c+kY3/gcOfRD7iWJvrrNGk6PxwMVEED5/P+Q8=; b=H6QW+uhRis1Yanv+mVkp+JllODWTVHZaBvyY+Mpd9M0oR8Czkg+cboc1galcwV5p5A1pVL iiANqc7vgXS23NszBoq6HIHOFouO1CyoU6A4j0HGQ5AdM3cZUJJKJRV1AK0/HYMCdWdlo3 JeY0p8sBgDe1lf48od+6ONKu5FNIRovG+EEvRPj/i2LehOrg2RuCcrRJXR7XDRT1Tf7TLc 1pm9xs1No8MRyTESN43Mpdx5MAGP6Ays25/k039rR9vtVh+59Jwu2Ej4esWijlVC77vRa7 jqLahtF1wH/15+C+x0Dzrclvvyo3MjrRP1/TOmOoYp2ThJNFI2fltqJOq8ieTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm2Vv1xPSz1CRF for ; Wed, 01 Apr 2026 11:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4441c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 11:16:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0dbbed21a643 - main - ip6_mroute: Fix the type name in sysctl_mfctable() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0dbbed21a643f6c95bebe23008a332ff68adb203 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 11:16:39 +0000 Message-Id: <69ccfe97.4441c.c78ef44@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0dbbed21a643f6c95bebe23008a332ff68adb203 commit 0dbbed21a643f6c95bebe23008a332ff68adb203 Author: Mark Johnston AuthorDate: 2026-04-01 11:13:05 +0000 Commit: Mark Johnston CommitDate: 2026-04-01 11:16:15 +0000 ip6_mroute: Fix the type name in sysctl_mfctable() No functional change since apparently it's fine to compute the size of a pointer type when the base type is undefined. Fixes: 0bb9c2b665d9 ("ip6_mroute: FIBify") --- sys/netinet6/ip6_mroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 9a7f611b8b4c..8743673fd25a 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -220,7 +220,7 @@ sysctl_mfctable(SYSCTL_HANDLER_ARGS) fibnum = curthread->td_proc->p_fibnum; return (SYSCTL_OUT(req, &V_mfctables[fibnum].mfchashtbl, - sizeof(struct mfc6c *) * MF6CTBLSIZ)); + sizeof(struct mf6c *) * MF6CTBLSIZ)); } SYSCTL_PROC(_net_inet6_ip6, OID_AUTO, mf6ctable, CTLTYPE_OPAQUE | CTLFLAG_RD, From nobody Wed Apr 1 11:58:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm3Qp2GwXz6Wcv5 for ; Wed, 01 Apr 2026 11:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm3Qp1kh5z3JCc for ; Wed, 01 Apr 2026 11:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775044690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECzsRFRrEnmwqaIU5QP1UpmKX++tjaYfm5a9O22jEb0=; b=emD9RWZQss3RdD8jLprvPG/mnQFpBgBrTpGgLHdo2btJjWt7TdHvzFo5lF6jDZ4GfUwkIn HPfKOowKbUj5eQeosHU/bpoWX1lfrnypwLtZs/ke2t6aNZhzxLDyJ6ZwBw6qL9DRv0JIWu ziwCvvOIy/weRqplrx05no28jxNw1gpcYGzDHYjOiECA7EO5o89MC1QXydqxtFBnYjCWpC gJSlGYkWSbdLPv9dvpZYlbxE4h76FaSXFgJSfYoxeEi9dpU6f+pAeQko9I0GFS1Iq3ABzT 0YDQ3Lt28d/0PbuGkuInGTaoDeNOPeCIQognX0QNKP/L+Fapl8HO/9iZ2QUXFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775044690; a=rsa-sha256; cv=none; b=vAH7VxqQJwU5vuBZeUgvhCi6DQUbLarrbuRqg1kH0pHzw5PTDeO3ZptqJ5D8sRtXKB062Y fVhYPrFecLa2PZEBtu7p48m2dspXH/Mo2z5hiZwhlFqHyT63Jc4quo3XhxE7WXWBNWEpRp C8SybDjrporBe0zuZuITKVNAnYQ1oxVc7pEE/N5rOTGIAYPeQGvJg9d/9/W5DVy0YuPQM8 yVofoeAmfV4OwW2JoEi9RZJsZcaxdG3TwEakQEUrfedg5J4HMfyCl/97nm1AkAl2pk8sa1 4gGr996XRl45vGU5LCgvqxm8Se8YJCm2U+zlJwwlHbMZR/kyEOUNGZ1/MGbPzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775044690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECzsRFRrEnmwqaIU5QP1UpmKX++tjaYfm5a9O22jEb0=; b=NE/pxCXrVQQQ7sZ17smWO1N+pfSYZbVsVoO5uZQa7PkeNbtpE9GRykIriCOIkC87FOwlcS OCJbrEMHvoXxMpoedMNbnX63fuuOtLWwWJdwOdP4fW5RItWutAT1K9c8POZaIipY1pMqYr 6LIwMk/oWDvIRyKD6AtXTUbCCa5TfgOOzOS8SPtsladzCpW3ZbS2laEgb8LAUcLf7hEkuH WHloz1xGMuWcxK+rwolwBf3SHgvcRQng6cEl0fUDcSSvSvJL4wUsU0zrLZ9SP4V2kgADRI Woxyx3EEKpTPMwUc6fAERbrbK+uvEo0FAoui+2W9LQFv2Isei8MeS3+d9Hv4TA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm3Qp0rVKzZf for ; Wed, 01 Apr 2026 11:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18573 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 11:58:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 0307db7744d4 - main - acpi_spmc: Fail probe if acpi_spmc device already attached List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0307db7744d4cfe0d610ebece226dd20fdcc4ed5 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 11:58:10 +0000 Message-Id: <69cd0852.18573.49d8a187@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=0307db7744d4cfe0d610ebece226dd20fdcc4ed5 commit 0307db7744d4cfe0d610ebece226dd20fdcc4ed5 Author: Aymeric Wibo AuthorDate: 2026-04-01 11:54:57 +0000 Commit: Aymeric Wibo CommitDate: 2026-04-01 11:54:58 +0000 acpi_spmc: Fail probe if acpi_spmc device already attached We cannot have more than one SPMC device. Reviewed by: olce Approved by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56062 --- sys/dev/acpica/acpi_spmc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index 206d3a843f53..0c2a5d9e96a9 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -190,6 +190,11 @@ acpi_spmc_probe(device_t dev) if (ACPI_ID_PROBE(device_get_parent(dev), dev, spmc_ids, &name) > 0) return (ENXIO); + if (device_get_unit(dev) > 0) { + device_printf(dev, "shouldn't have more than one SPMC"); + return (ENXIO); + } + handle = acpi_get_handle(dev); if (handle == NULL) return (ENXIO); From nobody Wed Apr 1 11:58:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm3Qq2ypdz6Wchn for ; Wed, 01 Apr 2026 11:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm3Qq1lVMz3JKn for ; Wed, 01 Apr 2026 11:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775044691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nimhxS4d9vAA7VjJm2w2Tk9j5PgHrQznnrJln1YOsjk=; b=rsat90VSwDnduA4fVdgpTMtN4odoVEz4bdAeAYj4RZ4WzuuS78/ApB5mr5xMT3Wkfzx/da hUEomD23wgSKT0yRccwIGyb9HYClg77rwpKxgQQwEHM6CvwB23Gjs+qAuaevalbi0pjWL6 VNXhgAQdnLiJG2YV12eI6YOVOmrKUmGApiwJ62ytwujEaxbzsL7xc2aTTLbgGiLzOZ851i tbHTV1vlEsDXuGMrOCcy1MXMtEmuwH9kbYBP8VKSNvI5nAQl4TyenxZWaRilVQBPY6LMyq o4RoG3ufOde7rWU3jLzS1hmncX9TeGdPAf50gSzYa9ndF36s+xnJw49nYxqkUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775044691; a=rsa-sha256; cv=none; b=qNprUCB6X0NioVv5XRqV28eTz99D5fqu3zhX5dlNxl6okXKIXlqRWEtB4LYvwIIZCBPNaE Hw6qb+6PgX4BKq8rkPikvYXq6bOph9X9ZfinVACgIMBWWz5iksNw8R9wGeoc1MOlAO+SMi q7RHvdqh8GeFWLAh/dn69FsJ6m5Ul6ZfQUyqDjD31/5yyHH1k1EmrcDwAN2wjHXlrPGULH aGRDKoHnFPrDkQHr1O+/iNc71JpyY7BEgiuMMJIN2waNbYLym86oyQ97p2Fyf6Jh+Fzl5a 6a2/vzRbQCiebw3aekS76YN6zfS68yNqziT+S5B0SL2pas9uflqkMSeSowT25Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775044691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nimhxS4d9vAA7VjJm2w2Tk9j5PgHrQznnrJln1YOsjk=; b=IO4bd6KAjGD+RGCyVzemuMZnUwXXjUmhlfVT5CtE0iZWRvLtEQVcmBTuVdi0sErRtAEstH CcJNOIyeHdzdAc1RDNdTWR1SWIQADem9is9v90QatShBGZH4VcS8Nm90z7O2mOwbaHyExl LSHTjQwB/bMHU+0iX1EqR55DVDzzXJvZtvj5rIIa42zFpgp/ua0NrTm1zQaNUypulM2Gl8 RP1ZJ/cUk21J8wp/doLw5AQi4AnXgaHEYpa6aAcMUyV51WhZLEH+EhRWLiQdIIn/tB2ila IzXlvwHqvJop4BLjBN7wyb4kMlz7WAl0b2uWRPGK671IGe19YDEtHhCtwHnjLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm3Qq117szd7 for ; Wed, 01 Apr 2026 11:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47440 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 11:58:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 683f7a8374ff - main - acpi_spmc: Call new MS turn on display DSM List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 683f7a8374ff67417ac45949bd56a12c23781232 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 11:58:11 +0000 Message-Id: <69cd0853.47440.20ef591e@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=683f7a8374ff67417ac45949bd56a12c23781232 commit 683f7a8374ff67417ac45949bd56a12c23781232 Author: Aymeric Wibo AuthorDate: 2026-04-01 11:56:03 +0000 Commit: Aymeric Wibo CommitDate: 2026-04-01 11:56:04 +0000 acpi_spmc: Call new MS turn on display DSM Microsoft added a new function index (turn on display, 9) to their DSM set. This revision calls this, which fixes S0ix on certain machines, such as the Lenovo Yoga Slim 7i Aura, who's ECs use this method as a trigger to restore power to certain devices. See commit 229ecbaac6b3 ("ACPI: x86: s2idle: Invoke Microsoft _DSM Function 9 (Turn On Display)") on Linux. Also see the following: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications#turn-on-display-notification-function-9 Reviewed by: olce Approved by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56062 --- sys/dev/acpica/acpi_spmc.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index 0c2a5d9e96a9..ca7b3bd95ead 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -45,6 +45,7 @@ enum intel_dsm_index { /* Only for Microsoft DSM set. */ DSM_MODERN_ENTRY_NOTIF = 7, DSM_MODERN_EXIT_NOTIF = 8, + DSM_MODERN_TURN_ON_DISPLAY = 9, }; enum amd_dsm_index { @@ -67,7 +68,9 @@ struct dsm_set { const char *name; int revision; struct uuid uuid; + uint64_t dsms_supported; uint64_t dsms_expected; + uint64_t extra_dsms; }; static struct dsm_set intel_dsm_set = { @@ -107,6 +110,7 @@ static struct dsm_set ms_dsm_set = { (1 << DSM_DISPLAY_ON_NOTIF) | (1 << DSM_ENTRY_NOTIF) | (1 << DSM_EXIT_NOTIF) | (1 << DSM_MODERN_ENTRY_NOTIF) | (1 << DSM_MODERN_EXIT_NOTIF), + .extra_dsms = (1 << DSM_MODERN_TURN_ON_DISPLAY), }; static struct dsm_set amd_dsm_set = { @@ -261,6 +265,8 @@ acpi_spmc_check_dsm_set(struct acpi_spmc_softc *sc, ACPI_HANDLE handle, { uint64_t dsms_supported = acpi_DSMQuery(handle, (uint8_t *)&dsm_set->uuid, dsm_set->revision); + const uint64_t min_dsms = dsm_set->dsms_expected; + const uint64_t max_dsms = min_dsms | dsm_set->extra_dsms; /* * Check if DSM set supported at all. We do this by checking the @@ -269,14 +275,19 @@ acpi_spmc_check_dsm_set(struct acpi_spmc_softc *sc, ACPI_HANDLE handle, if ((dsms_supported & 1) == 0) return; dsms_supported &= ~1; - if ((dsms_supported & dsm_set->dsms_expected) - != dsm_set->dsms_expected) { + dsm_set->dsms_supported = dsms_supported; + sc->dsm_sets |= dsm_set->flag; + + if ((dsms_supported & min_dsms) != min_dsms) device_printf(sc->dev, "DSM set %s does not support expected " "DSMs (%#" PRIx64 " vs %#" PRIx64 "). " "Some methods may fail.\n", - dsm_set->name, dsms_supported, dsm_set->dsms_expected); - } - sc->dsm_sets |= dsm_set->flag; + dsm_set->name, dsms_supported, min_dsms); + + if ((dsms_supported & ~max_dsms) != 0) + device_printf(sc->dev, "DSM set %s supports more DSMs than " + "expected (%#" PRIx64 " vs %#" PRIx64 ").", dsm_set->name, + dsms_supported, max_dsms); } static void @@ -601,6 +612,10 @@ acpi_spmc_exit_notif(device_t dev) acpi_spmc_run_dsm(dev, &amd_dsm_set, AMD_DSM_EXIT_NOTIF); if ((sc->dsm_sets & DSM_SET_MS) != 0) { acpi_spmc_run_dsm(dev, &ms_dsm_set, DSM_EXIT_NOTIF); + if (ms_dsm_set.dsms_supported & + (1 << DSM_MODERN_TURN_ON_DISPLAY)) + acpi_spmc_run_dsm(dev, &ms_dsm_set, + DSM_MODERN_TURN_ON_DISPLAY); acpi_spmc_run_dsm(dev, &ms_dsm_set, DSM_MODERN_EXIT_NOTIF); } } From nobody Wed Apr 1 12:20:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm3w21KxDz6WgHF for ; Wed, 01 Apr 2026 12:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm3w16mZYz3Lgk for ; Wed, 01 Apr 2026 12:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775046002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f1gfLG1BlsAPqwwMkCZXkiVnBSyrsjHA3xRduCsuwVI=; b=ZwUi9DQpCDy7I0tIC5Ng0GjXUTbMakoM3y3Sn5yqJiUlWyR9yAiOZb4CD7NR1rnrHm3QlU q8tyyFWefHLrWOROXKMEmWJi0HkQu8IbaY8A4OBIrMLCj1Trju5f/9nu2EPt+t8hryteL0 srL8pD8JKz9ByGfkhQaozymmPeiP0M9IuQhv4ArCGZMavBdmxP06ZF4tfIDrScsjVOaO7G qI2fLZoqqnTvbWDh9e/c1mwK0LrbBlm6nA7gYWvwCQvI5oyzTFsSB53iZNAX8JovYo9Z7z LVy7mqihlvAJ3xzlz37+M6lS4Zq9NoaR+VPAK5z0Q0NU5TZjGZHFfJKphthh0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775046002; a=rsa-sha256; cv=none; b=eOMI0hUweaJ15Qr5C5sVgOkAgqAtU2iZ/hIitTZtElMHhOu3/mXbJlxUTUvm0tJ+JOFTfR gXMOCdqsGr8jeiwTW3EJAEwN8YAwcTZA54ip0a6gKGNrHtJbFBU8sjp1ylm3CB8uU6DhDK jUwwUrxrLuX5Xdk6cOKtNDTSk5hglGzEZ8R97kQ1LN5AMdNC3x0wr2Tl16qJm55mQw7dSd EUi9ow7N6z0BJRZP2kGRIOErpkh27vVllyWtpf0i1YvnEbFI75VpwVk2Qh43vt9o/r5DSI gd30KsdgJCE3u4wRFVVMerqb2b7+R4XHnddagyYvlan37x3cvADuwz9yCJWHTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775046002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f1gfLG1BlsAPqwwMkCZXkiVnBSyrsjHA3xRduCsuwVI=; b=tGpeIzMg13ciQBnQkxs/KGPHuUXaYwU5L843UzJFC89hgKC+Az5mHsUmJ406aeKGBRIJfj oaP/6xoaCnLfHnLHyQOSCtjdrgh53yIoczxnJygf3s/K/Qw6YbzFHlYf8fAJSXPftAbizK 5agL37WuV9iiWpoU0uMOEsAfM95AUcj6Xeu+ZFItQRvPukQnWIWIHZHtWVnjBQkKFOibgo dYkoHAorzN/nU1rcrh+JnYOUHNIl87Z8bnuBes05iNgyPxe80C/feQIejkYAeVRK21R95s N70g6tNhTewSJIibLI+2DDfZBahpQAu34OIxK6Kojip9E8HbvcGc6+lzo4eydg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm3w16JmWz1Cv for ; Wed, 01 Apr 2026 12:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a157 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 12:20:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 607f6be6ec19 - main - rtadvd: Fix validation of the MTU parameter when parsing config List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 607f6be6ec19f49ff595226afe1c8aa6515c59a0 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 12:20:01 +0000 Message-Id: <69cd0d71.1a157.2cbcbd77@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=607f6be6ec19f49ff595226afe1c8aa6515c59a0 commit 607f6be6ec19f49ff595226afe1c8aa6515c59a0 Author: Mark Johnston AuthorDate: 2026-04-01 12:14:24 +0000 Commit: Mark Johnston CommitDate: 2026-04-01 12:19:35 +0000 rtadvd: Fix validation of the MTU parameter when parsing config MFC after: 1 week --- usr.sbin/rtadvd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index 83b2efb68303..c0af8f76ca49 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -619,7 +619,7 @@ getconfig_free_pfx: get_prefix(rai); MAYHAVE(val64, "mtu", 0); - if (val < 0 || val64 > 0xffffffff) { + if (val64 < 0 || val64 > 0xffffffff) { syslog(LOG_ERR, "<%s> mtu (%" PRIu64 ") on %s out of range", __func__, val64, ifi->ifi_ifname); From nobody Wed Apr 1 13:26:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm5Ng0DMHz6WmNl; Wed, 01 Apr 2026 13:26:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm5Nf6Znlz3TWn; Wed, 01 Apr 2026 13:26:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775049987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HsUwYrOlW/MFUCFmMSukW9VZzR88p7W0NZ6y83aFHT4=; b=t0iKrEISxhRt28lGvzgtf1N9kXx02e3Sh07Bl5tKFYNtldkQfscb07ZdmsF4MwjJiQ/b4i aZEun+ovlb89Hk3mUNVwvrcwukRhcgPxiQC6TUEqwhFJhkB6T7St1XboAv1+pwZzkfAi4m /xPsd/2e5ekhkSMwJtGIC9uqYRputuhQAMfvb62sbmVZrPQfrInUpRs1PyQVs55AVoTAAO wWIWp2VQNjw1X1ClpdZBp2AM8bQwgkdfd/XF1pTHgb6Tu8MTGczTFDkUsjl4ExD0RQbt78 8doVdJKzx5E4A8w0KK7pFh0roDvuw8gG3x7draouN5WMs26z/oRCRATIsvEuLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775049987; a=rsa-sha256; cv=none; b=V9GWSVnmpcy8+65IxoKHqaTOK9h8vybn4JntUFhRTwCJZAP7+5L3oG3P03775Ug+at5Voe AhzpWMmWBJ+00bf0eYN7jm7qFz7VmlRdTeJ9BCgnZ6Ddjo9g4+LLUqJjP4vkf/svysqdTo uFsB8GM2V3ixoRfckJVFuphJMCcp1M6OU+fjD8GEwmPrl1i+TmVFMae4OJGHcq1yG1IAT0 spvVQr3rfmWoPSV6k0TDWnKRzzXpb2NidHIkoh/pPtWW6kDuLrgOTAJwLEDR2VvqShdSP8 o40K1mUuJKrgP9cG5ODzhVVPcwpy4SnhD26G5hEmWJP5I0Rwm8bHQJ9Dz/7fkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775049987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HsUwYrOlW/MFUCFmMSukW9VZzR88p7W0NZ6y83aFHT4=; b=VJ4sj80IGYzWE1+ntc/tK6LhY6rPZoioRx9qgjE44N4h8lQLBRB6YaXMHg2T/TYupn80ue j1bNJ5lROVW+rL2ne0lgo7FSeXIZktKDjzm7O0KbPecppYKKyw08IpFTZ8sEI0O5jryn+g 2BPRZ7U3PMpQyuNUW8HHySnAT7M6wotFGQujecYfPKf9jBq/5mcR3XVHtHNNTFcCEz1TBA gI4L++jeLy6cz2IH6v19pAk2aXIdHaem8l50+vRE8zSKPjyHWfl5ZmrSLpZvLBWG+vVVqa wMhobBptZOM538zBpisUmCk7IRt1ZnwpNbcl1BktzOSJXJQcDQYnIQupms2/fw== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fm5Nf4xYdzQnT; Wed, 01 Apr 2026 13:26:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 53F64A64805; Wed, 01 Apr 2026 13:26:03 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 4BB632D029E9; Wed, 1 Apr 2026 13:26:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id G3kdzqxxSd8Z; Wed, 1 Apr 2026 13:26:23 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 42CA82D029D8; Wed, 1 Apr 2026 13:26:23 +0000 (UTC) Date: Wed, 1 Apr 2026 13:26:23 +0000 (UTC) From: "Bjoern A. Zeeb" To: Gleb Smirnoff cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 407b1e498018 - main - rss: make toeplitz.c standard part of the kernel In-Reply-To: <69cbfb76.403b1.24e43318@gitrepo.freebsd.org> Message-ID: References: <69cbfb76.403b1.24e43318@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 31 Mar 2026, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=407b1e4980189252fade78438aa08191a9883cdc > > commit 407b1e4980189252fade78438aa08191a9883cdc > Author: Gleb Smirnoff > AuthorDate: 2026-03-31 16:34:51 +0000 > Commit: Gleb Smirnoff > CommitDate: 2026-03-31 16:34:51 +0000 > > rss: make toeplitz.c standard part of the kernel > > This will fix LINT-NOIP build. This actually adds very little to the > kernel text, e.g. 500 bytes on amd64. A perfect solution would be to > instead declare rss_config.c as 'optional inet | inet6', but that would > fail to build LINT-NOIP in several NIC drivers, that use RSS and > absolutely ignore that both INET and INET6 are optional. It is very > unlikely that vendors who maintain these drivers will will ever chase the > holy grail of a build that doesn't support IPv4 and IPv6. Well, we had this sorted for LRO and other bits and had made them conditional depending on INET6 or INET in drivers, which in the end brought no-IP compiling for free. Given we these days do not support any non-IP protocol in-tree anymore it seems, it is very unlikely we want any of these drivers with NO-IP either. > Fixes: d9c55b2e8cd6b79f6926278e10a79f1bcca27a4b > --- > sys/conf/files | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/conf/files b/sys/conf/files > index de13b76e71a4..347dadb1545f 100644 > --- a/sys/conf/files > +++ b/sys/conf/files > @@ -4263,7 +4263,7 @@ net/route/route_temporal.c standard > net/rss_config.c standard > net/rtsock.c standard > net/slcompress.c optional netgraph_vjc > -net/toeplitz.c optional inet | inet6 > +net/toeplitz.c standard > net/vnet.c optional vimage > net80211/ieee80211.c optional wlan > net80211/ieee80211_acl.c optional wlan wlan_acl > > -- Bjoern A. Zeeb r15:7 From nobody Wed Apr 1 15:10:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm7j11jg0z6XyDb for ; Wed, 01 Apr 2026 15:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm7j06hJ8z3dnP for ; Wed, 01 Apr 2026 15:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775056244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gT3h1ZI2eoSga2rGbAVqUZHAd7BSjREupkZ2c9+Inx4=; b=nit/k37tO5cwA4+3VuPvjHuxhQRtUCDPxhjR3GTtkjCS1gpw5qsLOglbcL2FBYGwTmmQX7 bTFST0JG+nw5pPLQBuLRm/Co6UcnPEudOYn+qOWzYcOiN2knGuLztkMxcLZCwO/njypleB jrxmclcSUtH368v0T9ceIdwiEkHKqwfIU2ho0MolW1QO+4LZbKpO97tDTCM8bFkVUKC56q /hy5FGNECwStiVnM6q0bbM3wKjdguuffLem+ez+DTSyqPKsNLOxaz323RPMJchxATflY0Z NohviZk3Kf1iTB7lHTp43zQr1+eUwN0zhJwszTDJhB8ZMd1i4kYyAiyzXkzpZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775056244; a=rsa-sha256; cv=none; b=qsCwARw2UcJB+nVi5eF+jHdliOsXfkwTerL7UAxNp1alDIv8pKJlwo7ry6emFH89HISe+A spQvOsSeyfdyhU3CHTC3e7NK9WsY8StFbQ5CDXn9BTact6BjEY3TrBC+GXMxY3znKCEkz6 FCWu1Df+Skux6TkA1NpXuWDtLmG7GuYkt/J4Y7Kw6oSlBknGGaHJH+m29vZ5qSKKYJqUM7 0tttX5IhakkEgC8NTS9TOSAHM3X6g8n6kZ2ShYHnSKFG6TPszw/dcVu1vLUR5F8tKLmaBx YvdbJ4x5yMwVDJZtQzPua/tvZ+Z8RFryEI827sIflhGnOYU4vXAMclGZeMRrmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775056244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gT3h1ZI2eoSga2rGbAVqUZHAd7BSjREupkZ2c9+Inx4=; b=pST6tnhyzkAyaS/CTvlAO6/sgfFlHoSPemgWu3VUULSe3RsuEGxoNvU0TjnlfwdWvA9qua ll+UCN9Np6zGetF1R2LhSZFiMQmDNKLz0FFOjp2PufrL35khl7rbxMuDKo/nMpBSSk7vdC HkE4hGuCLtC8OP7SkmjuqjfwLaC1HsErz8I1b8byPPysTMnmljemPNHbNc7dB2wdpgnYU+ ANSi/oOvaQL+Is5Yfv+MQ8cKGHln91mEYugfDCHi0A3xOMjPCsVCVKPAHhfjgtS2OTQfpj R4tch4P8Y/AwcFEKVz7HYElLInByNvrzbj8zRo+gStYL1+PdyxLiWQDyCfVC1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm7j05c3rz4qK for ; Wed, 01 Apr 2026 15:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35c4a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 15:10:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Ed Maste Subject: git: 5bb0f6302066 - main - linuxkpi: Handle bin attributes in sysfs attribute groups List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bb0f63020669bd3675c651ba7745fc4356edc1a Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 15:10:39 +0000 Message-Id: <69cd356f.35c4a.3eb58a3a@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5bb0f63020669bd3675c651ba7745fc4356edc1a commit 5bb0f63020669bd3675c651ba7745fc4356edc1a Author: Jean-Sébastien Pédron AuthorDate: 2026-02-08 10:11:39 +0000 Commit: Ed Maste CommitDate: 2026-04-01 15:10:12 +0000 linuxkpi: Handle bin attributes in sysfs attribute groups For instance, this is used by DRM drivers to declare the EDID property of an GPU output connector: sysctl -b sys.device.drmn1.card0.card0-DP-1.edid | edid-decode ... Block 0, Base EDID: EDID Structure Version & Revision: 1.4 Vendor & Product Identification: Manufacturer: SAM Model: 29814 Serial Number: 810635354 (0x3051505a) Made in: week 15 of 2025 ... Reviewed by: bz, emaste, wulf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55176 --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 34 +++++++++++++++++------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 470c224a9778..7c8c4e2e32b9 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -43,13 +43,6 @@ struct sysfs_ops { size_t); }; -struct attribute_group { - const char *name; - mode_t (*is_visible)(struct kobject *, - struct attribute *, int); - struct attribute **attrs; -}; - struct bin_attribute { struct attribute attr; size_t size; @@ -59,6 +52,14 @@ struct bin_attribute { struct bin_attribute *, char *, loff_t, size_t); }; +struct attribute_group { + const char *name; + mode_t (*is_visible)(struct kobject *, + struct attribute *, int); + struct attribute **attrs; + struct bin_attribute **bin_attrs; +}; + #define __ATTR(_name, _mode, _show, _store) { \ .attr = { .name = __stringify(_name), .mode = _mode }, \ .show = _show, .store = _store, \ @@ -370,6 +371,7 @@ static inline int sysfs_create_group(struct kobject *kobj, const struct attribute_group *grp) { struct attribute **attr; + struct bin_attribute **bin_attr; struct sysctl_oid *oidp; /* Don't create the group node if grp->name is undefined. */ @@ -378,11 +380,19 @@ sysfs_create_group(struct kobject *kobj, const struct attribute_group *grp) OID_AUTO, grp->name, CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, grp->name); else oidp = kobj->oidp; - for (attr = grp->attrs; *attr != NULL; attr++) { + for (attr = grp->attrs; attr != NULL && *attr != NULL; attr++) { SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(oidp), OID_AUTO, (*attr)->name, CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE, kobj, (uintptr_t)*attr, sysctl_handle_attr, "A", ""); } + for (bin_attr = grp->bin_attrs; + bin_attr != NULL && *bin_attr != NULL; + bin_attr++) { + SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(oidp), OID_AUTO, + (*bin_attr)->attr.name, + CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_MPSAFE, + kobj, (uintptr_t)*bin_attr, sysctl_handle_bin_attr, "", ""); + } return (0); } @@ -434,14 +444,20 @@ static inline void sysfs_unmerge_group(struct kobject *kobj, const struct attribute_group *grp) { struct attribute **attr; + struct bin_attribute **bin_attr; struct sysctl_oid *oidp; SYSCTL_FOREACH(oidp, SYSCTL_CHILDREN(kobj->oidp)) { if (strcmp(oidp->oid_name, grp->name) != 0) continue; - for (attr = grp->attrs; *attr != NULL; attr++) { + for (attr = grp->attrs; attr != NULL && *attr != NULL; attr++) { sysctl_remove_name(oidp, (*attr)->name, 1, 1); } + for (bin_attr = grp->bin_attrs; + bin_attr != NULL && *bin_attr != NULL; + bin_attr++) { + sysctl_remove_name(oidp, (*bin_attr)->attr.name, 1, 1); + } } } From nobody Wed Apr 1 15:57:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm8lK2TL0z6Y334 for ; Wed, 01 Apr 2026 15:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm8lK0TTkz3mkN for ; Wed, 01 Apr 2026 15:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775059069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9nPbIcjZzcZyiAauIjCG6wq1DrHNlTd35eyot5ZjtJM=; b=olMrHbCSkaULXRi1XPH6lc/Z48JWEFwy+V+c6j6QZB896/lFeUVBUjRNiStw8kyYQD5PNn n1g6NgtiFfwfizo9P8NyqTAaO/09uQrbLGK4VCSW5stAEd8XdQBXmO6OpxjRiaYzL0HTaj YLlCcPzFmBwgLcXco8Ig/IHRtEJDl9ZA2Y6BL9R4AC87CdhuEbKyx0JHM7LAjA06nOB0hs yy0qTJ7B3J5JmO06KsMAaotr/ns+4G5mQ6cw2Bhh8kJb2PPGKa0E7nTxh+NpCmwVIq8qiN HtMkVtn7zxMEYB4rT9e7fGvltJwuQ5BjZ6eGebkBYRCzAoAh+ohUCNsonvb34Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775059069; a=rsa-sha256; cv=none; b=m2YSc9R0SwczIAw/d1bv5mxI35QmRc5GPmaaTRovDIExtEOnyAUxapqmUdMklG8SrRqxCy sm9mgSRf+Ds8rKktTWk4OcLcAfhxgGkr9MxvCRZBXtHTinYC9YxJwbePWUKSYX4RgItLnQ xMXJDW5K4rOR5ueG5Uz+/Al7BxJo1NnkLmOzTLNzINsFkmppxc/EqMNT1FcKi+zuH1T/dO 7cWW5uZREZbtGSlv6saS/aSmg0OsYbS2J5IRfF3mfmlHG6pDoPJDlvmCggELkOB/ZjdSMq SysVmNhQn2RrtMfeM7xT/wbGs+SJUjWDdE26vwZtNUXH/lQ3j/9d2zN/V+/mHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775059069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9nPbIcjZzcZyiAauIjCG6wq1DrHNlTd35eyot5ZjtJM=; b=W4F9TY+u4D7Fy2M0lTxmHDZ27/h/LEVd0ntlCzGg+M603zJM0vDZJIWBrkHrhpHs6UG6Ro WKhgv459duSoddTSeITsB81zRGuF+cdLajDxbPsqluClujGrqpn8+zgCyDrBeKDRGeOvR5 N7r/C2meCp9pl93jJ8fFQw/lsQAra3DntExYIMC16jFZ5qZdOJbwtubLmJ7Z0NBHCABsg+ n+jJc/8p2LIbeagjVCj8HcwBWY7DSBDJKK9g5RGy9y6Yyl2tR7ohQ950QC0Y57crWWk934 /7uqCNhwvy4ipkAtDyRs59D0hsL+cxRgipkwOeA4KEjCMsKLZZ47GoqKH30+Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fm8lJ6fWBz6WK for ; Wed, 01 Apr 2026 15:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a9a8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 15:57:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 759d8a13a3b4 - main - route(8): Show weight of nexthop in multipath routes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 759d8a13a3b4510b7fab4d6c32e5a8de5ab056e7 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 15:57:43 +0000 Message-Id: <69cd4077.3a9a8.322f5eed@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=759d8a13a3b4510b7fab4d6c32e5a8de5ab056e7 commit 759d8a13a3b4510b7fab4d6c32e5a8de5ab056e7 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-03-31 19:50:51 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-04-01 15:56:19 +0000 route(8): Show weight of nexthop in multipath routes Reviewed by: zlei, markj Differential Revision: https://reviews.freebsd.org/D56202 --- sbin/route/route_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index e3ddbf81e62c..01817dcbb850 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -472,7 +472,7 @@ static void print_nlmsg_route_nhop(struct nl_helper *h, struct snl_parsed_route *r, struct rta_mpath_nh *nh, bool first) { - // gw 10.0.0.1 ifp vtnet0 mtu 1500 table inet.0 + // gw 10.0.0.1 iface vtnet0 weight 100 mtu 1500 expire 3600 table inet.0 if (nh->gw != NULL) { char gwbuf[128]; print_prefix(h, gwbuf, sizeof(gwbuf), nh->gw, -1); @@ -486,6 +486,7 @@ print_nlmsg_route_nhop(struct nl_helper *h, struct snl_parsed_route *r, if (nh->rtax_mtu == 0) nh->rtax_mtu = link.ifla_mtu; printf("iface %s ", link.ifla_ifname); + printf("weight %d ", nh->rtnh_weight); if (nh->rtax_mtu != 0) printf("mtu %d ", nh->rtax_mtu); if (nh->rta_expire > 0) From nobody Wed Apr 1 16:03:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fm8sh0sQtz6Y3JD; Wed, 01 Apr 2026 16:03:20 +0000 (UTC) (envelope-from markj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fm8sg5Yp4z3nR6; Wed, 01 Apr 2026 16:03:19 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775059399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vQrt1QIJVz30ol9q3OQCMjVPrcVRyIStH5nc1k6b8pg=; b=UNGZr1XW4Jao8G7DMYGA6uB2amt8ybWw+uG+qbdnBWwGToIE1mpRBZOMz7Iv+5sVG4CBB+ kGXfLsPwCOP+P874rCVgoOPMixrYiWiOctI0FxZ15HAraN8YdCAaC59lQo8nd7sePRl/jE 8OsmotTJ6kvO6U6MDWlmeTj9F5BT7WGQgIv9iX8uKO9ZzRSqR9bS4izBNfrq+BzMRE2hyb flIyH54bViX6lqv1IsmQvZK/fJlGaIyVvPdvfMotQPttRUTMAx3afOSLZnzWeLVeKXzHCJ XlnCfwzDyeJpVZ2rsAUZcl77UtfgyDBKs8ON1nkeJz7R2rZxbsL5rmTl+ZEY3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775059399; a=rsa-sha256; cv=none; b=X3ScHS1uJsoMVQMHrQnSCdmndyqyqVs09fWwmBECPIC0fYKjXpfqg+CoaYd9c43l0TqDeh 03Xj9UIfoegqn/Rt6+mqp/dmuERXb2AsfqpVOKn4GIsLe3JR2kUq8TtFK8j9OnNMULfadC qBz7+fX2pketVSI1833NqSRqmTZpuH6JinnGkOPzFnfjxzbbI/XvAW2/2rPl8XBoxrgbeW Gr/fXdlJE8ujjXpcj9DMkKT1IV/L3LzgPWC9W9JQ8nX7BTyqrQfY7bqs91x9P5miHrtz9i Xi25Iy1SnEQy5FRE3dH0NL8vGCFwxa4Gd2YzlEZl3F/hXeyqRPvJ2MCN7TU9VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775059399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vQrt1QIJVz30ol9q3OQCMjVPrcVRyIStH5nc1k6b8pg=; b=EAKAkL82VTfmqnoztRNBxg2OOwr4yX9Z8+Qs6HYyhi9dgJnqfQJ2Gel+Ukl+1BYL3gPyPO fzYwtl6M66YF9bkZvUl7PKb7dIvuL58qyZoVv4kgauUSeygaZVN3Eh67iUS94P5Vytb5zH lP8Vw2c2lirBMzHL3kVd6EyGO6i1Key/7zTGs0wF49ZCpwCxO+24zAZmg06DVNIsu/+Xm8 OwOmx5Prnv8Xzih38RAWO1vwmWI/vbg0kCAI2Ix0oaNBRpOtPWwoOqTM7jo8X6Yxe2lG6h fK1Lgy9OGIeXl4CzSL6wKJfycNpdYgzKpOmroPRC9JzlLehEMjq8cvB5GlodFA== Received: from framework (61-227-204-72.dynamic-ip.hinet.net [61.227.204.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fm8sf2ZGDzjvs; Wed, 01 Apr 2026 16:03:18 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Wed, 1 Apr 2026 12:03:14 -0400 From: Mark Johnston To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 607f6be6ec19 - main - rtadvd: Fix validation of the MTU parameter when parsing config Message-ID: References: <69cd0d71.1a157.2cbcbd77@gitrepo.freebsd.org> <8npqp22o-247n-ps59-65qr-n7n79n935s0@mnoonqbm.arg> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8npqp22o-247n-ps59-65qr-n7n79n935s0@mnoonqbm.arg> On Wed, Apr 01, 2026 at 03:25:44PM +0000, Bjoern A. Zeeb wrote: > On Wed, 1 Apr 2026, Mark Johnston wrote: > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=607f6be6ec19f49ff595226afe1c8aa6515c59a0 > > > > commit 607f6be6ec19f49ff595226afe1c8aa6515c59a0 > > Author: Mark Johnston > > AuthorDate: 2026-04-01 12:14:24 +0000 > > Commit: Mark Johnston > > CommitDate: 2026-04-01 12:19:35 +0000 > > > > rtadvd: Fix validation of the MTU parameter when parsing config > > > > MFC after: 1 week > > --- > > usr.sbin/rtadvd/config.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c > > index 83b2efb68303..c0af8f76ca49 100644 > > --- a/usr.sbin/rtadvd/config.c > > +++ b/usr.sbin/rtadvd/config.c > > @@ -619,7 +619,7 @@ getconfig_free_pfx: > > get_prefix(rai); > > > > MAYHAVE(val64, "mtu", 0); > > - if (val < 0 || val64 > 0xffffffff) { > > + if (val64 < 0 || val64 > 0xffffffff) { > > Forgive me for asking, but would a reasonable check possibly cap this > right away at 0xffff as I cannot see us having interfaces with an > MTU larger than that. > We just removed IPv6 Jumbograms (or still in review?) for similar reasons? The code does this several lines later, after truncating the value to a 32-bit integer. > > syslog(LOG_ERR, > > "<%s> mtu (%" PRIu64 ") on %s out of range", > > __func__, val64, ifi->ifi_ifname); > > > > > > -- > Bjoern A. Zeeb r15:7 From nobody Wed Apr 1 17:14:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmBSK5PQyz6Y9Yf for ; Wed, 01 Apr 2026 17:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmBSK2rK3z46T1 for ; Wed, 01 Apr 2026 17:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775063697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ll6H3EcQxBmSqYIAJgN1Ty/1Vbsor0BhjNJFa5ivm8k=; b=p21seTQvROqTaui46RZ8Odsei0eNI+JHn93OJ1TbtH35PSPw0npM1zEU08USMm5WcmuF9u dvdEmiyku1lCQ8ODuqxpl6Zl+stW+oF/ECh9IKBwyheK0FEU60+aZFBbNAKKN5WUSZf/1T V0W/hCjkcYU41i7vH75jER5+dlByMcfJksbcoVre+tNFH1UwDxzCsVcmmyt7pM5B6ibeKL 14qVJEfjKJL83COyIGEHzm0GvvE0eLxcc6zXTbVuFEnmS31E4pr/b0E1sqiLKvVh/ovvBc ohAKWLXmRYXmlB6VvXXMhbUJ6du/mCwYU7U94BgZbD3U8kYTun6w+gLw76C/Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775063697; a=rsa-sha256; cv=none; b=Q8Nl2OYNGa5+q9BPS6lnZDlcoDJmjtTFOfI27PESjApgl3Y6qYXFaa+LtIVS071l08bCo3 ONli8w2RSlmnjohZ7TxRUTUmPq5WUphqWUuv4wApgb+qDrALuv9XTbknnon4cEYk7pI/ZP nPI2TMrcSa8roiNYHqHs6WmiW4Kts61fopaCIRh5iVOqUAVJ2wLAzW+kr6f536QJijmhFX tJyrB1H7QAGTACd0FsKZm2RjN3d/VHaMFgqHmdAhNdxP6H8HtusrV5h8V00G6b1LNZ2U9E HDytR6oDxf7jPQ5J2HXyom168KJH4MwvlFUA5Vxl4FE7K53FvRnltJCx6jV6gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775063697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ll6H3EcQxBmSqYIAJgN1Ty/1Vbsor0BhjNJFa5ivm8k=; b=knQom+NBjpTL7U/rnRfQzJ6OWmhQPOxMvYV9AoeE7BChcWLsLJ4WDMOXGY4KZwOgluZO+w 1bc1Z+Tqj4l/UgnBTgKx0kaf0xeh+yJJb2Tbd/HSySkA8ohQ7y7oel0+C98ILxVEg9RnV4 Swyg9Up1jQzjbpZU683HZMnHMjwas4RanQ/dINl8prTbSz8sg1aoVjKE66k1CiJryx8WN6 xZ6uU2GO4CIYD9CtT5sRMMqGgZomWBaN2tvMxGA2AvZUE+FkprEssMlqM77+cN/a9+vK8C DiLNk9QdRVHELIPB42A2CdbIGcoGvEqQ23RvfmOUSTGDc7dlZ7MzE2oN+SR6kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmBSK2B2pz8lk for ; Wed, 01 Apr 2026 17:14:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c22a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 17:14:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d0afead87607 - main - cd9660: Add length checks to Rock Ridge parser List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0afead876076f605c363f03d92304d1bd75be1c Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 17:14:57 +0000 Message-Id: <69cd5291.1c22a.1a680901@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d0afead876076f605c363f03d92304d1bd75be1c commit d0afead876076f605c363f03d92304d1bd75be1c Author: Dag-Erling Smørgrav AuthorDate: 2026-04-01 17:14:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-01 17:14:48 +0000 cd9660: Add length checks to Rock Ridge parser * cd9660_rrip_slink() did not check that the lengths of individual entries do not exceed the length of the overall record. * cd9660_rrip_altname() did not check that the length of the record was at least 5 before subtracting 5 from it. Note that in both cases, a better solution would be to check the length of the data before calling the handler, or immediately upon entry of the handler, but this would require significant refactoring. MFC after: 1 week Reported by: Calif.io in collaboration with Claude and Anthropic Research Reported by: Adam Crosser, Praetorian Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56215 --- sys/fs/cd9660/cd9660_rrip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c index 6e91f1abb9d2..9bc8ef655368 100644 --- a/sys/fs/cd9660/cd9660_rrip.c +++ b/sys/fs/cd9660/cd9660_rrip.c @@ -175,6 +175,8 @@ cd9660_rrip_slink(ISO_RRIP_SLINK *p, ISO_RRIP_ANALYZE *ana) /* Inserting component */ wlen = isonum_711(pcomp->clen); inbuf = pcomp->name; + if (inbuf + wlen > (char *)pcompe) + wlen = ana->maxlen + 1; break; default: printf("RRIP with incorrect flags?"); @@ -246,6 +248,8 @@ cd9660_rrip_altname(ISO_RRIP_ALTNAME *p, ISO_RRIP_ANALYZE *ana) /* Inserting component */ wlen = isonum_711(p->h.length) - 5; inbuf = (char *)p + 5; + if (wlen < 0) + wlen = ana->maxlen + 1; break; default: From nobody Wed Apr 1 19:05:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmDwG48Z6z6YLTF for ; Wed, 01 Apr 2026 19:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmDwG1pgKz3TGC for ; Wed, 01 Apr 2026 19:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775070350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=afeDYXSO+i2oPoEqKC+jE2GCm2852+1Ex2ujiBgnF1g=; b=lsuZUrbvdkRyZpK2uZXXRHuBe4REc7Weg8QmDGunQ8kERFAVhzQSwit+mO+dDhocH4Z8DG /PSBkvbfIlZdnQVsvXJXr+0G1T9UbASnMzTbIo8Y7acCVsMtpHYd0njsQfdJmgvRUyRGlZ Xyz9WIWXrmg4iZpgCSUS/WubwI1hS2bAeOugQpf+Gyz9ggSAe4b1Y+hG0PV4N7rOHnmf1J yzanebodMxUmXsxTsmpnj0iDbeFm6vhudqNH+eZQk5tyv4G7smIWeB6W3xRmrB4I0/rBvn J21uiExU9xf04TAP3kjNAaI1t4Qjuyxx7KcLSSsAg9NFElhb8+JUm/JpmsJ/2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775070350; a=rsa-sha256; cv=none; b=pDL5/1D++vXD2Cn1xxeUooGtTe9BZCdbUBIUR9Bn0eSfwvTlPqXb13pBaUx+u+KcEOZceO 3q9m1yfCG6qMbenqbaxYUVbiyG/qttnk0rlyZlIZXrxgjkifECAuXa/McrT7nmwe2Lv21E K/gWFRzWmo5QmWhgVCND+X3bba4BnfIjj7C5XdtegFJnTt/3sGgREdZtdMgEDLip68S42y nIC2MiBlEOiZCTYXs6r5Xqf8gTSvfZeXe8jadzJ6ufIMAL7Q97v7QO4z48WHXqu6PnBMiQ 2M4EumqoxvsniMiBQxI4Iv+pg+CZV+9e61arOVjDyq2yAA8siZvtrSPS+EhW/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775070350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=afeDYXSO+i2oPoEqKC+jE2GCm2852+1Ex2ujiBgnF1g=; b=FAvz4IXIn4rIHGeGt6yaeBRKJAsyOjbusckq7R6AREKb85d7xL/KYPLJzQ7uBvAsG7pq3B U5YWjOkL8HMVIQ9EXHhGY9Db99aZKtLXJHR+ocA5F0C1aio967JJjgrWyJV1B1n3n3h2A5 HWpY5v6YBOUtj+IR66WsTCmnIl5tXlJAWx3u2B/0hMayG43G3xTkl3uiRO7K60ArJSbpij T4HNaPBHUqkaQMVPv3yfl0WLQb9mEG0UA21L/Em6ERF3jE/WEMqE4c55MJ7YogZCsO7jt2 b4o9rHDJXx8ikj9cDizv+OIQ/y+NW9Ul8kAeOv/OAazsQ54nFKaz0yvd+Q9OPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmDwG0RRGzCpq for ; Wed, 01 Apr 2026 19:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 267cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 19:05:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Hans Rosenfeld From: Ed Maste Subject: git: 970e0db1c38b - main - bhyve/virtio: Fix comparison of integer expressions of different signedness List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 970e0db1c38b8b5f873e7c9797bb9abcad76a1d7 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 19:05:45 +0000 Message-Id: <69cd6c89.267cf.65fc6dd1@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=970e0db1c38b8b5f873e7c9797bb9abcad76a1d7 commit 970e0db1c38b8b5f873e7c9797bb9abcad76a1d7 Author: Hans Rosenfeld AuthorDate: 2026-03-09 18:10:54 +0000 Commit: Ed Maste CommitDate: 2026-04-01 19:05:26 +0000 bhyve/virtio: Fix comparison of integer expressions of different signedness It's a bit silly to have iov_to_buf() and buf_to_iov() return a ssize_t to begin with, just to be able to return -1 for error. Change this to size_t and use 0 as an error indicator, which won't require any changes to the code using these functions. While here, switch iov_to_buf() to use reallocf() instead of realloc(). Reviewed by: jhb Fixes: 2a514d377b37 ("bhyve/virtio-scsi: Preallocate all I/O requests") Differential Revision: https://reviews.freebsd.org/D55800 --- usr.sbin/bhyve/iov.c | 10 +++++----- usr.sbin/bhyve/iov.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bhyve/iov.c b/usr.sbin/bhyve/iov.c index 16d7765b437b..aadea1d67933 100644 --- a/usr.sbin/bhyve/iov.c +++ b/usr.sbin/bhyve/iov.c @@ -110,16 +110,16 @@ check_iov_len(const struct iovec *iov, size_t niov, size_t len) return (false); } -ssize_t +size_t iov_to_buf(const struct iovec *iov, size_t niov, void **buf) { size_t ptr, total; size_t i; total = count_iov(iov, niov); - *buf = realloc(*buf, total); + *buf = reallocf(*buf, total); if (*buf == NULL) - return (-1); + return (0); for (i = 0, ptr = 0; i < niov; i++) { memcpy((uint8_t *)*buf + ptr, iov[i].iov_base, iov[i].iov_len); @@ -129,7 +129,7 @@ iov_to_buf(const struct iovec *iov, size_t niov, void **buf) return (total); } -ssize_t +size_t buf_to_iov(const void *buf, size_t buflen, const struct iovec *iov, size_t niov) { size_t off = 0, len; @@ -141,5 +141,5 @@ buf_to_iov(const void *buf, size_t buflen, const struct iovec *iov, size_t niov) off += len; } - return ((ssize_t)off); + return (off); } diff --git a/usr.sbin/bhyve/iov.h b/usr.sbin/bhyve/iov.h index e14a9bc7e019..788e8da84b8b 100644 --- a/usr.sbin/bhyve/iov.h +++ b/usr.sbin/bhyve/iov.h @@ -40,7 +40,7 @@ struct iovec *split_iov(struct iovec *, size_t *, size_t, size_t *); size_t count_iov(const struct iovec *, size_t); bool check_iov_len(const struct iovec *, size_t, size_t); -ssize_t iov_to_buf(const struct iovec *, size_t, void **); -ssize_t buf_to_iov(const void *, size_t, const struct iovec *, size_t); +size_t iov_to_buf(const struct iovec *, size_t, void **); +size_t buf_to_iov(const void *, size_t, const struct iovec *, size_t); #endif /* _IOV_H_ */ From nobody Wed Apr 1 21:49:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmJXp31Pnz6YZym for ; Wed, 01 Apr 2026 21:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmJXp2Lgkz3sWB for ; Wed, 01 Apr 2026 21:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775080154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gcbli1k9qz5Nea3c/st5UbMNx3+sFju7y3c/lw45euY=; b=eIBA+ifk2pYdXoiMMI8ncdZF7QkRaL5+W8EgdsPi/bG1smv5enxnlHr7xsaPoRTCV+TIsP Kwjsrna78kWBXY44iWFy+mE4HcIJ81Z84Zp3nxqn2bKpc+5YC6DwZ2tTMxiOTIVH/VpayW 6bvNusUaIwtnkpWn2VsZ58xI9+/NSE2AWYXfKtMWt3damomUA+oXJWAXsiaMT2Px9I4TK1 DhipsiR1C3gjmXgVHOI+yUhD1eLkOUYZwg0lrMgnTmUA/Oms5FOTYUP4ntw0EqnR6kiswu C9pU8qk/pq1muCeysn+QBDJoDw8yrEyEeFJdyey6kJK5TZYVRFts2EJnaAvOUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775080154; a=rsa-sha256; cv=none; b=xsRFrIe6ddqQQxWZdEhs1p9fwp/aGObGp4ObulGxiITvRTuHGki7fmD13Pu8PZNOZLai1t BHPJpUNzto1TdtHMV76lvqd5qp3WKXtEIWz184LlFrKbQZndPISBhxr8B24vLMBMZWzAPp 8UO9Tn7O9OgQ7ArZ+/wmqUdvp4PD5JFhqnND96dSh26t2DfJ4XD4o7OrOmZyRCeNvry5rZ RBs+/W5brns0oxmyEDDlIrfM7LGESsaWF21CTSDRnbM/5MPUFfLd8fKfwSuAdEKmxxGwVb hJslP1mhyzldrs0wSC5d8sdVH3S2LOBfxonoVX6HxuqqVnnZHlmoS6CVj5Ov/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775080154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gcbli1k9qz5Nea3c/st5UbMNx3+sFju7y3c/lw45euY=; b=RFm8fem+44nWU88GDbNJwrWG9eBQpy3gv4gXTp2g0frE1Z9IqHuEAbLhT1ufBHVsMvOC2J GcssaIvHzjI02XOZ5HoFGzbn/TbLco2AOqCRmoNbzR72BcnMBEiQM8I/D6IZy5IVEYtz/2 vptY/xlZ0O5cIUUtA7MxFnkmeXqTXEFUvaJbq1OGzlJuJp+IbDP8KHzbqfGO7ZxioCbO/7 31EyG2tsX8jzJBggasqZ+igDHI7Xmj5UxAoQSBljy2tDetJQyOKY5ZgGhouvGJqD1NCiWv bgZfGHjmuAE7OZMfc3OEWoeC20mWR0Czg1KSU16RN8hQKiHIelLeaKduNDSvAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmJXp1GRYzZR6 for ; Wed, 01 Apr 2026 21:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40a00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 21:49:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Sobolev Subject: git: 5d4a39d8ed77 - main - compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sobomax X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d4a39d8ed775d607e0702f317f687491ac0a23d Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 21:49:14 +0000 Message-Id: <69cd92da.40a00.1d73727f@gitrepo.freebsd.org> The branch main has been updated by sobomax: URL: https://cgit.FreeBSD.org/src/commit/?id=5d4a39d8ed775d607e0702f317f687491ac0a23d commit 5d4a39d8ed775d607e0702f317f687491ac0a23d Author: Maxim Sobolev AuthorDate: 2026-04-01 21:42:50 +0000 Commit: Maxim Sobolev CommitDate: 2026-04-01 21:46:08 +0000 compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME After reading both manual pages, our TCP_MAXUNACKTIME is fairly similar to the TCP_USER_TIMEOUT, the only considerable difference is ours is in seconds and linux's in milliseconds. Round up linux's in setsockopt(2) to a next whole second and clamp ours getter to UINT_MAX ms. Reviewed by: tuexen, glebius Differential Revision: https://reviews.freebsd.org/D56168 MFC after: 2 weeks Sponsored by: Sippy Software, Inc. --- sys/compat/linux/linux_socket.c | 61 +++++++++++++++++++++++++++++++++++++++++ sys/compat/linux/linux_socket.h | 1 + 2 files changed, 62 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index b1a483ce611c..023be1e6b885 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -594,10 +594,34 @@ linux_to_bsd_tcp_sockopt(int opt) return (-2); case LINUX_TCP_MD5SIG: return (TCP_MD5SIG); + case LINUX_TCP_USER_TIMEOUT: + return (TCP_MAXUNACKTIME); } return (-1); } +static u_int +linux_to_bsd_tcp_user_timeout(l_uint linux_timeout) +{ + + /* + * Linux exposes TCP_USER_TIMEOUT in milliseconds while + * TCP_MAXUNACKTIME uses whole seconds. Round up partial + * seconds so a non-zero Linux timeout never becomes zero. + */ + return (howmany(linux_timeout, 1000U)); +} + +static l_uint +bsd_to_linux_tcp_user_timeout(u_int bsd_timeout) +{ + + if (bsd_timeout > UINT_MAX / 1000U) + return (UINT_MAX); + + return (bsd_timeout * 1000U); +} + static int linux_to_bsd_msg_flags(int flags) { @@ -2057,8 +2081,10 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) struct proc *p = td->td_proc; struct linux_pemuldata *pem; l_timeval linux_tv; + l_uint linux_timeout; struct sockaddr *sa; struct timeval tv; + u_int bsd_timeout; socklen_t len; int error, level, name, val; @@ -2130,6 +2156,24 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) break; case IPPROTO_TCP: name = linux_to_bsd_tcp_sockopt(args->optname); + switch (name) { + case TCP_MAXUNACKTIME: + if (args->optlen < sizeof(linux_timeout)) + return (EINVAL); + + error = copyin(PTRIN(args->optval), &linux_timeout, + sizeof(linux_timeout)); + if (error != 0) + return (error); + + bsd_timeout = linux_to_bsd_tcp_user_timeout( + linux_timeout); + return (kern_setsockopt(td, args->s, level, name, + &bsd_timeout, UIO_SYSSPACE, + sizeof(bsd_timeout))); + default: + break; + } break; case SOL_NETLINK: name = args->optname; @@ -2279,10 +2323,12 @@ linux_getsockopt_so_linger(struct thread *td, int linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) { + l_uint linux_timeout; l_timeval linux_tv; struct timeval tv; socklen_t tv_len, xulen, len; struct sockaddr *sa; + u_int bsd_timeout; struct xucred xu; struct l_ucred lxu; int error, level, name, newval; @@ -2373,6 +2419,21 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) break; case IPPROTO_TCP: name = linux_to_bsd_tcp_sockopt(args->optname); + switch (name) { + case TCP_MAXUNACKTIME: + len = sizeof(bsd_timeout); + error = kern_getsockopt(td, args->s, level, name, + &bsd_timeout, UIO_SYSSPACE, &len); + if (error != 0) + return (error); + + linux_timeout = bsd_to_linux_tcp_user_timeout( + bsd_timeout); + return (linux_sockopt_copyout(td, &linux_timeout, + sizeof(linux_timeout), args)); + default: + break; + } break; default: name = -1; diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h index 68176c3cc401..f2a96b3e7dcb 100644 --- a/sys/compat/linux/linux_socket.h +++ b/sys/compat/linux/linux_socket.h @@ -322,6 +322,7 @@ int linux_accept(struct thread *td, struct linux_accept_args *args); #define LINUX_TCP_KEEPCNT 6 #define LINUX_TCP_INFO 11 #define LINUX_TCP_MD5SIG 14 +#define LINUX_TCP_USER_TIMEOUT 18 struct l_ifmap { l_ulong mem_start; From nobody Wed Apr 1 22:33:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWs19gtz6YfPk for ; Wed, 01 Apr 2026 22:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmKWs0HMXz3wpT for ; Wed, 01 Apr 2026 22:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL7ema5ldZgLy9AAZS62VL/eFCGeaJhA+CajftLogqE=; b=ab8/SePXlTXlDqY9JEjhcEJLTCkxBJJ+OxqVXZiY7FNZdzdzKbMyneOyBPKBFJLkVD5qci Ggsx2nRXkbF8xs5Ac4ex9mpojP04qFRMWdCjYoHaNw+bqTpOT8Pn29WigGV7iq/tB0Ai85 fiSgiVtkTI2bFspgl3CmfyW+XgJpJSqx/PP4VSQv5p1gP2qQF1kZ6G56obY/sisKtz/KrL 06xL2A0lsVGT3JqtNdnn+hUbe6wDLzv1Ui8qv/XPYgLBDvPkts7hFBUaSnne/wdTRMrgjd vUo+qB0bq18CAT68xm/b3gFKL6vx3TcFBV1kn0lOPjYg4oM70ViPXtI54aQvPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775082809; a=rsa-sha256; cv=none; b=iEJEb77LOtxvnhfDt5rORGz214ICImWQJUKd1ZmCKCRoW2NkVsqYzTr+KWny/ICNgr+YwL YToB7+oJKHZ4FKZSZ/DI7GM6pp1ePednA9UISRm1Jd5mFLLwHSoWC2oJwTISofs+vNVSRF gOYa02wGnoIN3CStWBXqJsklAUoohh/7AyDWKzTvdBRETUVzLC9pFxJXiLL5wHIWTu9Wy0 Gq2GOWOq8yQuZWvDKhp4zRkSWACxcadJpuiEdyH0q5CG1cN2bQCxNxneB5lRvd9JBXeGzr UqcQvpG/oFy8Ay0oi/32hR3d4hXCU4kdiogihcrp9wLGqFT/qBPXsspeqEymSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL7ema5ldZgLy9AAZS62VL/eFCGeaJhA+CajftLogqE=; b=ncS0eSwOq+i8z2jvDPzB6fGtbp2XFra6baUM7ci6H704QelZXo9JAH6H9DngQLlyB/HvB5 UumqoAMXhINOC9v3Ga7YBbu/qZfMNnZVWwLgcQVmr/9t7GPheDw9/Y/r5ogDmKzTXok+Us TTCFBT5dCwA3+yIREoKpiRo/XaVGF9OKPVOTmEOYFOzFRIxyBhs/PcTDaYFcJJpAT3U2jq p3ce2gW5A5mS/lP7JSuJFIr/ZHuwmHNxaN6+AQL6/6E8cvWxhzp0eMd/MUsBayv7QJuVUE BJzmm9bDlb+2uzvmAGwywvqNOiRTMM9WCav9+m3pEc9tQ64825y/rV5LWvx6mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWr70cVzbps for ; Wed, 01 Apr 2026 22:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 452a7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 22:33:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0b4f0e0515d0 - main - kqueue: compare against the size in kqueue_expand List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b4f0e0515d0c7ec855cd654ae5dc562f4931cae Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 22:33:28 +0000 Message-Id: <69cd9d38.452a7.4d5842ab@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0b4f0e0515d0c7ec855cd654ae5dc562f4931cae commit 0b4f0e0515d0c7ec855cd654ae5dc562f4931cae Author: Kyle Evans AuthorDate: 2026-04-01 22:30:48 +0000 Commit: Kyle Evans CommitDate: 2026-04-01 22:30:48 +0000 kqueue: compare against the size in kqueue_expand This is a cosmetic change, rather than a functional one: comparing the knlistsize against the fd requires a little bit of mental gymnastics to confirm that this is fine and not doing unnecessary work in some cases. Notably, one must consider that kq_knlistsize only grows in KQEXTENT chunks, which means that concurrent threads trying to grow the kqueue to consecutive fds will usually not result in the list being replaced twice. One can also more clearly rule out classes of arithmetic problems in the final `else` branch. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56209 --- sys/kern/kern_event.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index f984161bfcd6..2cdc37b710e6 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2013,10 +2013,11 @@ kqueue_expand(struct kqueue *kq, const struct filterops *fops, uintptr_t ident, to_free = NULL; if (fops->f_isfd) { fd = ident; - if (kq->kq_knlistsize <= fd) { - size = kq->kq_knlistsize; - while (size <= fd) + size = atomic_load_int(&kq->kq_knlistsize); + if (size <= fd) { + do { size += KQEXTENT; + } while (size <= fd); list = malloc(size * sizeof(*list), M_KQUEUE, mflag); if (list == NULL) return ENOMEM; @@ -2024,7 +2025,7 @@ kqueue_expand(struct kqueue *kq, const struct filterops *fops, uintptr_t ident, if ((kq->kq_state & KQ_CLOSING) != 0) { to_free = list; error = EBADF; - } else if (kq->kq_knlistsize > fd) { + } else if (kq->kq_knlistsize >= size) { to_free = list; } else { if (kq->kq_knlist != NULL) { @@ -2039,6 +2040,7 @@ kqueue_expand(struct kqueue *kq, const struct filterops *fops, uintptr_t ident, kq->kq_knlistsize = size; kq->kq_knlist = list; } + MPASS(error != 0 || kq->kq_knlistsize > fd); KQ_UNLOCK(kq); } } else { From nobody Wed Apr 1 22:33:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWt1mRVz6YfH8 for ; Wed, 01 Apr 2026 22:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmKWt15S4z3wjd for ; Wed, 01 Apr 2026 22:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zjv3Su9c1mLsrnuewd6wLGfq/O6WR3YoncU5HNQbioA=; b=McIXdckcbuenTq/i0P/h7GQzLFfAK5Hw85gkf8o/at4i4VWlHR0BrOZ/pEAKYRHXWTTUZx uE862dr0ehh9GULOTYJ8iLpf/XqNbjnF98YiINuQt4fM8+Adqbq4uAqREk4/rK6JG+iR8j bV3sLDK/wXDHtCwPbnLUux/tlCHH/4Z2e9pMCZOPCT6M/vq9GGJq5POgplzhavjY2vlJYP PRj4NTy3JM/XDaEIGgJfRtoLezmiLohXltNOyJJkYCDG4o3PQ54Ci3BASkOAbkISCDKp/9 SPF+yi7B+5n9sBKf1dLaJMob37h0C06+0z26GaLVBOiF9al7cxSU8I4uoE5etQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775082810; a=rsa-sha256; cv=none; b=eS/uD8Mx4qpp0w4qyyIzsbBrS/dk+JBBaoBUecuWyUtgbnzUIbT0wvDjUmz0aiRv3uYoTD AIfGm6qU67KsPSkvCm68H6bYLIiMWa402hxXl8pitvH5nJhsreBIMJDVqVMrmG6pkrank3 2LTejxCWom6YzZW4h9Vc3qQkk9yFmp0iZY6lt5eNzdbOP+r3Tt47qjSzt8ywx0lSzdk1Th UciOIOldttYl91Pu8A9xKhSY1ir6xKMw0KCPmHNnA1B0BTyviQ2WdZNn/jD0HrX9iOMR3H WBx6bUk4dwMKOVpOB+T3LsI/1bMUXCKwat3ZUyOh4biTExGBVebdbcI9KyIiIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zjv3Su9c1mLsrnuewd6wLGfq/O6WR3YoncU5HNQbioA=; b=lyludNIfX3KPLj0n1rprnA2rEOksvEPKkRb1rgzk7crWbMzuUDwiGK0l5up9LQPAvmKgvC L0X0MnFzpIwz2yoB1UuQC3JLGHOP3JPATv4tLiClG0jMMiSRn6MPMvc6CsNKpzEAq+VCP9 dCawc6GfC1pUnqDTXRLOq9G8aRnlr52BPQF+87sfhshpXTT5+1CygJ9GPJuUxjzFeUepoC 4H9NC3J3OgaZ1X5hDAN0uep4ZNCi5FiaB8fDH2zyxxFAiLoUfE7eunTEbEz6rGnmIDbV7y Y6RU8/j11bSn1mRN2CuvUhe9Y6Sl9lW2yEpRCNTg0wgrYswCTsxiJFkrCDOKYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWt0fsyzbbV for ; Wed, 01 Apr 2026 22:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 448b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 22:33:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 14d0baf2e892 - main - kqueue: avoid a possible fork-deadlock List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14d0baf2e89202cec3f9cb03a573372ccbc568b2 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 22:33:30 +0000 Message-Id: <69cd9d3a.448b1.4720b683@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=14d0baf2e89202cec3f9cb03a573372ccbc568b2 commit 14d0baf2e89202cec3f9cb03a573372ccbc568b2 Author: Kyle Evans AuthorDate: 2026-04-01 22:30:48 +0000 Commit: Kyle Evans CommitDate: 2026-04-01 22:30:48 +0000 kqueue: avoid a possible fork-deadlock kqueue_fork_copy() is likely to have transitioned at least one knote through a flux state, so we should check whether we need to wake anything up on the way out to avoid a possible deadlock. This was a part of D56210, but we'll close the review with the next commit. Fixes: b11289f87123f ("kqueuex(2): add KQUEUE_CPONFORK") Reviewed by: kib, markj --- sys/kern/kern_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 2cdc37b710e6..6af53cf6cd91 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -3147,7 +3147,7 @@ kqueue_fork_copy(struct filedesc *fdp, struct file *fp, struct file *fp1, } kqueue_release(kq, 1); kq1->kq_forksrc = NULL; - KQ_UNLOCK(kq); + KQ_UNLOCK_FLUX(kq); knote_free(marker); return (error); From nobody Wed Apr 1 22:33:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWv4t0wz6YfPl for ; Wed, 01 Apr 2026 22:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmKWv1nhbz3wmd for ; Wed, 01 Apr 2026 22:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3NtEBc69KgmgeMEcHgHhmI0BSNorT/IbvVPbgZH4PfU=; b=wfrh+ARR8yTbGATjbTCn2EKXyJ8i+t/J91/RW6BEpEaVV6ctb1Nfdi1MdY6lIyDcfp5ZH5 3ZFAUGsimJPs4EeXbp8NjfSIit09L2QBUkx3TUk+SHBZI+vTHBRyvUz26T5BKm6ZCGovNr OTiv5pAlnL72Xg+84iDefKVItm3V13z0nF1wOSbwEJXapGrN1E+sM1rBiXP2WTcdBr9imj a0enLCoFHhLfYjXV/Y4KyY94SXtGUgoqtc6FBSb01PtNAwsvzA/yFz0BkBlWoWB0inY1nm qCIcJnBPiqcZmeHW6qafyPPMv7sqFpGCPTuiCvczzVVJBhV/y8KqJYUjuzM17A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775082811; a=rsa-sha256; cv=none; b=Cv7HzsymSuWFAVdtbmhJmaYWJf+fiaAaELGQTD9ef2E1ZE48ciOkXohr6ayugNxK79zdee NMry5Avwj2TnfnSb+k162AkRU6CgT0QrGSYgPJs/56HML+NFzRKNnT2RAdCPcscjY5iE3h /urgza/wtkTQOBNMaiX3/Tz8hPIQz3DU/j5HYxproNBzIX92JDIwqDx6hhjfHoSYPikTdP jV+Im8UQKlgiTi50TKgqYufVky288LDGEm56aBAHEKEkfoNEQt0oCSdQGiQvRt/VeLVK2E 4yGApXRET6uee2Er8k2xLTiL67xMAQ87Fvrq61+CyWH1STGpMVxavY53jxLfSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3NtEBc69KgmgeMEcHgHhmI0BSNorT/IbvVPbgZH4PfU=; b=Yfat4hWtgulskL8zv2TOVavLfaWJvci37dLJF6u7xyE3oAEA1oZxA8l0RlGKK5LO2LG3a2 UCVFQnFEsGwfyy0V+YQXQgmQIEHThQDyQm4xhpFKdsz8egLia4NDNwQLzRWPjoF6PzIUzG 6jgeHwJiExC5xSvjQa6V4kF8yJOhXEnbQHtLUEkz+/6ICEBlohv3vNhbau/nWYR0sa4Nxk cX6g1p50gxA/Ni3OzZ2Y2bOclzJmcq7FiwHJeMSoPiFgAWNRetflm9HsTzdp6f5iG0Y/0N OMCakgZYHmX4lJpnMaM7OC9KtedqD+Tq1u6kNzA1rQ3Qmkk/uy2mlVheaUR7EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWv1L1tzbfF for ; Wed, 01 Apr 2026 22:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43e40 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 22:33:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: ff1050d2a366 - main - kqueue: simplify knote_fdclose() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff1050d2a366bd288a6ebbf63f98003272513f92 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 22:33:31 +0000 Message-Id: <69cd9d3b.43e40.112feed2@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ff1050d2a366bd288a6ebbf63f98003272513f92 commit ff1050d2a366bd288a6ebbf63f98003272513f92 Author: Kyle Evans AuthorDate: 2026-04-01 22:30:48 +0000 Commit: Kyle Evans CommitDate: 2026-04-01 22:30:48 +0000 kqueue: simplify knote_fdclose() The influx logic in knote_fdclose() is a little misguided, the resulting wakeup() call should always be redundant: knote_drop_detached() will always issue a wakeup before it returns, so anything waiting on *that* knote that had entered fluxwait should have been woken up then. This is the obvious divergence from the other influx/wakeup pattern in the implementation, which will kn_influx-- and then issue the wakeup after it has processed all of the knotes it can make progress on. While we're here, the kq_knlist cannot shrink, so we can avoid that condition in the loop and avoid potentially excessive wakeups from fluxwait on kqueues that we didn't touch. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56210 --- sys/kern/kern_event.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 6af53cf6cd91..485123989319 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2836,7 +2836,6 @@ knote_fdclose(struct thread *td, int fd) struct filedesc *fdp = td->td_proc->p_fd; struct kqueue *kq; struct knote *kn; - int influx; FILEDESC_XLOCK_ASSERT(fdp); @@ -2846,22 +2845,25 @@ knote_fdclose(struct thread *td, int fd) */ TAILQ_FOREACH(kq, &fdp->fd_kqlist, kq_list) { KQ_LOCK(kq); + if (kq->kq_knlistsize <= fd || + SLIST_EMPTY(&kq->kq_knlist[fd])) { + KQ_UNLOCK(kq); + continue; + } -again: - influx = 0; - while (kq->kq_knlistsize > fd && - (kn = SLIST_FIRST(&kq->kq_knlist[fd])) != NULL) { + while ((kn = SLIST_FIRST(&kq->kq_knlist[fd])) != NULL) { if (kn_in_flux(kn)) { - /* someone else might be waiting on our knote */ - if (influx) - wakeup(kq); + /* + * Wait for this knote to stabilize, it could be + * the case that it's in the process of being + * dropped anyways. + */ kq->kq_state |= KQ_FLUXWAIT; msleep(kq, &kq->kq_lock, PSOCK, "kqflxwt", 0); - goto again; + continue; } kn_enter_flux(kn); KQ_UNLOCK(kq); - influx = 1; knote_drop(kn, td); KQ_LOCK(kq); } From nobody Wed Apr 1 22:33:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWw5Q4Nz6Yff7 for ; Wed, 01 Apr 2026 22:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmKWw28n6z3x5y for ; Wed, 01 Apr 2026 22:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZcwY+q99ctHE0xS+Dsw6PZgJ4Uk0Fx96VcW8YGEV4YY=; b=k/9V1Re3bF2WVFZ3MMIKdtfhjcwKF2+if7N1R0CUy1z+eUIn1QTy/ybmpl8MGF8K4UOGh/ 17wo308zlbYo7vIzbCPOCD/rUr2VY5VKZ2ErD7R7hXrSKNsOTCLL7dquwhiYg5FUk7Yiuv 38xJBM4r/XIHNbZSAAjus/z6UJWtH8q/IRO5JAoC8Q/mwPXoZRoMubuE+tj5ttqIyK73sW F99BX3aOwrtcs7laTNe6YzXQsw3EAkiRrUDSGf2QIqtSf6e086qtxFd6DOllkDR/966lr+ 12Vh2ZQJNKXK3Hv7yGFZURG1/7QU4tHjHWqITdn7SW5NsgWNEhHBeTFIIfa3qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775082812; a=rsa-sha256; cv=none; b=NnsCpLXxckFcuCx2VP1c6w0+VfoKedfR6grimZ8NN5f6TWCxfUGXjfTPKvCA4Nr0nPZgoW TzHSwbrB6zX9NWfuqRWRDAyAdbr2fFegXXn7sRKFViUvLxGqHgSjnwJJ5Bn5/xGBORWJgY SnOnGV2x8ydzFUV8DmnFAB8AOfznL4NS/N6m8kYuudnx273o9x8P0a8LqU3bBHB1MElCUa ghQdXzi8pzz1lVjMwae3CDSiumN4J0XeBZyz3qx+wkNFDVWaHrNa5JxlXrXX7S3PIxW2hj DwPTnQoZ1XS6dOr7OW3GHJxcO74TaLmTxYNazqZ7l3fbmnEHhTAkW1AjMzyFbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775082812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZcwY+q99ctHE0xS+Dsw6PZgJ4Uk0Fx96VcW8YGEV4YY=; b=EXQv+G4nKy22WPfiINgvzXGcz45kPQhlGrf1C/d9zqPdgfDUIPFvwsfivPKH74fjoJvny7 m7jTq0eOogsUebIfcp8zwNxKHAdXWke0KtOSKkFbuzlg54nEka9U+EMEOUzNydXHoOupfo raZXSk/PpAvpE24B5HrN+x1av73ZHDZLPQ+Dgh2hGG5ZKCY+seT26Bum+IRA5HRcqBFFiF x66/5f3zWVgBXFFnaPbF+9SDhkOc7AQF7POn9WayZgXbffW1u2eTOWU8UznJ9LTHw4hA05 hmcXtHCGw7GR9YlwjnJXxBUeddO+EwLAlE01RHkluSyhgLiLBH0CNTAB3/w+GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmKWw1ksCzb22 for ; Wed, 01 Apr 2026 22:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44f60 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 01 Apr 2026 22:33:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 306c9049c642 - main - kqueue: add some kn_knlist assertions around knlist_(add|remove) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 306c9049c642da6a59a5dc088589605a9aa38b87 Auto-Submitted: auto-generated Date: Wed, 01 Apr 2026 22:33:32 +0000 Message-Id: <69cd9d3c.44f60.71c64195@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=306c9049c642da6a59a5dc088589605a9aa38b87 commit 306c9049c642da6a59a5dc088589605a9aa38b87 Author: Kyle Evans AuthorDate: 2026-04-01 22:30:48 +0000 Commit: Kyle Evans CommitDate: 2026-04-01 22:30:48 +0000 kqueue: add some kn_knlist assertions around knlist_(add|remove) We currently assert that kn_status is accurate, but there's more room for error. Neither of these are very likely, but currently we'd blow up in SLIST*() macros instead of providing more obvious diagnostics. It's perhaps only worth testing these because knlist_remove() requires getting logic across both f_attach() and f_detach() correct. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D56211 --- sys/kern/kern_event.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 485123989319..deb23ae96f9a 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -2617,6 +2617,8 @@ knlist_add(struct knlist *knl, struct knote *kn, int islocked) KASSERT(kn_in_flux(kn), ("knote %p not in flux", kn)); KASSERT((kn->kn_status & KN_DETACHED) != 0, ("knote %p was not detached", kn)); + KASSERT(kn->kn_knlist == NULL, + ("knote %p was already on knlist %p", kn, kn->kn_knlist)); if (!islocked) knl->kl_lock(knl->kl_lockarg); SLIST_INSERT_HEAD(&knl->kl_list, kn, kn_selnext); @@ -2639,6 +2641,8 @@ knlist_remove_kq(struct knlist *knl, struct knote *kn, int knlislocked, KASSERT(kqislocked || kn_in_flux(kn), ("knote %p not in flux", kn)); KASSERT((kn->kn_status & KN_DETACHED) == 0, ("knote %p was already detached", kn)); + KASSERT(kn->kn_knlist == knl, + ("knote %p was not on knlist %p", kn, knl)); if (!knlislocked) knl->kl_lock(knl->kl_lockarg); SLIST_REMOVE(&knl->kl_list, kn, knote, kn_selnext); From nobody Thu Apr 2 01:07:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmNxg2YLfz6YtMr for ; Thu, 02 Apr 2026 01:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmNxf6t9Vz4J08 for ; Thu, 02 Apr 2026 01:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775092054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4iaTrZ+HlcW2+6c5bOVeyUWtz6abOxN2f6uCYZWtA3Y=; b=yTBXXfv8IiB0PDUn5loeiI4zHBlXfuE+CFT4BTZsUU6Q+jspwvsSC9UTOvMluXootTdYJD HYusRmDrmAw807wWohdyjO7uOcnxyDE9c1Qn9LaB9winQXWoLnbcz787oUzabmmSTm+QH+ 2/ARgb3XApgfWcfI6OdiSe1MCwGrkU0LqYSptY7w1JVPwHBm6rAeSh+E++0aD7i7YNEpKM r8XLoU8QrNtYHa0t41v4USXqBwyvIf7+SrIoJQ3UEJ4Tv4mknF50XhcNCGhkbEbvAveL37 HUTvMJJKh7ZjiQm4dARvbfSwPYvcKj7bCByEwKCV/m1glW0uo4x6ZJiXlUi9jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775092054; a=rsa-sha256; cv=none; b=M2pKNO6cPdikoCOwfpfkQ3ZTzNKJpatBQR6+wdR3VIHW8UbxiZYQNb45LpiC5hcN5wrcfy 7Cp+kefNwGUSRlLdor26OBpBPiuHcTxwqBuBu0lBEHPEx69xpYmKwcjLD8bR+cI2LVfa7R 57XgDa9vezB9ILl2LfaRFln97q3lPKxFtQmgmZg5YZz+dne/bmqUMbbwt1WmYayWUt7Be/ H3IhEJsP/ekmsJwcQaum6kRMigD40efxoZxTpthloSL2BjtYsJw7M09r6QK3GXa4hu9d2D eeBCNCFswmSTAgczOY1VUfbayTyR+XmAphp35bE6YumMbHLPNXIEKXhomJGcgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775092054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4iaTrZ+HlcW2+6c5bOVeyUWtz6abOxN2f6uCYZWtA3Y=; b=B3YxlwhyFKxMOUEMHmAR0pAO0P3J5vMUe09oLUWvYCw8mHlNFDZqtjiTqSVgfcrWHhZoiz UYJikF2RviFTA0/IKNwLjzWzkNlE4JX+nPgebbfrVO6VsSczX96vVNACCumXxzQv2Jq1YO U4ZI4eDyjWynogbmylmKTv0XY9bAB8sZDShD0XrN56Com3VFqXbFfgi5fU2Y3p09czRYKv qbAMyzlX6p4V0WzxTyDaU+fuKYzxC9TfD5vadIs62DwmHPrOIUbq/WDclO+8g2CLPYFkoP pDQoX57eePPs8efsnffoXzzIuPOzQwWcXBL/e2kWZqZKPIzDf2gTCrpG9MV4Hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmNxf6TD3zgP7 for ; Thu, 02 Apr 2026 01:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24230 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 01:07:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: ae04c7bbf065 - main - contrib/expat: import expat 2.7.5 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae04c7bbf065278687fa930e81a96767e9009d38 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 01:07:29 +0000 Message-Id: <69cdc151.24230.670d8693@gitrepo.freebsd.org> The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=ae04c7bbf065278687fa930e81a96767e9009d38 commit ae04c7bbf065278687fa930e81a96767e9009d38 Merge: 306c9049c642 f5b5e292795b Author: Philip Paeps AuthorDate: 2026-04-02 00:12:18 +0000 Commit: Philip Paeps CommitDate: 2026-04-02 00:19:49 +0000 contrib/expat: import expat 2.7.5 Changes: https://github.com/libexpat/libexpat/blob/R_2_7_5/expat/Changes https://github.com/libexpat/libexpat/blob/R_2_7_4/expat/Changes Security: CVE-2026-32776 Security: CVE-2026-32777 Security: CVE-2026-32778 Security: CVE-2026-24515 Security: CVE-2026-25210 MFC after: 3 days contrib/expat/Changes | 159 +- contrib/expat/Makefile.am | 3 +- contrib/expat/Makefile.in | 6 +- contrib/expat/README.md | 13 +- contrib/expat/configure.ac | 66 +- contrib/expat/doc/Makefile.in | 3 + contrib/expat/doc/reference.html | 5091 +++++++++++++++++------------ contrib/expat/doc/xmlwf.1 | 15 +- contrib/expat/doc/xmlwf.xml | 480 +-- contrib/expat/examples/Makefile.in | 3 + contrib/expat/expat_config.h.in | 3 - contrib/expat/fix-xmltest-log.sh | 5 +- contrib/expat/lib/Makefile.am | 6 +- contrib/expat/lib/Makefile.in | 21 +- contrib/expat/lib/expat.h | 4 +- contrib/expat/lib/expat_external.h | 5 +- contrib/expat/lib/internal.h | 2 +- contrib/expat/lib/libexpat.map.in | 119 + contrib/expat/lib/xmlparse.c | 173 +- contrib/expat/lib/xmlrole.c | 4 +- contrib/expat/lib/xmltok.c | 4 +- contrib/expat/lib/xmltok_ns.c | 7 +- contrib/expat/tests/Makefile.in | 3 + contrib/expat/tests/basic_tests.c | 74 +- contrib/expat/tests/benchmark/Makefile.in | 3 + contrib/expat/tests/handlers.c | 12 +- contrib/expat/tests/handlers.h | 5 +- contrib/expat/tests/misc_tests.c | 35 +- contrib/expat/tests/nsalloc_tests.c | 27 + contrib/expat/xmlwf/Makefile.in | 3 + contrib/expat/xmlwf/xmlfile.c | 4 +- contrib/expat/xmlwf/xmlwf.c | 13 +- contrib/expat/xmlwf/xmlwf_helpgen.py | 186 +- lib/libexpat/expat_config.h | 6 +- lib/libexpat/libbsdxml.3 | 4 +- 35 files changed, 4025 insertions(+), 2542 deletions(-) diff --cc contrib/expat/README.md index c2f288ca1242,000000000000..a67548be7fc9 mode 100644,000000..100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@@ -1,311 -1,0 +1,306 @@@ +[![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) +[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) +[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) +[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10205/badge)](https://www.bestpractices.dev/projects/10205) + +> [!CAUTION] +> +> Expat is **understaffed** and without funding. +> There is a [call for help with details](https://github.com/libexpat/libexpat/blob/master/expat/Changes) +> at the top of the `Changes` file. + + - # Expat, Release 2.7.3 ++# Expat, Release 2.7.5 + +This is Expat, a C99 library for parsing +[XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by +[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997. +Expat is a stream-oriented XML parser. This means that you register +handlers with the parser before starting the parse. These handlers +are called when the parser discovers the associated structures in the +document being parsed. A start tag is an example of the kind of +structures for which you may register handlers. + +Expat supports the following C99 compilers: + +- GNU GCC >=4.5 (for use from C) or GNU GCC >=4.8.1 (for use from C++) +- LLVM Clang >=3.5 +- Microsoft Visual Studio >=17.0/2022 + (the oldest version supported by the [official GitHub Actions Windows images](https://github.com/actions/runner-images)) + +Windows users can use the +[`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases), +which includes both pre-compiled libraries and executables, and source code for +developers. + +Expat is [free software](https://www.gnu.org/philosophy/free-sw.en.html). +You may copy, distribute, and modify it under the terms of the License +contained in the file +[`COPYING`](https://github.com/libexpat/libexpat/blob/master/expat/COPYING) +distributed with this package. +This license is the same as the MIT/X Consortium license. + + +## Using libexpat in your CMake-Based Project + +There are three documented ways of using libexpat with CMake: + +### a) `find_package` with Module Mode + +This approach leverages CMake's own [module `FindEXPAT`](https://cmake.org/cmake/help/latest/module/FindEXPAT.html). + +Notice the *uppercase* `EXPAT` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.10) + +project(hello VERSION 1.0.0) + +find_package(EXPAT 2.2.8 MODULE REQUIRED) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC EXPAT::EXPAT) +``` + +### b) `find_package` with Config Mode + +This approach requires files from… + +- libexpat >=2.2.8 where packaging uses the CMake build system +or +- libexpat >=2.3.0 where packaging uses the GNU Autotools build system + on Linux +or +- libexpat >=2.4.0 where packaging uses the GNU Autotools build system + on macOS or MinGW. + +Notice the *lowercase* `expat` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.10) + +project(hello VERSION 1.0.0) + +find_package(expat 2.2.8 CONFIG REQUIRED char dtd ns) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC expat::expat) +``` + +### c) The `FetchContent` module + +This approach — as demonstrated below — requires CMake >=3.18 for both the +[`FetchContent` module](https://cmake.org/cmake/help/latest/module/FetchContent.html) +and its support for the `SOURCE_SUBDIR` option to be available. + +Please note that: +- Use of the `FetchContent` module with *non-release* SHA1s or `master` + of libexpat is neither advised nor considered officially supported. +- Pinning to a specific commit is great for robust CI. +- Pinning to a specific commit needs updating every time there is a new + release of libexpat — either manually or through automation —, + to not miss out on libexpat security updates. + +For an example that pulls in libexpat via Git: + +```cmake +cmake_minimum_required(VERSION 3.18) + +include(FetchContent) + +project(hello VERSION 1.0.0) + +FetchContent_Declare( + expat + GIT_REPOSITORY https://github.com/libexpat/libexpat/ + GIT_TAG 000000000_GIT_COMMIT_SHA1_HERE_000000000 # i.e. Git tag R_X_Y_Z + SOURCE_SUBDIR expat/ +) + +FetchContent_MakeAvailable(expat) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC expat) +``` + + +## Building from a Git Clone + +If you are building Expat from a check-out from the +[Git repository](https://github.com/libexpat/libexpat/), +you need to run a script that generates the configure script using the +GNU autoconf and libtool tools. To do this, you need to have +autoconf 2.58 or newer. Run the script like this: + +```console +./buildconf.sh +``` + +Once this has been done, follow the same instructions as for building +from a source distribution. + + +## Building from a Source Distribution + +### a) Building with the configure script (i.e. GNU Autotools) + +To build Expat from a source distribution, you first run the +configuration shell script in the top level distribution directory: + +```console +./configure +``` + +There are many options which you may provide to configure (which you +can discover by running configure with the `--help` option). But the +one of most interest is the one that sets the installation directory. +By default, the configure script will set things up to install +libexpat into `/usr/local/lib`, `expat.h` into `/usr/local/include`, and +`xmlwf` into `/usr/local/bin`. If, for example, you'd prefer to install +into `/home/me/mystuff/lib`, `/home/me/mystuff/include`, and +`/home/me/mystuff/bin`, you can tell `configure` about that with: + +```console +./configure --prefix=/home/me/mystuff +``` + +Another interesting option is to enable 64-bit integer support for +line and column numbers and the over-all byte index: + +```console +./configure CPPFLAGS=-DXML_LARGE_SIZE +``` + +However, such a modification would be a breaking change to the ABI +and is therefore not recommended for general use — e.g. as part of +a Linux distribution — but rather for builds with special requirements. + +After running the configure script, the `make` command will build +things and `make install` will install things into their proper +location. Have a look at the `Makefile` to learn about additional +`make` options. Note that you need to have write permission into +the directories into which things will be installed. + +If you are interested in building Expat to provide document +information in UTF-16 encoding rather than the default UTF-8, follow +these instructions (after having run `make distclean`). +Please note that we configure with `--without-xmlwf` as xmlwf does not +support this mode of compilation (yet): + +1. Mass-patch `Makefile.am` files to use `libexpatw.la` for a library name: +
+ `find . -name Makefile.am -exec sed + -e 's,libexpat\.la,libexpatw.la,' + -e 's,libexpat_la,libexpatw_la,' + -i.bak {} +` + +1. Run `automake` to re-write `Makefile.in` files:
+ `automake` + +1. For UTF-16 output as unsigned short (and version/error strings as char), + run:
+ `./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`
+ For UTF-16 output as `wchar_t` (incl. version/error strings), run:
+ `./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T + --without-xmlwf` +
Note: The latter requires libc compiled with `-fshort-wchar`, as well. + +1. Run `make` (which excludes xmlwf). + +1. Run `make install` (again, excludes xmlwf). + +Using `DESTDIR` is supported. It works as follows: + +```console +make install DESTDIR=/path/to/image +``` + +overrides the in-makefile set `DESTDIR`, because variable-setting priority is + +1. commandline +1. in-makefile +1. environment + +Note: This only applies to the Expat library itself, building UTF-16 versions +of xmlwf and the tests is currently not supported. + - When using Expat with a project using autoconf for configuration, you - can use the probing macro in `conftools/expat.m4` to determine how to - include Expat. See the comments at the top of that file for more - information. - +A reference manual is available in the file `doc/reference.html` in this +distribution. + + +### b) Building with CMake + +The CMake build system is still *experimental* and may replace the primary +build system based on GNU Autotools at some point when it is ready. + + +#### Available Options + +For an idea of the available (non-advanced) options for building with CMake: + +```console +# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,' +// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +// Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +// Path to a program. +DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man + +// Build man page for xmlwf +EXPAT_BUILD_DOCS:BOOL=ON + +// Build the examples for expat library +EXPAT_BUILD_EXAMPLES:BOOL=ON + +// Build fuzzers for the expat library +EXPAT_BUILD_FUZZERS:BOOL=OFF + +// Build pkg-config file +EXPAT_BUILD_PKGCONFIG:BOOL=ON + +// Build the tests for expat library +EXPAT_BUILD_TESTS:BOOL=ON + +// Build the xmlwf tool for expat library +EXPAT_BUILD_TOOLS:BOOL=ON + +// Character type to use (char|ushort|wchar_t) [default=char] +EXPAT_CHAR_TYPE:STRING=char + +// Install expat files in cmake install target +EXPAT_ENABLE_INSTALL:BOOL=ON + +// Use /MT flag (static CRT) when compiling in MSVC +EXPAT_MSVC_STATIC_CRT:BOOL=OFF + +// Build fuzzers via OSS-Fuzz for the expat library +EXPAT_OSSFUZZ_BUILD:BOOL=OFF + +// Build a shared expat library +EXPAT_SHARED_LIBS:BOOL=ON + ++// Define to provide symbol versioning for dependency generation ++EXPAT_SYMBOL_VERSIONING:BOOL=OFF ++ +// Treat all compiler warnings as errors +EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF + +// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_GETRANDOM:STRING=AUTO + - // Utilize libbsd (for arc4random_buf) - EXPAT_WITH_LIBBSD:BOOL=OFF - +// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO +``` diff --cc contrib/expat/lib/libexpat.map.in index 000000000000,52e59ed3d931..52e59ed3d931 mode 000000,100644..100644 --- a/contrib/expat/lib/libexpat.map.in +++ b/contrib/expat/lib/libexpat.map.in diff --cc lib/libexpat/expat_config.h index 565404f1577b,000000000000..2ee8a71a7871 mode 100644,000000..100644 --- a/lib/libexpat/expat_config.h +++ b/lib/libexpat/expat_config.h @@@ -1,149 -1,0 +1,149 @@@ +/* expat_config.h. Generated from expat_config.h.in by configure. */ +/* expat_config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef EXPAT_CONFIG_H +#define EXPAT_CONFIG_H 1 + +#include + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* 1234 = LILENDIAN, 4321 = BIGENDIAN */ +#if BYTE_ORDER == LITTLE_ENDIAN +#define BYTEORDER 1234 +#else +#define BYTEORDER 4321 +#endif + +/* Define to 1 if you have the `arc4random' function. */ +#define HAVE_ARC4RANDOM 1 + +/* Define to 1 if you have the `arc4random_buf' function. */ +#define HAVE_ARC4RANDOM_BUF 1 + +/* define if the compiler supports basic C++11 syntax */ +#define HAVE_CXX11 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the 'getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrandom' function. */ +#define HAVE_GETRANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the 'bsd' library (-lbsd). */ +/* #undef HAVE_LIBBSD */ + +/* Define to 1 if you have a working 'mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have `syscall' and `SYS_getrandom'. */ +#define HAVE_SYSCALL_GETRANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "expat" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/libexpat/libexpat/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "expat" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "expat 2.7.3" ++#define PACKAGE_STRING "expat 2.7.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "expat" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "2.7.3" ++#define PACKAGE_VERSION "2.7.5" + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Version number of package */ - #define VERSION "2.7.3" ++#define VERSION "2.7.5" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to allow retrieving the byte offsets for attribute names and values. + */ +/* #undef XML_ATTR_INFO */ + +/* Define to specify how much context to retain around the current parse + point, 0 to disable. */ +#define XML_CONTEXT_BYTES 1024 + +/* Define to include code reading entropy from `/dev/urandom'. */ +#define XML_DEV_URANDOM 1 + +/* Define to make parameter entity parsing functionality available. */ +#define XML_DTD 1 + +/* Define as 1/0 to enable/disable support for general entities. */ +#define XML_GE 1 + +/* Define to make XML Namespaces functionality available. */ +#define XML_NS 1 + +/* Define to empty if 'const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to 'long int' if does not define. */ +/* #undef off_t */ + +#endif // ndef EXPAT_CONFIG_H diff --cc lib/libexpat/libbsdxml.3 index d25249bbc155,000000000000..2eea4810ef6c mode 100644,000000..100644 --- a/lib/libexpat/libbsdxml.3 +++ b/lib/libexpat/libbsdxml.3 @@@ -1,67 -1,0 +1,67 @@@ +.\"- +.\" Copyright (c) 2002 Poul-Henning Kamp +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\"/ - .Dd September 28, 2025 ++.Dd April 2, 2026 +.Dt LIBBSDXML 3 +.Os +.Sh NAME +.Nm libbsdxml +.Nd eXpat XML parser library +.Sh SYNOPSIS +.In bsdxml.h +.Sh DESCRIPTION +The +.Nm - library is a verbatim copy of the eXpat XML library version 2.7.3. ++library is a verbatim copy of the eXpat XML library version 2.7.5. +.Pp +The +.Nm +library is intended to be used within the +.Fx +base system only. +Use of the +.Nm +library for other purposes is not supported and discouraged. +.Pp +To avoid version and autoconfiguration issues, the library has been +renamed to +.Nm +rather than retain the original eXpat library and include file names +to prevent confusion and autoconfiguration issues for 3rd party +software. +.Sh SEE ALSO +For full documentation, please see the eXpat webpage at +.Pa http://www.libexpat.org/ . +.Sh AUTHORS +.An -nosplit +The original eXpat was written by +.An James Clark Aq Mt jjc@jclark.com . +.Pp +Subsequently eXpat maintenance and development been taken up by a group +of people under the leadership of +.An Fred Drake Aq Mt fdrake@acm.com , +.An Paul Prescod , +and +.An Clark Cooper . From nobody Thu Apr 2 02:41:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmR1h0jQtz6WM46 for ; Thu, 02 Apr 2026 02:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmR1g6r2Rz3JYv for ; Thu, 02 Apr 2026 02:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775097672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKjUBpvXh8NpzJ7hNrBn7dypXx4KKpUrrBfl9l0pztE=; b=SBZdrOLl6UhP6078JdLEF9j9hM6ktx/zPEK8DBTznSph3P5gbsYZUe4EcXbvVhgfND7eG5 sXdC+Sjizoefl/Zfh1FPkJtmfVFQz2aWDD9NSU4UlOvvlgak+9uELW3d213iWU1R5Gd67T 0j2k9ImX/bIHM3reLkA1KzVat8/4+TS3Ei4LRabLLdlcu5Hf0lfI9erZRJa1mOf/WfmnKN kPP3tr9Wj/sIS0A9S6WBC4IbMdqDOStwhLaOtxkn+YZsegmszPkexMUbSVDT54TZBkq1z7 qAAL2mydPtSkwRSk7hAH/yqSKemWyKdGw3mP9KPqC0aWSNkbTp9uUTGNU2tdUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775097672; a=rsa-sha256; cv=none; b=Cl4RlbtJ4i4rS/tvYQ/IUY1uJw0AZGD3DRc4KEaDLGD1z2zSa6ovbv/UYv3CR63yA+KLwF RcIwOq9AUDJqGcD72cXbYeH7uUBaMGWrOSKmGSL8mftkr2b5sMCfqDbhpw/M7V5Wass71i 3vLXKku/gFsqPFGQkrBDY5boiUowZ+CH94Ea04Z1i0fEwznKmC6MJQNm4IZHeIjy+lY2ss UuLzhujpMA+ZsjVly2pNnegXgr0YeReaDKmoacRgGRkRhiIFZf2JA86BwtT2CDKkO4EynU sWv2HeArnySML/e+SCqD0EcYAU5/TUjlcD/k6JNW+Lvy20nAySuyrqdLmJEqhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775097672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKjUBpvXh8NpzJ7hNrBn7dypXx4KKpUrrBfl9l0pztE=; b=c+atdq0K6a0Fl2u4fWx08CzPSHIenC+g9Wff7adJcfpF5zZ257ZMcQXvflZPHT1FzoijkR W+pAcz7EPdg3hd1IS1Dej/+CDEd9FV6k9S331ZI9UKy2YMybw77RFiM1iD/08UQTz2rJjJ sT80UJX3S7fctGZlZy/NmVUZhEt/KEKQDw3weCVCIPRRqKn6piQOZ4mRV3OihDOFjnZROZ +5mrW4ugb0UxoVqa2J5vVXEEJudJLwpOFlrf/5qJTOIyG1b9qxbQPlvrZuHIdvl37jFlXF WkGACHVFvLwNqqbmzUg4pYxvnftdh0X5JD92SMBNd2U0l67+698nnpfEYMtwcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmR1g6MKwzjqh for ; Thu, 02 Apr 2026 02:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3708d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 02:41:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 51db69c14fb1 - main - kqueue: assert that kqueue knote lists own the knotes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51db69c14fb1a1c2dc807695e6f564d498d33d5a Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 02:41:11 +0000 Message-Id: <69cdd747.3708d.7de3587c@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=51db69c14fb1a1c2dc807695e6f564d498d33d5a commit 51db69c14fb1a1c2dc807695e6f564d498d33d5a Author: Konstantin Belousov AuthorDate: 2026-03-31 09:13:35 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-02 02:20:05 +0000 kqueue: assert that kqueue knote lists own the knotes Reviewed by: kevans, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56212 --- sys/kern/kern_event.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index deb23ae96f9a..f3723783146a 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1739,9 +1739,11 @@ findkn: KQ_LOCK(kq); if (kev->ident < kq->kq_knlistsize) { - SLIST_FOREACH(kn, &kq->kq_knlist[kev->ident], kn_link) + SLIST_FOREACH(kn, &kq->kq_knlist[kev->ident], kn_link) { + MPASS(kn->kn_kq == kq); if (kev->filter == kn->kn_filter) break; + } } } else { if ((kev->flags & EV_ADD) == EV_ADD) { @@ -1767,10 +1769,12 @@ findkn: list = &kq->kq_knhash[ KN_HASH((u_long)kev->ident, kq->kq_knhashmask)]; - SLIST_FOREACH(kn, list, kn_link) + SLIST_FOREACH(kn, list, kn_link) { + MPASS(kn->kn_kq == kq); if (kev->ident == kn->kn_id && kev->filter == kn->kn_filter) break; + } } } @@ -2882,6 +2886,7 @@ knote_attach(struct knote *kn, struct kqueue *kq) KASSERT(kn_in_flux(kn), ("knote %p not marked influx", kn)); KQ_OWNED(kq); + MPASS(kn->kn_kq == kq); if ((kq->kq_state & KQ_CLOSING) != 0) return (EBADF); @@ -2930,6 +2935,7 @@ knote_drop_detached(struct knote *kn, struct thread *td) msleep(kq, &kq->kq_lock, PSOCK, "kqflxwt", 0); } + MPASS(kn->kn_kq == kq); if (kn->kn_fop->f_isfd) list = &kq->kq_knlist[kn->kn_id]; else @@ -3106,6 +3112,7 @@ kqueue_fork_copy_list(struct klist *knlist, struct knote *marker, KQ_OWNED(kq); kn = SLIST_FIRST(knlist); while (kn != NULL) { + MPASS(kn->kn_kq == kq); if ((kn->kn_status & KN_DETACHED) != 0 || (kn_in_flux(kn) && (kn->kn_status & KN_SCAN) == 0)) { kn = SLIST_NEXT(kn, kn_link); @@ -3139,6 +3146,7 @@ kqueue_fork_copy(struct filedesc *fdp, struct file *fp, struct file *fp1, kq = kq1->kq_forksrc; marker = knote_alloc(M_WAITOK); marker->kn_status = KN_MARKER; + marker->kn_kq = kq; KQ_LOCK(kq); for (i = 0; i < kq->kq_knlistsize; i++) { @@ -3250,6 +3258,7 @@ kern_proc_kqueue_report(struct sbuf *s, struct proc *p, int kq_fd, KQ_LOCK(kq); for (i = 0; i < kq->kq_knlistsize; i++) { SLIST_FOREACH(kn, &kq->kq_knlist[i], kn_link) { + MPASS(kn->kn_kq == kq); error = kern_proc_kqueue_report_one(s, p, kq_fd, kq, kn, compat32); if (error != 0) @@ -3260,6 +3269,7 @@ kern_proc_kqueue_report(struct sbuf *s, struct proc *p, int kq_fd, goto out; for (i = 0; i <= kq->kq_knhashmask; i++) { SLIST_FOREACH(kn, &kq->kq_knhash[i], kn_link) { + MPASS(kn->kn_kq == kq); error = kern_proc_kqueue_report_one(s, p, kq_fd, kq, kn, compat32); if (error != 0) From nobody Thu Apr 2 02:42:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmR2v4SvNz6WMWL for ; Thu, 02 Apr 2026 02:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmR2v3dXcz3K30 for ; Thu, 02 Apr 2026 02:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775097735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BXkF6PghBDPtK3Yb2sW8ygICaL6TaE+zCjZQ0WCYsK4=; b=VhakjLpSvDhFIyJfC6UHg9s5pRWbRSBKby7EHO+NsgHeICMWwS6gvg0D/jTzdL+it2ELw+ Vkc2tVyDZg2xzcDgs6HJWNKFoAWutcp2T7WwgE4PnVqnmk22n46hT+nVgbD/f3jtIC/l+6 4hDUn9DiedcYfaYfbVMB8y3nqTCc9aIBRf/ctjZPyMRvnifqsQAfkauWJude+pkOlMCm2C CFRIVV8NIr1WgjtZRdL2bTmqO8bYXP88wJZ7pBrv6XX4RwzdPFPzwZR0lCqKilofG4CxyL Rb7DiGtUfDRkazf17udThiMVDLrFSezXHQZx6FiHHhN42J4wFas7kuDJ/qJRGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775097735; a=rsa-sha256; cv=none; b=uc/pmv3fnExKwW2AoGK4K3JDt4NareLSeg1g7mnVd5/qAbZrmHnLuG1JI4LQQUta8UiVdO zj3zrz7xYCZoNTIrpg4AH88L4P1IfDxdryqXCS5YCncTI3x/djQy7oxnI1NmUu7i2tvVoK Z+kzKedy7srZ61eFzLH48/Z3kjATdr7817cJJUJis6lVO+f74fqQ7W8Q+/n5UrpsmW608P LOBTW6zEha3bj2d3Z7nSPVpHMekzfxqAdO8/q6i4tZ77FAcCqoIGCbKiwk0oiZrwzXQjGk KIkKFmP1Gq2M3ox+LD/PmwSbs0O6ULzCgxh7aWdnHHGUu3qgo4t+D2tZf0mMKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775097735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BXkF6PghBDPtK3Yb2sW8ygICaL6TaE+zCjZQ0WCYsK4=; b=qF8bGGlC+gvyD83/HK/gouczfBFLZ2kBV0gFEy9v8UVLYWVD4mjLPadcWNEYtFoP5Mg6YI q+N3D6KkOCXy7R5MQX47CR4OzuIqqYS+OTqvTboHsOf9Dk1xuMdMsTnsSSIKXOXVbRKTSK vVetxxdsS8jWmCMQTz4Isx2T76jK+B1RLNPEsOaZGOgJvb7p6rjdM8OxxUpo06J8sVGB0d kC5sOkzdxf3Eg/CGaspyKBHL0Sf6W2WRl8idsH/jW4mutKW0E4IVZ62EXs6PYm7EhDdhOr N2vyN7dp9nqikN086FjlNxS7WHvepj1SUeyepYkOMCTNJlU/ir5GInA87GNTRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmR2v3D2Xzk5Y for ; Thu, 02 Apr 2026 02:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 360cc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 02:42:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ffbf3fecdeff - main - rtld: allow dlopen("#/") List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffbf3fecdeffa17c0745e7ed342989acb620d68e Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 02:42:15 +0000 Message-Id: <69cdd787.360cc.29cd7c78@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ffbf3fecdeffa17c0745e7ed342989acb620d68e commit ffbf3fecdeffa17c0745e7ed342989acb620d68e Author: Konstantin Belousov AuthorDate: 2026-03-29 22:45:49 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-02 02:41:55 +0000 rtld: allow dlopen("#/") When a specially formatted path is passed to dlopen(), of the form #number/path and the number is the valid dirfd file descriptor listed in the LD_LIBRARY_FDS, interpret it as a relative path name against dirfd number. This complements the result returned from dladdr() for such objects in dli_fname. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56152 --- lib/libc/gen/dlopen.3 | 14 ++++++++++++ libexec/rtld-elf/rtld.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3 index 340545114114..2f10c17a4f53 100644 --- a/lib/libc/gen/dlopen.3 +++ b/lib/libc/gen/dlopen.3 @@ -164,6 +164,20 @@ Symbols from the loaded library are put before global symbols when resolving symbolic references originated from the library. .El .Pp +A special syntax for the +.Fa path +is supported, in the form of +.Dl #number/name . +The +.Ql number +should be a decimal number, which references an open file descriptor, +and which must be also listed in the environment variable +.Ev LD_LIBRARY_PATH_FDS . +In this case, the linker tries to load an object that can be opened by +.Ql openat(number, path, O_RDONLY) . +This feature is only available to trusted processes, i.e., +the activated image must be not set-uid or set-gid. +.Pp If .Fn dlopen fails, it returns a null pointer, and sets an error condition which may diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 1cf0d3e9ba28..e3f5aa5be9b4 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -178,6 +178,7 @@ static int symlook_obj1_sysv(SymLook *, const Obj_Entry *); static int symlook_obj1_gnu(SymLook *, const Obj_Entry *); static void *tls_get_addr_slow(struct tcb *, int, size_t, bool) __noinline; static void trace_loaded_objects(Obj_Entry *, bool); +static int try_fds_open(const char *name, const char *path); static void unlink_object(Obj_Entry *); static void unload_object(Obj_Entry *, RtldLockState *lockstate); static void unref_dag(Obj_Entry *); @@ -2875,9 +2876,12 @@ load_object(const char *name, int fd_u, const Obj_Entry *refobj, int flags) * using stat(). */ if ((fd = open(path, O_RDONLY | O_CLOEXEC | O_VERIFY)) == -1) { - _rtld_error("Cannot open \"%s\"", path); - free(path); - return (NULL); + fd = try_fds_open(path, ld_library_dirs); + if (fd == -1) { + _rtld_error("Cannot open \"%s\"", path); + free(path); + return (NULL); + } } } else { fd = fcntl(fd_u, F_DUPFD_CLOEXEC, 0); @@ -3586,6 +3590,53 @@ rtld_nop_exit(void) { } +/* + * Parse string of the format '#number/name", where number must be a + * decimal number of the opened file descriptor listed in + * LD_LIBRARY_PATH_FDS. If successful, tries to open dso name under + * dirfd number and returns resulting fd. + * On any error, returns -1. + */ +static int +try_fds_open(const char *name, const char *path) +{ + const char *n; + char *envcopy, *fdstr, *last_token, *ncopy; + size_t len; + int fd, dirfd, dirfd_path; + + if (!trust || name[0] != '#' || path == NULL) + return (-1); + + name++; + n = strchr(name, '/'); + if (n == NULL) + return (-1); + len = n - name; + ncopy = xmalloc(len + 1); + memcpy(ncopy, name, len); + ncopy[len] = '\0'; + dirfd = parse_integer(ncopy); + free(ncopy); + if (dirfd == -1) + return (-1); + + envcopy = xstrdup(path); + dirfd_path = -1; + for (fdstr = strtok_r(envcopy, ":", &last_token); fdstr != NULL; + fdstr = strtok_r(NULL, ":", &last_token)) { + dirfd_path = parse_integer(fdstr); + if (dirfd_path == dirfd) + break; + } + free(envcopy); + if (dirfd_path != dirfd) + return (-1); + + fd = __sys_openat(dirfd, n + 1, O_RDONLY | O_CLOEXEC | O_VERIFY); + return (fd); +} + /* * Iterate over a search path, translate each element, and invoke the * callback on the result. From nobody Thu Apr 2 02:42:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmR2w6cVLz6WMcR for ; Thu, 02 Apr 2026 02:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmR2w47kDz3K7V for ; Thu, 02 Apr 2026 02:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775097736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGIfPJGERy4yS20qvu+aYPG+cEKewoyRlKwHBLLA+jU=; b=b/TNyA28+NU4IT/yVBin0jjzX+rm5eil3lFvh/bRbxkEPBP1OFEhAKwdKf501WFlAW06ei +RwVGKaMmCWkeVts5D3pp49bpE5KzcJTzsgbTRp0ENLsVz/vro6Q0I6KxP3l+O+OPVurNZ gbUqtzZ5Agj+WWa45565Q03R4foSrx4MIsgzbk9LlcJeI9iQm54fdJyGkTpnd+rMyJJ1qq wEpmbQ2NW3tv0SGXLkYj+0rP9Q0P9Cev5nBy/hUdMT8KDWbtmGTa96naRYF5DDFam7eiNj bvXuF7Uf3UPfLIZLJ/qv1A5p8Cah/5CC8EnadiaSWX3zsQXwEPQ+OVqYbZzlIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775097736; a=rsa-sha256; cv=none; b=xA746pXPJL30Kyori6zRXKQZ8GjaX3ZnSIL6wDYhtkc5ObV5fwBTHCG/5mp0fjeXlJDxbT 674mwSe5f/476cqJOGB4TfwqGsu2EHk/zZB47tff5sLqEfIlQ5CF9PJYH9rpl9CFSv8y2E oM85xhgypQp3u3MHXhrzD0U/uTAeV7CGzjYIkFnzPQprC4Vq9vHUGdw5oySpiFjEMl2oEu XXHGdQfTu+4bCjDU1z0xnv5sIZMMyY+PfajqKgCKyGYIJdKnxIvO2xctrq3SBaFpKgtvdX HbuL1kI3oTW6d9p9TGu9UWswpegPeIw4mMjFU9kuty+K4kijXLzDpycSFKrGew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775097736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGIfPJGERy4yS20qvu+aYPG+cEKewoyRlKwHBLLA+jU=; b=T2NwYUriwGvvepfRz7rtZdjAfMhDcbWSH3jv5a0sIrRrLe2oftXX4f0TjlTZphrYfLIH3V mPuEbWXwwY1K6+H1T/5gYwUpXApp4QbksvRjSRNydsE7nj5xRA8tiPT4iteiNILc+JMkno yhGvZVKPeHsd2y5y9DMTFVFu+0PbmEZ7YcDGT4Auzkb8COmwgULrQ7P1s/mhMuLijsY4Va VOiJ46xgBcbNNUsRCInClku8SWFgaZroWZSGXK77h1aa7GCuttsW/t4780fGjnbpXq5/gY HeruY4WT7knGC0iMsm1CPyHe6jHaT49ou9qo3Z6nLZDQH68akEPFyUXCMktbaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmR2w3hsxzj7p for ; Thu, 02 Apr 2026 02:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36fca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 02:42:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 72252591ac01 - main - rtld: add test for dlopen("#dirfd/path") List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72252591ac01037fa53501adb88f00d5d3cc09ed Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 02:42:16 +0000 Message-Id: <69cdd788.36fca.5f4d52bb@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=72252591ac01037fa53501adb88f00d5d3cc09ed commit 72252591ac01037fa53501adb88f00d5d3cc09ed Author: Konstantin Belousov AuthorDate: 2026-03-30 00:42:00 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-02 02:41:56 +0000 rtld: add test for dlopen("#dirfd/path") Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56152 --- libexec/rtld-elf/tests/Makefile | 1 + libexec/rtld-elf/tests/dlopen_hash_test.c | 45 +++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/libexec/rtld-elf/tests/Makefile b/libexec/rtld-elf/tests/Makefile index 3c05b52b83bb..4fbc32d87615 100644 --- a/libexec/rtld-elf/tests/Makefile +++ b/libexec/rtld-elf/tests/Makefile @@ -14,6 +14,7 @@ SRCS.$t= $t.c common.c .endfor ATF_TESTS_C+= dlopen_test +ATF_TESTS_C+= dlopen_hash_test WARNS?= 3 diff --git a/libexec/rtld-elf/tests/dlopen_hash_test.c b/libexec/rtld-elf/tests/dlopen_hash_test.c new file mode 100644 index 000000000000..a95ebdb34381 --- /dev/null +++ b/libexec/rtld-elf/tests/dlopen_hash_test.c @@ -0,0 +1,45 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Alex S + * Copyright 2026 The FreeBSD Foundation + * + * Portions of this software were developed by + * Konstantin Belousov under sponsorship from + * the FreeBSD Foundation. + */ + +#include +#include +#include +#include +#include + +ATF_TC_WITHOUT_HEAD(dlopen_hash); +ATF_TC_BODY(dlopen_hash, tc) +{ + void *handle; + char *pathfds; + char *name; + int testdir; + + handle = dlopen("libpythagoras.so.0", RTLD_LAZY); + ATF_REQUIRE(handle == NULL); + + testdir = open(atf_tc_get_config_var(tc, "srcdir"), + O_RDONLY | O_DIRECTORY); + ATF_REQUIRE(testdir >= 0); + + ATF_REQUIRE(asprintf(&pathfds, "%d", testdir) > 0); + ATF_REQUIRE(rtld_set_var("LIBRARY_PATH_FDS", pathfds) == 0); + + ATF_REQUIRE(asprintf(&name, "#%d/libpythagoras.so.0", testdir) > 0); + handle = dlopen(name, RTLD_LAZY); + ATF_REQUIRE(handle != NULL); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, dlopen_hash); + return atf_no_error(); +} From nobody Thu Apr 2 03:59:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmSlf3JnZz6WVSS for ; Thu, 02 Apr 2026 03:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmSlf2NPgz3RvK for ; Thu, 02 Apr 2026 03:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775102350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iqrhczF8tosOWaG/POx3pT0I8bRQjxMzi4rp88cjM3Y=; b=UHfPGd6RgIU8KF3vLZoqhzkPs1XJS+And6rd5iAQIbZXtz6J6OgXIWP1vRUdT+9/b++0y9 Oylwmoz8Gm8QWsYBzSJHzIk2PlMQClHMoPV/2xIFkDaifTDMB9wSiRab7TIo270GhdungJ mzCmBssHxJDvQ026rVJjLKSFpULXQzyLKTbKq6ppt2h+mht0PiYVKuSLmIhzLoubQAgQmd zuIIai5qtp2Bk46I5+0AjT/R/aAdL1AP6GewTeXH4hS40Eg+dpDSkqSW6OW9poRQ9Hi684 LJfg+EnsAE37TYqw3FlSmPrF+FmdPpTQWEJyqFNH3Hrt80vUCJaGXoOSYr/rTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775102350; a=rsa-sha256; cv=none; b=CvakyKC4WxaAIhSHVkDMgFpBcCv32enZBX0jsULvO2TA7Q/1JCiJg/f70XSDEJLJamE6Fc ZaeNbnP47hOA5yK5yvZqyeIdW+rdjdZtotfEJazA8eraGcNmaDAxuQ3c/Wt6DUwtqt2u1x XTW1YFLM/yEpxtW3SWIec4MzmOQsqTNpcCrPeq1o8lQzWJ16EkRiy9d1Z3XyUa03wwkUc0 h/msuiABxIQFbtHw7bol1y0x6426bfi+jpJwo08XI1Eh7wwDiVLA96IoOkTVojI2QF9j3K TOEGnnyvro91tUcARj1QSykl5OM8F5LdPmLiM4ExR0itvKTiUGHVS9ymz8qBDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775102350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iqrhczF8tosOWaG/POx3pT0I8bRQjxMzi4rp88cjM3Y=; b=qccR43OB/hmA0/K7jepBcmsw9cHlvtEJq6sswYrb9nNtS3X/JfRuV87MxWdjzvDYUufI7l OATBgAWeW2wR372aWyKRsOHn1m0ipPv2ffXyB+BaGKfE4KG8FnrHM3E5dDZtSBjWNUgt8R 1rpKE0xxaIKOvqHgOdoFtbrC6rxn2msofp89EXopjl7ZcVZNAEztBOuD4Y6ssI2wlHnyFL 5J+IcfKSdDYCRfFo0WSSmf6Ev+G/dPEnad+CnBOnGN9B7PIX6MKnEFTYRdd15ym2iC7H7E /ucLV2YYaBbtw7hFUSss3lCu9pJQMXxZM+mv3X5Hk01851Vax+0mfg3opQaEeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmSlf1xJyzmF5 for ; Thu, 02 Apr 2026 03:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f42c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 03:59:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: db9bbe131c92 - main - procctl.2: Align list indentation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db9bbe131c92f55e6cf03657dc030c9eea93a9fb Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 03:59:10 +0000 Message-Id: <69cde98e.3f42c.28a6fca5@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=db9bbe131c92f55e6cf03657dc030c9eea93a9fb commit db9bbe131c92f55e6cf03657dc030c9eea93a9fb Author: Alexander Ziaee AuthorDate: 2026-04-02 03:07:28 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-02 03:39:34 +0000 procctl.2: Align list indentation Remove 81 lines of whitespace at default manual rendering width. MFC after: 3 days --- lib/libsys/procctl.2 | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/libsys/procctl.2 b/lib/libsys/procctl.2 index dfb7931de265..cccaad83bf4a 100644 --- a/lib/libsys/procctl.2 +++ b/lib/libsys/procctl.2 @@ -56,7 +56,7 @@ to control as many of the selected processes as possible. An error is only returned if no selected processes successfully complete the request. The following identifier types are supported: -.Bl -tag -width P_PGID +.Bl -tag -width indent .It Dv P_PID Control the process with the process ID .Fa id . @@ -79,7 +79,7 @@ All status query requests require the caller to have the right to observe the target. .Pp The following commands are supported: -.Bl -tag -width PROC_LOGSIGEXIT_STATUS +.Bl -tag -width indent .It Dv PROC_ASLR_CTL Controls Address Space Layout Randomization (ASLR) in program images created @@ -91,7 +91,7 @@ The .Fa data parameter must point to an integer variable holding one of the following values: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_ASLR_FORCE_ENABLE Request that ASLR is enabled after execution, even if it is disabled system-wide. @@ -117,7 +117,7 @@ The .Fa data parameter must point to an integer variable, where one of the following values is written: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_ASLR_FORCE_ENABLE .It Dv PROC_ASLR_FORCE_DISABLE .It Dv PROC_ASLR_NOFORCE @@ -133,7 +133,7 @@ dump. The .Va arg parameter must point to an integer variable holding one of the following values: -.Bl -tag -width PROC_LOGSIGEXIT_CTL_FORCE_DISABLE +.Bl -tag -width indent .It Dv PROC_LOGSIGEXIT_CTL_FORCE_ENABLE Enables logging of exits due to signals that would normally cause a core dump. Logging is done via @@ -155,7 +155,7 @@ The .Va arg parameter must point to an integer variable, where one of the following values is written: -.Bl -tag -width PROC_LOGSIGEXIT_CTL_FORCE_DISABLE +.Bl -tag -width indent .It Dv PROC_LOGSIGEXIT_CTL_FORCE_ENABLE .It Dv PROC_LOGSIGEXIT_CTL_FORCE_DISABLE .It Dv PROC_LOGSIGEXIT_CTL_NOFORCE @@ -186,7 +186,7 @@ The .Fa data parameter must point to an integer variable holding one of the following values: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_PROTMAX_FORCE_ENABLE Use the permissions in .Fa prot @@ -214,7 +214,7 @@ The .Fa data parameter must point to an integer variable, where one of the following values is written: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_PROTMAX_FORCE_ENABLE .It Dv PROC_PROTMAX_FORCE_DISABLE .It Dv PROC_PROTMAX_NOFORCE @@ -233,7 +233,7 @@ The parameter must point to an integer containing an operation and zero or more optional flags. The following operations are supported: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PPROT_SET Mark the selected processes as protected. .It Dv PPROT_CLEAR @@ -241,7 +241,7 @@ Clear the protected state of selected processes. .El .Pp The following optional flags are supported: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PPROT_DESCEND Apply the requested operation to all child processes of each selected process in addition to each selected process. @@ -300,7 +300,7 @@ struct procctl_reaper_status { The .Fa rs_flags may have the following flags returned: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv REAPER_STATUS_OWNED The specified process is a reaper. When this flag is returned, the specified process @@ -380,7 +380,7 @@ the (grand-)parent of the descendant process. The .Fa pi_flags field returns the following flags, further describing the descendant: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv REAPER_PIDINFO_VALID Set to indicate that the .Vt procctl_reaper_pidinfo @@ -431,7 +431,7 @@ The .Fa rk_flags field further directs the operation. It is or-ed from the following flags: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv REAPER_KILL_CHILDREN Deliver the specified signal only to direct children of the reaper. .It Dv REAPER_KILL_SUBTREE @@ -473,7 +473,7 @@ as well as dumping core. Possible values for the .Fa data argument are: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_TRACE_CTL_ENABLE Enable tracing, after it was disabled by .Dv PROC_TRACE_CTL_DISABLE . @@ -524,7 +524,7 @@ system call. Possible values for the .Fa data argument are: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_TRAPCAP_CTL_ENABLE Enable .Dv SIGTRAP @@ -634,7 +634,7 @@ The .Fa data argument must point to an integer variable containing flags. The following flags are allowed: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_STACKGAP_ENABLE This flag is only accepted for consistency with .Dv PROC_STACKGAP_STATUS . @@ -667,7 +667,7 @@ Returns the current stack gap state for the specified process. .Fa data must point to an integer variable, which is used to return a bitmask consisting of the following flags: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_STACKGAP_ENABLE Stack gaps are enabled. .It Dv PROC_STACKGAP_DISABLE @@ -699,7 +699,7 @@ The .Fa data parameter must point to an integer variable holding the following value: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_NO_NEW_PRIVS_ENABLE Request set-user-ID and set-group-ID bits to be ignored. .El @@ -711,7 +711,7 @@ The .Fa data parameter must point to an integer variable, where one of the following values is written: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_NO_NEW_PRIVS_ENABLE .It Dv PROC_NO_NEW_PRIVS_DISABLE .El @@ -722,7 +722,7 @@ The .Fa data parameter must point to an integer variable holding one of the following values: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_WX_MAPPINGS_PERMIT Enable creation of mappings that have both write and execute permissions in the specified process' current and future address spaces. @@ -760,7 +760,7 @@ The .Dv data parameter must point to an integer variable, where one of the following values is written: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_WX_MAPPINGS_PERMIT Creation of simultaneously writable and executable mappings are permitted; otherwise, the process cannot create such mappings. @@ -779,7 +779,7 @@ creation, the flag is set in the returned value. .El .Sh x86 MACHINE-SPECIFIC REQUESTS -.Bl -tag -width PROC_KPTI_STATUS +.Bl -tag -width indent .It Dv PROC_KPTI_CTL AMD64 only. Controls the Kernel Page Table Isolation (KPTI) option for the children @@ -795,7 +795,7 @@ The .Fa data parameter must point to an integer variable containing one of the following commands: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_KPTI_CTL_ENABLE_ON_EXEC Enable KPTI after .Xr execve 2 . @@ -811,7 +811,7 @@ Returns the current KPTI status for the specified process. .Fa data must point to an integer variable, where one of the following values is written: -.Bl -tag -width Ds +.Bl -tag -width indent .It Dv PROC_KPTI_CTL_ENABLE_ON_EXEC .It Dv PROC_KPTI_CTL_DISABLE_ON_EXEC .El From nobody Thu Apr 2 07:42:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmYjs1SZsz6WvGN for ; Thu, 02 Apr 2026 07:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmYjs0f28z3plQ for ; Thu, 02 Apr 2026 07:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775115777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Md/9xsjpYUxFtOdozi1qsiwknSbeiPVF0XE5ruHAng=; b=RSjRvPhpa+wMf8YVOHvHfW+KH7izMrOmIOJozbPZhLVG+ojFaVmIHj43NRSowWBJ5Vnqe0 AWL4L0DV21rbTL7uDawdhvMHO/TqrE2uj8m/Gr+zvS69rcLL3hqVWDtSxP/EpIxtVVVi4G aNAoUp9wFhPhrU/n6YrGFTepaTDzT+fmXAX0tDoT5cJi+oYBJ5JggAYvvYpRXSUzpYbRJk 3klY8rp1Yc7GmL3masmMcT78dIwl1dLtQkSyxTjoviOhIywZ1CpLf8EzEpWXArr31XyJzR 1quc/CdM8wqVoUHYNtxifdjMDvTDzLA4eBtOb2YHs4BDzdIJvCPX22WgQsgzhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775115777; a=rsa-sha256; cv=none; b=Llqo/WOpR1u64Wp+zfWGB3b40LoRk/BjU63yNRtx5z3qLo0fgRwiwmplM9LEFW40W3OkJS CGBl3vhYttN5YeUEYTuibwOSDZcIGqwzjJqZW6C8ABZtuFDP8pocPwhPxU3mLRz9LTVtQH 7OmOiexsH8XOjVovoUf97IVfP/QlEjOb9lMMTdlsMzfrcS+z7bL4gB0xzUaj8cFMjcBAq3 QgqDAi8UPf20zCSgUgQ03SQuw3oMUPxexHlDBia3yebjjGz0r+iRObDPww5i9m6PIXhtu+ HvBdYrLmkU/h7a7SKM1xGQCPHOrqMe4sdQJlQTSadowUbb8TzXIdsqDNgIw6DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775115777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Md/9xsjpYUxFtOdozi1qsiwknSbeiPVF0XE5ruHAng=; b=gtOeYI56aLMah4pq9ysajSvl1oP0wC5r6wcmXdhLbh3aD3wzKHnqXULZ9CKTDIBNxC5HXq DtI7ydm9JYvgamHIUNTrt2cPYtqcOpzo//mY3x41sbCdW5yLAxiEF7UcsoW9dAFl1n8DbE de7qrn1icXVJIFgFFR+yIgaTiW0W780+/0BqJvYXYRslNkzPLErxKrXMPMJPAmnL7+sOtz 0aQXIOQkLMdABcsnPpjDGHKuGquaYiprvmcIStJyZ9889+VLcFZJo1bKhHtUN4RpIZPvwF xQiyvwsD1z6ZkxFz25RvQ+CwrAXMNU0wc9KbhvZuVHvCtR7H/q2Zwl7lcDk/nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmYjs043Mzt8N for ; Thu, 02 Apr 2026 07:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 276fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 07:42:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 59e9a4c05a81 - main - posix_spawn.3: fix formatting of xref List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59e9a4c05a81a25aaf355cb18c24835abad96ff2 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 07:42:57 +0000 Message-Id: <69ce1e01.276fa.2c1201e3@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=59e9a4c05a81a25aaf355cb18c24835abad96ff2 commit 59e9a4c05a81a25aaf355cb18c24835abad96ff2 Author: Konstantin Belousov AuthorDate: 2026-04-02 07:42:16 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-02 07:42:16 +0000 posix_spawn.3: fix formatting of xref Sponsored by: The FreeBSD Foundation MFC after: 3 days --- lib/libc/gen/posix_spawn.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index f7489890db31..9fa370a7960f 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -467,7 +467,7 @@ action. .Xr posix_spawnattr_setexecfd_np 3 , .Xr posix_spawnattr_setflags 3 , .Xr posix_spawnattr_setpgroup 3 , -.Xr posix_spawnattr_setprocdescp_np 3, +.Xr posix_spawnattr_setprocdescp_np 3 , .Xr posix_spawnattr_setschedparam 3 , .Xr posix_spawnattr_setschedpolicy 3 , .Xr posix_spawnattr_setsigdefault 3 , From nobody Thu Apr 2 10:24:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmdJT0xdYz6YB7W for ; Thu, 02 Apr 2026 10:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmdJT0TJGz3CC8 for ; Thu, 02 Apr 2026 10:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775125481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uczojfxRCOj01jiwGNjJTkVI4P9gXPF0+kaDU+fdxS0=; b=EnXO3LKtD33kHCM32Xqind2gtoxvPqgQooGyKCbJt4A2GViVopcY0XqD+UvN5PMxiV8dxv 3U33HrQ3n04TbsUgKNdN03qpdLy4NqQscIar5qi1JwamBa+rL1P8nKp4XgCyCdmbjoiPsg Ifx9gv6xD2Av0hBSTa4AnZ4vlIRtxmzFtsiJ0wJ3ExP+iB1XsaTg3/7vvSHMC2L6zyNwjD sEX+JjeNhNE96/ZZ5Q1um2Th5QWvM4gEyrNhiLOqx2K6FmInOD+qnv1I5pzmsOcbY1q0Zn 0jsBtYCkynGYvX0GazUdk7Ss4epvPBiRsD7XY89UAah6ksJf21az+dxbqAGawA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775125481; a=rsa-sha256; cv=none; b=ojSdO8umLoNjZJwWDnFe/+cDsg+Ai1MEuFtWcBFZ8ww+28aIZVzh9qHPcZ8o7bXkL2qn0h e6FcmG2rgpehp0AwNUkWaRawYDp2Y6mSHMaOcINfs56ESJLALH6gD57FvabWs77ZiYTWn0 pbK37RUPH1NkeAExLOj/2xKMxXt1eBbg0O95O763alUWjwi3zD1rYwj8hBV9B+4h3QpWOA 5/rLFR9Ht2jdMoYhYTQ7uBvJWiCCmJ3pMpIYmo0SwvidTC8oX/IVMKBegvt1PIrPil34T+ 4pXtx4my4kfNB6Fz5sBtpxDpwQ0DtHfIJqpS/hEqNunpIRKtzVQ6re7Skc1Dmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775125481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uczojfxRCOj01jiwGNjJTkVI4P9gXPF0+kaDU+fdxS0=; b=d6vyszu/fOF3vca9xa4B4/X5BVE2IR7Tpq0TcnnfRidDcUvIudY3vTHdBgs5DVoyWKgNNA K8aTJWDzaw24X6M5hbl4+Bz+F7LJsje7jxzPfQlfbzyWbQHAxijIlvAUL80bg/IxW0L/mF wPYO3xvpAxrEwwXjiOvxuuSifiL7NxWnmK1iQtpV4yxiONowvczZ0MdNXCRzPOUlJR9Ak8 pOohVY8ZK4HXZAjziUrcjDivVjtK9yIyFh6cNmSsqc/qupin0G+rjRcg6IasIodbJZB4rx WlzUCeO7ROIU8NxrWKC8JCCwC/Uj29F3JM6Yvh4rtqy8fpyb2go1CGxFcGtxBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmdJT0597zy0h for ; Thu, 02 Apr 2026 10:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fb11 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 10:24:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrey V. Elsukov Subject: git: d9d7b5948649 - main - ipfw_nptv6: fix handling the ifaddr removal event List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9d7b59486499615a5fdce54443ce62aecf557e8 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 10:24:41 +0000 Message-Id: <69ce43e9.3fb11.185578c2@gitrepo.freebsd.org> The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=d9d7b59486499615a5fdce54443ce62aecf557e8 commit d9d7b59486499615a5fdce54443ce62aecf557e8 Author: Andrey V. Elsukov AuthorDate: 2026-04-02 10:14:29 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-04-02 10:14:29 +0000 ipfw_nptv6: fix handling the ifaddr removal event The result of IN6_ARE_MASKED_ADDR_EQUAL() macro is not an integer, so threat it as a boolean value. PR: 294114 Reported by: Peter Much MFC after: 1 week --- sys/netpfil/ipfw/nptv6/nptv6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfw/nptv6/nptv6.c b/sys/netpfil/ipfw/nptv6/nptv6.c index bfe28d75a01d..c36e9597fe22 100644 --- a/sys/netpfil/ipfw/nptv6/nptv6.c +++ b/sys/netpfil/ipfw/nptv6/nptv6.c @@ -593,8 +593,8 @@ ifaddr_cb(struct namedobj_instance *ni, struct named_object *no, if ((cfg->flags & NPTV6_READY) == 0) return (0); /* If address does not match the external prefix, ignore */ - if (IN6_ARE_MASKED_ADDR_EQUAL(&cfg->external, args->addr, - &cfg->mask) != 0) + if (!IN6_ARE_MASKED_ADDR_EQUAL(&cfg->external, args->addr, + &cfg->mask)) return (0); /* Otherwise clear READY flag */ cfg->flags &= ~NPTV6_READY; From nobody Thu Apr 2 11:11:49 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmfLs1K93z6YGF7 for ; Thu, 02 Apr 2026 11:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmfLs0WzVz3HGb for ; Thu, 02 Apr 2026 11:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775128309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UNj543iYIHYBJhIyvRtNVU4XRUDHHj4MftroVQ8ikp8=; b=IhUfSptGnYLFKGpUjGrTnwlAcY3FzEaeMshGZz7cQWpGeoj8xEs7iNR/D4tVObK8KyjQyo nYHei7JvreNIRrgyraoTta7A/OlbrwCmc52hjFSAgy+p6GB5xbMlwjZ78xMBQ2OJLG45eQ 843PS+ANHdVaJZPd5QGK9UNl1iKqtRNzynPjNVLqopKPqXzyHPptroIOC0239FvBzcMzTe jZbJs0U3XtltdL8ps6AbiM0YC+akgURCEDpm9NMHNyv3xy7ja1F/qGWnlXXQVjwMd8LMgS W2D2Zk68wEtyTHZTy7GyYgz3hR7I0syIA8t0zy/DuejebXiiw9MHZWn29JsBHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775128309; a=rsa-sha256; cv=none; b=PiRMogTWVcO/9JYOe0N2g3B/uLOJ/xRkTLYLpjZ8i9Lvl21qcnXIOGsrMn1kUuPme4U7ZZ Qcz62kV3eAHcRaTdhSKXxna5Cy7lv8ugaSeKAgPRuWOH2u+dadBYIkYnpR/FxwB9ii+DdN YF01lbXzh7OZ7QeXESrK7b5BgE2wgeaZ6zqjZiw64nTOcjcKY0EcJSD9icj+L0TcsD1NwY B8OscagR2ptLihuY8vcmYcDciHdvOVX8lhqfwhs1mfsBs0KKEcaJGXkHV3vH9d00wEEhUh ldDHp94uXDHKXVc4CXKKK5HW7mCcsxmXDGFsmvO2Td1ung5Ft/6vtA1hfqEQjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775128309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UNj543iYIHYBJhIyvRtNVU4XRUDHHj4MftroVQ8ikp8=; b=OmcUQZtjQrXWuQLvrF/+8bITiji8Cm9r6en0bzpVTmsFBFURc47fqy1NmEGTNFGhgsoSIZ f5odsaSYlTCZNLjbhcIlc2J2vj2CPxxNMTceXkSFz2FHMG3NCjLs6TetOelOeSoYZoynAg h5fz3I6UsjNur0DnaM97DMsKcefY3IwIh9zC3EkeJb021Yd/ZSM86tKCOMIO1Qm2ZUtc3U noKSl968jjDOH6hOy6SrfUc+tb4mUYH274YWqNV0FrxkvlpXGTMb1OivlIcu3pis5k8925 RoeUe1mxshKb1Zh4/OJroSNMHCA9YnbPUzOHuxz4JN0dPkgIiCQ7e9OIgFcIRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmfLs05hgz102h for ; Thu, 02 Apr 2026 11:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bfe6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 11:11:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: cf275806b6ed - main - nd6: Fix delayed NA for proxy addresses List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf275806b6eddd66a3d82be56b3672dc5afab525 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 11:11:49 +0000 Message-Id: <69ce4ef5.1bfe6.27412941@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=cf275806b6eddd66a3d82be56b3672dc5afab525 commit cf275806b6eddd66a3d82be56b3672dc5afab525 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-03-13 14:25:01 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-04-02 11:11:26 +0000 nd6: Fix delayed NA for proxy addresses Delayed proxy addresses need special handling, since they can use link-local ifa as their source address and have different link-layer data in their response. Fixes: f37fbe30f559 Reviewed by: glebius, markj Differential Revision: https://reviews.freebsd.org/D55850 --- sys/netinet6/nd6.h | 1 + sys/netinet6/nd6_nbr.c | 72 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 53 insertions(+), 20 deletions(-) diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 70cd6dfbdb62..8c069c294593 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -156,6 +156,7 @@ struct in6_ndifreq { #define ND6_QUEUE_FLAG_NEWGUA 0x01 /* new global unicast address event */ #define ND6_QUEUE_FLAG_LLADDR 0x02 /* link-layer address change event */ #define ND6_QUEUE_FLAG_ANYCAST 0x04 /* delay NA for anycast address */ +#define ND6_QUEUE_FLAG_PROXY 0x08 /* delay NA for proxy address */ /* GRAND specific flags */ #define ND6_QUEUE_GRAND_MASK (ND6_QUEUE_FLAG_NEWGUA|ND6_QUEUE_FLAG_LLADDR) diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 44677a9637bd..c345e96f8d3f 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -98,7 +98,8 @@ static void nd6_na_output_fib(struct ifnet *, const struct in6_addr *, const struct in6_addr *, u_long, int, struct sockaddr *, u_int); static void nd6_ns_output_fib(struct ifnet *, const struct in6_addr *, const struct in6_addr *, const struct in6_addr *, uint8_t *, u_int); -static void nd6_queue_add(struct ifaddr *, struct in6_addr *, int, uint32_t); +static void nd6_queue_add(struct ifaddr *, struct in6_addr *, + struct in6_addr *, struct sockaddr_dl *, int, uint32_t); static struct ifaddr *nd6_proxy_fill_sdl(struct ifnet *, const struct in6_addr *, struct sockaddr_dl *); @@ -124,10 +125,12 @@ SYSCTL_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861, struct nd_queue { TAILQ_ENTRY(nd_queue) ndq_list; - struct ifaddr *ndq_ifa; - struct in6_addr ndq_daddr; - uint32_t ndq_flags; - struct callout ndq_callout; + struct ifaddr *ndq_ifa; + struct in6_addr ndq_daddr; + struct in6_addr ndq_taddr; + struct sockaddr_dl ndq_sdl; + uint32_t ndq_flags; + struct callout ndq_callout; }; /* @@ -148,7 +151,8 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) union nd_opts ndopts; char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; char *lladdr; - int anycast, lladdrlen, proxy, rflag, tentative, tlladdr; + int lladdrlen, rflag, tentative, tlladdr; + uint32_t dflags; ifa = NULL; @@ -276,10 +280,10 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); /* (2) check. */ - proxy = 0; + dflags = 0; if (ifa == NULL) { if ((ifa = nd6_proxy_fill_sdl(ifp, &taddr6, &proxydl)) != NULL) - proxy = 1; + dflags |= ND6_QUEUE_FLAG_PROXY; } if (ifa == NULL) { /* @@ -289,8 +293,9 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) */ goto freeit; } + if ((((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_ANYCAST) != 0) + dflags |= ND6_QUEUE_FLAG_ANYCAST; myaddr6 = *IFA_IN6(ifa); - anycast = ((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_ANYCAST; tentative = ((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE; if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_DUPLICATED) goto freeit; @@ -341,7 +346,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * Link-Layer Address option is not included, the Override flag SHOULD * be set to zero. Otherwise, the Override flag SHOULD be set to one. */ - if (anycast == 0 && proxy == 0 && (tlladdr & ND6_NA_OPT_LLA) != 0) + if (dflags == 0 && (tlladdr & ND6_NA_OPT_LLA) != 0) rflag |= ND_NA_FLAG_OVERRIDE; /* * If the source address is unspecified address, entries must not @@ -362,12 +367,11 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * be delayed by a random time between 0 and MAX_ANYCAST_DELAY_TIME * to reduce the probability of network congestion. */ - if (anycast == 0) - nd6_na_output_fib(ifp, &saddr6, &taddr6, rflag, tlladdr, - proxy ? (struct sockaddr *)&proxydl : NULL, M_GETFIB(m)); + if (dflags == 0) + nd6_na_output_fib(ifp, &saddr6, &taddr6, rflag, tlladdr, NULL, M_GETFIB(m)); else - nd6_queue_add(ifa, &saddr6, arc4random() % - (MAX_ANYCAST_DELAY_TIME * hz), ND6_QUEUE_FLAG_ANYCAST); + nd6_queue_add(ifa, &saddr6, &taddr6, &proxydl, arc4random() % + (MAX_ANYCAST_DELAY_TIME * hz), dflags); freeit: if (ifa != NULL) ifa_free(ifa); @@ -1672,10 +1676,12 @@ nd6_queue_timer(void *arg) struct nd_queue *ndq = arg; struct ifaddr *ifa = ndq->ndq_ifa; struct ifnet *ifp; - struct in6_addr daddr; + struct in6_addr daddr, taddr; + struct sockaddr_dl sdl; struct epoch_tracker et; int delay, tlladdr; u_long flags; + bool proxy; KASSERT(ifa != NULL, ("ND6 queue entry %p with no address", ndq)); @@ -1684,6 +1690,7 @@ nd6_queue_timer(void *arg) NET_EPOCH_ENTER(et); daddr = ndq->ndq_daddr; + taddr = ndq->ndq_taddr; tlladdr = ND6_NA_OPT_LLA; flags = (V_ip6_forwarding) ? ND_NA_FLAG_ROUTER : 0; if ((ifp->if_inet6->nd_flags & ND6_IFF_ACCEPT_RTADV) != 0 && V_ip6_norbit_raif) @@ -1711,6 +1718,13 @@ nd6_queue_timer(void *arg) /* anycast advertisement delay rule (RFC 4861 7.2.7, SHOULD) */ if ((ndq->ndq_flags & ND6_QUEUE_FLAG_ANYCAST) != 0) flags |= ND_NA_FLAG_SOLICITED; + /* proxy advertisement delay rule (RFC 4861 7.2.8, SHOULD) */ + proxy = false; + if ((ndq->ndq_flags & ND6_QUEUE_FLAG_PROXY) != 0) { + flags |= ND_NA_FLAG_SOLICITED; + sdl = ndq->ndq_sdl; + proxy = true; + } /* * if it was GRAND, wait at least a RetransTimer @@ -1724,16 +1738,23 @@ nd6_queue_timer(void *arg) nd6_queue_rel(ndq); if (__predict_true(in6_setscope(&daddr, ifp, NULL) == 0)) - nd6_na_output_fib(ifp, &daddr, IFA_IN6(ifa), flags, tlladdr, - NULL, ifp->if_fib); + nd6_na_output_fib(ifp, &daddr, &taddr, flags, tlladdr, + proxy ? (struct sockaddr *)&sdl : NULL, ifp->if_fib); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); } +/* + * Queue a delayed IPv6 Neighbor Advertisement. + * + * daddr: destination address (who the NA is sent to) + * taddr: target address being advertised (used for proxy NAs) + * sdl: link-layer address (used for proxy NAs) + */ static void nd6_queue_add(struct ifaddr *ifa, struct in6_addr *daddr, - int delay, uint32_t flags) + struct in6_addr *taddr, struct sockaddr_dl *sdl, int delay, uint32_t flags) { struct nd_queue *ndq = NULL; struct ifnet *ifp; @@ -1775,6 +1796,17 @@ nd6_queue_add(struct ifaddr *ifa, struct in6_addr *daddr, } memcpy(&ndq->ndq_daddr, daddr, sizeof(struct in6_addr)); + /* + * For proxy NAs, the target address (taddr) being advertised differs from + * the interface address (ifa), so we must explicitly store both the proxy + * target address and its link-layer address (sdl). + * For non-proxy NAs, use the interface address (ifa) itself as the target. + */ + if ((flags & ND6_QUEUE_FLAG_PROXY) != 0) { + memcpy(&ndq->ndq_taddr, taddr, sizeof(struct in6_addr)); + memcpy(&ndq->ndq_sdl, sdl, sizeof(struct sockaddr_dl)); + } else + memcpy(&ndq->ndq_taddr, IFA_IN6(ifa), sizeof(struct in6_addr)); ndq->ndq_flags = flags; nd6log((LOG_DEBUG, "%s: delay IPv6 NA for %s\n", if_name(ifp), @@ -1842,7 +1874,7 @@ nd6_grand_start(struct ifaddr *ifa, uint32_t flags) daddr = in6addr_linklocal_allnodes; delay = ext->nd_retrans * hz / 1000; - nd6_queue_add(ifa, &daddr, count * delay, flags); + nd6_queue_add(ifa, &daddr, NULL, NULL, count * delay, flags); } /* From nobody Thu Apr 2 11:22:19 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmfb01K4Jz6YGxg for ; Thu, 02 Apr 2026 11:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmfZz6DMTz3M6F for ; Thu, 02 Apr 2026 11:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775128939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFQB3eGm3O3xmCP3utpRE630SAMa4UHGmFe7EN2f+Tg=; b=Id3v0k2W4ov9IZ8Mty0GYfkyvGy2Cyw5B3WwWs+l374Mg+6INAEceDlNptcEpOBu0RagnL 1NWQSZY50jsILWE0LaUMoo3P1TFFUh+7laLpuk0C0sYxavwyiCK+xXvt3wwIHnUj9bOM31 zBsr67HX+Th1pG/3ABqZbzXtyYyyE+pEYI1Y8X4Y70+ieCcYls6qaircoPIHbTSzLqZjxq s1+kSmkeBbJE2nJLZRmDrrgfvwRaxDpjXOlfva0tX5DwDjvgOCatgqK7wCho/sf4AWOtYn pkQNhRdkZsFunrpic8CXOzwoOCPAD8bZG2OddLoRQ8N/fckxIqf5AecqvxSQ4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775128939; a=rsa-sha256; cv=none; b=YXw03QV6dm8jsxZelQOgR24BdhT/2/j7lGqjZRHMBvBxdyZpRsqCY4BRqcp4tMMUUDqO8H cQx0vyBjRJnw09wN2WwUP+DWO5u+eb+lRiXMTe/yA/SdZN+1hl7CpYd+V1YQhLoLEmXvvC +vCSZuYA/0NJtSUQWwZ4RmSLNHFU9XTOd683MigCfxxXYZd21512oaRFgQMlzoZnWAk9wY pZBWcbs8jQIdtSYZNlXsgEqQFUMq4mY1aL1p2WjyLqT2HcrR/X26srbK8Moy0EdZ+fd2O2 51GTkVftB2ENVSBVaeuhZTDVvgOi3aYOQ8zWg9/2OuC59wZ/0OnxkWFwe7guQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775128939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFQB3eGm3O3xmCP3utpRE630SAMa4UHGmFe7EN2f+Tg=; b=kGoNrGyYtBY9v1s1f17FW+uelQSFflV5jKljFdX+M8BqGcTx2ZaU1rMhh73E77EFC4zEal Xw81INSR7fD12KohVCYH85yqjPbnQ8vfTwh1xKw3m3ulLzfI3mT3bDfTgvvh5wA9Xad9Ju XY68eIoHLZYlJIkDGHNovtPr+IlaTCYYSxOlYssuU/veyyXLoR/A1xgPEmJEyo2+TB615Q IMGpXXs7uRdpvTyI3DWrUxP5CaoLiC40cxsNVNCO4YWOPndEk+oQnvY2AyAvJTCxTyW4l9 v6jx7ZHuC76O6XJ3I9i2kpFpE/+8B1Y2C9eJeZuqq8nTh44UERx45IgyGbUq7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmfZz5Y7Jz10Lj for ; Thu, 02 Apr 2026 11:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e1aa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 11:22:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 6630c3a73688 - main - tunefs: Add tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6630c3a73688ae3c33df892f6802bea5b8460e17 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 11:22:19 +0000 Message-Id: <69ce516b.1e1aa.30406265@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6630c3a73688ae3c33df892f6802bea5b8460e17 commit 6630c3a73688ae3c33df892f6802bea5b8460e17 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-02 11:22:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-02 11:22:14 +0000 tunefs: Add tests MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56034 --- etc/mtree/BSD.tests.dist | 2 + sbin/tunefs/Makefile | 5 ++ sbin/tunefs/tests/Makefile | 4 + sbin/tunefs/tests/tunefs_test.sh | 189 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 884a5aba18f1..ec9c1bb7f0db 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -527,6 +527,8 @@ .. sysctl .. + tunefs + .. .. secure lib diff --git a/sbin/tunefs/Makefile b/sbin/tunefs/Makefile index 56238b5ef673..8fdf8fb8796b 100644 --- a/sbin/tunefs/Makefile +++ b/sbin/tunefs/Makefile @@ -1,6 +1,11 @@ +.include + PACKAGE=ufs PROG= tunefs LIBADD= ufs util MAN= tunefs.8 +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests + .include diff --git a/sbin/tunefs/tests/Makefile b/sbin/tunefs/tests/Makefile new file mode 100644 index 000000000000..3a5245633dea --- /dev/null +++ b/sbin/tunefs/tests/Makefile @@ -0,0 +1,4 @@ +PACKAGE= tests +ATF_TESTS_SH= tunefs_test + +.include diff --git a/sbin/tunefs/tests/tunefs_test.sh b/sbin/tunefs/tests/tunefs_test.sh new file mode 100755 index 000000000000..5df8dca1137e --- /dev/null +++ b/sbin/tunefs/tests/tunefs_test.sh @@ -0,0 +1,189 @@ +# +# Copyright (c) 2026 Dag-Erling Smørgrav +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Create a small file system to experiment on +tunefs_setup() +{ + atf_check -o save:dev mdconfig -t malloc -s 16M + tunefs_dev=/dev/$(cat dev) + atf_check -o ignore newfs "$@" $tunefs_dev +} + +# Verify that the changes we ask tunefs to perform are applied to the +# test file system +tunefs_test() +{ + local opt=$1 # tunefs option + local name=$2 # what tunefs(8) calls it + local descr=${3:-$name} # what file(1) calls it, if different + + # Verify that the optin is not enabled + atf_check -o not-match:"$name" \ + file -s $tunefs_dev + + # Enable the option and verify that it is enabled + atf_check -e match:"$name set" -o ignore \ + tunefs $opt enable $tunefs_dev + atf_check -o match:"$descr" \ + file -s $tunefs_dev + + # Enable it again and verify that it is still enabled + atf_check -e match:"$name remains unchanged as enabled" \ + tunefs $opt enable $tunefs_dev + atf_check -o match:"$descr" \ + file -s $tunefs_dev + + # Disable the option and verify that it is disabled + atf_check -e match:"$name cleared" -o ignore \ + tunefs $opt disable $tunefs_dev + atf_check -o not-match:"$descr" \ + file -s $tunefs_dev + + # Disable it again and verify that it is still disabled + atf_check -e match:"$name remains unchanged as disabled" \ + tunefs $opt disable $tunefs_dev + atf_check -o not-match:"$descr" \ + file -s $tunefs_dev +} + +# Clean up after ourselves +tunefs_cleanup() +{ + # Destroy the test file system + if [ -f dev ]; then + mdconfig -d -u $(cat dev) || true + fi +} + +# POSIX.1e ACLs +atf_test_case posixacl cleanup +posixacl_head() +{ + atf_set descr "Turn POSIX.1e ACLs on and off" + atf_set require.user "root" +} +posixacl_body() +{ + tunefs_setup + tunefs_test -a "POSIX.1e ACLs" +} +posixacl_cleanup() +{ + tunefs_cleanup +} + +# NFSv4 ACLs +atf_test_case nfs4acl cleanup +nfs4acl_head() +{ + atf_set descr "Turn NFSv4 ACLs on and off" + atf_set require.user "root" +} +nfs4acl_body() +{ + tunefs_setup + tunefs_test -N "NFSv4 ACLs" +} +nfs4acl_cleanup() +{ + tunefs_cleanup +} + +# Soft Updates (no journaling) +atf_test_case sunoj cleanup +sunoj_head() +{ + atf_set descr "Turn Soft Updates on and off" + atf_set require.user "root" +} +sunoj_body() +{ + tunefs_setup -u + tunefs_test -n "soft updates" +} +sunoj_cleanup() +{ + tunefs_cleanup +} + +# Soft Updates journaling +atf_test_case suj cleanup +suj_head() +{ + atf_set descr "Turn Soft Updates journaling on and off" + atf_set require.user "root" +} +suj_body() +{ + tunefs_setup + tunefs_test -j "soft updates journaling" +} +suj_cleanup() +{ + tunefs_cleanup +} + +# GEOM journaling +atf_test_case gjournal cleanup +gjournal_head() +{ + atf_set descr "Turn GEOM journaling on and off" + atf_set require.user "root" +} +gjournal_body() +{ + tunefs_setup -u + tunefs_test -J "gjournal" "GEOM journaling" +} +gjournal_cleanup() +{ + tunefs_cleanup +} + +# Try combining Soft Updates with GEOM journaling +atf_test_case conflict cleanup +conflict_head() +{ + atf_set descr "Soft Updates and GEOM journaling are mutually exclusive" + atf_set require.user "root" +} +conflict_body() +{ + tunefs_setup -U + + # Verify that SU is enabled + atf_check -o match:"soft updates" \ + file -s $tunefs_dev + # Verify that enabling gjournal fails + atf_check -e match:"cannot be enabled" \ + tunefs -J enable $tunefs_dev + # Now turn SU off + atf_check -e match:"soft updates cleared" \ + tunefs -n disable $tunefs_dev + # Enable gjournal + atf_check -e match:"gjournal set" \ + tunefs -J enable $tunefs_dev + # Verify that enabling SU+J fails + atf_check -e match:"cannot be enabled" \ + tunefs -j enable $tunefs_dev + # Verify that enabling SU alone fails + atf_check -e match:"cannot be enabled" \ + tunefs -n enable $tunefs_dev +} +conflict_cleanup() +{ + tunefs_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case posixacl + atf_add_test_case nfs4acl + atf_add_test_case sunoj + atf_add_test_case suj + atf_add_test_case gjournal + atf_add_test_case conflict +} From nobody Thu Apr 2 11:22:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmfZz1wfpz6YH9N for ; Thu, 02 Apr 2026 11:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmfZy5Bh4z3M89 for ; Thu, 02 Apr 2026 11:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775128938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WHG+/VSlZcKeQRebWJzQyEsMyHM5vQrqvNoGNyxJKQ=; b=bKfhMd9FwiFbmmZoB46pIimDkOPUcLu9yWSEWNPevgrtM9N0i16wZq11Sh497zq/9tFNe3 jN/3SUGWBhgPYrmLYcBj4iJWGFSYpGR7brVfssQ6qZT7oR12d1uMn8z/I8XeRareAT1gNO pCkXekw/JsUCUjOILfcIoNs+pCFFccf+gWTveM5RWK8L2SDuBT0TprESZE1ABoj9WNAPW6 lLQWoVFeY7CBY/Uolho0LJYkz5FeVxz1fRL79EC5uPBsgT+p9LDBbRiRE09PEV8CDJ64NC 6WNVYi4UjSdy5CYXU3GfBRa5AVjW9FtAuq1yTCJbzYDM8BRBBvgbTI++NC5ydw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775128938; a=rsa-sha256; cv=none; b=PMkdahVENAULLdvVayMQSgetgyd6DT6tYIqkPp63SF7dGedRF18QpzDtEusMDZyw0VLjT0 9tDkE8U4r2awOmZ3D49GQnCcWjlDe95Pc/jcUc6Y1auU6isd/eatZfbJKz0mGaiPc+MeUa G+/Hb8XxZJmuTE7VzKeJCWt5c0yGpvlQsttnwA+bY3bHrG7Q6CBnoR/7DelpvHHNBhAX6R oaiDUgSuguxz5DAqbsRO6uV0sAiCmF/BrQWNvDw7eLjawW+sgE7opvuVnHmlNBDNQ+DfzW ltjRUFJQ2/wOW2mW4DuAEeW+g5Rcmr1acMHebMk3qJRxqW9NNVA4L7+DOvBELg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775128938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WHG+/VSlZcKeQRebWJzQyEsMyHM5vQrqvNoGNyxJKQ=; b=ASUPLDYO1mBo3ndRER/fBu3Di1I5DR2O4OBoYECi5gH5YBDPQOTeSSQbPLQmr1yLDUVALP FvslcVM8Nb8HGqHsmG9vgy0jC9P6PzGgh8yIEhbJHbUdYujhBCV+x9IUA8JRHdQf7C8uoi znpn/rOKbs17LPyHN0ryUZQyPL/9C0EhvDvH1LpZgyVRLgjuVRPkXQe6AaI8N9mncRdyRk XdTLB2EFPI4v+5qxNHXaC3tpteFWulIeEf+c2WawbfycIDxrz0Or6CUf+XmxTc8jHzsf5Z ivixz4oBoclNFAmdeUUvI3F3B9Sx/WV5a3jec1thc9/MJChZYx8gNvsVgrAp1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmfZy4jLdz101P for ; Thu, 02 Apr 2026 11:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f00d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 11:22:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: c5e79c7e93dd - main - tunefs: Don't lower WARNS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5e79c7e93dda07c383be9b99a1a91894652f546 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 11:22:18 +0000 Message-Id: <69ce516a.1f00d.cff8957@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e79c7e93dda07c383be9b99a1a91894652f546 commit c5e79c7e93dda07c383be9b99a1a91894652f546 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-02 11:21:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-02 11:22:14 +0000 tunefs: Don't lower WARNS Use casts to silence the alignment warnings instead of potentially suppressing other legitimate warnings. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56033 --- sbin/tunefs/Makefile | 2 -- sbin/tunefs/tunefs.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sbin/tunefs/Makefile b/sbin/tunefs/Makefile index 4ea2219c8e03..56238b5ef673 100644 --- a/sbin/tunefs/Makefile +++ b/sbin/tunefs/Makefile @@ -3,6 +3,4 @@ PROG= tunefs LIBADD= ufs util MAN= tunefs.8 -WARNS?= 3 - .include diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index d5ef366e8221..d0f506557d65 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -640,7 +640,7 @@ dir_search(ufs2_daddr_t blk, int bytes) return (-1); } for (off = 0; off < bytes; off += dp->d_reclen) { - dp = (struct direct *)&block[off]; + dp = (struct direct *)(uintptr_t)&block[off]; if (dp->d_reclen == 0) break; if (dp->d_ino == 0) @@ -705,7 +705,7 @@ dir_clear_block(const char *block, off_t off) struct direct *dp; for (; off < sblock.fs_bsize; off += DIRBLKSIZ) { - dp = (struct direct *)&block[off]; + dp = (struct direct *)(uintptr_t)&block[off]; dp->d_ino = 0; dp->d_reclen = DIRBLKSIZ; dp->d_type = DT_UNKNOWN; @@ -728,7 +728,7 @@ dir_insert(ufs2_daddr_t blk, off_t off, ino_t ino) return (-1); } bzero(&block[off], sblock.fs_bsize - off); - dp = (struct direct *)&block[off]; + dp = (struct direct *)(uintptr_t)&block[off]; dp->d_ino = ino; dp->d_reclen = DIRBLKSIZ; dp->d_type = DT_REG; From nobody Thu Apr 2 12:59:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmhlP1PqKz6YRBd for ; Thu, 02 Apr 2026 12:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmhlP05Cjz3dTp for ; Thu, 02 Apr 2026 12:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775134785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/8Gd9WTdf3co1orRshXxB99mBxW9omeuF+74F6YEB8=; b=WAkxVoyx+umw02s6/UJi/VdR8JJ/D0CJ8CDpJ1f02hlqaRQTbdsUiWIDEzE10WdPC41U9o vcYtPpox4uks+5IMS+KcV1YsTL4gIsMonAX7Z/znRurOQEvhsGC3nzwXGJct377sthArU/ 0nvUjHSlp0s4Lwh4IZ5m6TVQC8VN7aTcTHjjTPxbRVe6z5wqWG7Q/81taJDs00e6TlEi6Y QdjGenAW13d39zYB7YE1ZNFXgsTSSgB3IXHzG20+xAM4782hTgga4SMmARMOrVkonPZIFl 1Cw3U5i43E79UbtOQ5CuTx3BYnOrTGaRxX89Gds+sMJFozvb30iD8L5GT+UTAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775134785; a=rsa-sha256; cv=none; b=HbrFwJJIrU/eP4iM2VRbsYsmQhxUiMtH7E/fvnwlCWUsCfeZp41S3H+PiRkR5rwQ1UlELa 6YJCayUy8HhkQy5ummMPHQ33u7ejwSemQivE88CLiDEWJN0ulYIDzUEtkVEVZhJIM4B+B+ pwlFJdx9uIIZEUosW9zVFhB2dRLJvHEcgKtzAZyfBQxJtU6dKS/b3Zaz6U0abScCUwjFCj ygrFqeB28M8Z8UWmxldOKZUm44Eun6ecY7pWN3IEppqxRye41Y+fg4hD+MQdISYunxjLNI dvV+CrdIIP+4XWat2+Uj635vv1Jf9PiXh6M0hwLQI9XuYHkWZvUdD98Dd60WtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775134785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/8Gd9WTdf3co1orRshXxB99mBxW9omeuF+74F6YEB8=; b=v2l7RjiN0VkC5a/Qk0Tsv60PmWvqemqffcbAhREqqH6pKxTXfY34WrqRCRW1R+vN1RK5Q4 Lzjid1yrV2VMCdEUknZjkL9d9Obn936F0ZfDFe/IsVG/rTwU49SGTnGHaZZ003Oo1frbyf upDP6DHMb37HIC5De8kHDOKL/mMToy3EmC6qBmz2MTBUKWElmpGjsSR2TguUpiEgpPT7nF G3c0HeURYcXrVyuv1AMxev5bcYBkwNpyi83/quLFvitT9tDmjZH77NdQ0PTuDWe0ikmMfV aJ+DC6UAScYS4XUdm3E7KeI4gNlskv/QU9OzF1hWZtqFb4n3gGGaUl9RkFiqag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmhlN6lPGz12mm for ; Thu, 02 Apr 2026 12:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d5f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 12:59:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7d82731e4311 - main - src.opts.mk: !CROSS_COMPILER implies !LLVM_BINUTILS_BOOTSTRAP List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d82731e4311880845b0109484df6562ab0cd213 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 12:59:44 +0000 Message-Id: <69ce6840.26d5f.43b9e32e@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7d82731e4311880845b0109484df6562ab0cd213 commit 7d82731e4311880845b0109484df6562ab0cd213 Author: Ed Maste AuthorDate: 2026-04-01 18:27:05 +0000 Commit: Ed Maste CommitDate: 2026-04-02 12:59:07 +0000 src.opts.mk: !CROSS_COMPILER implies !LLVM_BINUTILS_BOOTSTRAP This fixes the build when WITHOUT_CROSS_COMPILER is set. Reported by: fuz, vishwin Fixes: 17494c6e6b7d ("build: Boostrap LLVM_BINUTILS for cross-tools") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56219 --- share/mk/src.opts.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 47538c138eb7..5e59f476a743 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -495,6 +495,7 @@ MK_ZONEINFO_LEAPSECONDS_SUPPORT:= no MK_CLANG_BOOTSTRAP:= no MK_ELFTOOLCHAIN_BOOTSTRAP:= no MK_LLD_BOOTSTRAP:= no +MK_LLVM_BINUTILS_BOOTSTRAP:= no .endif .if ${MK_TOOLCHAIN} == "no" From nobody Thu Apr 2 12:59:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmhlQ204tz6YQwC for ; Thu, 02 Apr 2026 12:59:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmhlQ0cgPz3dWR for ; Thu, 02 Apr 2026 12:59:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775134786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZqigxLF5ylZUGSYLzXZPagxBvPuo4Lhl0ri58apsP8=; b=auu986IOuZ8FKbT0cVRLm7Fs1NT9SyWj+wgFYrXzIj5stPEORojMykeQCb4ZgLG64eQ6IN gEQ+puQWgXuht7iRrJSBiWBlQlpfogvW3xJ0mttbfKChBvy0X/2dFYp1jRW5Rw/HA+bQsr YK3dKU+LP2n8ki3n+LjKC6oiV6pXR8lO3V6YQbOG0EIqAgVp6Ire7Vj//BGsd9NUh8dxSW sTzd/YN8/Sd9azaCqCaxSZ+9LXoGr8S7QzRzBCfxkce4DaeHLzzqG5A2/PD0mRMMOtYFRR DZdto5NXURzo8H2tdpbyrwqUFRpvQMLbB2HLa+K9pLSL6FistrZLD8FvxTO0Ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775134786; a=rsa-sha256; cv=none; b=MJFhU5exEB2PvCL6EOOyMu0LqPuQjjaElUsN9047uI2iLiCQmZOn4qj8UAceRXI6gU3YRp gNVdYGJ6M7Ryxm9l8854Fwg4SKGqGVeVXB8TjQUVm3x4X7xRJZXcN5RMbA7diNU3ONrdGK bIXOwMtxw8u29jR5zHh2H3Yd+n/YJiPfi/VXpX62t7YU8leourABKN/5V22ejKFCQzj5GX r3Y1EaEsDllE7aiK82KQ9q49beytYub1zuDqwIliIt6LS6tgar3cd0SB7zDJxymf1lBfmG L7qClGUCzmCbXwo3iSx2XNKRegx4L6hcFURBrG5lHBGfaF0O6JpNnZfSKLmoNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775134786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZqigxLF5ylZUGSYLzXZPagxBvPuo4Lhl0ri58apsP8=; b=hMkzWWb5b943P1FmAHu1OgdUrNs1LEXvkIlTw4QrDndFyt0g0OaSMvJ5EsFUR6HDuaNOHZ uNXeLNW9M89BHVPZFIbqcpQ8I8BUObzHa0WH/3vnTOEN5ca49tO6GDh8EYglGGd6VPt/vn HisoLTlJ7500Cxt5EjHzK8IjKieJY2vMV2beuu2L8ULInuj5zijq1BylchEIfTalu4CsXW twWbPJbSnWeEEQVrnDcEvfaLZyFijgkNFRO6qDPMs53hRUVKmZ4fHrIK7G2XiaVkOl9Xy2 3b7RqbjEsNf2j/CMftCGx39cUh5RAEe+EQUxCoU7HJSmynMlO5Txv+zirofnrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmhlP75RKz12Pw for ; Thu, 02 Apr 2026 12:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30515 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 12:59:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 8f34b6b84c95 - main - src.conf.5: Regen after MK_CROSS_COMPILER=no change List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f34b6b84c958f24a2f717b13876d57cdac07fd9 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 12:59:45 +0000 Message-Id: <69ce6841.30515.15b1a6bd@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8f34b6b84c958f24a2f717b13876d57cdac07fd9 commit 8f34b6b84c958f24a2f717b13876d57cdac07fd9 Author: Ed Maste AuthorDate: 2026-04-01 19:19:31 +0000 Commit: Ed Maste CommitDate: 2026-04-02 12:59:23 +0000 src.conf.5: Regen after MK_CROSS_COMPILER=no change --- share/man/man5/src.conf.5 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index c277647a925f..9862d5aa8154 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd March 28, 2026 +.Dd April 2, 2026 .Dt SRC.CONF 5 .Os .Sh NAME @@ -494,6 +494,8 @@ When set, it enforces these options: .Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP .It .Va WITHOUT_LLD_BOOTSTRAP +.It +.Va WITHOUT_LLVM_BINUTILS_BOOTSTRAP .El .It Va WITHOUT_CRYPT Do not build any crypto code. From nobody Thu Apr 2 13:27:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmjM93l6Fz6Y0l9 for ; Thu, 02 Apr 2026 13:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmjM934Mqz3kjx for ; Thu, 02 Apr 2026 13:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775136437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z/JuckijZ7dcIwEkdoWFEB2ED+v4iZZ59lUeRsNlUFc=; b=lBRHORCkNULouiuJ8Pz2kMhjtTr3vjXayoeHcVM1d4cZgsTgcVpew86apQHCU/Jg56YDXE il34U9Hf0WD4xja+Jlsxh48v9PvVokE59zwcd2A+0Tz3qCjcvzzrwmDsSmg/B3Wz7b+CtF FcjspYxupci3FJySFXx5lex8m6x9NBGUC0jFo/ZI0Smw9Ek57IVHWLUmf0P6IwYXQLtfra iJqpiQ2oKymqIHcM8dKl+fNwUW/t4TfKP5psmWSBUHNh463sy3jc9L0IVn4eHzhBTh7tAU iFgK3IHe7M8ur4Il30g2294Ih9lI5Ae+xRMXOp/CF76jAdPldVAxL3LTV0ve5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775136437; a=rsa-sha256; cv=none; b=yJ+a/5pwGzK/nUVny1HLyMBDZwGA9QkHrkEPYlwAwO3KM/Mx2e7yAWX6zC9G6RbBc2ZQun l7L/6eDWAho+7IwAcvl+uXGvDBFXAc6LIkVJE64e/siSZr9/LWmxwvbsWrLTsfxUGDcrTn pYZUHFgvTB+AsW9wwMW321MHzmJuhd7NBtp/7cZqc6wETpp6qcoseffSZca15yi+YdKsut PFkL21SZbReyF/sXQAuvIBf9NEYA6e0lznvceHapbEyMdB+3R+si3A17hyUY6btl2OyfRp E7VkjikiF49Tk1n9GLYbp06NMejUy/Oj9cOD/Bngi9ODbOQejZTzBjR2T4Wxiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775136437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z/JuckijZ7dcIwEkdoWFEB2ED+v4iZZ59lUeRsNlUFc=; b=hG0kqirpqfxq3/NHj3JNQfL5fUq3E6+ju4wd+oPeTuZL+j4J2dnnCozgu6HSo/MoHeFdlv Vy3VIyG3mckw16X0p9Noy2+BVOgxUy0zE+j0R8VdSvKFXPD1aoX/WUmXuPNvw/a+3wMjjq Q5r1hkxz0+y8V9Ze49E/yY2/tRSp/Av7GLgTh8seYdWWzRSyzWMtjLJlClWbMR1VLOHZQ2 zAmQ0UnBXLGzO8wESGlPEu+HD3xKaxAttbHzka27VTzYxzvUfNFObuRyJrd+jm4TUM0m7a xT5WTWmy+HP6bUiyvo3wpbkAkP4uDnJI80GGUH8kSrjOePrCletAssmbX/6pqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmjM92dYNz12pW for ; Thu, 02 Apr 2026 13:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33349 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 13:27:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: aab1ef4527f1 - main - kqueue_fork_copy_knote(): zero kn_knlist for the copy before calling knlist_add() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aab1ef4527f1b0935add3e8dba9e928e0623376f Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 13:27:17 +0000 Message-Id: <69ce6eb5.33349.194216cd@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=aab1ef4527f1b0935add3e8dba9e928e0623376f commit aab1ef4527f1b0935add3e8dba9e928e0623376f Author: Konstantin Belousov AuthorDate: 2026-04-02 11:02:14 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-02 13:26:55 +0000 kqueue_fork_copy_knote(): zero kn_knlist for the copy before calling knlist_add() Reported by: pho, dhw Fixes: 306c9049c642da6a59a5dc088589605a9aa38b87 Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/kern_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index f3723783146a..0d37327f14bd 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -3080,6 +3080,7 @@ kqueue_fork_copy_knote(struct kqueue *kq1, struct knote *kn, struct proc *p1, kn1->kn_status |= KN_DETACHED; kn1->kn_status &= ~KN_QUEUED; kn1->kn_kq = kq1; + kn1->kn_knlist = NULL; error = fop->f_copy(kn1, p1); if (error != 0) { knote_free(kn1); From nobody Thu Apr 2 21:24:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmvy62zh8z6Yn6y for ; Thu, 02 Apr 2026 21:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmvy62R7Xz3st0 for ; Thu, 02 Apr 2026 21:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775165086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GT4WBXY8yMO6Kr14t831zVLkSscbuq7Qf/hhPdrzPa0=; b=o/PgYP73zpmdHiPoUcEit/G1HEkT32PCBt8zvOA+m1cXKMvrEusYeoAcf+hWbWTPYUybui HwpKymC7pgKqx7bEwMyTxt51QDcs8r76oISy+9Wl0ncIFygsWA8/2UoO5Ovp1lMYlelQfr mzYI0VqvOWOSVAjJTLECLhR28mz+bijcKrRUiM33qXhCA/IPsrqDXBwAARwHdoiDr7WqT9 Oz4qQBMiSU4JoCHcnKCBcslmj7a+LRD7WgPSOF+0KjwaLXuMyCJ2zCoaglPziXMY/OJHvs 7vgTSrIN3WKAAB2KCRrVoa8dlglYKNamiLmuiAWOhYZQ1YsrI7zflQDFDLKeBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775165086; a=rsa-sha256; cv=none; b=Mz8+ghJpQYwohRIMn76qimHJbEKwHSAQrrykVEA1JcxUGPnwh6H41h9FEMYztHd5TJRlQ5 DXZ5bPBy78Ujz2uNtNFD5dETtC6Uutpvbwe8UsnI/lxVsFQMe9MVLU2IJl3obdjjTs0KNm ZAtdENDXebm23HPeijmhI6dTzzDQZs6K2aEA9HVABdh0Emb3UEUtQ1a6i7l6MyS6TVMoeV R3zgPsVTJbb+rkgk+alaIJVZ3QXEadSnFpP8ctlFGLwhKXN6UtY03CR4XkyJDxGHLWJ02W sIguLHC27nAfB2dWn2WnKHYcWmH+LBC8b9b2V/5LV+ZBN51Eupn//wBSfQ9ZZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775165086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GT4WBXY8yMO6Kr14t831zVLkSscbuq7Qf/hhPdrzPa0=; b=TSGeC36T6bqbBLlBSKmQvmGoY5ZRO92nzuB6SJj5TNXCahFolVHo5e5z8Ct6v+CDV6prY3 /VVhVAYZ4D8xFYx964ZWRY47odaclwbjlDHQCyLL57LQR0yGEzen+APUxIU91t2aQyRgqh 1vY+WAXfeJS4GCsdAjyi4u2mAh4tU8piDAbjr57dLP00x13ry23qtRQSI3g6SWYnNOx6Fe PLlAQ4CPrFXGtZuU7LsQwbpI2QyJmZYZbD3st8i4jYR0heBOwpNZoXfTiTslRpENf9fVug z0aunOqnA3KiHW7yM6EFAbw48diBXBYiKui9nw3RQufKPWMxyN8bckuEN968LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmvy61xqCz3tT for ; Thu, 02 Apr 2026 21:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3de09 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 21:24:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 616f47f176c3 - main - tunefs: Fix alignment warning on arm64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 616f47f176c308a29b1f4a6bba1b1a4dc01c3091 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 21:24:46 +0000 Message-Id: <69cede9e.3de09.44163011@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=616f47f176c308a29b1f4a6bba1b1a4dc01c3091 commit 616f47f176c308a29b1f4a6bba1b1a4dc01c3091 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-02 21:23:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-02 21:23:47 +0000 tunefs: Fix alignment warning on arm64 MFC after: 1 week Fixes: c5e79c7e93dd ("tunefs: Don't lower WARNS") Reviewed by: bakul Differential Revision: https://reviews.freebsd.org/D56229 --- sbin/tunefs/tunefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index d0f506557d65..56f343a5a4db 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -855,7 +855,7 @@ indir_fill(ufs2_daddr_t blk, int level, int *resid) int i; bzero(indirbuf, sizeof(indirbuf)); - bap1 = (ufs1_daddr_t *)indirbuf; + bap1 = (ufs1_daddr_t *)(uintptr_t)indirbuf; bap2 = (void *)bap1; cnt = 0; for (i = 0; i < NINDIR(&sblock) && *resid != 0; i++) { From nobody Thu Apr 2 21:43:48 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmwN50np8z6YpZX for ; Thu, 02 Apr 2026 21:43:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmwN46qg3z3vfZ for ; Thu, 02 Apr 2026 21:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775166229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dv/yaMElX3XfpShf13AZTIGkbj2SqObxXTmVYcsAJy8=; b=ufvSCNkHkWSkzkykF1uUXP6yJxWasaeTWSnwKeUSxmnzv5ZSBxHWm2iuqNI8QkTfBJCoAa wH05sMCSSJdMOt+zv3MKSiVelGddGYq/rjR0DHNaby9hyep2X64wxIRmml+APuZeEhiueM HdQ8//YtNbLmp8mA1QyxvPdYLA0cK1Z5/adebpW4dGqnJxnI1MunBZoQbFUG4XHRzWhJkH nGTpT2pekf2In6GTbf5NEhwzUaDDMHDGn+Jvwj6UwCicQ/nebmGeKf07wmDYajNuQVLs6d pHwlbmHXnZbVp8Un+Jo8SvoKyO2KgvCAkO71Jkd14N8V8OWwxJXTsIeRfAU9ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775166229; a=rsa-sha256; cv=none; b=PgO4v2h1MExBG0k20iQ9HZqmeMPX7Lc3OGqnbMW/ICicEtiLfU0pUNuzzoxw38gLEVXDvD hUl1SO+WpIrV8fnNqVDM6TopYgv0mAUblv4C8SNNTIlWfUUbbHJbNf/uNxpIDxCigtnVPZ nDfrMIGaT2iNwlOIfOWdf1JXpYsJdmQVwcc1vLTyYpMxRNiunztXhVLO3Wt1Zf9mJJcY9o M0fyD5fxCyARDSQLV5Vy3tqDbin0z1k7iOyMDoS0Rt81i06yK1CmEFT17V315xvctawkGm ZzhRRSYTxo9Xrgvhubs4viPvNi5xwSkx+VWRacjdGehVRifuwRa5RR/OTNmoYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775166229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dv/yaMElX3XfpShf13AZTIGkbj2SqObxXTmVYcsAJy8=; b=aDm0ipEdK2X31yndyBAn7fGZGA2Bp3QtisZATVq2cUSigh4DYAf1HAn5KerZKl1jd+6T6Y TkKBh9nmjeNuKn29O+TNsuXaAfpbX+uG69lyMo2cG7kaKBaB6ZxWvpJHyyWueGrjD/pKWb oJhW2ud8KIxiWG66am1PuRI0int0nzozBmfysxB6FQEFU/ycsZ3JUDLTQ3r9lSJjNoaSqC tdKVjPj6fiPfDyESyd3p7fXQMcCEu3TULPzaDDwhUESpF9t0X/NtTzmGNSw7aH6CFqODKK 4ZQQK3V6cgfCL4SH0M+D0g4ks3g7VaKF2qi4L5AHo3chFaL4PSd0QRl9OdVpQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmwN46PP2z4fV for ; Thu, 02 Apr 2026 21:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40d03 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 21:43:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d7259292ae0b - main - release: Restore licenses for kyua and ncurses List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7259292ae0b9c2aef4bdc1b8bd62674c38f7ad4 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 21:43:48 +0000 Message-Id: <69cee314.40d03.6bc9abf2@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d7259292ae0b9c2aef4bdc1b8bd62674c38f7ad4 commit d7259292ae0b9c2aef4bdc1b8bd62674c38f7ad4 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-02 21:42:10 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-02 21:42:47 +0000 release: Restore licenses for kyua and ncurses These were modified to avoid triggering a libucl bug which is now fixed. MFC after: 1 week Reviewed by: ivy, kevans Differential Revision: https://reviews.freebsd.org/D52824 --- release/packages/ucl/kyua-all.ucl | 60 +++++++++++++++++------------------- release/packages/ucl/ncurses-all.ucl | 26 ++++++++++++++-- 2 files changed, 53 insertions(+), 33 deletions(-) diff --git a/release/packages/ucl/kyua-all.ucl b/release/packages/ucl/kyua-all.ucl index 2b38efc30d96..f273b7c133de 100644 --- a/release/packages/ucl/kyua-all.ucl +++ b/release/packages/ucl/kyua-all.ucl @@ -1,35 +1,33 @@ /* - NB: Using the normal block comment style here triggers a UCL parsing bug. - - SPDX-License-Identifier: BSD-3-Clause - - Copyright 2011 The Kyua Authors. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright 2011 The Kyua Authors. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Google Inc. nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ comment = "Testing framework for infrastructure software" diff --git a/release/packages/ucl/ncurses-all.ucl b/release/packages/ucl/ncurses-all.ucl index 3963eb98aa72..007ab15084f3 100644 --- a/release/packages/ucl/ncurses-all.ucl +++ b/release/packages/ucl/ncurses-all.ucl @@ -1,10 +1,32 @@ /* + * SPDX-License-Identifier: X11 + * * Copyright 2018-2023,2024 Thomas E. Dickey * Copyright 1998-2017,2018 Free Software Foundation, Inc. * - * SPDX-License-Identifier: X11 + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, distribute with modifications, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * See contrib/ncurses/COPYING for the full license text. + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization. */ comment = "ncurses terminal control library" From nobody Thu Apr 2 21:48:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmwV20WY7z6Ypc7; Thu, 02 Apr 2026 21:48:58 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmwV16vNqz3wQx; Thu, 02 Apr 2026 21:48:57 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775166538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FlE7PSqFLPIo1BpAPepvvCJk+Hr3snkraia9tdXOwCA=; b=ctk4x+l/1Ko3046g2V51cX4erM8uAzjzLuliiE3HasjD9bZV8N/yPLnt2QCGXT8+iU0Gco TRH6YTaSWZ8hDkberrp1FVhCY4g3WXy+SbLfdhctcaOu7/Sf4CkdbK6NLAQxPRAllAYrKa Z5U9b1mwcguxMt1JSy81o1xlKXp2Cyd+KzdhVl99F8knO1/wUZkjyeus/t2V7jrnsBZUbM ltNzzjFRS5iC+moHTFGKdV8nypz4rAjdtNek+PI3zcq+b4gglHSqxcGjPJGK8tmT1yOsGa X/TLy4TgHVxCav45sc3qONgRdWBDiPnXS6gVWPvfRcf0pxlVeZBCEq1yGaPmBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775166538; a=rsa-sha256; cv=none; b=P7TAMOEdfJacYx0AKjv8nuGrx4h4mYJLKLHa9XSidbcWgAX7+dH+zWBqJJQy83W0kGS4A5 PERfOzJzWrbcu4j/1+Co906y0uiDIL5gqV0UU16UulJA3KnZZe8AaubuG7M96Uhi+K9X22 bCgSAvcFKcKfuwUficsKB1XBZVDr+Ml06NNGbbYQQ73rUzZMlLFSwo6ITLx64gx+aMWQVn /WXuHX6ucHiHTUYHP5ERgq/Wgzi6R1NyCtcrnbQx8NpNDXDUy5KTEaccYJYvzlbVq0tSIi aa4qJq3+x2m1tD3BXARisOtPPk3eJXEO8xQ9cmJIh4K6GyYuDzobw+8j7KvC+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775166538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FlE7PSqFLPIo1BpAPepvvCJk+Hr3snkraia9tdXOwCA=; b=YcnT+2NnvDYMPyWM5uf7mL7yTaFCFzLIzMehljioe/2BgWiMMvfMYFLFNu6TU3JXi2Znqf f2H97ssaCJkGTwtXg5I3OgZHox3uniYsLfLWS91e2e2j1LZgk+3Rz88kgxeoRDD8jtnG75 FDz4JJREuVJLXPW9S1PafhoN+ydTFeRFsxNJNEMt/9fYJpqXdyqG4ERAZPT7uclwlr2yWQ B5STFKXmNhUgnK7FUbwXK6+7oDF7tzCwlP25UVWmv2X5xQtilA/n1U8VrEjX4b0Hdmz9nQ /gcz4LN/hOHsQlaV6rLB3fjp3ZatWU8HGskQ5axPQ6nDf1yYb9Ger19OLhBiIg== Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fmwV15NFYz1Nsq; Thu, 02 Apr 2026 21:48:57 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 9A0775C551; Thu, 02 Apr 2026 23:48:55 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Dimitry Andric Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 212272a43767 - main - mtree: stop creating /usr/share/doc/ncurses In-Reply-To: <698b41e4.41324.7fe9cdff@gitrepo.freebsd.org> (Dimitry Andric's message of "Tue, 10 Feb 2026 14:34:12 +0000") References: <698b41e4.41324.7fe9cdff@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 02 Apr 2026 23:48:55 +0200 Message-ID: <867bqpvxrs.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dimitry Andric writes: > mtree: stop creating /usr/share/doc/ncurses >=20=20=20=20=20 > In base 68ad2b0d7af2a the ncurses html documentation was removed, and > entries added to ObsoleteFiles.inc to get rid of /usr/share/doc/ncurs= es, > but the directory was still being re-created via BSD.usr.dist. Remove= it > from there too. >=20=20=20=20=20 > Fixes: 68ad2b0d7af2a > MFC after: 1 month Can you please merge this? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu Apr 2 22:48:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fmxqN07MZz6YvxC for ; Thu, 02 Apr 2026 22:49:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fmxqM5xQDz45df for ; Thu, 02 Apr 2026 22:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775170143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9Mzky835WY4qwVxErUBxhjTsfA/I1qJuRmb7TCbYvk=; b=aYs/pl/jhZoLomNY18gVPeiTXd3npOZk6y9X7wb5nrqGh98xlziNVUZSrZ9f7n+5iVgzhO HExswF2jdeqMzgRCOrZCQ6kOvBv+QiX9xWy1dsA/s2JybSF4qY2WTDJQ9A2nk27Rc8f+M8 l2/eQs9RqgANzdTJlaQqSBWpTovjcmPvYsmFKzX3PSrbsr6fF0DzxQpRsxnzpGsSJB+qxW PLwyo6Yd4YMhGYVOvMBz3+5jVKX/rs7L5v+Y+hImUXTRaQun/1qaEIrVV0fNnyCfdXr0aC cVoHXfTqSb9ornsTeaBlPSE6Y9F0KFSOu9zQkntJ/aOhuGtfD8qGl0YVKhYFIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775170143; a=rsa-sha256; cv=none; b=YBprchg1OFnuzUeO80bnvkWlepn5s0h4Xm5Tb1HRVlRhWp0U5oBZG1UuLjvF+T9DhACqrG 5Mtw6kYs5Ftjb+yLTnnAEY5vS99iMR/PKfasuvnb6tAENoIbVGpYyN59UGgYi5TJT9h4fw fgSRqX7KRrYVhqXbZjreDTehbFB4+7HYF8dQhSxt5i6VDTk29t4xAg5OIsE+LJgiSrGA7O W70L1jgb9bSclNk8VVuOwrMZIYEVGTKd/dv9yZ6tGZkS/J/21u9OSLxd/5UqqYaHxvMbwu 3nG5MqjbrGt0L9DHNLwNdEJkQZSBKDkSQ8Pvc/X1iQ+fcOy5cHHqpt+YzH8XsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775170143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9Mzky835WY4qwVxErUBxhjTsfA/I1qJuRmb7TCbYvk=; b=ixZODBbqRrTf52JEs/VXnCDeczl22iYZAxY3+jkwJCRmy3suQlDUPgHuzfuDaIeZrW7XTL 6FJ1BCxDSms7cMz01tTntxwVT1I5LxCOrQVhRmu1p0WkTAS2EAi0VDVo+AvkMj7hu6XP4v a9sOl+Jl5dAxQjr9gDj4C4c8Ej2k6siQSZbCUEjfU/Abl2QUvOB1u95E6BP2zH33rOxHpN ZF/DMgyvkL7ZUUejSOF/f5WsOqBssYR4A4iumhd1sKDKOO7kNLwVLJ/1tJTDEGFmF2Bmei hwI4b76zX6v4xthwPF1iE/O5bsfhGIjT44DldolJlQeZ7ArGlnfZavPuAZ12Lw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fmxqM5S69z6R4 for ; Thu, 02 Apr 2026 22:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43d63 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 02 Apr 2026 22:48:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Kit Dallege From: Mitchell Horne Subject: git: 3e9f4fd6fc50 - main - mq_open(2): document sysctl limit EINVAL and ENFILE conditions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e9f4fd6fc50300d052d5619d82a14d3488483d5 Auto-Submitted: auto-generated Date: Thu, 02 Apr 2026 22:48:58 +0000 Message-Id: <69cef25a.43d63.7fc8cda8@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3e9f4fd6fc50300d052d5619d82a14d3488483d5 commit 3e9f4fd6fc50300d052d5619d82a14d3488483d5 Author: Kit Dallege AuthorDate: 2026-04-02 17:37:49 +0000 Commit: Mitchell Horne CommitDate: 2026-04-02 22:48:52 +0000 mq_open(2): document sysctl limit EINVAL and ENFILE conditions Document two missing error conditions for mq_open(2): - EINVAL: returned when mq_maxmsg exceeds kern.mqueue.maxmsg or mq_msgsize exceeds kern.mqueue.maxmsgsize. - ENFILE: add kern.mqueue.maxmq sysctl name to the existing entry. PR: 243209 Reviewed by: mhorne MFC after: 1 week Signed-off-by: Kit Dallege Pull Request: https://github.com/freebsd/freebsd-src/pull/2098 --- lib/libsys/mq_open.2 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/libsys/mq_open.2 b/lib/libsys/mq_open.2 index 4800ab18de59..f0b8618f62a5 100644 --- a/lib/libsys/mq_open.2 +++ b/lib/libsys/mq_open.2 @@ -35,7 +35,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd May 15, 2024 +.Dd April 2, 2026 .Dt MQ_OPEN 2 .Os .Sh NAME @@ -282,6 +282,24 @@ and either or .Va mq_msgsize was less than or equal to zero. +.It Bq Er EINVAL +.Dv O_CREAT +was specified in +.Fa oflag , +the value of +.Fa attr +is not +.Dv NULL , +and either +.Va mq_maxmsg +exceeds the +.Va kern.mqueue.maxmsg +sysctl limit, +or +.Va mq_msgsize +exceeds the +.Va kern.mqueue.maxmsgsize +sysctl limit. .It Bq Er EMFILE Too many message queue descriptors or file descriptors are currently in use by this process. @@ -295,6 +313,9 @@ is longer than .Brq Dv NAME_MAX . .It Bq Er ENFILE Too many message queues are currently open in the system. +The system limit is controlled by the +.Va kern.mqueue.maxmq +sysctl. .It Bq Er ENOENT .Dv O_CREAT is not set and the named message queue does not exist. From nobody Fri Apr 3 06:54:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fn8c22QTGz6Y5Qf for ; Fri, 03 Apr 2026 06:54:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fn8c20sngz3fJB for ; Fri, 03 Apr 2026 06:54:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775199298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfuZMW1JNgyPXGqYqx+HQOqcp2MPUdEORuSo5C4GJgM=; b=TuA7K3lo1ITYyKLA52NPsTXvIo0IoohBGrVkPGfPZxNx1zQwCX8IH2qtl2CN8RJEY5kd3B 4iPg5lbrvZE12yMm6P7VV+l56OU+junE0fXkU8NdwmkBIfi/9mgkRCf3Rd8elggRiLGW7E 7E1SeknBlPTl4Ow1T/rAIEJ2UkfS5iCW2ku5LfcsNh5w2CuAYa+tL8TeBPqSSXpFoMX9hL ChJIntAZ/0DBlVbHMzE0Z7EqmSLpqT8p2zQWmTfg3/R6anyh8C51T321c1bVjG5ow5VEqZ WOX8D9IjBo8PBkDOKj6p5AotmMzjbeQngYSibWBHto2hkLMBaDTB2CTk87LWaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775199298; a=rsa-sha256; cv=none; b=SiZnVO0aBE4v8V0ywF3ztquwrz+Z7GSJOqS9lQ4UaSAw0fKBbj/DnQeA0Ggh6jAg6sV1K1 V1QirYOOxIS3sP4EhrDT6lK2EXwg1bcrbZEhwtMo9GJAmdJDZ7Vh+9tdTYuEq+wGP44Yqn 1yhzeROCxS6hmL8DA0qs8BKjpcJMponX2VnegWruo7GOslZlK6UBD0j3vlqX4yu+rYOYoE CJ4OJzr2/z01xaxYsUE1PDgahiaR/4RwWbLORV5od2k9nsYkqe51EDLvnBYWDYKPmb5CYa lC5dDcjA0NekbRyZ+EfrNZtpJso72RHEfjhvXbqksJNDUnLm5NNh+rsFoGbfYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775199298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfuZMW1JNgyPXGqYqx+HQOqcp2MPUdEORuSo5C4GJgM=; b=bMRmqcUuS3fU5eU0TRiMMn7yPY3PnVxOZJAbZDB/hVwxm5fQ0EGoUCshCSgXzJ0FEr/Ytp +hbvqrUkWJ4mE9vUvT0slTD3KZtlX9pFXnPBSkUiq4P/tDIQsuZDEc5yH2CAh5eg2QRI8f v7qD19O/nb084sR1z5b7LgEnvvKSmqH4JIEjaUldDKmxMEngPXRyDQZk2Z4MPFvcjT1jqQ Ork8F47Nmha0xGu6XodQEir0XNeSXky99x6qxEkhlZMX6kHYm2R8PdXPqeYkv0lL0iua4r saRB89MVUBjbCSe8pJisRuvdZ6Q2whUeFCqToM/Pc3SUR5u0AjGrC9QzROsWZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fn8c20SkPzdrt for ; Fri, 03 Apr 2026 06:54:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2356e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 06:54:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ishan Agrawal From: Kristof Provost Subject: git: 8ef0093f297a - main - truss: add support for decoding Netlink messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ef0093f297af7c917037f058af9813105e67662 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 06:54:52 +0000 Message-Id: <69cf643c.2356e.2d0a0374@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8ef0093f297af7c917037f058af9813105e67662 commit 8ef0093f297af7c917037f058af9813105e67662 Author: Ishan Agrawal AuthorDate: 2026-01-06 12:05:59 +0000 Commit: Kristof Provost CommitDate: 2026-04-03 06:52:29 +0000 truss: add support for decoding Netlink messages Netlink usage is growing in FreeBSD. This patch adds support to `truss(1)` to decode Netlink headers in sendmsg/recvmsg calls, making debugging network configuration tools significantly easier. Changes: libsysdecode: Add `sysdecode_netlink()` to parse struct `nlmsghdr`. truss: Detect `AF_NETLINK` sockets and decode the message payload. Reviewed by: kp Signed-off-by: Ishan Agrawal Github PR: https://github.com/freebsd/freebsd-src/pull/1950 --- lib/libsysdecode/Makefile | 2 +- lib/libsysdecode/netlink.c | 94 ++++++++++++++++++++++++++++++++++++++++++++ lib/libsysdecode/sysdecode.h | 1 + usr.bin/truss/syscalls.c | 67 ++++++++++++++++++++++++++++++- 4 files changed, 162 insertions(+), 2 deletions(-) diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile index 60422d3fc9ef..85c76bcffd8e 100644 --- a/lib/libsysdecode/Makefile +++ b/lib/libsysdecode/Makefile @@ -2,7 +2,7 @@ LIB= sysdecode -SRCS= errno.c flags.c ioctl.c signal.c syscallnames.c utrace.c support.c +SRCS= errno.c flags.c ioctl.c netlink.c signal.c syscallnames.c utrace.c support.c .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" SRCS+= linux.c diff --git a/lib/libsysdecode/netlink.c b/lib/libsysdecode/netlink.c new file mode 100644 index 000000000000..a28a0a061134 --- /dev/null +++ b/lib/libsysdecode/netlink.c @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2026 Ishan Agrawal + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +#include +#include +#include + +#include "sysdecode.h" + +/* + * Decodes a buffer as a Netlink message stream. + * + * Returns true if the data was successfully decoded as Netlink. + * Returns false if the data is malformed, allowing the caller + * to fallback to a standard hex/string dump. + */ +bool +sysdecode_netlink(FILE *fp, const void *buf, size_t len) +{ + const struct nlmsghdr *nl = buf; + size_t remaining = len; + bool first = true; + + /* Basic sanity check: Buffer must be at least one header size. */ + if (remaining < sizeof(struct nlmsghdr)) + return (false); + + /* * Protocol Sanity Check: + * The first message length must be valid (>= header) and fit + * inside the provided buffer snapshot. + */ + if (nl->nlmsg_len < sizeof(struct nlmsghdr) || nl->nlmsg_len > remaining) + return (false); + + fprintf(fp, "netlink{"); + + while (remaining >= sizeof(struct nlmsghdr)) { + if (!first) + fprintf(fp, ","); + + /* Safety check for current message. */ + if (nl->nlmsg_len < sizeof(struct nlmsghdr) || + nl->nlmsg_len > remaining) { + fprintf(fp, ""); + break; + } + + fprintf(fp, "len=%u,type=", nl->nlmsg_len); + + /* Decode Standard Message Types. */ + switch (nl->nlmsg_type) { + case NLMSG_NOOP: + fprintf(fp, "NLMSG_NOOP"); + break; + case NLMSG_ERROR: + fprintf(fp, "NLMSG_ERROR"); + break; + case NLMSG_DONE: + fprintf(fp, "NLMSG_DONE"); + break; + case NLMSG_OVERRUN: + fprintf(fp, "NLMSG_OVERRUN"); + break; + default: + fprintf(fp, "%u", nl->nlmsg_type); + break; + } + + fprintf(fp, ",flags="); + /* TODO: decode flags symbolically using sysdecode_mask. */ + fprintf(fp, "0x%x", nl->nlmsg_flags); + + fprintf(fp, ",seq=%u,pid=%u", nl->nlmsg_seq, nl->nlmsg_pid); + + /* Handle Alignment (Netlink messages are 4-byte aligned). */ + size_t aligned_len = NLMSG_ALIGN(nl->nlmsg_len); + if (aligned_len > remaining) + remaining = 0; + else + remaining -= aligned_len; + + nl = (const struct nlmsghdr *)(const void *)((const char *)nl + aligned_len); + first = false; + } + + fprintf(fp, "}"); + return (true); +} diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index c95d7f71379b..dad9d447478c 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -134,6 +134,7 @@ bool sysdecode_wait4_options(FILE *_fp, int _options, int *_rem); bool sysdecode_wait6_options(FILE *_fp, int _options, int *_rem); const char *sysdecode_whence(int _whence); bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem); +bool sysdecode_netlink(FILE *_fp, const void *_buf, size_t _len); #if defined(__i386__) || defined(__amd64__) || defined(__aarch64__) diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 7b299bd2e1ff..abb9d18d6783 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -1568,6 +1569,66 @@ user_ptr32_to_psaddr(int32_t user_pointer) return ((psaddr_t)(uintptr_t)user_pointer); } +#define NETLINK_MAX_DECODE 4096 + +/* + * Reads the first IOV and attempts to print it as Netlink using libsysdecode. + * Returns true if successful, false if fallback to standard print is needed. + */ +static bool +print_netlink(FILE *fp, struct trussinfo *trussinfo, struct msghdr *msg) +{ + struct sockaddr_storage ss; + struct iovec iov; + struct ptrace_io_desc piod; + char *buf; + pid_t pid = trussinfo->curthread->proc->pid; + bool success = false; + + /* Only decode AF_NETLINK sockets. */ + if (msg->msg_name == NULL || msg->msg_namelen < offsetof(struct sockaddr, sa_data) + || msg->msg_iovlen == 0 || msg->msg_iov == NULL) + return (false); + + if (get_struct(pid, (uintptr_t)msg->msg_name, &ss, + MIN(sizeof(ss), msg->msg_namelen)) == -1) + return (false); + + if (ss.ss_family != AF_NETLINK) + return (false); + + if (get_struct(pid, (uintptr_t)msg->msg_iov, &iov, sizeof(iov)) == -1) + return (false); + + /* Cap read size to avoid unbounded allocations. */ + size_t read_len = MIN(iov.iov_len, NETLINK_MAX_DECODE); + if (read_len == 0) + return (false); + + buf = malloc(read_len); + if (buf == NULL) + return (false); + + /* Snapshot User Memory using PTRACE. */ + piod.piod_op = PIOD_READ_D; + piod.piod_offs = iov.iov_base; + piod.piod_addr = buf; + piod.piod_len = read_len; + + if (ptrace(PT_IO, pid, (caddr_t)&piod, 0) == -1) { + free(buf); + return (false); + } + + /* Delegate Decoding to libsysdecode. */ + if (sysdecode_netlink(fp, buf, read_len)) { + success = true; + } + free(buf); + + return (success); +} + /* * Converts a syscall argument into a string. Said string is * allocated via malloc(), so needs to be free()'d. sc is @@ -2706,7 +2767,11 @@ print_arg(struct syscall_arg *sc, syscallarg_t *args, syscallarg_t *retval, fputs("{", fp); print_sockaddr(fp, trussinfo, (uintptr_t)msghdr.msg_name, msghdr.msg_namelen); fprintf(fp, ",%d,", msghdr.msg_namelen); - print_iovec(fp, trussinfo, (uintptr_t)msghdr.msg_iov, msghdr.msg_iovlen); + /* Attempt Netlink decode; fallback to standard iovec if it fails. */ + if (!print_netlink(fp, trussinfo, &msghdr)) { + print_iovec(fp, trussinfo, (uintptr_t)msghdr.msg_iov, + msghdr.msg_iovlen); + } fprintf(fp, ",%d,", msghdr.msg_iovlen); print_cmsgs(fp, pid, sc->type & OUT, &msghdr); fprintf(fp, ",%u,", msghdr.msg_controllen); From nobody Fri Apr 3 07:49:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fn9qS1MLwz6Y9Hq for ; Fri, 03 Apr 2026 07:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fn9qS0sxsz3lFH for ; Fri, 03 Apr 2026 07:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775202596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZJDpr3A3l4mw1bcxMDqOp/z09njT4+7IBDvZrbtbbU=; b=yMPdp0bCZ48cI2t1d0ylkrKDK04LvvOjpE/5oqCySNh1oiWutIPORS+tDq6a7lJRpjbIV5 yPfPc51L8OpXRUTnBK0B+4vmoGup/mVimTNaMDEUZv/bfC+EAmB4bI1f5ByTPsuEoPD6jE 8NPC1/aLmN5Y5Lius9jy7zgPcPysKxPQxsxpqKg2d1A748cm4Yf0GFLuA9SbG2p56W0SJa mI7cyqiNw/n3/+tjuB2NRej0mOhhEjEjPKLZWbsp9aZ+Py4ZuYWmio0BEmRuVeOuTaiu9S o9t0Aa4zHJ9RfVxoxpqDIgjBX3VJTJcrjct2S+ho/8b4CMMj4QVrm+yRpaHI2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775202596; a=rsa-sha256; cv=none; b=bHzgxhR8d3+tV1k4bXGVh7S+q5HVsothbDDOXQllV6+n83QtU8v4fqWNYdQ5g+1HtldAfO Iov/SDUeZpASz3Icpbair/+rD5zLyid1bCqxVrvUnWWgqdKIHrkGAkN96++Rw1E8k5rEb2 hib5MjPtL1cG8leTr61cynezFf2hDLdv9hWBf9UXRfI7Ei6VJ0O5vgDzsTTrVz1Jyn4Vf9 2CHDiz7hD9MgRd+J4+HxEX1xqOueOq48zbwOadCakmhPTPrSwWWc/QmcR5VT2CbMyE3ZG1 m3ezjt2pbv/6fyJ7C57QVw5A6f9oNQ03hlPB6k1URoXrccdGkrP1BdiOBeVqsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775202596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZJDpr3A3l4mw1bcxMDqOp/z09njT4+7IBDvZrbtbbU=; b=atYjATIFpw3Kayx0SWz6PvnsoSD3HDLV2gHnsgC1bV7iprD6sjD7YiMA+ZuATqyZq6y4d4 UKdF5KZM2ImPMllApDMA5hRjIif/yyNnEzyuzcu0nw9B1nbNwB1MdbXhBEYd2cnnBdY6mG 2mFgnbJKEcq5I1PauYKJcc59Yr3d8KQDXhVjNeRqbrrH9o6+2phRvzAwsCW5cKkfPH1LCM CSSFZJrsaSMRZSXY26NilVWQSKttmSl6Uk++dPXh1ceZqSwwFK5WnikYwG6eleS3gyX41h s+q82YC+i2wnHcccP6HDxjuKolmD7Tkan+0ykWPZ3PdEmquN1VwBNbIhkvjJ+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fn9qS0DkFzgTB for ; Fri, 03 Apr 2026 07:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25779 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 07:49:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: b3d6829f4998 - main - subr_module: account for MODINFOMD_EFI_ARCH List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3d6829f4998ad8ac8c65d39ac9513ba85a9974b Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 07:49:56 +0000 Message-Id: <69cf7124.25779.dcfdcc@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=b3d6829f4998ad8ac8c65d39ac9513ba85a9974b commit b3d6829f4998ad8ac8c65d39ac9513ba85a9974b Author: Ahmad Khalifa AuthorDate: 2026-04-03 07:13:29 +0000 Commit: Ahmad Khalifa CommitDate: 2026-04-03 07:15:20 +0000 subr_module: account for MODINFOMD_EFI_ARCH Fixes: b538d4911004ca541507166b8ec9689d2e87d1aa MFC after: 2 weeks --- sys/kern/subr_module.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/kern/subr_module.c b/sys/kern/subr_module.c index f8b6770e3189..ab1eefab30b1 100644 --- a/sys/kern/subr_module.c +++ b/sys/kern/subr_module.c @@ -443,6 +443,11 @@ preload_modinfo_type(struct sbuf *sbp, int type) case MODINFOMD_BOOT_HARTID: sbuf_cat(sbp, "MODINFOMD_BOOT_HARTID"); break; +#endif +#ifdef MODINFOMD_EFI_ARCH + case MODINFOMD_EFI_ARCH: + sbuf_cat(sbp, "MODINFOMD_EFI_ARCH"); + break; #endif default: sbuf_cat(sbp, "unrecognized metadata type"); @@ -465,6 +470,9 @@ preload_modinfo_value(struct sbuf *sbp, uint32_t *bptr, int type, int len) case MODINFO_NAME: case MODINFO_TYPE: case MODINFO_ARGS: +#ifdef MODINFOMD_EFI_ARCH + case MODINFO_METADATA | MODINFOMD_EFI_ARCH: +#endif sbuf_printf(sbp, "%s", (char *)bptr); break; case MODINFO_SIZE: From nobody Fri Apr 3 07:49:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fn9qT4dSYz6Y9Hs for ; Fri, 03 Apr 2026 07:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fn9qT2l31z3lFJ for ; Fri, 03 Apr 2026 07:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775202597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eEgVHXIZ94mo7Hrq4b3E0+Inet6UV8z6M+MscPNeoPs=; b=qmR+tAeClsfQn+YabN5bbxs9pfRYL1d3282IPOzLwGVdYQFTWt6xjYVHSVqz8QcFyGUGrm WvAsuy2jTIColTp5QDBSdhSOiUShXgeFKlE4kA8NffmBwhc5TptMpMpwL8G7Gq8yQWmtDG uJWQ+LcA5uGF05md5RXQZwovFuA/EqPzTJ8QJWOoVcBkMNHmTphfpeRbVtuSvMsC1k2ZVA trb7Ik+GbvbL3JMCbTtXYyjScMjyMUtV6V8t0jyT6m/piU2oQJBid369SBhc0sNnMuVAZm n0IYSq491mL4rkz0hgWNM44zEpNZ6p4RVHIDPy8CM2krkZytS4b54m1Z9fUK0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775202597; a=rsa-sha256; cv=none; b=l+VXIRkqhNKXW5Btztw2GpLFLafUSAlZsJGPpcuE2GMF92/oDb0DcEC2Yandj2UCDM9P/v htnqEUBSeANuQhVWjs9OWL9dHOqn6PkL/OljM1eAkjBfs3PEHK42qZqcdE7QA3Y9Ha0BrB fSDFs1WSBB8vwdxC130/AaYr5m+9VALrcYdCppDYgIYM9lnSwE7gkxaFxe0W8kundrCzjT XCKzyY4qnhbfXupvSHusfoeTa9jtDA7qHM/q4+S/dXQ94qMxgueZq0Xk83JIlE8VoNX5N3 RHh8kkn/ChNNQ9elBT/s6tiL0LqrL1/ToWEPqtN9mRIBoM2jkvKHAhZpBToWtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775202597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eEgVHXIZ94mo7Hrq4b3E0+Inet6UV8z6M+MscPNeoPs=; b=Y6luCn1X3sk8+t9xWbae0Ow9mEnOzWoS2DaxoW/oIuyYL9jLkakBjYRFVaT6/jrKsAfmCL mb3Dxrds/Ut9nWDN6x/6l/ZKvJ09TiN51SjaucmwsX6pZcyH8bwEC4Tw060hB/I558NoK7 xGZg3m91wUv82ZWMXLW5gZeNJrCCgIEF1C7nwSvjzxqaE9HRvFaqObC0d3VuTLPifZvgH9 GTTPy3JLCXByROPk+tCcIWboza/i/oZlX2pULOWUE4O+zWFPvF8OL0kPhnbjArvTaqrdA+ uvTJpx2MLGfaYBO0PJH5Jf0v46ODzKz9G130u+WoUZgDYhygbuoB4pxQJp607w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fn9qT1SwNzgQN for ; Fri, 03 Apr 2026 07:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25ecc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 07:49:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Quent=?utf-8?Q?in Th=C3=A9?=bault From: Ahmad Khalifa Subject: git: 4b862c713ac5 - main - splash: add shutdown splash List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b862c713ac5556ab4bd1828b47c5eb9cb28e067 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 07:49:57 +0000 Message-Id: <69cf7125.25ecc.6ef7c1f8@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=4b862c713ac5556ab4bd1828b47c5eb9cb28e067 commit 4b862c713ac5556ab4bd1828b47c5eb9cb28e067 Author: Quentin Thébault AuthorDate: 2026-04-02 16:38:47 +0000 Commit: Ahmad Khalifa CommitDate: 2026-04-03 07:15:29 +0000 splash: add shutdown splash This commit adds a shutdown splash to the existing kernel startup splash(4) screen feature. It can be customized by providing a PNG image to the shutdown_splash directive loader.conf(5). Sponsored by: Defenso MFC after: 2 weeks Reviewed by: vexeduxr, ziaee, manu Differential Revision: https://reviews.freebsd.org/D55140 --- share/man/man4/splash.4 | 14 +++++++++++--- stand/common/bootstrap.h | 4 +++- stand/common/gfx_fb.c | 20 ++++++++++++++++---- stand/defaults/loader.conf | 4 +++- stand/efi/loader/bootinfo.c | 7 ++++++- sys/dev/vt/vt_core.c | 20 +++++++++++++++++++- sys/kern/subr_module.c | 5 +++++ sys/sys/linker.h | 1 + 8 files changed, 64 insertions(+), 11 deletions(-) diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index 0e52d9eb83c4..0985385f5e08 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -24,14 +24,14 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 09, 2024 +.Dd April 03, 2026 .Dt SPLASH 4 .Os .Sh NAME .Nm splash .Nd splash screen / screen saver interface .Sh SYNOPSIS -.Cd "device splash" +.Cd device splash .Sh DESCRIPTION The .Nm @@ -254,6 +254,12 @@ and include the following lines: splash="/boot/images/freebsd-logo-rev.png" boot_mute="YES" .Ed +.Pp +A splash screen to be displayed at shutdown time can be specified with: +.Bd -literal -offset indent +shutdown_splash="/boot/images/freebsd-logo-rev.png" +boot_mute="YES" +.Ed .\".Sh DIAGNOSTICS .Sh SEE ALSO .Xr vidcontrol 1 , @@ -308,7 +314,9 @@ modules were written by png support for .Xr vt 4 was written by -.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org +and extended for shutdown by +.An Quentin Thébault Aq Mt quentin.thebault@defenso.fr . .Sh CAVEATS The screen saver works with .Xr syscons 4 diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 17887919089c..7be1d6897a9a 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -282,7 +282,9 @@ int tslog_init(void); int tslog_publish(void); vm_offset_t build_font_module(vm_offset_t); -vm_offset_t build_splash_module(vm_offset_t); +#define SPLASH_STARTUP 1 +#define SPLASH_SHUTDOWN 2 +vm_offset_t build_splash_module(vm_offset_t, int); /* MI module loaders */ #ifdef __elfN diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index d99d9b7a868f..103833070a21 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -3098,7 +3098,7 @@ build_font_module(vm_offset_t addr) } vm_offset_t -build_splash_module(vm_offset_t addr) +build_splash_module(vm_offset_t addr, int type) { struct preloaded_file *fp; struct splash_info si; @@ -3118,7 +3118,11 @@ build_splash_module(vm_offset_t addr) if (fp == NULL) panic("can't find kernel file"); - splash = getenv("splash"); + if (type == SPLASH_STARTUP) + splash = getenv("splash"); + if (type == SPLASH_SHUTDOWN) + splash = getenv("shutdown_splash"); + if (splash == NULL) return (addr); @@ -3137,7 +3141,15 @@ build_splash_module(vm_offset_t addr) /* Copy the bitmap. */ addr += archsw.arch_copyin(png.image, addr, png.png_datalen); - printf("Loading splash ok\n"); - file_addmetadata(fp, MODINFOMD_SPLASH, sizeof(splashp), &splashp); + if (type == SPLASH_STARTUP) { + printf("Loading splash ok\n"); + file_addmetadata(fp, MODINFOMD_SPLASH, + sizeof(splashp), &splashp); + } + if (type == SPLASH_SHUTDOWN) { + printf("Loading shutdown splash ok\n"); + file_addmetadata(fp, MODINFOMD_SHTDWNSPLASH, + sizeof(splashp), &splashp); + } return (addr); } diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index a10c65f28eaf..bbabc5fb66a3 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -27,7 +27,9 @@ vesa_load="NO" # Set this to YES to load the vesa module bitmap_load="NO" # Set this to YES if you want splash screen! bitmap_name="splash.bmp" # Set this to the name of the file bitmap_type="splash_image_data" # and place it on the module_path -splash="/boot/images/freebsd-logo-rev.png" # Set boot_mute=YES to load it +# Set boot_mute=YES to load these +splash="/boot/images/freebsd-logo-rev.png" +shutdown_splash="/boot/images/freebsd-logo-rev.png" ### Screen saver modules ################################### # This is best done in rc.conf diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 151ac34dd08e..fc87a0bf52fb 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -396,7 +396,12 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) /* Pad to a page boundary. */ addr = md_align(addr); - addr = build_splash_module(addr); + addr = build_splash_module(addr, SPLASH_STARTUP); + + /* Pad to a page boundary. */ + addr = md_align(addr); + + addr = build_splash_module(addr, SPLASH_SHUTDOWN); /* Pad to a page boundary. */ addr = md_align(addr); diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index b9159a73ad79..0ca4bb8d4d49 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1684,8 +1684,13 @@ vtterm_splash(struct vt_device *vd) uintptr_t image; vt_axis_t top, left; - si = MD_FETCH(preload_kmdp, MODINFOMD_SPLASH, struct splash_info *); if (!(vd->vd_flags & VDF_TEXTMODE) && (boothowto & RB_MUTE)) { + if (rebooting == 1) { + si = MD_FETCH(preload_kmdp, MODINFOMD_SHTDWNSPLASH, struct splash_info *); + vd->vd_driver->vd_blank(vd, TC_BLACK); + } else { + si = MD_FETCH(preload_kmdp, MODINFOMD_SPLASH, struct splash_info *); + } if (si == NULL) { top = (vd->vd_height - vt_logo_height) / 2; left = (vd->vd_width - vt_logo_width) / 2; @@ -1832,6 +1837,15 @@ vt_init_font_static(void) vt_font_assigned = font; } +#ifdef DEV_SPLASH +static int +vt_shutdown_splash(struct vt_window *vw) +{ + vtterm_splash(vw->vw_device); + return (0); +} +#endif + static void vtterm_cnprobe(struct terminal *tm, struct consdev *cp) { @@ -3177,6 +3191,10 @@ vt_upgrade(struct vt_device *vd) /* For existing console window. */ EVENTHANDLER_REGISTER(shutdown_pre_sync, vt_window_switch, vw, SHUTDOWN_PRI_DEFAULT); +#ifdef DEV_SPLASH + EVENTHANDLER_REGISTER(shutdown_pre_sync, + vt_shutdown_splash, vw, SHUTDOWN_PRI_DEFAULT); +#endif } } } diff --git a/sys/kern/subr_module.c b/sys/kern/subr_module.c index ab1eefab30b1..92f22206f8cf 100644 --- a/sys/kern/subr_module.c +++ b/sys/kern/subr_module.c @@ -307,6 +307,7 @@ preload_bootstrap_relocate(vm_offset_t offset) case MODINFO_ADDR: case MODINFO_METADATA|MODINFOMD_FONT: case MODINFO_METADATA|MODINFOMD_SPLASH: + case MODINFO_METADATA|MODINFOMD_SHTDWNSPLASH: case MODINFO_METADATA|MODINFOMD_SSYM: case MODINFO_METADATA|MODINFOMD_ESYM: ptr = (vm_offset_t *)(curp + (sizeof(uint32_t) * 2)); @@ -439,6 +440,9 @@ preload_modinfo_type(struct sbuf *sbp, int type) case MODINFOMD_SPLASH: sbuf_cat(sbp, "MODINFOMD_SPLASH"); break; + case MODINFOMD_SHTDWNSPLASH: + sbuf_cat(sbp, "MODINFOMD_SHTDWNSPLASH"); + break; #ifdef MODINFOMD_BOOT_HARTID case MODINFOMD_BOOT_HARTID: sbuf_cat(sbp, "MODINFOMD_BOOT_HARTID"); @@ -503,6 +507,7 @@ preload_modinfo_value(struct sbuf *sbp, uint32_t *bptr, int type, int len) #endif case MODINFO_METADATA | MODINFOMD_FONT: case MODINFO_METADATA | MODINFOMD_SPLASH: + case MODINFO_METADATA | MODINFOMD_SHTDWNSPLASH: sbuf_print_vmoffset(sbp, *(vm_offset_t *)bptr); break; case MODINFO_METADATA | MODINFOMD_HOWTO: diff --git a/sys/sys/linker.h b/sys/sys/linker.h index 85c50be6c969..f8a5dda06512 100644 --- a/sys/sys/linker.h +++ b/sys/sys/linker.h @@ -259,6 +259,7 @@ void linker_kldload_unbusy(int flags); #define MODINFOMD_KEYBUF 0x000d /* Crypto key intake buffer */ #define MODINFOMD_FONT 0x000e /* Console font */ #define MODINFOMD_SPLASH 0x000f /* Console splash screen */ +#define MODINFOMD_SHTDWNSPLASH 0x0010 /* Console shutdown splash screen */ #define MODINFOMD_NOCOPY 0x8000 /* don't copy this metadata to the kernel */ #define MODINFOMD_DEPLIST (0x4001 | MODINFOMD_NOCOPY) /* depends on */ From nobody Fri Apr 3 08:23:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnBYx4qvxz6Y0BZ for ; Fri, 03 Apr 2026 08:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnBYx2PCQz3q1m for ; Fri, 03 Apr 2026 08:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775204597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVJ1ijDWd+CN8nyi8k5ZUaMDoqxUXPTyouYAAQNnCck=; b=UUUNJ6N+1aLpV5oQmzNdIrT13wJQs86giWIY3yFd3a7UMZ5twS0vyfnTIXtVp1mBdwvMLW izE0MnmVeTTghT8nhWP70w6VDNkX3V0E6dwR2jc02VJ6XER4tW/ja/Px6zo8OX3R5xGqlE mlKuGF1oL3HMLzhfHGy1eDlfrqjIkSD7kQBqJjD4LaqanFMCQYkfz0EL2BTPuIUczjOSD2 iAiJAcfilBDb30c4Iy9CSiGQVNZDNbL+uurqDI7YcViEKPIXtBQWti+iwnJETGBVRpnoIa B53rOUqJkUbu2hIFzQewbPsHg000Wbq5gPDY16rIjxGGZ0OqeQDT8SHGlCZtrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775204597; a=rsa-sha256; cv=none; b=eOg7MZfVuTScBMahQ2w+sKxXYr7X+AtDIFckVQTVjK3WolKj3Iz3U1gDKbUhXdK6OenKr6 lUvKMyUMJ0GjvtGsxKSH7pAZKoI4GaaGjr7LdZ9FmyxXsmGGA8NCY66B3HmafS/Ir/Q+1T URsQGhSefbcp3GeAE5hcGJe56Vl0G09NiEpRZ2OCwCeDGv0BB3s+NMfWZXAacI5sfRxmyz Ybu+VuI6F4JMXdH5DuVRTHoT3xS8LzqQeKknC1Iio7STrmj8enQBnunLUSkR1h8p8oqBAk N7zCEMPqDAXbXQl+Fgjqy0jJWf+Flhnvt8bcngZOvPSn3nsJBDbj3Y7D3iXWow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775204597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVJ1ijDWd+CN8nyi8k5ZUaMDoqxUXPTyouYAAQNnCck=; b=U/lWFcSbfaPUHdvWbVf0FYW3KQjiO+AJplRiSoV/wPd5z8zdvfOkXHQvkee5kiiHT37JZz pm7Z/iaZzxxzobaCPHOuUYBF2ARYsJa2VpQtCIpRbB44EErni6C9snnpatdjAg4vr8vzfE A1Nmz74BIYN4c/3WpEiuEPbnd1pyzCPvx6N0RT3fyUqbcFa78rwtCMUWDfbMCE3jBOGGb4 JtVWY0QRLtNodngaOJcW/tKKgr52woY9dxbHN0KEJDyaD9Fie8BM2J0gMuB4E7ULuN9EMw G9jeBJO+6YYr/IGio7uh5Oh86CxochiZsfDu1YQKQo30I7LfdTW0SiJVWhVyeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnBYx1Sl1zhPV for ; Fri, 03 Apr 2026 08:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33731 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 08:23:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7caa71145c5e - main - posix_spawn: actions chdir and fchdir are now required by POSIX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7caa71145c5eea5925c295e0cdd95b517005acf9 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 08:23:17 +0000 Message-Id: <69cf78f5.33731.1b36b6c7@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7caa71145c5eea5925c295e0cdd95b517005acf9 commit 7caa71145c5eea5925c295e0cdd95b517005acf9 Author: Konstantin Belousov AuthorDate: 2026-04-02 07:57:58 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-03 08:22:53 +0000 posix_spawn: actions chdir and fchdir are now required by POSIX Drop the _np suffix. Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56222 --- ObsoleteFiles.inc | 4 ++++ include/spawn.h | 4 ++++ lib/libc/gen/Makefile.inc | 4 ++-- lib/libc/gen/Symbol.map | 2 ++ lib/libc/gen/posix_spawn.3 | 4 ++-- lib/libc/gen/posix_spawn.c | 5 +++++ lib/libc/gen/posix_spawn_file_actions_addopen.3 | 29 +++++++++++++++---------- 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 0f8fd14e2c44..a4fdac95bf5a 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20260402: posix_spawn_file_actions_addchdir lost _np suffix +OLD_FILES+=usr/share/man/man3/posix_spawn_file_actions_addchdir_np.3.gz +OLD_FILES+=usr/share/man/man3/posix_spawn_file_actions_addfchdir_np.3.gz + # 20260324: test file renamed OLD_FILES+=usr/tests/sys/netinet/tcp_implied_connect diff --git a/include/spawn.h b/include/spawn.h index 636b20755238..e0b11d78d595 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -85,6 +85,10 @@ int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict, int, const char * __restrict, int, mode_t); int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int); int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int); +int posix_spawn_file_actions_addchdir(posix_spawn_file_actions_t * + __restrict, const char * __restrict); +int posix_spawn_file_actions_addfchdir(posix_spawn_file_actions_t *, + int); #if __BSD_VISIBLE int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t * diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 28e55f58ccf3..c36c4e10f2dc 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -468,8 +468,8 @@ MLINKS+=posix_spawn.3 posix_spawnp.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclose.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclosefrom_np.3 \ posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_adddup2.3 \ - posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir_np.3 \ - posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir_np.3 \ + posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir.3 \ + posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir.3 \ posix_spawn_file_actions_init.3 posix_spawn_file_actions_destroy.3 \ posix_spawnattr_getflags.3 posix_spawnattr_setflags.3 \ posix_spawnattr_getexecfd_np.3 posix_spawnattr_setexecfd_np.3 \ diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index ddbd0522e13f..60f34b3a1923 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -475,6 +475,8 @@ FBSD_1.8 { }; FBSD_1.9 { + posix_spawn_file_actions_addchdir; + posix_spawn_file_actions_addfchdir; posix_spawnattr_getexecfd_np; posix_spawnattr_getprocdescp_np; posix_spawnattr_setexecfd_np; diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index 9fa370a7960f..0f25fc348610 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -446,11 +446,11 @@ action. .Xr sched_setscheduler 2 , .Xr setpgid 2 , .Xr vfork 2 , -.Xr posix_spawn_file_actions_addchdir_np 3 , +.Xr posix_spawn_file_actions_addchdir 3 , .Xr posix_spawn_file_actions_addclose 3 , .Xr posix_spawn_file_actions_addclosefrom_np 3 , .Xr posix_spawn_file_actions_adddup2 3 , -.Xr posix_spawn_file_actions_addfchdir_np 3 , +.Xr posix_spawn_file_actions_addfchdir 3 , .Xr posix_spawn_file_actions_addopen 3 , .Xr posix_spawn_file_actions_destroy 3 , .Xr posix_spawn_file_actions_init 3 , diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 656c0f20f798..11cdb5a29d03 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -549,6 +549,8 @@ posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t * STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list); return (0); } +__weak_reference(posix_spawn_file_actions_addchdir_np, + posix_spawn_file_actions_addchdir); int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *__restrict fa, @@ -571,6 +573,9 @@ posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *__restrict fa, return (0); } +__weak_reference(posix_spawn_file_actions_addfchdir_np, + posix_spawn_file_actions_addfchdir); + int posix_spawn_file_actions_addclosefrom_np (posix_spawn_file_actions_t * __restrict fa, int from) diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3 index 80bc91454471..1d0eac45f872 100644 --- a/lib/libc/gen/posix_spawn_file_actions_addopen.3 +++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3 @@ -40,8 +40,8 @@ .Nm posix_spawn_file_actions_adddup2 , .Nm posix_spawn_file_actions_addclose , .Nm posix_spawn_file_actions_addclosefrom_np , -.Nm posix_spawn_file_actions_addchdir_np , -.Nm posix_spawn_file_actions_addfchdir_np +.Nm posix_spawn_file_actions_addchdir , +.Nm posix_spawn_file_actions_addfchdir .Nd "add open, dup2, close, closefrom, or chdir/fchdir actions to spawn file actions object" .Sh LIBRARY .Lb libc @@ -72,12 +72,12 @@ .Fa "int from" .Fc .Ft int -.Fo posix_spawn_file_actions_addchdir_np +.Fo posix_spawn_file_actions_addchdir .Fa "posix_spawn_file_actions_t *restrict file_actions" .Fa "const char *restrict path" .Fc .Ft int -.Fo posix_spawn_file_actions_addfchdir_np +.Fo posix_spawn_file_actions_addfchdir .Fa "posix_spawn_file_actions_t * file_actions" .Fa "int fildes" .Fc @@ -189,9 +189,9 @@ For each open file descriptor, logically the close action is performed, and any possible errors encountered are ignored. .Pp The -.Fn posix_spawn_file_actions_addchdir_np +.Fn posix_spawn_file_actions_addchdir and -.Fn posix_spawn_file_actions_addfchdir_np +.Fn posix_spawn_file_actions_addfchdir functions add a change current directory action to the object referenced by .Fa file_actions @@ -201,11 +201,11 @@ in the order of insertion into the object. It also sets the working directory for the spawned program. The -.Fn posix_spawn_file_actions_addchdir_np +.Fn posix_spawn_file_actions_addchdir function takes the .Fa path to set as the working directory, while -.Fn posix_spawn_file_actions_addfchdir_np +.Fn posix_spawn_file_actions_addfchdir takes the directory file descriptor. .Sh RETURN VALUES Upon successful completion, these functions return zero; @@ -250,11 +250,8 @@ is equal to A future update of the Standard is expected to require this behavior. .Pp The -.Fn posix_spawn_file_actions_addchdir_np , -.Fn posix_spawn_file_actions_addfchdir_np , -and .Fn posix_spawn_file_actions_addclosefrom_np -functions are non-standard functions implemented after the similar +function is non-standard and implemented after the similar functionality provided by glibc. .Sh HISTORY The @@ -271,5 +268,13 @@ and .Fn posix_spawn_file_actions_addclosefrom_np functions first appeared in .Fx 13.1 . +In +.Fx 16.0 , +the +.Fn posix_spawn_file_actions_addchdir , +.Fn posix_spawn_file_actions_addfchdir +aliases where added to the corresponding functions with the +.Ql _np +suffix. .Sh AUTHORS .An \&Ed Schouten Aq Mt ed@FreeBSD.org From nobody Fri Apr 3 08:23:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnBYy5w8Wz6Y0GM for ; Fri, 03 Apr 2026 08:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnBYy3Q3cz3q8b for ; Fri, 03 Apr 2026 08:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775204598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IZiegFvWtOHUUkfEGLBBvaJgrkdiLlntJ1MMYThe2P4=; b=gM4XhVu85JyaGpzXBiHk9vaHNqFg6CUdbFksZOh0V7SQ3JQNshmQq9oQUwxGGy4g3nBqoF Q6sAeXsrfCmJwCDdDRBa/msKgAgx2h4GgX6jRjEOfq1dve4GX0NjHmdMzABMvmNxF0WnHW KhLVjXgvrp0+6RA/JgPdjxRgS+QhcR+PFYHJ0p3hPF23OS2R7KD5uRAUSy/GLg1INP5zQh jgyUh5XqNvgXllpC+3BRgPnBE6PRPB9k8o1s7uP49F3i9KJ1xSZ4FK1g5RlqFqXW6Vs8Ew Zo9XTjPEAxMX51uM7C765k7vm/whJZymJA5ScplSsza/qNTgzIda2qbaEP8tPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775204598; a=rsa-sha256; cv=none; b=ZqJidHiiVYHY7kw7w1xrp7+5XSbCSu/44J62KeRzlHPBdAe4caTrb28tuBheUQend5r5nN j+6tCd0sXfoo/mHxBL6VTOv1Xd1m0po9EQX9JETafuB+KMLOrjlQnwgFYCjk7thdYI75kE qekchhHaSJqJrbLNz/VdrNtxIQ9rg6gWx0WjghLsBa69Zy+6tJYqLb13xFp1O14/iC2jEX SJKrkznSRxoXuYZ1QkVsUfkyGEO0T1qKt34q2wTNYZVrrEya5eZdbq0B/pMHo82ainRSQm HsWPyZd0gFhTsdpHg8lawmRr+D9J6kylaFsI/r0PXL+w1LxWxzmgEY/5G4TszQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775204598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IZiegFvWtOHUUkfEGLBBvaJgrkdiLlntJ1MMYThe2P4=; b=sAMUSpdK+hBc/VKeaD6gace4sTvVtH5mgRZ6mSNR5lI0iEbt6kvW6hBAooSNIXaldDd3GD QQf2Pfh8V+uTxsT49DVUDZ2201EGLxNoaU1El8dHXOsjqFG/7Q90aFCKVF0z2nXO0avyh0 1H1S5ZqGfeJ5n6zmv2uYOjgSkZEZXzjmzKs/+GPJdqbyMgzyVOadEIPz5f1SJPdWRCwcna PPhxNEb4l3yKZff2nTfN0k/NkdFs1l3DBs9WGwNmLRizu4iMX8YW8LVBMqvfJKXLDwHpas jMkfiy3GcvjPm3SguxS38IbJ6ddoUt4ZK7gVausUdUoeBSxW5++37FbNMaeKnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnBYy30QFzhNL for ; Fri, 03 Apr 2026 08:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33735 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 08:23:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b7b485efac8c - main - posix_spawn_file_action_addopen.3: ignoring close failure is now approved List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7b485efac8c1b601b9c0ada39921bad0e342970 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 08:23:18 +0000 Message-Id: <69cf78f6.33735.640f8d80@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b7b485efac8c1b601b9c0ada39921bad0e342970 commit b7b485efac8c1b601b9c0ada39921bad0e342970 Author: Konstantin Belousov AuthorDate: 2026-04-02 08:06:52 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-03 08:22:53 +0000 posix_spawn_file_action_addopen.3: ignoring close failure is now approved Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D56222 --- lib/libc/gen/posix_spawn.3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index 0f25fc348610..ad66d1a426c4 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -481,8 +481,10 @@ functions conform to .St -p1003.1-2001 , except that they ignore all errors from .Fn close . -A future update of the Standard is expected to require that these functions -not fail because a file descriptor to be closed (via +The +.St -p1003.1-2024 , +version of the Standard no longer requires that these functions +fail because a file descriptor to be closed (via .Fn posix_spawn_file_actions_addclose ) is not open. .Sh HISTORY From nobody Fri Apr 3 08:23:19 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnBYz4ZgRz6XyrG for ; Fri, 03 Apr 2026 08:23:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnBYz3XzKz3qCC for ; Fri, 03 Apr 2026 08:23:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775204599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcXEyUoEBBDRVcYDiZAitnpAxZ1bImQWriLWCz3vt3k=; b=r5re1UQh+Stf3wkvq3GzKBkNpLzI/9QwhFsGl5k5J0KNyRIDkZxGNoVjDzmSCHo+9jUV0y CgnmAj5pW9zJRnCgBCJSOcqYjq5V+QJOS2N/vB0UKs2mehyzwk8JVBWe430Xx2DUCKx5Ak uoAvTgATdnjY7nT1ARUQIY06j31GAix5AKBdfa6tohfzzXpRN85345AIyTSZEMKph5CSY5 fI/cEbslfyLrFDX3JIRW2htT5OU4xsO7SLrJgJosCb7jdNmkBa213/DPY4h2p7m0AQK+zt sPZATiiShHpU3xAwcj5fVlAIKMwH/xLVUHVVre8MBXx8TCAWAkqer0RA0K3xyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775204599; a=rsa-sha256; cv=none; b=lhUf7bueEuI6MptWVanEKSFot8jlcnMlnJPrvl2hBbpxgctj0mOKQJCP73f/AoAVE6fmrl MKE0bqZiRybuzTaPDQbQDtMMGpFf2qTb/YfvsEzfUsuKcT09Q/ZlUUFXCM2R8FK3xmW8wT L3hCGyQ4/HpKyyvBdsuucnCBQ5PLPldSw7UXMqO/0g7pzKDLoxUmapSI5r3v/vkRQ8ehrC 02lsz0XnRr48uod/w4VrlD2AQwLrTbRFgBLoZTk8jEOfTfyK8HmLUfeOqW6s2rDJZtBhm7 G7CX0vswJDau8mitgqtyyL5dkaKhQ5W2rBY+lz8VZsH9ZNYNwOgM8owk7cy6Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775204599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcXEyUoEBBDRVcYDiZAitnpAxZ1bImQWriLWCz3vt3k=; b=d7zWOfWhL87j6zQ7QK/2peHm5wFZljJ/ma39QM5Q2tfyDHJCLIUpT1Csq0F+mFkE+2h+Ob yIpFyqqw3cTx5/s2VnnUZKcEgyBAgilj7rcKoA9bNxH9amr00trYbkeDzbGmScYsMtnAiL tWBwyrYN5vDBLKjvpIuldIn+4/C2UsBrcCSLtIJZbuRJyML7SpJUOclg+Ao28EUcu5OpEK 7gF2L5b9J3oEPOgoa3KifqTbhJTUH4QxpTR20Zp1i1vlbG/bNKhbUMVLhY/jZFq8SX5tlb 9Q/2J4I9psA+2XnFJnlyPoN4MuyFSoqB6OziPcpR9xkDryrHn7fR6nUO5dr1xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnBYz361SzhBb for ; Fri, 03 Apr 2026 08:23:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33b03 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 08:23:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e56858f05fd7 - main - posix_spawn test: switch to POSIX spelling for addchdir and addfchdir List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e56858f05fd7071a39de7f7b1e632426fdf0624d Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 08:23:19 +0000 Message-Id: <69cf78f7.33b03.251304b5@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e56858f05fd7071a39de7f7b1e632426fdf0624d commit e56858f05fd7071a39de7f7b1e632426fdf0624d Author: Konstantin Belousov AuthorDate: 2026-04-03 02:56:19 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-03 08:22:53 +0000 posix_spawn test: switch to POSIX spelling for addchdir and addfchdir Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56222 --- contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c index ce2078eae98e..58feb4f209ff 100644 --- a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c +++ b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c @@ -405,12 +405,12 @@ t_spawn_chdir_impl(bool chdir) posix_spawn_file_actions_addopen(&fa, fileno(stdout), TESTFILE, O_WRONLY | O_CREAT, 0600); if (chdir) { - ATF_REQUIRE(posix_spawn_file_actions_addchdir_np(&fa, + ATF_REQUIRE(posix_spawn_file_actions_addchdir(&fa, tmp_path) == 0); } else { tmpdir_fd = open(tmp_path, O_DIRECTORY | O_RDONLY); ATF_REQUIRE(tmpdir_fd > 0); - ATF_REQUIRE(posix_spawn_file_actions_addfchdir_np(&fa, + ATF_REQUIRE(posix_spawn_file_actions_addfchdir(&fa, tmpdir_fd) == 0); } err = posix_spawn(&pid, bin_pwd, &fa, NULL, args, NULL); From nobody Fri Apr 3 11:56:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnHJ94CyXz6YLPF for ; Fri, 03 Apr 2026 11:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnHJ93ZfZz3JLK for ; Fri, 03 Apr 2026 11:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775217401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2sK3DqbhmwJ3CIi47zxoTUKsxW5kkoILSmesvZuoulY=; b=LvuECl8BPmidaN8ObGSjWvsKPXCjX8wSosUKSwmxSd/JowjqJoDbsNcVLLv0WiA3AZ4aFz yuVmpvu7Y4jHJ+PYckmdrg8poVHz1DIn4pob5DFKMkwe9PGOhToPBtcu6S2rB2jSlsAzCy 2UtrK+/h2D5KxsFPWYYQdIvxLWkAG/OvZFlyupQJHm21q5DUS2zBCivw332a82hDvGYQnO EAzHBDLNEEkwlGvP3K+ygSmXluzZIos7mf8TGjsM+N+mFxcrpB77eTnDimJ9IbPHCpeEX9 g4ozOKGBWGEeCyPtkXHK48lVfYoyvNaqGmnaixB0K3HAnfS+c5XhE36CcP9ulw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775217401; a=rsa-sha256; cv=none; b=fipcMds0dcaiHKX4tIHvoY8e3brFAUxN6sE3LjOQN4d5BSY3dfYbMDRKDy2N3Lb6n//uY4 7tLIVXMB5TOzc5WE1Yu/CDHYudBVlS6jYvRCAgyEHbXh1dkmm5sC6e6kGJ0IjWfgG+HM9S gNmnt+EvN+V7oUwK6lbafJM5yCURtGD1OAd8K3F1X6KlUJe7Zx80PzTWU1miwg2UALiCzP Urp/NFno2XuV7gjXwKSJV/Yi43A7TDS8Wl8CPhws2ymNYejGGo2HJ+bXI1zno6IuMYDG+z EuNdl4OcDfK12Wz9m5rpvEOw9UC4Gou9JBPOCCMjKlhYbh+p+xZRQAd+xcuVIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775217401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2sK3DqbhmwJ3CIi47zxoTUKsxW5kkoILSmesvZuoulY=; b=On5CKZ4w6xPERO0ERWJ0PuRik2sXCKF4WKKTNg8p9TgtCBfFvUt261E891bxTgGexX0rGF cd8V4cs+wiiJCxBGfLjBAkxIEDBOmshzpZ0C0BPOPvLFbQr5rNWwss5Zp/XhAgXRwBhyzg 0L1PFHugA4TctgPCctdsYEcJH6GPT4tZfoToatD0Qxfqb9aU29FrL3GM7LzwXVfwosdku3 CuIkfBUSMgi2Ea6ylgJH2a6B/OxJhT9BN5UYiHuvowdqRr386WfHyPEMko5WH8WsHpBNM0 FTta0RmCIDYUcpMROmScB8N78v2QvyiNrefQjcMYwz2a+EOwqGtZot/hDoL+jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnHJ936X5znCq for ; Fri, 03 Apr 2026 11:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22935 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 11:56:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: abda442d92fd - main - contrib/libucl: Import libucl 0.9.3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abda442d92fdbadcf81c79bc9ddba001d133c429 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 11:56:41 +0000 Message-Id: <69cfaaf9.22935.787978f7@gitrepo.freebsd.org> The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=abda442d92fdbadcf81c79bc9ddba001d133c429 commit abda442d92fdbadcf81c79bc9ddba001d133c429 Merge: e56858f05fd7 1dd83cf7e527 Author: Muhammad Moinur Rahman AuthorDate: 2026-04-03 11:53:18 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2026-04-03 11:53:18 +0000 contrib/libucl: Import libucl 0.9.3 Differential Revision: https://reviews.freebsd.org/D54583 Approved by: bapt MFC after: 3 days Changelog: https://github.com/vstakhov/libucl/releases/tag/0.9.3 contrib/libucl/.clang-format | 67 + contrib/libucl/include/lua_ucl.h | 18 +- contrib/libucl/include/ucl++.h | 563 +++--- contrib/libucl/include/ucl.h | 681 +++---- contrib/libucl/lua/lua_ucl.c | 8 +- contrib/libucl/src/mum.h | 365 ++-- contrib/libucl/src/tree.h | 314 ++- contrib/libucl/src/ucl_chartable.h | 463 +++-- contrib/libucl/src/ucl_emitter.c | 459 ++--- contrib/libucl/src/ucl_emitter_streamline.c | 68 +- contrib/libucl/src/ucl_emitter_utils.c | 279 ++- contrib/libucl/src/ucl_hash.c | 314 +-- contrib/libucl/src/ucl_hash.h | 32 +- contrib/libucl/src/ucl_internal.h | 211 +- contrib/libucl/src/ucl_msgpack.c | 1182 ++++++------ contrib/libucl/src/ucl_parser.c | 1391 +++++++------- contrib/libucl/src/ucl_schema.c | 697 ++++--- contrib/libucl/src/ucl_sexp.c | 123 +- contrib/libucl/src/ucl_util.c | 2011 ++++++++++---------- contrib/libucl/tests/CMakeLists.txt | 31 + contrib/libucl/tests/basic/23-json-with-braces.inc | 1 + .../libucl/tests/basic/23-json-without-braces.inc | 2 + contrib/libucl/tests/basic/23-ucl-with-braces.inc | 1 + .../libucl/tests/basic/23-ucl-without-braces.inc | 1 + contrib/libucl/tests/basic/23.in | 8 + contrib/libucl/tests/basic/23.res | 9 + contrib/libucl/tests/basic/comments.in | 4 + contrib/libucl/tests/basic/issue319.in | 3 + contrib/libucl/tests/basic/issue319.res | 2 + contrib/libucl/tests/test_generate.c | 16 +- contrib/libucl/tests/test_schema.c | 7 +- contrib/libucl/tests/test_speed.c | 15 +- 32 files changed, 4749 insertions(+), 4597 deletions(-) diff --cc contrib/libucl/.clang-format index 000000000000,000000000000..89beadc23900 new file mode 100644 --- /dev/null +++ b/contrib/libucl/.clang-format @@@ -1,0 -1,0 +1,67 @@@ ++# Generated from CLion C/C++ Code Style settings ++BasedOnStyle: LLVM ++AccessModifierOffset: -4 ++AlignAfterOpenBracket: Align ++AlignConsecutiveAssignments: None ++AlignOperands: Align ++AllowAllArgumentsOnNextLine: false ++AllowAllConstructorInitializersOnNextLine: false ++AllowAllParametersOfDeclarationOnNextLine: false ++AllowShortBlocksOnASingleLine: Always ++AllowShortCaseLabelsOnASingleLine: false ++AllowShortFunctionsOnASingleLine: None ++AllowShortIfStatementsOnASingleLine: Always ++AllowShortLambdasOnASingleLine: All ++AllowShortLoopsOnASingleLine: true ++AlwaysBreakAfterReturnType: None ++AlwaysBreakTemplateDeclarations: Yes ++BreakBeforeBraces: Custom ++BraceWrapping: ++ AfterCaseLabel: false ++ AfterClass: false ++ AfterControlStatement: Never ++ AfterEnum: false ++ AfterFunction: true ++ AfterNamespace: false ++ AfterUnion: false ++ BeforeCatch: false ++ BeforeElse: true ++ IndentBraces: false ++ SplitEmptyFunction: true ++ SplitEmptyRecord: true ++BreakBeforeBinaryOperators: None ++BreakBeforeTernaryOperators: true ++BreakConstructorInitializers: BeforeColon ++BreakInheritanceList: BeforeColon ++ColumnLimit: 0 ++CompactNamespaces: false ++ContinuationIndentWidth: 4 ++IndentCaseLabels: false ++IndentPPDirectives: None ++IndentWidth: 4 ++KeepEmptyLinesAtTheStartOfBlocks: true ++MaxEmptyLinesToKeep: 2 ++NamespaceIndentation: None ++ObjCSpaceAfterProperty: false ++ObjCSpaceBeforeProtocolList: true ++PointerAlignment: Right ++ReflowComments: false ++SortIncludes: Never ++SpaceAfterCStyleCast: true ++SpaceAfterLogicalNot: false ++SpaceAfterTemplateKeyword: false ++SpaceBeforeAssignmentOperators: true ++SpaceBeforeCpp11BracedList: false ++SpaceBeforeCtorInitializerColon: true ++SpaceBeforeInheritanceColon: true ++SpaceBeforeParens: ControlStatements ++SpaceBeforeRangeBasedForLoopColon: false ++SpaceInEmptyParentheses: false ++SpacesBeforeTrailingComments: 0 ++SpacesInAngles: false ++SpacesInCStyleCastParentheses: false ++SpacesInContainerLiterals: false ++SpacesInParentheses: false ++SpacesInSquareBrackets: false ++TabWidth: 4 ++UseTab: ForContinuationAndIndentation diff --cc contrib/libucl/tests/CMakeLists.txt index 000000000000,e66c3d10a60a..e66c3d10a60a mode 000000,100644..100644 --- a/contrib/libucl/tests/CMakeLists.txt +++ b/contrib/libucl/tests/CMakeLists.txt diff --cc contrib/libucl/tests/basic/23-json-with-braces.inc index 000000000000,b6f13e15edb7..b6f13e15edb7 mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/23-json-with-braces.inc +++ b/contrib/libucl/tests/basic/23-json-with-braces.inc diff --cc contrib/libucl/tests/basic/23-json-without-braces.inc index 000000000000,bfad85f2f011..bfad85f2f011 mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/23-json-without-braces.inc +++ b/contrib/libucl/tests/basic/23-json-without-braces.inc diff --cc contrib/libucl/tests/basic/23-ucl-with-braces.inc index 000000000000,38f5a8708dc3..38f5a8708dc3 mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/23-ucl-with-braces.inc +++ b/contrib/libucl/tests/basic/23-ucl-with-braces.inc diff --cc contrib/libucl/tests/basic/23-ucl-without-braces.inc index 000000000000,1072dfc8682b..1072dfc8682b mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/23-ucl-without-braces.inc +++ b/contrib/libucl/tests/basic/23-ucl-without-braces.inc diff --cc contrib/libucl/tests/basic/23.in index 000000000000,8778a5060d09..8778a5060d09 mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/23.in +++ b/contrib/libucl/tests/basic/23.in diff --cc contrib/libucl/tests/basic/23.res index 000000000000,a98313c4e421..a98313c4e421 mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/23.res +++ b/contrib/libucl/tests/basic/23.res diff --cc contrib/libucl/tests/basic/issue319.in index 000000000000,f21900f1086f..f21900f1086f mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/issue319.in +++ b/contrib/libucl/tests/basic/issue319.in diff --cc contrib/libucl/tests/basic/issue319.res index 000000000000,4b17c4b4eb1b..4b17c4b4eb1b mode 000000,100644..100644 --- a/contrib/libucl/tests/basic/issue319.res +++ b/contrib/libucl/tests/basic/issue319.res From nobody Fri Apr 3 13:51:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnKrs0Ksnz6YX4L for ; Fri, 03 Apr 2026 13:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnKrr6tzpz3SZK for ; Fri, 03 Apr 2026 13:51:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBZ29c8wFiR5yFYKsBc9Yi1fX9dYEzrAGpNwiuYsPoc=; b=gdAzAlMAYJa+w7jp3pWvVrJpB8aqoE+ohvWZjzHHe5+MpxDsttPZt09gRDej7QrjvhgG2N PiYwcgZf/rsu99+M9kAnujmXODS2sI7QCJGOx8ya9YUpfbLcu43pBems2O7/ZIZvgeQJ3J DIE0tWOTphvIk+3di6/Y3ASW8xlcg1jmUimTRt/iRHoK1/a8QMUr5H7eYKiQIFw8bYRDDc sFRarPdQyY89rmdP9Zff0s6EPxx1a7VDFo05AnW2hjasgGLd6eULEXhzkWlEZSqac+pMQt TH+20umzsntaDZtw31raatJ07J5rTzxfVAJSnYCHxs+urutJNeNUa/weLV7W/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775224301; a=rsa-sha256; cv=none; b=iQanJApXvzprhmwNp4M1T1uFeloEnJIBN1Xls8qYNtdrh4akIvDtYxnsHJxnngTt+h7v0e s1ha3CAxtbJT26rMbT6vimWFx1B51ugH5Chp56VCISV1vidBoKX9l4xv55zUmrDAa/P39r do4C8UUv8sMU/34pkDxovxDdYy85uFu8JAFYnxFfKzP3p7K+qJd+53pjmhhnzt7H6A6S8R dJxJqfrj89Lh0NatF+wWkquUX9KY8w96NBY7Hp5X6ysSMRKzK3MFYnGN9qSWtKZGqfK8gc /cUB4+YNdVb6+UNOkXT7Gc/puX1mnppxZ+L1sQqixg8xEcE/ZO/H+nPlfkL2Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBZ29c8wFiR5yFYKsBc9Yi1fX9dYEzrAGpNwiuYsPoc=; b=oNIhHPdiqQUiCeyMU3FKbnpyxhi/ZHzKngALkwOL8Rr++LAWWM8zy3ObKshWoiNWhEaXPM AILuh9e6c1N+coZ6rCbL4Fh9iTEuk1OAAQqsRajqGKLe62RFeieApsYP9bw1zzS7LNojQD yr3mOC1YrAICSsPBRItvsExVVOVluoi5DVDM6jpNHVoOY457a1F2VXK4+6qHf+6HpmssTT vuHUT284TQR8WeirbMZ19QGfsxEw4dD5TGtN+WAayAOELUGnuldGJJFxPwMBd0HsankoDX WhYpEgDl/nqI/SlpmBdmD7nQgs+chi3YpeDp257guiOYuxUNhyA0HBuz3jX+xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnKrr6V4jzs46 for ; Fri, 03 Apr 2026 13:51:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37d17 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 13:51:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: baa7a870d65d - main - libsamplerate: Only build when virtual_oss is built List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: baa7a870d65db324d4dd781702e7ccefde20a3ee Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 13:51:40 +0000 Message-Id: <69cfc5ec.37d17.680eb69e@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=baa7a870d65db324d4dd781702e7ccefde20a3ee commit baa7a870d65db324d4dd781702e7ccefde20a3ee Author: Lexi Winter AuthorDate: 2026-04-03 13:42:20 +0000 Commit: Lexi Winter CommitDate: 2026-04-03 13:42:20 +0000 libsamplerate: Only build when virtual_oss is built Gate libsamplerate behind MK_CUSE and MK_SOUND, like virtual_oss. Nothing else uses this library, so there's no point building it if we aren't building virtual_oss. This avoids building a useless FreeBSD-sound package containing only this library when WITHOUT_SOUND is set. MFC after: 1 week Reviewed by: christos, emaste Differential Revision: https://reviews.freebsd.org/D56164 Sponsored by: https://www.patreon.com/bsdivy --- lib/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index c3a95f00d4ef..6e2ff634c963 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -91,7 +91,6 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ librss \ librt \ librtld_db \ - libsamplerate \ libsbuf \ libsmb \ libstdbuf \ @@ -237,7 +236,7 @@ SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet SUBDIR.${MK_SOUND}+= libmixer -SUBDIR.${MK_CUSE}.${MK_SOUND}+= virtual_oss +SUBDIR.${MK_CUSE}.${MK_SOUND}+= libsamplerate virtual_oss SUBDIR.${MK_TESTS_SUPPORT}+= atf SUBDIR.${MK_TESTS_SUPPORT}+= liblutok SUBDIR.${MK_TESTS}+= tests From nobody Fri Apr 3 13:51:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnKrt20YZz6YWlD for ; Fri, 03 Apr 2026 13:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnKrt0Yh6z3Sqg for ; Fri, 03 Apr 2026 13:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gs2vUFlPhLRDdyvG4rfXwOlxgPel+8iqJzAaqiPdG3c=; b=H7ShjaUU3IFqFn8I3XwIO99BdQIEFPaPr+DehFa+KNs6wFnwTDR4uFIquWqwrGaiyoGWb6 hMrIjOzmhDKMMAKXYcnJlZBiewO6BW5SZLMBpsND5uDaTCFb3EGbKUWErne4WkxnXulJNa PztYHcI9k37KcVKutIiT8qGTaNaS0g6NIOKWGWdBHg/oI0YJ0g3bEkfaAs6QRx0zcLsQVP u3SFfPh2D2VBNeVnsbrQKTdyVDfgEqX3JndgGuMULXXPWVawsv2Co//kDv1XpD0ohAUkpv o68cagN8dY/AcTf0b0tPraJyBUebbEJvHkfWGMKyoDZTEL0OcCE///Ms3wCZ/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775224302; a=rsa-sha256; cv=none; b=QnY3+LeIv/UWo9g0j0RPO3UwR7ZDYD8y4T5cu44rEQwaGk1ENhUaWe/H66rqi8U3n0VfAk pvwnM1lq9yp/rv8xfddHkI6he7M8GueDng8Jmc4JJdl+I+2WQNKuU4ttVa1920FbQSKESP ykkTbmT6mcvJym/MKWA6A7X/017xF+vGiWzxf8fD7NedTMEGWId1xfgBzZlcJGWIfCgtdm iw1izJklRSWI3VzE7FCdzhmk8xaMOPwEyumtBYuG/caYhkTmYvQjKSsBAs3XUtH0ci5GZD j2nc/bvd5rlywiAjKgf1MRAiHb3r7MRydH8mMc43/1C1Sc0RACfBfMIDgO7LKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gs2vUFlPhLRDdyvG4rfXwOlxgPel+8iqJzAaqiPdG3c=; b=PsuXV2Pm5PI3eSp5wfeyM9QoGftSYRC+jKjiv07gRHWbiQcpBA0XQh+55YVSpDiEhWjzcw HKLjkWnjuyHN7CzyYNgy8XFYO7tKvoR1ZaAnJqvCDnVZLTkBKPHYLqEMnmwr1vXM9gruV+ jpZoGsBC9h87rav6G1u0EbPwX6/6HAY7bHSaMPvtv0xeZvCFc2Teba797ODNEDSNox6hNu z667dl9bvUR69Ht+Nv5GYsuxc0VLkJC34RR/NubBLT8M7gioBxCTyBoHxddFsm6el9j8+E 7FzJQA6L28O6io/qEsAPwMMwkAfp7p2WkmmYoA2GhT32awqeocyOyXuhoiGaOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnKrt097zzrq5 for ; Fri, 03 Apr 2026 13:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38187 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 13:51:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: b13d7062b3a6 - main - libauditd: Don't build if WITHOUT_AUDIT is set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b13d7062b3a65ba600745fef6a2b4058444e5f6c Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 13:51:42 +0000 Message-Id: <69cfc5ee.38187.6d313255@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=b13d7062b3a65ba600745fef6a2b4058444e5f6c commit b13d7062b3a65ba600745fef6a2b4058444e5f6c Author: Lexi Winter AuthorDate: 2026-04-03 13:43:18 +0000 Commit: Lexi Winter CommitDate: 2026-04-03 13:43:18 +0000 libauditd: Don't build if WITHOUT_AUDIT is set When WITHOUT_AUDIT is set, nothing is built that uses this library, so don't build the library. This avoids building the FreeBSD-audit package when WITHOUT_AUDIT is set. MFC after: never Reviewed by: csjp, imp, emaste Differential Revision: https://reviews.freebsd.org/D56157 Sponsored by: https://www.patreon.com/bsdivy --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 6e2ff634c963..1cb2d1d89e39 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -34,7 +34,6 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ lib9p \ libalias \ libarchive \ - libauditd \ libbegemot \ libblocksruntime \ libbsddialog \ @@ -173,6 +172,7 @@ SUBDIR+= clang .endif .endif +SUBDIR.${MK_AUDIT}+= libauditd SUBDIR.${MK_CUSE}+= libcuse SUBDIR.${MK_TOOLCHAIN}+=libpe SUBDIR.${MK_DIALOG}+= libdpv libfigpar From nobody Fri Apr 3 13:51:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnKrv48htz6YWwm for ; Fri, 03 Apr 2026 13:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnKrv1VjVz3SbT for ; Fri, 03 Apr 2026 13:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+y3vXJEPNPBABAe32IPSeTdkhCUqrsM4/3baRRrgnsw=; b=ZxfIimM/Y4i+Qn99MzzJNJoHLjc635Q4s0c4UOWANi5504tKZYwBjUu7K3Nk7M/pXbYUHG 8Sh2RCrWPQu1Q616LZAd/bFV+adoqkX24ykRp8VI/EHcM42hvC63/rNLwyN+8NemI2M2IR Zs2TwROVFO26Hg/cuhauP63yfGWwX950VZckJgaCeNkeu6E2k6GKfy0NagM0MGjhwSrvUA zx6ckHVSh9zY92i4ylh+S9MXScQwQMnGC3Tvsos6OwDn64BgKOAgzU85fAMGAPq54LAJLh /Q5AbURiiu96hIQtbzbPY2eAzECE3DfGTYBhabmjKFDSe57zlMFzZ1kDY1bcHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775224303; a=rsa-sha256; cv=none; b=j/87J63r1IpUsAJ2MNSxrbOY5waRqQOvXyJA1i+vGNp38eIE+MvKd+bNFaLq713RmLMt1d V43KVhuh89aiDxZuUABYlDc/JothJEb8Ell8nemgKF+0u37cRYM1db+rqSbPG86n/dWgk9 GhwddlSBR+WgQgHp2inGCflQLJbSk1QxKEXDeOu+99/CgvQt+2Ocdat2K3LGULoiyxZIMr 5c5u6EJjhWqbAwL2Gt8yDaQiQI27TKzeH31wk69cAj6GLNJGiRFQS/jws67jysk1jNBeGw ZTfWAYkm/ZkZ8c8dsc/spdjFTkcNDt/ivIiBng51hd81tL9gYi5/FrtloSsazw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+y3vXJEPNPBABAe32IPSeTdkhCUqrsM4/3baRRrgnsw=; b=cQDZfdUo/pZxhs7dgimqw7Jx67TZ5IMQYNhGIS40FVMhiqnMneCej0DRLXUuN1FvT98h/6 e2WQSVf2KhcAnoF6EpQKeuZplAVt+wboyr7OSIAvf6r9rFrs6IGmv5q6lMdP4BBIDdJUi8 QZ45up+tbw2/hMf6ORHoH24xmMpRBgJUPNbEswA53/TOXISCxAjQ5x5heELvyrGekI0EOO 5aJybQTrH8ZP+lfC/4lKAScAfkhmIzzVLNpK/06yiK4DVioEEE4eMG77+Y24TivbvujniA 69EVN1AWyGJJJHhGmeO4okuKpySS5ZLj9yFcaetNsfzbIb9G/g3lBsrmEt5sOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnKrv0zmPzs48 for ; Fri, 03 Apr 2026 13:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3800c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 13:51:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ab9257599a55 - main - Remove WITHOUT_BZIP2, WITHOUT_BZIP2_SUPPORT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab9257599a551cf4be8738ec52205998f4e7dd81 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 13:51:43 +0000 Message-Id: <69cfc5ef.3800c.eae8c0f@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ab9257599a551cf4be8738ec52205998f4e7dd81 commit ab9257599a551cf4be8738ec52205998f4e7dd81 Author: Lexi Winter AuthorDate: 2026-04-03 13:50:09 +0000 Commit: Lexi Winter CommitDate: 2026-04-03 13:50:09 +0000 Remove WITHOUT_BZIP2, WITHOUT_BZIP2_SUPPORT WITHOUT_BZIP2_SUPPORT only affects a single binary, gzip(1); it doesn't remove bzip2 support from other bits (e.g., libarchive) and there are no similar options for gzip, xz or zstd. WITHOUT_BZIP2 has not done anything at all since it was first added in 2007. MFC after: never Discussed on: arch@ Reviewed by: imp, des, adrian, delphij, emaste Differential Revision: https://reviews.freebsd.org/D56148 Sponsored by: https://www.patreon.com/bsdivy --- share/man/man5/src.conf.5 | 17 +---------------- share/mk/src.opts.mk | 2 -- tools/build/options/WITHOUT_BZIP2 | 4 ---- tools/build/options/WITHOUT_BZIP2_SUPPORT | 1 - usr.bin/gzip/Makefile | 8 +------- 5 files changed, 2 insertions(+), 30 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 9862d5aa8154..a94c5d6177b4 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd April 2, 2026 +.Dd April 3, 2026 .Dt SRC.CONF 5 .Os .Sh NAME @@ -315,21 +315,6 @@ and related programs. Do not build or install .Xr bsnmpd 1 and related libraries and data files. -.It Va WITHOUT_BZIP2 -Do not build contributed bzip2 software as a part of the base system. -.Bf -symbolic -The option has no effect yet. -.Ef -When set, these options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_BZIP2_SUPPORT -(unless -.Va WITH_BZIP2_SUPPORT -is set explicitly) -.El -.It Va WITHOUT_BZIP2_SUPPORT -Build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR Do not build .Xr calendar 1 . diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 5e59f476a743..5c3e3bb31a7f 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -73,7 +73,6 @@ __DEFAULT_YES_OPTIONS = \ BOOTPD \ BSDINSTALL \ BSNMP \ - BZIP2 \ CALENDAR \ CAROOT \ CCD \ @@ -246,7 +245,6 @@ __LIBC_MALLOC_DEFAULT= jemalloc .for var in \ BLACKLIST \ BLOCKLIST \ - BZIP2 \ INET \ INET6 \ KERBEROS \ diff --git a/tools/build/options/WITHOUT_BZIP2 b/tools/build/options/WITHOUT_BZIP2 deleted file mode 100644 index 0ec4f7638a44..000000000000 --- a/tools/build/options/WITHOUT_BZIP2 +++ /dev/null @@ -1,4 +0,0 @@ -Do not build contributed bzip2 software as a part of the base system. -.Bf -symbolic -The option has no effect yet. -.Ef diff --git a/tools/build/options/WITHOUT_BZIP2_SUPPORT b/tools/build/options/WITHOUT_BZIP2_SUPPORT deleted file mode 100644 index 0cc8c81fadff..000000000000 --- a/tools/build/options/WITHOUT_BZIP2_SUPPORT +++ /dev/null @@ -1 +0,0 @@ -Build some programs without optional bzip2 support. diff --git a/usr.bin/gzip/Makefile b/usr.bin/gzip/Makefile index 33fbdb85d78c..fae01959596c 100644 --- a/usr.bin/gzip/Makefile +++ b/usr.bin/gzip/Makefile @@ -5,13 +5,7 @@ PROG= gzip MAN= gzip.1 gzexe.1 zdiff.1 zforce.1 zmore.1 znew.1 -LIBADD= z lzma zstd - -.if ${MK_BZIP2_SUPPORT} != "no" -LIBADD+= bz2 -.else -CFLAGS+= -DNO_BZIP2_SUPPORT -.endif +LIBADD= bz2 lzma z zstd CFLAGS+= -I${SRCTOP}/sys/contrib/zstd/lib From nobody Fri Apr 3 13:54:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnKvz141Qz6YX2k for ; Fri, 03 Apr 2026 13:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnKvz0WbKz3TxL for ; Fri, 03 Apr 2026 13:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QC8NH/DKfuh+e+LNR0pbg4i3WbgoQZvBce3B47+XT8=; b=DQqzg89B/c67fHv8l0OIcFN7+BCCoHqBWiuJpIAtCdpi85gP09+nc92LZo2dG7OcX/cMYP zF0jCG6GGl3ys1UKW1u+F9fLmfRzx7kgf2RxLYn9AX1Eo8lx6UCCgmskRvcGROEvJ/i029 bl7yB6CZaCjQTJ6pqf3CtkP3ArQ4VFGR1Mlc6WC6vi8tBs1JO5f+871HYrW1YOY0C1tQ7g c1knwdm8DgbHYYiGvmv/jXfEoWxZXjnZfxEVAlDMs9E0/lEyqIZHhQOZzR28UJ33B5FugJ 6F6fbZIC3TRuB32f2Go72P9lNPiByewHNFqxUSC22Zv6fMqz0IJFuYSf45exiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775224463; a=rsa-sha256; cv=none; b=LUmT8MyLuczcPIx6Oh+HwRq7IsB2FpWTSzGonUJvdhZpZAmU/wWDIFqzTa7319n9V5F3HN dZo0qAH4BVNGR7DY5i+YIhCNKQ1S6LsvBuRBe804QPtFJVKw/PlRs0WXB/MooCGUmOO5+6 xxShcyark2spgqDxa/WcU91jsyHKLmOXlBjGr7SFG+2yzBTrL7KVPriZbnjMyGSbn0fN0/ nuotrs2QX/YMa8tEF2ckswY3twQTWs83vk9C1XPfs85TO1UBBDdM1RBtCKfzFOuK/kWzMo zSFLiKWFvAFkZbdnW9J0dFmr0qJdc7LsVSgXYG6So3DJOHLl/udoA5TOPnpdKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775224463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9QC8NH/DKfuh+e+LNR0pbg4i3WbgoQZvBce3B47+XT8=; b=yiy6N+EM0PzEE58WMxbTjYpoSMCeB5LBEG0l0m4gwz600nLR/VaeujWV3iBcMkhGCPFgS4 ZRX+eAWUq3Cj5ETRzgykf/VDCKhWzQwhZ/afYNubpWAj48l9btzo1TKrlk5mBuRjSspjKe Pj11alywlEEyn6nSUw+Z90/EAwJDMhEHIEcyETTBNVYKe9A0KNZvM1D6Otep+XIrOiEG8U WyX2WPj0y0k/nEaJ/Kqh1gD9XQtJmQ43tBj1ELUCsndfxeZjC6hgqzHFqu/BnA1MLtyGTc HWxn8IjXbTGOs8jWbK3MH8nzm33mE1LlueotSzcsa/9Ooc+/TDH4cz5De9mLkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnKvt04qXzs4K for ; Fri, 03 Apr 2026 13:54:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37d1b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 13:54:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 2d843b7c9758 - main - RELNOTES: Document WITHOUT_BZIP2* removal List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d843b7c9758ad767216c1ae88c49157314857a7 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 13:54:18 +0000 Message-Id: <69cfc68a.37d1b.21d21f6c@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=2d843b7c9758ad767216c1ae88c49157314857a7 commit 2d843b7c9758ad767216c1ae88c49157314857a7 Author: Lexi Winter AuthorDate: 2026-04-03 13:53:43 +0000 Commit: Lexi Winter CommitDate: 2026-04-03 13:53:43 +0000 RELNOTES: Document WITHOUT_BZIP2* removal --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index b7a1f8b501a5..cdc5d49e7681 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +ab9257599a5: + The src.conf(5) options WITHOUT_BZIP2 and WITHOUT_BZIP2_SUPPORT + have been removed. + af099eaa5ec: Users belonging to the new vmm group can now create bhyve VMs. See the vmm(4) man page for details. From nobody Fri Apr 3 19:25:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnTFj33VZz6Z43S for ; Fri, 03 Apr 2026 19:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnTFj2KV5z3FYl for ; Fri, 03 Apr 2026 19:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775244313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dBF7FigiQVoy63CII7qZnQgf2RFDrDHEFelGO9kmJoE=; b=oyZIg4IWxiwqobd0JaHXZzrBmtkOtVWzsb2EqnzBRlt4Muv4O1ZD276UUGNod4yL+cwfou VPo+C2gD5Yj0xHkfe39J1EIVKzE6/HARel+LOhaHLuxjWxIXLHxeddrlhG4Nz8DoTOJNeC BzOxwk//Du+Tl8KaO268xM0HLG+Ixs4rUxIBtQf1hv7YEjWzluyPZy9ac8Z942BhrqMaMJ d7lUEaBvuN/KNiTekL+7CjX+wctIIZ6tgIdRUvb74jY/WK//AC+lxRkhdjRjcy03CyknyZ 01rI11HBByHh9UwilT1xeCfygZi5H53OvyWcepXVqL2qYbeBjR2LQ6hc+piW2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775244313; a=rsa-sha256; cv=none; b=VOskSj7rLOggLsleoMv0OLvwbkuGbBAxTQJkf1W6/sg8TM2vhPbEu6J276QLFSHKGUWxuX PaDlNly7WSkMZTJTXiKJL9IKMeyfVy3c3ghmkg3NlyXQ72lUzYpApCpQeDFyvGJky70sSk X1cl44iIJ4FvuenB5ofOdq4QgmiFt2JP7/4GIbJ9SiIyoibHrLr1l6lD4IO5fCbrEVpSmb Wzshm2yz0GDoa5tB+DxVeok5aq5u4L3k+vElV5L1HPWd0CExH1YhJ2BvsDqje8lbEM3PAi fVaf3ifdsm99fhXcv3Yxrv9NHpcATVOn9N3+fT3PMQoczM54oFu0E+7P+8ob9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775244313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dBF7FigiQVoy63CII7qZnQgf2RFDrDHEFelGO9kmJoE=; b=klRBMaGfQq5DdCWEvvarnEMgOIBd+oIQgognGASlCPuLXYZTVsA0h8vHYDWUQ2dOnBnNwY N2c+2FCSYP6NWjZRqBEdwotfqrwGhuyifgeImyPjSqfUU/i/jcl2MD6hhme00567Fokwqg Ldqmj3Fn/ccETC31BOyJWvZPiO4M/Ytah2Rts6ygLnIWysCoBjwmcHyIhsBEWSiCel248f T3koQLWg6fyWn9dIabPqibMS62+wcuBCChxb9bI1aeOp1++iYxEGTK6wE7WH2nLcjNsmSt yEb71r7MzoQB5nXQduqKvoFBQKO2A7mgDNVXZgnFJoLIeIe5ga1lDd8KQTORPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnTFj1NTKz12J2 for ; Fri, 03 Apr 2026 19:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32b80 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 03 Apr 2026 19:25:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 32cc4beb0a8c - main - tcp: retire TF_SENTSYN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32cc4beb0a8c3cadc0de4c255ba512fd7b196607 Auto-Submitted: auto-generated Date: Fri, 03 Apr 2026 19:25:13 +0000 Message-Id: <69d01419.32b80.67cd649@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=32cc4beb0a8c3cadc0de4c255ba512fd7b196607 commit 32cc4beb0a8c3cadc0de4c255ba512fd7b196607 Author: Michael Tuexen AuthorDate: 2026-04-03 19:22:11 +0000 Commit: Michael Tuexen CommitDate: 2026-04-03 19:22:11 +0000 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 --- sys/netinet/tcp_stacks/rack.c | 4 +--- sys/netinet/tcp_var.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 78b0026a8c5d..2e3fcc7a9762 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -22106,10 +22106,8 @@ out: * Now for special SYN/FIN handling. */ if (flags & (TH_SYN | TH_FIN)) { - if ((flags & TH_SYN) && - ((tp->t_flags & TF_SENTSYN) == 0)) { + if ((flags & TH_SYN) != 0 && tp->snd_max == tp->iss) { tp->snd_max++; - tp->t_flags |= TF_SENTSYN; } if ((flags & TH_FIN) && ((tp->t_flags & TF_SENTFIN) == 0)) { diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index a3a42b68c26b..95c4e4c52ba0 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -789,7 +789,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) #define TF_TSO 0x01000000 /* TSO enabled on this connection */ #define TF_TOE 0x02000000 /* this connection is offloaded */ #define TF_CLOSED 0x04000000 /* close(2) called on socket */ -#define TF_SENTSYN 0x08000000 /* At least one syn has been sent */ +#define TF_UNUSED 0x08000000 /* was TF_SENTSYN */ #define TF_LRD 0x10000000 /* Lost Retransmission Detection */ #define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */ #define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */ @@ -803,7 +803,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) "\15TF_NOPUSH\16TF_PREVVALID\17TF_WAKESOR\20TF_GPUTINPROG" \ "\21TF_MORETOCOME\22TF_SONOTCONN\23TF_LASTIDLE\24TF_RXWIN0SENT" \ "\25TF_FASTRECOVERY\26TF_WASFRECOVERY\27TF_SIGNATURE\30TF_FORCEDATA" \ - "\31TF_TSO\32TF_TOE\33TF_CLOSED\34TF_SENTSYN" \ + "\31TF_TSO\32TF_TOE\33TF_CLOSED\34TF_UNUSED" \ "\35TF_LRD\36TF_CONGRECOVERY\37TF_WASCRECOVERY\40TF_FASTOPEN" #define IN_FASTRECOVERY(t_flags) (t_flags & TF_FASTRECOVERY) From nobody Sat Apr 4 06:31:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnm2Q2BSJz6Y1T6 for ; Sat, 04 Apr 2026 06:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnm2P4JDPz4H33 for ; Sat, 04 Apr 2026 06:31:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775284285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8pRWaLngQx/14s8QbMG2eWoNqNDdZJ8QgWtMbPVZsao=; b=swuCY2BYaxNKRXd/89OT3GGglg61HJmjaX6cu0FWY7bvcQliefXWG3T2GtqJiwfZfQtrOt hw0rPR1dYfDA8EF+7GFiTQi3/zNMGE5iiE8dtWK54qm1qQHeKqnO2j4bFT86aNixlyEcRz ytvi1rFJ86ZvK3FFF+8o3qD138h7IeLSufgr5RLHxeHGbFK5pmQxvRUeRPhBo3hj2QEbkP D1xzjebsPdXu0qnVwLBAkXZ4COgB3tKFzLNK7bELd66yw6g77QRzxjmv2aWFrQS0Xcvoa4 bHipB39ck9uOsphKvxG30DuL0qHMuQ7iuPDEt3jgAk6kRBWbunDXaQaZqQmXKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775284285; a=rsa-sha256; cv=none; b=h4ULCgEXVw5bmgIjad2icy9I8dODKmDT5NQUHSIO+4VGrmbV31zrl9CGzRKHLxF/9b4bGR PQ3xl5YJgoDr+7lQvJ61+u9fbDYoyIahFkbunvi4CPfWJeaesvgK1y5YenoW1PgtLsZuq3 Y2dipO1Weyual6yy7aJFk0XMSbBRdwLLsbZJXehCHTOBHD2fB3FJMdI0GtpUAI3eNBdTLi jiKSOBkVnFJ6b+ohm4nuwQpKpJvTWnIp7E5+MI3n4hBvrRQuVhaPijsXxEL7WMQMLG4ZLu 4mKhbAXy3VMoN6lvBWD3+Yj19SuTw55h6MKUhGU0I8L6M8Q2zyCtqVawG8IZmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775284285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8pRWaLngQx/14s8QbMG2eWoNqNDdZJ8QgWtMbPVZsao=; b=VdEy5FoTRw6D1MTxKkr1B/kwMH+s9pWUcpsoyo63eESRkpbMJC+sb28dbsc8LeoVR5I+DB 52k/xF0EZNOO//4tiPYS/Q6/13rTaE+a++hfQjCe1sVWq8fFAjSCQ1zypw7eW3KQVewoI+ i4zEbH381zG0IjPXHRB89NI5vn2QRY62eqDLiByO1BRO1r2R1FZ1TfuWuPp3DHrE2uqT2T HnTnL1GC992WZGlv9+xU6gM+tI2879cIBBEPcGRR2+so+jaPtcUAgfKrT8AQAX10SwpYCs SbpZM/KIZdcEYlfwZwrHxqhpoB/AXwg4F71sEO5TxsuOgqFaSF9y8qkXezk4Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnm2P3nB6z1MMX for ; Sat, 04 Apr 2026 06:31:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f25a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 06:31:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 982b3c5565ff - main - procctl.2: remove space at EOL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 982b3c5565ff72a584833b5dfe5e6f732fd70914 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 06:31:25 +0000 Message-Id: <69d0b03d.1f25a.2b757423@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=982b3c5565ff72a584833b5dfe5e6f732fd70914 commit 982b3c5565ff72a584833b5dfe5e6f732fd70914 Author: Konstantin Belousov AuthorDate: 2026-04-04 06:30:30 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-04 06:30:30 +0000 procctl.2: remove space at EOL Fixes: db9bbe131c92f55e6cf03657dc030c9eea93a9fb --- lib/libsys/procctl.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsys/procctl.2 b/lib/libsys/procctl.2 index cccaad83bf4a..a09c38c7c977 100644 --- a/lib/libsys/procctl.2 +++ b/lib/libsys/procctl.2 @@ -233,7 +233,7 @@ The parameter must point to an integer containing an operation and zero or more optional flags. The following operations are supported: -.Bl -tag -width indent +.Bl -tag -width indent .It Dv PPROT_SET Mark the selected processes as protected. .It Dv PPROT_CLEAR From nobody Sat Apr 4 07:11:25 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwZ1vnrz6Y5Rr for ; Sat, 04 Apr 2026 07:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnmwZ09fVz4KNG for ; Sat, 04 Apr 2026 07:11:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J2wue+m9a0P6RoFqQBNqJGRqVIvIDrSHujzoehgUMjc=; b=tF7oGC1p7v3A/l3tR293af9pflqTuv+9BcVVqQIaufVXOYj2GlxMZJuORrepT5E0rMChQp lKP15v4K0xiKp/gGBmLkXlUeoWLKYzPedQc9fENb4Kw3Y0QRDs9mEDVfCr2WdmF3nh8G1/ Ljzc09fWqM0Kr5fNNOa2vgFXrv71tGEkAfzoja27RvsiJOn11ns+NEz6LibAD2wK/fgCmv gI8zOsDGOqYoBzVQcnw4hlrfRJs0v9DjrnBZLUWPqvpdGs0EvtOiTxyuMaXzRd283+hyKG n7BOjuIWk5PKRYrBg4H5EbMNnWGQSqzSOXM8uuF42Fjak/CmRJq7BrslvnRFdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775286686; a=rsa-sha256; cv=none; b=H6LfNw7/MSiGX2qNMQwAtNdxZNVHVI/C500iBqHDVVRlnpgpPBt2wN+LbpOc+FjHjpqTF7 s66d2JBdGynWBHQRMez7CMMF6iWwk7pnBsOThGOUXHTKRU6lVlyUDXGf6p5azKX4q/zngZ MkcWqLFD+p3BJlt7s/2Zx4dDqzxWUsT8k/9Iy1eSiAVzZawVmFpi3lF2HqcQnbPfhPHp04 ck2btfa+pU9g63MzUlfgQYUlCMz6k4xf6jw8M5arYj94/WbGu85KlN/u3pw26DKhqmqww1 6EorCCVJq1uB9fHCR7bkxmOUcevvE0K+YKfJKnzHy+O+5CgS1hzl2QMgqKh62g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J2wue+m9a0P6RoFqQBNqJGRqVIvIDrSHujzoehgUMjc=; b=U6auw5Qogysuusnma8L57LRfkf/kMOSfqi7cWMLcQJC54s3mEMpFXk2HsGWXopWBTjvan5 7HhpzeER9Fv1Afcl6k1FNEjjXnOLw63LkHEAyKIxNNDCZiLx6sXXfI1zWIeZvSGXlLuRn0 z6nQhKXxA2DAKEp88SWrQoEADcl8CCLOcKovPqtN1YOmlp0lDPwZ5m6sXcBqHj5+OK3sBr gWhDxhv7px4hURbsns2mvZGGZzlnni2NUkUFCjEcallDBl13ejhR+OCx3UyPY/Hcex2yQ5 nIzvP848BaexGlW69qGgAyJrmYg0hRkwRJpOrwUkBcM7JOSlP6jIjpk7EU+EPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwY6r7Pz1Msp for ; Sat, 04 Apr 2026 07:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 235c2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 07:11:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 3957e233dd9c - main - shlib-compat: Fix two typos in error messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3957e233dd9cf7b7599dd0a5efc59a78adfa9441 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 07:11:25 +0000 Message-Id: <69d0b99d.235c2.58f73c6@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3957e233dd9cf7b7599dd0a5efc59a78adfa9441 commit 3957e233dd9cf7b7599dd0a5efc59a78adfa9441 Author: Gordon Bergling AuthorDate: 2026-04-04 07:08:25 +0000 Commit: Gordon Bergling CommitDate: 2026-04-04 07:11:11 +0000 shlib-compat: Fix two typos in error messages - s/implemeted/implemented/ MFC after: 3 days --- tools/tools/shlib-compat/shlib-compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/shlib-compat/shlib-compat.py b/tools/tools/shlib-compat/shlib-compat.py index ba506f6c0c24..2b9b34071372 100755 --- a/tools/tools/shlib-compat/shlib-compat.py +++ b/tools/tools/shlib-compat/shlib-compat.py @@ -307,11 +307,11 @@ class Def(object): return vals[param] def _pp_ex(self, pp): - raise NotImplementedError('Extended pretty print not implemeted: %s' % + raise NotImplementedError('Extended pretty print not implemented: %s' % str(self)) def _pp(self, pp): - raise NotImplementedError('Pretty print not implemeted: %s' % str(self)) + raise NotImplementedError('Pretty print not implemented: %s' % str(self)) class AnonymousDef(Def): def __init__(self, id, **kwargs): From nobody Sat Apr 4 07:11:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwY1ffyz6Y5Rn for ; Sat, 04 Apr 2026 07:11:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnmwX72zzz4Kdw for ; Sat, 04 Apr 2026 07:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NouOP80X4pcaNRwV3UhLlenDwVZZ5pdQZQQhb0qpvhE=; b=Xe/vyTygCmIi58myRyn4NYxZmOtuAZEMOsDe7ru1eUzY/fbqTIJwfmZK9uy3tPES1IRV1L Fm+1wITnXabjxDyBEOofOp6o9urJTRANrlxQcG+AlYj7TscmdIQzo5WXAz8t/12qsSjHC+ AOg9kM8rP3j0jM+/C5kZz0Wf/Gun2HQ+z9Lf5SdC9rmVQRBbS8i7K94g+JrtCYWkyWQYeG U2aLWLfcyLmPoWXCQIqGkfy0JCwXBpNBYyiKZIp12bEvbPlUXUOuhwI9ObX3iiE+ONb40+ Y0Enbv6trNdD4IEqO4IePjQP+9v1oLOFFzFEvfc+XrVm+O84dZdMRrrFuUMYJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775286685; a=rsa-sha256; cv=none; b=jbIzR3ZUujFWZNb+Qjb8BafIATYK8TtjgPrkhuhAslpzp0F1vYrPmpyq+CB1ieeEUo6S1S J7KmzSQtHU4VdsARs/tZVp3+gZ/9s+8ZO3qKfQ045Xh11DAH7DmG91ooK+6ZSxJ43l8Xvh aK/gQL9NQguOEwPKYklcK/vjMoJ/k4gnS3w+oVDNZP22cBWVhZ9iabDvFcH8eZPLC9svqf qa0rqFye0u2V1qf36NSqIhl36GRilNwgRbSiy0nZ89nNyaEKBA26hDmWflEHnDSK30XEWl eWgD2VeZ7rFS713u55eEZoPiZv1Jk/Az0BBx72P9onic2EgdznNDLPfti253Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NouOP80X4pcaNRwV3UhLlenDwVZZ5pdQZQQhb0qpvhE=; b=gMdend8aE10cmlJO7drhey5ipU9ILHUH2Df5mvkiNu5PdHJPiKudxRBXg5miUNxEtXWus9 x550E1YAdOHYBz4OmoO2bfx2fO8Tq9RvU0Y72eMeg8ifLs0hcoKOE8NafUr/a4/+thxpxL HpCnNX7bXa4ncAqliH+9CTVqpIn6FLGhKS0F9Rydgs0HC0ry4CJ9bI6xb0umP4vJ98tXle Gut4spvpx8k0ckURb8Isgcm548U2CQvtnZWvnPYQNtJm45IFAzuTybvWpRA1PHkbsEk/l7 BKVqooZxAEPSb4/ZYUuVKgYwFtIBJsybtZ5eWLZZF6O2MXjdXyaKLC6ttf4dzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwX6TSpz1Mh0 for ; Sat, 04 Apr 2026 07:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24704 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 07:11:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: ef3703a8cd9a - main - ixl(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef3703a8cd9ade13d0c7a685577100e1fc18ee09 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 07:11:24 +0000 Message-Id: <69d0b99c.24704.4d3caa3b@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=ef3703a8cd9ade13d0c7a685577100e1fc18ee09 commit ef3703a8cd9ade13d0c7a685577100e1fc18ee09 Author: Gordon Bergling AuthorDate: 2026-04-04 07:06:58 +0000 Commit: Gordon Bergling CommitDate: 2026-04-04 07:11:11 +0000 ixl(4): Fix a typo in a source code comment - s/seperated/separated/ MFC after: 3 days --- sys/dev/ixl/ixl_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c index 04b8279bdc59..bca5abd370f5 100644 --- a/sys/dev/ixl/ixl_txrx.c +++ b/sys/dev/ixl/ixl_txrx.c @@ -33,7 +33,7 @@ /* ** IXL driver TX/RX Routines: -** This was seperated to allow usage by +** This was separated to allow usage by ** both the PF and VF drivers. */ From nobody Sat Apr 4 07:11:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwV0H7Bz6Y5BP for ; Sat, 04 Apr 2026 07:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnmwT63VDz4KYT for ; Sat, 04 Apr 2026 07:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3kF1Rjvgx9sDL95ZTzLbUrxK3VYBvmcMKqRK3mKv/s=; b=ktG15jmvlScBdMuO8RROO9ojGLk8ff72CeQQXMJ8eFTaHpCiZ9jbHQiKmFJyYGGQSWvUtf 3yj7AfjA32nG4Hd+9oFPAPCietxzAJZhLDjTJMcWs987iZ/akYab/nsy8yHKAzU446KHqX qiHYoG1DJ/NzZDrJrTuFX7OEeuHQy25sn1uKZoc6l6bqPSQ2eCml54waK17PeCyT2RbVWZ 7xo0kiaQm676Qg7QAi0YaPF/9wbI+UBDEk6eGGdh3Dj/d8Vy8B3i6+Tip5vscnlvErGrJ7 bfrG5KhnGGM1+9Vx+Fm5o6HVbm3lUVuwCiuFzTe8qvNZG0HmyjSJqejEuN0eiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775286681; a=rsa-sha256; cv=none; b=huYci8ytTmRLQxwvjJ0+qqBst7WZXJGyxiJf6IaAPWbJtB4LgPcl2uQHzFsx0qjKX6JQoa kxJ+bJ9AVe1NxMm3TFa12P/xeVF48BuwAIvKNFvD7stGEMgwG4Vt/Z2fOAPiMMXD56jI/f 6NB+UfqHpzo7dplEy89iyT+URhyMGr65WNMi3n8Y++M4/tKgKdG8fDi8oTOxMmWaOlQeOe DKoNdq19rPEsYnklc4aeL1grKTrQzrA1lmIphY/moZBTi3wxkk1Xk5sYUm++nO8+k55bzm aSfuooUAmPZCk/RS/+qhUBu21Z1RR9RgpQyC59hr7RFdErDYQiPyADhL5FblMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3kF1Rjvgx9sDL95ZTzLbUrxK3VYBvmcMKqRK3mKv/s=; b=plcNZtbBBGP80cKkbcgIurSvqdMtfyV9ZvMfvtxJTgo7z03k4n7AZ0mFQOeujkuiRpqrDm 4lG2UgX2fLCE08fDp35h7rQGYpPCAyNexoEadYRjvW5qpVAwndOJMifENoR5f5UiTytcPw 7kJ3eyJsacbs9HbwCCg1b2U12ZWGoO2ecJdA7lTt3061Kee8/4cNwd9qsu7e6wSoIicvqf FrUSkr2IqZzNUDasPXEA89CWNx+FyyWtpx+lUVn1La8DOGQ0jyAflf0lzKwZ7UI9I+L/fe du2/3Os8XPzkoaeVsQI3/DZlHzukjuG74XQupob14tsS0ErVPjxOnSMs1LkVFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwT4qWWz1N6d for ; Sat, 04 Apr 2026 07:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24687 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 07:11:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 9eea5eccf40d - main - pause.3: Fix a typo in the manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9eea5eccf40d408ad22ac06d9962b3a98a0f0628 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 07:11:21 +0000 Message-Id: <69d0b999.24687.22930dd9@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=9eea5eccf40d408ad22ac06d9962b3a98a0f0628 commit 9eea5eccf40d408ad22ac06d9962b3a98a0f0628 Author: Gordon Bergling AuthorDate: 2026-04-04 07:02:01 +0000 Commit: Gordon Bergling CommitDate: 2026-04-04 07:11:10 +0000 pause.3: Fix a typo in the manual page - s/reimplemeted/reimplemented/ MFC after: 3 days --- lib/libc/gen/pause.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/pause.3 b/lib/libc/gen/pause.3 index 6b17ae10777d..85257071ce2f 100644 --- a/lib/libc/gen/pause.3 +++ b/lib/libc/gen/pause.3 @@ -77,7 +77,7 @@ A system call first appeared in the Programmer's Workbench (PWB/UNIX) and was then ported to .At v7 . -It was reimplemeted as a wrapper around the +It was reimplemented as a wrapper around the .Fn sigpause and .Fn sigblock From nobody Sat Apr 4 07:11:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwX0rw4z6Y4yG for ; Sat, 04 Apr 2026 07:11:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnmwW6Mycz4KYZ for ; Sat, 04 Apr 2026 07:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WgnlYLlZVx4bJnL3rTKgVM5D/eT36muO8G2haLZLRdw=; b=t33Wp3Qf2CnS0aV8M++QX6fw3LMfqqt4gxINNNsrjLiKCmdHMVzVjDtzbfDi8zLTKcuVys qqPJh/vGrYqciBc2gozRCf1Ep6ZQPlL+xz+gnduIJc2zEYRy9wuMSy/HSGalBnGSe7cwHK nggvUERPeeIVIxLzNd2vvHyob7duX7oeI5GZ6ud7KgabYIDM8cfeOplbLX7Z6rgtvX5IgU m5dTPv3iefLN/ww7ljvizunEeXshOVw8mJGD+IHfbWtbWQSJxFqZIoF+u9jOAi2UtNkFU5 lEktm/sXz5iPLsd+iZ1dh7wD4dFPBMvcn3W2S43LNn3zqbfqvg8t6Yk8KSka7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775286683; a=rsa-sha256; cv=none; b=JzgQchZVKQoKBnxylxe8zScot9bapGrNvF6vubdF+qLt5R8hqLLiJe7N8dD6KlCbMPJHzI uhuEnp2HHXJNKq94BVkc3Lqdd0exBSM6EPHtmZYYiAyktDjddRwRYQBQSxw74E3eKJP2nl T/+0+PY2A3oCsDlWdL3yoBMgqD8ba4zTkIAzeHXpnQh4BqGzTf/y7uJJ5cRmGxqnmBf/75 RjwJq9O0Z0+zck3qYvSMQS07UzHBsWjeFCB+pfnSW49iJuRlpwiQA68zDHmGDgnmOA/oas y9LGUHWij4B5DtDQNOi5M2ajbwP9qoKt3USbAc4DAzdQFu7DIXc8tgsfoX9kaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WgnlYLlZVx4bJnL3rTKgVM5D/eT36muO8G2haLZLRdw=; b=ZWMb648nwa8HfS/gluEDZhngNdETlToXB0goyux3rtbcZYyjg2QLr2rf/PGNJ2NXOcjfjF bgZL2pl8U381eZY9qiPPvjOoGLjC0eR9Q1lYItGEH5OXLxkWVKOwuQ9DJprrecyDmj/tl6 qJwDt8579l0HmpuBUURITfoG/riTe1Gg9aFZjwQHiRbHmzTkliuaeeQlXyD70OgKytPDgL /rzKyVYvS86ksN0wm7FMpD4Q6UGyPBYjhTEtCzObcEc3W/IYlQU9/5sNAqBWaB3nY2lJoQ w/6GCtxbMPptevxE0MWovFSok1p3ZOMWkWl+ThFwScCdYWX97kTTmSUP3QiW6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwW5zPHz1Mgy for ; Sat, 04 Apr 2026 07:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2443f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 07:11:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: adc41a72b884 - main - isci(4): Fix a couple of typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adc41a72b8843047d02265a6ab2d8a5025a9ce89 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 07:11:23 +0000 Message-Id: <69d0b99b.2443f.272016a@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=adc41a72b8843047d02265a6ab2d8a5025a9ce89 commit adc41a72b8843047d02265a6ab2d8a5025a9ce89 Author: Gordon Bergling AuthorDate: 2026-04-04 07:05:51 +0000 Commit: Gordon Bergling CommitDate: 2026-04-04 07:11:11 +0000 isci(4): Fix a couple of typos in source code comments - s/THis/This/ - s/impementation/implementation/ MFC after: 3 days --- sys/dev/isci/scil/scic_sds_phy_registers.h | 2 +- sys/dev/isci/scil/scic_sds_remote_node_table.c | 4 ++-- sys/dev/isci/scil/scic_sds_stp_request.h | 2 +- sys/dev/isci/scil/scif_remote_device.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/isci/scil/scic_sds_phy_registers.h b/sys/dev/isci/scil/scic_sds_phy_registers.h index c0467325eb3b..29b04133d19b 100644 --- a/sys/dev/isci/scil/scic_sds_phy_registers.h +++ b/sys/dev/isci/scil/scic_sds_phy_registers.h @@ -137,7 +137,7 @@ extern "C" { //***************************************************************************** /** - * THis macro requests the SCU register write for the specified link layer + * This macro requests the SCU register write for the specified link layer * register. */ #define scu_link_layer_register_read(phy, reg) \ diff --git a/sys/dev/isci/scil/scic_sds_remote_node_table.c b/sys/dev/isci/scil/scic_sds_remote_node_table.c index a29cbefa5057..e447d5d952af 100644 --- a/sys/dev/isci/scil/scic_sds_remote_node_table.c +++ b/sys/dev/isci/scil/scic_sds_remote_node_table.c @@ -276,7 +276,7 @@ void scic_sds_remote_node_table_clear_group( } /** - * THis method sets an entire remote node group in the remote node table. + * This method sets an entire remote node group in the remote node table. * * @param[in] remote_node_table * @param[in] group_index @@ -471,7 +471,7 @@ U16 scic_sds_remote_node_table_allocate_single_remote_node( * * @param[in] remote_node_table This is the remote node table from which to * allocate the remote node entries. - * @param[in] group_table_index THis is the group table index which must equal + * @param[in] group_table_index This is the group table index which must equal * two (2) for this operation. * * @return The remote node index that represents three consecutive remote node diff --git a/sys/dev/isci/scil/scic_sds_stp_request.h b/sys/dev/isci/scil/scic_sds_stp_request.h index e8a64868a3b1..8cf60c8dd1b3 100644 --- a/sys/dev/isci/scil/scic_sds_stp_request.h +++ b/sys/dev/isci/scil/scic_sds_stp_request.h @@ -175,7 +175,7 @@ enum SCIC_SDS_STP_REQUEST_STARTED_NON_DATA_SUBSTATES /** * @enum SCIC_SDS_STP_REQUEST_STARTED_SOFT_RESET_SUBSTATES * - * @brief THis enumeration depicts the various sub-states associated with a + * @brief This enumeration depicts the various sub-states associated with a * SATA/STP soft reset operation. */ enum SCIC_SDS_STP_REQUEST_STARTED_SOFT_RESET_SUBSTATES diff --git a/sys/dev/isci/scil/scif_remote_device.h b/sys/dev/isci/scil/scif_remote_device.h index b6ac032c8234..4c21654ce42a 100644 --- a/sys/dev/isci/scil/scif_remote_device.h +++ b/sys/dev/isci/scil/scif_remote_device.h @@ -240,7 +240,7 @@ SCI_REMOTE_DEVICE_HANDLE_T scif_remote_device_get_scic_handle( /** * @brief This method returns the maximum queue depth supported for the - * supplied target by this SCI Framework impementation. + * supplied target by this SCI Framework implementation. * * @param[in] remote_device This parameter specifies the framework * device for which to return the maximum queue depth. From nobody Sat Apr 4 07:11:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwW0GKDz6Y5Sr for ; Sat, 04 Apr 2026 07:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnmwV5mrdz4KYY for ; Sat, 04 Apr 2026 07:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N9YJ9prG/s84saA6QtgDloAVhAw7A0b898Q73oTE3pc=; b=NBktNYu6QBFpI2av8QJ/OhUr4Fj235wq3Slxr9DtKH+xzm/JRbh1y9+2PBrUWxTUEA4+PS zbZl66VJP4WTl9XbqEcyabwiPfBBGWZTEIQEdj8WBKYSZL3Zi8y+/3MX2AKcfdDoZd2DPl 1nn5RMnc1XXaAPfWXbTw+IWpah8I3pVyLUH5fZ4lKfDxOiy0ofRBNb66pJ5f9urWyWdfG/ d/r9x4bbMfSwgaIjF3iz/MH+y4ahy2YGCWFH/TPl/IalmOpXTWwRo/yDuxmZAQ77Qfr4k1 k5lFAGJ6S7Fs2BIM1gZb1147QdlaY4WxIAiRdq68fQMPxuk4lkR8q0lSGtjX9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775286682; a=rsa-sha256; cv=none; b=lAcuEvmoC+dQxZ+qInDgOrfnd5DQSGDhC8YpUBESt+ULW6f5beJnsYO+3tXap5QfOVEKEg lxVGzI8p4zkL/5bM/LFxQMkgmDTJCwhaFTkI2ZOfmpRZRohlUkiKiHsw6TL0z0cGnUeOQc YwgX1MK0GzKHm143+jU134HosxRgLRYVfuZUDN9h+HY6goDRmiqbGFyyWkZ6n+/alDotKS m1CiluYoOy2MnHeZz8o5keMAzDbWW1Wz4wHH2eAlkb0jBF0uCsfAmecGPtwD+opNH7UJlg ZbVKRAbMB+uFAbbhj7FBJJws2FoB+eyTL+eJrK0XyWxJ9cHNC8x4wmjkW4nE3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N9YJ9prG/s84saA6QtgDloAVhAw7A0b898Q73oTE3pc=; b=bFyRHWlBK5uPZsXcOUBdAqkMNv0lQeFdLLWW3I+3r+nBVN9AzsTNa3GzCDXOO1h2DK+U4/ J/mHiWcDaHjxfYkzN9bPXGvBPgveglmdy4+sLATWA9/cFhYvcckSfQ0XiSrfWQ+emCCGsq 3Pdf6JXJom6KnLdHob4eljJNM+UrpaOOK1jU588VSevPFrneFJkEwJfh5Pj4dNbgvVdPIC zYpnAsVGsX3M0ZGXT+oJCS90m+xOdBH7cwlyGdt1QAbCzHyqBDRZ1e+ludc78npNrfR4GL GQp+HztzJvJijEqREd/YnAjjRaGslXh8oO+FDrKZ6Rk1iBSCynBy3olJU9WK9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwV5NM9z1NPS for ; Sat, 04 Apr 2026 07:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 236d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 07:11:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 04be4d04bbcb - main - bhnd(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04be4d04bbcbd061455b4424488b06927487a948 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 07:11:22 +0000 Message-Id: <69d0b99a.236d2.23e0b22@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=04be4d04bbcbd061455b4424488b06927487a948 commit 04be4d04bbcbd061455b4424488b06927487a948 Author: Gordon Bergling AuthorDate: 2026-04-04 07:03:51 +0000 Commit: Gordon Bergling CommitDate: 2026-04-04 07:11:10 +0000 bhnd(4): Fix a typo in a source code comment - s/impementations/implementations/ MFC after: 3 days --- sys/dev/bhnd/bhnd_bus_if.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/bhnd/bhnd_bus_if.m b/sys/dev/bhnd/bhnd_bus_if.m index 6ae56ceeb196..7060f944c99b 100644 --- a/sys/dev/bhnd/bhnd_bus_if.m +++ b/sys/dev/bhnd/bhnd_bus_if.m @@ -533,7 +533,7 @@ METHOD int read_board_info { /** * Notify a bhnd bus that a child was added. * - * This method must be called by concrete bhnd(4) driver impementations + * This method must be called by concrete bhnd(4) driver implementations * after @p child's bus state is fully initialized. * * @param dev The bhnd bus whose child is being added. From nobody Sat Apr 4 07:11:27 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwb3kspz6Y5DZ for ; Sat, 04 Apr 2026 07:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnmwb1DqPz4KYf for ; Sat, 04 Apr 2026 07:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dsXuMiOR6yB9fQPCHLPeXtFRVOXm7tKSFx3Epsy9dYs=; b=Vx8XfjbHHxkj6XJSBWmGfpgj5HnXUWfuTh6NBTuPHhngFFouQDDS4NAFqVZIk8zl331fmS Hrp0y9k1BvUhHk51VeWor5YPLXAFELa+7i0Rxakl2w5N19cqj/CkZ7kDHnAC+Y9QC9SjrA +oGzznWYxmZEPr+VkkXUU3Nrg/feW+AZl9ldwU0sR8c4WKAwtVpTCSue84i09RjM96UcPg S9aSi4eMBpF7UO2AEae/Ubx83Ca4I1q5AkLr90kUWHiG4DUiXSrUXDPvmX1VcGlkVVsHSD 3YWB2jrJs7Go6DAY9VkVevx82r297wXKKPrfRvBotu0dOfv7Fd1KyS3jHrhwTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775286687; a=rsa-sha256; cv=none; b=mtkYlZrAxHbXFD276k4LtIQ4T0pVZ45VjlRkh2gbf6+/bUnlRGdZWnh6tdwmyjy98wOAQ/ uov1WmLCAHmWG6v/+5zgdAkeYir+Snmu96VUfC3TQprCFcM2F9t8dDvJKM+0S8QTtTmmrE PvYyILLa7W5WuzT1sxlGKui3LLQl2GG+RfYy8/MMTcuJ8Rxzlfooekbsw/nRncuMY/7QGE g/oVXgDae61LU8FkOI5MAhCOO4RAdKDNDQ07rQnzgy7OPSyU2Sicw+um4LrvgN0c6taulP 5O7xVsJYOBtJkme+gINBeHGauONKvxRalAYPfypL5N5hKPhOIHwdi5NQWwBu0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775286687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dsXuMiOR6yB9fQPCHLPeXtFRVOXm7tKSFx3Epsy9dYs=; b=HkvxoguzhCnd3ZOULEpGDR3UDkjH20imRp3pbBNlCEseyPem0x5XhYvZLcYJxG7X/xNqAQ 6AH6GeyBvkneYS43sSj3HZ7VZUubZKpPZrZGA9CSNJOMJAVaUKv/cSTUcT+klaRf64O4OB uzINoMnOYlsqQNIj8UQP/4RKgWgkwAwQfoUpzHhpw4ykliFE+dKWc6pJ8AUvIKic38vKb5 /RrNyTZNO4X5AbofbEjvu7RFsTjQcOFPHrbj9kK4mYqkSYPb0JV5X9VpMMG9BK96mPFn9K RI9PE82yQqGs9KcWTspuW8zsc6VztmF/rnK/s2WZf1Aa4q1RoJc9U+OnCSiRCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnmwb0bTRz1MwY for ; Sat, 04 Apr 2026 07:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24518 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 07:11:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b427b661be01 - main - bsdconfig(8): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b427b661be01e7b112531ba0b1ea27377a963bb8 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 07:11:27 +0000 Message-Id: <69d0b99f.24518.7abd8eb3@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b427b661be01e7b112531ba0b1ea27377a963bb8 commit b427b661be01e7b112531ba0b1ea27377a963bb8 Author: Gordon Bergling AuthorDate: 2026-04-04 07:09:56 +0000 Commit: Gordon Bergling CommitDate: 2026-04-04 07:11:11 +0000 bsdconfig(8): Fix a typo in a source code comment - s/THis/This/ MFC after: 3 days --- usr.sbin/bsdconfig/share/common.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdconfig/share/common.subr b/usr.sbin/bsdconfig/share/common.subr index 830279168ff2..f4fda1a22ac2 100644 --- a/usr.sbin/bsdconfig/share/common.subr +++ b/usr.sbin/bsdconfig/share/common.subr @@ -440,7 +440,7 @@ f_yesno() # f_noyes $format [$arguments ...] # # Display a message in a dialog yes/no box using printf(1) syntax. -# NOTE: THis is just like the f_yesno function except "No" is default. +# NOTE: This is just like the f_yesno function except "No" is default. # f_noyes() { From nobody Sat Apr 4 14:46:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnz1n74PNz6YqrC for ; Sat, 04 Apr 2026 14:46:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnz1n6D09z40FM for ; Sat, 04 Apr 2026 14:46:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775313997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/V3OP2npT7kBz1nLf9cIU8DQHgi6F2wWmYBTb0mwuGY=; b=GMjkaYlc5ugaIz1oyxHb+8njLLurwuId2hDBbjDm19dXlq0h21d4YSy7WM7kDL6WgMkxME VC533LfOagEhfPVxXbJN7UGL3VC/Hri2/IF5lbnVS7TauE3SJvcpP2OJOPSWcrP+XvF80k UatfY/RuJfk6ev6/MO2CCnvP+q+fL32hpWUB68e/MpJW0ef4tvZ8M1JrMhKp8jp7uZhUX5 6DCOpsjhc12U6PI2MiPHFKdN1fnDpEMN0VWpgtqdhGNbm10Y7Jjg4wwvqjDrXFSCOYmSn4 5iqjkJq73dxFOneTYjYy2tEI1oKiT+H+e5qBGZ+nqeJiy0K2RiPEtGkjUH7BZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775313997; a=rsa-sha256; cv=none; b=VEfBZPvB5NhykdgngL0sea0Bnp1aof5a+T8IW61G2lTuueFMLldDQnAPUJ1OqpxORBYKJG o419grEnh97eTfIvzNq7yHWVjv1tJ9RAQdbecB2YgSVwIw/xRq4eugBNGylyQ9AViJ+nqY 85DxkL2vWw2M1aCzhyPG3UAvmYLxhaL3dsDb5DuKunBGrd9SinrCBAPBWkOq7LZ6MkLCl8 +xeazSN7Z/6QVttS19MevgmEuV53DQWjZgyKHZKJzJ36RGEQKERyPEUkqge2HLqwT1ZxtJ tWCwDx/Fzgi+8foqeupHxPu0lMKsI16uqkcY1xcSBHFLBQ/5rB4Ic6GXvDIj6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775313997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/V3OP2npT7kBz1nLf9cIU8DQHgi6F2wWmYBTb0mwuGY=; b=ERV6i4LSpoRsJwbn1NYlVKVzmJSAFW97kcJTcgu+SNeIbHoeepS4VfzzPS0EkfiU0bpACN 0rpbMspyk0Pc/fSkjdfcsp+jTFnPo10OLldxsbQyc8v8UyJDWnot0Ztq3dbglew/QkZinJ 0Tg0/c0q2D7FzKdlA6+9Necqa5o/ag/kBf8lqM4ysR0l0dql1Ny6I3lTQGsZHOgI6O6mF2 DeiPkk2EGBmZjeKd9XhE5RMYA0Teu+ViEfaUBJrbajYHiw1yLB8kk6mVqiOGoL2+opImeq HaCDBW3WyhFnUMt5BJ3/OhfapRe+1ejcsrT8O+iV/FRvmWRVZUfAXYdtvTYZrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnz1n5Vybz7LQ for ; Sat, 04 Apr 2026 14:46:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b843 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 14:46:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 39c44fc55f0e - main - virtio.4: fix typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39c44fc55f0ed595623fb6d66a4060b7be32fa51 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 14:46:32 +0000 Message-Id: <69d12448.3b843.2c3ee3df@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=39c44fc55f0ed595623fb6d66a4060b7be32fa51 commit 39c44fc55f0ed595623fb6d66a4060b7be32fa51 Author: Timo Völker AuthorDate: 2026-04-04 14:43:07 +0000 Commit: Michael Tuexen CommitDate: 2026-04-04 14:46:25 +0000 virtio.4: fix typo Reviewed by: tuexen Fixes: c70755bc0d8f ("virtio: add loader tunables to sysctl") MFC after: 3 days --- share/man/man4/virtio.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 0598d5d8621d..8252cc1b7954 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 2, 2026 +.Dd April 4, 2026 .Dt VIRTIO 4 .Os .Sh NAME @@ -113,7 +113,7 @@ or to negotiate legacy mode and use the legacy .Nm driver -.Pq 1 . +.Pq 0 . The default value is 0. .El .Sh SEE ALSO From nobody Sat Apr 4 14:54:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnzBf17T3z6YrhX for ; Sat, 04 Apr 2026 14:54:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnzBd5pjvz42M6 for ; Sat, 04 Apr 2026 14:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775314457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKypTatX687Ws4n+kVjHYCf7UDT2yQMp9i07jVEUpVs=; b=vFL+Svi55/8X98gVz94625SMAoU1EKwuLwbFlSfh/IdvJ8VPaPVKAL2VjJWCMHqrN6fy3r VrvXgn8XHlcpc1Kl8OJ3RK6tKRrNtVB4zUhgQhcSuuhy/a/xD1rx9cvk26ZcV1Mrfj5rBl BZlIWcVOgrmagXuulbexhqbWOul3gqIC7xtuND7IoxfsKacdSDG2qwshw94oZd9h74GaEc 9nKmNNwPuKx6U2dzvF6s/ey7ZIs6H5HNXETBnZxctNSxs/yzrdjxE1ApQXtMfie7Q83vGf Of6UOY2yz6Cm4zwMeDhg0jzzlHWfepn7o+PagvE34R9buWGQ2nMey/YrOu7rJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775314457; a=rsa-sha256; cv=none; b=Se+yw/M5PAiZAsvARzMaSFwF0t4IOL9syYJp/l8gENhyd6bSYSszbgYxk/g13ihmAD7uLy hXetxM6doHcbqSlCP2rEuNO1qXgZy3EWgSbvgjk6hY5d3JzkD7rue2lDjCuJM4CNPBmNJq 8Pyv3G38AIK454Damhri2qUNNdM65KAsufZ5Rygv5ztXg2/HsFud5wCE8ARq099XGe+Ymi h4o2oRvumylZj+TVea3uTBlJ9e79YI59u5DW0wXUsecz47QDUmN6Qj1KTDIGtTh40UzzTO TZsX7g38xSFjN+H5jkqGVlwxaJD5hr+3trFYBwfUAgw+M27EvH/LLF+IdZG8kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775314457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKypTatX687Ws4n+kVjHYCf7UDT2yQMp9i07jVEUpVs=; b=TwKFDvyVv8P+d+Tc2eWF8oy5SHLdp7w4sHAzFkEskyhOfF+WmrAqbYnMcD21JaAYpW+g8r LlmbPzljukBmjXK+4E60jJY0GHJAsUcxwQjLAQFBLB5fZs0uqezxqOpszahZleFFiYjMBn hNdfER2iK9cG+gn+IRrFSPwwUnzidepfEyrVqaWa1sekvL8uskzbts9H1kPKwmG4DmYVSU efh1N9GByT9T+xp1bZePWu+siWvVgzyuWvPBrnZXAE9kPgoKj1UmA1z1YBI0ncDmMpLdIs RJMkB4ewCA5rZaggaD0Z8wCBMw/HVl5M1pD4mCcXz9Tf78cv+FHrGtxCES2D6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fnzBd5NXPz79P for ; Sat, 04 Apr 2026 14:54:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d42a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 14:54:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 0b39d72d0491 - main - virtio: use modern mode for transitional device by default List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b39d72d0491c77e3e9883015b1fac46663c71de Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 14:54:12 +0000 Message-Id: <69d12614.3d42a.5c3f48a2@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0b39d72d0491c77e3e9883015b1fac46663c71de commit 0b39d72d0491c77e3e9883015b1fac46663c71de Author: Timo Völker AuthorDate: 2026-04-04 14:49:54 +0000 Commit: Michael Tuexen CommitDate: 2026-04-04 14:49:54 +0000 virtio: use modern mode for transitional device by default This patch changes the default value of the loader tunable hw.virtio.pci.transitional to 1. This means, virtio uses the modern mode for transitional devices by default. The return values of vtpci_modern_probe() and vtpci_legacy_probei() were chosen to prefer modern mode, but hw.virtio.pci.transitional=0 prevents modern mode. Setting hw.virtio.pci.transitional to 1 by default seems a better fit. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D55894 --- share/man/man4/virtio.4 | 2 +- sys/dev/virtio/pci/virtio_pci_modern.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 8252cc1b7954..6af6300b1cee 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -114,7 +114,7 @@ use the legacy .Nm driver .Pq 0 . -The default value is 0. +The default value is 1. .El .Sh SEE ALSO .Xr virtio_balloon 4 , diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c index 108fd2b5f8e9..baf7c448bb95 100644 --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -191,7 +191,7 @@ static void vtpci_modern_write_device_8(struct vtpci_modern_softc *, /* Tunables. */ SYSCTL_DECL(_hw_virtio_pci); -static int vtpci_modern_transitional = 0; +static int vtpci_modern_transitional = 1; SYSCTL_INT(_hw_virtio_pci, OID_AUTO, transitional, CTLFLAG_RDTUN, &vtpci_modern_transitional, 0, "If 0, a transitional VirtIO device is used in legacy mode; otherwise, in modern mode."); From nobody Sat Apr 4 16:53:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fp1qj5wWgz6Z3lS for ; Sat, 04 Apr 2026 16:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fp1qj4BWjz3GWs for ; Sat, 04 Apr 2026 16:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775321585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hLb51v4F5mBed0fmXRErYeJz4a9UNarBVg6aqOYXx2w=; b=T/xo3/15/f6FhmxLCDtkMIVoaryZ3WBsTeXd4LBV8GwUCZfYhUoK2CXqoP1+hjt4KlCxiF 8WPEnvw6vPu06zlja9Ni3SXzmxSfpxcHzw0rww5ekUiEjqv2PBC0lASrdyxEw+CBMpY9q3 f+iNb45/qpGZZS6fD/mUhJztzPuVjuW7tNs99AIHFHcxMkxOEN7QgHWaIHkLqL6cQqO+6C cvKYJWQTCmul0+4MpoiPM5EGoEyocWet9ejyEoLM3dblD0pHl827/lZYSZ0YzQ6ZrHO6j0 Kn5d86aGeYatRqXyL2KZ9CGdYrz8Sg++EooQ4YxiUaONTJwguwYhnbSFrgG92A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775321585; a=rsa-sha256; cv=none; b=Up7KbRH9IYRAlWOLF1Dlr/b+MF3TzMRH+FmK8ORL/TY54iev/h44rpK4C8Xc3ncpbxoLtF qSENY4vUUOf2JoeIJmy3GmAUgn1LDQ9UCcZadv1TtzfZsugfX5UOf9zvhjH9VOsc7ERUqU BVGe26VGqEmd5y8jWFR+f11PK2by9qKbiipz4CeHOX5S1RXe3uFBdijryLiwYSEjoE5KXk 0CFBcVuYcAcaGWz9jd2uY0iO50ggNczr4q2ag9VLqVQKX4nKx1i5/kGX2ozvwjr1HrsBWs nuEUBKyt5TpUx9pjf6/hKB93iwJyNRY3pevWPBMxVyes6gUYwCNeHrmcvqEE/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775321585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hLb51v4F5mBed0fmXRErYeJz4a9UNarBVg6aqOYXx2w=; b=Gh1FdBcq/X4A/vQrp7FuEvF+H4t1IX5hrPpA4+enTvnn7hGWUSSShoeeh7eQ0NtF1xvrL2 LVhk19eSvNtBmDG8d7ueF2MUGb4jqSBCxx1U1Ab/unZ3Cvn/2mT+giahLF9qmksfN+Xi3t UTZGuHkh+QhbrA/9Vxnq4MVbbQ0qt1Xb/KmnSayBJE0+iVdmwqaEVftA1/nR+KXDfDfJCD Srk82zN/3+0daNmQXavajP2NJGHLkn16EnVQ21E8qlJrcbDzQZ35oui0gHq+H28vtvWl7Y likyKp0NIvBe7CG//QmNPgI3NsJ8M6VQ2/uRy8FME2iMPHfEkJHg159sEzjM1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fp1qj38tdzCG6 for ; Sat, 04 Apr 2026 16:53:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18aa8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 16:53:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: =?utf-8?Q?Jes=C3=BAs?= =?utf-8?Q?Bl=C3=A1zqu?=ez From: Robert Clausecker Subject: git: e55db843ef45 - main - lib/msun: Added fmaximum and fminimum family. Tests and man page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e55db843ef45a8788f69e110d97210fb3968b92f Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 16:53:00 +0000 Message-Id: <69d141ec.18aa8.1d64ada@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=e55db843ef45a8788f69e110d97210fb3968b92f commit e55db843ef45a8788f69e110d97210fb3968b92f Author: Jesús Blázquez AuthorDate: 2026-03-31 16:31:15 +0000 Commit: Robert Clausecker CommitDate: 2026-04-04 16:52:40 +0000 lib/msun: Added fmaximum and fminimum family. Tests and man page Starting from the existing fmax{,f,l} functions I've added the fmaximum family, which handles NaN according to the newest standard (propagating it). This commit is a PoC for GSoC 2026. Reviewed by: fuz, kargl MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D55834 --- lib/msun/Makefile | 15 ++- lib/msun/Symbol.map | 11 ++ lib/msun/man/fmaximum.3 | 103 +++++++++++++++++ lib/msun/src/math.h | 6 + lib/msun/src/s_fmaximum.c | 65 +++++++++++ lib/msun/src/s_fmaximumf.c | 60 ++++++++++ lib/msun/src/s_fmaximuml.c | 54 +++++++++ lib/msun/src/s_fminimum.c | 66 +++++++++++ lib/msun/src/s_fminimumf.c | 61 +++++++++++ lib/msun/src/s_fminimuml.c | 55 ++++++++++ lib/msun/tests/Makefile | 1 + lib/msun/tests/fmaximum_fminimum_test.c | 188 ++++++++++++++++++++++++++++++++ 12 files changed, 680 insertions(+), 5 deletions(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index 24989749a502..5112337f6297 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -75,8 +75,9 @@ COMMON_SRCS= b_tgamma.c \ s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c s_fabsf.c s_fdim.c \ s_finite.c s_finitef.c \ s_floor.c s_floorf.c s_fma.c s_fmaf.c \ - s_fmax.c s_fmaxf.c s_fmin.c \ - s_fminf.c s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ + s_fmax.c s_fmaxf.c s_fmaximum.c s_fmaximumf.c \ + s_fmin.c s_fminf.c s_fminimum.c s_fminimumf.c \ + s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ s_ilogbl.c s_isfinite.c s_isnan.c s_isnormal.c \ s_llrint.c s_llrintf.c s_llround.c s_llroundf.c s_llroundl.c \ s_log1p.c s_log1pf.c s_logb.c s_logbf.c s_lrint.c s_lrintf.c \ @@ -131,7 +132,8 @@ COMMON_SRCS+= b_tgammal.c catrigl.c \ s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cexpl.c \ s_clogl.c s_cosl.c s_cospil.c s_cprojl.c \ s_csqrtl.c s_erfl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ - s_fmaxl.c s_fminl.c s_frexpl.c s_logbl.c s_logl.c s_nanl.c \ + s_fmaxl.c s_fmaximuml.c s_fminl.c s_fminimuml.c \ + s_frexpl.c s_logbl.c s_logl.c s_nanl.c \ s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \ s_scalbnl.c s_sinl.c s_sincosl.c s_sinpil.c \ s_tanhl.c s_tanl.c s_tanpil.c s_truncl.c w_cabsl.c @@ -175,8 +177,8 @@ MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \ cpow.3 csqrt.3 erf.3 \ exp.3 fabs.3 fdim.3 \ feclearexcept.3 feenableexcept.3 fegetenv.3 \ - fegetround.3 fenv.3 floor.3 \ - fma.3 fmax.3 fmod.3 hypot.3 ieee.3 ieee_test.3 ilogb.3 j0.3 \ + fegetround.3 fenv.3 floor.3 fma.3 \ + fmax.3 fmaximum.3 fmod.3 hypot.3 ieee.3 ieee_test.3 ilogb.3 j0.3 \ lgamma.3 log.3 lrint.3 lround.3 math.3 nan.3 \ nextafter.3 remainder.3 rint.3 \ round.3 scalbn.3 signbit.3 sin.3 sincos.3 \ @@ -229,6 +231,9 @@ MLINKS+=floor.3 floorf.3 floor.3 floorl.3 MLINKS+=fma.3 fmaf.3 fma.3 fmal.3 MLINKS+=fmax.3 fmaxf.3 fmax.3 fmaxl.3 \ fmax.3 fmin.3 fmax.3 fminf.3 fmax.3 fminl.3 +MLINKS+=fmaximum.3 fmaximuml.3 fmaximum.3 fmaximumf.3 \ + fmaximum.3 fminimum.3 fmaximum.3 fminimumf.3 \ + fmaximum.3 fminimuml.3 MLINKS+=fmod.3 fmodf.3 fmod.3 fmodl.3 MLINKS+=hypot.3 cabs.3 hypot.3 cabsf.3 hypot.3 cabsl.3 \ hypot.3 hypotf.3 hypot.3 hypotl.3 diff --git a/lib/msun/Symbol.map b/lib/msun/Symbol.map index 4d5a5e4d7e6e..932cc000fe52 100644 --- a/lib/msun/Symbol.map +++ b/lib/msun/Symbol.map @@ -316,3 +316,14 @@ FBSD_1.7 { tanpif; tanpil; }; + +/* First added in 16.0-CURRENT */ + +FBSD_1.9 { + fmaximum; + fmaximumf; + fmaximuml; + fminimum; + fminimumf; + fminimuml; +}; diff --git a/lib/msun/man/fmaximum.3 b/lib/msun/man/fmaximum.3 new file mode 100644 index 000000000000..bd301163a034 --- /dev/null +++ b/lib/msun/man/fmaximum.3 @@ -0,0 +1,103 @@ +.\" Copyright (c) 2004 David Schultz +.\" Copyright (c) 2026 Jesús Blázquez +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd April 4, 2026 +.Dt FMAXIMUM 3 +.Os +.Sh NAME +.Nm fmaximum , +.Nm fmaximumf , +.Nm fmaximuml , +.Nm fminimum , +.Nm fminimumf , +.Nm fminimuml +.Nd floating-point maximum and minimum functions +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In math.h +.Ft double +.Fn fmaximum "double x" "double y" +.Ft float +.Fn fmaximumf "float x" "float y" +.Ft "long double" +.Fn fmaximuml "long double x" "long double y" +.Ft double +.Fn fminimum "double x" "double y" +.Ft float +.Fn fminimumf "float x" "float y" +.Ft "long double" +.Fn fminimuml "long double x" "long double y" +.Sh DESCRIPTION +The +.Fn fmaximum , +.Fn fmaximumf , +and +.Fn fmaximuml +functions return the larger of +.Fa x +and +.Fa y , +and likewise, the +.Fn fminimum , +.Fn fminimumf , +and +.Fn fminimuml +functions return the smaller of +.Fa x +and +.Fa y . +They treat +.Li +0.0 +as being larger than +.Li -0.0 . +.Pp +Unlike the +.Xr fmax 3 +family of functions, which ignore an \*(Na, if either argument to +.Fn fmaximum +or +.Fn fminimum +is an \*(Na, then the result is an \*(Na. +These routines do not raise any floating-point exceptions. +.Sh SEE ALSO +.Xr fabs 3 , +.Xr fdim 3 , +.Xr fmax 3 , +.Xr math 3 +.Sh STANDARDS +The +.Fn fmaximum , +.Fn fmaximumf , +.Fn fmaximuml , +.Fn fminimum , +.Fn fminimumf , +and +.Fn fminimuml +functions conform to +.St -isoC-2023 . +.Sh HISTORY +These routines first appeared in +.Fx 16.0 . diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 25bd64e36a63..103b82c1cdf8 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -520,6 +520,12 @@ long double sinpil(long double); double tanpi(double); float tanpif(float); long double tanpil(long double); +double fmaximum(double, double); +float fmaximumf(float, float); +long double fmaximuml(long double, long double); +double fminimum(double, double); +float fminimumf(float, float); +long double fminimuml(long double, long double); #endif /* __ISO_C_VISIBLE >= 2023 */ __END_DECLS diff --git a/lib/msun/src/s_fmaximum.c b/lib/msun/src/s_fmaximum.c new file mode 100644 index 000000000000..f9e1998a84c2 --- /dev/null +++ b/lib/msun/src/s_fmaximum.c @@ -0,0 +1,65 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMAXIMUM +double +fmaximum(double x, double y) +{ + return (__builtin_fmaximum(x, y)); +} +#else +double +fmaximum(double x, double y) +{ + union IEEEd2bits u[2]; + + u[0].d = x; + u[1].d = y; + + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ + if ((u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0) || + (u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0)) + return (NAN); + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[0].bits.sign].d); + + return (x > y ? x : y); +} +#endif + +#if (LDBL_MANT_DIG == 53) +__weak_reference(fmaximum, fmaximuml); +#endif diff --git a/lib/msun/src/s_fmaximumf.c b/lib/msun/src/s_fmaximumf.c new file mode 100644 index 000000000000..db4b96c14749 --- /dev/null +++ b/lib/msun/src/s_fmaximumf.c @@ -0,0 +1,60 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMAXIMUMF +float +fmaximumf(float x, float y) +{ + return (__builtin_fmaximumf(x, y)); +} +#else +float +fmaximumf(float x, float y) +{ + union IEEEf2bits u[2]; + + u[0].f = x; + u[1].f = y; + + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ + if ((u[0].bits.exp == 255 && u[0].bits.man != 0) || + (u[1].bits.exp == 255 && u[1].bits.man != 0)) + return (NAN); + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[0].bits.sign].f); + + return (x > y ? x : y); +} +#endif diff --git a/lib/msun/src/s_fmaximuml.c b/lib/msun/src/s_fmaximuml.c new file mode 100644 index 000000000000..c849478cf05a --- /dev/null +++ b/lib/msun/src/s_fmaximuml.c @@ -0,0 +1,54 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "fpmath.h" + +long double +fmaximuml(long double x, long double y) +{ + union IEEEl2bits u[2]; + + u[0].e = x; + mask_nbit_l(u[0]); + u[1].e = y; + mask_nbit_l(u[1]); + + /* Handle NaN according to ISO/IEC 60559. NaN argument -> NaN return */ + if ((u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0) || + (u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0)) + return (NAN); + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[0].bits.sign ? y : x); + + return (x > y ? x : y); +} diff --git a/lib/msun/src/s_fminimum.c b/lib/msun/src/s_fminimum.c new file mode 100644 index 000000000000..64c81b560626 --- /dev/null +++ b/lib/msun/src/s_fminimum.c @@ -0,0 +1,66 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMINIMUM +double +fminimum(double x, double y) +{ + return (__builtin_fminimum(x, y)); +} +#else +double +fminimum(double x, double y) +{ + union IEEEd2bits u[2]; + + u[0].d = x; + u[1].d = y; + + /* Check for NaNs to avoid raising spurious exceptions. */ + if (u[0].bits.exp == 2047 && (u[0].bits.manh | u[0].bits.manl) != 0 || + u[1].bits.exp == 2047 && (u[1].bits.manh | u[1].bits.manl) != 0) + return (NAN); + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[1].bits.sign].d); + + return (x < y ? x : y); +} +#endif + +#if (LDBL_MANT_DIG == 53) +__weak_reference(fminimum, fminimuml); +#endif + diff --git a/lib/msun/src/s_fminimumf.c b/lib/msun/src/s_fminimumf.c new file mode 100644 index 000000000000..d3978f576931 --- /dev/null +++ b/lib/msun/src/s_fminimumf.c @@ -0,0 +1,61 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "fpmath.h" + +#ifdef USE_BUILTIN_FMINIMUMF +float +fminimumf(float x, float y) +{ + return (__builtin_fminimumf(x, y)); +} +#else +float +fminimumf(float x, float y) +{ + union IEEEf2bits u[2]; + + u[0].f = x; + u[1].f = y; + + /* Check for NaNs to avoid raising spurious exceptions. */ + if (u[0].bits.exp == 255 && u[0].bits.man != 0 || + u[1].bits.exp == 255 && u[1].bits.man != 0) + return (NAN); + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[u[1].bits.sign].f); + + return (x < y ? x : y); +} +#endif + diff --git a/lib/msun/src/s_fminimuml.c b/lib/msun/src/s_fminimuml.c new file mode 100644 index 000000000000..e2c5527ee319 --- /dev/null +++ b/lib/msun/src/s_fminimuml.c @@ -0,0 +1,55 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2004 David Schultz + * Copyright (c) 2026 Jesús Blázquez + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include "fpmath.h" + +long double +fminimuml(long double x, long double y) +{ + union IEEEl2bits u[2]; + + u[0].e = x; + mask_nbit_l(u[0]); + u[1].e = y; + mask_nbit_l(u[1]); + + /* Check for NaNs to avoid raising spurious exceptions. */ + if (u[0].bits.exp == 32767 && (u[0].bits.manh | u[0].bits.manl) != 0 || + u[1].bits.exp == 32767 && (u[1].bits.manh | u[1].bits.manl) != 0) + return (NAN); + + /* Handle comparisons of signed zeroes. */ + if (u[0].bits.sign != u[1].bits.sign) + return (u[1].bits.sign ? y : x); + + return (x < y ? x : y); +} + diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index d2a3ebffadb3..d723e0aaf656 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -58,6 +58,7 @@ ATF_TESTS_C+= exponential_test ATF_TESTS_C+= fenv_test ATF_TESTS_C+= fma_test ATF_TESTS_C+= fmaxmin_test +ATF_TESTS_C+= fmaximum_fminimum_test ATF_TESTS_C+= ilogb2_test ATF_TESTS_C+= invtrig_test ATF_TESTS_C+= invctrig_test diff --git a/lib/msun/tests/fmaximum_fminimum_test.c b/lib/msun/tests/fmaximum_fminimum_test.c new file mode 100644 index 000000000000..4641f80dfdad --- /dev/null +++ b/lib/msun/tests/fmaximum_fminimum_test.c @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2008 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Tests for fmaximum{,f,l}() and fminimum{,f,l}() + */ + +#include +#include +#include +#include + +#include "test-utils.h" + +#pragma STDC FENV_ACCESS ON + +/* + * Test whether func(x, y) has the expected result, and make sure no + * exceptions are raised. + */ +#define TEST(func, type, x, y, expected, rmode) do { \ + type __x = (x); /* convert before we clear exceptions */ \ + type __y = (y); \ + ATF_REQUIRE_EQ(0, feclearexcept(ALL_STD_EXCEPT)); \ + long double __result = func((__x), (__y)); \ + CHECK_FP_EXCEPTIONS_MSG(0, ALL_STD_EXCEPT, \ + #func "(%.20Lg, %.20Lg) rmode%d", (x), (y), rmode); \ + ATF_CHECK_MSG(fpequal_cs(__result, (expected), true), \ + #func "(%.20Lg, %.20Lg) rmode%d = %.20Lg, expected %.20Lg", \ + (x), (y), rmode, __result, (expected)); \ +} while (0) + +static void +testall_r(long double big, long double small, int rmode) +{ + long double expected_max, expected_min; + if (isnan(big) || isnan(small)) { + expected_max = big + small; + expected_min = expected_max; + } else { + expected_max = big; + expected_min = small; + } + + TEST(fmaximumf, float, big, small, expected_max, rmode); + TEST(fmaximumf, float, small, big, expected_max, rmode); + TEST(fmaximum, double, big, small, expected_max, rmode); + TEST(fmaximum, double, small, big, expected_max, rmode); + TEST(fmaximuml, long double, big, small, expected_max, rmode); + TEST(fmaximuml, long double, small, big, expected_max, rmode); + TEST(fminimumf, float, big, small, expected_min, rmode); + TEST(fminimumf, float, small, big, expected_min, rmode); + TEST(fminimum, double, big, small, expected_min, rmode); + TEST(fminimum, double, small, big, expected_min, rmode); + TEST(fminimuml, long double, big, small, expected_min, rmode); + TEST(fminimuml, long double, small, big, expected_min, rmode); +} + +/* + * Test all the functions: fmaximumf, fmaximum, fmaximuml, fminimumf, fminimum, fminimuml + * in all rounding modes and with the arguments in different orders. + * The input 'big' must be >= 'small'. + */ +static void +testall(long double big, long double small) +{ + static const int rmodes[] = { + FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO + }; + int i; + + for (i = 0; i < 4; i++) { + fesetround(rmodes[i]); + testall_r(big, small, rmodes[i]); + } +} + +ATF_TC_WITHOUT_HEAD(test1); +ATF_TC_BODY(test1, tc) +{ + testall(1.0, 0.0); +} + +ATF_TC_WITHOUT_HEAD(test2); +ATF_TC_BODY(test2, tc) +{ + testall(42.0, nextafterf(42.0, -INFINITY)); +} +ATF_TC_WITHOUT_HEAD(test3); +ATF_TC_BODY(test3, tc) +{ + testall(nextafterf(42.0, INFINITY), 42.0); +} + +ATF_TC_WITHOUT_HEAD(test4); +ATF_TC_BODY(test4, tc) +{ + testall(-5.0, -5.0); +} + +ATF_TC_WITHOUT_HEAD(test5); +ATF_TC_BODY(test5, tc) +{ + testall(-3.0, -4.0); +} + +ATF_TC_WITHOUT_HEAD(test6); +ATF_TC_BODY(test6, tc) +{ + testall(1.0, NAN); +} +ATF_TC_WITHOUT_HEAD(test7); +ATF_TC_BODY(test7, tc) +{ + testall(INFINITY, NAN); +} + +ATF_TC_WITHOUT_HEAD(test8); +ATF_TC_BODY(test8, tc) +{ + testall(INFINITY, 1.0); +} + +ATF_TC_WITHOUT_HEAD(test9); +ATF_TC_BODY(test9, tc) +{ + testall(-3.0, -INFINITY); +} + +ATF_TC_WITHOUT_HEAD(test10); +ATF_TC_BODY(test10, tc) +{ + testall(3.0, -INFINITY); +} + +ATF_TC_WITHOUT_HEAD(test11); +ATF_TC_BODY(test11, tc) +{ + testall(NAN, NAN); +} + +ATF_TC_WITHOUT_HEAD(test12); +ATF_TC_BODY(test12, tc) +{ + testall(0.0, -0.0); +} + + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, test1); + ATF_TP_ADD_TC(tp, test2); + ATF_TP_ADD_TC(tp, test3); + ATF_TP_ADD_TC(tp, test4); + ATF_TP_ADD_TC(tp, test5); + ATF_TP_ADD_TC(tp, test6); + ATF_TP_ADD_TC(tp, test7); + ATF_TP_ADD_TC(tp, test8); + ATF_TP_ADD_TC(tp, test9); + ATF_TP_ADD_TC(tp, test10); + ATF_TP_ADD_TC(tp, test11); + ATF_TP_ADD_TC(tp, test12); + + return (atf_no_error()); +} From nobody Sat Apr 4 20:24:59 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fp6XC6Q2cz6WWn7 for ; Sat, 04 Apr 2026 20:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fp6XC5v70z3f4W for ; Sat, 04 Apr 2026 20:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775334299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=77+isqo3hFUTOYnTfadnleF7EYS1sgkWcgRNoASIsSM=; b=LuFsGcR1w1rS+WsSoDiiCv60YLmkKT36mddM/q2xyIyZURtwbxOdt7O4EiFloXAP0jH2KN ui5i7Uok76e0nC/aVFX9hee1JmXhk6IfSNvFl0/VGjZ0IVPgwHRiQRSaQH39udsWTJ5MPx 3KNm1kqUlZN+ITvewuQHmkgJ9vU/kFFJyR7epJMXlJcplsU4mSFZYOofAsKtqiLMbJbDGo 5dvX3CEp3JBhnuJrBwjpMiF6qX8stKLMRcesKREDxrkFDsA3s7Li1MlzAKJts/TmzzLWxJ n9DpEtk8LkSQMxCbdoa1C6a+AjZI9b/za+wwf/7+NAX5WxF6bgIfQecX/T0+MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775334299; a=rsa-sha256; cv=none; b=IQidbPbj2JR469wLQW2zxwogZrUXEhKEl7AX7Q1DRyBsowEN3y+znmwccoZvR8gV2DurgV rNWiRVr77e1W9MEnUkrYPHaYHvnNKH5CtSTmXGLGBPYfCfLHHJAhMx2DJ1wtGJLymdiNeA 8FzebcH48x/vYUAOXxyIg4MfeEJwEIppAUyjrT1VnjlTRJv8sz5W7JX87qNwpjaf59UecW orF/HVQJumyuY0CDFkK19uAhBYPB1214QdzPAm6tNkdAqSXFAqd/sP3hc9+S9xc6nvq1Nj 30bnp07h5cQKqZG+lB91CA9Htd4g0b2sgXLwZm3Ya74Ozjxd5SPvFx6j5KNddQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775334299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=77+isqo3hFUTOYnTfadnleF7EYS1sgkWcgRNoASIsSM=; b=juCvjMXE1OdmYUfkj8Sf4GBtEjEBal/HpFcektzyRe/PQTAoZO3XXYGH83+k3Ekeg7JmB2 GgbkvULn3nujFRE5SRX//Yluid1wgnrN+LEMNBswEMYWxarbb4/g2ftKomOYo02qmM54xl 2orUefVkXnjV7TPYP/bFJIWK4i/rKxWCSS6GHMg0c1Ko7l3Qzw3Zzq6VfURg4GYNs7Du2a lpIbjfIbW9SZiVUn+wXw1c6uioWBIKJkA0LvJATs543hCy2IRvIQZV2asDH5DUBdPqeV6F Dxi6Ym07msyzRcEU2G79HOyPenKC1aD3zBMCH73yfYRi7ggl3sFLS1aTkhtXqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fp6XC5Cc5zbf7 for ; Sat, 04 Apr 2026 20:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3891a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 20:24:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Devin Teske Subject: git: 8e68f940c1d1 - main - New version of jng (2.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dteske X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e68f940c1d19aaf441c56b46583cbd9ab7448de Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 20:24:59 +0000 Message-Id: <69d1739b.3891a.2a3a56ee@gitrepo.freebsd.org> The branch main has been updated by dteske: URL: https://cgit.FreeBSD.org/src/commit/?id=8e68f940c1d19aaf441c56b46583cbd9ab7448de commit 8e68f940c1d19aaf441c56b46583cbd9ab7448de Author: Devin Teske AuthorDate: 2026-04-04 19:39:22 +0000 Commit: Devin Teske CommitDate: 2026-04-04 19:39:22 +0000 New version of jng (2.0) Changes for jng 1.0 -> 2.0 include: + Add experimental MSS clamping + Add support for ng_bridge(4) NGM_BRIDGE_GET_STATS (getstats) + Add JSON formatted ng_bridge(4) statistics (see above) via "jng stats -j " + Add error messages + Minor refactoring for code readability (read: quietly() function) + Rename eiface variables to jiface to clarify as-for jail interface (not ng_eiface(4)) + Fix missing description for alternate form of "jng show" usage + Update "jng show " to accept multiple names (now "jng show …" is allowed) + Update "jng shutdown " to accept multiple names (now "jng shutdown …" is allowed) + Add "-a" option to "jng stats" (as-in "jng stats -a") to show all ng_bridge(4) stats + Update "jng stats " to accept any kind of name (make it easier to use) + Add version ident + Remove extraneous line in LICENSE section + Add -h to usage statements + Bump copyright Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D43516 --- share/examples/jails/jng | 319 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 249 insertions(+), 70 deletions(-) diff --git a/share/examples/jails/jng b/share/examples/jails/jng index 53dc680e6312..7013bd350bc0 100755 --- a/share/examples/jails/jng +++ b/share/examples/jails/jng @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2016 Devin Teske +# Copyright (c) 2016-2024 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -24,10 +24,10 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# ############################################################ IDENT(1) # # $Title: netgraph(4) management script for vnet jails $ +# $Version: 2.0 $ # ############################################################ INFORMATION # @@ -129,6 +129,26 @@ # NB: While this tool can't create every type of desirable topology, it should # handle most setups, minus some which considered exotic or purpose-built. # +############################################################ CONFIGURATION + +# +# Netgraph node type. Can be `iface' or `eiface' and refers to whether +# ng_iface(4) or ng_eiface(4) is used with ng_bridge(4). The advantages of +# choosing iface over eiface is that with iface you can utilize ng_tcpmss(4) +# to limit the TCP MSS for operating in environments that clamp down on ICMP. +# +# NB: iface/tcpmss support is EXPERIMENTAL +# +NG_TYPE=eiface # Can be iface or eiface + +# +# Clamp TCP Maximum Segment Size to reasonably below standard MTU +# NB: Fixes TCP hangup issue in environments where ICMP is restricted +# NB: Be liberal about MSS (RFC 879, section 7) +# NB: Unused unless NG_TYPE=iface +# +NG_TCPMSS_CONFIG='{ inHook="bridge" outHook="'$NG_TYPE'" maxMSS=1280 }' + ############################################################ GLOBALS pgm="${0##*/}" # Program basename @@ -139,13 +159,27 @@ pgm="${0##*/}" # Program basename SUCCESS=0 FAILURE=1 +# +# Command-line options +# +STATS_FMT=text # -j for JSON + ############################################################ FUNCTIONS +quietly(){ "$@" > /dev/null 2>&1; } + usage() { + local fmt="$1" local action usage descr exec >&2 - echo "Usage: $pgm action [arguments]" + if [ "$fmt" ]; then + shift 1 # fmt + printf "%s: $fmt\n" "$pgm" "$@" + fi + echo "Usage: $pgm [-h] action [arguments]" + echo "Options:" + printf "\t-h Print usage statement and exit.\n" echo "Actions:" for action in \ bridge \ @@ -165,7 +199,12 @@ usage() action_usage() { - local usage descr action="$1" + local usage descr action="$1" fmt="$2" + shift 1 # action + if [ "$fmt" ]; then + shift 1 # fmt + printf "%s: %s: $fmt\n" "$pgm" "$action" "$@" >&2 + fi eval usage=\"\$jng_${action}_usage\" echo "Usage: $pgm $usage" >&2 eval descr=\"\$jng_${action}_descr\" @@ -260,28 +299,33 @@ mustberoot_to_continue() fi } -jng_bridge_usage="bridge [-b BRIDGE_NAME] NAME [!|=]iface0 [[!|=]iface1 ...]" +jng_bridge_usage="bridge [-h] [-b BRIDGE_NAME] NAME [!|=]iface0 [[!|=]iface1 ...]" jng_bridge_descr="Create ng0_NAME [ng1_NAME ...]" jng_bridge() { local OPTIND=1 OPTARG flag bridge=bridge - while getopts b: flag; do + while getopts b:h flag; do case "$flag" in b) bridge="$OPTARG" - [ "$bridge" ] || action_usage bridge ;; # NOTREACHED + [ "$bridge" ] || + action_usage bridge "-b argument cannot be empty" + ;; # NOTREACHED *) action_usage bridge # NOTREACHED esac done shift $(( $OPTIND - 1 )) + [ $# -gt 0 ] || action_usage bridge "too few arguments" # NOTREACHED + local name="$1" - [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" -a $# -gt 1 ] || - action_usage bridge # NOTREACHED + [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" ] || + action_usage bridge "invalid bridge name: %s" "$name" + # NOTREACHED shift 1 # name mustberoot_to_continue - local iface parent eiface eiface_devid + local iface parent jiface jiface_devid local new clone_mac no_derive num quad i=0 for iface in $*; do @@ -293,8 +337,8 @@ jng_bridge() esac # Make sure the interface doesn't exist already - eiface=ng${i}_$name - if ngctl msg "$eiface:" getifname > /dev/null 2>&1; then + jiface=ng${i}_$name + if quietly ngctl msg "$jiface:" getifname; then i=$(( $i + 1 )) continue fi @@ -307,7 +351,7 @@ jng_bridge() ngctl msg $iface: setautosrc 0 || return # Make sure the interface has been bridged - if ! ngctl info ${iface}bridge: > /dev/null 2>&1; then + if ! quietly ngctl info ${iface}bridge:; then ngctl mkpeer $iface: bridge lower link0 || return ngctl connect $iface: $iface:lower upper link1 || return @@ -318,11 +362,10 @@ jng_bridge() # Optionally create a secondary bridge if [ "$bridge" != "bridge" ] && - ! ngctl info "$iface$bridge:" > /dev/null 2>&1 + ! quietly ngctl info "$iface$bridge:" then num=2 - while ngctl msg ${iface}bridge: getstats $num \ - > /dev/null 2>&1 + while quietly ngctl msg ${iface}bridge: getstats $num do num=$(( $num + 1 )) done @@ -334,48 +377,80 @@ jng_bridge() # Create a new interface to the bridge num=2 - while ngctl msg "$iface$bridge:" getstats $num > /dev/null 2>&1 - do + while quietly ngctl msg "$iface$bridge:" getstats $num; do num=$(( $num + 1 )) done - ngctl mkpeer "$iface$bridge:" eiface link$num ether || return + local hook peerhook + case "$NG_TYPE" in + eiface) + # Hook the eiface directly to the bridge + hook=link$num peerhook=ether + ngctl mkpeer "$iface$bridge:" \ + $NG_TYPE $hook $peerhook || return + ;; + iface) + # Hook tcpmss<->iface to bridge + hook=link$num peerhook=bridge + ngctl mkpeer "$iface$bridge:" \ + tcpmss $hook $peerhook || return + hook=iface peerhook=inet + ngctl mkpeer "$iface$bridge:link$num" \ + $NG_TYPE $hook $peerhook || return + ;; + *) return $FAILURE + esac # Rename the new interface - while [ ${#eiface} -gt 15 ]; do # OS limitation - eiface=${eiface%?} + while [ ${#jiface} -gt 15 ]; do # OS limitation + jiface=${jiface%?} done - new=$( set -- `ngctl show -n "$iface$bridge:link$num"` && - echo $2 ) || return - ngctl name "$iface$bridge:link$num" $eiface || return - ifconfig $new name $eiface || return - ifconfig $eiface mtu $mtu || return - ifconfig $eiface up || return + case "$NG_TYPE" in + eiface) + new=$( ngctl show -n "$iface$bridge:link$num" ) || + return + new=$( set -- $new; echo $2 ) + ngctl name "$iface$bridge:link$num" $jiface || return + ;; + iface) + ngctl name "$iface$bridge:link$num" $jiface-mss || + return + new=$( ngctl show -n "$jiface-mss:$hook" ) || return + new=$( set -- $new; echo $2 ) + ngctl name $jiface-mss:$hook $jiface || return + ngctl msg $jiface: broadcast || return + ngctl msg $jiface-mss: config "$NG_TCPMSS_CONFIG" || + return + ;; + esac + ifconfig $new name $jiface || return + ifconfig $jiface mtu $mtu || return + ifconfig $jiface up || return # # Set the MAC address of the new interface using a sensible # algorithm to prevent conflicts on the network. # - eiface_devid= + jiface_devid= if [ "$clone_mac" ]; then - eiface_devid=$( ifconfig $iface ether | + jiface_devid=$( ifconfig $iface ether | awk '/ether/,$0=$2' ) elif [ ! "$no_derive" ]; then - derive_mac $iface "$name" eiface_devid + derive_mac $iface "$name" jiface_devid fi - [ "$eiface_devid" ] && - ifconfig $eiface ether $eiface_devid > /dev/null 2>&1 + [ "$jiface_devid" ] && + quietly ifconfig $jiface ether $jiface_devid i=$(( $i + 1 )) done # for iface } -jng_graph_usage="graph [-f] [-T type] [-o output]" +jng_graph_usage="graph [-fh] [-T type] [-o output]" jng_graph_descr="Generate network graph (default output is \`jng.svg')" jng_graph() { local OPTIND=1 OPTARG flag local output=jng.svg output_type= force= - while getopts fo:T: flag; do + while getopts fho:T: flag; do case "$flag" in f) force=1 ;; o) output="$OPTARG" ;; @@ -384,8 +459,11 @@ jng_graph() esac done shift $(( $OPTIND - 1 )) - [ $# -eq 0 -a "$output" ] || action_usage graph # NOTREACHED + + [ $# -eq 0 ] || action_usage graph "too many arguments" # NOTREACHED + mustberoot_to_continue + if [ -e "$output" -a ! "$force" ]; then echo "$output: Already exists (use \`-f' to overwrite)" >&2 return $FAILURE @@ -402,21 +480,25 @@ jng_graph() ngctl dot | dot ${output_type:+-T "$output_type"} -o "$output" } -jng_show_usage="show" +jng_show_usage="show [-h]" jng_show_descr="List possible NAME values for \`show NAME'" -jng_show1_usage="show NAME" +jng_show1_usage="show [-h] NAME ..." jng_show1_descr="Lists ng0_NAME [ng1_NAME ...]" -jng_show2_usage="show [NAME]" +jng_show2_usage="show [NAME ...]" +jng_show2_descr="List NAME values or show interfaces associated with NAME." jng_show() { local OPTIND=1 OPTARG flag - while getopts "" flag; do + local name + while getopts h flag; do case "$flag" in *) action_usage show2 # NOTREACHED esac done shift $(( $OPTIND - 1 )) + mustberoot_to_continue + if [ $# -eq 0 ]; then ngctl ls | awk '$4=="bridge",$0=$2' | xargs -rn1 -Ibridge ngctl show bridge: | @@ -424,69 +506,166 @@ jng_show() sort -u return fi - ngctl ls | awk -v name="$1" ' - match($2, /^ng[[:digit:]]+_/) && - substr($2, RSTART + RLENGTH) == name && - $4 == "eiface", $0 = $2 - ' | sort + for name in "$@"; do + ngctl ls | awk -v name="$name" ' + BEGIN { N = length(name) + 1 } + !match(ng = $2, /^ng[[:digit:]]+_/) { next } + { _name = substr(ng, S = RSTART + RLENGTH) } + _name != name && substr(_name, 1, N) != name "-" { next } + (type = $4) ~ /^(e?iface|tcpmss)$/, $0 = ng + ' | sort + done } -jng_shutdown_usage="shutdown NAME" +jng_shutdown_usage="shutdown [-h] NAME ..." jng_shutdown_descr="Shutdown ng0_NAME [ng1_NAME ...]" jng_shutdown() { local OPTIND=1 OPTARG flag - while getopts "" flag; do + while getopts h flag; do case "$flag" in *) action_usage shutdown # NOTREACHED esac done shift $(( $OPTIND -1 )) - local name="$1" - [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" -a $# -eq 1 ] || - action_usage shutdown # NOTREACHED + + [ $# -gt 0 ] || action_usage shutdown "too few arguments" # NOTREACHED + mustberoot_to_continue - jng_show "$name" | xargs -rn1 -I eiface ngctl shutdown eiface: + + local name + for name in "$@"; do + [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" ] || + action_usage shutdown "invalid name: %s" "$name" + # NOTREACHED + jng_show "$name" | xargs -rn1 -I jiface ngctl shutdown jiface: + done } -jng_stats_usage="stats NAME" +jng_stats_usage="stats [-hj] {-a | NAME ...}" jng_stats_descr="Show ng_bridge link statistics for NAME interfaces" jng_stats() { local OPTIND=1 OPTARG flag - while getopts "" flag; do + local show_all= + local name iface ether= + while getopts ahj flag; do case "$flag" in + a) show_all=1 ;; + j) STATS_FMT=json + export pgm + : "${HOSTNAME:=$( hostname )}" + export HOSTNAME + ;; *) action_usage stats # NOTREACHED esac done shift $(( $OPTIND -1 )) - local name="$1" - [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" -a $# -eq 1 ] || - action_usage stats # NOTREACHED + if [ "$show_all" ]; then + [ $# -eq 0 ] || + action_usage stats "too many arguments" # NOTREACHED + + # Get a list of bridged ng_ether(4) devices + for iface in $( ifconfig -l ); do + quietly ngctl info ${iface}bridge: || continue + ether="$ether $iface" + done + set -- $ether $( "$0" show ) + [ $# -gt 0 ] || + action_usage stats "no bridged interfaces" # NOTREACHED + else + [ $# -gt 0 ] || + action_usage stats "too few arguments" # NOTREACHED + fi + mustberoot_to_continue - for eiface in $( jng_show "$name" ); do - echo "$eiface:" - ngctl show $eiface: | awk ' - $3 == "bridge" && $5 ~ /^link/ { - bridge = $2 - link = substr($5, 5) - system(sprintf("ngctl msg %s: getstats %u", - bridge, link)) - }' | fmt 2 | awk ' - /=/ && fl = index($0, "=") { - printf "%20s = %s\n", - substr($0, 0, fl-1), - substr($0, 0, fl+1) - } - ' # END-QUOTE + + local now="$( date +%s )" + for name in "$@"; do + [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" ] || + action_usage stats "invalid name: %s" "$name" + # NOTREACHED + if ifconfig -l | xargs -n1 2> /dev/null | fgrep -qw "$name" + then + [ "$STATS_FMT" != "text" ] || + echo "${name}bridge:link0 [lower]" + ngctl msg ${name}bridge: getstats 0 | + fmt_stats -n "${name}.lower" -t "$now" + + [ "$STATS_FMT" != "text" ] || + echo "${name}bridge:link0 [lower]" + ngctl msg ${name}bridge: getstats 1 | + fmt_stats -n "${name}.upper" -t "$now" + fi + local jiface + for jiface in $( jng_show "$name" ); do + [ "$STATS_FMT" != "text" ] || echo "$jiface:" + ngctl show $jiface: | awk ' + $3 == "bridge" && $5 ~ /^link/ { + bridge = $2 + link = substr($5, 5) + system(sprintf("ngctl msg %s: getstats %u", + bridge, link)) + }' | fmt_stats -n "$jiface" -t "$now" + done done } +fmt_stats() +{ + local OPTIND=1 OPTARG flag + local time= + while getopts n:t: flag; do + case "$flag" in + n) name="$OPTARG" ;; + t) time="$OPTARG" ;; + *) break + esac + done + shift $(( OPTIND - 1 )) + fmt 2 | awk -v fmt="$STATS_FMT" -v name="$name" -v tm="$time" ' + function json_add_str(pre, k, s) + { + return sprintf("%s,\"%s\":\"%s\"", pre, k, s) + } + function json_add_int(pre, k, i) + { + return sprintf("%s,\"%s\":%d", pre, k, i) + } + BEGIN { + if (fmt == "json") { + if (tm == "") srand() # Time-seed + js = json_add_int(js, "epoch", + tm != "" ? tm : srand()) + js = json_add_str(js, "hostname", + ENVIRON["HOSTNAME"]) + js = json_add_str(js, "program", + ENVIRON["pgm"]) + js = json_add_str(js, "name", name) + } + } + /=/ && fl = index($0, "=") { + key = substr($0, 0, fl-1) + val = substr($0, fl+1) + if (fmt == "json") { + js = json_add_int(js, key, val) + } else { # Multi-line text + printf "%20s = %s\n", key, val + } + } + END { + if (fmt == "json") { + print "{" substr(js, 2) "}" + } + } + ' # END-QUOTE +} ############################################################ MAIN # # Command-line arguments # +[ $# -gt 0 ] || usage "too few arguments" # NOTREACHED action="$1" [ "$action" ] || usage # NOTREACHED From nobody Sat Apr 4 21:34:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fp84z1v3Mz6Wfhj for ; Sat, 04 Apr 2026 21:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fp84y6TxKz3nws for ; Sat, 04 Apr 2026 21:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775338498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HpjLrYinOVx0J4ZCSHVWp1m0509JjRzCPT0m/cEO9Q=; b=FaT8AU5VG9xfzsbpznR1IJuPcYPCXhQrc+XQRntoGC0XWKY8Tz8Pr2XYuCkUWAPVsiEfhy Ea2RM6IBLhPozy9+q/0vBRU+CbHgraMprsmnnyxPQ2o+Y3xXmzoUVNmyW9+k7NR/45617r 3z0kBcydNp3ImitM0ZhsN9Dfqc8zk9Xr5i1KcllHboK3VcMkxrnSolvsZWmBwmgfZ0IuAd KnmdaG/PDX6yDnBIOdk27B/viU0z3ekesbSI8HJcTOA8jdwKT/osFyGtIfJoPPNzqCpEo/ /9N7qKdLCHFCVhDRHBfILSAnozR39UaTRmbHc1+Vf+NezK57HtNBlIWmzAiR8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775338498; a=rsa-sha256; cv=none; b=gordMBCO4EA1eYKLNzgMh8+uhxQLltvltE9AtgG7u9hy/zRvfc2MrVlCiJ13zKpuuhi5VX NUyQCH5Mvv9sgHraeNK18SZm/I6UNp5G+G/iMkjuqk87dCYuv/+jtNIEnHJ2v+W/mLnlOr cB1N0fmFafGFxFPqC3Yfbw65+apokNujDbpshBCyPsj5oER4hzBs0D2VK+eaN9ngcetjL0 XAMdtZ7+tpS2LTHAf3vj84p0C9fPA4jg356RTqxwfvI60bQFTllD1Dj9ObiL3Ug3cu0SYY tHTZnZrUeeQL+TBc4SPQ4in3KrZwsZo/nXOiZmNiIm/R680UfqG1M2o5cxOXnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775338498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/HpjLrYinOVx0J4ZCSHVWp1m0509JjRzCPT0m/cEO9Q=; b=v5Guw7yODDau2mikNayL3anMXt2Pgsw71mfYFkBW+AH5qjafybCJbTVzS0ZjDB0ErHT1+C 4/Qw7AsvOTTpkjQtzB3pHpFQ+uQd3+XTJFKz2GzJ1ZN8VScJI8dV+kHOepqIxhFQ93cd/n i7b9zyg8CsV72Livi0bDWW2yBF8x2QYl/0dGMKe/sMBuWjqLjaFMNWmr/wxu4LNtHgE0Gv /mV8p3aYKMO60BSHHLV9j8eTIt3ADIhl3jya+aUsfrZEOluYJY68dgEGeZKEvJD/2KCs+S uzbUO1si85PfdXJPB9EnbCh9AH1Dqf8TYQgpyylNX6MolFR9VidWiw4kkFoDqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fp84y644HzclN for ; Sat, 04 Apr 2026 21:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cf66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 21:34:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fba8bd02340f - main - CONTRIBUTING.md: Make quality expectations section more concise List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fba8bd02340f0111a4f81c538718edcc46554794 Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 21:34:58 +0000 Message-Id: <69d18402.3cf66.55556a58@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fba8bd02340f0111a4f81c538718edcc46554794 commit fba8bd02340f0111a4f81c538718edcc46554794 Author: Ed Maste AuthorDate: 2026-04-04 21:19:28 +0000 Commit: Ed Maste CommitDate: 2026-04-04 21:34:41 +0000 CONTRIBUTING.md: Make quality expectations section more concise FreeBSD has not yet established an AI submission policy. For now remove text that implies we have. --- CONTRIBUTING.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2bfde5fb2e40..ed72ffa4ff71 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,12 +110,8 @@ Each commit must: ### Quality Expectations -Low quality submimssions will be rejected. This includes submissions generated -by AI tools that lack sufficient validation, testing, or understanding by the -submitter. - -A pull request may be closed if there are too many obvious mistakes, or when a -time-consuming rework is needed. +Low quality submimssions will be rejected. A pull request may be closed if +there are too many obvious mistakes, or when a time-consuming rework is needed. Automated accounts or chatbots must not submit pull requests or use pull request interactions to train AI or LLM systems. From nobody Sat Apr 4 21:36:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fp86z2dKMz6Wg0t for ; Sat, 04 Apr 2026 21:36:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fp86x4FYwz3pN6 for ; Sat, 04 Apr 2026 21:36:41 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; arc=pass ("google.com:s=arc-20240605:i=1"); dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.210.41 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-7d7ebe11bffso2509445a34.0 for ; Sat, 04 Apr 2026 14:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775338600; cv=none; d=google.com; s=arc-20240605; b=RY98+Hm13PEsWgzfdXWufRTsZlqFSPrzszkLzUtYVoPBFsrz8rWaBnRkorZ0BeviMY hMgas+SgikGCG+FTxBAZiY0zLF5z3nCFFW0yRTUPZ0TSJpRDWlr9/Q1Bp3ylvnfSBy7G SZGn++qYBOMz5GeNdgAHbUEB05Tq8g61gLb5S5pv0ZJ0l+Gh7zBh307ug65KgMK5Ao8f yXidTZbCegVdVnPyR119lASBRYO9nP1JMd1O8yEiha86wCpFJsdfsj1CsTZF8ErSqTw5 ZGElpgl305W1F3BuNPf2Scm9Xet4nwAaWboHEjsK3kf9fTpZN3EwZGr2iikj8aSl8k22 JVPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version; bh=XQ6JLdlZo1+p+PcY0p7eeuGXoH3bVRDj64axjEBsenA=; fh=sJeU4jWhsh3KeQH0IJw3Rljr5+kS3K9VdcAE1FNt+bM=; b=hn32U3qzqOvY/zBeOj6o6Q7sNzjaz6EmJSpD5TcAgM5j9B1Uc4ZQSFmwTonsqo6LCV dXkikWUp7LtMKogTYa+1o4uxINr9lraKdH26x3vjy+QNfo6EumXF30sBy8HmAXrUWFMO 9s/SqL3thtjSSQ0aJviVZfU43bMnXACROehzi4onLJD9zN1hOnz0zO9nmsDwAekP+jMC IJJCymDgCCD69avWp6DDwwqoZvntwItJiX6aJ8BxlYi4AXP4aAo+bLeTf/gUTp1tzYdI Tmbxb706URg0jTh/BbwRCYfIr3NnN3yjexgg/SbMhgjJnOmuujT/E9Kzk3gtYQnkFpYu kECg==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775338600; x=1775943400; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XQ6JLdlZo1+p+PcY0p7eeuGXoH3bVRDj64axjEBsenA=; b=MSnl6pjLeNd9BhzVsMj0NQEaD45iGQ8gTv/S/5vI3Dh3rmcKlEYf9a6Cp7u5q6FKHx ys3HuV+1aJOBkzmW+zxn9JCG0u6OwJZhqqfZfrccwXn2fyEjlrecxE3b394wYvEOInoq ulzgLT6jRhYCmAVGqgT4NnnIWCFRkn7j/nT6s1u6cGz6TD3ieZXU7FihaaJWk8thTUb/ 9hqpGdfgEwEXSoiHm7S/5xFL0raQqF0V7IIZ6risprV4JtV7Hx6NF3y621ikZnd/dLAc 2SrdkPGmbxKgaLby7f0U/jm5nu3djpKNCkxW/s1V3BPqD7FcDlSEn2Cbfi0DP2nlSjo3 fVXQ== X-Forwarded-Encrypted: i=1; AJvYcCXNE4PnVYV/cGGDFqX8/OPiwTX+63dzEC7Ffcol9lH6z0/3YxkTijcboL1t8unPvMLvJ5v2TySCOyCDN+A72Do6t9baJA==@freebsd.org X-Gm-Message-State: AOJu0Yy4cMSrEltCX2LFJSdw7RURAJxx+UHxA5XM9UvWgPiXUK+YXakq jdtVksl/IVmr9RT+6qbpZVKHjxvObYpty7DLpDLkcjCqRdWI+ql+rgtXAY1WY6mXDDcbno52ig2 72vLlpo5Rw7ggUoKEF1iQE2Xpgcu1N/w= X-Gm-Gg: AeBDiesroOV4gtygr89o8jbR17HUj5TqOi2rPFFAj6mQX76kv9ii4v3hjtyY6Aj8tVD GlO7sMx9xCO7aW8QY2l+T5HB1Y/8defA7cj+ThzmPcAd1iuTuLyn67Q0DXadZ2PpaIMK0BYutRo lK1r1HoG3K+7u5aYvoHc5Ta8gaUxoIxJezwXaGvTRSk1NIqphZgahEDkVnbllIlOiCwfeKszuUe IW8Q5bJ7w3ViSkbSksI8cJkAoUTfoNOkU2uB/ZyoaFa5AExj2QOYpU5zgmY1OfwsTzQHSSHFDeg 3Y2FbmP+bNGgidBzbTkKZRzuO/i28rTarrzUT8Y= X-Received: by 2002:a05:6820:f015:b0:682:7662:ccfa with SMTP id 006d021491bc7-6827662db75mr3266141eaf.49.1775338600099; Sat, 04 Apr 2026 14:36:40 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <69d18402.3cf66.55556a58@gitrepo.freebsd.org> In-Reply-To: <69d18402.3cf66.55556a58@gitrepo.freebsd.org> From: Ed Maste Date: Sat, 4 Apr 2026 17:36:29 -0400 X-Gm-Features: AQROBzB4M6n12alO_jJbTmskqlcK2-35R9MOeB6-64xUM4_d4oUjv7GRQ1x1cCE Message-ID: Subject: Re: git: fba8bd02340f - main - CONTRIBUTING.md: Make quality expectations section more concise To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-2.79 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.951]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_SPAM_MEDIUM(0.16)[0.156]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.210.41:from]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.41:from]; FREEFALL_USER(0.00)[carpeddiem]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_DKIM_NA(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org] X-Rspamd-Queue-Id: 4fp86x4FYwz3pN6 X-Spamd-Bar: -- On Sat, 4 Apr 2026 at 17:35, Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fba8bd02340f0111a4f81c538718edcc46554794 > > commit fba8bd02340f0111a4f81c538718edcc46554794 > Author: Ed Maste > AuthorDate: 2026-04-04 21:19:28 +0000 > Commit: Ed Maste > CommitDate: 2026-04-04 21:34:41 +0000 > > CONTRIBUTING.md: Make quality expectations section more concise > > FreeBSD has not yet established an AI submission policy. For now remove > text that implies we have. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56257 From nobody Sat Apr 4 23:11:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fpBD359DJz6WqbX for ; Sat, 04 Apr 2026 23:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fpBD34GGtz3xXM for ; Sat, 04 Apr 2026 23:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775344275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKtJkjApley0OBIUUtQpJzlRiv9k/1edMwphNfYXsy4=; b=NQ1V++h7klS4CoY6vwktrkLBXYoifB8Q09OTpO+Od6uW3WynmoiNjKTKWNET00AKe5Xt44 CRgGZcDl+c+eSmD8iDetvqtyxkacF7pkFnmhJ/W1V/gWlO1QGYn3rzRtbZISfX+HPbjzRX Fj7y235jrXRO/qluDAHYnWmHbVcKHh/kLPdE2P8TODwF97Y64FoA36aQvMncq50vOuk+6y O6Jltm/Sp8xlm7KY+GU8Km9JUJnl9D+I/WxygaSsUPNLA1PyN1ACvj17VchqRpNtt2PFDr srVgWs7MO9UukIy8/ivwed445xCG6sxFIrCmpIq4OoK0Z76/Z+GckqeqZ45INw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775344275; a=rsa-sha256; cv=none; b=XGGPdLIsqBYX5smUQy01qX5LrlRHBo+B3P/R+7OTonEN6dmNprBfKAjzWdqIyPJzHVcY19 MPbI6xZgZaD2Ctov+kMcgyu8HXwsAPeUZ3MylHiQLyJiM4yHU52az83ptjGMGaCvB86Wd7 czK1Tdxfdh1c19gj2Qf0I8Fiuy/AYj//xgEY7fTOIK0CzoLTBDkM3VLyHU6ePyqarozVBO JsldqdvCWjY8LvBymvAKKDzXZfPWinSWiMxjGLlPZaTyMclaLEfknVHBtcNnx1jE0gjl9z gwSbzBY/Z9XLi+peXn21whJ293hgw8dMGLAeetojpMoKjC8yExhOxMUv0XHiKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775344275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKtJkjApley0OBIUUtQpJzlRiv9k/1edMwphNfYXsy4=; b=lkZYMooBLpmEWU04FcOlI5nccw2N2D5UFQURv3qiqz3aFBsRq9r2jWPvPzLZgKvFP9sn5p JSAfGkc7dAefIYXzQLR3c7rd671y2di/NRgpOxWZea+MWgaHlb0gMROXUS7N2xQIfmMX9l 6s4nbp+q42zSA+ysxmg5oWkxLN29OULsfA85y1CK0QL6W9Wwcpye5rr6LcdPq9nG7LT78F ggx7vwSK+vAUhBeYhHlVyOGRDLtvZUX3e0UmkNwfJRaaL2/WpXQ9aCSRVJYoZkFE6y6KOg B5pE9Lcv0W+AJJ8hJrZOlA2hrOvrdzbowZq+wfpKO7BnblnxIgYfdwB7kXmALQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fpBD33pGxzgYq for ; Sat, 04 Apr 2026 23:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19e90 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 04 Apr 2026 23:11:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 3f79bc9ca336 - main - Fix nooptions VIMAGE build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f79bc9ca336f634e1afa262ccf5155882550a8a Auto-Submitted: auto-generated Date: Sat, 04 Apr 2026 23:11:15 +0000 Message-Id: <69d19a93.19e90.5d5a7bd9@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=3f79bc9ca336f634e1afa262ccf5155882550a8a commit 3f79bc9ca336f634e1afa262ccf5155882550a8a Author: Andrew Gallatin AuthorDate: 2026-04-04 23:10:45 +0000 Commit: Andrew Gallatin CommitDate: 2026-04-04 23:10:45 +0000 Fix nooptions VIMAGE build The recent FIBify commits deref struct thread without including sys/proc.h, which can result in a compiler error. This becomes apparent when building with LINT-NOVIMAGE, as net/vnet.h includes sys/proc.h. Fix this by directly including sys/proc.h Fixes: 4c486fe40267 ("ip_mroute: FIBify"), 0bb9c2b665d9 ("ip6_mroute: FIBify") --- sys/netinet/ip_mroute.c | 1 + sys/netinet6/ip6_mroute.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 6f2bf8248dd8..350f5db947af 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -85,6 +85,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 8743673fd25a..69eff75596e8 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -91,6 +91,7 @@ #include #include #include +#include #include #include #include From nobody Sun Apr 5 12:22:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fpWnB55Dfz6Z3qh for ; Sun, 05 Apr 2026 12:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fpWnB4RHsz3LcK for ; Sun, 05 Apr 2026 12:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775391758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J/QcSwdnIWhS+9FrAMaX95sOgZkSheEFH0Sl91GjGFk=; b=JpNcxeFIbpBk1EJRUAiOiI3k2nySYa7pckmfw6DPAEaEOy/lq2pTUSMnv8HoT/vvTesRAT uMtv5BEneLYmGlCWayK50Jmes0TRRI+3Xse4Rzt1lKuyuZwBADC1jFHDChqUo5Uab4OlF5 lCouUlQG31pNx5vZ8P7ntssx/0wq770YDO4Qc1GlfDGl0hAirlzlY7KzQdX7NIc+H50EGg WeDJ+Rhm+SuDKdZ2LPccmU58iigVDTQcPMJAOlO7CVLpzrqaZv/PN9//MRcPDVy17KEryz rvw4ZN9XrC+1Tndt6bjK6OXMglRG3KkJbQOkVc+xv6jNXJ4tnk75a439Y6WWCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775391758; a=rsa-sha256; cv=none; b=qfros+cPHi/RnUG130ep+pP0WWYtflQ8CHUlaVw/JwWXGb+vH1VUdtqw401zdGqge3Z4uQ wru7aVpd2GSz2lbISvNZDTZSSOwqJtoRlQli4NJ04fKOWIEnntOmoYAyLlrpdJ+RBtlCw5 ynrKpp0LaTNtDIz+GRKWPkB04n2VKJw6clgAfJ53R+EikhsGIMX9Qy7bDZpYygyP42MuIQ XFYwDMHtue5Ffq0zCoXKgBfY37LSZ79D8gjQy/wFzy71RjMOOPCSQjL3P0hEzbk6wkkMMb 93KyuRRfmeu8OZfDhFdj/dRwIG+smK6W2XNpu0I5voI9hjOxyNEiZI7uULgGjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775391758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J/QcSwdnIWhS+9FrAMaX95sOgZkSheEFH0Sl91GjGFk=; b=DgPzYE7tDLug6/xo0TipN7Z4+bslRDAZfq/jbXrp1E/YQTDMHuYzR0UqYCuiD5BV6weE4G 6BIA3JV8oY+KSDwNN6otdWD/5StH6TVF5xYFGfZAaihY7dOu6d+zwhtWnWBjBclbPOv71S nLpun/klve4N6VuEkiX75+227HVRZge+L/sCdy5Uz+WjRiMCfl9Ii/o3n2TFWwfOa2+vS5 TciJ+NS4P2iJtGoytByXhlLpJUjlBiEq1qGIySfl8rKiNNyCpwFy5Aiu0aZJXeyIPVYfOI HMNQHMCebIJZz2K+9ROlgyvz+8QzrYH5nhvTlk+P5FZJNGh8c0Hj3STY2aM2Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fpWnB40wBz15Dm for ; Sun, 05 Apr 2026 12:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2505f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 05 Apr 2026 12:22:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: cb813145f0ad - main - CONTRIBUTING.md: Correct typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb813145f0ad72705cb4ccf80222a408abe3d54c Auto-Submitted: auto-generated Date: Sun, 05 Apr 2026 12:22:38 +0000 Message-Id: <69d2540e.2505f.46ccc88c@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cb813145f0ad72705cb4ccf80222a408abe3d54c commit cb813145f0ad72705cb4ccf80222a408abe3d54c Author: Ed Maste AuthorDate: 2026-04-05 12:21:44 +0000 Commit: Ed Maste CommitDate: 2026-04-05 12:22:11 +0000 CONTRIBUTING.md: Correct typo Reported by: vladlen --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed72ffa4ff71..9f03648ddef7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,7 +110,7 @@ Each commit must: ### Quality Expectations -Low quality submimssions will be rejected. A pull request may be closed if +Low quality submissions will be rejected. A pull request may be closed if there are too many obvious mistakes, or when a time-consuming rework is needed. Automated accounts or chatbots must not submit pull requests or use pull From nobody Sun Apr 5 16:04:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fpcjR5Fklz6WVVj for ; Sun, 05 Apr 2026 16:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fpcjR41KRz3kfM for ; Sun, 05 Apr 2026 16:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775405083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVGRLBzBqKjTHdJO6EbxWVIrvOLi6UluqkvCak94EZ8=; b=SSltwjp1shk6XNNnqNxbKtG56U81QsxuwN/pA6NtbBt+chFYxdVwZCElW/gmwcaJGU2Zjb +9Eo0n/xizM7IPtj5RVk9/B9jZsC9ZUKEiGBfCm+L70cx0cS46RpGKgdHwKmJ2zkQuCuag bIGn3kE2dV4UfloCA5xWUhyF7CAJCfkUKXEjVzF/IuKzngfsS8ad3EKx+fo3mkskpiNUhD 8mYV06P3fd5sYg3FbogUftuQErRDgAT9NqmWi2v4uxnp8n7SZKdxPY1+EqfZxzYYTYkbA8 mgIyRMb+XOX3aw9Mt/lk1ZmnOreoDFSlcUieQJcyRtR74bcF1Jd/cr/CDdT4hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775405083; a=rsa-sha256; cv=none; b=O1UfUfoodBceBYKXb5liknMNa6RrdFQIUdorBCZBtNcu9lDMaPEvEGQLNYCpgLXGxZBII4 uax0qW8W7MtSYWdKgllD5sk7h9q7P4hy5Uh7PwFL4BmvbGAuGlURc+FJVS2JmDfLTAoY9q +UmihTH9UhkMuoewSbvnsXBH1eKxGuhqgzWyLsD7E4rkbdgvBhapDMC2FLmUFOuQlDt2yk J1NsjLznjUX2q6Q40MI8CuwiCEVQt4+VPCvXPL6q+RPxjRtt7rzc+Bk0sqpZCa6PtsbktL 41rRhk3+2D9eLvquEYJrYSrhvWSsXIckz3KemzotgWaZEUQ8cSYinbmfuBZ52Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775405083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVGRLBzBqKjTHdJO6EbxWVIrvOLi6UluqkvCak94EZ8=; b=w2qnsw43W1e5YMxR7z686kFcKoapOEJ1PRc4ixCY2mteXaY3MUXVAptupH/eZwhPcnAnsP aB3jgfxr0ynvKhVVE9UMuC21kQw1NtkBIZfMcqtNQOswSZAFDIbU1i8APLhqlQUL58o2xd quxFry26DW/6nNJAftDbmGKOJVl/R1UKU/myztGqj+f06N5RiutoVvfCxd2Dl86TsIB/ZC 5eHSQzQReW9dUkmzalgkmeqOZnpT1RBfo/w/PIfGmNbsL6kR5KsqjIM1dwN5p6qS4NhTlm 68cTQh/AoSXKAR7ABZMT2fAiwghwVEYrKBWCvUNAfehoHtWWqvd3vbPWt3V2EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fpcjR32Gnz1BR2 for ; Sun, 05 Apr 2026 16:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4511d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 05 Apr 2026 16:04:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 8b9775912cbc - main - nfs_diskless: Add support for an NFSv4 root fs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b9775912cbc7bb3c05c1fdfc3597dc4b68a9b9e Auto-Submitted: auto-generated Date: Sun, 05 Apr 2026 16:04:43 +0000 Message-Id: <69d2881b.4511d.5f34dcf8@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=8b9775912cbc7bb3c05c1fdfc3597dc4b68a9b9e commit 8b9775912cbc7bb3c05c1fdfc3597dc4b68a9b9e Author: Rick Macklem AuthorDate: 2026-04-05 16:00:24 +0000 Commit: Rick Macklem CommitDate: 2026-04-05 16:02:39 +0000 nfs_diskless: Add support for an NFSv4 root fs Without this patch, diskless root NFS file systems could only be mounted via NFSv3 (or NFSv2). This patch adds the basic support needed to mount a root fs via NFSv4. At this time, the NFSv4 mount will only work if the following is done on the NFS server configuration: - The root directory specified in the "V4:" line in /etc/exports must be "/". This is needed since the path to mount must be the same for NFSv3 and NFSv4. - The NFS server must be configured to do both NFSv3 and NFSv4, since the bootstrap code still uses NFSv3. - The NFSv4 server must be configured with: vfs.nfs.enable_uidtostring=1 vfs.nfsd.enable_stringtouid=1 since the NFSv4 root fs cannot be running nfsuserd(8) when it is booting. (This limitation may be removed in a future commit by hard-wiring enough id<-->name mapping entries to handle things until the nfsuserd(8) is running.) To enable the root fs to be mounted via NFSv4, it needs: - in the root file system's /boot/loader.conf boot.nfsroot.options="nfsv4" (Additional options like rsize=65536,wsize=65536 can also be specified.) - in the root file system's /etc/sysctl.conf vfs.nfs.enable_uidtostring=1 Requested by: Dan Shelton MFC after: 1 week --- sys/fs/nfs/nfs_var.h | 1 + sys/fs/nfsclient/nfs_clport.c | 31 +++++++++++++++++++++++++++++++ sys/fs/nfsclient/nfs_clrpcops.c | 3 ++- sys/fs/nfsclient/nfs_clstate.c | 17 +++++++++++++++-- sys/fs/nfsclient/nfs_clvfsops.c | 7 +++++-- sys/nfs/nfs_diskless.c | 37 +++++++++++++++++++++++++------------ 6 files changed, 79 insertions(+), 17 deletions(-) diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 28088c12d7e7..145cbf984464 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -609,6 +609,7 @@ int nfscl_relbytelock(vnode_t, u_int64_t, u_int64_t, int nfscl_checkwritelocked(vnode_t, struct flock *, struct ucred *, NFSPROC_T *, void *, int); void nfscl_lockrelease(struct nfscllockowner *, int, int); +void nfscl_uuidcheck(char *); void nfscl_fillclid(u_int64_t, char *, u_int8_t *, u_int16_t); void nfscl_filllockowner(void *, u_int8_t *, int); void nfscl_freeopen(struct nfsclopen *, int, bool); diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index cf163adc02de..d23051058ce4 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -659,6 +659,37 @@ ncl_pager_setsize(struct vnode *vp, u_quad_t *nsizep) return (setnsize); } +/* + * If the uuid passed in is the DEFAULT_UUID, try and find an + * alternate to replace it with. + * If no alternate is available, set uuid to "" so that nfscl_fillclid() + * will use random bytes. + */ +void +nfscl_uuidcheck(char *uuid) +{ + int ucplen, uuidlen; + char *ucp; + + /* + * If the uuid is the DEFAULT_UUID, try and get an alternative. + */ + uuidlen = strlen(uuid); + ucp = NULL; + if (uuidlen == strlen(DEFAULT_HOSTUUID) && + NFSBCMP(uuid, DEFAULT_HOSTUUID, uuidlen) == 0) { + *uuid = '\0'; + /* Use smbios.system.uuid if it exists. */ + if ((ucp = kern_getenv("smbios.system.uuid")) != NULL) { + ucplen = strlen(ucp); + if (ucplen < HOSTUUIDLEN && ucplen > 0) + strlcpy(uuid, ucp, HOSTUUIDLEN); + } + } + if (ucp != NULL) + freeenv(ucp); +} + /* * Fill in the client id name. For these bytes: * 1 - they must be unique diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 974d08611a00..130cc4990152 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -67,6 +67,7 @@ SYSCTL_U64(_vfs_nfs, OID_AUTO, maxcopyrange, CTLFLAG_RW, /* * Global variables */ +uint32_t nfs_exchangeboot = 0; extern struct nfsstatsv1 nfsstatsv1; extern int nfs_numnfscbd; extern struct timeval nfsboottime; @@ -5537,7 +5538,7 @@ nfsrpc_exchangeid(struct nfsmount *nmp, struct nfsclclient *clp, nfscl_reqstart(nd, NFSPROC_EXCHANGEID, nmp, NULL, 0, NULL, NULL, NFS_VER4, minorvers, NULL); NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); - *tl++ = txdr_unsigned(nfsboottime.tv_sec); /* Client owner */ + *tl++ = txdr_unsigned(nfs_exchangeboot); /* Client owner */ *tl = txdr_unsigned(clp->nfsc_rev); (void) nfsm_strtom(nd, clp->nfsc_id, clp->nfsc_idlen); diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 6dc97142b77f..a511c31d5202 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -89,6 +89,8 @@ extern u_int32_t newnfs_false, newnfs_true; extern int nfscl_debuglevel; extern int nfscl_enablecallb; extern int nfs_numnfscbd; +extern struct timeval nfsboottime; +extern uint32_t nfs_exchangeboot; NFSREQSPINLOCK; NFSCLSTATEMUTEX; int nfscl_inited = 0; @@ -883,9 +885,11 @@ nfscl_getcl(struct mount *mp, struct ucred *cred, NFSPROC_T *p, if (cred != NULL) { getcredhostuuid(cred, uuid, sizeof uuid); idlen = strlen(uuid); - if (idlen > 0) + if (idlen > 0) { + nfscl_uuidcheck(uuid); + idlen = strlen(uuid); idlen += sizeof (u_int64_t); - else + } else idlen += sizeof (u_int64_t) + 16; /* 16 random bytes */ newclp = malloc( sizeof (struct nfsclclient) + idlen - 1, M_NFSCLCLIENT, @@ -996,6 +1000,15 @@ nfscl_getcl(struct mount *mp, struct ucred *cred, NFSPROC_T *p, * such that the server throws away the clientid before * receiving the SetClientIDConfirm. */ + /* + * Must be done here while locked and before calling + * nfsrpc_setclient(). + */ + if (nfs_exchangeboot == 0) { + nfs_exchangeboot = nfsboottime.tv_sec; + if (nfs_exchangeboot == 0) + nfs_exchangeboot = arc4random(); + } if (clp->nfsc_renew > 0) clidinusedelay = NFSCL_LEASE(clp->nfsc_renew) * 2; else diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 212c88f28930..74e5e2dc9b1b 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -567,7 +567,7 @@ nfs_mountdiskless(char *path, struct vnode **vpp, struct mount *mp) { struct sockaddr *nam; - int dirlen, error; + int dirlen, error, minvers; char *dirpath; /* @@ -580,9 +580,12 @@ nfs_mountdiskless(char *path, else dirlen = 0; nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); + minvers = 0; + if ((args->flags & NFSMNT_NFSV4) != 0) + minvers = -1; if ((error = mountnfs(args, mp, nam, path, NULL, 0, dirpath, dirlen, NULL, 0, vpp, td->td_ucred, td, NFS_DEFAULT_NAMETIMEO, - NFS_DEFAULT_NEGNAMETIMEO, 0, 0, NULL, 0)) != 0) { + NFS_DEFAULT_NEGNAMETIMEO, minvers, 0, NULL, 0)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } diff --git a/sys/nfs/nfs_diskless.c b/sys/nfs/nfs_diskless.c index 0f0cf80feeec..d5278612d8d9 100644 --- a/sys/nfs/nfs_diskless.c +++ b/sys/nfs/nfs_diskless.c @@ -119,6 +119,10 @@ nfs_parse_options(const char *envopts, struct nfs_args *nd) else if (strcmp(o, "nfsv3") == 0) { nd->flags &= ~NFSMNT_NFSV4; nd->flags |= NFSMNT_NFSV3; + } else if (strcmp(o, "nfsv4") == 0) { + nd->flags &= ~NFSMNT_NFSV3; + nd->flags |= NFSMNT_NFSV4; + nd->sotype = SOCK_STREAM; } else if (strcmp(o, "tcp") == 0) nd->sotype = SOCK_STREAM; else if (strcmp(o, "udp") == 0) @@ -271,24 +275,33 @@ match_done: return; } nd3->root_saddr.sin_port = htons(NFS_PORT); - fhlen = decode_nfshandle("boot.nfsroot.nfshandle", - &nd3->root_fh[0], NFSX_V3FHMAX); - if (fhlen == 0) { - printf("nfs_diskless: no NFS handle\n"); - return; + if ((cp = kern_getenv("boot.nfsroot.options")) != NULL) { + nfs_parse_options(cp, &nd3->root_args); + freeenv(cp); } - if (fhlen != nd3->root_fhsize) { - printf("nfs_diskless: bad NFS handle len=%d\n", fhlen); - return; + if ((nd3->root_args.flags & NFSMNT_NFSV4) == 0) { + fhlen = decode_nfshandle("boot.nfsroot.nfshandle", + &nd3->root_fh[0], NFSX_V3FHMAX); + if (fhlen == 0) { + printf("nfs_diskless: no NFS handle\n"); + return; + } + if (fhlen != nd3->root_fhsize) { + printf("nfs_diskless: bad NFS handle len=%d\n", + fhlen); + return; + } + } else { + /* + * For NFSv4, the file handle is derived from the + * boot.nfsroot.path during mounting by NFSv4. + */ + nd3->root_fhsize = 0; } if ((cp = kern_getenv("boot.nfsroot.path")) != NULL) { strncpy(nd3->root_hostnam, cp, MNAMELEN - 1); freeenv(cp); } - if ((cp = kern_getenv("boot.nfsroot.options")) != NULL) { - nfs_parse_options(cp, &nd3->root_args); - freeenv(cp); - } nfs_diskless_valid = 3; } else { From nobody Sun Apr 5 16:35:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fpdP00js2z6WYbn for ; Sun, 05 Apr 2026 16:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fpdP004Qrz3qkL for ; Sun, 05 Apr 2026 16:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775406932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fU4u1UWntzVKX7M3ka8WcODvVjoXhGZBmzRc8YMEODY=; b=ACpPRhxInn/5whpcFkCaKIC9oQ/qDG1WUCxnPg/NxO6gQUd5TaSpXENIvgoQ96tqeOx7e6 70pAgv0agMHOvVoduNntib2/VHoRopbD4Cx3scyrenU6MuL+S/vI53Uiudlh5wKXCmxx3Q Xi0mmkAby8gsOt2CO64UPQMIsIn88W+eYVq4SD8xehN3KeK64m1DkntsEGQttgN+vvknP2 lskdMGYTznDkVxDJgQNKHqo72e5B0x2JpdmXi7spS3Veipa4r5hHqtEvT/MzS0ebtz7sMg LOaJHQzH58p1MmuKYmfC4qk+2Wj/H4uXk5oxmI+GYTz7HacbefNBVAip1LI8Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775406932; a=rsa-sha256; cv=none; b=jxASdg3DpYu1lPhik+/iYpbQIOHVwUZamySPjDFd3MV85ptt1Bv+vxfvy2jb9WWxtRDxid eHAyNjHdH+qYMeqvt0EnofepMiG+uQ/HxWjQC2vvpgwTr56lDIUuckbo/iqByORWsjqwOp u6ayxKs6XoqbIjngOsgtKeuettTTMb0DOg99LscIbH45vwgFR1iodQgeZ6f69xSP2YYw1l Q+nUPkhkmqJXbVm7zKcSaeZ36xNyLMGux3O8MiDDWzx0zTpbhYpwdD3y8Vcns+7C6SwZBT hZQa0bsWsBR9exni8CTKfcHnhQ2C6qU71+fT0gZlgTGlj6YOtxzUde3vinqekg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775406932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fU4u1UWntzVKX7M3ka8WcODvVjoXhGZBmzRc8YMEODY=; b=MhAw878CuhW9rvLt2+z8w1cbEr3pLzaHYhRPSYgCb9hB1iwf6WxiOsTYVhbRR1AlIFaFhl 8QJaOh27+XI7+AxDwQp42NGrUL+SGg+87j+UDNDPdzzFCWST21PqwuZvyd851nyxeJpVYN 94obR9s16uNUQ807LiBd4nc4daIaJUO3wyHxjBG+GChvzdbDk6IjUNCnUW69+e/9nTxIfL c/O7KsdCj/kiXldZ+mFHc4vTARQfxlSpS+fg+2tSlCnZK3o1sI2lo38nXkQb5GOTiDb3aw d3nlkG7hDrUwgLlkybuVJLoMlaVpNQBnFvJJWWj7/SptCE8QbRUvYe1/ZfVYOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fpdNz6DjTz1C9N for ; Sun, 05 Apr 2026 16:35:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 466de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 05 Apr 2026 16:35:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kenneth Raplee Subject: git: c84049c0bef5 - main - Add myself as a committer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kenrap X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c84049c0bef5be3a59159e9a9ae88e22caff429b Auto-Submitted: auto-generated Date: Sun, 05 Apr 2026 16:35:31 +0000 Message-Id: <69d28f53.466de.292280ab@gitrepo.freebsd.org> The branch main has been updated by kenrap: URL: https://cgit.FreeBSD.org/src/commit/?id=c84049c0bef5be3a59159e9a9ae88e22caff429b commit c84049c0bef5be3a59159e9a9ae88e22caff429b Author: Kenneth Raplee AuthorDate: 2026-04-04 21:07:53 +0000 Commit: Kenneth Raplee CommitDate: 2026-04-05 16:33:54 +0000 Add myself as a committer Approved by: makc (mentor) --- share/misc/committers-ports.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-ports.dot b/share/misc/committers-ports.dot index 447e1263e9f6..52480381bbde 100644 --- a/share/misc/committers-ports.dot +++ b/share/misc/committers-ports.dot @@ -224,6 +224,7 @@ jwb [label="Jason Bacon\njwb@FreeBSD.org\n2017/11/12"] kai [label="Kai Knoblich\nkai@FreeBSD.org\n2019/02/01"] kami [label="Dominic Fandrey\nkami@FreeBSD.org\n2014/09/09"] kbowling [label="Kevin Bowling\nkbowling@FreeBSD.org\n2018/09/02"] +kenrap [label="Kenneth Raplee\nkenrap@FreeBSD.org\n2026/04/04"] kevans [label="Kyle Evans\nkevans@FreeBSD.org\n2020/02/14"] knu [label="Akinori Musha\nknu@FreeBSD.org\n2000/03/22"] krion [label="Kirill Ponomarew\nkrion@FreeBSD.org\n2003/07/20"] @@ -355,6 +356,7 @@ araujo -> pgollucci araujo -> samm arrowd -> diizzy +arrowd -> kenrap arrowd -> rhurlin arrowd -> vishwin arrowd -> vvd @@ -630,6 +632,7 @@ marino -> robak makc -> alonso makc -> bf makc -> jhale +makc -> kenrap makc -> rakuco mat -> "0mp" From nobody Sun Apr 5 21:08:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fplRh4crhz6Y8L2 for ; Sun, 05 Apr 2026 21:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fplRh1nC0z486j for ; Sun, 05 Apr 2026 21:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775423296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88+tQe0c2vcf5qtE4MuSV9UYNcssiu/30yJVwKjwiQA=; b=QKbgSEN8ViwSqI+aoOyHt/RRhNuSnR23/SlM5ezXWVZFdKoenJb7fUdaiFsoJNMtq2Bwzn 15QgaMGolTtVJgVsqKfDU7aLqYqf0GAo7UDC2IYl5x6j9T1isYOSQPtsS2zmo3zCxLVLJK J9B+Mel1bGxszQ1qqdxPMNvXv9bEGh+7g1ioK5D32zztM7yGiCtmPx/nQjl4Fjcyb9Qx/f wPCpuxtyUL9AtuBT/NXATD6G27ekAwm3IJM7EgffJtou5XH5zFIjbfhXdSlhW9PmrY27N9 /2Gyi83QEHKCmum4GsflJe+J7oekRcwdjEDlkYvi7bi4D7sA3nYCCOwm0UO3HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775423296; a=rsa-sha256; cv=none; b=orUXcg2yK0144fhdqV17sbiTVSfPPwLnf1WW1rezlupFlDE+XjDuJrkDwU70/GWhft6rfj eKXQo3uNE9q9XBrbhGNd1VSSIGn6CEHBnTGX3eQWUP8bfdgKslzj9nLEyNr57iY8Hb6DQU Ef7iPW7HGPlg35H4wH4J2wuLSqLWLcOrMI92Z/CGY/y4wrcaQ3p9IE6xn7//QxTzZ2Fyb3 Ss1a2X0as3CFsrDBK4HrMRksA8NyQsVoTbv+385aUtORcOLYZDB0FTIOPzFJh4OAXn74Az o/IeGriCnLdA+1jtyQNu2ikiI69Ad2wvB4dsp+fw6Cj6kHrX7WWJ5ezjsMrbXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775423296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88+tQe0c2vcf5qtE4MuSV9UYNcssiu/30yJVwKjwiQA=; b=Y4nk3FYgWJXj6s2mbaqbys9moGmXkY703T3ZncGyr1dWkWB/O4rIfFyiSAk4hXp4scLTvy iMPFh5vMie8q3QRUth9GP2fb0Zj6HdTDdZ3OH3cgOIzRD/DVPdxEVl/q+ez7OqlPNUm15i KcoL/xIOeUji79tRkDilE2EGOv8lhWRsUN92T7yEr5YUHP2NsGDb9r/d7qR1GdZUJisqPK 4MIdtlLliQx8UlhQ3r8pYJT/zZbqmEDF7GnuO1P/XLqesMaNWtJ65nvVqpYLzhGPPkRR25 RTlz4BBaiygDteA6pw1UPYEe2B+ZekQIre+eMY+WVzNQPhU0Gq43mIoy5sET0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fplRh184fz7WC for ; Sun, 05 Apr 2026 21:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d30c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 05 Apr 2026 21:08:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: cf1f21572897 - main - net: Add SIOCGI2CPB ioctl & add page/bank fields to ifi2creq List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf1f21572897ffc85789fbb1792603967297f6fc Auto-Submitted: auto-generated Date: Sun, 05 Apr 2026 21:08:16 +0000 Message-Id: <69d2cf40.3d30c.21904523@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=cf1f21572897ffc85789fbb1792603967297f6fc commit cf1f21572897ffc85789fbb1792603967297f6fc Author: Andrew Gallatin AuthorDate: 2026-04-05 19:58:10 +0000 Commit: Andrew Gallatin CommitDate: 2026-04-05 21:04:38 +0000 net: Add SIOCGI2CPB ioctl & add page/bank fields to ifi2creq This commit adds page & bank fields to ifi2creq in preparation for adding CMIS support for 400g optics to ifconfig. The new ioctl SIOCGI2CPB is added, so that drivers can distinguish between callers asking for page/bank selection and legacy callers that simply failed to zero out all ifi2creq fields. The mlx5en(4) driver and iflib(4) driver frameork have been updated to use this new SIOCGI2CPB ioctl and support page/bank operations. A follow-on patchset will add support to ifconfig for reporting data from CMIS optics. This has been tested on Nvidia ConnectX-7 and Broadcom Thor2 (using out of tree driver) based NICs. Differential Revision: https://reviews.freebsd.org/D55912 Sponsored by: Netflix Inc. Reviewed by: kib --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 18 ++++++++++++++++-- sys/net/if.h | 5 +++-- sys/net/iflib.c | 9 +++++++++ sys/net/iflib.h | 5 ++++- sys/sys/sockio.h | 1 + 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 0baeab31b100..fb8b79c8f787 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3728,6 +3728,8 @@ out: break; case SIOCGI2C: + /* fallthru */ + case SIOCGI2CPB: ifr = (struct ifreq *)data; /* @@ -3737,6 +3739,9 @@ out: error = copyin(ifr_data_get_ptr(ifr), &i2c, sizeof(i2c)); if (error) break; + /* ensure page and bank are 0 for legacy SIOCGI2C ioctls */ + if (command == SIOCGI2C) + i2c.page = i2c.bank = 0; if (i2c.len > sizeof(i2c.data)) { error = EINVAL; @@ -3778,8 +3783,17 @@ out: error = EINVAL; goto err_i2c; } + + if (i2c.bank != 0) { + mlx5_en_err(ifp, + "Query eeprom failed, Invalid Bank: %X\n", + i2c.bank); + error = EINVAL; + goto err_i2c; + } + error = mlx5_query_eeprom(priv->mdev, - read_addr, MLX5_EEPROM_LOW_PAGE, + read_addr, i2c.page, (uint32_t)i2c.offset, (uint32_t)i2c.len, module_num, (uint32_t *)i2c.data, &size_read); if (error) { @@ -3791,7 +3805,7 @@ out: if (i2c.len > MLX5_EEPROM_MAX_BYTES) { error = mlx5_query_eeprom(priv->mdev, - read_addr, MLX5_EEPROM_LOW_PAGE, + read_addr, i2c.page, (uint32_t)(i2c.offset + size_read), (uint32_t)(i2c.len - size_read), module_num, (uint32_t *)(i2c.data + size_read), &size_read); diff --git a/sys/net/if.h b/sys/net/if.h index 7c0a476708d6..1b47237e46bb 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -604,8 +604,9 @@ struct ifi2creq { uint8_t dev_addr; /* i2c address (0xA0, 0xA2) */ uint8_t offset; /* read offset */ uint8_t len; /* read length */ - uint8_t spare0; - uint32_t spare1; + uint8_t page; /* CMIS page number (0 for legacy) */ + uint8_t bank; /* CMIS bank number (0 for legacy) */ + uint8_t spare[3]; /* reserved for future use */ uint8_t data[8]; /* read buffer */ }; diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 08282d1799b8..f9d0b1af0f83 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4468,8 +4468,11 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) err = ifmedia_ioctl(ifp, ifr, ctx->ifc_mediap, command); break; case SIOCGI2C: + /* FALLTHROUGH */ + case SIOCGI2CPB: { struct ifi2creq i2c; + if_shared_ctx_t sctx = ctx->ifc_sctx; err = copyin(ifr_data_get_ptr(ifr), &i2c, sizeof(i2c)); if (err != 0) @@ -4482,6 +4485,12 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) err = EINVAL; break; } + if (command == SIOCGI2C) { + i2c.page = i2c.bank = 0; + } else if ((sctx->isc_flags & IFLIB_I2C_PAGE_BANK) == 0) { + err = EINVAL; + break; + } if ((err = IFDI_I2C_REQ(ctx, &i2c)) == 0) err = copyout(&i2c, ifr_data_get_ptr(ifr), diff --git a/sys/net/iflib.h b/sys/net/iflib.h index fe70fc5775cd..c73c50e5a3b3 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -348,7 +348,10 @@ typedef enum { * Driver needs frames padded to some minimum length */ #define IFLIB_NEED_ETHER_PAD 0x100 -#define IFLIB_SPARE7 0x200 +/* + * Driver understands page/bank i2c reads + */ +#define IFLIB_I2C_PAGE_BANK 0x200 #define IFLIB_SPARE6 0x400 #define IFLIB_SPARE5 0x800 #define IFLIB_SPARE4 0x1000 diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index cf612079c2f3..de2cc236223c 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -150,5 +150,6 @@ #define SIOCGUMBINFO _IOWR('i', 157, struct ifreq) /* get MBIM info */ #define SIOCSUMBPARAM _IOW('i', 158, struct ifreq) /* set MBIM param */ #define SIOCGUMBPARAM _IOWR('i', 159, struct ifreq) /* get MBIM param */ +#define SIOCGI2CPB _IOWR('i', 160, struct ifreq) /* get I2C data */ #endif /* !_SYS_SOCKIO_H_ */