From nobody Mon Dec 15 02:00:18 2025 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 4dV3DL4xMHz6K0CX for ; Mon, 15 Dec 2025 02:00: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dV3DL4VpYz438p for ; Mon, 15 Dec 2025 02:00:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765764018; 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=pRgEXZ0GCJpQOFecvUZuC6nhzY65C4a8YEtQAszZ6U4=; b=VNQCvBYVsRC21QsLDNnSd6iUrBd/D+9a59XZ3meB5U1UKfMltL/XvAegxcwYNhE0wVTrot IyT5S9xFotPKkRLB5VNvofGPlEZKkZaBmJWTp6BWdcFBJa/VBorBapks+10PergJl5ynDP ySnzTAHu3nVJ747l3Z0CKceRmcy1xRZFvYemg5n/+0m7f3YHvPFc0js/5PIncA5AZ1F6mB 4XiYf6HWyhtIYshVazOTZ+lIaaSXZ1NvZGCfBC2TM1v55J0Q309/OgYf3LZEjJAkxTb3E2 MHpZnKoTGDmkEdAglniwXI+hYD7lMlkwV521wbdWbWJG2ROtblI+jqaYNz3HQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765764018; 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=pRgEXZ0GCJpQOFecvUZuC6nhzY65C4a8YEtQAszZ6U4=; b=nrm6tdt3oShjw2QP3XY+zcxlrKFe9gFQ/ARq+CTphKVFJW6rscuXPDOaYnQ85gSn2DxBqR txtY2nEw5JlgI0dd6fHlgHy8IFQvUnCifNGEDongtno6y53qBYK/BF73zS404b+14lNFvD MIDj+HCIuIIxD+GOascsxOluwjmKwsoV9y7VIQsgWQq1UGGgJeDTokro0ckNqzr83f63SD 14d5f873kCV2Vwy/gPju2fwwMDR36Ad5YbMkZS7sRYU552HxTCufmuXP+Ge0lk0giyq0J3 gvN4y0qrZlR+GDi55Y6LkTAhT2nAUxX7bmTx7R+Gyx6qoUzXi9vCEZX84BJbsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765764018; a=rsa-sha256; cv=none; b=YR3TATngwZXQ8evaY2fKxJxQBTtPUKBWSGuvXi7hvDEQNokw1meuEClhRwgsaTi7uDgoLq UJgAJqlYWseNGtBhwfU82WwRpLCNqkYLHegT16qvMOmo6z4VBD7IrL4uzuxzButr5Yvv6j oAp1wexeqnum4u2kv/HlVIaJU1h94mFZ0Z7TxBVg50cHHaSMURfnBqPrhK8PQmkva6b167 gKq1DbI1xaPezJFdEkiIj7LV7UEDItvEKTeZWq8BL0Qj8tqHplJnTYci+ne5MoVepQp7H+ DBNBV5sFW3yWKG20/BOD+ZwS8XVxsADipiijhl04IBRdneBhcZ2FLY90PPSx7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dV3DL45Xxz106W for ; Mon, 15 Dec 2025 02:00:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34b50 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 02:00:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 4bf8ce037dc8 - main - if_rge: initial import of if_rge driver from OpenBSD. 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: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4bf8ce037dc8fa699be87350bb6467f1b74cb96d Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 02:00:18 +0000 Message-Id: <693f6bb2.34b50.7a5205de@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=4bf8ce037dc8fa699be87350bb6467f1b74cb96d commit 4bf8ce037dc8fa699be87350bb6467f1b74cb96d Author: Adrian Chadd AuthorDate: 2025-12-06 05:26:30 +0000 Commit: Adrian Chadd CommitDate: 2025-12-15 02:00:09 +0000 if_rge: initial import of if_rge driver from OpenBSD. This is an initial import of the if_rge driver from OpenBSD and adapted to FreeBSD. Differential Revision: https://reviews.freebsd.org/D54101 --- share/man/man4/Makefile | 1 + share/man/man4/rge.4 | 165 + sys/conf/files | 4 + sys/dev/rge/if_rge.c | 2683 ++++++++ sys/dev/rge/if_rge_debug.h | 63 + sys/dev/rge/if_rge_hw.c | 1935 ++++++ sys/dev/rge/if_rge_hw.h | 41 + sys/dev/rge/if_rge_microcode.h | 13401 +++++++++++++++++++++++++++++++++++++++ sys/dev/rge/if_rge_stats.c | 133 + sys/dev/rge/if_rge_stats.h | 26 + sys/dev/rge/if_rge_sysctl.c | 238 + sys/dev/rge/if_rge_sysctl.h | 25 + sys/dev/rge/if_rge_vendor.h | 28 + sys/dev/rge/if_rgereg.h | 387 ++ sys/dev/rge/if_rgevar.h | 269 + sys/modules/Makefile | 1 + sys/modules/rge/Makefile | 7 + 17 files changed, 19407 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 8cf4a06ea9bb..25c3ba18073f 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -501,6 +501,7 @@ MAN= aac.4 \ random.4 \ rctl.4 \ re.4 \ + rge.4 \ rgephy.4 \ rights.4 \ rl.4 \ diff --git a/share/man/man4/rge.4 b/share/man/man4/rge.4 new file mode 100644 index 000000000000..072f1ece3230 --- /dev/null +++ b/share/man/man4/rge.4 @@ -0,0 +1,165 @@ +.\" +.\" Copyright (c) 2025 Adrian Chadd +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd December 12, 2025 +.Dt RGE 4 +.Os +.Sh NAME +.Nm rge +.Nd RealTek RTL8125/RTL8126/RTL8127/Killer E3000 PCIe Ethernet adapter driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device rge" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_rge_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for various NICs based on the RealTek RTL8125, +RTL8126 and RTL8127 PCIe Ethernet controllers. +.Pp +All of the NICs supported by this driver support 10, 100 and 1000Mbit +over CAT5 cable. +NICs based on the RTL8125 additionally support 2.5Gbit over CAT6 cable. +NICs based on the RTL8126 additionally support 2.5Gbit and 5Gbit over CAT6 +cable. +NICs based on the RTL8127 additionally support 2.5Gbit, 5Gbit and 10Gbit +over CAT6 cable. +.Pp +All NICs supported by the +.Nm +driver have TCP/IP checksum offload and hardware VLAN tagging/insertion +features, and use a descriptor-based DMA mechanism. +They are also +capable of TCP large send (TCP segmentation offload). +.Pp +The RTL8125, RTL8126 and RTL8127 devices are single-chip solutions combining +both a MAC and PHY. +Standalone cards are available in 1x PCIe models. +.Pp +The RTL8125, RTL8126 and RTL8127 also support jumbo frames, which can be +configured via the interface MTU setting. +The MTU is limited to 9126. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit jumbo frames. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width "10baseT/UTP" +.It Cm autoselect +Enable autoselection of the media type and options. +The user can manually override +the autoselected mode by adding media options to +.Xr rc.conf 5 . +.It Cm 10baseT/UTP +Set 10Mbps operation. +The +.Xr ifconfig 8 +.Cm mediaopt +option can also be used to select either +.Cm full-duplex +or +.Cm half-duplex +modes. +.It Cm 100baseTX +Set 100Mbps (Fast Ethernet) operation. +The +.Xr ifconfig 8 +.Cm mediaopt +option can also be used to select either +.Cm full-duplex +or +.Cm half-duplex +modes. +.It Cm 1000baseTX +Set 1000baseTX operation over twisted pair. +The RealTek gigE chips support 1000Mbps in +.Cm full-duplex +mode only. +.It Cm 2500baseTX +Set 2500baseTX operation over twisted pair. +The RealTek devices support 2.5Gbit in +.Cm full-duplex +mode only. +.It Cm 5000baseTX +Set 5000baseTX operation over twisted pair. +The RealTek devices support 5Gbit in +.Cm full-duplex +mode only. +.It Cm 10000baseTX +Set 10000baseTX operation over twisted pair. +The RealTek devices support 10Gbit in +.Cm full-duplex +mode only. +.El +.Pp +The +.Nm +driver supports the following media options: +.Bl -tag -width "full-duplex" +.It Cm full-duplex +Force full duplex operation. +.It Cm half-duplex +Force half duplex operation. +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports RealTek RTL8125, RTL8126, RTL8125 and Killer E3000 based +PCIe 1GB to 1GB Ethernet devices. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.rge.%d.debug +Configure runtime debug output. This is a 32 bit bitmask. +.El +.Sh DIAGNOSTICS +.Bl -diag +.It "rge%d: watchdog timeout" +The device has stopped responding to the network, or there is a problem with +the network connection (cable). +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr polling 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Rs +.%U https://www.realtek.com/ +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 16.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Kevin Lo Aq Mt kevlo@openbsd.org +and ported to FreeBSD by +.An Adrian Chadd Aq Mt adrian@freebsd.org . diff --git a/sys/conf/files b/sys/conf/files index 9c5220c7befa..df939f5788ca 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2866,6 +2866,10 @@ dev/regulator/regnode_if.m optional regulator dev/regulator/regulator.c optional regulator dev/regulator/regulator_bus.c optional regulator fdt dev/regulator/regulator_fixed.c optional regulator +dev/rge/if_rge.c optional rge +dev/rge/if_rge_hw.c optional rge +dev/rge/if_rge_stats.c optional rge +dev/rge/if_rge_sysctl.c optional rge dev/rl/if_rl.c optional rl pci dev/rndtest/rndtest.c optional rndtest # diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c new file mode 100644 index 000000000000..b011968905a6 --- /dev/null +++ b/sys/dev/rge/if_rge.c @@ -0,0 +1,2683 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019, 2020, 2023-2025 Kevin Lo + * Copyright (c) 2025 Adrian Chadd + * + * Hardware programming portions from Realtek Semiconductor. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* $OpenBSD: if_rge.c,v 1.38 2025/09/19 00:41:14 kevlo Exp $ */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include "if_rge_vendor.h" +#include "if_rgereg.h" +#include "if_rgevar.h" +#include "if_rge_hw.h" +#include "if_rge_microcode.h" +#include "if_rge_debug.h" +#include "if_rge_sysctl.h" +#include "if_rge_stats.h" + +#define RGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) + +static int rge_attach(device_t); +static int rge_detach(device_t); + +#if 0 +int rge_activate(struct device *, int); +#endif +static void rge_intr_msi(void *); +static int rge_ioctl(struct ifnet *, u_long, caddr_t); +static int rge_transmit_if(if_t, struct mbuf *); +static void rge_qflush_if(if_t); +static void rge_init_if(void *); +static void rge_init_locked(struct rge_softc *); +static void rge_stop_locked(struct rge_softc *); +static int rge_ifmedia_upd(if_t); +static void rge_ifmedia_sts(if_t, struct ifmediareq *); +static int rge_allocmem(struct rge_softc *); +static int rge_alloc_stats_mem(struct rge_softc *); +static int rge_freemem(struct rge_softc *); +static int rge_free_stats_mem(struct rge_softc *); +static int rge_newbuf(struct rge_queues *); +static void rge_rx_list_init(struct rge_queues *); +static void rge_tx_list_init(struct rge_queues *); +static void rge_fill_rx_ring(struct rge_queues *); +static int rge_rxeof(struct rge_queues *, struct mbufq *); +static int rge_txeof(struct rge_queues *); +static void rge_iff_locked(struct rge_softc *); +static void rge_add_media_types(struct rge_softc *); +static void rge_tx_task(void *, int); +static void rge_txq_flush_mbufs(struct rge_softc *sc); +static void rge_tick(void *); +static void rge_link_state(struct rge_softc *); +#if 0 +#ifndef SMALL_KERNEL +int rge_wol(struct ifnet *, int); +void rge_wol_power(struct rge_softc *); +#endif +#endif + +struct rge_matchid { + uint16_t vendor; + uint16_t device; + const char *name; +}; + +const struct rge_matchid rge_devices[] = { + { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_E3000, "Killer E3000" }, + { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8125, "RTL8125" }, + { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8126, "RTL8126", }, + { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RTL8127, "RTL8127" }, + { 0, 0, NULL } +}; + +static int +rge_probe(device_t dev) +{ + uint16_t vendor, device; + const struct rge_matchid *ri; + + vendor = pci_get_vendor(dev); + device = pci_get_device(dev); + + for (ri = rge_devices; ri->name != NULL; ri++) { + if ((vendor == ri->vendor) && (device == ri->device)) { + device_set_desc(dev, ri->name); + return (BUS_PROBE_DEFAULT); + } + } + + return (ENXIO); +} + +static void +rge_attach_if(struct rge_softc *sc, const char *eaddr) +{ + if_initname(sc->sc_ifp, device_get_name(sc->sc_dev), + device_get_unit(sc->sc_dev)); + if_setdev(sc->sc_ifp, sc->sc_dev); + if_setinitfn(sc->sc_ifp, rge_init_if); + if_setsoftc(sc->sc_ifp, sc); + if_setflags(sc->sc_ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); + if_setioctlfn(sc->sc_ifp, rge_ioctl); + if_settransmitfn(sc->sc_ifp, rge_transmit_if); + if_setqflushfn(sc->sc_ifp, rge_qflush_if); + + /* Set offload as appropriate */ + if_sethwassist(sc->sc_ifp, CSUM_IP | CSUM_TCP | CSUM_UDP); + if_setcapabilities(sc->sc_ifp, IFCAP_HWCSUM); + if_setcapenable(sc->sc_ifp, if_getcapabilities(sc->sc_ifp)); + + /* TODO: set WOL */ + + /* Attach interface */ + ether_ifattach(sc->sc_ifp, eaddr); + sc->sc_ether_attached = true; + + /* post ether_ifattach() bits */ + + /* VLAN capabilities */ + if_setcapabilitiesbit(sc->sc_ifp, IFCAP_VLAN_MTU | + IFCAP_VLAN_HWTAGGING, 0); + if_setcapabilitiesbit(sc->sc_ifp, IFCAP_VLAN_HWCSUM, 0); + if_setcapenable(sc->sc_ifp, if_getcapabilities(sc->sc_ifp)); + + if_setifheaderlen(sc->sc_ifp, sizeof(struct ether_vlan_header)); + + /* TODO: is this needed for iftransmit? */ + if_setsendqlen(sc->sc_ifp, RGE_TX_LIST_CNT - 1); + if_setsendqready(sc->sc_ifp); +} + +static int +rge_attach(device_t dev) +{ + uint8_t eaddr[ETHER_ADDR_LEN]; + struct rge_softc *sc; + struct rge_queues *q; + uint32_t hwrev, reg; + int i, rid; + int error; + int msic; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_ifp = if_gethandle(IFT_ETHER); + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF); + + /* Enable bus mastering */ + pci_enable_busmaster(dev); + + /* + * Map control/status registers. + */ + + /* + * The openbsd driver (and my E3000 NIC) handle registering three + * kinds of BARs - a 64 bit MMIO BAR, a 32 bit MMIO BAR, and then + * a legacy IO port BAR. + * + * To simplify bring-up, I'm going to request resources for the first + * MMIO BAR (BAR2) which should be a 32 bit BAR. + */ + rid = PCIR_BAR(2); + sc->sc_bres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->sc_bres == NULL) { + RGE_PRINT_ERROR(sc, + "Unable to allocate bus resource: memory\n"); + goto fail; + } + sc->rge_bhandle = rman_get_bushandle(sc->sc_bres); + sc->rge_btag = rman_get_bustag(sc->sc_bres); + sc->rge_bsize = rman_get_size(sc->sc_bres); + + q = malloc(sizeof(struct rge_queues), M_DEVBUF, M_NOWAIT | M_ZERO); + if (q == NULL) { + RGE_PRINT_ERROR(sc, "Unable to malloc rge_queues memory\n"); + goto fail; + } + q->q_sc = sc; + q->q_index = 0; + + sc->sc_queues = q; + sc->sc_nqueues = 1; + + /* Check if PCIe */ + if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { + sc->rge_flags |= RGE_FLAG_PCIE; + sc->sc_expcap = reg; + } + + /* Allocate MSI */ + msic = pci_msi_count(dev); + if (msic == 0) { + RGE_PRINT_ERROR(sc, "%s: only MSI interrupts supported\n", + __func__); + goto fail; + } + + msic = RGE_MSI_MESSAGES; + if (pci_alloc_msi(dev, &msic) != 0) { + RGE_PRINT_ERROR(sc, "%s: failed to allocate MSI\n", + __func__); + goto fail; + } + + sc->rge_flags |= RGE_FLAG_MSI; + + /* We need at least one MSI */ + if (msic < RGE_MSI_MESSAGES) { + RGE_PRINT_ERROR(sc, "%s: didn't allocate enough MSI\n", + __func__); + goto fail; + } + + /* + * Allocate interrupt entries. + */ + for (i = 0, rid = 1; i < RGE_MSI_MESSAGES; i++, rid++) { + sc->sc_irq[i] = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &rid, RF_ACTIVE); + if (sc->sc_irq[i] == NULL) { + RGE_PRINT_ERROR(sc, "%s: couldn't allocate MSI %d", + __func__, rid); + goto fail; + } + } + + /* Hook interrupts */ + for (i = 0; i < RGE_MSI_MESSAGES; i++) { + error = bus_setup_intr(dev, sc->sc_irq[i], + INTR_TYPE_NET | INTR_MPSAFE, NULL, rge_intr_msi, + sc, &sc->sc_ih[i]); + if (error != 0) { + RGE_PRINT_ERROR(sc, + "%s: couldn't setup intr %d (error %d)", __func__, + i, error); + goto fail; + } + } + + /* Allocate top level bus DMA tag */ + error = bus_dma_tag_create(bus_get_dma_tag(dev), + 1, /* alignment */ + 0, /* boundary */ + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, /* filter (unused) */ + BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ + BUS_SPACE_MAXADDR, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->sc_dmat); + if (error) { + RGE_PRINT_ERROR(sc, + "couldn't allocate device DMA tag (error %d)\n", error); + goto fail; + } + + /* Allocate TX/RX descriptor and buffer tags */ + error = bus_dma_tag_create(sc->sc_dmat, + RGE_ALIGN, /* alignment */ + 0, /* boundary */ + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, + NULL, NULL, /* filter (unused) */ + RGE_TX_LIST_SZ, /* maxsize */ + 1, /* nsegments */ + RGE_TX_LIST_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->sc_dmat_tx_desc); + if (error) { + RGE_PRINT_ERROR(sc, + "couldn't allocate device TX descriptor " + "DMA tag (error %d)\n", error); + goto fail; + } + + error = bus_dma_tag_create(sc->sc_dmat, + 1, /* alignment */ + 0, /* boundary */ + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, /* filter (unused) */ + RGE_JUMBO_FRAMELEN, /* maxsize */ + RGE_TX_NSEGS, /* nsegments */ + RGE_JUMBO_FRAMELEN, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->sc_dmat_tx_buf); + if (error) { + RGE_PRINT_ERROR(sc, + "couldn't allocate device TX buffer DMA tag (error %d)\n", + error); + goto fail; + } + + error = bus_dma_tag_create(sc->sc_dmat, + RGE_ALIGN, /* alignment */ + 0, /* boundary */ + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, + NULL, NULL, /* filter (unused) */ + RGE_RX_LIST_SZ, /* maxsize */ + 1, /* nsegments */ + RGE_RX_LIST_SZ, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->sc_dmat_rx_desc); + if (error) { + RGE_PRINT_ERROR(sc, + "couldn't allocate device RX descriptor " + "DMA tag (error %d)\n", error); + goto fail; + } + + error = bus_dma_tag_create(sc->sc_dmat, + 1, /* alignment */ + 0, /* boundary */ + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, /* filter (unused) */ + MCLBYTES, /* maxsize */ + 1, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->sc_dmat_rx_buf); + if (error) { + RGE_PRINT_ERROR(sc, + "couldn't allocate device RX buffer DMA tag (error %d)\n", + error); + goto fail; + } + + error = bus_dma_tag_create(sc->sc_dmat, + RGE_STATS_ALIGNMENT, /* alignment */ + 0, /* boundary */ + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, /* filter (unused) */ + RGE_STATS_BUF_SIZE, /* maxsize */ + 1, /* nsegments */ + RGE_STATS_BUF_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->sc_dmat_stats_buf); + if (error) { + RGE_PRINT_ERROR(sc, + "couldn't allocate device RX buffer DMA tag (error %d)\n", + error); + goto fail; + } + + + /* Attach sysctl nodes */ + rge_sysctl_attach(sc); + + /* Determine hardware revision */ + hwrev = RGE_READ_4(sc, RGE_TXCFG) & RGE_TXCFG_HWREV; + switch (hwrev) { + case 0x60900000: + sc->rge_type = MAC_R25; +// device_printf(dev, "RTL8125\n"); + break; + case 0x64100000: + sc->rge_type = MAC_R25B; +// device_printf(dev, "RTL8125B\n"); + break; + case 0x64900000: + sc->rge_type = MAC_R26; +// device_printf(dev, "RTL8126\n"); + break; + case 0x68800000: + sc->rge_type = MAC_R25D; +// device_printf(dev, "RTL8125D\n"); + break; + case 0x6c900000: + sc->rge_type = MAC_R27; +// device_printf(dev, "RTL8127\n"); + break; + default: + RGE_PRINT_ERROR(sc, "unknown version 0x%08x\n", hwrev); + goto fail; + } + + rge_config_imtype(sc, RGE_IMTYPE_SIM); + + /* TODO: disable ASPM/ECPM? */ + +#if 0 + /* + * PCI Express check. + */ + if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIEXPRESS, + &offset, NULL)) { + /* Disable PCIe ASPM and ECPM. */ + reg = pci_conf_read(pa->pa_pc, pa->pa_tag, + offset + PCI_PCIE_LCSR); + reg &= ~(PCI_PCIE_LCSR_ASPM_L0S | PCI_PCIE_LCSR_ASPM_L1 | + PCI_PCIE_LCSR_ECPM); + pci_conf_write(pa->pa_pc, pa->pa_tag, offset + PCI_PCIE_LCSR, + reg); + } +#endif + + RGE_LOCK(sc); + if (rge_chipinit(sc)) { + RGE_UNLOCK(sc); + goto fail; + } + + rge_get_macaddr(sc, eaddr); + RGE_UNLOCK(sc); + + if (rge_allocmem(sc)) + goto fail; + if (rge_alloc_stats_mem(sc)) + goto fail; + + /* Initialize ifmedia structures. */ + ifmedia_init(&sc->sc_media, IFM_IMASK, rge_ifmedia_upd, + rge_ifmedia_sts); + rge_add_media_types(sc); + ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_AUTO); + sc->sc_media.ifm_media = sc->sc_media.ifm_cur->ifm_media; + + rge_attach_if(sc, eaddr); + + /* + * TODO: technically should be per txq but we only support + * one TXQ at the moment. + */ + mbufq_init(&sc->sc_txq, RGE_TX_LIST_CNT); + + snprintf(sc->sc_tq_name, sizeof(sc->sc_tq_name), + "%s taskq", device_get_nameunit(sc->sc_dev)); + snprintf(sc->sc_tq_thr_name, sizeof(sc->sc_tq_thr_name), + "%s taskq thread", device_get_nameunit(sc->sc_dev)); + + sc->sc_tq = taskqueue_create(sc->sc_tq_name, M_NOWAIT, + taskqueue_thread_enqueue, &sc->sc_tq); + taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s", + sc->sc_tq_thr_name); + + TASK_INIT(&sc->sc_tx_task, 0, rge_tx_task, sc); + + callout_init_mtx(&sc->sc_timeout, &sc->sc_mtx, 0); + + return (0); +fail: + rge_detach(dev); + return (ENXIO); +} + +/** + * @brief flush the mbufq queue + * + * Again this should likely be per-TXQ. + * + * This should be called with the driver lock held. + */ +static void +rge_txq_flush_mbufs(struct rge_softc *sc) +{ + struct mbuf *m; + int ntx = 0; + + RGE_ASSERT_LOCKED(sc); + + while ((m = mbufq_dequeue(&sc->sc_txq)) != NULL) { + m_freem(m); + ntx++; + } + + RGE_DPRINTF(sc, RGE_DEBUG_XMIT, "%s: %d frames flushed\n", __func__, + ntx); +} + +static int +rge_detach(device_t dev) +{ + struct rge_softc *sc = device_get_softc(dev); + int i, rid; + + /* global flag, detaching */ + RGE_LOCK(sc); + sc->sc_stopped = true; + sc->sc_detaching = true; + RGE_UNLOCK(sc); + + /* stop/drain network interface */ + callout_drain(&sc->sc_timeout); + + /* Make sure TX task isn't running */ + if (sc->sc_tq != NULL) { + while (taskqueue_cancel(sc->sc_tq, &sc->sc_tx_task, NULL) != 0) + taskqueue_drain(sc->sc_tq, &sc->sc_tx_task); + } + + RGE_LOCK(sc); + callout_stop(&sc->sc_timeout); + + /* stop NIC / DMA */ + rge_stop_locked(sc); + + /* TODO: wait for completion */ + + /* Free pending TX mbufs */ + rge_txq_flush_mbufs(sc); + + RGE_UNLOCK(sc); + + /* Free taskqueue */ + if (sc->sc_tq != NULL) { + taskqueue_free(sc->sc_tq); + sc->sc_tq = NULL; + } + + /* Free descriptor memory */ + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: freemem\n", __func__); + rge_freemem(sc); + rge_free_stats_mem(sc); + + if (sc->sc_ifp) { + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: ifdetach/if_free\n", + __func__); + if (sc->sc_ether_attached) + ether_ifdetach(sc->sc_ifp); + if_free(sc->sc_ifp); + } + + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: sc_dmat_tx_desc\n", __func__); + if (sc->sc_dmat_tx_desc) + bus_dma_tag_destroy(sc->sc_dmat_tx_desc); + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: sc_dmat_tx_buf\n", __func__); + if (sc->sc_dmat_tx_buf) + bus_dma_tag_destroy(sc->sc_dmat_tx_buf); + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: sc_dmat_rx_desc\n", __func__); + if (sc->sc_dmat_rx_desc) + bus_dma_tag_destroy(sc->sc_dmat_rx_desc); + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: sc_dmat_rx_buf\n", __func__); + if (sc->sc_dmat_rx_buf) + bus_dma_tag_destroy(sc->sc_dmat_rx_buf); + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: sc_dmat_stats_buf\n", __func__); + if (sc->sc_dmat_stats_buf) + bus_dma_tag_destroy(sc->sc_dmat_stats_buf); + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: sc_dmat\n", __func__); + if (sc->sc_dmat) + bus_dma_tag_destroy(sc->sc_dmat); + + /* Teardown interrupts */ + for (i = 0; i < RGE_MSI_MESSAGES; i++) { + if (sc->sc_ih[i] != NULL) { + bus_teardown_intr(sc->sc_dev, sc->sc_irq[i], + sc->sc_ih[i]); + sc->sc_ih[i] = NULL; + } + } + + /* Free interrupt resources */ + for (i = 0, rid = 1; i < RGE_MSI_MESSAGES; i++, rid++) { + if (sc->sc_irq[i] != NULL) { + bus_release_resource(sc->sc_dev, SYS_RES_IRQ, + rid, sc->sc_irq[i]); + sc->sc_irq[i] = NULL; + } + } + + /* Free MSI allocation */ + if (sc->rge_flags & RGE_FLAG_MSI) + pci_release_msi(dev); + + if (sc->sc_bres) { + RGE_DPRINTF(sc, RGE_DEBUG_SETUP, "%s: release mmio\n", + __func__); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->sc_bres), sc->sc_bres); + sc->sc_bres = NULL; + } + + if (sc->sc_queues) { + free(sc->sc_queues, M_DEVBUF); + sc->sc_queues = NULL; + } + + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +#if 0 + +int +rge_activate(struct device *self, int act) +{ +#ifndef SMALL_KERNEL + struct rge_softc *sc = (struct rge_softc *)self; +#endif + + switch (act) { + case DVACT_POWERDOWN: +#ifndef SMALL_KERNEL + rge_wol_power(sc); +#endif + break; + } + return (0); +} +#endif + +static void +rge_intr_msi(void *arg) +{ + struct mbufq rx_mq; + struct epoch_tracker et; + struct mbuf *m; + struct rge_softc *sc = arg; + struct rge_queues *q = sc->sc_queues; + uint32_t status; + int claimed = 0, rv; + + sc->sc_drv_stats.intr_cnt++; + + mbufq_init(&rx_mq, RGE_RX_LIST_CNT); + + if ((if_getdrvflags(sc->sc_ifp) & IFF_DRV_RUNNING) == 0) + return; + + RGE_LOCK(sc); + + if (sc->sc_suspended || sc->sc_stopped || sc->sc_detaching) { + RGE_UNLOCK(sc); + return; + } + + /* Disable interrupts. */ + RGE_WRITE_4(sc, RGE_IMR, 0); + + if (!(sc->rge_flags & RGE_FLAG_MSI)) { + if ((RGE_READ_4(sc, RGE_ISR) & sc->rge_intrs) == 0) + goto done; + } + + status = RGE_READ_4(sc, RGE_ISR); + if (status) + RGE_WRITE_4(sc, RGE_ISR, status); + + if (status & RGE_ISR_PCS_TIMEOUT) + claimed = 1; + + rv = 0; + if (status & sc->rge_intrs) { + + (void) q; + rv |= rge_rxeof(q, &rx_mq); + rv |= rge_txeof(q); + + if (status & RGE_ISR_SYSTEM_ERR) { + sc->sc_drv_stats.intr_system_err_cnt++; + rge_init_locked(sc); + } + claimed = 1; + } + + if (sc->rge_timerintr) { + if (!rv) { + /* + * Nothing needs to be processed, fallback + * to use TX/RX interrupts. + */ + rge_setup_intr(sc, RGE_IMTYPE_NONE); + + /* + * Recollect, mainly to avoid the possible + * race introduced by changing interrupt + * masks. + */ + rge_rxeof(q, &rx_mq); + rge_txeof(q); + } else + RGE_WRITE_4(sc, RGE_TIMERCNT, 1); + } else if (rv) { + /* + * Assume that using simulated interrupt moderation + * (hardware timer based) could reduce the interrupt + * rate. + */ + rge_setup_intr(sc, RGE_IMTYPE_SIM); + } + + RGE_WRITE_4(sc, RGE_IMR, sc->rge_intrs); + +done: + RGE_UNLOCK(sc); + + NET_EPOCH_ENTER(et); + /* Handle any RX frames, outside of the driver lock */ + while ((m = mbufq_dequeue(&rx_mq)) != NULL) { *** 18573 LINES SKIPPED *** From nobody Mon Dec 15 13:53:18 2025 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 4dVM324jmTz6KlGc for ; Mon, 15 Dec 2025 13:53: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVM3217jkz3HK9 for ; Mon, 15 Dec 2025 13:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765806798; 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=uqRQxK5hRGNLQ11oLu6hA/qiAFAGGbvBjE15AxtJpko=; b=mH8ZlAv+3X/eVpFeP/ni9EiczNkSVyjXQm+p7dRa6SjNtvRL+6KOQW3nxYsNDG6veo6vZW TtE3mwyt0ibUsJY0gWdaeva/mVlYcHEmV68BQnW6a4xJJ6fGnAtdutCO33DNdEhw2zhj51 By00+w0hDy8gbCLLfwPyWN8FN06qz+l1QwcaVn/17c2SchPttBpKXjNKztFfbNf3X/yUD+ Yc6t3CKOek/+9pnOcBZvRIs5h/fg9RQ4UHebp8Z0Ee3liKbNAvj4CVJ1ANuVx1aeaOAflr QB/W+4OPfwoh5+iELBBLza4P5+eJQO15dcsQ4htKmo/B1olM+fqLN6a8v3g67Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765806798; 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=uqRQxK5hRGNLQ11oLu6hA/qiAFAGGbvBjE15AxtJpko=; b=RxHP+XBf1QGW1lnHi7cqqeBysZ6Y8Iqu5r12IuypgoEt8EcnaiQCDj+YLIwf+VWtDev+5A qkeIa1iiRYmbCeNaj+H2QXYDJGrhThXbDUdGEJNEqxbD6RbCn5xDWG8YlqxtV+oFOAWa5O DGNxBUgrdbMiqR28MLnarIXVYDFJHmi35CmhXgGdSVNRIl/RH/spYkSGncxFFdqB053ILi thbH0Dr8v8X8+haOglblF78BdP2GHdIH/rLcrCOcgHfKHIs1AxEBRXFuzZ2od2nsLWGdB+ 3otbrgp3ppzaMZisG0r8Pk2+GyDZDvGnwwpkpI9YVkWVrCK/0znsR8eul/GRwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765806798; a=rsa-sha256; cv=none; b=IHWjirXwX8PHZ+iXbOqqMAM82Cn/c4JWfvK4uWKaaT1+F6w5w8kDHfLpmxUFtVdbLiQOgt Fyalo+aX/vWWyMYR244lEVqMJGUTvhfHROXJ2nnUh9m7aGTH9jeW6wJ1l6U9Estb65LzrO T/GCt3c5OGPvEt0HWKXk9eTsABkMlCVrVVegXsh/YNlHsMRh7I8yyW00Zs33FJlFKEvrqi CJiY0NevCb7tJVKrX1QmAo5S/dEp8ImjL5I6fHZauS10MHpv0wsQI8fm6XwIO64sQv7AvL KRnwudGJKC7F0RwkQWjP7QUbp4NtWLbPfBVkIU7VWj889E6Mv31YlkYLIEgxJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVM320Wtfz6wH for ; Mon, 15 Dec 2025 13:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33a96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 13:53:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: c112ad75605c - main - options: describe WITH_IPFILTER_IPFS 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c112ad75605ccdfcb8bbce2f57b0e7a077f057f8 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 13:53:18 +0000 Message-Id: <694012ce.33a96.78a824c9@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=c112ad75605ccdfcb8bbce2f57b0e7a077f057f8 commit c112ad75605ccdfcb8bbce2f57b0e7a077f057f8 Author: Brooks Davis AuthorDate: 2025-12-15 13:50:56 +0000 Commit: Brooks Davis CommitDate: 2025-12-15 13:50:56 +0000 options: describe WITH_IPFILTER_IPFS Add a description for WITH_IPFILTER_IPFS. Fixes: 0ff0c19e7f70 ("ipfilter: Disable ipfs(8) by default") --- tools/build/options/WITH_IPFILTER_IPFS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/build/options/WITH_IPFILTER_IPFS b/tools/build/options/WITH_IPFILTER_IPFS new file mode 100644 index 000000000000..6822b70f443e --- /dev/null +++ b/tools/build/options/WITH_IPFILTER_IPFS @@ -0,0 +1,3 @@ +Enable building the +.Xr ipfs 8 +tool to save and restore IPFilter state tables. From nobody Mon Dec 15 13:53:19 2025 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 4dVM3356K0z6Kl1H for ; Mon, 15 Dec 2025 13:53: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVM3339vGz3HdP for ; Mon, 15 Dec 2025 13:53:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765806799; 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=UPhPN80eoK/cAehvApgdgQzgX5aa2zVKC1vjswQo9tQ=; b=gfLSO7EpBylMA/6HWrHGE6jAS+s+prZlXienblTRCbB8KqfK6j98FJebHGR6CiC+ubvhhj Bdsg6mBiAcEvt5T9SVHfAlV9xOXvhamWrEv3kbisqubeVVDbSweWKhVfukSGIVVEJ201fA geB6y7h6GVn589POEKm+BDraVGQnIjxuJ4lZ30iSIweL2nCEFHQUNf70adpYFK5Q3Zvu6W bSvfSCEY5H2wGM6VU8oT/n6jKF6AMiZDAlHWpUCMUVfr2qXG+dX0yDU8UBlCoABOpOIcSb 3hHWZc3qfvmJoC+W0u7px3u0oP0tg+aMfFhpypDUwJi5F3cUm69j0SGvLsaBVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765806799; 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=UPhPN80eoK/cAehvApgdgQzgX5aa2zVKC1vjswQo9tQ=; b=jYp5pV1lzvoc1o9AXf0PWmQauPnU4edAHReXYl6o2OX531/FPb+q2T8Ohh5egSu7rTkPN+ Yx1UUmGsByVAU5jIPBxwGrBf6q30FMy5b6YBuBldH6nWn9AJqg+zXxzC+Hh5CZZCOfXDOI MLlcCQAnL7sCfsZiV2ZhFzGsRXCxGYQ3xX+2Gg4QHOYg2eQdo9F4be6PKii9+d2W17h2I+ /3f8OgCsvN6adlDnC0Y6HYHIZyKJxkAQapTK5w/JF+kAoC8QwFIHeBw0T+ejMfYGiKBNwT 3SLMxiCUPrdU5etfunaa7LGzZKtvimKWcHHks6t2jXzvzPGeOtGTCxofcXouzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765806799; a=rsa-sha256; cv=none; b=AEJ1hqPPTgImErg/xkiwJnhXraYF4gpy9tEDoiok7HW/cpP5Au+ilonBqPO18yfTWS/kt0 Y+n2ec57Ie8hZiXklHKHCLUF8WVXGEt63deJq0hlTFyvFSr7nO4eZfeJuqqO74Eshlwx8z lKUr6MVPyO/nyL4VC3ry9Vv9yKgDtomC8Obz8cnEbu4A5JgijFswlbpKIdjbN/Igiwqizm SrO+LoQV443F/iVQ9Hr0Yknvw6Mjfc6dDkzPpm9yJ44XlQOxTpdPbS8FkY0mEA1fEaN0bC Dp1f/ROabV5hlwl3M8sfuRk+bsyaKCK/YLgT3b8o0ihTA3yUr0Gi65TPj7FsVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVM332SQNz79X for ; Mon, 15 Dec 2025 13:53:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 340b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 13:53:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b9b1262a8ef9 - main - src.conf.5: regen documenting WITH_IPFILTER_IPFS 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9b1262a8ef95857101e538145703894e3b880b7 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 13:53:19 +0000 Message-Id: <694012cf.340b7.28464b92@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b9b1262a8ef95857101e538145703894e3b880b7 commit b9b1262a8ef95857101e538145703894e3b880b7 Author: Brooks Davis AuthorDate: 2025-12-15 13:52:34 +0000 Commit: Brooks Davis CommitDate: 2025-12-15 13:52:34 +0000 src.conf.5: regen documenting WITH_IPFILTER_IPFS --- share/man/man5/src.conf.5 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index bab2c3d84abf..c56a13652a84 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 October 22, 2025 +.Dd December 15, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -838,6 +838,10 @@ The user still must set the variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER Do not build IP Filter package. +.It Va WITH_IPFILTER_IPFS +Enable building the +.Xr ipfs 8 +tool to save and restore IPFilter state tables. .It Va WITHOUT_IPFW Do not build IPFW tools. .It Va WITHOUT_IPSEC_SUPPORT From nobody Mon Dec 15 15:33:11 2025 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 4dVPGH3qWQz6Kt1D for ; Mon, 15 Dec 2025 15:33: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVPGH37RHz3ZsG for ; Mon, 15 Dec 2025 15:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765812791; 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=X0XNe6+2zsxeg+S3t3/mcbmEc7w/VSSNRaNqdfy33BY=; b=NQbfBVIt0P+blw3JXNzBaumMTC25kyHA1mjXu6KOL2wKy5BKY3LFnUcuDM2kGwUQ5qPcJk l/C2xSWzyykE8UAxMuipbTfky3rTv71JWh98pWMl+96Kg2OyaGfJA1YiO7G8ECddKrAZJf yTAIR3zO1Crvy3SHzP2p5Gmi3LUASnsBXxbAmfuPxnFo/DHvD5nFK3kIeKDBL9Fn8/92gV 8AknuW9Ue93ApnTRoM7nkkN6cokV+y4hZGU5UsaQiYceWh6qKXiPAb+9I3gpdioCgsHvrz +amshU15M+6R40cMlCVyffYMIuimA+PJThy60g+R9/XrIhi3iBskxGooN00BRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765812791; 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=X0XNe6+2zsxeg+S3t3/mcbmEc7w/VSSNRaNqdfy33BY=; b=YVzLAWfwm3lbwjuXvEvS1+qD/QWKUEqYwF1LIJrfIvHmci4OiPM7DDP3JkhL/jS3U7d358 KHThxNSHnOP3tb/YAYOO4X84L7xoqVcGjUpsfeiOiIXZEQzGIukFmNXKCkCZTpRybNQatw zR+6IHEOQ0S77Td246kbF8XMa2wTgHphbag+dEZJhJL1nqkPd/WPmz0sreoDLZIXAztNZy P0pgjhc5F+Rph211E/Y0ZPdFJ9qJ0xvLd4UtcmxgbaS1yi6SV0vD5yQOh3rDl0z0wjGViT OYR56h+ZUWXEUuDTgPp9knPrsdYPl/QBXw/vyWyWJ0fS4rIIeAy2oyyYtIFlQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765812791; a=rsa-sha256; cv=none; b=ycykfeZ/1PR6IuRN01DxpOgaZ78AWr1PX/t+B8dXcCznRDcDGlQ6QdmBTZFuuexwNFMaCp 5min7QZCTks7DWC8vX5Iy8S0r9w3Yf0LNLz+fzePMBYn7DBS2Dhe1vEqXOTr8uM6WAwYbd 1wSeAnkKeGiL7TNKHZaBjytaJssl9TGwx/vAlhdxTaDdP55GywAfeBAhSNpRHLi9NUU2Vu C/qkets9KzcMHJlDVpnCZ+ZXWstYQ54AAukrX7np/C6FP6z0h+1V5Fme6Se4FObJarN+4w ACEsBeqTOTIjMHa+Tt5+EMo6zJWBEeiI7NQwlYjRL+GVxjU9xsg7fhiQd6sOxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVPGH2hY9z952 for ; Mon, 15 Dec 2025 15:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d458 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 15:33:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: cae9ae66ad1b - main - aw_rtc: bump settime() delays 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: cae9ae66ad1b01e84597d03c436bc0579bd07fd4 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 15:33:11 +0000 Message-Id: <69402a37.3d458.526c64a1@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=cae9ae66ad1b01e84597d03c436bc0579bd07fd4 commit cae9ae66ad1b01e84597d03c436bc0579bd07fd4 Author: Mitchell Horne AuthorDate: 2025-12-15 15:29:21 +0000 Commit: Mitchell Horne CommitDate: 2025-12-15 15:29:21 +0000 aw_rtc: bump settime() delays There are delay loops, checking the BUSY status bit, before writing to the date or time registers. Each iteration contains a 1usec delay, for a maximum of 70 iterations. This is frequently not enough on the D1 platform, where the message is emitted: rtc0: could not set date, RTC busy Bump the loop delay to 10usecs each, and the maximum number of iterations to 150, for a maximum delay of 1.5msecs between each write of the register. In my testing this seems to be adequate. The loop variable is renamed for clarity/simplicity. Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54180 --- sys/arm/allwinner/aw_rtc.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/arm/allwinner/aw_rtc.c b/sys/arm/allwinner/aw_rtc.c index 4af57ab879e8..d3a73d98d86a 100644 --- a/sys/arm/allwinner/aw_rtc.c +++ b/sys/arm/allwinner/aw_rtc.c @@ -87,7 +87,7 @@ #define HALF_OF_SEC_NS 500000000 #define RTC_RES_US 1000000 -#define RTC_TIMEOUT 70 +#define RTC_TIMEOUT 150 #define RTC_READ(sc, reg) bus_read_4((sc)->res, (reg)) #define RTC_WRITE(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) @@ -321,7 +321,8 @@ aw_rtc_settime(device_t dev, struct timespec *ts) { struct aw_rtc_softc *sc = device_get_softc(dev); struct clocktime ct; - uint32_t clk, rdate, rtime; + uint32_t rdate, rtime; + u_int i; /* RTC resolution is 1 sec */ if (ts->tv_nsec >= HALF_OF_SEC_NS) @@ -335,12 +336,12 @@ aw_rtc_settime(device_t dev, struct timespec *ts) return (EINVAL); } - for (clk = 0; RTC_READ(sc, LOSC_CTRL_REG) & LOSC_BUSY_MASK; clk++) { - if (clk > RTC_TIMEOUT) { + for (i = 0; RTC_READ(sc, LOSC_CTRL_REG) & LOSC_BUSY_MASK; i++) { + if (i > RTC_TIMEOUT) { device_printf(dev, "could not set time, RTC busy\n"); return (EINVAL); } - DELAY(1); + DELAY(10); } /* reset time register to avoid unexpected date increment */ RTC_WRITE(sc, sc->conf->rtc_time, 0); @@ -352,21 +353,21 @@ aw_rtc_settime(device_t dev, struct timespec *ts) rtime = SET_SEC_VALUE(ct.sec) | SET_MIN_VALUE(ct.min) | SET_HOUR_VALUE(ct.hour); - for (clk = 0; RTC_READ(sc, LOSC_CTRL_REG) & LOSC_BUSY_MASK; clk++) { - if (clk > RTC_TIMEOUT) { + for (i = 0; RTC_READ(sc, LOSC_CTRL_REG) & LOSC_BUSY_MASK; i++) { + if (i > RTC_TIMEOUT) { device_printf(dev, "could not set date, RTC busy\n"); return (EINVAL); } - DELAY(1); + DELAY(10); } RTC_WRITE(sc, sc->conf->rtc_date, rdate); - for (clk = 0; RTC_READ(sc, LOSC_CTRL_REG) & LOSC_BUSY_MASK; clk++) { - if (clk > RTC_TIMEOUT) { + for (i = 0; RTC_READ(sc, LOSC_CTRL_REG) & LOSC_BUSY_MASK; i++) { + if (i > RTC_TIMEOUT) { device_printf(dev, "could not set time, RTC busy\n"); return (EINVAL); } - DELAY(1); + DELAY(10); } RTC_WRITE(sc, sc->conf->rtc_time, rtime); From nobody Mon Dec 15 15:36:52 2025 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 4dVPLY1wYgz6KtcV for ; Mon, 15 Dec 2025 15:36:53 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVPLX6Xgmz3bR9 for ; Mon, 15 Dec 2025 15:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765813012; 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=ckJo5QC7kEDYnS82GA6KAUO8u36FEQSaqy+hcS/xDpg=; b=npPFd74UDT4oLihWzcuCPFUhEuWuh4qTxibdzZ/W4w6n8399a1mz3yNTmSVtkSNQ19o6UQ +eni2lklzWbbuOS9VA3mnwrnhniLkx7BzOpaG5cXyaVmvq4JE8kLwpDwKJbVg7SzfNZtK3 XNFYEkYbsVsN+8tkmt5o5ffjCb1SfOKVb62mwpZCSgXhWnbSwdH5n6JPqQW2enRMP+Y4C0 guM+OwigKw5SHzimzkt25oaJgqj4iyWFMG5o6Yk8fNHLSHYjXpLhfX5qjq3MNlo7+IyHdP LRiTlO45Mc1mOSRaRxUXVNalNqhOrFxP9WZyzA6jDa9S49QT2jqPpQ6NUrFisA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765813012; 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=ckJo5QC7kEDYnS82GA6KAUO8u36FEQSaqy+hcS/xDpg=; b=ScgMZO0aF3QtpIf6eqjNMlJP7J/NkrdjAHaGfYYscckO2EUs8ZfTKiD5uUtShNor3fvsjP AwI74W2BElYly7BxHdwrhL0Ail3OeL2tYi5sut68ytYIGshqYbW0uuzz454IuDCuGTJN26 tFIpXkkH/7o81UirdEu9nhzbeDmVfmMdwLdKBZHPz7W4D+lgpsybVaxnGm76MDqF/9wYEr 3Sx6Lh1tU6WuhCoE1M3EZ2b6Umvv69zQZkr3tuczCP4RnOpnbKaGzVLPBOiUWe1oAzD1To 0V3aW2vQtC10dyDFoK46Wvjqn4XO4Lg9FkQwZ6aApWzz5m9UVj7ed3mE4z6G9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765813012; a=rsa-sha256; cv=none; b=lDDw4vhET8I1DLtAk4vISOWe2u8maiEF97UkP9bPnxUZUoOcPwWWxMS1oEe3Hb5AYyIe5P nWyUklIYW4AvcC9S3QqFjtGUOWBcOhCylnBF+mS7u2bM4DXKhj86YoJTdSgQHNZXQ/CyBv yR5C/ufWvG+95jA1OcZQIxnj1PwRHGHDy2CY+ZNiIY1+ToNfpta58BFtzQa8Kv8SFkhAX+ aYFgVraDKJlmF1DJff2eRS3sK+eq0luB7/l03efdtXD6DecborL9LXIuyVNUNU3ExvSoPT QOZk3c8DyfpghucQ8n59m0WDZVlE9VC8WO3Ju+r/JVSDgzf6ua0ke3+zujZuSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVPLX5d28z955 for ; Mon, 15 Dec 2025 15:36:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d495 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 15:36:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 43b07bdbc5d2 - main - Revert "devinfo: Add support for libxo" 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: 43b07bdbc5d24febc7a904d16f05f921c478eaa7 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 15:36:52 +0000 Message-Id: <69402b14.3d495.7a0523bf@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=43b07bdbc5d24febc7a904d16f05f921c478eaa7 commit 43b07bdbc5d24febc7a904d16f05f921c478eaa7 Author: John Baldwin AuthorDate: 2025-12-15 15:36:00 +0000 Commit: John Baldwin CommitDate: 2025-12-15 15:36:00 +0000 Revert "devinfo: Add support for libxo" This broke the human output formatting in several ways. This reverts commit 4cf5878d27ddc9d3ca3ed870f88112c3b4f6fb69. This reverts commit e8d6b58ef5a4afe0d155b6967c92d55f3bbd53fe. This reverts commit c759aca606cee8352c1d739bf7a762c8a2ed2012. PR: 291511 Reviewed by: imp, des Differential Revision: https://reviews.freebsd.org/D54196 --- usr.sbin/devinfo/Makefile | 2 +- usr.sbin/devinfo/devinfo.8 | 14 +-- usr.sbin/devinfo/devinfo.c | 216 ++++++++------------------------------------- 3 files changed, 39 insertions(+), 193 deletions(-) diff --git a/usr.sbin/devinfo/Makefile b/usr.sbin/devinfo/Makefile index 55b234f18363..f6506c176c9c 100644 --- a/usr.sbin/devinfo/Makefile +++ b/usr.sbin/devinfo/Makefile @@ -2,6 +2,6 @@ PACKAGE= devmatch PROG= devinfo MAN= devinfo.8 -LIBADD= xo devinfo +LIBADD= devinfo .include diff --git a/usr.sbin/devinfo/devinfo.8 b/usr.sbin/devinfo/devinfo.8 index c34713d367ff..15a6059c166f 100644 --- a/usr.sbin/devinfo/devinfo.8 +++ b/usr.sbin/devinfo/devinfo.8 @@ -34,13 +34,10 @@ .Nd print information about system device configuration .Sh SYNOPSIS .Nm -.Op Fl -libxo .Op Fl rv .Nm -.Op Fl -libxo .Fl p Ar dev Op Fl v .Nm -.Op Fl -libxo .Fl u Op Fl v .Sh DESCRIPTION The @@ -51,14 +48,7 @@ in the system, starting from the device. .Pp The following options are accepted: -.Bl -tag -width "--libxo" -.It Fl -libxo -Generate output via -.Xr libxo 3 -in a selection of different human and machine readable formats. -See -.Xr xo_options 7 -for details on command line arguments. +.Bl -tag -width indent .It Fl p Ar dev Display the path of .Ar dev @@ -83,8 +73,6 @@ This flag also displays verbose information about each device. .Sh SEE ALSO .Xr systat 1 , .Xr devinfo 3 , -.Xr libxo 3 , -.Xr xo_options 7 , .Xr devctl 8 , .Xr iostat 8 , .Xr pciconf 8 , diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 4163151ec840..43d88481d903 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -4,7 +4,6 @@ * Copyright (c) 2000, 2001 Michael Smith * Copyright (c) 2000 BSDi * All rights reserved. - * Copyright (c) 2024 KT Ullavik * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -41,18 +40,12 @@ #include #include #include - -#include #include "devinfo.h" static bool rflag; static bool vflag; -static int open_tag_count; -static char *last_res; static void print_indent(int); -static void print_kvlist(char *); -static char* xml_safe_string(char *); static void print_resource(struct devinfo_res *); static int print_device_matching_resource(struct devinfo_res *, void *); static int print_device_rman_resources(struct devinfo_rman *, void *); @@ -81,46 +74,7 @@ print_indent(int n) n = MIN((size_t)n, sizeof(buffer) - 1); memset(buffer, ' ', n); buffer[n] = '\0'; - xo_emit("{Pa:%s}", buffer); -} - -/* - * Takes a list of key-value pairs in the form - * "key1=val1 key2=val2 ..." and prints them according - * to xo formatting. - */ -static void -print_kvlist(char *s) -{ - char *kv; - char *copy; - - if ((copy = strdup(s)) == NULL) - xo_err(1, "No memory!"); - - while ((kv = strsep(©, " ")) != NULL) { - char* k = strsep(&kv, "="); - xo_emit("{ea:%s/%s} {d:key/%s}={d:value/%s}", k, kv, k, kv); - } - free(copy); -} - -static char -*xml_safe_string(char *desc) -{ - int i; - char *s; - - if ((s = strdup(desc)) == NULL) { - xo_err(1, "No memory!"); - } - - for (i=0; s[i] != '\0'; i++) { - if (s[i] == ' ' || s[i] == '/') { - s[i] = '-'; - } - } - return s; + printf("%s", buffer); } /* @@ -132,28 +86,20 @@ print_resource(struct devinfo_res *res) struct devinfo_rman *rman; bool hexmode; rman_res_t end; - char *safe_desc; rman = devinfo_handle_to_rman(res->dr_rman); hexmode = (rman->dm_size > 1000) || (rman->dm_size == 0); end = res->dr_start + res->dr_size - 1; - safe_desc = xml_safe_string(rman->dm_desc); - xo_open_instance(safe_desc); - if (hexmode) { - xo_emit("{:start/0x%jx}", res->dr_start); + printf("0x%jx", res->dr_start); if (res->dr_size > 1) - xo_emit("{D:-}{d:end/0x%jx}", end); - xo_emit("{e:end/0x%jx}", end); + printf("-0x%jx", end); } else { - xo_emit("{:start/%ju}", res->dr_start); + printf("%ju", res->dr_start); if (res->dr_size > 1) - xo_emit("{D:-}{d:end/%ju}", end); - xo_emit("{e:end/%ju}", end); + printf("-%ju", end); } - xo_close_instance(safe_desc); - free(safe_desc); } /* @@ -175,7 +121,7 @@ print_device_matching_resource(struct devinfo_res *res, void *arg) return(1); print_indent(ia->indent); print_resource(res); - xo_emit("\n"); + printf("\n"); } return(0); } @@ -188,7 +134,6 @@ print_device_rman_resources(struct devinfo_rman *rman, void *arg) { struct indent_arg *ia = (struct indent_arg *)arg; int indent; - char *safe_desc; indent = ia->indent; @@ -198,18 +143,13 @@ print_device_rman_resources(struct devinfo_rman *rman, void *arg) print_device_matching_resource, ia) != 0) { /* there are, print header */ - safe_desc = xml_safe_string(rman->dm_desc); print_indent(indent); - xo_emit("<{:description/%s}>\n", rman->dm_desc); - xo_open_list(safe_desc); + printf("%s:\n", rman->dm_desc); /* print resources */ ia->indent = indent + 4; devinfo_foreach_rman_resource(rman, print_device_matching_resource, ia); - - xo_close_list(safe_desc); - free(safe_desc); } ia->indent = indent; return(0); @@ -220,39 +160,20 @@ print_device_props(struct devinfo_dev *dev) { if (vflag) { if (*dev->dd_desc) { - xo_emit("<{:description/%s}>", dev->dd_desc); + printf(" <%s>", dev->dd_desc); } if (*dev->dd_pnpinfo) { - xo_open_container("pnpinfo"); - xo_emit("{D: pnpinfo}"); - - if ((strcmp(dev->dd_pnpinfo, "unknown") == 0)) - xo_emit("{D: unknown}"); - else - print_kvlist(dev->dd_pnpinfo); - - xo_close_container("pnpinfo"); + printf(" pnpinfo %s", dev->dd_pnpinfo); } if (*dev->dd_location) { - xo_open_container("location"); - xo_emit("{D: at}"); - print_kvlist(dev->dd_location); - xo_close_container("location"); + printf(" at %s", dev->dd_location); } - - // If verbose, then always print state for json/xml. - if (!(dev->dd_flags & DF_ENABLED)) - xo_emit("{e:state/disabled}"); - else if (dev->dd_flags & DF_SUSPENDED) - xo_emit("{e:state/suspended}"); - else - xo_emit("{e:state/enabled}"); } if (!(dev->dd_flags & DF_ENABLED)) - xo_emit("{D: (disabled)}"); + printf(" (disabled)"); else if (dev->dd_flags & DF_SUSPENDED) - xo_emit("{D: (suspended)}"); + printf(" (suspended)"); } /* @@ -262,20 +183,16 @@ static int print_device(struct devinfo_dev *dev, void *arg) { struct indent_arg ia; - int indent, ret; - const char* devname = dev->dd_name[0] ? dev->dd_name : "unknown"; + int indent; bool printit = vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DS_ATTACHED); if (printit) { indent = (int)(intptr_t)arg; print_indent(indent); - - xo_open_container(devname); - xo_emit("{d:devicename/%s}", devname); - + printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); print_device_props(dev); - xo_emit("\n"); + printf("\n"); if (rflag) { ia.indent = indent + 4; ia.arg = dev; @@ -284,13 +201,8 @@ print_device(struct devinfo_dev *dev, void *arg) } } - ret = (devinfo_foreach_device_child(dev, print_device, + return(devinfo_foreach_device_child(dev, print_device, (void *)((char *)arg + 2))); - - if (printit) { - xo_close_container(devname); - } - return(ret); } /* @@ -302,7 +214,6 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) struct devinfo_dev *dev; struct devinfo_rman *rman; rman_res_t end; - char *res_str, *entry = NULL; bool hexmode; dev = devinfo_handle_to_device(res->dr_device); @@ -310,38 +221,24 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) hexmode = (rman->dm_size > 1000) || (rman->dm_size == 0); end = res->dr_start + res->dr_size - 1; + printf(" "); + if (hexmode) { if (res->dr_size > 1) - asprintf(&res_str, "0x%jx-0x%jx", res->dr_start, end); + printf("0x%jx-0x%jx", res->dr_start, end); else - asprintf(&res_str, "0x%jx", res->dr_start); + printf("0x%jx", res->dr_start); } else { if (res->dr_size > 1) - asprintf(&res_str, "%ju-%ju", res->dr_start, end); + printf("%ju-%ju", res->dr_start, end); else - asprintf(&res_str, "%ju", res->dr_start); - } - - xo_emit("{P: }"); - - if (last_res == NULL) { - // First resource - xo_open_list(res_str); - } else if (strcmp(res_str, last_res) != 0) { - // We can't repeat json keys. So we keep an - // open list from the last iteration and only - // create a new list when see a new resource. - xo_close_list(last_res); - xo_open_list(res_str); + printf("%ju", res->dr_start); } dev = devinfo_handle_to_device(res->dr_device); if (dev != NULL) { if (dev->dd_name[0] != 0) { printf(" (%s)", dev->dd_name); - asprintf(&entry, "{el:%s}{D:%s} {D:(%s)}\n", - res_str, res_str, dev->dd_name); - xo_emit(entry, dev->dd_name); } else { printf(" (unknown)"); if (vflag && *dev->dd_pnpinfo) @@ -350,11 +247,9 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) printf(" at %s", dev->dd_location); } } else { - asprintf(&entry, "{el:%s}{D:%s} {D:----}\n", res_str, res_str); - xo_emit(entry, "----"); + printf(" ----"); } - free(entry); - last_res = res_str; + printf("\n"); return(0); } @@ -364,16 +259,8 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) int print_rman(struct devinfo_rman *rman, void *arg __unused) { - char* safe_desc = xml_safe_string(rman->dm_desc); - - xo_emit("<{:description/%s}\n>", rman->dm_desc); - xo_open_container(safe_desc); - + printf("%s:\n", rman->dm_desc); devinfo_foreach_rman_resource(rman, print_rman_resource, 0); - - xo_close_list(last_res); - xo_close_container(safe_desc); - free(safe_desc); return(0); } @@ -382,17 +269,12 @@ print_device_path_entry(struct devinfo_dev *dev) { const char *devname = dev->dd_name[0] ? dev->dd_name : "unknown"; - xo_open_container(devname); - open_tag_count++; - xo_emit("{:devicename/%s} ", devname); + printf("%s", devname); print_device_props(dev); if (vflag) - xo_emit("\n"); + printf("\n"); } -/* - * Recurse until we find the right dev. On the way up we print path. - */ static int print_device_path(struct devinfo_dev *dev, void *xname) { @@ -406,7 +288,7 @@ print_device_path(struct devinfo_dev *dev, void *xname) rv = devinfo_foreach_device_child(dev, print_device_path, xname); if (rv == 1) { - xo_emit("{P: }"); + printf(" "); print_device_path_entry(dev); } return (rv); @@ -415,26 +297,19 @@ print_device_path(struct devinfo_dev *dev, void *xname) static void print_path(struct devinfo_dev *root, char *path) { - open_tag_count = 0; - if (devinfo_foreach_device_child(root, print_device_path, - (void *)path) == 0) - xo_errx(1, "%s: Not found", path); + if (devinfo_foreach_device_child(root, print_device_path, (void *)path) == 0) + errx(1, "%s: Not found", path); if (!vflag) - xo_emit("\n"); - - while (open_tag_count > 0) { - xo_close_container_d(); - open_tag_count--; - } + printf("\n"); } static void __dead2 usage(void) { - xo_error( - "usage: devinfo [-rv]\n", - " devinfo -u [-v]\n", - " devinfo -p dev [-v]\n"); + fprintf(stderr, "%s\n%s\n%s\n", + "usage: devinfo [-rv]", + " devinfo -u [-v]", + " devinfo -p dev [-v]"); exit(1); } @@ -446,11 +321,6 @@ main(int argc, char *argv[]) bool uflag; char *path = NULL; - argc = xo_parse_args(argc, argv); - if (argc < 0) { - exit(1); - } - uflag = false; while ((c = getopt(argc, argv, "p:ruv")) != -1) { switch(c) { @@ -476,32 +346,20 @@ main(int argc, char *argv[]) if ((rv = devinfo_init()) != 0) { errno = rv; - xo_err(1, "devinfo_init"); + err(1, "devinfo_init"); } if ((root = devinfo_handle_to_device(DEVINFO_ROOT_DEVICE)) == NULL) - xo_errx(1, "can't find root device"); + errx(1, "can't find root device"); if (path) { - xo_set_flags(NULL, XOF_DTRT); - xo_open_container("device-path"); print_path(root, path); - xo_close_container("device-path"); } else if (uflag) { /* print resource usage? */ - xo_set_flags(NULL, XOF_DTRT); - xo_open_container("device-resources"); devinfo_foreach_rman(print_rman, NULL); - xo_close_container("device-resources"); } else { /* print device hierarchy */ - xo_open_container("device-information"); devinfo_foreach_device_child(root, print_device, (void *)0); - xo_close_container("device-information"); - } - - if (xo_finish() < 0) { - exit(1); } return(0); } From nobody Mon Dec 15 15:43:55 2025 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 4dVPVg1Lb6z6Kv62 for ; Mon, 15 Dec 2025 15:43: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVPVg0m64z3cFP for ; Mon, 15 Dec 2025 15:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765813435; 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=PHoiuDCkNTu9byjvdjMEenZv/BjN9m1vcxypkchnK60=; b=ad1bMMSPGzCymiE1Rki0FH9Ku79Dr0bfRz7a5MFoFbilFqLiHvIWxBglbq/6Djm3cRN7mO LoVfqob59IiLpuyOAkW3AYgCNnueSE0bwKi03nyJ8T4FlwuN4+AJVekAoMMYxI3CE/vszY NdXNL/9kRj42776DG7xxxe+u9pDxRGtaXQkce9gAE3wbe/LkixV0GP37zUliakomWezodD g89ll9FybrNA2kit5D31F/IQaozrNg1TIyM+G5Wf3Nf4rnQZHU8byYdMRs3LJmmWmArPph i+cXwYRYBEYZSUjv6QOoiWrtQ853p+Ah5S+tbO3WtFSU2jynlQ0DZ4e2dog0lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765813435; 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=PHoiuDCkNTu9byjvdjMEenZv/BjN9m1vcxypkchnK60=; b=vFgpoENhqAe0g4cdgFvEIvSq+dPbCb92tZ+wx9nsbx13Thf0n9AimAHZG6yXKz+cwMXC3Q NWS9xUTL9Xb3QA/HuIC1s9U5pPlvmBi4n6Ax3MOQ6MZeR4oegXzpCJCzv/ATkSQ8SJZaRy JT2Lczrh9YL08aoOJuRjxwczkeGYJ2XEK4MoRNqtOKTSMyt5GG7ouVuf9S47zPBJfuP08S pTWXoGgK67ypGfJieWVFwOwiCVgffOl7KD3kdaTor/cpUUZYEz0GmJsYFhCG/nMFni250U VG2p+gLiLtxALt6R+xAOIq31RUs/wjZ0ijAvZZiTwQLCburxS/vxD7ed1ROxmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765813435; a=rsa-sha256; cv=none; b=R2C+B+JrbaG4WFh/9ESrmGoJ9htQSLGGIosrQdFGy7SKc6+u4lbzD+k0CW377iUx/F0bEz 77X6Ni1g+VOYCQ97ViiRM+vV9LVws4taYwZx5v3imjhqCgsAVsCQoUR8btGv0RIcvfLrDq 6X9uWLE0LuOOHyhVdHt8y1bcq0VWVpJjeu+KH05zxM92vW8MYjkmQQ6iCXzPavmS6oHTG3 xr28aXFPPa99AwwGEr8mlachVje0juuOmDDEGCZK1xbiKPYTJUdGYHYEE1gGBHVpVQHoXl JIfQtVXdOL7k4BKlnTMjp7gn2m3CtkeeWPm2Vc1gvbQ9Kd0XC84+01mMz3a1sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVPVg0LxFz9mv for ; Mon, 15 Dec 2025 15:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e229 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 15:43:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: f1809eab82a7 - main - amd64/vmm.c: Fix an incorrect memory segment check in vm_iommu_{un}map 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1809eab82a796845f126b703c01d4a31ccf2193 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 15:43:55 +0000 Message-Id: <69402cbb.3e229.1c675894@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=f1809eab82a796845f126b703c01d4a31ccf2193 commit f1809eab82a796845f126b703c01d4a31ccf2193 Author: Bojan Novković AuthorDate: 2025-12-13 14:53:45 +0000 Commit: Bojan Novković CommitDate: 2025-12-15 15:41:57 +0000 amd64/vmm.c: Fix an incorrect memory segment check in vm_iommu_{un}map This change fixes two checks that conflated memory mapping and memory segment idenitifers. In both cases the code iterates over all memory mappings but passes the index to `vm_memseg_sysmem`, which is wrong. Fix this by passing the memory mapping's segment identifier instead. Differential Revision: https://reviews.freebsd.org/D54210 Reviewed by: markj Fixes: c76c2a19ae37 PR: 290920 --- sys/amd64/vmm/vmm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 2890e990633d..f3f9717129c9 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -652,10 +652,10 @@ vm_iommu_map(struct vm *vm) pmap = vmspace_pmap(vm_vmspace(vm)); for (i = 0; i < VM_MAX_MEMMAPS; i++) { - if (!vm_memseg_sysmem(vm, i)) + mm = &vm->mem.mem_maps[i]; + if (!vm_memseg_sysmem(vm, mm->segid)) continue; - mm = &vm->mem.mem_maps[i]; KASSERT((mm->flags & VM_MEMMAP_F_IOMMU) == 0, ("iommu map found invalid memmap %#lx/%#lx/%#x", mm->gpa, mm->len, mm->flags)); @@ -700,10 +700,10 @@ vm_iommu_unmap(struct vm *vm) sx_assert(&vm->mem.mem_segs_lock, SX_LOCKED); for (i = 0; i < VM_MAX_MEMMAPS; i++) { - if (!vm_memseg_sysmem(vm, i)) + mm = &vm->mem.mem_maps[i]; + if (!vm_memseg_sysmem(vm, mm->segid)) continue; - mm = &vm->mem.mem_maps[i]; if ((mm->flags & VM_MEMMAP_F_IOMMU) == 0) continue; mm->flags &= ~VM_MEMMAP_F_IOMMU; From nobody Mon Dec 15 16:25:19 2025 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 4dVQQR5D28z6KyPZ for ; Mon, 15 Dec 2025 16:25: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVQQR4cm7z3k4v for ; Mon, 15 Dec 2025 16:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765815919; 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=pPeFY0OLdx9EubYb1AolpxLtLvBRCTHwcs1IkWJlcKA=; b=hwbYzcl8j4GP2lsrp5wU8lEVmu9kxfrqg2twEongOMCYJOoCvQXjSvr15Tk6rXjEPQtLzZ jdcMZ2M2q+/HS10ilE5E3fv7JQopj/byxmdrLOUkoiWFFD7u53OJLMPFTE8hDUMH4CvdQ6 Vx7EELNpNj1XP6gMtNffrTupPozry4Py8cjl2hKTMk+gXu9FRrJbqfbZ5PhejYu20G4KPD m9D9ZhXXi3CPiLzk7OI1dZIQBzP6lQbijDywWViXBKXoKuLPf50GGBRtizIBUayXxSkxx0 3gR9RkQtcgd41wKRf/mEKj5KDK3S7QwGHpaip9SQHiB+0rlS4Akau06lj1jDVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765815919; 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=pPeFY0OLdx9EubYb1AolpxLtLvBRCTHwcs1IkWJlcKA=; b=eNuGqgI2lK2+tE4pZjKE0xxJAaQSukQgMXlEStcOOPfWAQa1Yl+q508Urp26GMoIj9fxFR t30aKipoU7poY4gZ04G44QRATWY/8qSP9gbAXwWDG1obKKWolug1Z4tmspBN115PPxdnyi ERMu4ugW7qorZBVyfWgFM4CNVJt0iH0WeFGJZcqF2jk34HKmnTzRwDApbTs6wBTzcuIxG5 XssvbQcTXuExmxZ2wha7jokkWPVMpUGmUkuMqliCXKQy+Sa0/TMdXAUVCl4ppI+ukFxFrj C72haRYbHv0a2ON3hKDPMCNI9vyvRhbi2ALUXsmjtp1Ikt8k5pvYc1Md89wwKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765815919; a=rsa-sha256; cv=none; b=n9F5rH4ziy4Z43/5+0/+4AMaT//lJwU69vQgqunzRBHthSkWLBAVC7VTFDlaunnUHXYBco mVyvptbZstmBH7gU8jsFmbWH9bHOoPRPHxwBXQUhDmq6MH/4tWxvA/RnwtGaoTnwJ9elgW c9/bIWVNbB8hwRhasYkuTYvib1ANR2kY/xZ4ZKotC5C+73NaPgHZJARetpJblRPJjutgih xFbrJDjONeMVjDjcM90RVlc3Z0DHapYQvTZVcZMiYPhzHTf+TAnly+RTXkCgnKglH2RRke tvHvfvVy9uCZpIuTsVuqFyNFrHXGBiK2GBTzpkJcWvQgAMl4OQeYf+XWWi7adw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVQQR4BtLzC3w for ; Mon, 15 Dec 2025 16:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 82ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 16:25:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: cdbc9b76ff49 - main - pf: fix min-ttl and set-tos for nat64 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: cdbc9b76ff4901816b5ebdca5d0b7e9947a015cb Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 16:25:19 +0000 Message-Id: <6940366f.82ed.6630a1b2@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cdbc9b76ff4901816b5ebdca5d0b7e9947a015cb commit cdbc9b76ff4901816b5ebdca5d0b7e9947a015cb Author: Kristof Provost AuthorDate: 2025-12-15 14:26:57 +0000 Commit: Kristof Provost CommitDate: 2025-12-15 16:24:34 +0000 pf: fix min-ttl and set-tos for nat64 If we have both af-to and min-ttl or set-tos on a single rule we didn't apply the new ttl or tos. That's because the scrub code still applied the change, but we subsequently create a new header for the new address family. That's done based on the ttl/tos saved in the struct pf_pdesc, which are the values from the incoming packet, before the scrub modification(s). Also update the struct pf_pdesc values when we update packets. Reported by: Marek Zarychta Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_norm.c | 6 ++-- tests/sys/netpfil/pf/nat64.sh | 69 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 53010222dd07..1362ce5387bb 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2244,14 +2244,14 @@ pf_scrub(struct pf_pdesc *pd) h->ip_ttl < pd->act.min_ttl) { u_int16_t ip_ttl = h->ip_ttl; - h->ip_ttl = pd->act.min_ttl; + pd->ttl = h->ip_ttl = pd->act.min_ttl; h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_ttl, h->ip_ttl, 0); } #ifdef INET6 /* Enforce a minimum ttl, may cause endless packet loops */ if (pd->af == AF_INET6 && pd->act.min_ttl && h6->ip6_hlim < pd->act.min_ttl) - h6->ip6_hlim = pd->act.min_ttl; + pd->ttl = h6->ip6_hlim = pd->act.min_ttl; #endif /* INET6 */ /* Enforce tos */ if (pd->act.flags & PFSTATE_SETTOS) { @@ -2261,6 +2261,7 @@ pf_scrub(struct pf_pdesc *pd) ov = *(u_int16_t *)h; h->ip_tos = pd->act.set_tos | (h->ip_tos & IPTOS_ECN_MASK); + pd->tos = h->ip_tos & ~IPTOS_ECN_MASK; nv = *(u_int16_t *)h; h->ip_sum = pf_cksum_fixup(h->ip_sum, ov, nv, 0); @@ -2270,6 +2271,7 @@ pf_scrub(struct pf_pdesc *pd) case AF_INET6: h6->ip6_flow &= IPV6_FLOWLABEL_MASK | IPV6_VERSION_MASK; h6->ip6_flow |= htonl((pd->act.set_tos | IPV6_ECN(h6)) << 20); + pd->tos = IPV6_DSCP(h6); break; #endif /* INET6 */ } diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh index 6631e3eca2c7..e2a87a6eee40 100644 --- a/tests/sys/netpfil/pf/nat64.sh +++ b/tests/sys/netpfil/pf/nat64.sh @@ -1179,6 +1179,74 @@ v6_gateway_cleanup() pft_cleanup } +atf_test_case "scrub_min_ttl" "cleanup" +scrub_min_ttl_head() +{ + atf_set descr 'Ensure scrub min-ttl applies to nat64 traffic' + atf_set require.user root +} + +scrub_min_ttl_body() +{ + pft_init + + epair=$(vnet_mkepair) + epair_link=$(vnet_mkepair) + epair_link_two=$(vnet_mkepair) + + ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad + route -6 add default 2001:db8::1 + + vnet_mkjail rtr ${epair}b ${epair_link}a + jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad + jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up + jexec rtr route add default 192.0.2.2 + + vnet_mkjail rtr2 ${epair_link}b ${epair_link_two}a + jexec rtr2 ifconfig ${epair_link}b 192.0.2.2/24 up + jexec rtr2 ifconfig ${epair_link_two}a 198.51.100.2/24 up + jexec rtr2 sysctl net.inet.ip.forwarding=1 + + vnet_mkjail dst ${epair_link_two}b + jexec dst ifconfig ${epair_link_two}b 198.51.100.1/24 up + jexec dst route add default 198.51.100.2 + + # Sanity checks + atf_check -s exit:0 -o ignore \ + ping6 -c 1 2001:db8::1 + atf_check -s exit:0 -o ignore \ + jexec rtr ping -c 1 192.0.2.2 + atf_check -s exit:0 -o ignore \ + jexec rtr ping -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore \ + jexec rtr ping -c 1 198.51.100.1 + + jexec rtr pfctl -e + pft_set_rules rtr \ + "pass" \ + "pass in on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from (${epair_link}a)" + + # Ping works with a normal TTL + atf_check -s exit:0 -o ignore \ + ping6 -c 1 64:ff9b::198.51.100.1 + + # If we set a TTL of two the packet gets dropped + atf_check -s exit:2 -o ignore \ + ping6 -c 1 -m 2 64:ff9b::198.51.100.1 + + # But if we have pf enforce a minimum ttl of 10 the ping does pass + pft_set_rules rtr \ + "pass" \ + "pass in on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from (${epair_link}a) scrub (min-ttl 10)" + atf_check -s exit:0 -o ignore \ + ping6 -c 1 -m 2 64:ff9b::198.51.100.1 +} + +scub_min_ttl_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "icmp_echo_in" @@ -1206,4 +1274,5 @@ atf_init_test_cases() atf_add_test_case "route_to" atf_add_test_case "reply_to" atf_add_test_case "v6_gateway" + atf_add_test_case "scrub_min_ttl" } From nobody Mon Dec 15 16:57:30 2025 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 4dVR7Z4j3Fz6L1Sr for ; Mon, 15 Dec 2025 16:57: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVR7Z2Xwcz3ngj for ; Mon, 15 Dec 2025 16:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765817850; 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=jZqu+QkdXyqpzYUCwVXeUj2Hq7ipFz+qe/uQjBAwQc8=; b=UvvVTrZmChyuR2mMZoUxs7GpqquykCetDKeJmI31NV4TgrO16ATrDCcCFwIRtxdTf0CEWg 76a7DM/idREQ7cg+ctR3zsIvwdeG2Fc6z2+DzI1CWCtjy4/H+OIDmEg9Oko1B9KgMQgRvn XGx6cPyVXVvMhRtOTqAMBMLamILZwmWF31xcm2wPdRQ4ZKMoskrjuMuJl3C2kYA0Kmo+pq ySBi5Tdc7hy0L/9A3VUKufqdEJMZwlcjAcyozyk7553h+Pl72y1ZN3DVp+reu+75tRyJPL j9ZQxCaZ5Ci7TIpTkiiEK1dqXstf9Gf1/4zMsjOIoJXPZUaEmTNla3H+F1D4Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765817850; 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=jZqu+QkdXyqpzYUCwVXeUj2Hq7ipFz+qe/uQjBAwQc8=; b=h8QwFxlF6CLtdxAcAmIblgCilhedH7zuDxBy5fN/qddwRGbR15xoy+emsQcfI/lu7r54uV ZSAsGHE9nrNiW8sE25j4/xrliGEE96oG1J7y4C6u+eO4C/3uKogITWZjhwjSAYkzlucxDp Va5Ps9ZqvPbh4yqScWex6mZoN3dudmZtO/mQJ6Jhhe6XELncduhRcjl64hU2KbfPwzdG5r P1JjAbuAKsuHSTmtYcCO4MrFxux3s26MVV03zgWaAkzQ5lLLc2x9FOPKrA0mwNatnhnry5 M0mzX56o8qoTJ9Xwf+qKuM40jA6UwUdJnwITo0fwdqoS9eztzP84bs2niLAfWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765817850; a=rsa-sha256; cv=none; b=pRErGkl8XsPTCQmQzmJ4+KY5eLE0zY/zpafEH0w4Ofxz9+1yOU6qw+OYHXIpyJS+qxRFxP pi5twOQV5DC5TBw4QjkJfAY3NksSBiBUT/b4Mdw0al/aH3qRBhwYpBguEsvXf4S7u3/6sp xddZDeCtX+/WH0r/8Dx+t3NmVML2NJBLPq+wYUVV14qIHWAorT68QpccCEzBrWHVx7abX7 yjJnDFErGn1VSxpuRT3LelyXWdCOezxcgA/N6HzgmLlMQ9gBZoY4oNZxEP7sPQn9w6L4PU 96kMuqTqMw6RJv42sBkKBMQjwCQzsl2IoNQ7zNN2ubRlZWMmz+Gig6+/HDKoMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVR7Z1KwyzC8h for ; Mon, 15 Dec 2025 16:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d7e0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 16:57:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Seyed Pouria Mousavizadeh Tehrani From: Gleb Smirnoff Subject: git: ac6a7f621668 - main - if_clone: don't overwrite dump_nl of an attaching cloner with 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac6a7f62166878038b9f8bd38a3fb1ff99ee8918 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 16:57:30 +0000 Message-Id: <69403dfa.d7e0.19300d08@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ac6a7f62166878038b9f8bd38a3fb1ff99ee8918 commit ac6a7f62166878038b9f8bd38a3fb1ff99ee8918 Author: Seyed Pouria Mousavizadeh Tehrani AuthorDate: 2025-12-15 16:53:47 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 16:53:47 +0000 if_clone: don't overwrite dump_nl of an attaching cloner with default Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D54190 --- sys/net/if_clone.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 066547ceeeb3..4bc04130da1e 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -535,11 +535,12 @@ ifc_attach_cloner(const char *name, struct if_clone_addreq *req) ifc->create_nl = req2->create_nl_f; ifc->modify_nl = req2->modify_nl_f; - ifc->dump_nl = req2->dump_nl_f; + if (req2->dump_nl_f != NULL) + ifc->dump_nl = req2->dump_nl_f; + else + ifc->dump_nl = ifc_dump_ifp_nl_default; } - ifc->dump_nl = ifc_dump_ifp_nl_default; - if (if_clone_attach(ifc) != 0) return (NULL); From nobody Mon Dec 15 17:03:35 2025 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 4dVRGh5WwQz6L20R for ; Mon, 15 Dec 2025 17:03: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVRGh3bMMz3xRd for ; Mon, 15 Dec 2025 17:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765818220; 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=K0FkhGPu/e3WWQEgk76TZZzP38XxHAxHHSjDjtfZHGo=; b=ohIIpk7NgbUMI8VfJDvl8E07Rym28uLj/+BkLz10LP8JJIzHDydLLXK2PsqD8FUdqBRPTl MF1WhFmvoQZMa9rTHSOWtmlYMlxuWBEe6SJxN6ohwtnRP7eRCoIzoa3edG0s2yZ9srFnIF lr9O5BiSFkRXOw6C3gep2torfZcjHuDTESz0Y8N56jLO7rOI7PuSqqNQiNlVOeS7ASZAUZ o8EqUtOa1yhfEIt5T6r/jYv1oKRDsAwkLMe28/uhiCazbohpYQTT8l0/5dFi4iD8vMb0wQ Xwn8qo8ue1W45KVOeg6OcT/R50NcNWyKNSl+fqZd8zTZQSYTmkjp+XvMQwpAUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765818220; 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=K0FkhGPu/e3WWQEgk76TZZzP38XxHAxHHSjDjtfZHGo=; b=HwOiP/6NfKXfLe13i86FdPLRT066bWJiEY0lUMi4BjUSvHrUkD41WaudUCvaZndJfX+XPh i/mlO2RKavyYTifZFRA/IkOHX4lYt9CEfFLdEWL8N31qDTc3pvqm0N1dVfVmf2CECtArfi MN9NFOjVLXZQvTJPfEwW3OJ4bb9oAqMkJjEJJ3WT6+uDd9Vm+L9e/Lnifw/jCxkc3dIwDK R3SnpL0MOklNPmU9XKdRgWtVXHi0S/PQsYJMjG3S505NvzroFXGZc2qUhdyHL1y/Kxi97p Epw2sVC2sebUrnAEa9fiaFXMjLouzGB4Xrlt+kYlkyPx8qs0Nz+BZxHZjAe4xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765818220; a=rsa-sha256; cv=none; b=fOlheROXfA6SiLIiRrwXLPC8uVn5ORwgGidgMOGxYEBYcGZNJp6cPkVElVJ4XtNStdO3Hi 496abkzf4tEetG9Gt6VSbUKvRhjD/N7buEDnqUx+nE2EsJUy4B24WH4YL2p1yZz08Uni+T JpsRZ8iZYli7Fyy4sMpeoFEN1EYizVl8mgo6kEJpV0pSbIEJYEitaAMe2gwTWB7h1/C4bk XVex0CI1tn+OI97vcCcDUf3zHW+aXxF4if+pkGLH2LI56n/ljjnXHqmtvsoLZLU/QRBTL+ dvEJWa/X7eTAFu/dW03SkaBQLp+HL1Cb4K5+vfytXRwhbDecesGhds+rC6h/5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVRGh38QHzD14 for ; Mon, 15 Dec 2025 17:03:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e0ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 17:03:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Martin Filla From: Mitchell Horne Subject: git: 1291523fde5f - main - dtb: build Radxa Cubie A5E DTB 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: 1291523fde5f953f1c12b7ab4e15bc8b4cd4c3d2 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 17:03:35 +0000 Message-Id: <69403f67.e0ac.1e5d7bdc@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1291523fde5f953f1c12b7ab4e15bc8b4cd4c3d2 commit 1291523fde5f953f1c12b7ab4e15bc8b4cd4c3d2 Author: Martin Filla AuthorDate: 2025-12-11 20:40:10 +0000 Commit: Mitchell Horne CommitDate: 2025-12-15 17:03:08 +0000 dtb: build Radxa Cubie A5E DTB Reviewed by: mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/1916 --- sys/modules/dtb/allwinner/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/modules/dtb/allwinner/Makefile b/sys/modules/dtb/allwinner/Makefile index 2666e786a9df..7fdfe5402402 100644 --- a/sys/modules/dtb/allwinner/Makefile +++ b/sys/modules/dtb/allwinner/Makefile @@ -54,7 +54,8 @@ DTS= \ allwinner/sun50i-h5-orangepi-pc2.dts \ allwinner/sun50i-h5-nanopi-neo2.dts \ allwinner/sun50i-h6-pine-h64.dts \ - allwinner/sun50i-h6-pine-h64-model-b.dts + allwinner/sun50i-h6-pine-h64-model-b.dts \ + allwinner/sun55i-a527-cubie-a5e.dts DTSO= sun50i-a64-mmc0-disable.dtso \ sun50i-a64-mmc1-disable.dtso \ From nobody Mon Dec 15 17:09:45 2025 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 4dVRPj5fXpz6L2jC for ; Mon, 15 Dec 2025 17:09: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVRPj47Xsz453D for ; Mon, 15 Dec 2025 17:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765818585; 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=xU1mV46WT7JlGrjd4hHvfkd9jLHfOheawH4AA+Cibec=; b=M3K6CA/+cxzGyOKQsKwrUlpLa/Diox5zQ9CzwCru7yESuXOPyxM+J+SXzOdKE1vJa3wxf+ XKCE5U0RlX0b4633wdoyQ766PNy3qc6nzLNTe7QAbJP/wSwSsvsP1xbAK7L8MxJyCWg7x6 oecJw3/q44miZRLTpbAqCUV2PnzWS6tdidHqxibhmj6iW4T5TnpFwHyf11QPSuqzRAzywL VP5XmdMEk2TSa1lux8Vj+FiSMp5OG6ap61wfhC85LjjtHQHs7OOsbqCjxSSZaukCNeaiiX V8YJVHLmItw3ZKd/QJQCVh/xrMDMMBjMMoMKjl7TbPbRknvNjPxPRes2Lb7uCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765818585; 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=xU1mV46WT7JlGrjd4hHvfkd9jLHfOheawH4AA+Cibec=; b=nU3HO9AvhxqbmWFHLpuUDTfYHeWgYBv5jdmU3fJiGNxPHWJk3fb29AqAZwBAbv0ir9JOx5 2ctvd4rie0POVG4Clv3tjXTFRF44hOH30MDGvvl4iIhNivCREYKi8DbT+pIcpCnG5/vsKa +wyZfpffPvdhJiSKmlA7HCPkzpk95n6/jXFntOvhfJXSrh2AgsCoKQtoY2N00eqwMVzn7K mj5JENpTh53UML0qt1eWq0bNbT9x+F5plGWBDpWEYOUbpE3EugaVeWmyvyGE/s6M0HA0x4 ULL5GLwMDL/JH/+04GIWBd8MBWwzekCAwDfNCF40Eiuv/CBOr1z6TXj409g/uA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765818585; a=rsa-sha256; cv=none; b=TQYjqatcsc7ydj81za7Y5GY3Yhizwk/BKiCBN0PfPZcrwu2yuR+AV8tN1Lw2PYR0Tt8PLf TP2kRCiMXgvVCCWgZAYdOaoEm7ywGRzgYhTrUr5+yy0Rbq4jzM2gi9TUCseUhuBQ7ApfA2 olTd0DBun/KV7cWrrG3x8CITwC5IS9f57kX4MlOZkFc8yPRzRDaqnHmS4lI23ZVb21lfye QYUlfQ1K4vAVjT+COxbqPyZJAtgV6kLBYU3PLcen3sWA9q/xbfnHtr/gL5ZUK5dRgvowvz sczLELAE/ZXzesf1dHwEh4ILV9lYC9+Zs6M4ihf17cFmNfky7J13IrUpOw0lCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVRPj3WbBzCvf for ; Mon, 15 Dec 2025 17:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id de33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 17:09:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 7ff3b13f12d9 - main - lacp: Sort port map by interface index 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: 7ff3b13f12d97b7f67f09ecb9141e6dbaa1ad007 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 17:09:45 +0000 Message-Id: <694040d9.de33.6e6bda5c@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=7ff3b13f12d97b7f67f09ecb9141e6dbaa1ad007 commit 7ff3b13f12d97b7f67f09ecb9141e6dbaa1ad007 Author: Andrew Gallatin AuthorDate: 2025-12-15 16:52:48 +0000 Commit: Andrew Gallatin CommitDate: 2025-12-15 17:08:59 +0000 lacp: Sort port map by interface index This makes it easier to reason about system topology, and to potentially map applications to NIC queues by (ab)using the mbuf flowid to select egress NIC and queue in a predictable fashion. Differential Revision: https://reviews.freebsd.org/D54053 Reviewed by: glebius, kbowling Sponsored by: Netflix --- sys/net/ieee8023ad_lacp.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c index 77b5a5d53a67..281d16bc6c05 100644 --- a/sys/net/ieee8023ad_lacp.c +++ b/sys/net/ieee8023ad_lacp.c @@ -1036,6 +1036,18 @@ lacp_select_active_aggregator(struct lacp_softc *lsc) } } +static int +lacp_pm_compare(const void *p1, const void *p2) +{ + struct lacp_port *const *a = p1; + struct lacp_port *const *b = p2; + int left, right; + + left = (*a)->lp_ifp->if_index; + right = (*b)->lp_ifp->if_index; + return ((left > right) - (left < right)); +} + /* * Updated the inactive portmap array with the new list of ports and * make it live. @@ -1079,12 +1091,24 @@ lacp_update_portmap(struct lacp_softc *lsc) #ifdef NUMA for (i = 0; i < MAXMEMDOM; i++) { - if (p->pm_numa[i].count != 0) + if (p->pm_numa[i].count != 0) { p->pm_num_dom++; + if (p->pm_numa[i].count > 1) { + qsort(&p->pm_numa[i].map[0], + p->pm_numa[i].count, + sizeof(p->pm_numa[i].map[0]), + lacp_pm_compare); + } + } } #endif speed = lacp_aggregator_bandwidth(la); } + + if (p->pm_count > 1) { + qsort(&p->pm_map[0], p->pm_count, + sizeof(p->pm_map[0]), lacp_pm_compare); + } sc->sc_ifp->if_baudrate = speed; EVENTHANDLER_INVOKE(ifnet_event, sc->sc_ifp, IFNET_EVENT_UPDATE_BAUDRATE); From nobody Mon Dec 15 17:24:11 2025 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 4dVRkM2tBxz6L3mv for ; Mon, 15 Dec 2025 17:24: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVRkM2Nyjz46Cr for ; Mon, 15 Dec 2025 17:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765819451; 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=yg+f81r5SejoqYR6C/NPPh1iSVCCjbzBkggW3+ngBbY=; b=WfgkD1le/gsDmHQ2B6m2LOs2w7exDOpa9tf1AXwPm7cVDFsyoLvQhqyaf3b7GI5wWIuu68 9w7H2blNo42OqvRekfsNL2YovLuZhKKbmFSJ9TUxmaS1foQJerEoCVmcND/I/5kVlUboVL +nzmg4XaJ1uxRQFx5p6n33hIhNjuvLNWVpXkSgrV028RG8LPI+U7pmM0hE2twUNLMmMadh +YMordosLmGGZoQ3qcPGXuD1exevYWSDRvVbxaiCs1qrKv4SCvWvxlsAoaB9tms3zxhNt8 XBDMBNl3Pvz4r+jTmASpiQKOP9OYcS1Sq4doXTICum1lq//QJZihu1qcMMexVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765819451; 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=yg+f81r5SejoqYR6C/NPPh1iSVCCjbzBkggW3+ngBbY=; b=sAatnO5shGr2olrI0vlaItDxzFrQ++eSVJK3uN3YhC+YXPWrjIUQ6/3FmmOJ9NtZApxmAf Qty0cRt7xYlX4+8dTYJhdXO8AmB8G6LgbgUEqd7oknaMfc78vuAc1867yp//VJcQ8778Ai LDFxqtOxZSgWPPOcd0ehdVzF07vXOGCAgpfOpHnvzM2CpxMOVRHFzBo3E9WUrCR78GFlDZ 2RwocVqh5d90wDLIaR3Bf4elRYsZnr61wgUXjIraLDMssuFmhV3a7CvOcsnQOAOTjDze7c 3IYzatX20lCU1uy+COecptrOjYH4tRBnYEVR97peFxvMgCgCZhc6oeNa7Nr8bA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765819451; a=rsa-sha256; cv=none; b=a1HsAICB8m0VnYmRjLsNhYUuBPR7Njyz9V/JWvnX8lTPeyFpy/1zN5W9DoaBOoHPzUdI/m /SmXm2x1tElLrdIM7j+n3JE6tKU9EVJcRExpe6MmeosQ5EzFitnVlIk9F0saH9gaUiG28f dkGcrTFxDgMmzMz1BjL34MEQLoVk6TLpGLkXjVY59sdzXfUStykjP9dQW4XqyEfQk3jUvp pvJA0LFGiSw8aryamu5I4zmkVFw3wenpxmoZMWmecci1dgTxD84NPX5dhm70LlumUkvAQi jLvua+aykqCZN5Kw+mU5KOpCdfvyBva2EWqAjUVgEHnLo1xkYThDQIah3jAdyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVRkM1jgrzDWv for ; Mon, 15 Dec 2025 17:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2109b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 17:24:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Hall Subject: git: 2059040493fb - main - committers-src: add myself (jrhall@) 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: jrhall X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2059040493fb3f76cd1f06350fd4534a71a1f83c Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 17:24:11 +0000 Message-Id: <6940443b.2109b.489e92e1@gitrepo.freebsd.org> The branch main has been updated by jrhall: URL: https://cgit.FreeBSD.org/src/commit/?id=2059040493fb3f76cd1f06350fd4534a71a1f83c commit 2059040493fb3f76cd1f06350fd4534a71a1f83c Author: John Hall AuthorDate: 2025-11-26 16:50:09 +0000 Commit: John Hall CommitDate: 2025-12-15 17:21:10 +0000 committers-src: add myself (jrhall@) Add jrhall@ (myself) as new src committer with imp@ as mentor. Reviewed By: imp (mentor) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D53934 --- share/misc/committers-src.dot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 8eedf6bb8abb..946d04b7aecc 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -241,6 +241,7 @@ johalun [label="Johannes Lundberg\njohalun@FreeBSD.org\n2019/01/19"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2011/01/21"] +jrhall [label="John Hall\njrhall@FreeBSD.org\n2025/11/18" jrtc27 [label="Jessica Clarke\njrtc27@FreeBSD.org\n2020/01/23"] jtl [label="Jonathan T. Looney\njtl@FreeBSD.org\n2015/10/26"] julian [label="Julian Elischer\njulian@FreeBSD.org\n1993/04/19"] @@ -627,6 +628,7 @@ imp -> jfree imp -> joe imp -> johalun imp -> jon +imp -> jrhall imp -> keichii imp -> kibab imp -> mb From nobody Mon Dec 15 17:47:59 2025 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 4dVSFq5KlSz6L53P for ; Mon, 15 Dec 2025 17:47: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVSFq4pwxz4BHN for ; Mon, 15 Dec 2025 17:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765820879; 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=vgd+EcQmsK7Bb0U+6Ac/zPxPqQZ12FhVWWXbUCobsJU=; b=iQg1Jne1kfGXTinZkTtf3MqrDZkrrAkZ4ylwPly61DcFSiel/unO60JfFK1TgBLdejKSYA hoe8DzY0cS2b/Pu9TtDes+OEKvjXOVqRHLj2+mQp40+0azF8Zg2c19d+B0FdOitJIQ5K6p T/rqtDqzqwYTSSgnIBtnW8obx/MA1WYTFEd9MYdJ6iSYCFzP18tUg0BMjf+PEw2mI2tVwb 4yem93dbnAiBgyGuxPUMBDlgmpNxTKhLGNVGvzmRH1ANQcubasACczZ7cxlAgHL/BuckRX jRa8QXtx8J9SitKLXHexj2oTRL3/LLrMKHMgQO9JBpMLvS0JofR+ezP9cgJrhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765820879; 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=vgd+EcQmsK7Bb0U+6Ac/zPxPqQZ12FhVWWXbUCobsJU=; b=TJsCs9c+65FJYhgwgc1Vj+hxUfmI2oegmyhsyQsqE6suO7EkcAxaYEB8QDTFXQj8MEWikD NJmtnlaGQaqXeIhltcOoo9AVjctnnb2dF1LwTQuCCRYv8pWYZIqsmLcOiwj3zpoCTCGYz0 54iwuWvYsiPCoEQPBWslbzFvkJZfLlvyX77Xc2ZcNoBcwCXzObJYlwVnO6xyS+pihV4NqC 7Z8ETW1DNk3dbPai+0r8e2T1lyNuIlBZoe9rBqscSgRCC6x5QHzwQAZNjd1aZUZosuxFYN dcFUVwpXwXDb1jl/8+It1gJ8Mg/I8csDHGOJX3AQNRS1nI11SDKRq8Nt6/f1qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765820879; a=rsa-sha256; cv=none; b=Sn3Pn1ihxVynYA+LWiVEKF9DNxc+SwAWYVVmsl8mr2WE9I28SzfS48lIjVTOMGZ3XqXhmo tC2iWIdbUS0WaXgMms5+8bdq6i8mAqvYErgDlbg4uRlIxqNDGiU1gNVYUiZBsBYkl+ONXf PFLGUpPCelNDGgpPeTYTSX6k0w2f3OsazXuF9yDdt239c+BYtRBhNtVgL82GlLEEwgxlEU oFhcKKg9riIeft293w6xg9YmuU5ETTbkiX1niCHUgB9M7LS0KHBGYTpqcmK9FI6c1lwwXY oHFceTy04IvF7J0y68rSAOJJvWCY8mz0nlnorzJM1dtq6EUTVJ24nO5NWJWJ4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVSFq4676zTqP for ; Mon, 15 Dec 2025 17:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2007f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 17:47:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: 9d56f84df5a6 - main - remove sys/dts/arm/socfpga_*_sdmmc.dts 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: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d56f84df5a60e012c79e694284de7d58ad0b029 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 17:47:59 +0000 Message-Id: <694049cf.2007f.90a9455@gitrepo.freebsd.org> The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=9d56f84df5a60e012c79e694284de7d58ad0b029 commit 9d56f84df5a60e012c79e694284de7d58ad0b029 Author: Oskar Holmlund AuthorDate: 2025-12-15 17:47:17 +0000 Commit: Oskar Holmlund CommitDate: 2025-12-15 17:47:17 +0000 remove sys/dts/arm/socfpga_*_sdmmc.dts These two files are broken due to Linux 6.5 DTS import. Both of these boards have support in Linux DTS tree, please use these DTS instead. Removed and not fixed because of commit 949efdaa1db8 Approved by: br, manu (mentor) Differential revision: https://reviews.freebsd.org/D54216 --- sys/dts/arm/socfpga_arria10_socdk_sdmmc.dts | 118 -------------------------- sys/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts | 72 ---------------- 2 files changed, 190 deletions(-) diff --git a/sys/dts/arm/socfpga_arria10_socdk_sdmmc.dts b/sys/dts/arm/socfpga_arria10_socdk_sdmmc.dts deleted file mode 100644 index b8ddf4dfafbc..000000000000 --- a/sys/dts/arm/socfpga_arria10_socdk_sdmmc.dts +++ /dev/null @@ -1,118 +0,0 @@ -/*- - * Copyright (c) 2017 Ruslan Bukin - * All rights reserved. - * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 - * ("CTSRD"), as part of the DARPA CRASH research programme. - * - * 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. - */ - -/dts-v1/; -#include "socfpga_arria10_socdk.dtsi" - -/ { - model = "Altera SOCFPGA Arria 10"; - compatible = "altr,socfpga-arria10", "altr,socfpga"; - - /* Reserve first page for secondary CPU trampoline code */ - memreserve = < 0x00000000 0x1000 >; - - soc { - /* Local timer */ - timer@ffffc600 { - clock-frequency = <200000000>; - }; - - /* Global timer */ - global_timer: timer@ffffc200 { - compatible = "arm,cortex-a9-global-timer"; - reg = <0xffffc200 0x20>; - interrupts = <1 11 0x301>; - clock-frequency = <200000000>; - }; - }; - - chosen { - stdin = "serial1"; - stdout = "serial1"; - }; -}; - -&uart1 { - clock-frequency = < 50000000 >; -}; - -&mmc { - status = "okay"; - num-slots = <1>; - cap-sd-highspeed; - broken-cd; - bus-width = <4>; - bus-frequency = <200000000>; -}; - -&i2c1 { - lcd@28 { - compatible = "newhaven,nhd-0216k3z-nsw-bbw"; - reg = <0x28>; - }; -}; - -&usb0 { - dr_mode = "host"; -}; - -&qspi { - status = "okay"; - - dmas = <&pdma 24>, <&pdma 25>; - dma-names = "tx", "rx"; - - flash0: n25q00@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "n25q00aa"; - reg = <0>; - spi-max-frequency = <100000000>; - - m25p,fast-read; - cdns,page-size = <256>; - cdns,block-size = <16>; - cdns,read-delay = <4>; - cdns,tshsl-ns = <50>; - cdns,tsd2d-ns = <50>; - cdns,tchsh-ns = <4>; - cdns,tslch-ns = <4>; - - partition@qspi-boot { - label = "boot"; - reg = <0x0 0x2720000>; - }; - - partition@qspi-rootfs { - label = "rootfs"; - reg = <0x2720000 0x58E0000>; - }; - }; -}; diff --git a/sys/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts b/sys/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts deleted file mode 100644 index 4a08328847a4..000000000000 --- a/sys/dts/arm/socfpga_cyclone5_sockit_sdmmc.dts +++ /dev/null @@ -1,72 +0,0 @@ -/*- - * Copyright (c) 2017 Ruslan Bukin - * All rights reserved. - * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 - * ("CTSRD"), as part of the DARPA CRASH research programme. - * - * 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. - */ - -/* /dts-v1/; */ -#include "socfpga_cyclone5_sockit.dts" - -/ { - model = "Terasic SoCkit"; - compatible = "altr,socfpga-cyclone5", "altr,socfpga"; - - /* Reserve first page for secondary CPU trampoline code */ - memreserve = < 0x00000000 0x1000 >; - - soc { - /* Local timer */ - timer@fffec600 { - clock-frequency = <200000000>; - }; - - /* Global timer */ - global_timer: timer@fffec200 { - compatible = "arm,cortex-a9-global-timer"; - reg = <0xfffec200 0x20>; - interrupts = <1 11 0xf04>; - clock-frequency = <200000000>; - }; - }; - - chosen { - stdin = "serial0"; - stdout = "serial0"; - }; -}; - -&mmc0 { - bus-frequency = <25000000>; -}; - -&uart0 { - clock-frequency = <100000000>; -}; - -&uart1 { - status = "disabled"; -}; From nobody Mon Dec 15 19:41:54 2025 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 4dVVnT58zTz6LDsG for ; Mon, 15 Dec 2025 19:42:05 +0000 (UTC) (envelope-from ktullavik@gmail.com) Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 4dVVnT37ZGz3Zk3 for ; Mon, 15 Dec 2025 19:42:05 +0000 (UTC) (envelope-from ktullavik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5957d7e0bf3so3685492e87.0 for ; Mon, 15 Dec 2025 11:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765827718; x=1766432518; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=YOe+w1rnpHhq25JQRj5uo6qUjww69fOFkECHeR9YdRQ=; b=hu3sxbZq8I1qhwW9Ng9mxaZBkU1v1XAcnVjxgaaEZGSaPdyECPkQRuFKUbR7M99E/b R1WZpC2QtTe93Ol/Vb1/9w5Mr0va47L14rhHFjK3fJFdX3Ks+b9zjClrUekU5fXfaJvK RoWTkQ2cz1tLTEXfA6SYigY/KdNGqSXouNsyNsBo9DUjmO42Avcb71izJEIOER5Irru8 cyhiJu3ZGJxWjxquCELbC283o20mf8A2W3Gxs6gjQjNXdwjED4lWRaRAO26ze3qIP91j uVfI1PUDHMIHfbxw5lSfYrWFfrz7zb8/N2j/+D8lNWTveOls7F77qIBrDxWIGthAQ5l1 8cAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765827718; x=1766432518; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YOe+w1rnpHhq25JQRj5uo6qUjww69fOFkECHeR9YdRQ=; b=RCzN6RNjQx4yEVgaauMpCTIUf5Z0BH6GqLdnYTfoCsY2EVA2bulbiXL+PvB95stwuZ 6LYnvm381Pv2ejSbwSJv03pyNGpnIMyHN72ZFw/mQzg7RQ8fWvbRPydn7AsAiXBDtjeo LOiuBWxRtBC6nVC7s2e7v5KdX2Fa3jzSqPCcNLFbenDqFilIwAdds7MpyhwQSW7+3EHs xpKvGp+OB/LwmHgnvo/4RuU/QYe3rLDze5JcNYAh3X2YNkxeapXhj4OkB7/b1O3+8ZC9 9iomLc59n56U6Le7aayIgtA8e55nWimG9Hjxv5FfUZL8csCV1RXng/rlKrfSEmP5qEDU D9LA== X-Forwarded-Encrypted: i=1; AJvYcCVPOmH/GlP4u8UbpnT7bD3kOcoBEIuowA+iQlvWF4KiEzEaqdjFFQrOUsIqqRAoZq2w3Vq5VRWry60TMAyFCChvAcbwYg==@freebsd.org X-Gm-Message-State: AOJu0YzCcG+zRYb8a+KL1Txysb95Aq1tTjSRylTWP2D6boRTtLxVt+MK JUKaMDebBZ17KEHdyRfNogknJzdfsZNJLjwRSOGgA617/VD6tyfLcbkRpBCMpw== X-Gm-Gg: AY/fxX7k05C+Uu5xLM8yVk2zYPuawZud0IcoW5c2K5FurWYXCaocdGbGvFJ7XhdWY1U zn7G894BMDVduY6giKiBPZ0oAqAzOprV3WzLzQfAHKKMaaXGl4eKVw9r0xlRZKrqA12Ippqw/CX 8P2VH/UJPiJ94sh5w1EyiqFJVCf7Eq9jjY/gRWSsRz+KBK7tx7mKqaHQLJc3Kp845tlME0ue+li NOb8xAMK7oCocAoIpz19pW2Da6wKFwHN4OVfTCV+UHeQQOwOkMebCZppsrSkX1NoAw8bijbolgl cm7yhDnAe+Cpuw33ceK5AAi759hVaTv/jN29ijpxqK47lvx6yhoCYy5jX8Ji3SdTu9Y1RR5x9ak YatwwRjIr6XO0TVqKSUaedYPiYMJ1gLThKJCsDeQ4uTuYgdgAMQkMafPOdWoEYIPJ6tOSuTIuk+ SgLyM= X-Google-Smtp-Source: AGHT+IEYqvZ+HQPTT/sXJzCiHhszT7pkgph1fNDfxDV0TwUs+jfqkBdEvq9Oi1AWhMWCQrgYPKmhQg== X-Received: by 2002:a05:6512:b17:b0:595:7d7c:59a9 with SMTP id 2adb3069b0e04-598fa6582b2mr4037887e87.22.1765827717684; Mon, 15 Dec 2025 11:41:57 -0800 (PST) Received: from [10.0.0.7] ([84.212.40.32]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5990da1a2b7sm83113e87.25.2025.12.15.11.41.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Dec 2025 11:41:57 -0800 (PST) Message-ID: <1725e773-227d-4422-b2d0-834b5d37ffdc@gmail.com> Date: Mon, 15 Dec 2025 20:41:54 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: git: 43b07bdbc5d2 - main - Revert "devinfo: Add support for libxo" To: John Baldwin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69402b14.3d495.7a0523bf@gitrepo.freebsd.org> Content-Language: en-US From: KT Ullavik In-Reply-To: <69402b14.3d495.7a0523bf@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dVVnT37ZGz3Zk3 Sorry! Is used a test script running diffs on various combinations of flags to make shure text output remained unchanged, even whitespace, but apparently I missed a bit. From nobody Mon Dec 15 21:45:30 2025 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 4dVYWt4fGgz6LNTr for ; Mon, 15 Dec 2025 21:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYWt36r2z3pX8 for ; Mon, 15 Dec 2025 21:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835130; 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=nvC2xJmEeHjAr43UY/xPRF3gx/9jYld/r+dEWvzhk1I=; b=A5XkRWdHGn1Kbn5zcDTZLjSWh8oe5SxO9nsrrr6i43pLihOuKO/uUGUEGCrhLxeWUPctbA ZRp6Grv1CeQ5WPYFhd2nw/nBWfz4URhRCeCf6nNvrmnPSYQ+Yc8U/s+W8gPC9Ebrh2LBfs WD5zD9TezTlZu9x55Dz+ZF13BjtfRQD5iJDIg5VU7bs+7gBtDGExge20EiB5fuljhKEwUS 9sYjIkJk7JaOmySEFk/GT5mbj6CrphmA2KWBWZB8cnJGfweDTXAAyvuHxrn9aWHw9Un2Vm oWf8M5Pb1KMjX2dPuRVRJchHou9xBglxzfNA4S2sQIZ1ec2sIGU92sJmhOCnQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835130; 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=nvC2xJmEeHjAr43UY/xPRF3gx/9jYld/r+dEWvzhk1I=; b=wEvq2d8NB+/iQJsJHmLpcNFyq6rrrCN0SH5r2MEHQiKJG2gmpAcf1pQ2sf3q22YJ/XZSty RAObKVghalcW7YspqRcNuO9t1z15HWnSZHUtogn6x4X54+AHFcXIa0MqGWJCLsgaoZnCKN m6N5atjiGuSZN4hU0JGXGHKyPsR0bHeeprqeZacEMxUnYfEfRQue/blf0kNoOpVbcrPQB/ cA4FdSWCWrtqKZUrvRw4PN30T4+PQLJDu19NflVvlxVu/gd+6tguNIVrm2BcoOscZLQsR7 9NtwBfW/ayR/JAs1ospO2KKjG6oqb3EqM9mi72NywXMQtpRdxGm55ao1PgcITw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835130; a=rsa-sha256; cv=none; b=gjQKztKVuSiwSJcOkgSpRvbau0ozpXmc/mCZEQVyxSBC2ORYOM0Epet6gFBopeu3Zdok87 WD0X/Lvh9fjMi13cqKL88IwfPFzSBhWFpZP1ha4sPHZAB1klI02rVZezKTp3mCZnXq7O81 SUGS/YfMDVfxhjxjiFRRL354i88hfDx9EUy3EqdmjmYIIxXSgjUIsefyJkMGQKWMeLeHxS TRYlEe6w0lRHK9+GLWH5E/XLBQc/rc4NSffqr6DTmWnn0kmRj/wVC+xDOR8kfH9gVGMyPA AJm6BIo/iNhXH4xgMtG8wOb8WtJGE17yRzPhmGIyl50bUITERreFRKuUvFlDQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYWt1kwNzdFV for ; Mon, 15 Dec 2025 21:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fceb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8774a990ee40 - main - bpf: modularize ifnet(9) part of bpf 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: 8774a990ee4094f16d596d4b78e0f3239e5d0c88 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:30 +0000 Message-Id: <6940817a.3fceb.3acfa3e9@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8774a990ee4094f16d596d4b78e0f3239e5d0c88 commit 8774a990ee4094f16d596d4b78e0f3239e5d0c88 Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:50:35 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 20:50:35 +0000 bpf: modularize ifnet(9) part of bpf Imagine that bpf(9) tapping can happen at any point in the network stack, not necessarily at interface transmit or receive. To achieve that we need a thin layer of abstraction defined by struct bif_methods, that defines how generic bpf layer works with a tap point of this kind. Implement ifnet(9) specific methods in a separate file bpf_ifnet.c. At this point there is 100% compatibility for all existing interfaces, there is no KPI change, yet. The legacy attaching KPI is layered over new ifnet agnostic KPI. The new KPI may change though, as we can implement multiple DLTs per single tap point in a prettier fashion. The new abstraction layer allows us to move all the 802.11 radio injection hacks out of bpf.c into ieee80211_radiotap.c, so do that immediately as a good proof of concept. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D53872 --- sys/conf/files | 1 + sys/net/bpf.c | 718 ++++++++++++++------------------------ sys/net/bpf.h | 28 +- sys/net/bpf_ifnet.c | 257 ++++++++++++++ sys/net80211/ieee80211_freebsd.c | 31 -- sys/net80211/ieee80211_radiotap.c | 128 ++++++- 6 files changed, 652 insertions(+), 511 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index df939f5788ca..aa0d05df45c7 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4189,6 +4189,7 @@ net/bpf_buffer.c optional bpf net/bpf_jitter.c optional bpf_jitter net/bpf_filter.c optional bpf | netgraph_bpf net/bpf_zerocopy.c optional bpf +net/bpf_ifnet.c optional bpf net/bridgestp.c optional bridge | if_bridge net/dummymbuf.c optional dummymbuf net/ieee8023ad_lacp.c optional lagg diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 855242728e16..0155b27b4919 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -41,7 +41,6 @@ #include #include -#include #include #include #include @@ -60,7 +59,6 @@ #include #include -#include #include #include #include @@ -71,7 +69,6 @@ #include #include #include -#include #include #include #ifdef BPF_JITTER @@ -79,31 +76,25 @@ #endif #include #include -#include #include -#include -#include #include #include -#include - #include MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); -static const struct bpfd_list dead_bpf_if = CK_LIST_HEAD_INITIALIZER(); - struct bpf_if { struct bpfd_list bif_dlist; /* list of all interfaces */ LIST_ENTRY(bpf_if) bif_next; /* descriptor list */ u_int bif_dlt; /* link layer type */ u_int bif_hdrlen; /* length of link header */ - struct bpfd_list bif_wlist; /* writer-only list */ - struct ifnet *bif_ifp; /* corresponding interface */ - struct bpf_if **bif_bpf; /* Pointer to pointer to us */ volatile u_int bif_refcnt; + struct bpfd_list bif_wlist; /* writer-only list */ + const struct bif_methods *bif_methods; + void *bif_softc; + const char *bif_name; struct epoch_context epoch_ctx; }; @@ -111,6 +102,61 @@ struct bpf_if { _Static_assert(offsetof(struct bpf_if, bif_dlist) == 0, "bpf_if shall start with bif_dlist"); +static inline void +bif_attachd(struct bpf_if *bp) +{ + if (bp->bif_methods->bif_attachd != NULL) + bp->bif_methods->bif_attachd(bp->bif_softc); +} + +static inline void +bif_detachd(struct bpf_if *bp) +{ + if (bp->bif_methods->bif_detachd != NULL) + bp->bif_methods->bif_detachd(bp->bif_softc); +} + +static inline uint32_t +bif_wrsize(struct bpf_if *bp) +{ + if (bp->bif_methods->bif_wrsize != NULL) + return (bp->bif_methods->bif_wrsize(bp->bif_softc)); + else + return (0); +} + +static inline int +bif_promisc(struct bpf_if *bp, bool on) +{ + if (bp->bif_methods->bif_promisc != NULL) + return (bp->bif_methods->bif_promisc(bp->bif_softc, on)); + else + return (0); +} + +#ifdef MAC +static inline int +bif_mac_check_receive(struct bpf_if *bp, struct bpf_d *d) +{ + if (bp->bif_methods->bif_mac_check_receive != NULL) + return (bp->bif_methods->bif_mac_check_receive(bp->bif_softc, + d)); + else + return (0); +} +#endif + +/* + * XXXGL: Once we migrate to tapping KPI that would specify packet direction + * we no longer need bif_chkdir method. + */ +static inline bool +bpf_chkdir(struct bpf_d *d, struct mbuf *m) +{ + return (d->bd_bif->bif_methods->bif_chkdir(d->bd_bif->bif_softc, m, + d->bd_direction)); +} + struct bpf_program_buffer { struct epoch_context epoch_ctx; #ifdef BPF_JITTER @@ -184,12 +230,9 @@ static void bpfif_rele(struct bpf_if *); static void bpfd_ref(struct bpf_d *); static void bpfd_rele(struct bpf_d *); -static void bpf_attachd(struct bpf_d *, struct bpf_if *); +static int bpf_attachd(struct bpf_d *d, struct bpf_if *); static void bpf_detachd(struct bpf_d *, bool); static void bpfd_free(epoch_context_t); -static int bpf_movein(struct uio *, int, struct ifnet *, struct mbuf **, - struct sockaddr *, int *, struct bpf_d *); -static int bpf_setif(struct bpf_d *, struct ifreq *); static void bpf_timed_out(void *); static __inline void bpf_wakeup(struct bpf_d *); @@ -298,7 +341,6 @@ bpfif_free(epoch_context_t ctx) struct bpf_if *bp; bp = __containerof(ctx, struct bpf_if, epoch_ctx); - if_rele(bp->bif_ifp); free(bp, M_BPF); } @@ -552,221 +594,6 @@ bpf_ioctl_setzbuf(struct thread *td, struct bpf_d *d, struct bpf_zbuf *bz) return (bpf_zerocopy_ioctl_setzbuf(td, d, bz)); } -/* - * General BPF functions. - */ -static int -bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp, - struct sockaddr *sockp, int *hdrlen, struct bpf_d *d) -{ - const struct ieee80211_bpf_params *p; - struct ether_header *eh; - struct mbuf *m; - int error; - int len; - int hlen; - int slen; - - /* - * Build a sockaddr based on the data link layer type. - * We do this at this level because the ethernet header - * is copied directly into the data field of the sockaddr. - * In the case of SLIP, there is no header and the packet - * is forwarded as is. - * Also, we are careful to leave room at the front of the mbuf - * for the link level header. - */ - switch (linktype) { - case DLT_SLIP: - sockp->sa_family = AF_INET; - hlen = 0; - break; - - case DLT_EN10MB: - sockp->sa_family = AF_UNSPEC; - /* XXX Would MAXLINKHDR be better? */ - hlen = ETHER_HDR_LEN; - break; - - case DLT_FDDI: - sockp->sa_family = AF_IMPLINK; - hlen = 0; - break; - - case DLT_RAW: - sockp->sa_family = AF_UNSPEC; - hlen = 0; - break; - - case DLT_NULL: - /* - * null interface types require a 4 byte pseudo header which - * corresponds to the address family of the packet. - */ - sockp->sa_family = AF_UNSPEC; - hlen = 4; - break; - - case DLT_ATM_RFC1483: - /* - * en atm driver requires 4-byte atm pseudo header. - * though it isn't standard, vpi:vci needs to be - * specified anyway. - */ - sockp->sa_family = AF_UNSPEC; - hlen = 12; /* XXX 4(ATM_PH) + 3(LLC) + 5(SNAP) */ - break; - - case DLT_PPP: - sockp->sa_family = AF_UNSPEC; - hlen = 4; /* This should match PPP_HDRLEN */ - break; - - case DLT_IEEE802_11: /* IEEE 802.11 wireless */ - sockp->sa_family = AF_IEEE80211; - hlen = 0; - break; - - case DLT_IEEE802_11_RADIO: /* IEEE 802.11 wireless w/ phy params */ - sockp->sa_family = AF_IEEE80211; - sockp->sa_len = 12; /* XXX != 0 */ - hlen = sizeof(struct ieee80211_bpf_params); - break; - - default: - return (EIO); - } - - len = uio->uio_resid; - if (len < hlen || len - hlen > ifp->if_mtu) - return (EMSGSIZE); - - /* Allocate a mbuf, up to MJUM16BYTES bytes, for our write. */ - m = m_get3(len, M_WAITOK, MT_DATA, M_PKTHDR); - if (m == NULL) - return (EIO); - m->m_pkthdr.len = m->m_len = len; - *mp = m; - - error = uiomove(mtod(m, u_char *), len, uio); - if (error) - goto bad; - - slen = bpf_filter(d->bd_wfilter, mtod(m, u_char *), len, len); - if (slen == 0) { - error = EPERM; - goto bad; - } - - /* Check for multicast destination */ - switch (linktype) { - case DLT_EN10MB: - eh = mtod(m, struct ether_header *); - if (ETHER_IS_MULTICAST(eh->ether_dhost)) { - if (bcmp(ifp->if_broadcastaddr, eh->ether_dhost, - ETHER_ADDR_LEN) == 0) - m->m_flags |= M_BCAST; - else - m->m_flags |= M_MCAST; - } - if (!(d->bd_flags & BPFD_HDRCMPLT)) { - memcpy(eh->ether_shost, IF_LLADDR(ifp), - sizeof(eh->ether_shost)); - } - break; - } - - /* - * Make room for link header, and copy it to sockaddr - */ - if (hlen != 0) { - if (sockp->sa_family == AF_IEEE80211) { - /* - * Collect true length from the parameter header - * NB: sockp is known to be zero'd so if we do a - * short copy unspecified parameters will be - * zero. - * NB: packet may not be aligned after stripping - * bpf params - * XXX check ibp_vers - */ - p = mtod(m, const struct ieee80211_bpf_params *); - hlen = p->ibp_len; - if (hlen > sizeof(sockp->sa_data)) { - error = EINVAL; - goto bad; - } - } - bcopy(mtod(m, const void *), sockp->sa_data, hlen); - } - *hdrlen = hlen; - - return (0); -bad: - m_freem(m); - return (error); -} - -/* - * Attach descriptor to the bpf interface, i.e. make d listen on bp, - * then reset its buffers and counters with reset_d(). - */ -static void -bpf_attachd(struct bpf_d *d, struct bpf_if *bp) -{ - int op_w; - - BPF_LOCK_ASSERT(); - - /* - * Save sysctl value to protect from sysctl change - * between reads - */ - op_w = V_bpf_optimize_writers || d->bd_writer; - - if (d->bd_bif != NULL) - bpf_detachd(d, false); - /* - * Point d at bp, and add d to the interface's list. - * Since there are many applications using BPF for - * sending raw packets only (dhcpd, cdpd are good examples) - * we can delay adding d to the list of active listeners until - * some filter is configured. - */ - - BPFD_LOCK(d); - /* - * Hold reference to bpif while descriptor uses this interface. - */ - bpfif_ref(bp); - d->bd_bif = bp; - if (op_w != 0) { - /* Add to writers-only list */ - CK_LIST_INSERT_HEAD(&bp->bif_wlist, d, bd_next); - /* - * We decrement bd_writer on every filter set operation. - * First BIOCSETF is done by pcap_open_live() to set up - * snap length. After that appliation usually sets its own - * filter. - */ - d->bd_writer = 2; - } else - CK_LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next); - - reset_d(d); - - /* Trigger EVFILT_WRITE events. */ - bpf_wakeup(d); - - BPFD_UNLOCK(d); - - CTR3(KTR_NET, "%s: bpf_attach called by pid %d, adding to %s list", - __func__, d->bd_pid, d->bd_writer ? "writer" : "active"); - - if (op_w == 0) - EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, bp->bif_dlt, 1); -} - /* * Check if we need to upgrade our descriptor @d from write-only mode. */ @@ -837,8 +664,7 @@ static void bpf_detachd(struct bpf_d *d, bool detached_ifp) { struct bpf_if *bp; - struct ifnet *ifp; - int error; + bool writer; BPF_LOCK_ASSERT(); CTR2(KTR_NET, "%s: detach required by pid %d", __func__, d->bd_pid); @@ -848,11 +674,8 @@ bpf_detachd(struct bpf_d *d, bool detached_ifp) return; BPFD_LOCK(d); - /* Remove d from the interface's descriptor list. */ CK_LIST_REMOVE(d, bd_next); - /* Save bd_writer value */ - error = d->bd_writer; - ifp = bp->bif_ifp; + writer = (d->bd_writer > 0); d->bd_bif = NULL; if (detached_ifp) { /* @@ -863,30 +686,14 @@ bpf_detachd(struct bpf_d *d, bool detached_ifp) } BPFD_UNLOCK(d); - /* Call event handler iff d is attached */ - if (error == 0) - EVENTHANDLER_INVOKE(bpf_track, ifp, bp->bif_dlt, 0); + if (!writer) + bif_detachd(bp); - /* - * Check if this descriptor had requested promiscuous mode. - * If so and ifnet is not detached, turn it off. - */ if (d->bd_promisc && !detached_ifp) { d->bd_promisc = 0; - CURVNET_SET(ifp->if_vnet); - error = ifpromisc(ifp, 0); - CURVNET_RESTORE(); - if (error != 0 && error != ENXIO) { - /* - * ENXIO can happen if a pccard is unplugged - * Something is really wrong if we were able to put - * the driver into promiscuous mode, but can't - * take it out. - */ - if_printf(bp->bif_ifp, - "bpf_detach: ifpromisc failed (%d)\n", error); - } + (void)bif_promisc(bp, false); } + bpfif_rele(bp); } @@ -1164,128 +971,96 @@ bpf_ready(struct bpf_d *d) static int bpfwrite(struct cdev *dev, struct uio *uio, int ioflag) { - struct route ro; - struct sockaddr dst; struct epoch_tracker et; struct bpf_if *bp; struct bpf_d *d; - struct ifnet *ifp; struct mbuf *m, *mc; - int error, hlen; + ssize_t len; + int error; error = devfs_get_cdevpriv((void **)&d); if (error != 0) return (error); - NET_EPOCH_ENTER(et); + if (uio->uio_resid == 0) + return (0); + BPFD_LOCK(d); - BPF_PID_REFRESH_CUR(d); - counter_u64_add(d->bd_wcount, 1); - if ((bp = d->bd_bif) == NULL) { + if ((bp = d->bd_bif) == NULL) error = ENXIO; - goto out_locked; - } - - ifp = bp->bif_ifp; - if ((ifp->if_flags & IFF_UP) == 0) { - error = ENETDOWN; - goto out_locked; + else if (bp->bif_methods->bif_write == NULL) + error = EOPNOTSUPP; + if (error) { + BPFD_UNLOCK(d); + counter_u64_add(d->bd_wdcount, 1); + return (error); } - - if (uio->uio_resid == 0) - goto out_locked; - - bzero(&dst, sizeof(dst)); - m = NULL; - hlen = 0; - - /* - * Take extra reference, unlock d and exit from epoch section, - * since bpf_movein() can sleep. - */ bpfd_ref(d); - NET_EPOCH_EXIT(et); BPFD_UNLOCK(d); - error = bpf_movein(uio, (int)bp->bif_dlt, ifp, - &m, &dst, &hlen, d); - - if (error != 0) { - counter_u64_add(d->bd_wdcount, 1); - bpfd_rele(d); - return (error); + len = uio->uio_resid; + /* Allocate a mbuf, up to MJUM16BYTES bytes, for our write. */ + m = m_get3(len, M_WAITOK, MT_DATA, M_PKTHDR); + if (m == NULL) { + error = ENOMEM; + goto fail_wref; } + m->m_pkthdr.len = m->m_len = len; - BPFD_LOCK(d); - /* - * Check that descriptor is still attached to the interface. - * This can happen on bpfdetach(). To avoid access to detached - * ifnet, free mbuf and return ENXIO. - */ - if (d->bd_bif == NULL) { - counter_u64_add(d->bd_wdcount, 1); - BPFD_UNLOCK(d); - bpfd_rele(d); - m_freem(m); - return (ENXIO); + error = uiomove(mtod(m, u_char *), len, uio); + if (error) + goto fail_wref; + + if (bpf_filter(d->bd_wfilter, mtod(m, u_char *), len, len) == 0) { + error = EPERM; + goto fail_wref; } - counter_u64_add(d->bd_wfcount, 1); - if (d->bd_flags & BPFD_HDRCMPLT) - dst.sa_family = pseudo_AF_HDRCMPLT; if (d->bd_flags & BPFD_FEEDBACK) { - mc = m_dup(m, M_NOWAIT); - if (mc != NULL) - mc->m_pkthdr.rcvif = ifp; + mc = m_dup(m, M_WAITOK); /* Set M_PROMISC for outgoing packets to be discarded. */ if (d->bd_direction == BPF_D_INOUT) m->m_flags |= M_PROMISC; } else mc = NULL; - m->m_pkthdr.len -= hlen; - m->m_len -= hlen; - m->m_data += hlen; /* XXX */ + /* XXXGL: should belong to bpf_ifnet.c */ + if (d->bd_pcp != 0) + (void)vlan_set_pcp(m, d->bd_pcp); - CURVNET_SET(ifp->if_vnet); + BPFD_LOCK(d); #ifdef MAC mac_bpfdesc_create_mbuf(d, m); if (mc != NULL) mac_bpfdesc_create_mbuf(d, mc); #endif - - bzero(&ro, sizeof(ro)); - if (hlen != 0) { - ro.ro_prepend = (u_char *)&dst.sa_data; - ro.ro_plen = hlen; - ro.ro_flags = RT_HAS_HEADER; + /* + * Check that descriptor is still attached to the interface. + * This can happen on bpfdetach() or if other thread did BIOCSDLT. + */ + if (__predict_false(d->bd_bif != bp)) { + BPFD_UNLOCK(d); + m_freem(mc); + error = ENXIO; + goto fail_wref; } + BPFD_UNLOCK(d); - if (d->bd_pcp != 0) - vlan_set_pcp(m, d->bd_pcp); - - /* Avoid possible recursion on BPFD_LOCK(). */ NET_EPOCH_ENTER(et); - BPFD_UNLOCK(d); - error = (*ifp->if_output)(ifp, m, &dst, &ro); + error = bp->bif_methods->bif_write(bp->bif_softc, m, mc, d->bd_flags); + NET_EPOCH_EXIT(et); if (error) counter_u64_add(d->bd_wdcount, 1); - - if (mc != NULL) { - if (error == 0) - (*ifp->if_input)(ifp, mc); - else - m_freem(mc); - } - NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); + else + counter_u64_add(d->bd_wfcount, 1); bpfd_rele(d); + return (error); -out_locked: +fail_wref: counter_u64_add(d->bd_wdcount, 1); - NET_EPOCH_EXIT(et); - BPFD_UNLOCK(d); + bpfd_rele(d); + m_freem(m); return (error); } @@ -1506,8 +1281,9 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, */ error = EINVAL; } else if (d->bd_promisc == 0) { - error = ifpromisc(d->bd_bif->bif_ifp, 1); - if (error == 0) + struct bpf_if *bp = d->bd_bif; + + if ((error = bif_promisc(bp, true)) == 0) d->bd_promisc = 1; } BPF_UNLOCK(); @@ -1579,10 +1355,10 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, if (d->bd_bif == NULL) error = EINVAL; else { - struct ifnet *const ifp = d->bd_bif->bif_ifp; + struct bpf_if *const bp = d->bd_bif; struct ifreq *const ifr = (struct ifreq *)addr; - strlcpy(ifr->ifr_name, ifp->if_xname, + strlcpy(ifr->ifr_name, bp->bif_name, sizeof(ifr->ifr_name)); } BPF_UNLOCK(); @@ -1591,7 +1367,10 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, /* * Set interface. */ - case BIOCSETIF: + case BIOCSETIF: { + struct ifreq *const ifr = (struct ifreq *)addr; + struct bpf_if *bp; + /* * Behavior here depends on the buffering model. If we're * using kernel memory buffers, then we can allocate them here. @@ -1611,10 +1390,21 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, } else BPFD_UNLOCK(d); BPF_LOCK(); - error = bpf_setif(d, (struct ifreq *)addr); + /* + * Look through attached interfaces for the named one. + */ + LIST_FOREACH(bp, &bpf_iflist, bif_next) { + if (strncmp(ifr->ifr_name, bp->bif_name, + sizeof(ifr->ifr_name)) == 0) + break; + } + if (bp != NULL) + error = bpf_attachd(d, bp); + else + error = ENXIO; BPF_UNLOCK(); break; - + } /* * Set read timeout. */ @@ -2051,41 +1841,24 @@ bpf_setf(struct bpf_d *d, struct bpf_program *fp, u_long cmd) NET_EPOCH_CALL(bpf_program_buffer_free, &fcode->epoch_ctx); if (track_event) - EVENTHANDLER_INVOKE(bpf_track, - d->bd_bif->bif_ifp, d->bd_bif->bif_dlt, 1); + bif_attachd(d->bd_bif); BPF_UNLOCK(); return (0); } /* - * Detach a file from its current interface (if attached at all) and attach - * to the interface indicated by the name stored in ifr. - * Return an errno or 0. + * Attach descriptor to a tap point, possibly detaching from the old one, + * reset the counters. + * XXXGL: this KPI is subject to change */ static int -bpf_setif(struct bpf_d *d, struct ifreq *ifr) +bpf_attachd(struct bpf_d *d, struct bpf_if *bp) { - struct bpf_if *bp; - struct ifnet *theywant; + bool writer; BPF_LOCK_ASSERT(); - theywant = ifunit(ifr->ifr_name); - if (theywant == NULL) - return (ENXIO); - /* - * Look through attached interfaces for the named one. - */ - LIST_FOREACH(bp, &bpf_iflist, bif_next) { - if (bp->bif_ifp == theywant && - bp->bif_bpf == &theywant->if_bpf) - break; - } - if (bp == NULL) - return (ENXIO); - - MPASS(bp == theywant->if_bpf); /* * At this point, we expect the buffer is already allocated. If not, * return an error. @@ -2098,15 +1871,61 @@ bpf_setif(struct bpf_d *d, struct ifreq *ifr) break; default: - panic("bpf_setif: bufmode %d", d->bd_bufmode); + panic("%s: bufmode %d", __func__, d->bd_bufmode); } - if (bp != d->bd_bif) - bpf_attachd(d, bp); - else { + + if (bp == d->bd_bif) { BPFD_LOCK(d); reset_d(d); BPFD_UNLOCK(d); - } + return (0); + } else if (d->bd_bif != NULL) + bpf_detachd(d, false); + + /* + * Save sysctl value to protect from sysctl change between reads. + */ + writer = V_bpf_optimize_writers || (d->bd_writer > 0); + + /* + * Point d at bp, and add d to the interface's list. + * Since there are many applications using BPF for + * sending raw packets only (dhcpd, cdpd are good examples) + * we can delay adding d to the list of active listeners until + * some filter is configured. + */ + BPFD_LOCK(d); + /* + * Hold reference to bpif while descriptor uses this interface. + */ + bpfif_ref(bp); + d->bd_bif = bp; + if (writer) { + /* Add to writers-only list */ + CK_LIST_INSERT_HEAD(&bp->bif_wlist, d, bd_next); + /* + * We decrement bd_writer on every filter set operation. + * First BIOCSETF is done by pcap_open_live() to set up + * snap length. After that application usually sets its own + * filter. + */ + d->bd_writer = 2; + } else + CK_LIST_INSERT_HEAD(&bp->bif_dlist, d, bd_next); + + reset_d(d); + + /* Trigger EVFILT_WRITE events. */ + bpf_wakeup(d); + + BPFD_UNLOCK(d); + + CTR3(KTR_NET, "%s: called by pid %d, adding to %s list", + __func__, d->bd_pid, d->bd_writer ? "writer" : "active"); + + if (!writer) + bif_attachd(bp); + return (0); } @@ -2229,7 +2048,7 @@ filt_bpfwrite(struct knote *kn, long hint) kn->kn_data = 0; return (0); } else { - kn->kn_data = d->bd_bif->bif_ifp->if_mtu; + kn->kn_data = bif_wrsize(d->bd_bif); return (1); } } @@ -2305,7 +2124,7 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) { counter_u64_add(d->bd_rcount, 1); /* - * NB: We dont call BPF_CHECK_DIRECTION() here since there + * NB: We don't check the direction here since there * is no way for the caller to indiciate to us whether this * packet is inbound or outbound. In the bpf_mtap() routines, * we use the interface pointers on the mbuf to figure it out. @@ -2327,7 +2146,7 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) gottime = bpf_gettime(&bt, d->bd_tstamp, NULL); #ifdef MAC - if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) + if (bif_mac_check_receive(bp, d) == 0) #endif catchpacket(d, pkt, pktlen, slen, bpf_append_bytes, &bt); @@ -2344,10 +2163,6 @@ bpf_tap_if(if_t ifp, u_char *pkt, u_int pktlen) bpf_tap(ifp->if_bpf, pkt, pktlen); } -#define BPF_CHECK_DIRECTION(d, r, i) \ - (((d)->bd_direction == BPF_D_IN && (r) != (i)) || \ - ((d)->bd_direction == BPF_D_OUT && (r) == (i))) - /* * Incoming linkage from device drivers, when packet is in an mbuf chain. * Locking model is explained in bpf_tap(). @@ -2375,7 +2190,7 @@ bpf_mtap(struct bpf_if *bp, struct mbuf *m) NET_EPOCH_ENTER(et); CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) { - if (BPF_CHECK_DIRECTION(d, m_rcvif(m), bp->bif_ifp)) + if (bpf_chkdir(d, m)) continue; counter_u64_add(d->bd_rcount, 1); #ifdef BPF_JITTER @@ -2394,7 +2209,7 @@ bpf_mtap(struct bpf_if *bp, struct mbuf *m) if (gottime < bpf_ts_quality(d->bd_tstamp)) gottime = bpf_gettime(&bt, d->bd_tstamp, m); #ifdef MAC - if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) + if (bif_mac_check_receive(bp, d) == 0) #endif catchpacket(d, (u_char *)m, pktlen, slen, bpf_append_mbuf, &bt); @@ -2449,7 +2264,7 @@ bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m) NET_EPOCH_ENTER(et); CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) { - if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) + if (bpf_chkdir(d, m)) continue; counter_u64_add(d->bd_rcount, 1); slen = bpf_filter(d->bd_rfilter, (u_char *)&mb, pktlen, 0); @@ -2460,7 +2275,7 @@ bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m) if (gottime < bpf_ts_quality(d->bd_tstamp)) gottime = bpf_gettime(&bt, d->bd_tstamp, m); #ifdef MAC - if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) + if (bif_mac_check_receive(bp, d) == 0) #endif catchpacket(d, (u_char *)&mb, pktlen, slen, bpf_append_mbuf, &bt); @@ -2479,7 +2294,6 @@ bpf_mtap2_if(if_t ifp, void *data, u_int dlen, struct mbuf *m) } } -#undef BPF_CHECK_DIRECTION #undef BPF_TSTAMP_NONE #undef BPF_TSTAMP_FAST #undef BPF_TSTAMP_NORMAL @@ -2759,57 +2573,36 @@ bpfd_free(epoch_context_t ctx) } /* - * Attach an interface to bpf. dlt is the link layer type; hdrlen is the - * fixed size of the link header (variable length headers not yet supported). + * Attach a tap point to bpf. + * XXX: with current KPI it is consumer's responsibility to avoid duplicates. */ -void -bpfattach(struct ifnet *ifp, u_int dlt, u_int hdrlen) -{ - - bpfattach2(ifp, dlt, hdrlen, &ifp->if_bpf); -} - -/* - * Attach an interface to bpf. ifp is a pointer to the structure - * defining the interface to be attached, dlt is the link layer type, - * and hdrlen is the fixed size of the link header (variable length - * headers are not yet supporrted). - */ -void -bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen, - struct bpf_if **driverp) +struct bpf_if * +bpf_attach(const char *name, u_int dlt, u_int hdrlen, + const struct bif_methods *methods, void *sc) { struct bpf_if *bp; - KASSERT(*driverp == NULL, - ("bpfattach2: driverp already initialized")); - bp = malloc(sizeof(*bp), M_BPF, M_WAITOK | M_ZERO); CK_LIST_INIT(&bp->bif_dlist); CK_LIST_INIT(&bp->bif_wlist); - bp->bif_ifp = ifp; bp->bif_dlt = dlt; bp->bif_hdrlen = hdrlen; - bp->bif_bpf = driverp; + bp->bif_softc = sc; + bp->bif_name = name; + bp->bif_methods = methods; refcount_init(&bp->bif_refcnt, 1); - *driverp = bp; - /* - * Reference ifnet pointer, so it won't freed until - * we release it. - */ - if_ref(ifp); BPF_LOCK(); LIST_INSERT_HEAD(&bpf_iflist, bp, bif_next); BPF_UNLOCK(); - if (bootverbose && IS_DEFAULT_VNET(curvnet)) - if_printf(ifp, "bpf attached\n"); + return (bp); } #ifdef VIMAGE /* * Detach descriptors on interface's vmove event. + * XXXGL: shouldn't be a special case, but a full detach. */ void bpf_ifdetach(struct ifnet *ifp) @@ -2819,7 +2612,8 @@ bpf_ifdetach(struct ifnet *ifp) BPF_LOCK(); LIST_FOREACH(bp, &bpf_iflist, bif_next) { - if (bp->bif_ifp != ifp) *** 706 LINES SKIPPED *** From nobody Mon Dec 15 21:45:31 2025 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 4dVYWv3MMgz6LNWv for ; Mon, 15 Dec 2025 21:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYWv2Vk7z3pLp for ; Mon, 15 Dec 2025 21:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835131; 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=iVmlsONzrCjVRTb+WexQHNWpGoN3oSD5gsomZB/6azo=; b=RE+b48DD1TDZVVzLzdA71SACGdI5Fsx2o8+Wp4HtkEM9mRSCBa7h8mlGuddqrj5lika/FW e56nZSEo9wCmIQzfswJOex77dTHLimwBLBBFcGoJxT5i97rfjfOfQR9d6KR7Rp5maFX5LJ s1mevH9TLBpref1m3oqok2sbMYYVI+iZiKUrZ4/6ow06/S9VoptRPksOwBZpFwkTQHPLfg PWH9cbZ71+Zu7tszGrsdK4BhtS4YDzvzbVWN/80u7b6pR8Rvntjs3TcuwFZ2N9uNGnTgwe 13Dlnq9hnBHa2X7VnsSvOE8cRHoV6F7AL7aW3sAC2rN/CMQ1RS1rUcEzIKenCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835131; 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=iVmlsONzrCjVRTb+WexQHNWpGoN3oSD5gsomZB/6azo=; b=cLzCgDVcoJ36Ai54bhMSe3kGutl7ngEGfBYNy8e2Zfq3cu8ckfftoQ9yZs3H70wtvOCe6H Vm0X3PbSNoi4TCEkrguCg2Z65KpZiH7MmBlkZkHNnsSdfJFKUYY8z56QEitNeC+W4eRK7w s1bGHCbLncBZPU4bKpJeBjiOuHVvnj3S8JYorP4BkJv4rLNco+6CoDyZb7L1D0Gsxvn6sG dCCSPhNREHuLOirJI4L+E7tDXVXj0fTdE16LxeBCDLPIaXXWYrFupWbYw32r7kjyjc1F9H hKLsu6Bvi2gZPBU+9AOq3ftL81No/pOuGQ8eO6V7Dhv2RAckYSyejFuxYR6Knw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835131; a=rsa-sha256; cv=none; b=ojEUuQI+UXWkcr9aAmnEJVBZQIRHeqDdoDxJy6hjnAlcwX/d0arLBEjmM6jH9gOKlSi0Jw W9UlACM/DNCIPGwWHPWBSh/I8iij7bwbzex4a/hbRZzPZoixdCOPWXkXpCgmPcfNBJbBiK /rrYoVx2QSuivyCfeYjDYY7n5FZIZnV6sKJUTUfSC5KxgKukqM0Jy/YaCOQaqQOhL+hrCl 9YD5YTMwHwJy01KDGYH14NywarjuC6D3GHpuMMqD1Q4364DfPpawFk6ekauacmySEE/s6C 3HGmXgDMhvgBV/0YPcnnoTu5QdL+cdZaoVFkjrNenT6bLIOiGKbjCr4CajGRYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYWv206Dzdlb for ; Mon, 15 Dec 2025 21:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 413b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c10447a9256b - main - bpf: add BIOCGETIFLIST ioctl that returns all available tap points 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: c10447a9256b561bf2edf26b5abf5f28071a15c7 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:31 +0000 Message-Id: <6940817b.413b1.1e86acdb@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c10447a9256b561bf2edf26b5abf5f28071a15c7 commit c10447a9256b561bf2edf26b5abf5f28071a15c7 Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:51:26 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 20:51:26 +0000 bpf: add BIOCGETIFLIST ioctl that returns all available tap points Differential Revision: https://reviews.freebsd.org/D53873 --- share/man/man4/bpf.4 | 27 +++++++++++++++++++++- sys/net/bpf.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++-- sys/net/bpf.h | 10 ++++++++ sys/sys/param.h | 2 +- 4 files changed, 100 insertions(+), 4 deletions(-) diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4 index 8082f6eac39a..dcf321c40782 100644 --- a/share/man/man4/bpf.4 +++ b/share/man/man4/bpf.4 @@ -47,7 +47,7 @@ .\" This document is derived in part from the enet man page (enet.4) .\" distributed with 4.3BSD Unix. .\" -.Dd October 13, 2021 +.Dd December 10, 2025 .Dt BPF 4 .Os .Sh NAME @@ -276,6 +276,31 @@ The (third) argument to .Xr ioctl 2 should be a pointer to the type indicated. .Bl -tag -width BIOCGETBUFMODE +.It Dv BIOCGETIFLIST +.Pq Li "struct bpf_iflist" +Returns list of available tapping points, that can later be attached +to with +.Dv BIOCSETIF . +On entry the +.Vt bi_ubuf +shall point to user supplied buffer. +The +.Vt bi_size +shall specify length of the buffer, or 0 if the request is used +to determine the required length. +The +.Vt bi_count +can be used to limit the output to first +.Va count +entries, otherwise shall be 0. +On return, if the buffer length was enough to accomodate all desired entries, +then the supplied buffer is filled with NUL-terminated names of +available tapping points and +.Vt bi_count +is set to the number of copied names. +Otherwise +.Er ENOSPC +is returned. .It Dv BIOCGBLEN .Pq Li u_int Returns the required buffer length for reads on diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 0155b27b4919..4026c44112ab 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -221,8 +221,7 @@ struct bpf_dltlist32 { * structures registered by different layers in the stack (i.e., 802.11 * frames, ethernet frames, etc). */ -LIST_HEAD(bpf_iflist, bpf_if); -static struct bpf_iflist bpf_iflist = LIST_HEAD_INITIALIZER(); +static LIST_HEAD(, bpf_if) bpf_iflist = LIST_HEAD_INITIALIZER(); static struct sx bpf_sx; /* bpf global lock */ static void bpfif_ref(struct bpf_if *); @@ -240,6 +239,7 @@ static void catchpacket(struct bpf_d *, u_char *, u_int, u_int, void (*)(struct bpf_d *, caddr_t, u_int, void *, u_int), struct bintime *); static void reset_d(struct bpf_d *); +static int bpf_getiflist(struct bpf_iflist *); static int bpf_setf(struct bpf_d *, struct bpf_program *, u_long cmd); static int bpf_getdltlist(struct bpf_d *, struct bpf_dltlist *); static int bpf_setdlt(struct bpf_d *, u_int); @@ -1100,6 +1100,7 @@ reset_d(struct bpf_d *d) /* * FIONREAD Check for read packet available. + * BIOCGETIFLIST Get list of all tap points. * BIOCGBLEN Get buffer len [for read()]. * BIOCSETF Set read filter. * BIOCSETFNR Set read filter without resetting descriptor. @@ -1153,6 +1154,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, if (d->bd_flags & BPFD_LOCKED) { switch (cmd) { + case BIOCGETIFLIST: case BIOCGBLEN: case BIOCFLUSH: case BIOCGDLT: @@ -1230,6 +1232,12 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, *(int *)addr = n; break; } + /* + * Get list of all tap points. + */ + case BIOCGETIFLIST: + error = bpf_getiflist((struct bpf_iflist *)addr); + break; /* * Get buffer len [for read()]. @@ -1706,6 +1714,59 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, return (error); } +/* + * Return list of available tapping points, or report how much space is + * required for a successful return. + */ +static int +bpf_getiflist(struct bpf_iflist *bi) +{ + struct bpf_if *bp; + u_int allsize, size, cnt; + char *uaddr; + + BPF_LOCK(); + + cnt = allsize = size = 0; + LIST_FOREACH(bp, &bpf_iflist, bif_next) { + allsize += strlen(bp->bif_name) + 1; + if (++cnt == bi->bi_count) + size = allsize; + } + if (size == 0) + size = allsize; + + if (bi->bi_size == 0) { + BPF_UNLOCK(); + bi->bi_size = size; + bi->bi_count = cnt; + return (0); + } else if (bi->bi_size < size) { + BPF_UNLOCK(); + return (ENOSPC); + } + + uaddr = bi->bi_ubuf; + cnt = 0; + LIST_FOREACH(bp, &bpf_iflist, bif_next) { + u_int len; + int error; + + len = strlen(bp->bif_name) + 1; + if ((error = copyout(bp->bif_name, uaddr, len)) != 0) { + BPF_UNLOCK(); + return (error); + } + if (++cnt == bi->bi_count) + break; + uaddr += len; + } + BPF_UNLOCK(); + bi->bi_count = cnt; + + return (0); +} + /* * Set d's packet filter program to fp. If this file already has a filter, * free it and replace it. Returns EINVAL for bogus requests. diff --git a/sys/net/bpf.h b/sys/net/bpf.h index cda03c06d51d..f6bcb0e34ed4 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -118,6 +118,15 @@ struct bpf_zbuf { size_t bz_buflen; /* Size of zero-copy buffers. */ }; +/* + * Struct used by BIOCGETIFLIST. + */ +struct bpf_iflist { + u_int bi_size; + u_int bi_count; + void *bi_ubuf; +}; + #define BIOCGBLEN _IOR('B', 102, u_int) #define BIOCSBLEN _IOWR('B', 102, u_int) #define BIOCSETF _IOW('B', 103, struct bpf_program) @@ -151,6 +160,7 @@ struct bpf_zbuf { #define BIOCGTSTAMP _IOR('B', 131, u_int) #define BIOCSTSTAMP _IOW('B', 132, u_int) #define BIOCSETVLANPCP _IOW('B', 133, u_int) +#define BIOCGETIFLIST _IOWR('B', 134, struct bpf_iflist) /* Obsolete */ #define BIOCGSEESENT BIOCGDIRECTION diff --git a/sys/sys/param.h b/sys/sys/param.h index 003c28c082cb..fa09878507c6 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1600005 +#define __FreeBSD_version 1600006 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Mon Dec 15 21:45:32 2025 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 4dVYWx3hJQz6LNTt for ; Mon, 15 Dec 2025 21:45:33 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYWx0bRQz3ppY for ; Mon, 15 Dec 2025 21:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835133; 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=MvFF3uhq19bzCQWVOBlil192FJYu7r/+PKr0nhXp+Dw=; b=A2+/H7a5lsiqt2TKQyVaRZcZPq1VsZoVV9OfUcnSR+goMWu50r14P7CPDaw4353xgsuBih kfFMxZniH7x1QMb0y5edqg/Y71sC80aSILN8xNBsZDWfeXA2sRFQqBROxwauYp4DvDb7BP DgpF/Ie7iFPRzxBjA/RzOArkRX86JFc4McKO0g/NboYeWn10GncBPzmXkjWJraOlCW0XVP ktaJ/n1/f0I+XV5Bgb8EMcCqhR5IQOR2SjraRcVOwyptPNPIaKMYD0qQAfgu1JylIzlsqQ +fa8zs1NoCmkHEAb+LYdhJ5zQ0ExH2OEfViEFqHV3bu+LraL/vMbXwFv4t/SUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835133; 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=MvFF3uhq19bzCQWVOBlil192FJYu7r/+PKr0nhXp+Dw=; b=T7f+LCZ3YSLpTLQJ/ttltCZfCxomgRFtAVzmsoB4RaCqZEc6UX7sCK29au/dHilwVRdnro wrJWCd7dmp99y/nTLirS0IFRUKXRCIcN39WfVXCOjyN8RZBW0HoNYIk5TDHo9CwH4UaUL9 VZ7fZep0y0Ki1fc6qTJ8KSI3t0hKvbC+K8va8C4DlU+VxrE0TLsAbuy1DRwlf7EB0Ed0TL Kz9WtQ3Vv3HnLtSppB1FylZVxXr3uJxojtjNxbxUZZEby11NRSRh42qKm6BjvzCltYG0/W Z4+XGhF/bDeAKMM4y7p3ih3Igq6h4/Yt4H04zDx2EK0MamrF8PCZuVQ2mBG+4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835133; a=rsa-sha256; cv=none; b=DEu92vaD6rHRkBvZC3EoyxTMx2BiEwTqTpxFNV2fhAHEnsAi5N86zuiJDeylUs/C5twra9 bBMjkDw2x2AiqXlNGs7epv2Dj8fS7MGHv34hh0v1BWeF7ygRsL8EcDqoEL7DgLM5rvB+jl DqaIm4354FTaL7/P/rFDtiTqLs8sYGKPIEzEwf6P/YWToEGW7LCZQPVoSw5r85c5RLtVdQ uot9NmvuxTAr+6JACSawwrduLZevOg45kHJnVzyQjv8aCHM1P3ryA2zgW17SHCeWuld2GZ bsYQnD4zQfEtQGh4yCa9eZ8Ilyeae4Tfet7lTGJ5un4qC/C2wiJOqPdqapBR3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYWw2hDrzdZw for ; Mon, 15 Dec 2025 21:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41bb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 94b76ea9d136 - main - libpcap: obtain list of bpf tap points with BIOCGETIFLIST 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: 94b76ea9d136723d6f05c42f450c802fb4a91600 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:32 +0000 Message-Id: <6940817c.41bb7.26d54227@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=94b76ea9d136723d6f05c42f450c802fb4a91600 commit 94b76ea9d136723d6f05c42f450c802fb4a91600 Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:51:34 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 20:51:34 +0000 libpcap: obtain list of bpf tap points with BIOCGETIFLIST Differential Revision: https://reviews.freebsd.org/D53874 --- contrib/libpcap/pcap-bpf.c | 56 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/contrib/libpcap/pcap-bpf.c b/contrib/libpcap/pcap-bpf.c index b9e84e65f634..3767dd099d2c 100644 --- a/contrib/libpcap/pcap-bpf.c +++ b/contrib/libpcap/pcap-bpf.c @@ -2864,18 +2864,50 @@ check_bpf_bindable(const char *name) return (1); } -#if defined(__FreeBSD__) && defined(SIOCIFCREATE2) +#if defined(__FreeBSD__) static int -get_usb_if_flags(const char *name _U_, bpf_u_int32 *flags _U_, char *errbuf _U_) +get_flags_stub(const char *name _U_, bpf_u_int32 *flags _U_, char *errbuf _U_) { - /* - * XXX - if there's a way to determine whether there's something - * plugged into a given USB bus, use that to determine whether - * this device is "connected" or not. - */ return (0); } +#if __FreeBSD_version >= 1600006 +static int +finddevs_bpf(pcap_if_list_t *devlistp, char *errbuf) +{ + struct bpf_iflist bi; + const char *name; + int fd; + + if ((fd = bpf_open(errbuf)) < 0) + return (-1); + + memset(&bi, 0, sizeof(bi)); + if (ioctl(fd, BIOCGETIFLIST, (caddr_t)&bi) != 0 || bi.bi_size == 0) + return (-1); + + if ((bi.bi_ubuf = malloc(bi.bi_size)) == NULL) + return (-1); + + if (ioctl(fd, BIOCGETIFLIST, (caddr_t)&bi) != 0) + return (-1); + + for (name = bi.bi_ubuf; bi.bi_count > 0; + bi.bi_count--, name += strlen(name) + 1) + /* + * Add only those devices that were not added via the + * getifaddrs() loop in pcapint_findalldevs_interfaces(). + */ + if (pcapint_find_or_add_dev(devlistp, name, PCAP_IF_UP, + get_flags_stub, NULL, errbuf) == NULL) { + free(bi.bi_ubuf); + return (-1); + } + + free(bi.bi_ubuf); + return (0); +} +#else static int finddevs_usb(pcap_if_list_t *devlistp, char *errbuf) { @@ -2940,7 +2972,7 @@ finddevs_usb(pcap_if_list_t *devlistp, char *errbuf) * for each bus. */ if (pcapint_find_or_add_dev(devlistp, name, PCAP_IF_UP, - get_usb_if_flags, NULL, errbuf) == NULL) { + get_flags_stub, NULL, errbuf) == NULL) { free(name); closedir(usbdir); return (PCAP_ERROR); @@ -2951,6 +2983,7 @@ finddevs_usb(pcap_if_list_t *devlistp, char *errbuf) return (0); } #endif +#endif /* FreeBSD */ /* * Get additional flags for a device, using SIOCGIFMEDIA. @@ -3093,9 +3126,14 @@ pcapint_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf) return (-1); #endif -#if defined(__FreeBSD__) && defined(SIOCIFCREATE2) +#if defined(__FreeBSD__) +#if __FreeBSD_version >= 1600006 + if (finddevs_bpf(devlistp, errbuf) == -1) + return (-1); +#else if (finddevs_usb(devlistp, errbuf) == -1) return (-1); +#endif #endif return (0); From nobody Mon Dec 15 21:45:33 2025 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 4dVYWx6fPxz6LNcn for ; Mon, 15 Dec 2025 21:45:33 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYWx3yVFz3prF for ; Mon, 15 Dec 2025 21:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835133; 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=koF2AM9vzS8c16Uv5wzttbrt8KWdWyBbyPdOmr2aIKw=; b=viCCa31h2vUpuIP0ZHS5cyEZq1TcXrmx8ePjXbs8D5TBEF+vBKpfuqamJNBKNem5+jHuAI BhgEHsQS9UrWJ6uctboxHHWQcEpiBiLY3j/8jfoyQEXcN5eSdm+eeaa43RS2Yl+CnuIuSZ I+6ZH7Jp3xuT0Clj7RSA5RDo9BG50YsKhbGmaePMEy/ab/qIkwuoDxnioAVzarC/DSSCdt xdwfz3jJf9atomRkhESdSXxIQyw0WAtUXPUXMGYm04UVNjfB8H523SJ7bt8zqS2pA8u/rq hsLCsbjH9ze3UtTkTgBcrLQbnQnG/u4ue9AfbXjvQPXqb6IRT6CLQYGfi+sJqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835133; 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=koF2AM9vzS8c16Uv5wzttbrt8KWdWyBbyPdOmr2aIKw=; b=Oa1aZY2w3Jn1tmkbXBKaQvLYOHi9zKPdDF4GRgaFqHnIGDpPx2Yy8QCSXEDSU57bL6WXid ABA1hVH2CL5ImUEqUXAoldO/1gVL3YSqbspruykhE74zo9maOUCHSV4/vCC5KN7ZhiMIQZ C8q+fljWGGFUicOX/Hw+tkE6a+fNECrsy1RnamQq1muwSnlsg3BC34kFbjewYEnJFUqDkd SmcS376JwxRDjwNDRzH/3+XcifMqK46fVxvXkraMEbyKHQ1nI+gxnwSqZP633U3cDpvySF r84DZHUwKUjrzf7muWoj2x7ldIiJzmq1FfU5FYz5JC6wPEsH2GxCDPnLOJvzXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835133; a=rsa-sha256; cv=none; b=sBszkRbq1pZrNH2w8KTZz0iT4WxTbww/DwXEXHAA57+JAhZAxFvt3uxmirc8aDKIb3j7Vb hps5d5ZcEpoSVprBn5Jix/N+eRI0r2TC+tAKzjdOWUyPQfWB3FeZE6zzsTXlzOCvxFNJX6 cxTuSfcLTO5hwQe5DvxZPKllb5VctoO3mYaTb9DLWcfXbigZ08idT5aWEKic1e+u5oJ5gW BdSebPzNjKz8oyzeLlyFi2AIB/L1cdwiEQ8De0/cn6HPruOJDbCnMd21s4cI89fvc8KNA1 +jEBMQpkfj62QCx3p14iVyS/K/8rTgn/pgW6w/i5z604DRGhUslUf2CnNwlUAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYWx3WxGzdnY for ; Mon, 15 Dec 2025 21:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40bee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ddf4f9eda9c2 - main - ipfw: create "ipfw0" and "ipfwlog0" bpf tapping points without ifnet(9) 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: ddf4f9eda9c295082f17e7f26963666b72c97bb9 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:33 +0000 Message-Id: <6940817d.40bee.6fd47191@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ddf4f9eda9c295082f17e7f26963666b72c97bb9 commit ddf4f9eda9c295082f17e7f26963666b72c97bb9 Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:51:42 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 21:17:23 +0000 ipfw: create "ipfw0" and "ipfwlog0" bpf tapping points without ifnet(9) As a free bonus the tapping points are now able to match packet direction. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D53875 --- libexec/rc/rc.conf | 1 - libexec/rc/rc.d/ipfw | 10 --- sbin/ipfw/ipfw.8 | 38 +++-------- sys/netpfil/ipfw/ip_fw_bpf.c | 146 ++++++++----------------------------------- 4 files changed, 35 insertions(+), 160 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index ada9094360f6..e8f146807f33 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -157,7 +157,6 @@ firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall firewall_type="UNKNOWN" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display firewall_logging="NO" # Set to YES to enable events logging -firewall_logif="NO" # Set to YES to create logging-pseudo interface firewall_flags="" # Flags passed to ipfw when type is a file firewall_coscripts="" # List of executables/scripts to run after # firewall starts/stops diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw index 6d6f7577828f..a9b05ee11132 100755 --- a/libexec/rc/rc.d/ipfw +++ b/libexec/rc/rc.d/ipfw @@ -85,16 +85,6 @@ ipfw_start() echo 'Firewall logging enabled.' ${SYSCTL} net.inet.ip.fw.verbose=1 >/dev/null fi - if checkyesno firewall_logif; then - if ! ifconfig ipfw0 >/dev/null 2>&1; then - ifconfig ipfw0 create - echo 'Firewall logging pseudo-interface (ipfw0)' \ - 'created.' - else - echo 'Firewall logging pseudo-interface (ipfw0)' \ - 'already created.' - fi - fi } ipfw_poststart() diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 249bd195b4de..789512e5cc1e 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -701,28 +701,13 @@ Unless per-rule log destination is specified by .Cm logdst Ar logdst_spec option (see below), packets are logged in two ways: if the sysctl variable .Va net.inet.ip.fw.verbose -is set to 0 (default), one can use +is set to 0 (default), one can use the .Xr bpf 4 -attached to the -.Li ipfw0 -pseudo interface. -This pseudo interface can be created manually after a system -boot by using the following command: -.Bd -literal -offset indent -# ifconfig ipfw0 create -.Ed -.Pp -Or, automatically at boot time by adding the following -line to the -.Xr rc.conf 5 -file: -.Bd -literal -offset indent -firewall_logif="YES" -.Ed -.Pp +tap named +.Li ipfw0 . There is zero overhead when no .Xr bpf 4 -is attached to the pseudo interface. +listener is attached to the tap. .Pp If .Va net.inet.ip.fw.verbose @@ -3676,16 +3661,11 @@ reply to the sent ICMP message. Default value is .Ar 60 . .It Cm log -Turn on logging of all handled packets via BPF through -.Ar ipfwlog0 -interface. -.Ar ipfwlog0 -is a pseudo interface and can be created after a boot manually with -.Cm ifconfig -command. +Turn on logging of all handled packets via BPF tap named +.Ar ipfwlog0 . Note that it has different purpose than .Ar ipfw0 -interface. +tap. Translators sends to BPF an additional information with each packet. With .Cm tcpdump @@ -3744,7 +3724,7 @@ contains mapping how IPv6 addresses should be translated to IPv4 addresses. .It Cm log Turn on logging of all handled packets via BPF through .Ar ipfwlog0 -interface. +tap. .It Cm -log Turn off logging of all handled packets via BPF. .It Cm allow_private @@ -3793,7 +3773,7 @@ This IPv6 prefix should be configured on a remote NAT64 translator. .It Cm log Turn on logging of all handled packets via BPF through .Ar ipfwlog0 -interface. +tap. .It Cm -log Turn off logging of all handled packets via BPF. .It Cm allow_private diff --git a/sys/netpfil/ipfw/ip_fw_bpf.c b/sys/netpfil/ipfw/ip_fw_bpf.c index 155e269214ec..68f31ca59b2e 100644 --- a/sys/netpfil/ipfw/ip_fw_bpf.c +++ b/sys/netpfil/ipfw/ip_fw_bpf.c @@ -1,6 +1,7 @@ /*- * Copyright (c) 2016 Yandex LLC * Copyright (c) 2016 Andrey V. Elsukov + * Copyright (c) 2025 Gleb Smirnoff * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,14 +30,11 @@ #include #include #include +#include #include #include #include #include -#include -#include -#include -#include #include #include @@ -45,158 +43,66 @@ #include #include -VNET_DEFINE_STATIC(struct ifnet *, log_if); -VNET_DEFINE_STATIC(struct ifnet *, pflog_if); -VNET_DEFINE_STATIC(struct if_clone *, ipfw_cloner); -VNET_DEFINE_STATIC(struct if_clone *, ipfwlog_cloner); -#define V_ipfw_cloner VNET(ipfw_cloner) -#define V_ipfwlog_cloner VNET(ipfwlog_cloner) -#define V_log_if VNET(log_if) -#define V_pflog_if VNET(pflog_if) - -static const char ipfwname[] = "ipfw"; -static const char ipfwlogname[] = "ipfwlog"; - -static int -ipfw_bpf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) -{ - - return (EINVAL); -} - -static int -ipfw_bpf_output(struct ifnet *ifp, struct mbuf *m, - const struct sockaddr *dst, struct route *ro) +static bool +bpf_ipfw_chkdir(void *arg __unused, const struct mbuf *m, int dir) { - - if (m != NULL) - FREE_PKT(m); - return (0); + return ((dir == BPF_D_IN && m_rcvif(m) == NULL) || + (dir == BPF_D_OUT && m_rcvif(m) != NULL)); } -static void -ipfw_clone_destroy(struct ifnet *ifp) -{ - - if (ifp->if_hdrlen == ETHER_HDR_LEN) - V_log_if = NULL; - else - V_pflog_if = NULL; +static const struct bif_methods bpf_ipfw_methods = { + .bif_chkdir = bpf_ipfw_chkdir, +}; - NET_EPOCH_WAIT(); - bpfdetach(ifp); - if_detach(ifp); - if_free(ifp); -} +static const char ipfwname[] = "ipfw0"; +static const char ipfwlogname[] = "ipfwlog0"; -static int -ipfw_clone_create(struct if_clone *ifc, int unit, caddr_t params) -{ - struct ifnet *ifp; - - ifp = if_alloc(IFT_PFLOG); - if_initname(ifp, ipfwname, unit); - ifp->if_flags = IFF_UP | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_mtu = 65536; - ifp->if_ioctl = ipfw_bpf_ioctl; - ifp->if_output = ipfw_bpf_output; - ifp->if_hdrlen = ETHER_HDR_LEN; - if_attach(ifp); - bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); - if (V_log_if != NULL) { - bpfdetach(ifp); - if_detach(ifp); - if_free(ifp); - return (EEXIST); - } - V_log_if = ifp; - return (0); -} - -static int -ipfwlog_clone_create(struct if_clone *ifc, int unit, caddr_t params) -{ - struct ifnet *ifp; - - ifp = if_alloc(IFT_PFLOG); - if_initname(ifp, ipfwlogname, unit); - ifp->if_flags = IFF_UP | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_mtu = 65536; - ifp->if_ioctl = ipfw_bpf_ioctl; - ifp->if_output = ipfw_bpf_output; - ifp->if_hdrlen = PFLOG_HDRLEN; - if_attach(ifp); - bpfattach(ifp, DLT_PFLOG, PFLOG_HDRLEN); - if (V_pflog_if != NULL) { - bpfdetach(ifp); - if_detach(ifp); - if_free(ifp); - return (EEXIST); - } - V_pflog_if = ifp; - return (0); -} +VNET_DEFINE_STATIC(struct bpf_if *, bpf_en10mb); +VNET_DEFINE_STATIC(struct bpf_if *, bpf_pflog); +#define V_bpf_en10mb VNET(bpf_en10mb) +#define V_bpf_pflog VNET(bpf_pflog) void ipfw_bpf_tap(u_char *pkt, u_int pktlen) { - struct ifnet *ifp = V_log_if; - - NET_EPOCH_ASSERT(); - if (ifp != NULL) - BPF_TAP(ifp, pkt, pktlen); + bpf_tap(V_bpf_en10mb, pkt, pktlen); } void ipfw_bpf_mtap(struct mbuf *m) { - struct ifnet *ifp = V_log_if; - - NET_EPOCH_ASSERT(); - if (ifp != NULL) - BPF_MTAP(ifp, m); + bpf_mtap(V_bpf_en10mb, m); } void ipfw_bpf_mtap2(void *data, u_int dlen, struct mbuf *m) { - struct ifnet *logif; - - NET_EPOCH_ASSERT(); switch (dlen) { case (ETHER_HDR_LEN): - logif = V_log_if; + bpf_mtap2(V_bpf_en10mb, data, dlen, m); break; case (PFLOG_HDRLEN): - logif = V_pflog_if; + bpf_mtap2(V_bpf_pflog, data, dlen, m); break; default: -#ifdef INVARIANTS - panic("%s: unsupported len %d", __func__, dlen); -#endif - logif = NULL; + MPASS(0); } - - if (logif != NULL) - BPF_MTAP2(logif, data, dlen, m); } void ipfw_bpf_init(int first __unused) { - V_log_if = NULL; - V_pflog_if = NULL; - V_ipfw_cloner = if_clone_simple(ipfwname, ipfw_clone_create, - ipfw_clone_destroy, 0); - V_ipfwlog_cloner = if_clone_simple(ipfwlogname, ipfwlog_clone_create, - ipfw_clone_destroy, 0); + V_bpf_en10mb = bpf_attach(ipfwname, DLT_EN10MB, ETHER_HDR_LEN, + &bpf_ipfw_methods, NULL); + V_bpf_pflog = bpf_attach(ipfwlogname, DLT_PFLOG, PFLOG_HDRLEN, + &bpf_ipfw_methods, NULL); } void ipfw_bpf_uninit(int last __unused) { - if_clone_detach(V_ipfw_cloner); - if_clone_detach(V_ipfwlog_cloner); + bpf_detach(V_bpf_en10mb); + bpf_detach(V_bpf_pflog); } From nobody Mon Dec 15 21:45:34 2025 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 4dVYWz03xYz6LNWy for ; Mon, 15 Dec 2025 21:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYWy4pzjz3pxJ for ; Mon, 15 Dec 2025 21:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835134; 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=VqnzMf8+hncDf3I9hXDbodQsdPeSaiqHihVdUTwgde0=; b=uUQpoFovn9HN0eYnhVoKmawy3C0U41xMKdvtvBRKSYO/qMBPztM6zn06fvMoHFk4StXjyw H4tEsblPL2ghdGOOY3L7VBU/XLLFywDQMNLp6MtD/y4aTtl+D6bZVDRBusWhgzhtkv+3C2 OyEDir4W42ECofbewvRmUVmREN5EedaRkd8gFqFeKek8C9QdIR4h3Y9onFeyZTAUG9bPUh EsGBlHORvgG0/P3wNQL7YbILVdbPdX+SQD0rUz+YoUYoD6EleTQyBvLD3lhY1lKuX70ZKu 3OaGT1UWlXw6MNfSPNOGt3xHcptdPdN667I1NPPStPvlwRWINhgwBRbveA/11A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835134; 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=VqnzMf8+hncDf3I9hXDbodQsdPeSaiqHihVdUTwgde0=; b=bIqdsu3awCoKH5d8+UDfEJpjSBg0K6lfi+ZS0GoDigSfxRVaLh4Ip6JJXw4lVVL+SXXdwf ZpoUq7mxNaxlfN1cYQ6SYgf/mU3haFwkW+Tkff7EpsDUwYX/xgkb77QJXMlelgsFWC2D7f rnAomADMlc/vU5jdu3iBUJn7kf1tJzm7fxKhWAM+7gPSF6/LfRMM1JMqz0E/2PFrJ9/kSi P1F/X+6XZUFIxkMZmrfDBvcq0WZ5eqX69DAJpmLYq7yAU4/dmYtlP0LVSngmmgGzUskwiw 2ZZqvTRCM/90u8vrP9bkm1Ey3U41ugqolV/6lpR7Sqkf/M7FxWIAF+La0bbJoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835134; a=rsa-sha256; cv=none; b=nW5XqD0FJXfZ997oYSlEagh7iNUvesmWwKg7D2t0sQOM/y1bK+GV5qwFqhuqOyYP557p34 +EdaSBO4h03+QoWxGu2TL4SZB71di/rcFZRe5CGU6p8gMptdqqwC0Rn/aCX6/yhyj5nvL+ Cbqa88xFve2OOvaj8Z5UNbaIkBKTYopvf1kIILd0RMO0OUPCqrAqLXMDq1rPUVQ4i3mdHf 7o5d/5apQhOu1QswFPDuRqs/6EDtXOxUZknVTW9fYu9dPhP4gsEuQMzU8zFl6ajYwzq1Vb bixjQPTmQULGt7558FYFlXGUYAFABYauq7+QXxIfpDnrTvB08vBjdvgqSA3aOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYWy4N2rzdFW for ; Mon, 15 Dec 2025 21:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41e7f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 1c5021f5251b - main - ifconfig: print warning and return success on ipfw0, ipfwlog0 cloning 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: 1c5021f5251b231b614ad9cd175bcb4250495c12 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:34 +0000 Message-Id: <6940817e.41e7f.25a9f19d@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1c5021f5251b231b614ad9cd175bcb4250495c12 commit 1c5021f5251b231b614ad9cd175bcb4250495c12 Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:51:47 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 21:17:23 +0000 ifconfig: print warning and return success on ipfw0, ipfwlog0 cloning This should provide people a chance to remove ipfw0 and ipfwlog0 from cloned_interfaces in their rc.conf during FreeBSD 16.x lifetime. Differential Revision: https://reviews.freebsd.org/D53876 --- sbin/ifconfig/ifclone.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sbin/ifconfig/ifclone.c b/sbin/ifconfig/ifclone.c index f44d052c97ad..8941d17ad205 100644 --- a/sbin/ifconfig/ifclone.c +++ b/sbin/ifconfig/ifclone.c @@ -117,6 +117,15 @@ ifclonecreate(if_ctx *ctx, void *arg __unused) { struct ifreq ifr = {}; struct clone_defcb *dcp; + u_int u; + + /* Warning to be removed in FreeBSD 17.0 */ + if (sscanf(ctx->ifname, "ipfw%u", &u) == 1 || + sscanf(ctx->ifname, "ipfwlog%u", &u) == 1) { + warnx("ipfw(4) logging does not need interface creation " + "in FreeBSD 16.0"); + return; + } strlcpy(ifr.ifr_name, ctx->ifname, sizeof(ifr.ifr_name)); From nobody Mon Dec 15 21:45:35 2025 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 4dVYX02vqlz6LNlh for ; Mon, 15 Dec 2025 21:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYWz5byBz3pxW for ; Mon, 15 Dec 2025 21:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835135; 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=56R+3f0mMTEuJlgIE5QcsH558moSqhKV5oXeXsN4214=; b=dIDhHkpgvE3mYyGLT0z58gsn3cAbphNjerfeh1NZ1292AujXbnQFM/OyRnpBzuNB0h5OGX lH8KUyXP6JKgUe+jpGfR+OvAJnX12ClpOKpF7xtYNMz/quse1iyaMPBTdwH08Ib8IKssw4 NaAIoVtb5zAhrIEuJHUE/CO5Dnr3z1xUji/LONOJ/S429c7QyCOTh7bfhMiw2Z5Q3aGZ90 DoaO0t9cMcFIETNEVayQl4wGwX8le1LXe/kUqIADPM4kyQcXX0HvYDt3Gq4jD+LXqTSKFG pxKyrJcV1iqg5HBOso/7+CMY3xY1ciR5mxIqI6clboaGAVv4fgt7WEKA6UxHkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835135; 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=56R+3f0mMTEuJlgIE5QcsH558moSqhKV5oXeXsN4214=; b=NfaYdfomE6qftPsDRqCDs/BkcSQo8GNi+iLrNhJYys7BDuZCjPDHr2c8ESWcl1k8zyk6Wh vlqZTdDy+dupxN7qKUd7wuIHI2l5m/hxslLYD7NOFIfD/z5xVWWeE4wnaDhQVlh/RQHNAf Rp16A7wKoCAjn2xYGVM1OMVh9Zz6lMeAd8wPxLLExeqnCLO+awWsCwdN3Dm7wZnGiJ2OW4 RrPv5OhHyDEHNCQsHWDS8JNlgowkUr+IcYBWb3wMqesBDMatLxgQttbpB41FJUTZm5oZKn 9Qys74GUyFtfFRhG2rsHsndWBn/gWrJuBy+ZGRmcp641wZGe3pyZEIqX+HFoXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835135; a=rsa-sha256; cv=none; b=j5UtTQjmVjWb19zUirHhR3x9zCBbOXHF46vEiFwBMStj8BqtZ47h4KpaRan0/WL7G6+Pz/ iIt0XQaQtjNtIVaHZ97KJsHbPzae/b+kOZijOqKv5lfvCkBoEEfyVCTqBCXMSd7ehd053K geSva4JcGgI+RTHu6iJup21lhk37PL5S6kT46YNpUn+qplt0e6NxdJdKo3cDHfh7JLEN3D vN9ci1yo/sYE+TqBsEPsCOrrP8Ll0sX5WypFN9DyqzerIRBpRKCRCR0lidwEgJLn5S0f6U oiWInGGIfSW1XuuoD72XC/Jd01vNQJGri+TH0G0TqnTYxYkqG4g4w+cuZ2QAgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYWz54g1zdlc for ; Mon, 15 Dec 2025 21:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41fb1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 3daae1ac1d82 - main - ipfw: create a bpf tap point for every log rule 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: 3daae1ac1d82ecdcd855101bab5206e914b12350 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:35 +0000 Message-Id: <6940817f.41fb1.933e41e@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3daae1ac1d82ecdcd855101bab5206e914b12350 commit 3daae1ac1d82ecdcd855101bab5206e914b12350 Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:51:51 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 21:17:23 +0000 ipfw: create a bpf tap point for every log rule Dynamically allocate bpf tap points for every rule that has "log". The name is "ipfw%u", where %u is substituted to the rule number. The default catch all "ipfw0" tap still exists for compatibility and it will catch packets in case if there are no bpf listeners on a per-rule tap. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D53877 --- sbin/ipfw/ipfw.8 | 31 +++++--- sbin/ipfw/ipfw2.c | 7 +- sys/netpfil/ipfw/ip_fw_bpf.c | 119 ++++++++++++++++++++++++------- sys/netpfil/ipfw/ip_fw_log.c | 30 +------- sys/netpfil/ipfw/ip_fw_private.h | 7 +- sys/netpfil/ipfw/ip_fw_sockopt.c | 5 ++ sys/netpfil/ipfw/nat64/nat64_translate.c | 2 +- sys/netpfil/ipfw/nat64/nat64clat.c | 2 +- sys/netpfil/ipfw/nat64/nat64lsn.c | 2 +- sys/netpfil/ipfw/nat64/nat64stl.c | 2 +- 10 files changed, 135 insertions(+), 72 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 789512e5cc1e..7a81c84de3e4 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd December 4, 2025 +.Dd December 10, 2025 .Dt IPFW 8 .Os .Sh NAME @@ -704,7 +704,18 @@ option (see below), packets are logged in two ways: if the sysctl variable is set to 0 (default), one can use the .Xr bpf 4 tap named -.Li ipfw0 . +.Li ipfwXXXXX , +where XXXXX is the number of the rule that has the +.Cm log +keyword. +The compatibility +.Xr bpf 4 +tap named +.Li ipfw0 +still exists. +It will catch packets in case if there are no +.Xr bpf 4 +listener(s) on a per-rule tap. There is zero overhead when no .Xr bpf 4 listener is attached to the tap. @@ -746,10 +757,12 @@ Logs a packet to with a .Dv LOG_SECURITY facility. -.It Ar ipfw0 +.It Ar bpf Logs a packet to the -.Li ipfw0 -pseudo interface. +.Xr bpf 4 +tap named +.Li ipfwXXXXX , +where XXXXX is the rule number. .It Ar rtsock Logs a packet to the .Xr route 4 @@ -769,7 +782,7 @@ I.e. A packet matching a rule with .Cm log logamount 100 .Cm logdst -syslog,ipfw0 ... +syslog,bpf ... .Ed .Pp will log upto 50 packets. @@ -3663,9 +3676,9 @@ Default value is .It Cm log Turn on logging of all handled packets via BPF tap named .Ar ipfwlog0 . -Note that it has different purpose than -.Ar ipfw0 -tap. +Note that it has different purpose than per-rule +.Xr bpf 4 +taps. Translators sends to BPF an additional information with each packet. With .Cm tcpdump diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 27ccaea2c78f..26baa596cc89 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -2013,7 +2013,7 @@ print_logdst(struct buf_pr *bp, uint16_t arg1) comma = ","; } if (arg1 & IPFW_LOG_IPFW0) { - bprintf(bp, "%sipfw0", comma); + bprintf(bp, "%sbpf", comma); comma = ","; } if (arg1 & IPFW_LOG_RTSOCK) { @@ -4066,8 +4066,9 @@ parse_logdst(char *logdst_iter) ret |= IPFW_LOG_SYSLOG; continue; } - if (_substrcmp(token, "ipfw0") == 0) { - /* XXX add multiple ipfw* */ + /* ipfw0 is compatibility keyword. */ + if (_substrcmp(token, "bpf") == 0 || + _substrcmp(token, "ipfw0") == 0) { ret |= IPFW_LOG_IPFW0; continue; } diff --git a/sys/netpfil/ipfw/ip_fw_bpf.c b/sys/netpfil/ipfw/ip_fw_bpf.c index 68f31ca59b2e..aa92d30007c2 100644 --- a/sys/netpfil/ipfw/ip_fw_bpf.c +++ b/sys/netpfil/ipfw/ip_fw_bpf.c @@ -32,13 +32,14 @@ #include #include #include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -54,48 +55,114 @@ static const struct bif_methods bpf_ipfw_methods = { .bif_chkdir = bpf_ipfw_chkdir, }; -static const char ipfwname[] = "ipfw0"; -static const char ipfwlogname[] = "ipfwlog0"; +struct ipfw_tap { + RB_ENTRY(ipfw_tap) entry; + uint32_t rule; + u_int refs; + struct bpf_if *bpf; + char name[sizeof("ipfw4294967295")]; +}; -VNET_DEFINE_STATIC(struct bpf_if *, bpf_en10mb); -VNET_DEFINE_STATIC(struct bpf_if *, bpf_pflog); -#define V_bpf_en10mb VNET(bpf_en10mb) -#define V_bpf_pflog VNET(bpf_pflog) +static int32_t +tap_compare(const struct ipfw_tap *a, const struct ipfw_tap *b) +{ + return ((int32_t)(a->rule/2 - b->rule/2)); +} +RB_HEAD(tap_tree, ipfw_tap); +VNET_DEFINE_STATIC(struct tap_tree, tap_tree); +#define V_tap_tree VNET(tap_tree) +RB_GENERATE_STATIC(tap_tree, ipfw_tap, entry, tap_compare); +VNET_DEFINE_STATIC(struct ipfw_tap *, default_tap); +#define V_default_tap VNET(default_tap) void -ipfw_bpf_tap(u_char *pkt, u_int pktlen) +ipfw_tap_alloc(uint32_t rule) { - bpf_tap(V_bpf_en10mb, pkt, pktlen); + struct ipfw_tap *tap, key = { .rule = rule }; + int n __diagused; + + tap = RB_FIND(tap_tree, &V_tap_tree, &key); + if (tap != NULL) { + MPASS(tap->rule == rule); + tap->refs++; + return; + } + tap = malloc(sizeof(*tap), M_IPFW, M_WAITOK); + tap->rule = rule; + tap->refs = 1; + /* Note: the default rule logs to "ipfw0". */ + if (__predict_false(rule == IPFW_DEFAULT_RULE)) { + V_default_tap = tap; + rule = 0; + } + n = snprintf(tap->name, sizeof(tap->name), "ipfw%u", rule); + MPASS(n > 4 && n < sizeof("ipfw4294967295")); + tap->bpf = bpf_attach(tap->name, DLT_EN10MB, PFLOG_HDRLEN, + &bpf_ipfw_methods, NULL); + tap = RB_INSERT(tap_tree, &V_tap_tree, tap); + MPASS(tap == NULL); } void -ipfw_bpf_mtap(struct mbuf *m) +ipfw_tap_free(uint32_t rule) { - bpf_mtap(V_bpf_en10mb, m); + + struct ipfw_tap *tap, key = { .rule = rule }; + + tap = RB_FIND(tap_tree, &V_tap_tree, &key); + MPASS(tap != NULL); + if (--tap->refs == 0) { + bpf_detach(tap->bpf); + RB_REMOVE(tap_tree, &V_tap_tree, tap); + free(tap, M_IPFW); + } } void -ipfw_bpf_mtap2(void *data, u_int dlen, struct mbuf *m) +ipfw_bpf_tap(struct ip_fw_args *args, struct ip *ip, uint32_t rulenum) { - switch (dlen) { - case (ETHER_HDR_LEN): - bpf_mtap2(V_bpf_en10mb, data, dlen, m); - break; - case (PFLOG_HDRLEN): - bpf_mtap2(V_bpf_pflog, data, dlen, m); - break; - default: - MPASS(0); + struct ipfw_tap *tap, key = { .rule = rulenum }; + + tap = RB_FIND(tap_tree, &V_tap_tree, &key); + MPASS(tap != NULL); + if (!bpf_peers_present(tap->bpf)) + tap = V_default_tap; + if (args->flags & IPFW_ARGS_LENMASK) { + bpf_tap(tap->bpf, args->mem, IPFW_ARGS_LENGTH(args->flags)); + } else if (args->flags & IPFW_ARGS_ETHER) { + /* layer2, use orig hdr */ + bpf_mtap(tap->bpf, args->m); + } else { + char *fakehdr; + + /* Add fake header. Later we will store + * more info in the header. + */ + if (ip->ip_v == 4) + fakehdr = "DDDDDDSSSSSS\x08\x00"; + else if (ip->ip_v == 6) + fakehdr = "DDDDDDSSSSSS\x86\xdd"; + else + /* Obviously bogus EtherType. */ + fakehdr = "DDDDDDSSSSSS\xff\xff"; + + bpf_mtap2(tap->bpf, fakehdr, ETHER_HDR_LEN, args->m); } } +VNET_DEFINE_STATIC(struct bpf_if *, bpf_pflog); +#define V_bpf_pflog VNET(bpf_pflog) void -ipfw_bpf_init(int first __unused) +ipfw_pflog_tap(void *data, struct mbuf *m) { + bpf_mtap2(V_bpf_pflog, data, PFLOG_HDRLEN, m); +} - V_bpf_en10mb = bpf_attach(ipfwname, DLT_EN10MB, ETHER_HDR_LEN, - &bpf_ipfw_methods, NULL); - V_bpf_pflog = bpf_attach(ipfwlogname, DLT_PFLOG, PFLOG_HDRLEN, +void +ipfw_bpf_init(int first __unused) +{ + ipfw_tap_alloc(IPFW_DEFAULT_RULE); + V_bpf_pflog = bpf_attach("ipfwlog0", DLT_PFLOG, PFLOG_HDRLEN, &bpf_ipfw_methods, NULL); } @@ -103,6 +170,6 @@ void ipfw_bpf_uninit(int last __unused) { - bpf_detach(V_bpf_en10mb); + ipfw_tap_free(IPFW_DEFAULT_RULE); bpf_detach(V_bpf_pflog); } diff --git a/sys/netpfil/ipfw/ip_fw_log.c b/sys/netpfil/ipfw/ip_fw_log.c index b87aa3da9413..b84e8cbf7e59 100644 --- a/sys/netpfil/ipfw/ip_fw_log.c +++ b/sys/netpfil/ipfw/ip_fw_log.c @@ -96,31 +96,6 @@ #define TARG(k, f) IP_FW_ARG_TABLEARG(chain, k, f) -static void -ipfw_log_ipfw0(struct ip_fw_args *args, struct ip *ip) -{ - if (args->flags & IPFW_ARGS_LENMASK) - ipfw_bpf_tap(args->mem, IPFW_ARGS_LENGTH(args->flags)); - else if (args->flags & IPFW_ARGS_ETHER) - /* layer2, use orig hdr */ - ipfw_bpf_mtap(args->m); - else { - /* Add fake header. Later we will store - * more info in the header. - */ - if (ip->ip_v == 4) - ipfw_bpf_mtap2("DDDDDDSSSSSS\x08\x00", - ETHER_HDR_LEN, args->m); - else if (ip->ip_v == 6) - ipfw_bpf_mtap2("DDDDDDSSSSSS\x86\xdd", - ETHER_HDR_LEN, args->m); - else - /* Obviously bogus EtherType. */ - ipfw_bpf_mtap2("DDDDDDSSSSSS\xff\xff", - ETHER_HDR_LEN, args->m); - } -} - /* * XXX this function alone takes about 2Kbytes of code! */ @@ -747,7 +722,8 @@ ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, /* O_LOG is the first action */ ((cmd = ACTION_PTR(f)) && cmd->arg1 == IPFW_LOG_DEFAULT)) { if (V_fw_verbose == 0) { - ipfw_log_ipfw0(args, ip); + ipfw_bpf_tap(args, ip, + f != NULL ? f->rulenum : IPFW_DEFAULT_RULE); return; } ipfw_log_syslog(chain, f, hlen, args, offset, tablearg, ip); @@ -761,6 +737,6 @@ ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, ipfw_log_rtsock(chain, f, hlen, args, offset, tablearg, eh); if (cmd->arg1 & IPFW_LOG_IPFW0) - ipfw_log_ipfw0(args, ip); + ipfw_bpf_tap(args, ip, f->rulenum); } /* end of file */ diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h index c490d2849a7d..c60b7aa47e94 100644 --- a/sys/netpfil/ipfw/ip_fw_private.h +++ b/sys/netpfil/ipfw/ip_fw_private.h @@ -161,9 +161,10 @@ struct ip_fw_chain; void ipfw_bpf_init(int); void ipfw_bpf_uninit(int); -void ipfw_bpf_tap(u_char *, u_int); -void ipfw_bpf_mtap(struct mbuf *); -void ipfw_bpf_mtap2(void *, u_int, struct mbuf *); +void ipfw_tap_alloc(uint32_t); +void ipfw_tap_free(uint32_t); +void ipfw_bpf_tap(struct ip_fw_args *, struct ip *, uint32_t); +void ipfw_pflog_tap(void *, struct mbuf *); void ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, struct ip_fw_args *args, u_short offset, uint32_t tablearg, struct ip *ip, void *eh); diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c index 5d57759ffb00..a91fb2e84da9 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -210,6 +210,8 @@ ipfw_free_rule(struct ip_fw *rule) */ if (rule->refcnt > 1) return; + if (ACTION_PTR(rule)->opcode == O_LOG) + ipfw_tap_free(rule->rulenum); uma_zfree_pcpu(V_ipfw_cntr_zone, rule->cntr); free(rule, M_IPFW); } @@ -2511,6 +2513,9 @@ import_rule_v1(struct ip_fw_chain *chain, struct rule_check_info *ci) /* Copy opcodes */ memcpy(krule->cmd, urule->cmd, krule->cmd_len * sizeof(uint32_t)); + + if (ACTION_PTR(krule)->opcode == O_LOG) + ipfw_tap_alloc(krule->rulenum); } /* diff --git a/sys/netpfil/ipfw/nat64/nat64_translate.c b/sys/netpfil/ipfw/nat64/nat64_translate.c index 393780c969fe..99340b4e16f1 100644 --- a/sys/netpfil/ipfw/nat64/nat64_translate.c +++ b/sys/netpfil/ipfw/nat64/nat64_translate.c @@ -151,7 +151,7 @@ nat64_log(struct pfloghdr *logdata, struct mbuf *m, sa_family_t family) logdata->dir = PF_OUT; logdata->af = family; - ipfw_bpf_mtap2(logdata, PFLOG_HDRLEN, m); + ipfw_pflog_tap(logdata, m); } static int diff --git a/sys/netpfil/ipfw/nat64/nat64clat.c b/sys/netpfil/ipfw/nat64/nat64clat.c index d524652e9a99..c458f85755d3 100644 --- a/sys/netpfil/ipfw/nat64/nat64clat.c +++ b/sys/netpfil/ipfw/nat64/nat64clat.c @@ -77,7 +77,7 @@ nat64clat_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, plog->subrulenr = htonl(pktid); plog->ruleset[0] = '\0'; strlcpy(plog->ifname, "NAT64CLAT", sizeof(plog->ifname)); - ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); + ipfw_pflog_tap(plog, m); } static int diff --git a/sys/netpfil/ipfw/nat64/nat64lsn.c b/sys/netpfil/ipfw/nat64/nat64lsn.c index 5d2ee7ee3b34..1bac425afc30 100644 --- a/sys/netpfil/ipfw/nat64/nat64lsn.c +++ b/sys/netpfil/ipfw/nat64/nat64lsn.c @@ -187,7 +187,7 @@ nat64lsn_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, (state->proto << 8) | (state->ip_dst & 0xff)); plog->ruleset[0] = '\0'; strlcpy(plog->ifname, "NAT64LSN", sizeof(plog->ifname)); - ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); + ipfw_pflog_tap(plog, m); } #define HVAL(p, n, s) jenkins_hash32((const uint32_t *)(p), (n), (s)) diff --git a/sys/netpfil/ipfw/nat64/nat64stl.c b/sys/netpfil/ipfw/nat64/nat64stl.c index ad1f2b3ec378..c1ca2dfd5e13 100644 --- a/sys/netpfil/ipfw/nat64/nat64stl.c +++ b/sys/netpfil/ipfw/nat64/nat64stl.c @@ -76,7 +76,7 @@ nat64stl_log(struct pfloghdr *plog, struct mbuf *m, sa_family_t family, plog->subrulenr = htonl(pktid); plog->ruleset[0] = '\0'; strlcpy(plog->ifname, "NAT64STL", sizeof(plog->ifname)); - ipfw_bpf_mtap2(plog, PFLOG_HDRLEN, m); + ipfw_pflog_tap(plog, m); } static int From nobody Mon Dec 15 21:45:36 2025 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 4dVYX10t0Rz6LNZW for ; Mon, 15 Dec 2025 21:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYX06Jt3z3ppt for ; Mon, 15 Dec 2025 21:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835136; 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=bcczUOYdIFiMymERN0rN9Jviochr4lJdaMNj1eGgv+4=; b=CW5N4VmSEG8XbbKDnG1fZr+ZhXR7GCKW4T/i8rQuPCXERqICvT/EWxk6YIcmObo66W/R4q By7g3SpNu/0kOKoz6eJq2XFRqIwSxsnuuba+Svfgtjx2n+2NG42I1cScq5KiZWL28iroGJ njbrJ0/VmMOr4AMkLZWCVWUHNUOfAaN43cv1yDj8G+KHl/4DrK79NCDW8XdDgBVxwFDd8q k36+ty0FKVifG4hK2lwNNVglPogU/0voAtg6yV4si0jXUld3H43P8b00Tr43cezue3/VNs z0lHWi1PtyuQg6qLJqaxg9oGiIovOCd08sD4STpL7BGnsVLkT9RMuTyEOaFpsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835136; 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=bcczUOYdIFiMymERN0rN9Jviochr4lJdaMNj1eGgv+4=; b=kKPYqbs6P7dVQ23Rqhs1xE4v+FXRukBt9C6tbBrIKkQYmchSyO1++KTMFAeFNaEPGZkS18 SGqWJ6D1Csey2aXwelNh8+fIDCL5iaekKwVfipePGdilHxd0XwDFXyM9V1KL0syce/sY/m JqUSqqeejh8ee/ZbDBD+pLKAa+JrygCsQB3Lh8G2/nWfZ8Un7smja4ETUuvXIuA+lSVbL4 cjPXqaqDbSBtlzb0ngYlVVE0b5u6ySSq2j00MfZkIwr0oK/bwPS4HxDtY2q2qKVZefzg0h sTS62G4zkv8ihEXWBd6NNleq7UvR3BzdIVaZ8y17YgMJWPHfk9AxLJJb+b/X9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835136; a=rsa-sha256; cv=none; b=GwK+PP+ehj70ExrkhLZMt26ovboFCM1OCE7p+3lbxBH7AA6kRcyfcw5Oa4DFN2T+IoKZyr WF9yOOqAQ90Ky5Rv1gsFunTe9KsSWSpSHi4HmtmSAEoGojOtfvpaVamknj9aM1vrC+cqC0 4YWAF4Bj1fMXvtDDG8uh9IF5kkrM/+M7+BJP7Gd3Wse6U2kY6VC4LO3QHjcta4jybCNufY N6mSLdMI4u9HHFOxPC3Z/4DJU0WibMKQfYjrv4eG2AOGmi8yQc+3g4Y4+/ISlsVDEq7Dpc MxwrNm1PLaxddGJ49G3l/3ggnqJ74RODLG0PvtpkXMfyiDCIyhFW40cffn4nqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYX05vbkzdZy for ; Mon, 15 Dec 2025 21:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 413b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 1615eff94cda - main - usb: don't create ifnet(9) for usbus devices 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: 1615eff94cda8619561b73186ec8098cc8b14c5c Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:36 +0000 Message-Id: <69408180.413b5.ec46f5a@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1615eff94cda8619561b73186ec8098cc8b14c5c commit 1615eff94cda8619561b73186ec8098cc8b14c5c Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:51:58 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 21:17:23 +0000 usb: don't create ifnet(9) for usbus devices Differential Revision: https://reviews.freebsd.org/D54063 --- sys/dev/usb/usb_bus.h | 2 +- sys/dev/usb/usb_pf.c | 189 ++++----------------------------------------- sys/netinet6/in6.c | 1 - usr.sbin/usbdump/usbdump.c | 23 ------ 4 files changed, 14 insertions(+), 201 deletions(-) diff --git a/sys/dev/usb/usb_bus.h b/sys/dev/usb/usb_bus.h index ad7b661c2ac0..53b911e86d4e 100644 --- a/sys/dev/usb/usb_bus.h +++ b/sys/dev/usb/usb_bus.h @@ -106,7 +106,7 @@ struct usb_bus { const struct usb_bus_methods *methods; /* filled by HC driver */ struct usb_device **devices; - struct ifnet *ifp; /* only for USB Packet Filter */ + struct bpf_if *bpf; /* USB Packet Filter */ usb_power_mask_t hw_power_state; /* see USB_HW_POWER_XXX */ usb_size_t uframe_usage[USB_HS_MICRO_FRAMES_MAX]; diff --git a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c index 0e7a75d04d6a..4d2dff1ad704 100644 --- a/sys/dev/usb/usb_pf.c +++ b/sys/dev/usb/usb_pf.c @@ -43,15 +43,11 @@ #include #include #include +#include #include #include -#include -#include -#include -#include #include #include -#include #include #include @@ -65,182 +61,25 @@ #include #endif /* USB_GLOBAL_INCLUDE_FILE */ -static void usbpf_init(void *); -static void usbpf_uninit(void *); -static int usbpf_ioctl(if_t, u_long, caddr_t); -static int usbpf_clone_match(struct if_clone *, const char *); -static int usbpf_clone_create(struct if_clone *, char *, size_t, - struct ifc_data *, if_t *); -static int usbpf_clone_destroy(struct if_clone *, if_t, uint32_t); -static struct usb_bus *usbpf_ifname2ubus(const char *); static uint32_t usbpf_aggregate_xferflags(struct usb_xfer_flags *); static uint32_t usbpf_aggregate_status(struct usb_xfer_flags_int *); static int usbpf_xfer_frame_is_read(struct usb_xfer *, uint32_t); static uint32_t usbpf_xfer_precompute_size(struct usb_xfer *, int); -static struct if_clone *usbpf_cloner; -static const char usbusname[] = "usbus"; - -SYSINIT(usbpf_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_init, NULL); -SYSUNINIT(usbpf_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_uninit, NULL); - -static void -usbpf_init(void *arg) -{ - struct if_clone_addreq req = { - .match_f = usbpf_clone_match, - .create_f = usbpf_clone_create, - .destroy_f = usbpf_clone_destroy, - }; - - usbpf_cloner = ifc_attach_cloner(usbusname, &req); -} - -static void -usbpf_uninit(void *arg) -{ - int devlcnt; - device_t *devlp; - devclass_t dc; - struct usb_bus *ubus; - int error; - int i; - - if_clone_detach(usbpf_cloner); - - dc = devclass_find(usbusname); - if (dc == NULL) - return; - error = devclass_get_devices(dc, &devlp, &devlcnt); - if (error) - return; - for (i = 0; i < devlcnt; i++) { - ubus = device_get_softc(devlp[i]); - if (ubus != NULL && ubus->ifp != NULL) - usbpf_clone_destroy(usbpf_cloner, ubus->ifp, 0); - } - free(devlp, M_TEMP); -} - -static int -usbpf_ioctl(if_t ifp, u_long cmd, caddr_t data) -{ - - /* No configuration allowed. */ - return (EINVAL); -} - -static struct usb_bus * -usbpf_ifname2ubus(const char *ifname) -{ - device_t dev; - devclass_t dc; - int unit; - int error; - - if (strncmp(ifname, usbusname, sizeof(usbusname) - 1) != 0) - return (NULL); - error = ifc_name2unit(ifname, &unit); - if (error || unit < 0) - return (NULL); - dc = devclass_find(usbusname); - if (dc == NULL) - return (NULL); - dev = devclass_get_device(dc, unit); - if (dev == NULL) - return (NULL); - - return (device_get_softc(dev)); -} - -static int -usbpf_clone_match(struct if_clone *ifc, const char *name) -{ - struct usb_bus *ubus; - - ubus = usbpf_ifname2ubus(name); - if (ubus == NULL) - return (0); - if (ubus->ifp != NULL) - return (0); - - return (1); -} - -static int -usbpf_clone_create(struct if_clone *ifc, char *name, size_t len, - struct ifc_data *ifd, if_t *ifpp) -{ - int error; - int unit; - if_t ifp; - struct usb_bus *ubus; - - error = ifc_name2unit(name, &unit); - if (error) - return (error); - if (unit < 0) - return (EINVAL); - - ubus = usbpf_ifname2ubus(name); - if (ubus == NULL) - return (1); - if (ubus->ifp != NULL) - return (1); - - error = ifc_alloc_unit(ifc, &unit); - if (error) { - device_printf(ubus->parent, "usbpf: Could not allocate " - "instance\n"); - return (error); - } - ifp = ubus->ifp = if_alloc(IFT_USB); - if_setsoftc(ifp, ubus); - if_initname(ifp, usbusname, unit); - if_setname(ifp, name); - if_setioctlfn(ifp, usbpf_ioctl); - if_attach(ifp); - if_setflagbits(ifp, IFF_UP, 0); - rt_ifmsg(ifp, IFF_UP); +static const struct bif_methods bpf_usb_methods = { /* - * XXX According to the specification of DLT_USB, it indicates - * packets beginning with USB setup header. But not sure all - * packets would be. + * XXXGL: bpf_tap() doesn't check direction, but we actually can + * report it and make USB dumping able to match direction. */ - bpfattach(ifp, DLT_USB, USBPF_HDR_LEN); - *ifpp = ifp; - - return (0); -} - -static int -usbpf_clone_destroy(struct if_clone *ifc, if_t ifp, uint32_t flags) -{ - struct usb_bus *ubus; - int unit; - - ubus = if_getsoftc(ifp); - unit = if_getdunit(ifp); - - /* - * Lock USB before clearing the "ifp" pointer, to avoid - * clearing the pointer in the middle of a TAP operation: - */ - USB_BUS_LOCK(ubus); - ubus->ifp = NULL; - USB_BUS_UNLOCK(ubus); - bpfdetach(ifp); - if_detach(ifp); - if_free(ifp); - ifc_free_unit(ifc, unit); - - return (0); -} + .bif_chkdir = NULL +}; void usbpf_attach(struct usb_bus *ubus) { + ubus->bpf = bpf_attach(device_get_nameunit(ubus->bdev), DLT_USB, + USBPF_HDR_LEN, &bpf_usb_methods, ubus); if (bootverbose) device_printf(ubus->parent, "usbpf: Attached\n"); } @@ -249,8 +88,7 @@ void usbpf_detach(struct usb_bus *ubus) { - if (ubus->ifp != NULL) - usbpf_clone_destroy(usbpf_cloner, ubus->ifp, 0); + bpf_detach(ubus->bpf); if (bootverbose) device_printf(ubus->parent, "usbpf: Detached\n"); } @@ -387,6 +225,7 @@ usbpf_xfer_precompute_size(struct usb_xfer *xfer, int type) void usbpf_xfertap(struct usb_xfer *xfer, int type) { + struct epoch_tracker et; struct usb_bus *bus; struct usbpf_pkthdr *up; struct usbpf_framehdr *uf; @@ -401,10 +240,6 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) bus = xfer->xroot->bus; - /* sanity checks */ - if (bus->ifp == NULL || !bpf_peers_present_if(bus->ifp)) - return; - totlen = usbpf_xfer_precompute_size(xfer, type); if (type == USBPF_XFERTAP_SUBMIT) @@ -525,7 +360,9 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) } } - bpf_tap_if(bus->ifp, buf, totlen); + NET_EPOCH_ENTER(et); + bpf_tap(bus->bpf, buf, totlen); + NET_EPOCH_EXIT(et); free(buf, M_TEMP); } diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index f64b9292e4b5..158129258587 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2584,7 +2584,6 @@ in6_domifattach(struct ifnet *ifp) switch (ifp->if_type) { case IFT_PFLOG: case IFT_PFSYNC: - case IFT_USB: return (NULL); } ext = (struct in6_ifextra *)malloc(sizeof(*ext), M_IFADDR, M_WAITOK); diff --git a/usr.sbin/usbdump/usbdump.c b/usr.sbin/usbdump/usbdump.c index 887e2baeed26..40956e11a450 100644 --- a/usr.sbin/usbdump/usbdump.c +++ b/usr.sbin/usbdump/usbdump.c @@ -824,7 +824,6 @@ main(int argc, char *argv[]) int o; int filt_unit; int filt_ep; - int s; int ifindex; const char *optstring; char *pp; @@ -959,17 +958,6 @@ main(int argc, char *argv[]) /* clear ifr structure */ memset(&ifr, 0, sizeof(ifr)); - /* Try to create usbusN interface if it is not available. */ - s = socket(AF_LOCAL, SOCK_DGRAM, 0); - if (s < 0) - errx(EXIT_FAILURE, "Could not open a socket"); - ifindex = if_nametoindex(i_arg); - if (ifindex == 0) { - (void)strlcpy(ifr.ifr_name, i_arg, sizeof(ifr.ifr_name)); - if (ioctl(s, SIOCIFCREATE2, &ifr) < 0) - errx(EXIT_FAILURE, "Invalid bus interface: %s", i_arg); - } - for ( ; v >= USBPF_HDR_LEN; v >>= 1) { (void)ioctl(fd, BIOCSBLEN, (caddr_t)&v); (void)strlcpy(ifr.ifr_name, i_arg, sizeof(ifr.ifr_name)); @@ -1013,17 +1001,6 @@ main(int argc, char *argv[]) printf("%d packets received by filter\n", us.bs_recv); printf("%d packets dropped by kernel\n", us.bs_drop); - /* - * Destroy the usbusN interface only if it was created by - * usbdump(8). Ignore when it was already destroyed. - */ - if (ifindex == 0 && if_nametoindex(i_arg) > 0) { - (void)strlcpy(ifr.ifr_name, i_arg, sizeof(ifr.ifr_name)); - if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) - warn("SIOCIFDESTROY ioctl failed"); - } - close(s); - if (p->fd > 0) close(p->fd); if (p->rfd > 0) From nobody Mon Dec 15 21:45:37 2025 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 4dVYX238C2z6LNZY for ; Mon, 15 Dec 2025 21:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVYX20pzvz3pbC for ; Mon, 15 Dec 2025 21:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835138; 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=WLheAdDf11/2uHHhZEA/LjCfkRu3Q7Z2r98z8xUZGm0=; b=IManqs/l0WveVWAtrhDrtOS9Jefl3H32zmttwfY1OgcfOscRsrb/wmxUu1NjXXFXLPr8/x 0UZHWkaow/jf4ER/9H1cV1i9VQhzSjgGKuCtzj9CJ9Uj6K30uq3J/AqJ/fYp0RQLO2aRXR 0Wqaz2wTOiGFcGWBHGd7qdl6aR05LqYu2t4kZqi3bf2mDDWM16gRvi+ZU+rTPZso1oIJre Cw+9jQlc0HqmHHyQoFMAKiQ379TlCNQsW2b0KTWnChhFlEt3FMG6CnuO0kLN2YsXtqZd5d hfbGpRjOTDjY/XXS9Qk8LdfWjM6LS4sHM6jbmWz+KhaDvIxkpACQk2vHdC1Oug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765835138; 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=WLheAdDf11/2uHHhZEA/LjCfkRu3Q7Z2r98z8xUZGm0=; b=qcXUuP06nuVtHDCzo2jYHdDwaZWfswH44E7aN7AU0C3ClDlHAOTtpCW4zZJTcHdHL6LEaM 8Dip05KGuLcUO9LKVXkA3RNQkct71cwk5AoVv+pq7Sagh9X3akPEZHhhj9xIDRoQmZaR/h YlrIgtVtr8M7rp9z5KNYlHLeSHtrlIfT+xFiTgDAkWDHDzsoW3I+caPz6FEL91sJuySniJ UmtCokTDh3CwmrgcnBZHqzvOZ++2utBZnqT25qmvxWumYg5aSJO8yAsrY2w+fruc1ibQsD nu1Yx9WiYvF58aj/4fwhx/e1lWM4pipn2OOWyzj4hljAWEjg+EuVJXx4/BL+ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765835138; a=rsa-sha256; cv=none; b=Zrhu+QipDdEMTo5dL4B46IuYpMBSUF42G7nxnNScoGWFU5wMTPKXSrtD8Vprg5v9CZyKy2 xuAVPRQk8QjILcKl6pFpbemtqOnnEfHokCqcolQZYsKmF2q/imcz9eMpDoUbYQoq/oVxV1 Ii+NHAOXooqE6J3olSUS6QSIeDkifLSM0/CLFfGVz7wEv7iGLuJkn+SSD/TVsF5lpAXitu +winVRwlvalsPG5+3ET8ODuJ/TiCEvd3bCSkZMuOo5fhuPdmG7IceICkV+NtE9JRVxcJ1E Qudw5MsfO+x/fP4lGt//eIPWgcJbEK8GurjbhTkwoUNpzUHJY3qL//FTKnGR9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVYX16gDNzdhc for ; Mon, 15 Dec 2025 21:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40cd1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 21:45:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: efc8353481e3 - main - usbdump: remove some FreeBSD 9.x code 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: efc8353481e3b65daa201b7a20faad3dcc4b7f7a Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 21:45:37 +0000 Message-Id: <69408181.40cd1.6577c809@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=efc8353481e3b65daa201b7a20faad3dcc4b7f7a commit efc8353481e3b65daa201b7a20faad3dcc4b7f7a Author: Gleb Smirnoff AuthorDate: 2025-12-15 20:52:02 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-15 21:17:23 +0000 usbdump: remove some FreeBSD 9.x code --- usr.sbin/usbdump/usbdump.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/usr.sbin/usbdump/usbdump.c b/usr.sbin/usbdump/usbdump.c index 40956e11a450..d7b084657162 100644 --- a/usr.sbin/usbdump/usbdump.c +++ b/usr.sbin/usbdump/usbdump.c @@ -792,23 +792,6 @@ usage(void) exit(EX_USAGE); } -static void -check_usb_pf_sysctl(void) -{ - int error; - int no_pf_val = 0; - size_t no_pf_len = sizeof(int); - - /* check "hw.usb.no_pf" sysctl for 8- and 9- stable */ - - error = sysctlbyname("hw.usb.no_pf", &no_pf_val, - &no_pf_len, NULL, 0); - if (error == 0 && no_pf_val != 0) { - warnx("The USB packet filter might be disabled."); - warnx("See the \"hw.usb.no_pf\" sysctl for more information."); - } -} - int main(int argc, char *argv[]) { @@ -939,8 +922,6 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } - check_usb_pf_sysctl(); - p->fd = fd = open("/dev/bpf", O_RDONLY); if (p->fd < 0) err(EXIT_FAILURE, "Could not open BPF device"); From nobody Mon Dec 15 23:29:04 2025 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 4dVbqP306yz6LW7d for ; Mon, 15 Dec 2025 23:29: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVbqN28HSz43cx for ; Mon, 15 Dec 2025 23:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765841345; 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=esOMXDaUTiGlvNJ2kYbed2yj70AiXzFR9+0W/1VG45o=; b=EFFVBiQbhho954rnMneJQdyimca2grn621vA3qt6r8tkxunipiOk0+qNatvEt4g9A/z9vg m1xzE3WxnXncGIYxfmBZuoPOhEq99TqLFJNTpy1H+ifswuISSOoJjFo7bpXcGHqsTa3Auj HkM6s0rvw4hFiv3/jBTh4JDis3G2ArKcCtz6BjeIHHG+skPfbW6d623MNXnDtRG4Urp45y 4WDQTv1TjrmBznOdMWdACGQYrE9PfpkMRJQJ9gHaJ8Mpm2gPphd4uppLhD+xntQVFKfqUQ ZnGFoFdO29+qTLbhf4KEMD4sRGl89ZVx2hs5vs513U5MEALtjwLdJnEOl01NWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765841344; 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=esOMXDaUTiGlvNJ2kYbed2yj70AiXzFR9+0W/1VG45o=; b=WL0DA8I7Yh+qamvAVWlULM6j/x43dueTgwl3Xiql1zPFPURVRM08L9c8DarWiVweq2L2sV vbpXzFh5gPsEQVOtxIXJ0lWkqBQ7ABmmyvJR+EdbxEnXU9Oc8ihlg/XGdb2U71BfQ8IZt3 58w7iMicb3SX20Fa863NHGSe3ifHpXUcpp2TchUXm0MhdtHAQfe273yzNFbOdHTs+HJJ5c u05TY4Ynkvfo7j8OM3wOX4bdS22lHIyYAWbzg2W0LmLns5+VOcs1MKhgWKwDauy6gLM3QW ptqd/DgkCIrsbqGGAzd3qk2yZfPsi/k3RrWwZtBJokY0wGIc43K5YL7T9d3LzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765841344; a=rsa-sha256; cv=none; b=Qa1tphn9MidIghZ0UQeJ60ZBdrw3GC1TP/Kpemo5C4fpIKHy1yQ8wKiIVgGNgZWEDkG5qQ tZUOCce11CdAo9QPX8Z029Nxr4crG/Iz+E64vnMjsv+7SEk4xOit/lP1UBRpiQrRF6jVcq Khr9KuFtXeyIkS3jtwIwC0E/oFDNmAOvZI+ztwKhQLyerA9QYIXUWxTFFAp15pBhp9n4ZK n7wAnQ5W75rwuV8jFlG7ZtL3FZ4YH76mzP4mcT0tGhxgKkCubar3OwwL0Qu9fJjitUaiMl /hPVnJDhzUm8KV2tmdIQ1R7kCirRv61FLpJ0h5X4yMbEr6BBiCG0Z0lsDSl6sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVbqN1kJkzgn3 for ; Mon, 15 Dec 2025 23:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b8e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Dec 2025 23:29:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 5bd839792b6a - main - thunderbolt: Remove PNP info 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: 5bd839792b6a6afacb50f782b6013100b5ff9110 Auto-Submitted: auto-generated Date: Mon, 15 Dec 2025 23:29:04 +0000 Message-Id: <694099c0.b8e4.4921a9e4@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=5bd839792b6a6afacb50f782b6013100b5ff9110 commit 5bd839792b6a6afacb50f782b6013100b5ff9110 Author: Aymeric Wibo AuthorDate: 2025-12-15 23:14:08 +0000 Commit: Aymeric Wibo CommitDate: 2025-12-15 23:23:35 +0000 thunderbolt: Remove PNP info So it isn't matched by devmatch(8) and automatically loaded. The PNP info will be readded once the USB4 driver is more complete. PR: 290827 Reported by: fuz, Marco Siedentopf Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) Sponsored by: The FreeBSD Foundation --- sys/dev/thunderbolt/nhi_pci.c | 2 -- sys/dev/thunderbolt/tb_pcib.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/sys/dev/thunderbolt/nhi_pci.c b/sys/dev/thunderbolt/nhi_pci.c index 865963e275ec..14cae7427448 100644 --- a/sys/dev/thunderbolt/nhi_pci.c +++ b/sys/dev/thunderbolt/nhi_pci.c @@ -118,8 +118,6 @@ struct nhi_ident { DRIVER_MODULE_ORDERED(nhi, pci, nhi_pci_driver, NULL, NULL, SI_ORDER_ANY); -MODULE_PNP_INFO("U16:vendor;U16:device;V16:subvendor;V16:subdevice;U32:#;D:#", - pci, nhi, nhi_identifiers, nitems(nhi_identifiers) - 1); static struct nhi_ident * nhi_find_ident(device_t dev) diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c index bc4fc1ce00ec..e6f0115364da 100644 --- a/sys/dev/thunderbolt/tb_pcib.c +++ b/sys/dev/thunderbolt/tb_pcib.c @@ -550,8 +550,6 @@ DEFINE_CLASS_1(tbolt, tb_pcib_driver, tb_pcib_methods, DRIVER_MODULE_ORDERED(tb_pcib, pci, tb_pcib_driver, NULL, NULL, SI_ORDER_MIDDLE); MODULE_DEPEND(tb_pcib, pci, 1, 1, 1); -MODULE_PNP_INFO("U16:vendor;U16:device;U16:subvendor;U16:subdevice;U32:#;D:#", - pci, tb_pcib, tb_pcib_identifiers, nitems(tb_pcib_identifiers) - 1); static int tb_pci_probe(device_t dev) From nobody Tue Dec 16 00:35:13 2025 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 4dVdHj5R3wz6LZyv for ; Tue, 16 Dec 2025 00:35: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVdHj4Snkz3CbP for ; Tue, 16 Dec 2025 00:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765845313; 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=2uzcjMU29RgBWQceepmsIfjDs0ClYOPz6PbE+fgGck0=; b=AjSVDy5fcNr/uAYQI/W4DWqlmEdmGAxJCwRbohk+T6+WL9RWjv7UoPDk65tgVWDsKixPbf skF8GvFZrwJrBDc186uxbAF0hhUqF2mCa1ZxZ47NzG7YEzj6gB5cd5nTwTVBKlJuAYDhuk SCHHbTKlwm9k4JvLSey7eU0Yjd9SnPCbeZipUtaZhoh4dc6yeQsMkeMON9H2g0hl3hO1D7 IuVHEb9FADfiXwwD7gAPxJa1xMldAnExoyllF8Og+ZkSJmLhSQnGsL7OlILpZ94dyKYSSn zkBD8ZREeT00QiAmh6mSmnuuLWf53tbYitx8TUJWTaZqRoYvZTgH3ME9u/gehg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765845313; 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=2uzcjMU29RgBWQceepmsIfjDs0ClYOPz6PbE+fgGck0=; b=boAZ/V5YsEsTXCCf/wRSoz18uOzdzcXF04XsXxlgwovjYhKFQ31kRai2SY1K1HLHFBwWkC 74R9WnbMxsMJt1UDUi9yxW2hgtjn8of/nF4ZhSNgx+NhYFQvMTIF6VVuz1JoaJIshJ6nou PU5UKOpPYheVxnAIW0yKWTNC1RUM0j2oQ40UDUuAJ3PtQtMMM5F7yZbEMfu7STSGNlviHE 8UUv6mwU2wcQXHniGRYy5pDVkLjMnvrhKwycY9BuPp6m8ArZ5VzKoNXNpgXEFb9/Lhwezj bFqkszu7fwumFt4eXv/4DrQxc4TFMLbirO9oIAEDgE6M2sJW2nZw1ky10XYa4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765845313; a=rsa-sha256; cv=none; b=Qvl8I7Sef2YvO5wTq/CIe2FrJjW+rb90xuKWX5JlYa5ez/COj82V3BSSzOREFpcM6juzgk 2Ny/yu9gPq7akoz9/MsoiLogxI1PPDR3CT8S5su0hXelquhN+XNohIKRulgNLShLpuMphi +KearFM2GTb7x83CHcszvT6SRxWa9ndv/SS/3TcBl4mHUcJIaZO0G3zJL9KUpLnOwu2VH0 QmShEpaDZRQOpICZ0MSVupPscaBaxLKVczEBxHFs3eCZM/Jr5YmTY2cX5+do8zY7Mn+l9y m4yp+HKYy1+WEKVjXT6J16SuQcx7pezv55r55/ROQ0bwhqd5lfQrYat0Jc9HdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVdHj3nhdzk5D for ; Tue, 16 Dec 2025 00:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22d0b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 00:35:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 03603db01368 - main - acpidump.8: formatting fix 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: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03603db0136815146c2886c793506acb8bb508b0 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 00:35:13 +0000 Message-Id: <6940a941.22d0b.18fd6c40@gitrepo.freebsd.org> The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=03603db0136815146c2886c793506acb8bb508b0 commit 03603db0136815146c2886c793506acb8bb508b0 Author: Maxim Konovalov AuthorDate: 2025-12-16 00:32:32 +0000 Commit: Maxim Konovalov CommitDate: 2025-12-16 00:34:57 +0000 acpidump.8: formatting fix Reported by: Marcin Cieslak --- usr.sbin/acpi/acpidump/acpidump.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/acpi/acpidump/acpidump.8 b/usr.sbin/acpi/acpidump/acpidump.8 index 70a53b479fc4..ec43f36f0895 100644 --- a/usr.sbin/acpi/acpidump/acpidump.8 +++ b/usr.sbin/acpi/acpidump/acpidump.8 @@ -176,7 +176,7 @@ Concatenate the DSDT and the SSDT's into single image and disassemble the image and print the results to stdout. .It Fl t Dump the contents of the various fixed tables listed above. -.It Fl T ar table_name +.It Fl T Ar table_name Dump the contents of the specific table. All ACPI tables are exactly 4 characters long. .It Fl h From nobody Tue Dec 16 00:56:36 2025 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 4dVdmN5J19z6Lc9j for ; Tue, 16 Dec 2025 00:56: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVdmN2BBKz3F3w for ; Tue, 16 Dec 2025 00:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765846596; 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=IZ94Pvl7w+sHf+uYyyJ2rP/6Y6xmoEv6eX2JvO0jKNY=; b=NxAVjiKj9DmSM7UEnv4xSgTcKCQid7qPyub2dq+Vt6tVzXtvAlL09BQ6EC7KjhI2gXQero IYHWOW9ZBzNtg2jyFW8lNBj0OHrJpvxrtwBdVs0MRA9JCYxsNO8fS20G8XbuRBTvdTbNvY EfKWLAXgMxK1THsh7dxKcILWSdfFUvhpK3CHLNCTV2nayKpSUN4oVcLPzhz0cHmPQ9UAfo elB6EweEr03++pS4QW1dOEtGRz8yf1f8Mrsw55BcTu8W0RbgGYjKiGULTMkbkk8u9LBI/e XvSixnsKIdtxnD0zNQH4Z92zyNi4S/fcLFsmC089O2qUhhcCQ9TislYb2mJpKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765846596; 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=IZ94Pvl7w+sHf+uYyyJ2rP/6Y6xmoEv6eX2JvO0jKNY=; b=dsPhPkjiyzQhVNJ/0r7UntLNUMAupJ3nY3t2j9LZ2TNR6InGq0hUfDPBfmZlkCLvv0yNze JLF361M6jy9wG35kUfS9VHJH+73pINDqn3zp2yIQRswovfZuIeOxo3s7Q7+0RAsS8h6eKO H6fWFRoF3uiir5yXXLENHRzD5frW8RBxcY01LmeJD6KRKfUmLxkTtpWiTPrih3UZu//UYY l6iUiWzU8MWit27S5HzoVP2LdK8jxhEEqiTsqiJLPy79HwpBfEpXDx1x4/QtEx6FO7Dq18 qVgK4nwMhc9A/W00NX1u25HxXuqQ58T66uJp3+OuvFrG4suKQV6sQdZIOCG7kA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765846596; a=rsa-sha256; cv=none; b=yDYNo78Zgax4KXpsr8to9bm6xYIaZncqmMjpyWj4ql0ajg/G5iNHXIPvG61rxPkO8XuAch Wt2OW/o4MJWTh5pEb6CQlOB+WWqJfx7cFtjm+8j3wxJCpafogl5rbFYw19hR3xdpiwScU0 g8etAkeJsftDjWDU4J8k4XZMmjDaZoWSUpKfTSMX82mGxLPpouBG/W30LtUDcisDT3HO4O nlJlTEGSy2KwbBErH2zK3Inl0Y5jLi9QIV8DYZ4wMRPczqgH6Wggur7GTYHR76P+f6sNrk +ypGuy5ixpu9ZvobtzHqwkrEoW3Jnxa0McZt2HNxi4mJ4f1CMkSE3F4R2XdGuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVdmN1G1szk6x for ; Tue, 16 Dec 2025 00:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24c63 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 00:56:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 715cc2571370 - main - blocklist: Add vendor import instructions 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 715cc257137099e022c7eecea4cd6995bb7604a3 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 00:56:36 +0000 Message-Id: <6940ae44.24c63.4191a2eb@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=715cc257137099e022c7eecea4cd6995bb7604a3 commit 715cc257137099e022c7eecea4cd6995bb7604a3 Author: Jose Luis Duran AuthorDate: 2025-12-16 00:55:24 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-16 00:55:24 +0000 blocklist: Add vendor import instructions Add vendor import instructions for blocklist. It includes a "freebsd-changes.sh" script that takes care of adapting paths and functions into FreeBSD. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D49510 --- contrib/blocklist/FreeBSD-upgrade | 97 ++++++++++++++++++++++++++++++++++++ contrib/blocklist/freebsd-changes.sh | 18 +++++++ 2 files changed, 115 insertions(+) diff --git a/contrib/blocklist/FreeBSD-upgrade b/contrib/blocklist/FreeBSD-upgrade new file mode 100644 index 000000000000..3e91d36cabb6 --- /dev/null +++ b/contrib/blocklist/FreeBSD-upgrade @@ -0,0 +1,97 @@ +FreeBSD maintainer's guide to blocklist +======================================= + +These instructions describe the blocklist vendor import procedure, +following the Committer's Guide +(https://docs.freebsd.org/en/articles/committers-guide/#vendor-import-git). + +> [!NOTE] +> This guide follows the convention that a `freebsd` remote is pointing +> to gitrepo.FreeBSD.org/src.git. + +1. Grab our top level directory: + + freebsd=$(git rev-parse --show-toplevel) + +2. Create a Git worktree under a temporary directory: + + worktree=$(mktemp -d -t blocklist) + git worktree add ${worktree} vendor/blocklist + +3. Clone the blocklist repo (https://github.com/zoulasc/blocklist.git): + + blocklist_repo=$(mktemp -d -t blocklist-repo) + git clone https://github.com/zoulasc/blocklist.git ${blocklist_repo} + cd ${blocklist_repo} + commit=$(git rev-parse HEAD) + commit_short=$(git rev-parse --short HEAD) + date=$(git show -s --format=%cd --date=format:%Y-%m-%d) + tag=$(git show -s --format=%cd --date=format:%Y%m%d) + +4. Copy to the vendor branch using rsync (net/rsync): + + rsync -va --del --exclude=".git" ${blocklist_repo}/ ${worktree} + +5. Take care of added/deleted files: + + cd ${worktree} + git add -A ${worktree} + git status + git diff --staged + +6. Commit: + + message=$(cat <<-EOM + blocklist ${date} (${commit_short}) + + Upstream hash ${commit}. + + Obtained from: https://github.com/zoulasc/blocklist + EOM + ) + git commit -e -m "Vendor import of ${message}" + +7. Tag: + + git tag -a -e -m "Tag ${message}" vendor/blocklist/${tag} + + At this point, the vendor branch can be pushed to the FreeBSD + repo via: + + git push --follow-tags freebsd vendor/blocklist + +8. Merge from the vendor branch: + + cd ${freebsd} + git subtree merge -P contrib/blocklist vendor/blocklist + + Some files may have been deleted from FreeBSD's copy of + blocklist. When git prompts for these deleted files during the + merge, choose 'd' (leaving them deleted). + +9. Resolve conflicts. + +10. Diff against the vendor branch: + + git diff --diff-filter=M vendor/blocklist/${tag} HEAD:contrib/blocklist + + Review the diff for any unexpected changes. + +11. Run the FreeBSD changes script: + + cd contrib/blocklist + sh ./freebsd-changes.sh + +12. If source files have been added or removed, update the + appropriate makefiles to reflect changes in the vendor's + Makefile.in. + +13. Build and install world, reboot, test. Pay particular attention + to the fingerd(8) and sshd(8) integration. + +14. Commit. + +15. Cleanup: + + rm -fr ${blocklist_repo} ${worktree} + git worktree prune diff --git a/contrib/blocklist/freebsd-changes.sh b/contrib/blocklist/freebsd-changes.sh new file mode 100644 index 000000000000..8ddea13b638f --- /dev/null +++ b/contrib/blocklist/freebsd-changes.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# +# FreeBSD-specific changes from upstream +# + +# Remove Debian port +rm -fr port/debian + +# /libexec -> /usr/libexec +sed -i "" -e 's| /libexec| /usr/libexec|g' bin/blocklistd.8 +sed -i "" -e 's|"/libexec|"/usr/libexec|g' bin/internal.h + +# NetBSD: RT_ROUNDUP -> FreeBSD: SA_SIZE (from net/route.h) +sed -i "" -e 's/RT_ROUNDUP/SA_SIZE/g' bin/conf.c + +# npfctl(8) -> ipf(8), ipfw(8), pfctl(8) +sed -i "" -e 's/npfctl 8 ,/ipf 8 ,\n.Xr ipfw 8 ,\n.Xr pfctl 8 ,/g' bin/blocklistd.8 From nobody Tue Dec 16 01:10:50 2025 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 4dVf4w4XV9z6Ldkl for ; Tue, 16 Dec 2025 01:10: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVf4w2lQLz3JjK for ; Tue, 16 Dec 2025 01:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765847456; 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=gVO+8I5drf9m0OgjJBmcA3ioJinHUdPtWB/QMsFB8u4=; b=s6OUYjgvQlljrWhYaNnKDKZbfgp4JZ2i39g1cbTiev3vSIAFRxWlVf7Z7QsoFIOpctFG4B u35/sf9sYIqSslNOHpDtfW/GssPhG3vsSZlnHnp4wn2uShIuOWJyhoguWKNA5wbDezCq6V 1PE5qHnY5izDTdR0fh61jXO0x50TjWMfpfUeOyFAgjB7Suveq2BERESbIMx0IjBxBKXFIA 6o8tvnAMkWZr4MAPmFoe8m2wnNcGyJOWNXoD8LicKBVGTEjwTeee8Mex0y7YTC6/xn7V2G DdTDBcXnivxhzOzWD+DPPsmDGW1Hzv4tKGbx5hpw29eKIjTWRaKWVqdmwzwaoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765847456; 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=gVO+8I5drf9m0OgjJBmcA3ioJinHUdPtWB/QMsFB8u4=; b=dzai6Av7dBAbbTqF/xdzsmMp49rBRoz4JYEro5TUHEOM/1lys8i5B0GA8mA+jGGa8auK+G JRa1DmIfllW5EihkXuRjb5AppXofT5XLyoTf6UDuEdz5US9tmqRkxfoVIMOfNQI5VcVLVH U/daBd5/BlTnzz6ei6YeRP55IQB+jibHiEYgGq7s/UNIZWD2/sht2sOirO734StFHvoHnC RzWzTHsPkbvJkXoNX8AgAyzztsTN7qDESVB7bCRG6R1+MFQ/updj7HUPNkCuqxhxP9HfO3 UEld/GuuZ3kgjhhFu4mQgQybPoTxQ1hA7qOSTMBVgh5BV5wzTPUXlXlHk32jXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765847456; a=rsa-sha256; cv=none; b=d0ObfnbzmEqYRNh0Xd+KEsAOjHJDCZpMdpICKgq35oaPectC8eOuxVJPqoox3ndybRXasb eSySwTiY8opicdXd4ibQfZsLmFjs9f/ZpSy78u3wXmjdnF2taNUQDg7RZm3Ehwp9SCc6ya FoEXe98apl2r9BRU8BIPnyPKZIr50XxVwgi/2WiJEUoYhR8uMO9SNH7Nth73S+PoF0e7vg U9SxE2ooEuVzr4bWRlsSdNRzAz4CIIgDRHlG/9HKLjnNCkEB1C4jF9GgNvP3RZYx5KXg4C 1LARxr9i4ZBUadiP+fUOxzMvnapBeKoHsSYwPzxZi/15gKPU0XD2kOo1nV/vWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVf4w2KgBzknv for ; Tue, 16 Dec 2025 01:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23a78 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 01:10:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 52395203f9ac - main - MFV: Import blocklist 2025-12-15 (8a4b011) 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52395203f9ac40d321ed55d93e9887300261d3bf Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 01:10:50 +0000 Message-Id: <6940b19a.23a78.52b74051@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=52395203f9ac40d321ed55d93e9887300261d3bf commit 52395203f9ac40d321ed55d93e9887300261d3bf Merge: 715cc2571370 bfef098f9249 Author: Jose Luis Duran AuthorDate: 2025-12-16 01:03:30 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-16 01:03:30 +0000 MFV: Import blocklist 2025-12-15 (8a4b011) Merge commit 'bfef098f924950a085927b1e7dd6c6db4e651c5c' Changes: https://github.com/zoulasc/blocklist/compare/ff13526...8a4b011 PR: 258411 PR: 291680 MFC after: 1 week contrib/blocklist/bin/blocklistd.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) From nobody Tue Dec 16 04:42:23 2025 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 4dVkmw19x8z6JxpJ for ; Tue, 16 Dec 2025 04:42: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVkmv5sphz3fbN for ; Tue, 16 Dec 2025 04:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765860143; 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=GHfbGUMbXaXDK70a2XynTjiS1AGtZlhhRczRk4K9lGw=; b=oHoekmIrsklykorjPyuY7/0ZbjLSy8B7QQztZsI9HekQjl9fSRjKGwPk55+vfyiyJaboti tSiwpr56KkNTQ6j2E5J8iGJ1nnsnStytVJ/qYDaN6P3yZQuhzO9YeWePBIFBeECdsBhf61 XGHNtoA4D5N2DEk2hcH+Wq/O8sj6ey5ifbNk4sZyYElkKpTrMmlz5v8Lx7nZUQoYXZM6an VPto7HDX6cAZY70gb//o1VDmQUbSWIGAdWSSiCA4FJ8/0wWKxTb/TZSHIOhZprMVD3MzgW ypxUGJZAZydADXbf2fS+7oM0/POytugh3wgYQimeP4+W+orCvahDYh8XjK1xaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765860143; 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=GHfbGUMbXaXDK70a2XynTjiS1AGtZlhhRczRk4K9lGw=; b=bJMDKkRDWfKNH0s++Xemg6a0QfxVUrFEjIde8Yk9LsYmFuLXtddF3FyP3V72+7Sq2Fev6+ 4ERrvIAJHODl/kOe2HCHrg8tiLRq5iB4kTqy9TehiR/hn3ieeIRMGKfVtgzIWAAxUXpnBr 62GhbrFWa7prRfiH6f/kjofWL8YhtZ+9xco/zzVU2hDvevq2Uj4Bbcox6HBQ/VPw5Ozkhy MM9kmZv/WAVbRSuDkL5Suw9Yz0VEJmP3YU/UVTlH6arZLT10/C2P+r6+GKkIkBFjjN+wKk jyASAurkmykz5LpOlNMXWAAfg5LxBrIv2vnbJx26Cv4KZ9zor5OIYBzG3rYfJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765860143; a=rsa-sha256; cv=none; b=GEOlB4bML8SghWVFGjZ9KVvX7reJMpG6ekESRlYYexakyOF9uNv4ER3Y7FZf9+npsCcfOD wcW4dBkEFWbo2cwHCbiVaUQIw1s052LayW6jh6VdL7Ypv8ZhsEOq5pxxbHuCzT8bE/qBIb c9Z/xxqYlNYb5blvSMzbm2YlaZhYmdmjCmmk8VLElRk+lbi4PIRbc0v/PKPyJNuTlVl5tm iqnb7zzLEvakRucjgdjdWN9RWuaPrwEIJaRqrVNNBEURYXW1pzAdAZBRYeL++17pVchET4 fFj+l6P4DGgmuBOLxjNFjLmYsr/eFCiYYD8WEUrLU7M0r21ENP28c8rRIIisJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVkmv5NhMzrHw for ; Tue, 16 Dec 2025 04:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ae91 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 04:42:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 094626d3a500 - main - lio: Avoid out-of-bounds read or write MAC address 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: 094626d3a5009a56bf1b763dbdfc681ce371dc99 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 04:42:23 +0000 Message-Id: <6940e32f.ae91.28465719@gitrepo.freebsd.org> The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=094626d3a5009a56bf1b763dbdfc681ce371dc99 commit 094626d3a5009a56bf1b763dbdfc681ce371dc99 Author: Zhenlei Huang AuthorDate: 2025-12-16 04:41:02 +0000 Commit: Zhenlei Huang CommitDate: 2025-12-16 04:41:02 +0000 lio: Avoid out-of-bounds read or write MAC address While here, replace loop copying the MAC address with memcpy() for better readability. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54177 --- sys/dev/liquidio/lio_ioctl.c | 4 ++-- sys/dev/liquidio/lio_main.c | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/dev/liquidio/lio_ioctl.c b/sys/dev/liquidio/lio_ioctl.c index b2fd54f59580..36e7710cccb9 100644 --- a/sys/dev/liquidio/lio_ioctl.c +++ b/sys/dev/liquidio/lio_ioctl.c @@ -443,7 +443,7 @@ lio_set_mac(if_t ifp, uint8_t *p) nctrl.udd[0] = 0; /* The MAC Address is presented in network byte order. */ - memcpy((uint8_t *)&nctrl.udd[0] + 2, p, ETHER_HDR_LEN); + memcpy((uint8_t *)&nctrl.udd[0] + 2, p, ETHER_ADDR_LEN); ret = lio_send_ctrl_pkt(lio->oct_dev, &nctrl); if (ret < 0) { @@ -451,7 +451,7 @@ lio_set_mac(if_t ifp, uint8_t *p) return (ENOMEM); } - memcpy(((uint8_t *)&lio->linfo.hw_addr) + 2, p, ETHER_HDR_LEN); + memcpy(((uint8_t *)&lio->linfo.hw_addr) + 2, p, ETHER_ADDR_LEN); return (0); } diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c index 7b6eeb460095..5da346e308ba 100644 --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -1230,7 +1230,7 @@ lio_setup_nic_devices(struct octeon_device *octeon_dev) unsigned int gmx_port_id; uint32_t ctx_size, data_size; uint32_t ifidx_or_pfnum, resp_size; - uint8_t mac[ETHER_HDR_LEN], i, j; + uint8_t mac[ETHER_ADDR_LEN], i, j; /* This is to handle link status changes */ lio_register_dispatch_fn(octeon_dev, LIO_OPCODE_NIC, @@ -1373,9 +1373,7 @@ lio_setup_nic_devices(struct octeon_device *octeon_dev) lio_init_ifnet(lio); /* 64-bit swap required on LE machines */ lio_swap_8B_data(&lio->linfo.hw_addr, 1); - for (j = 0; j < 6; j++) - mac[j] = *((uint8_t *)( - ((uint8_t *)&lio->linfo.hw_addr) + 2 + j)); + memcpy(mac, (uint8_t *)&lio->linfo.hw_addr + 2, ETHER_ADDR_LEN); ether_ifattach(ifp, mac); @@ -1579,7 +1577,7 @@ lio_open(void *arg) struct lio *lio = arg; if_t ifp = lio->ifp; struct octeon_device *oct = lio->oct_dev; - uint8_t *mac_new, mac_old[ETHER_HDR_LEN]; + uint8_t *mac_new, mac_old[ETHER_ADDR_LEN]; int ret = 0; lio_ifstate_set(lio, LIO_IFSTATE_RUNNING); @@ -1593,7 +1591,7 @@ lio_open(void *arg) lio_send_rx_ctrl_cmd(lio, 1); mac_new = if_getlladdr(ifp); - memcpy(mac_old, ((uint8_t *)&lio->linfo.hw_addr) + 2, ETHER_HDR_LEN); + memcpy(mac_old, ((uint8_t *)&lio->linfo.hw_addr) + 2, ETHER_ADDR_LEN); if (lio_is_mac_changed(mac_new, mac_old)) { ret = lio_set_mac(ifp, mac_new); From nobody Tue Dec 16 04:43:39 2025 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 4dVkpM4pVzz6JyGm for ; Tue, 16 Dec 2025 04:43: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVkpM3Jzyz3gDn for ; Tue, 16 Dec 2025 04:43:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765860219; 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=gES+CKkX73PdryUB6MDZ9zZvIHMUIV7Qb+p6v34njWc=; b=Etvi6394E3UsyI93OcQ/w0aI+71yyBfqQBAtriDkz5cnSLfEECCCKZXrfsOcCmcIIBCvOA Mecsoh0Js8Le/kr1xzI8wmq3cgvp86rlBbDc/oqlJGOo76e7NE77lgKCQ0bQv7NMMIkEYa Fx5sqpQk/v+AVwJdaPMUkaWWbuaupaRO2WhxbUuVmpsC7a23h9hYOZg+/LYBzs3tZNTF43 /HlC4Lz5rohibU78o9RdQB+58aHgNEK7WoKDoH3Q4ljyBR69rqK0dsF4hopJrO4VZYm/e/ mVjaDesBIbeQp8wNGe0gpMr8Ez47h349NrD/OaFTnOHD67UE/Oit5bUuPKAFxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765860219; 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=gES+CKkX73PdryUB6MDZ9zZvIHMUIV7Qb+p6v34njWc=; b=pgYXDvf26v/2nR/4J3EolWIDgJltCPldJh7MPJY+CN51fUSi37L53GkjH5JM4W60uygGoS 8cpwXaD+oGZ7S+jhyGDTql3nPsuoaCTbIN7h77PZ0WDar8VKceLv3xWaE5m5a8MQTd3FKW L/RbjvUaj8by+yEgYzrtRGI5yFuS4B+KALOj9tdlOn9e/oRfZjlGFnDm2JxqmkEAJnZqjv ms/Ar6NQFZAPbTMMFzEOu4kCqVF7zWKmZiXhCabFkV0qRmYJseB0nf6iisWJOFi+nn8iTJ vTXwZAzNM0cwyXueBsPGPsopK4AzAsOHtNA7XtIAYU7xVYzqIpRe4yVxPV1rnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765860219; a=rsa-sha256; cv=none; b=kO1b+7nxHx5xScE8NaalMXXBBLNesadPUATzXnFqibGIKIY07Ta1EzEsLMMZLjWaWp9QRB sclvdVgiLZ6Huc+XPfEXZePXR0zYH1jtkxpKI4GB3gQj/3XfM787Nl5exQA3T2UX8KuWda mSBSf20y46JXGUp3l0gznp9L3UY6y2xSNcMYq77NaWhFf1nZ+7MQ0RLcpRdN8FOwBPJTP7 EGRwnLFdeeSdfxBHnTWN5/l60hDhcqE8IMOF0ad1DiXbNvAIhzvBPlyKPiX9rzcwgM/2xK oWY32DhxoB//8ezRHJZrKK5Bdj229GprmBWGVri5fXAWo/ikDenzLTs080iyEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVkpM2lw0zrw2 for ; Tue, 16 Dec 2025 04:43:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a6d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 04:43:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9b943425fd90 - main - proc_dtor(): style improvements 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: 9b943425fd90858f9e21cf47009275943a3548a3 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 04:43:39 +0000 Message-Id: <6940e37b.a6d9.761e7bff@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9b943425fd90858f9e21cf47009275943a3548a3 commit 9b943425fd90858f9e21cf47009275943a3548a3 Author: Konstantin Belousov AuthorDate: 2025-12-14 03:53:50 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-16 04:43:06 +0000 proc_dtor(): style improvements Drop not needed cast. Group sigchld state check as single KASSERT condition. Remove useless comment. Reviewed by: des, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54234 --- sys/kern/kern_proc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 8f86ce349e30..05b1ed990025 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -237,11 +237,10 @@ proc_dtor(void *mem, int size, void *arg) struct proc *p; struct thread *td; - /* INVARIANTS checks go here */ - p = (struct proc *)mem; + p = mem; td = FIRST_THREAD_IN_PROC(p); if (td != NULL) { - KASSERT((p->p_numthreads == 1), + KASSERT(p->p_numthreads == 1, ("too many threads in exiting process")); /* Free all OSD associated to this thread. */ @@ -256,8 +255,7 @@ proc_dtor(void *mem, int size, void *arg) #ifdef KDTRACE_HOOKS kdtrace_proc_dtor(p); #endif - if (p->p_ksi != NULL) - KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue")); + KASSERT(p->p_ksi == NULL || !KSI_ONQ(p->p_ksi), ("SIGCHLD queue")); } /* From nobody Tue Dec 16 05:49:08 2025 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 4dVmFx0Xwpz6K3J7 for ; Tue, 16 Dec 2025 05:49:09 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVmFx00M6z3n9S for ; Tue, 16 Dec 2025 05:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765864149; 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=QQxIjiMGXjHykAE194rH73Dym0cgy8Van55Z25nKTfU=; b=pZcyQNxPnaTITD+Xg59NjlL1XV+wMIaRsuJoNduZf3a+Z2C9eKn1s+3FfEaSsr31ZiSp6H GYJ7enN5Z84v6DEaHGPDRlAorWC9Ixv9xuJnlxwOb+sj53uc2oOFJCe85BgPzjmoqSzr9f 4xXeEJfGFQ0pSmP7ciVwdcUl5/GNsKDPNO3xGnhV0Ip4JD9JEAvnJicfZEQtn8ZKokXWKR H5uDBeTgcQAS5lZUebfXJwkZbmh7s6Vr7sgFn2FPPLCRl0jJd6DjPlCwNkGS3FhD3pCHiD i3e8PXkvv/tQMGqQuy3jH4ng3R0ZsvD8GSupmKAB2oE646xWlvPpIYf9TOPAgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765864149; 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=QQxIjiMGXjHykAE194rH73Dym0cgy8Van55Z25nKTfU=; b=u40MXJt595dBiVmNPYdXHRPae768eCAix4UTMFSimiXX72tM3UNvRoHAUSZQJyswFp/M9A EycyYjQE/u0ubHSrcI/W6luIwu6Fo2HKW11wv0S8s8NuyDbZ85CVqfWg0CXOyJfsSQRncz Dko9EfDiD0tOpjkXjZPlmdyce1wgjc1J8q722izGOhc3cIgWDe5dCLlVkFiJjUJo0wrE3K fxz9t0gkoLNeN11xv51r8Afk2/9fD3tbT80BaMbcEtaRBk+6YSCcH7G7nRJyHc3AB6V9Uw LIyp68q7UYv0YM6MDMW7RVAKAJF0ej0p5ko50iCQQ2o7GEwl2kprdavwvLnSUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765864149; a=rsa-sha256; cv=none; b=PclcSHqGE1y3phkTr7Fvyigp9gXqakCS8eCvJMZUTfyNdhU6aztKDiJh7G9M/EDf1t5DNM 3iSzW7uULGIG/t0SKznJmMJRQb2x71Hx3jUy3hAG7PVUucmlvqKcAip232yrsd7CwdQduP UqawxYOPoaolBY9vDtO9BkC28cEndF6p8galn2UA1ssYnJhlzwcq9ijRRCMjMlRPtrbJaF apXvCNXdgMyIg7oBsbgjjg0YdCqDKxKW5L/bXR7Ny/gS9whjE++fayJ5gnZuu0JAk1d0x+ AJ635AiDUoctxkflQhMEXzYfYFHh69KqIDoZmX2eMMq1ojWR0k/mgrjF3hpPNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVmFw6bnJzsq3 for ; Tue, 16 Dec 2025 05:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2156f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 05:49:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 27554189e512 - main - khelp: make the module compile again 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: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27554189e5122d780dd295b1a1a81f15f459accb Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 05:49:08 +0000 Message-Id: <6940f2d4.2156f.48ecfee8@gitrepo.freebsd.org> The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=27554189e5122d780dd295b1a1a81f15f459accb commit 27554189e5122d780dd295b1a1a81f15f459accb Author: Maxim Konovalov AuthorDate: 2025-12-16 05:47:02 +0000 Commit: Maxim Konovalov CommitDate: 2025-12-16 05:48:58 +0000 khelp: make the module compile again PR: 291165 MFC after: 1 week --- share/examples/kld/khelp/h_example.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/examples/kld/khelp/h_example.c b/share/examples/kld/khelp/h_example.c index 92f0c885bbce..07102d30be21 100644 --- a/share/examples/kld/khelp/h_example.c +++ b/share/examples/kld/khelp/h_example.c @@ -45,6 +45,8 @@ #include #include +#include +#include #include #include From nobody Tue Dec 16 08:14:36 2025 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 4dVqTm6nPbz6KFwH for ; Tue, 16 Dec 2025 08:14: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVqTm5wv9z4154 for ; Tue, 16 Dec 2025 08:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765872876; 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=RDS4P7LkxrIQhEcnW0KzFQzQCtpjfftZAcKpm1tdS6k=; b=ZfGlqD51v5sw5dVkR1t1ekItFnjwlK9LMn5ooFjxTICbmYn6ZMTDxbfqDU3dPC7k2pEgRr tMwWJTZJA2Pqn1/hND3NH+ad6X56f7cE3oDdKJ7yVz8oCtn+idkzkipuWyuBEyjKAI9s/m s+K64h4Q7fuFbnpmGrEXvPMx7OUlmbio8SiN7WtuO5FSuQtR3vHpl0LGfMPX1dkje+/7Zh aULa7yd1inahCltj1aOMzQMk10dnvucCt+Uuzj7WvxbuaryFfzXemhaTJO+gqHxMlGhezz iSIG32zyiE9dq4selyO9a0kXPITgMcenaY4EYsk4Onn6ulNVTX2bbNanwviwNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765872876; 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=RDS4P7LkxrIQhEcnW0KzFQzQCtpjfftZAcKpm1tdS6k=; b=XqUDEeM6lNE7aj4U0ryAa9k8/xK0MeEubiVUfKmcOT58mzlFeBHH7AvgWR+1UbIsAjQ8vA l07JTeTWh1M3zW9IauCJtXb/MQZcmbahHElDn7wFmKT33Z8WocQ7jhcDaKkN/ZEH34iYn5 0JVJjoHFZCP3BdIfwnPUZTq6BesO22RzkQl1sLbHq/z1aSnAmHtB45ckzcgniFf1co47Oq TgWnBxKzKTBvrN1OKt21av2MeFcP+OPid0tmB+TCuFS3mGgIKPmv0nlCvad0NJ//IOts8y hiTBfig/9LtwpWwaA13qzLfepg9kAW9KFsW1LfQccluzLBh94b0hDLUtuo4dZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765872876; a=rsa-sha256; cv=none; b=cj5SkWrrfgJm+1lTFEiEE3tZ1+c1w1Cwtcw7YkdcOZgTRreDTYNNuSfvtME9lWJ56g5G1D RDWT/KuJO1IdtU4UAoHmT74GYD/uFH8hNqyGVt+0r9lC4LFdrNJ6eK4A7EKG+BJTn4pPdU xS1qIL5S3rbKX35jxeBnUHqCvNOTNcsuIw3XN1TocseM6KIBtgLAApoFuz3y0p4MYNte4T Tf0Jawbo+es/INb9yYjxGExuFYXWKO1j3pSb8c/mbDtyGwDHSrXCFsnyaAVOvUDhc4/O3p GB1ld+GGUjOVcK0ph0LFLDOCRrSHMdxyuwXS+pl+gxFk90+WVFl5Yt4cenF0yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVqTm5Hg3zyFY for ; Tue, 16 Dec 2025 08:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37bb0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 08:14:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 9c844b6110b3 - main - blocklist: blacklist: Chase recent upstream 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c844b6110b3768a4fc3ce47cd9d1b30915213ec Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 08:14:36 +0000 Message-Id: <694114ec.37bb0.4c55429@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=9c844b6110b3768a4fc3ce47cd9d1b30915213ec commit 9c844b6110b3768a4fc3ce47cd9d1b30915213ec Author: Jose Luis Duran AuthorDate: 2025-12-16 07:57:07 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-16 08:13:39 +0000 blocklist: blacklist: Chase recent upstream changes Upstream fixed a couple of bugs: 1. Only attempt to restore the blocking rules if the database file exists. Otherwise, when the service starts for the first time, it fails (PR 258411). 2. Revert a commit that removed a call to close(bi->bi_fd), preventing the descriptor from being deleted. PR: 258411 PR: 291680 MFC after: 1 week --- contrib/blocklist/bin/blacklistd.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/contrib/blocklist/bin/blacklistd.c b/contrib/blocklist/bin/blacklistd.c index cb6ce6578d9c..7dec62cfa58b 100644 --- a/contrib/blocklist/bin/blacklistd.c +++ b/contrib/blocklist/bin/blacklistd.c @@ -1,4 +1,4 @@ -/* $NetBSD: blocklistd.c,v 1.12 2025/10/25 18:43:51 christos Exp $ */ +/* $NetBSD: blocklistd.c,v 1.14 2025/12/15 15:51:37 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #ifdef HAVE_SYS_CDEFS_H #include #endif -__RCSID("$NetBSD: blocklistd.c,v 1.12 2025/10/25 18:43:51 christos Exp $"); +__RCSID("$NetBSD: blocklistd.c,v 1.14 2025/12/15 15:51:37 christos Exp $"); #include #include @@ -191,12 +191,13 @@ process(bl_t bl) } if (getremoteaddress(bi, &rss, &rsl) == -1) - return; + goto out; if (debug || bi->bi_msg[0]) { sockaddr_snprintf(rbuf, sizeof(rbuf), "%a:%p", (void *)&rss); (*lfun)(bi->bi_msg[0] ? LOG_INFO : LOG_DEBUG, - "processing type=%d fd=%d remote=%s msg=\"%s\" uid=%lu gid=%lu", + "processing type=%d fd=%d remote=%s msg=\"%s\" " + "uid=%lu gid=%lu", bi->bi_type, bi->bi_fd, rbuf, bi->bi_msg, (unsigned long)bi->bi_uid, (unsigned long)bi->bi_gid); @@ -204,12 +205,12 @@ process(bl_t bl) if (conf_find(bi->bi_fd, bi->bi_uid, &rss, &c) == NULL) { (*lfun)(LOG_DEBUG, "no rule matched"); - return; + goto out; } if (state_get(state, &c, &dbi) == -1) - return; + goto out; if (debug) { char b1[128], b2[128]; @@ -269,6 +270,8 @@ process(bl_t bl) state_put(state, &c, &dbi); out: + close(bi->bi_fd); + if (debug) { char b1[128], b2[128]; (*lfun)(LOG_DEBUG, "%s: final db state for %s: count=%d/%d " @@ -541,15 +544,16 @@ main(int argc, char *argv[]) state = state_open(dbfile, flags, 0600); if (state == NULL) state = state_open(dbfile, flags | O_CREAT, 0600); + else { + if (restore) { + if (!flush) + rules_flush(); + rules_restore(); + } + } if (state == NULL) return EXIT_FAILURE; - if (restore) { - if (!flush) - rules_flush(); - rules_restore(); - } - if (!debug) { if (daemon(0, 0) == -1) err(EXIT_FAILURE, "daemon failed"); @@ -563,7 +567,7 @@ main(int argc, char *argv[]) conf_parse(configfile); } ret = poll(pfd, (nfds_t)nfd, tout); - if (debug && ret != 0) + if (debug) (*lfun)(LOG_DEBUG, "received %d from poll()", ret); switch (ret) { case -1: From nobody Tue Dec 16 09:01:43 2025 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 4dVrX71dMyz6KKsS for ; Tue, 16 Dec 2025 09:01: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVrX70wQ1z44WM for ; Tue, 16 Dec 2025 09:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765875703; 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=uIY8wBqn2OduLVLgnQcYn2XUa5TCZG4TanGtD3vR2NY=; b=wXCq5Kk+lx0ffRh9c3fpVnPoupk20brh/jGNP78lfNLkPpqkJ8Z37O+TjT/tEuyZtTpxXp tzdRhJEJHI+zoM9ihuI5PiDrEtihSozSV1wzjvjoZQSvx9bOOs2AmQuBLHOuxnWv8mQTV/ cTSp4geo91HtClG0ILmX6G+LDFhI2zp06HZ/vji0eIxfeKIoXZ1p4WgqBd8+uzNF8C/a4I 5Bt9ST1uJK+wA3+lFb/re7FWzWYxbrioUPGhzkdukmLgy5XM2OIn+L1nvFbeFxkQKhfbiI UexDRsQBhYKWAIcSU3JLFYMCBHAVh2I6KO0o8u2SI3BD8R3LOSx8cFTWtTuTlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765875703; 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=uIY8wBqn2OduLVLgnQcYn2XUa5TCZG4TanGtD3vR2NY=; b=Q8Ws9HhXiQz7Dbr6K0Km5utYlcTJq8kyKR/Q9EWcNaWl/kMs03hiP8JnGN5jloAbtFy/Ud xPD2zF5yRlxraIYw/9AFRsDyKD1LDhBPIxrTd9PHZqjrse1PtYvI2YJeBlADCL4yuY54Zr 4shAIs+u6BApduqSEU6lhTZTbqaw9DpBg/sA+56Ombj4gbH93oDS+4GIXzfeN9GnOlyXsY Hl0Ye/pzs1dZGdx8ckxksxAHOSHsnOpqGr0a1XW27Pn5g9flf0ElnOyCWab2CkxV5TfMVF hYMG9Paxs3OuIo8IItG65KiYCCLXcpHC/yCgZAe0I752+NEZ0hBxjAY8pJTBoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765875703; a=rsa-sha256; cv=none; b=X4H3vtnPTP6csulXWRwHuxt+zAgubqYnHCPncfajen6tJwuwA35ugvikm5l69keQlXaIbS LvS5CnIEvUVR/B892OMGDK3pwm12aZVTFPqc/gxqKGsGwRQE6YgLalx6rlYlK4aYadCJJ6 pQyNe4nUM9r0s1JCYVojVQrpeY0A2hDmVvI1JVPKdHNBgXtaDSIHMLX7y0FcujSi+C1RkR h4M9lMVau5SwhoIV/bjyuqqLH9CHaZ95ji8RQg9bJvHNNCjuBo3aP4ZMoDbVM3bUihG/zr 21ELNRuwlvYxXHtCW9lYcyARHFEUwhMK5xwYJqWygQCHC3PwbkuWoqxkLGGg2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVrX70Wswzyqf for ; Tue, 16 Dec 2025 09:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ab6b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 09:01:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1fbdb149aa48 - main - etc/mtree/BSD.include.dist: Remove bsnmp tags 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fbdb149aa486961c5d9d6403065e90123b3f5fe Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 09:01:43 +0000 Message-Id: <69411ff7.3ab6b.a567edf@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1fbdb149aa486961c5d9d6403065e90123b3f5fe commit 1fbdb149aa486961c5d9d6403065e90123b3f5fe Author: Emmanuel Vadot AuthorDate: 2025-12-15 13:49:23 +0000 Commit: Emmanuel Vadot CommitDate: 2025-12-16 08:59:58 +0000 etc/mtree/BSD.include.dist: Remove bsnmp tags When building with WITHOUT_BSNMP this result in a FreeBSD-bsnmp-dev package with only this directory and a dependency on FreeBSD-bsnmp which doesn't exists. Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D54235 Fixes: 436618a427b4 ("etc/mtree: Add package tags for /usr/include") Sponsored by: Beckhoff Automation GMbH & Co. KG --- etc/mtree/BSD.include.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index e35f19ebc4b2..759d76940434 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -12,7 +12,7 @@ .. bsm tags=package=audit-dev .. - bsnmp tags=package=bsnmp-dev + bsnmp .. c++ v1 From nobody Tue Dec 16 09:01:44 2025 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 4dVrX83Nsjz6KKSL for ; Tue, 16 Dec 2025 09:01: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVrX81d3wz4477 for ; Tue, 16 Dec 2025 09:01:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765875704; 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=+B71H59YsP86L+QbA5G7yWWrXu/GuhmyHLfKdw0ITKM=; b=WxtJZUeeHUX5sXPexSXsuqA0omIY+rW3FCmB7KjLS4SBWAb6kFMS188GyvnhpNoN2iNKuf L3uk1gGMAw6pqTvSSmBKP3WU4rj+6USs2X71P72CH4OMPTh10naId3/Py8DbfcWmnCqlDo YFpcjWrr64cUDSwv5S1DTUf3biJaKlsl+MNbo0M2oI7MIaSur7Rkkh+6O+LC2QIjiIv1oH dhXkjk8vaPNt45qhsfXzhIiPWzfT9w2lwHgTrTkuAMGCApFBl2Dyut9e1KMpxYSNjKZS/G INRnz4TZHcs7aLEdoajB53Vh1w91O4qPhTy0w97Pb55Aui5ew9Kb/Uu3dx5rPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765875704; 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=+B71H59YsP86L+QbA5G7yWWrXu/GuhmyHLfKdw0ITKM=; b=q+H8MOt6xBfDPa/7sQ+cgDI86Lcb/kxZwArVk6BRWglE9FfjWRdCiTUI8msFyZ9BX39uJU piBHUuaTvwDMubyHfrHjPUyCg0vURvrXxg67GFnG5R/BqeANEXjaH76BCZSzBbobL3j8ca zzHRfxyKA0ZnyLSeLRjl5TTzBPbMlN81eNWAJ+qL1t+LE4WcbFY9l4mYjhLVsxkNr7jihL sFJ0m+mK4DaNKEKE/fv/5AuOw7p3MGWPVtqOW83waQEfMTyMmvNB87kVA1SRVTKMUry4Jo nxptVo6cJv8MubglGw4saGKvycBRGIdukBqZ6zuJsPV8EXnXfKonMElotxsFkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765875704; a=rsa-sha256; cv=none; b=K6dXmb9eDZ+Sst8bT7d2nU8u53YzSyLXfihZPqomQPUPctySGpItUHyiEgvpS2ZO4Oy6Xo GiwJVixm2sUhqfJRBroCkJwTgt/PoLHNfv1tB/g/FDpeHLKOS9dgMaaGRavx8QxD8G1vJS 9VLp57nu//5nJAbFvD61/noucS3YFCT1uypR+hGjMf1dhiDzpEdlHf0/gdslf71ahOA0DG jUzAOjvb/AF+1PpIDVKP64P9VEyxSwUJu0gjMkRV/NnKaPmRhGtqyuvRgjkp8qlBIBta96 WfCGaIXci1lYprLo9BvtZFzkbEWx8BXGwSfhAh1J2n0L9YqGEu+Nq/6r1valwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVrX81CFxz10Gl for ; Tue, 16 Dec 2025 09:01:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ab6f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 09:01:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 00352ef6d2a0 - main - etc/mtree/BSD.include.dist: Remove atf tags 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00352ef6d2a013650f0ab2a4c9b016c22552ed25 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 09:01:44 +0000 Message-Id: <69411ff8.3ab6f.348f015@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=00352ef6d2a013650f0ab2a4c9b016c22552ed25 commit 00352ef6d2a013650f0ab2a4c9b016c22552ed25 Author: Emmanuel Vadot AuthorDate: 2025-12-15 14:14:23 +0000 Commit: Emmanuel Vadot CommitDate: 2025-12-16 09:00:58 +0000 etc/mtree/BSD.include.dist: Remove atf tags When building with WITHOUT_TESTS this result in a FreeBSD-atf-dev package with only this directory and a dependency on FreeBSD-atf which doesn't exists. Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D54236 Fixes: 436618a427b4 ("etc/mtree: Add package tags for /usr/include") Sponsored by: Beckhoff Automation GMbH & Co. KG --- etc/mtree/BSD.include.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index 759d76940434..487973bcc9b5 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -6,9 +6,9 @@ . arpa .. - atf-c tags=package=atf-dev + atf-c .. - atf-c++ tags=package=atf-dev + atf-c++ .. bsm tags=package=audit-dev .. From nobody Tue Dec 16 09:29:17 2025 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 4dVs7x27x1z6Kc59 for ; Tue, 16 Dec 2025 09:29: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVs7x1BwZz49wx for ; Tue, 16 Dec 2025 09:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765877357; 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=v0Wb9RZhAdVAj8OdGRJ24qDK/QF0RrIYGGvVUHyDFhg=; b=SSK9zdc74/E3uTSUZKjwWjliVlzC7kjLTMiuDeP5Gt99VVzmPFAIlKSIZYCj3AdX5jypAO mA6aTy6bbaGxHF34jS+PAkVzo3btW7XaYUe/axW+M0Ya9+7ItBuSm3GqtH4aFuk1JeJjUF 2q5KFo62UyycohOk4CEdojrWLgJ0BLvOzUtc/cPGp0V6kxEevO0JZlqEIpky8YrMOoY+Ov Fxn43JU2LMquKM+S0tLGFC7Vt1D1xqca4+61dgsiNkaL3aHiruX2iLMpatiW2aoXoCSK8j MFMywQKDKDTp0C18h6C7umBgROHBGreizOods+9p7WAQMod1nxmWrBI0owGPwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765877357; 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=v0Wb9RZhAdVAj8OdGRJ24qDK/QF0RrIYGGvVUHyDFhg=; b=Zhr/dASzbR1Zb2CwS12H/7MrcC6yaCvzjwsjUFZIomVVcqfakBXNd5P0BE8/Hw/NHGko+E 9vSAgY9HZqoMyms2NtMSNJCuG7IswGB9e1qr521xZt1HiJmPcXw1xtJ+98tSVQA9n60/nx Qdc9rqf9cAMkdJvQBmxgIcNQd9cpRBnTtWYdH0iDnPfE8cNp37umS2IF9uAh3P/jgqJoh/ VHm+bLEZzPN6k2ZhgSufBFYtbjLU13oTGTKZTwzJeKtlv0UTv2HI+x7WlMTBXquTP3+B+0 tMUX74RyMF8hOMxRlDdP2m+Of8qwKMgZEbDj3JifgJ54OLyiysi/S/fgLqks3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765877357; a=rsa-sha256; cv=none; b=DGE/PTgGtBOxTmzFMnuEXX+i2iluhDRKyh5T0yHLX6/aIjW127iXIQ2dTywojfF85r3tgF 7n28rYgUTX98lmKwQMaCZYeqRm+VBI8Gr2tDN1aIL9NAdNc/7U4wkOZ9iXEODrU755jdDE NI2EwmbyGgumhLzS3hiixi+DyFsI55mq7fne8Ya3c2PSro6jqOYUWdkiq9nn9ur7MWhEvb 7sV5HLQhgcnsubba2WB4Ai9bPAPFEz0Buu0tVwYsI+HAcKyu/TeCVDO2gZ7iNchJcupFKL RFzurobPODCrV0q6DAkQacyuecFTMWg+w7O1vp7G2XCH6u+HZhMHywZfRsci6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVs7x0hJVz10xm for ; Tue, 16 Dec 2025 09:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e2bc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 09:29:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: 012f1e4ae350 - main - axidma(4): switch interrupt type. 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: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 012f1e4ae350015ddb896e3d482485ce8258c0ef Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 09:29:17 +0000 Message-Id: <6941266d.3e2bc.3bde8314@gitrepo.freebsd.org> The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=012f1e4ae350015ddb896e3d482485ce8258c0ef commit 012f1e4ae350015ddb896e3d482485ce8258c0ef Author: Ruslan Bukin AuthorDate: 2025-12-16 09:25:58 +0000 Commit: Ruslan Bukin CommitDate: 2025-12-16 09:25:58 +0000 axidma(4): switch interrupt type. Switch interrupt type to NET so that it enters net epoch during interrupt service routine. Sponsored by: CHERI Research Centre --- sys/dev/xilinx/axidma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/xilinx/axidma.c b/sys/dev/xilinx/axidma.c index 29757a335dee..001f2a9df6c8 100644 --- a/sys/dev/xilinx/axidma.c +++ b/sys/dev/xilinx/axidma.c @@ -172,7 +172,7 @@ axidma_setup_cb(device_t dev, int chan_id, void (*cb)(void *), void *arg) return (EEXIST); error = bus_setup_intr(dev, sc->res[chan_id + 1], - INTR_TYPE_MISC | INTR_MPSAFE, NULL, cb, arg, + INTR_TYPE_NET | INTR_MPSAFE, NULL, cb, arg, &sc->ih[chan_id]); if (error) device_printf(dev, "Unable to alloc interrupt resource.\n"); From nobody Tue Dec 16 10:16:16 2025 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 4dVtB83cQtz6KhFk for ; Tue, 16 Dec 2025 10:16: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVtB81bxPz3HKf for ; Tue, 16 Dec 2025 10:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765880176; 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=jSxUlmb5cKi/uuyIGXjekw0Ehj7TGqE3SO7Z2pLh1hQ=; b=vNkhLcw4g0UAKsmLY8ZiXtgH81eiv63TlY25Qfl5WGoB2WCaLCxA9UtJO5es1ouiNRiX+5 Lrdt44rNrXGBVeubdH/W+avNhNIDvRacb/L/s5onk4mVdq7Jxa5ncr+6sq6O+DnZI5q3Fz GvpnSVxuSCgjVBPx+fYbBZglcb07JIceTNbFoJEVdUGbjECIFwSa25kuuniB158yTBlmN9 KAtgeZnfrZ4pW4VaJCvawBMPuFivSdlYE9cmunGbJbaUFl0RJziprMEaddM1kLk0WCZ9pI 7CtvzpAVsXflpkAMsPuW6nqKSHjFUiuv5vlaB/dtRqOzkdsTIPW1BcEdaiHKyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765880176; 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=jSxUlmb5cKi/uuyIGXjekw0Ehj7TGqE3SO7Z2pLh1hQ=; b=C85+AyaMgnUWghYZsvjP7MKhRUg40e6Mw8Nh8ym5GsGbyacO+QD6TqkraTgBLyKhBXqnFT yk7lbQW3HhKj+xK37b4AxLR6nEGZ9hcWhVAv6Lf9xlwY83mgpNIQDCrZ7ZpYHHf9dNlsbL HuruBmr9JzLMudhJECdyskfK0KIDpFV2LVxhWvnF/Mwx9WVVNg9W9ZqRAR40oeO4juznn9 D778iuqgNjv8ireB17utdWJezQfhxTV8gXsXkhg8ScMl+dRAgGtRs/rOMCUolpQ0N7zT8Q wUSpUVC6Ln9bJjAXMCm6env8ddvFrEqFrwSSy7aviLRaMEuXQmnGR/ZMkuMgJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765880176; a=rsa-sha256; cv=none; b=wcIgBjusZSPKRFsEZyV0IP8ytWidmVZak9Fb5x6tSc9caVW2hl4CYEDgTWindqh1+mwDk6 eIBfO5JegDrlnEdmBEka/qRQNQWptOsnUpuGUoS3FbhIUmlr++N4GxDbV9HlGT/NapI8ff 97kY6aZFuvJWtnO8oqu/cLAFw2i+3tiry4dQVxOaDb1moOdsXfka09hcls/mGMJb4qHWRD ccmtOWDOdeGPoF/8oxpxNTd6PfVZB6VZX9sc92a2GeCVCRTuZzKbkr0WqKrrR8hv40bNA+ 1RLgR+5hDZY5uHzJJrTQujXxLVE68mIZitNxVEVLvw5tzq72PG2pRf9KFkxgIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVtB80ZdFz11Wq for ; Tue, 16 Dec 2025 10:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b677 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 10:16:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: e93e57d3da2e - main - tests/fibs_test: unskip udp_dontroute6 testcase 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e93e57d3da2ea54598b5db01cc12a3acd656faba Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 10:16:16 +0000 Message-Id: <69413170.b677.294faf8a@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=e93e57d3da2ea54598b5db01cc12a3acd656faba commit e93e57d3da2ea54598b5db01cc12a3acd656faba Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-16 10:15:30 +0000 tests/fibs_test: unskip udp_dontroute6 testcase This test now consistently passes (300+ consecutive runs). Signed-off-by: Siva Mahadevan PR: 244172 Sponsored by: The FreeBSD Foundation --- tests/sys/netinet/fibs_test.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/sys/netinet/fibs_test.sh b/tests/sys/netinet/fibs_test.sh index 2d0b63f8e30a..51f19d359137 100644 --- a/tests/sys/netinet/fibs_test.sh +++ b/tests/sys/netinet/fibs_test.sh @@ -663,9 +663,6 @@ udp_dontroute6_head() udp_dontroute6_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/244172" - fi # Configure the TAP interface to use an RFC3849 nonrouteable address # and a non-default fib ADDR0="2001:db8::2" From nobody Tue Dec 16 10:21:40 2025 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 4dVtJN72gpz6KhQc for ; Tue, 16 Dec 2025 10:21: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVtJN6DKSz3JYP for ; Tue, 16 Dec 2025 10:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765880500; 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=OjQexrf/wmiuVD69kUnoaNiP5OnlM3MGISViqjqLuf0=; b=bS0lO4qNLHvllxdYuRC9Qc2BM5/ASdGaD6aANNK+rMaUE9aeq97soShCaGOgOoA4V/nyPW KmRyB/fGxJr108iWqmpCPanOlLryForTs4CPBzU8rm/guUpPnT8uG+NHIbRQSE0itzqRhq pbc9e02QRmkKpeph7c614IVv7lurfzQabZOuZzwH0z0y05d5ZZNY+ewQ7xqT1eAeZ7C3ES DPhKZzvUlTazJ5cUfx+3sxgfOCr3Xo0PAQEKtqMRlIP91z5Q7nvWMczgIigTAzDycqOKsg x6PHQ0npL3hoZ4cA6PlwlehsANhiXYiLGecLpgQ0QntCsOf8WS/NOqLyFoRj7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765880500; 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=OjQexrf/wmiuVD69kUnoaNiP5OnlM3MGISViqjqLuf0=; b=Z2GMRtgZnygYils26loEeBpcLj5soNkKT/hdcCyqtJqNmwahJqapLYmwM1xzBV3hT2tqKl qLW1bkLnt82wQIyLY5QNm0vzUOR20zYufXTDnBZKIY/5RuOx7nH+IVmKwkZBrUKpwjdEbO T87wbYrLSDTTXASxDo66eJaDdMqEmFkj/jiKjESshP4sYESAqS5t1k6A6DcskidToDrocz Hstz629P2mXQ4+4XuOKBp25raEVghd1DNJSHtMbN1+VmvV6ncw/IAL1MI7VydaFRx056T2 zfXPVblAyjSN0BW7Q+qVqLpUpDDZvueFPOCApfYT+0tzE1WIjfDpiTj4AcV1+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765880500; a=rsa-sha256; cv=none; b=x5Ctw8ciMbd9AVT+aLoDVQDDXi1HCCt//75P8S+YjUP0BIv4Jd3y6GDxKl8H0qjEyDXg4b pYraQqJot1BJQx+qk4KERchO330ZmiBx3OkzBMq+ZnU6A4huHMRpLPtqmO4slpR2Pj2HTw CuOPdbAH5gSCG8pgV7m9IdClel/BJLNUG5PwlMeWRdFJl4CpocmCWPvqjVcRT8ZTpJfI5i bvLGx4WCNpOd2TRI2O+e/x1IZcVlWXzew4lV/RGMKvDwm4/CZCrWkQWgkYbGOGxus6PjdL 5tkwfu44x8dxXwuA88c1JtACzl9gy7NMlod213+K5Zy7kWH+0j2d/C+jC2Ex7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVtJN5kGNz11wS for ; Tue, 16 Dec 2025 10:21:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a859 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 10:21:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 7a83fedc116d - main - tests/if_lagg_test: unskip 'witness' testcase 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a83fedc116d827cc9c6d8e049b785f1d7b68dcd Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 10:21:40 +0000 Message-Id: <694132b4.a859.2666eac4@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=7a83fedc116d827cc9c6d8e049b785f1d7b68dcd commit 7a83fedc116d827cc9c6d8e049b785f1d7b68dcd Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-16 10:20:44 +0000 tests/if_lagg_test: unskip 'witness' testcase This testcase passes consistently (in 100+ runs) now. Signed-off-by: Siva Mahadevan PR: 244163, 251726 MFC after: 3 days Sponsored by: The FreeBSD Foundation --- tests/sys/net/if_lagg_test.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/sys/net/if_lagg_test.sh b/tests/sys/net/if_lagg_test.sh index e2b998599991..992cdd1ebc0d 100755 --- a/tests/sys/net/if_lagg_test.sh +++ b/tests/sys/net/if_lagg_test.sh @@ -392,9 +392,6 @@ witness_head() } witness_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/244163 and https://bugs.freebsd.org/251726" - fi if [ `sysctl -n debug.witness.watch` -ne 1 ]; then atf_skip "witness(4) is not enabled" fi From nobody Tue Dec 16 13:57:09 2025 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 4dW1Q36Xjdz6L7mZ; Tue, 16 Dec 2025 15:42:03 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW1Q26rllz3wRQ; Tue, 16 Dec 2025 15:42:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=permerror reason="p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com" header.from=cschubert.com (policy=permerror); spf=pass (mx1.freebsd.org: domain of cy.schubert@cschubert.com designates 3.97.99.32 as permitted sender) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4004b.ext.cloudfilter.net ([10.228.9.230]) by cmsmtp with ESMTPS id VSkIvvsEcAPFJVXBav60or; Tue, 16 Dec 2025 15:42:02 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id VXBYvUqnz5aoCVXBZvB1hS; Tue, 16 Dec 2025 15:42:02 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=YMSSCBGx c=1 sm=1 tr=0 ts=69417dca a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=wP3pNCr1ah4A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=pGLkceISAAAA:8 a=YxBL1-UpAAAA:8 a=dzxgqi4qae0D1tNeHg4A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 901E0F4; Tue, 16 Dec 2025 07:42:00 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 46D25203; Tue, 16 Dec 2025 05:57:09 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Robert Clausecker cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() In-reply-to: <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org> References: <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org> Comments: In-reply-to Robert Clausecker message dated "Sun, 14 Dec 2025 16:08:17 +0000." 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 Date: Tue, 16 Dec 2025 05:57:09 -0800 Message-Id: <20251216135709.46D25203@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDkEos3KOZvcUdqm22obR27h1jAwTuYFUuD7kGEiPA9+GqxhAOPIXrwWK9YsIf8V7oUfiAIj/z1ZfAL9KbbXboLzPkKUDSsbQgb9F7hlh9oboTwTYnDK DzeAiJLeDl7W4mhNwtX4C79VHCao3862qL+p66J8jDITqyjOIHhpuWp9bdkgiR26jc0KfZ3T8rz2Z/rj3k2supysoEKVI8Ygg0pArPhCJA8Y3QAQmTSANrjr Ibj/gOK5uc1XWygsMNGhdV0dmPjhQyxli5UmCxC0qEQDaDVuKQRIWs3KUJnmeei/wiI2LkG0/XvqvqR0kyHJLDyhAXIcB/JVF8HshdRbE4s= X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.89 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:3.97.99.32/31]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; REPLYTO_EQ_FROM(0.00)[]; DMARC_BAD_POLICY(0.00)[cschubert.com : p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4dW1Q26rllz3wRQ In message <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org>, Robert Clausecker wri tes: > The branch main has been updated by fuz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=66eb78377bf109af1d9e25626bf254b4 > 369436ec > > commit 66eb78377bf109af1d9e25626bf254b4369436ec > Author: Robert Clausecker > AuthorDate: 2025-12-10 20:45:18 +0000 > Commit: Robert Clausecker > CommitDate: 2025-12-14 16:06:05 +0000 > > libc/amd64: fix overread conditions in stpncpy() > > Due to incorrect unit test design, two overread conditions went > undetected in the amd64 baseline stpncpy() implementation. > For buffers of 1--16 and 32 bytes that do not contain nul bytes > and end exactly at a page boundary, the code would incorrectly > read 16 bytes from the next page, possibly crossing into an > unmapped page and crashing the program. If the next page was > mapped, the code would then proceed with the expected behaviour > of the stpncpy() function. > > Three changes were made to fix the bug: > > - an off-by-one error is fixed in the code deciding whether to > enter the runt case or not, entering it for 0 instead of 0 - in the runt case, the logic to skip reading a second 16-byte > chunk if the buffer ends in the first chunk was fixed to > account for buffers that end at a 16-byte boundary but do not > hold a nul byte. > - in the runt case, the logic to transform the location of the > end of the input buffer into a bit mask was fixed to allow > the case of n==32, which was previously impossible due to the > incorrect logic for entering said case. > > The performance impact should be minimal. > > PR: 291359 > See also: D54169 > Reported by: Collin Funk > Reviewed by: getz > Approved by: markj (mentor) > MFC after: 1 week > Fixes: 90253d49db09a9b1490c448d05314f3e4bbfa468 (D42519) > Differential Revision: https://reviews.freebsd.org/D54170 > --- > lib/libc/amd64/string/stpncpy.S | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/lib/libc/amd64/string/stpncpy.S b/lib/libc/amd64/string/stpncpy. > S > index 5ce0dd093a9e..df22bb9f0c53 100644 > --- a/lib/libc/amd64/string/stpncpy.S > +++ b/lib/libc/amd64/string/stpncpy.S > @@ -100,7 +100,7 @@ ARCHENTRY(__stpncpy, baseline) > movdqa (%rsi), %xmm0 # load head > and $0xf, %ecx # offset from alignment > mov $-1, %r9d > - lea -32(%rcx), %rax # set up overflow-proof compari > son rdx+rcx<=32 > + lea -33(%rcx), %rax # set up overflow-proof compari > son rdx+rcx<=32 > shl %cl, %r9d # mask of bytes belonging to th > e string > sub %rcx, %rdi # adjust RDI to correspond to R > SI > pxor %xmm1, %xmm1 > @@ -223,8 +223,9 @@ ARCHENTRY(__stpncpy, baseline) > > /* 1--32 bytes to copy, bounce through the stack */ > .Lrunt: movdqa %xmm1, bounce+16(%rsp) # clear out rest of on- > stack copy > - bts %r10d, %r8d # treat end of buffer as end of > string > - and %r9w, %r8w # end of string within first bu > ffer? > + bts %r10, %r8 # treat end of buffer as end of > string > + and %r9d, %r8d # mask out head before string > + test $0x1ffff, %r8d # end of string within first ch > unk or right after? > jnz 0f # if yes, do not inspect second > buffer > > movdqa 16(%rsi), %xmm0 # load second chunk of input > I've opened PR/291720 regarding a significant regression caused by this commit. It affects my older machines, resulting in enviornment (getenv) corruption. It does not affect my newer (and with more RAM) machines. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Tue Dec 16 15:55:57 2025 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 4dW1k563pNz6L8lP for ; Tue, 16 Dec 2025 15:55: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW1k54sJmz3yjQ for ; Tue, 16 Dec 2025 15:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765900557; 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=3jafcEiu4HzhxCAzMr62Pp6VOr6GAIUA0xaeznC9ihA=; b=ZsTO72hcPaCuUUD3ZlSuHvEygIAqkYzkHJv8mtFbNGvdKyk0KVFJqI7b5vOfIX4Smbq3f5 Uqqh3N1p3fIUptXJ2LIu1uscRJCtX2ey7ypH5EXPQnt939lujYgm5cXOGfqzhmEFQB8apb m84DFNWvc/bNkq9u8C2X0v+IdYFsYWYUxiKWoiHmaE5qC+AB7rd+nZRkTeNjkm9RQsxOOK hD4WieYjrSMTe18sJLT62Z7j65f7FgqEyzhBoZmuIw9bjZESB1hLfWY+PnV609zLjrvxPZ 43jrNjJ0sRTRmUriqUZf0nTYsu9IFarchimu9LYSQCsSaDch3GALC/q50FEilQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765900557; 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=3jafcEiu4HzhxCAzMr62Pp6VOr6GAIUA0xaeznC9ihA=; b=VNFcMc1nW5zGzhT5eqVTeGjTM0gMo6uZqoIXbDz22FwHAEW8Zo9wGFTRSgb9pJ0zHXD+B0 6UshcmIOcPFxBFcwEQZBiF/0ktugIpMmaEi+C5Nye+7wXmZLF86+H0259hUbLYPhD5Msip Sjdg8OzBT3s48872vkTmS/i+yjAqYt7T2HPo/Mofg1JWjDyiEc/O8j6B1Sg9yN8llQNU7X PTYAOH1fZOpXjTU18gNaUSDQpW4aqFLI5bJOoUP2gb/HJBCN23QecGUi/cJNI6BVrgYdMh 0HxnkeQlRMM/TFsWE2oyOcjzCxvdQqSswCVLVVWEvAju4r4G7Xb+m03k5ExYKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765900557; a=rsa-sha256; cv=none; b=sDtr9P2Ei2s2ktgq5Riask7em0PgwOsZg/2Vb0grL5fRw7Q/rHHOqcCICHZifeaEgLrx99 oU219sS8/huJOoS8o9rDkh7np40AfKxF3Yz1qiP+d3Oms5LZ+WjiBztGR4f4YGZif7j6vQ DeQrnCV0q4C8p/Mds9aKncHr03HGv7dxV5T79ZT6H5KpHjk0Bmut9Sl82B6fU8LcMIp7V2 w4klrehXssnJH1mVyiLvPJM1+Bjk9M+uJPEqaRnApS1a/uh/Qz/7CAWLVvTeAw1R/ZQ6Zv WoN+MgltC/yfTzFQlAWiodSBpS4xptUzVBO99q10BFpLLuVxAroaQC5vXN361Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW1k53wrbz1BXK for ; Tue, 16 Dec 2025 15:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44dd1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 15:55:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: cce603cfca77 - main - if_rge: Add PNP info for module 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: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cce603cfca773c61f3e17ea38575f4ba0557792d Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 15:55:57 +0000 Message-Id: <6941810d.44dd1.4a736197@gitrepo.freebsd.org> The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=cce603cfca773c61f3e17ea38575f4ba0557792d commit cce603cfca773c61f3e17ea38575f4ba0557792d Author: Olivier Cochard AuthorDate: 2025-12-16 15:50:30 +0000 Commit: Olivier Cochard CommitDate: 2025-12-16 15:50:30 +0000 if_rge: Add PNP info for module Add PNP info so the module can be matched by devmatch(8) and automatically loaded. Reviewed by: adrian Approved by: adrian Differential Revision: https://reviews.freebsd.org/D54254 --- sys/dev/rge/if_rge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c index b011968905a6..41a39f5bfb60 100644 --- a/sys/dev/rge/if_rge.c +++ b/sys/dev/rge/if_rge.c @@ -2681,3 +2681,5 @@ MODULE_DEPEND(rge, pci, 1, 1, 1); MODULE_DEPEND(rge, ether, 1, 1, 1); DRIVER_MODULE_ORDERED(rge, pci, rge_driver, NULL, NULL, SI_ORDER_ANY); +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, rge, rge_devices, + nitems(rge_devices) - 1); From nobody Tue Dec 16 16:00:02 2025 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 4dW1ps2qX9z6L8vL; Tue, 16 Dec 2025 16:00:05 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW1ps0y0Xz40r4; Tue, 16 Dec 2025 16:00:05 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003b.ext.cloudfilter.net ([10.228.9.157]) by cmsmtp with ESMTPS id VRVUvvqDWAPFJVXT2v6U2l; Tue, 16 Dec 2025 16:00:04 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id VXT0vuLwS24TSVXT1vaWzY; Tue, 16 Dec 2025 16:00:04 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Ie+KmGqa c=1 sm=1 tr=0 ts=69418204 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=wP3pNCr1ah4A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=pGLkceISAAAA:8 a=YxBL1-UpAAAA:8 a=031C1j8QFwABdqN2fNoA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A78D0234; Tue, 16 Dec 2025 08:00:02 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id A65D63D6; Tue, 16 Dec 2025 08:00:02 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Robert Clausecker , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() In-reply-to: <20251216135709.46D25203@slippy.cwsent.com> References: <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org> <20251216135709.46D25203@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Tue, 16 Dec 2025 05:57:09 -0800." 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 Date: Tue, 16 Dec 2025 08:00:02 -0800 Message-Id: <20251216160002.A65D63D6@slippy.cwsent.com> X-CMAE-Envelope: MS4xfCpCpTU5n7gVDkjPw//yDq9vzrL09Ceto+KwzZ4q2aZNHja8g8MryLabV+1qlcXEY8t89kPJWSE/5EJGAk//RllmcwX+0gwvuj+PA5KEBNs8xAkpzRxI YMfc7f4nMi21AVaDH9pFl6n6/jTiTao9DED4qE7GjqWudEM1Z+YNRQHX9ssbWxKviVr1WX6w6XW0Pr9jxPHIkRluOcgw/w61VNjXDa2RghatiaejlBS6H6pk LPmMKaXc+5U5NKvULfqmj3gsWqqKkiybGnC5FrIrCyFiE6DIgaoBx/I3H/WSVC5pRFNOWCziRAIVehRorVMexmafYDwr63FtnW2KYZDaP2Y= X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dW1ps0y0Xz40r4 In message <20251216135709.46D25203@slippy.cwsent.com>, Cy Schubert writes: > In message <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org>, Robert Clausecker > wri > tes: > > The branch main has been updated by fuz: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=66eb78377bf109af1d9e25626bf254 > b4 > > 369436ec > > > > commit 66eb78377bf109af1d9e25626bf254b4369436ec > > Author: Robert Clausecker > > AuthorDate: 2025-12-10 20:45:18 +0000 > > Commit: Robert Clausecker > > CommitDate: 2025-12-14 16:06:05 +0000 > > > > libc/amd64: fix overread conditions in stpncpy() > > > > Due to incorrect unit test design, two overread conditions went > > undetected in the amd64 baseline stpncpy() implementation. > > For buffers of 1--16 and 32 bytes that do not contain nul bytes > > and end exactly at a page boundary, the code would incorrectly > > read 16 bytes from the next page, possibly crossing into an > > unmapped page and crashing the program. If the next page was > > mapped, the code would then proceed with the expected behaviour > > of the stpncpy() function. > > > > Three changes were made to fix the bug: > > > > - an off-by-one error is fixed in the code deciding whether to > > enter the runt case or not, entering it for 0 > instead of 0 > - in the runt case, the logic to skip reading a second 16-byte > > chunk if the buffer ends in the first chunk was fixed to > > account for buffers that end at a 16-byte boundary but do not > > hold a nul byte. > > - in the runt case, the logic to transform the location of the > > end of the input buffer into a bit mask was fixed to allow > > the case of n==32, which was previously impossible due to the > > incorrect logic for entering said case. > > > > The performance impact should be minimal. > > > > PR: 291359 > > See also: D54169 > > Reported by: Collin Funk > > Reviewed by: getz > > Approved by: markj (mentor) > > MFC after: 1 week > > Fixes: 90253d49db09a9b1490c448d05314f3e4bbfa468 (D42519) > > Differential Revision: https://reviews.freebsd.org/D54170 > > --- > > lib/libc/amd64/string/stpncpy.S | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/lib/libc/amd64/string/stpncpy.S b/lib/libc/amd64/string/stpncp > y. > > S > > index 5ce0dd093a9e..df22bb9f0c53 100644 > > --- a/lib/libc/amd64/string/stpncpy.S > > +++ b/lib/libc/amd64/string/stpncpy.S > > @@ -100,7 +100,7 @@ ARCHENTRY(__stpncpy, baseline) > > movdqa (%rsi), %xmm0 # load head > > and $0xf, %ecx # offset from alignment > > mov $-1, %r9d > > - lea -32(%rcx), %rax # set up overflow-proof compari > > son rdx+rcx<=32 > > + lea -33(%rcx), %rax # set up overflow-proof compari > > son rdx+rcx<=32 > > shl %cl, %r9d # mask of bytes belonging to th > > e string > > sub %rcx, %rdi # adjust RDI to correspond to R > > SI > > pxor %xmm1, %xmm1 > > @@ -223,8 +223,9 @@ ARCHENTRY(__stpncpy, baseline) > > > > /* 1--32 bytes to copy, bounce through the stack */ > > .Lrunt: movdqa %xmm1, bounce+16(%rsp) # clear out rest of on- > > stack copy > > - bts %r10d, %r8d # treat end of buffer as end of > > string > > - and %r9w, %r8w # end of string within first bu > > ffer? > > + bts %r10, %r8 # treat end of buffer as end of > > string > > + and %r9d, %r8d # mask out head before string > > + test $0x1ffff, %r8d # end of string within first ch > > unk or right after? > > jnz 0f # if yes, do not inspect second > > buffer > > > > movdqa 16(%rsi), %xmm0 # load second chunk of input > > > > I've opened PR/291720 regarding a significant regression caused by this > commit. It affects my older machines, resulting in enviornment (getenv) > corruption. It does not affect my newer (and with more RAM) machines. BTW, this brought my postfix server effectively offline. I have not been able to send or receive email until this commit was reverted locally. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Tue Dec 16 16:09:10 2025 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 4dW21L5LWHz6L9ws for ; Tue, 16 Dec 2025 16:09: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW21L38rrz3Dml for ; Tue, 16 Dec 2025 16:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765901350; 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=/tqO3ocuQzofwuJJr4glbWWlim3qArcQBLh90rFDTGk=; b=CBIPY6P6ykq1jiInxqh4MOjlEfJSxVBSpnCy8oCKYmyAV90jytxssy6PWIJ0qJGSrT/Skr XE1OV1USZzEI+87yoq7tbsXf6wPCNagBIKYkWn1w2apEilCrSBSbfR/HZlc0qlPiZKKWgo 11U/4OfXe9MYS5TBRKhE4tZ8PRWqX0BFl3tLgMwjnjpZSf+2OU12RPn4LMRXbhz6RSec+C tqlcCdcAwwf5KH0Bc/SNHkgIJbDVIois8hDCIN4UKnIm6QWHL66Ft6juwPmallwDpHowIO pRAUdS8IYnpFErJhNIsPN/wr0XrfUK0m69kaewkbufDDiohA4EHi6QS9wwJagw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765901350; 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=/tqO3ocuQzofwuJJr4glbWWlim3qArcQBLh90rFDTGk=; b=vB2UB4XHWsWG+uomqYYksMIR3GlVuGId3thPHYHfaJpAoDYCxHEdzvcZT8M2VQGEo8VFE9 K2364w2KnI1vWY9Og1ePeAMLoAw6PZjKKRwBrFMQPe1NjCrSFYZ9wNdGzMyfMwThTrT/n9 SSRL8QRRCAFItZ3WAH44CmHrjnH0O6wjnG63r/uVpTNKdRDwkKh9O+Gi++QDk8TYXi67gZ QRGL14fGNP+0TyukjGNTuai8ieBYs4xaYqxsdDIIhSb4pgH6Muy5FGBVA41CpArmqJ36zJ ZTHWIM+VbiGqNOrw245PIvgONC5GZB4j5zQCtDSGfKgb2P2stFsTaoasDNY78A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765901350; a=rsa-sha256; cv=none; b=PEJ+g0Vg+CVE0SB9vZ75VGDf4w7L2o4XPYjcVEhMUVNzFe8MW9sZ+ehOyg689jLmOyLEAR /pkhL6czXHy3KsCFMP8K2gYnrRFm5FGP7dKMRWj0rJyXt2r+yGI3hLVXl/XuPyriNY3xET DipurPuLH+3r1YEOIQGoCKfn6j2RkWlHMbt2xfsneot2IMLtN4+LS+ktOzEootC7Uh86AY J2KDWHrJWwTOifcaaYoaDjkTuUAHhMe1ObLnFsGkXRRoXEMaRez4roBzj4mZZ5aa9LM9H9 wnDlh6BbB4l5LsAuKmL7HBrPhhOwNcsymwUry+LLLO5k4yj/KgxOiCX0dPLXhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW21L23V3z1CLH for ; Tue, 16 Dec 2025 16:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4639f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 16:09:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2619d439fa86 - main - makeman.lua: Update for src.conf in the src tree 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: 2619d439fa860db734dbbf4b153c5ac9b15c7e49 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 16:09:10 +0000 Message-Id: <69418426.4639f.321b3fd2@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2619d439fa860db734dbbf4b153c5ac9b15c7e49 commit 2619d439fa860db734dbbf4b153c5ac9b15c7e49 Author: Ed Maste AuthorDate: 2025-12-16 16:04:31 +0000 Commit: Ed Maste CommitDate: 2025-12-16 16:08:52 +0000 makeman.lua: Update for src.conf in the src tree Copy the text change from the shell makeman to makeman.lua. Fixes: dd8c666d8b78 ("src.sys.mk: Support src.conf in SRCTOP") Sponsored by: The FreeBSD Foundation --- tools/build/options/makeman.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/build/options/makeman.lua b/tools/build/options/makeman.lua index e96e6f50174b..7ce919f7a8de 100644 --- a/tools/build/options/makeman.lua +++ b/tools/build/options/makeman.lua @@ -44,8 +44,11 @@ variables that control the aspects of how the system builds. .Pp The default location of .Nm -is -.Pa /etc/src.conf , +is the top level of the source tree, or +.Pa /etc/src.conf +if no +.Nm +is found in the source tree itself, though an alternative location can be specified in the .Xr make 1 variable From nobody Tue Dec 16 16:13:20 2025 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 4dW2686sBmz6LBXJ for ; Tue, 16 Dec 2025 16:13: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW2685s3vz3G8t for ; Tue, 16 Dec 2025 16:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765901600; 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=+LDE2++fwsYLoz1zjvmAyxI/S3XmTMVSa7hlyRGGtsA=; b=VKk9vkwP+jbm2o+H8GFwY8RJztaXFAHnncougF0TehN7O+oL72+zf05kxMbtJ6npWAKL+a VUljZ9tQ28gVq0riMzhLaqq+1zf4ffc7SbZAALQ8uRhmirgrbNJI3HNVTp2zj9zwpMLl7v Jgt2JUTxm0RzLOAiwE7oL5mV8/33dfpk6wVtTe0eGu4JpMkJl+7l52qX23KJWGmlUqs+o7 gXGL1LclKyPQ3WcdvAuE2bNWIo+TusuSAvbPvvlEKq+FPU1VTk+S2z1iXLQN1VHMXrpsUG /kSiRlVeY9B7giU2y1VOkyoLJwB9W1L3UFQl3RRk67lZtOhkaIAaIMTYbiqZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765901600; 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=+LDE2++fwsYLoz1zjvmAyxI/S3XmTMVSa7hlyRGGtsA=; b=XBJFI3B9db4CiAh8dqVZDMDQBHkM5LHu1yxaB1flD61A2CLbojjBf7JFpfp8iW8/bc82WT licpb88z4IvMEqIjlUv58ybCnywOhcUq+Tk8FxrjsPblIlt1vEtCdAprCj0JpVwvpqxiRu xhkkYegvjHTtpr0mVNPLB/5NBIgAwk/2TTey9AT0SzSBGXDI054iluQI0ZHeB1sdu1XBNz XtmcRBl+eo40TSJg9nUL3wT9xsZYOVD4El5y35hH8IG421pzqe1fnEVL3+EsDiub3lg5Z6 FQzGwPNUIuo46pfppvn/fy3bZwhgZ4zz5J9IIQsF2DWx+KGJ6i86OwdG9lTHeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765901600; a=rsa-sha256; cv=none; b=QCPJQj1pZTMyWpX8MsAGFqvM+d9MfO4mDNJ5DI6rRwWiZiK7Dp6sTLn7UX18FzGV83BhR6 Yphywrcv2tUJm83zYYdtcwpglwIqHlwS3pvr24nArXX/eVPRD8ScElxBWPPlhRmH8VaNGY BczyIGrO1c6BHmsQQdre/Pqh5IeqxCXkk3iq8m1nMwMIpfRVcVZngt4mYChxtDsMYc7XJA /jeHjhwKqgpFzHMwNEJgNUH1fD5fl8NGX6n1B2DUUNZ2gmA9xr4KpjVxPpmGYcCTa1A1hR AOaIQnKJ6tOKee9SNeRssHIs47FAol2GBSqeVFA0F75mhzAZP1S4mhRm8fvtsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW26858CBz1CRd for ; Tue, 16 Dec 2025 16:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 441f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 16:13:20 +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: a34c50fbd2a5 - main - ipfilter: Prevent stack buffer overflow 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: a34c50fbd2a52bb63acde82e5aec4cb57880e39b Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 16:13:20 +0000 Message-Id: <69418520.441f3.317f300b@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a34c50fbd2a52bb63acde82e5aec4cb57880e39b commit a34c50fbd2a52bb63acde82e5aec4cb57880e39b Author: Dag-Erling Smørgrav AuthorDate: 2025-12-16 16:11:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-16 16:12:36 +0000 ipfilter: Prevent stack buffer overflow When copying ipfs data from user space, don't just check that the payload length is nonzero, but also that it does not exceed the size of the stack buffer we're copying it into. While we're at it, use a union to create a buffer of the exact size we need instead of guessing that 2048 will be enough (and not too much). Finally, check the size of the payload once it gets to where it's used. MFC after: 3 days Reported by: Ilja Van Sprundel Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D54194 --- sbin/ipf/libipf/interror.c | 5 ++++ sys/netpfil/ipfilter/netinet/ip_sync.c | 51 ++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 2bbecaa154e6..a7e6f4a5e431 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -483,6 +483,11 @@ log" }, { 110019, "sync update could not find NAT entry" }, { 110020, "unrecognised sync NAT command" }, { 110021, "ioctls are not handled with sync" }, + /* missing entries 110022-110024 */ + { 110025, "invalid payload length (sync create state)" }, + { 110026, "invalid payload length (sync update state)" }, + { 110027, "invalid payload length (sync create NAT)" }, + { 110028, "invalid payload length (sync update NAT)" }, /* -------------------------------------------------------------------------- */ { 120001, "null data pointer for iterator" }, { 120002, "unit outside of acceptable range" }, diff --git a/sys/netpfil/ipfilter/netinet/ip_sync.c b/sys/netpfil/ipfilter/netinet/ip_sync.c index f6bc7e7fbe2a..b0be68148a18 100644 --- a/sys/netpfil/ipfilter/netinet/ip_sync.c +++ b/sys/netpfil/ipfilter/netinet/ip_sync.c @@ -409,13 +409,16 @@ ipf_sync_write(ipf_main_softc_t *softc, struct uio *uio) { ipf_sync_softc_t *softs = softc->ipf_sync_soft; synchdr_t sh; - - /* - * THIS MUST BE SUFFICIENT LARGE TO STORE - * ANY POSSIBLE DATA TYPE - */ - char data[2048]; - + union ipf_sync_data { + union ipf_sync_state_data { + ipstate_t create; + synctcp_update_t update; + } state; + union ipf_sync_nat_data { + nat_t create; + syncupdent_t update; + } nat; + } data; int err = 0; # if defined(__NetBSD__) || defined(__FreeBSD__) @@ -494,18 +497,18 @@ ipf_sync_write(ipf_main_softc_t *softc, struct uio *uio) * needed for the request */ - /* not supported */ - if (sh.sm_len == 0) { + /* too short or too long */ + if (sh.sm_len == 0 || sh.sm_len > sizeof(data)) { if (softs->ipf_sync_debug > 2) - printf("uiomove(data zero length %s\n", - "not supported"); + printf("uiomove(data) invalid length %d\n", + sh.sm_len); IPFERROR(110006); return (EINVAL); } if (uio->uio_resid >= sh.sm_len) { - err = UIOMOVE(data, sh.sm_len, UIO_WRITE, uio); + err = UIOMOVE(&data, sh.sm_len, UIO_WRITE, uio); if (err) { if (softs->ipf_sync_debug > 2) @@ -519,9 +522,9 @@ ipf_sync_write(ipf_main_softc_t *softc, struct uio *uio) sh.sm_len); if (sh.sm_table == SMC_STATE) - err = ipf_sync_state(softc, &sh, data); + err = ipf_sync_state(softc, &sh, &data); else if (sh.sm_table == SMC_NAT) - err = ipf_sync_nat(softc, &sh, data); + err = ipf_sync_nat(softc, &sh, &data); if (softs->ipf_sync_debug > 7) printf("[%d] Finished with error %d\n", sh.sm_num, err); @@ -651,6 +654,11 @@ ipf_sync_state(ipf_main_softc_t *softc, synchdr_t *sp, void *data) { case SMC_CREATE : + if (sp->sm_len != sizeof(sn)) { + IPFERROR(110025); + err = EINVAL; + break; + } bcopy(data, &sn, sizeof(sn)); KMALLOC(is, ipstate_t *); if (is == NULL) { @@ -717,6 +725,11 @@ ipf_sync_state(ipf_main_softc_t *softc, synchdr_t *sp, void *data) break; case SMC_UPDATE : + if (sp->sm_len != sizeof(su)) { + IPFERROR(110026); + err = EINVAL; + break; + } bcopy(data, &su, sizeof(su)); if (softs->ipf_sync_debug > 4) @@ -892,6 +905,11 @@ ipf_sync_nat(ipf_main_softc_t *softc, synchdr_t *sp, void *data) break; } + if (sp->sm_len != sizeof(*nat)) { + IPFERROR(110027); + err = EINVAL; + break; + } nat = (nat_t *)data; bzero((char *)n, offsetof(nat_t, nat_age)); bcopy((char *)&nat->nat_age, (char *)&n->nat_age, @@ -915,6 +933,11 @@ ipf_sync_nat(ipf_main_softc_t *softc, synchdr_t *sp, void *data) break; case SMC_UPDATE : + if (sp->sm_len != sizeof(su)) { + IPFERROR(110028); + err = EINVAL; + break; + } bcopy(data, &su, sizeof(su)); for (sl = softs->syncnattab[hv]; (sl != NULL); From nobody Tue Dec 16 16:16:19 2025 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 4dW29g1rvrz6LBMH; Tue, 16 Dec 2025 16:16:23 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW29g0qWBz3Gdf; Tue, 16 Dec 2025 16:16:23 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765901783; 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=8OKw6HLJE3lk1ciEXWQYEeGWDOZTxwAJ5K/nE8JohIo=; b=GmJlNx+tK9qLAMqzGa0D4PBqed5RBt09Bo0oJCFdbJ1d37/8/CZrE1VMMziCBzOTQ67hP7 gMX6sPH71irn6LHMJ9Y3g/ao3wdTpqRU3eQWR0jgnKwiwFihEzIc12+qNdUx20KNab9O0Z 2a9qQjyOVsfSdX3Fu7GHNRmLN6OwzBfUnv6jyi4qxW3eDYPPEJf2btfV+TNab2LyLr945S M25NFGBdfmQqHg7S4lzY4unJU980l/XJnme5GFRamMh+e7RfG5CG9nDqHIsRsMkB/2RU8i hnOBiuMhPqle+lT2TOjT7frQp3uI3nNWp1tSHjByoHHaAojL8s3BZFMVDWWykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765901783; 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=8OKw6HLJE3lk1ciEXWQYEeGWDOZTxwAJ5K/nE8JohIo=; b=WD1M94ixurbibqRtem1uYbKHWANB2TqJkzcQMu1zprGkXxDSwP66FYtqkIH2+wkHJE+LvN Z4ULXlE5t68inI8+sCALhZs60hsadmVix1vZwEHqZkohJUr7fPahrQ78IDMEqWgtgvOhaR nUTehrYjPM1p+GLkFl6b76zroU4js0AarYdKaFwShcj8owl2ZLarG0AXxWDlP2EpzZ7HXQ tBg2UyW5A+NqwNbojYHyOaKsjxaPmMjqonCOFD/nQdYQhELsr2Vw/tqozUNTwMDGQz8Y2r 7v6dvq1ziGfKxYVo537MT2FMwNy1i+KAxWMVHVLNPbQG0cUirsHba6nsCtvhMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765901783; a=rsa-sha256; cv=none; b=fzDP+OoYs8JPrA3KAJi6fl6KZJp+Q05oGsS2sAwtVUwxYaZ5KaEBiMJXzAA5GfMcW822/0 NP9y0vY1/h3eE2gmRjmPDVzlfsNFI3El1EwdjSFRg6ZOBIqbX5TQD0bJHNjZvDejjK4pTU zjPTPEC6q1gMKibusMqXcZp7uwxrPWDTQWXRlKts31j5ApXPXrSQ//nU4aD93J7GzC/Qpg RCJaA3yDoCtxbqeT0cU817f01XySIyg7OWfJ2LlhIygfVGIp/FBpU1o/QiZW4UY09EvvCb dNY9Gtl+GgbXJVS0UW3HskAnnob6Og8iWqqTlSm9NRqcE/7KbRj24l7iDFouJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dW29f1NyCz19p1; Tue, 16 Dec 2025 16:16:22 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 16 Dec 2025 08:16:19 -0800 From: Gleb Smirnoff To: Li-Wen Hsu , Siva Mahadevan Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Siva Mahadevan Subject: Re: git: 7a83fedc116d - main - tests/if_lagg_test: unskip 'witness' testcase Message-ID: References: <694132b4.a859.2666eac4@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <694132b4.a859.2666eac4@gitrepo.freebsd.org> On Tue, Dec 16, 2025 at 10:21:40AM +0000, Li-Wen Hsu wrote: L> The branch main has been updated by lwhsu: L> L> URL: https://cgit.FreeBSD.org/src/commit/?id=7a83fedc116d827cc9c6d8e049b785f1d7b68dcd L> L> commit 7a83fedc116d827cc9c6d8e049b785f1d7b68dcd L> Author: Siva Mahadevan L> AuthorDate: 2025-07-15 16:45:24 +0000 L> Commit: Li-Wen Hsu L> CommitDate: 2025-12-16 10:20:44 +0000 L> L> tests/if_lagg_test: unskip 'witness' testcase L> L> This testcase passes consistently (in 100+ runs) now. It really depends on what modules you have loaded. I have seen some LORs very recently and I didn't see fixes committed. However, it doesn't really mean that the bugs live in the lagg(4) module. That was JFYI, not a request to revert the change or anything else. -- Gleb Smirnoff From nobody Tue Dec 16 16:27:42 2025 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 4dW2Qk5kstz6LCGw for ; Tue, 16 Dec 2025 16:27: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW2Qk2nT3z3Hvn for ; Tue, 16 Dec 2025 16:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765902462; 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=7DGQcodSHN16ahLo+qmJqessxkecgiX0Z644Kn1rg2I=; b=SQu32ztiI7CQxvCL4XG4CH1BevhDmjX5HonFfwX+K5eOLnXYP3f50q7lLzJQpCJLlBvAhA 40uNbLJdCnuRyxJ6lU0nGZC4ncoc2cGVt2GYgcZ43mrX2xLM2m3pDlHqO5YJZaaRt/B84q FhHUak1TNDPQoIWkwfp52WqLFWFUbk7UgcLfITAAtKZAyr8b4GzFJ21clUzzrwxjbUHVRP 4M5PZAYY2iM+a54xA1YT0J1w05BcU6CO6gtDTZFRYjqD0tZ/FN6Pkv5lHygURl6NiA/kbn bFmyQ2gci0KrRUMs5QBhxDJL4VccIJkED9UMK6zLDoBF6iOKDSqydgFzANEdjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765902462; 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=7DGQcodSHN16ahLo+qmJqessxkecgiX0Z644Kn1rg2I=; b=xICwodpTwfws9SZ+rjGyzowR6wAuPlLuL/CiJmXzg8xZ+wCRJvMgh7H06um1DFY9nHv7Jh oioPakPOj6ggkOX+X2G5krd0GUui/RXKJgpMnriPWFS8IVkD1r3C11sygEj70iaJHAUMRz BjdE/WFpz9c9+MYN2IslxByY7JO+4jLdn7Tj9y7HexqmYStYK4SeH305DqjHXgBdxF9AUh Xzlk/4Q12CROHnUic4dlfsNWxRiOQWKdQTGfnIdwYcadE40H/TpxLaXPPkYCGkT+0tASSO lOHLxXnV9KuRiFTTGEoPKdlFZ/NJwIy4XKUn5i/lBvm2SAzLiFbhgQoW4PFYfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765902462; a=rsa-sha256; cv=none; b=t2N0UEyk5zNVJPPNidLuuut9IialLcCBYBxoU65viMqpXWJSNkDTs0qdoecOw8fSTFhDZ9 AHneV1qpi2zkOEq9VoaIBPlzhf0jblZSTb+NeerNazL/yoGtjfng13Bfv6RKskbPigA8Os /qnP79OdElk6JnhmDvJ5rvx5l4o8NvEGhXGN8fXsH15wpA21XV/XuZFwNfmXJNCNi+6esx xWhIEAJLvyyZ9nusqeiXWKVyikHTxI06cl3GlyJD8BZyScQf6je6TOVUkra6FlhPpqCzS5 o3EKZliJVBnjd9xXmAYAM2K6boj31exVa1OaCU5Ul8+pfaXpHyIVj3McYPUZkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW2Qk1TTVz1CKm for ; Tue, 16 Dec 2025 16:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 85d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 16:27:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: a6ea80bc9175 - main - ipfilter: Add missing kenv fetch 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6ea80bc917510b5e056cc5a29b62dfd7b39d068 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 16:27:42 +0000 Message-Id: <6941887e.85d1.339917a4@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a6ea80bc917510b5e056cc5a29b62dfd7b39d068 commit a6ea80bc917510b5e056cc5a29b62dfd7b39d068 Author: Cy Schubert AuthorDate: 2025-12-15 16:21:56 +0000 Commit: Cy Schubert CommitDate: 2025-12-16 16:27:33 +0000 ipfilter: Add missing kenv fetch When a module the environment must be explicitly fetched. Fixes: d9788eabffa4 PR: 291548 Noted by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54242 MFC after: 3 days --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 43b590cc0204..207d1895dc3e 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1439,4 +1439,6 @@ ipf_fbsd_kenv_get(ipf_main_softc_t *softc) { TUNABLE_INT_FETCH("net.inet.ipf.large_nat", &softc->ipf_large_nat); + TUNABLE_INT_FETCH("net.inet.ipf.jail_allowed", + &softc->ipf_jail_allowed); } From nobody Tue Dec 16 16:39:34 2025 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 4dW2hR3KDqz6LFwg for ; Tue, 16 Dec 2025 16:39: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW2hR09yBz3Ldb for ; Tue, 16 Dec 2025 16:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765903175; 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=7Tq5dICF5sSR6iPnnBllWUcEt6FUmOFUNaoSIWiQgdM=; b=EPToPWv2C0EU/OgUA52l30/FFUGA/Oeu1EPVAOmScUd5N6KI8Utu7cpro+ee4Fta6tc6+7 HP5NO7qEIgsQEy0O5lyNAl7RXtoYZWsvdu9ZxXiKRt07JjSjVdbMAXB41gb2wl1cSSbMl3 ZIP6GGPVS+fQaq35VMlGIrHBCTC62LBfGlix7QQFLQA01Oe5rVzpXjrSXwqK/7otOXCEy0 cNuG5l7amOAPdxxAG7lJ+8aQzaIwb3OvOqfXqmH2rJBuz+QKVAF5kVqEU3fqnAd3F9FZ4M XUnYOfJzqhRuzDQfwr4foGHead5S1Yt+D4fxz3JXObHkVnnA1spbu/OIejwd/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765903175; 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=7Tq5dICF5sSR6iPnnBllWUcEt6FUmOFUNaoSIWiQgdM=; b=BUC0FpYwrlpBsDhR3FhrB888altUaRtpfXXAt6K1H4QOyqySwrOE7vviKXB2VBtDcvkUeO X5hqZujfJA6F3yfZs9aj1740lpQD+uK7+NEZvIL7+ts27QA5V+Lqp+hBg6TolflbxZhojO d3cVtfVV635AFTIyhiQxDEF/HFsh9WAa/fO2B20orvkg3r2UQVmbKiqztkSyWCdm3Luatl MuzADQDeQpiZvs/9roTgrA6BFnpfi1zABsPrAjBmAnSRBckyNZLWczuwNL7L54uik3RVG6 aVqikdP6/oSoFZJQOkFZk3P0mKErArWh0hhtvvDHQfB4ghiQ4LE1e+0BIpvbxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765903175; a=rsa-sha256; cv=none; b=pp/u8s73I6d757NM0OpX1jOwbl+gh7hUKm/t6jT17rfkVGmGeeuzvEKRWlfjS46lyTM0eM T8HpyR8wo1Ir2epJmbNn9S3sRguw6iVqygd68Rtp0iIP/0Zzehv401+Jjg56HKPdHuMvOX RSdr7cUygah1ZTIyBn9gf0S0Ihg2IYXj9gyZ3zDFS1eJZEqPMVnQXSkRAPhlrkaroVidaz w69Ib9R47eyjjW9bLfPlUd72OQqAJWeX498MF1SCQsS9ddouWDBZchTiOt7H+YnCjEu/CR v6niK6Q0W9xXrpydq7hX69PG0SUg4xmb2w1eKzwkYad9M1uuSHqrmFflGTdTUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW2hQ6DTwz6w for ; Tue, 16 Dec 2025 16:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 93f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 16:39:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 681e9d3e391f - main - Unskip test sys.netinet6.frag6.frag6_07.frag6_07 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 681e9d3e391f30a512c523514f69a63c9782a901 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 16:39:34 +0000 Message-Id: <69418b46.93f1.10a0703c@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=681e9d3e391f30a512c523514f69a63c9782a901 commit 681e9d3e391f30a512c523514f69a63c9782a901 Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-16 16:39:14 +0000 Unskip test sys.netinet6.frag6.frag6_07.frag6_07 This is now consistently passing with 100+ consecutive runs. Signed-off-by: Siva Mahadevan PR: 244170 MFC after: 3 days Sponsored by: The FreeBSD Foundation --- tests/sys/netinet6/frag6/frag6_07.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/sys/netinet6/frag6/frag6_07.sh b/tests/sys/netinet6/frag6/frag6_07.sh index 09c82102b9b0..6189314013fd 100755 --- a/tests/sys/netinet6/frag6/frag6_07.sh +++ b/tests/sys/netinet6/frag6/frag6_07.sh @@ -218,9 +218,6 @@ frag6_07_head() { } frag6_07_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/244170" - fi frag6_body 7 frag6_07_check_stats } From nobody Tue Dec 16 17:14:13 2025 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 4dW3SP3KxGz6KqJS for ; Tue, 16 Dec 2025 17:14: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW3SP17jdz3RLw for ; Tue, 16 Dec 2025 17:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765905253; 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=nknGSTTmc3W/rpAg5jVCGPTbqjPSxVWwf5/RPZQrHgM=; b=ppacnpTynWrpzTWZLV2XJYc7wvv2+YAPln0qoC5PHjuCS7fwiadaGWWPlWXKXLKh5TTlpZ juXydvTwdr+dngk1PoBfqR3VXMgVmoCfIStJ4azZIUWShIgokZwosQxJC8KSROa4BP+sj9 eS37WEZm9CWi2KpyfD8do7Iwx3KCwrY4Zpr2djsA77ZuMs6G4aPzUQWkJK3Y4AXzyuT6I+ HG6t2r3eqXO5oCbq+3Nv7vqc3KeZ1ytaWr9YoK9nHCnb1yLTmv2fa/vgJ54pM6TyjQKOy3 gaB58YPy4kAyXhLU6EpJvETx5E7e4FImJY/3xrb7oVAVIOWNTi+LChuJ3GlC9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765905253; 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=nknGSTTmc3W/rpAg5jVCGPTbqjPSxVWwf5/RPZQrHgM=; b=YS3gy8NL8lxavA9SBIfxPQ/aMWLVdOyNTUq+et46OnGPcEj65tzju4H+mOrh268mUlnZ6e zQIG0cPQEF9j5SWmhYMe9yJPrSmj5aT7GIxvi9WqhEb2mbF83sQpfH9Nsub9DIgDO1Qelw 1nHTGdfGbMS6ey8lVy/ImmreXFtYkY1e0mnBWo5PYHiZaS7Dgs5GDFOIvXqsAj6N88RBg7 AJvPtAe/1ky0H0SkmAPjRBQXBgLplw5vI8vDbHUqP/jGP3Qfs1B5R85Cc1XmLiw9sltkta HwbX4HPoqys2DNnvP8KwVzKiRkPDsAmVDJB6qadAGqnUVhRrq4Cilc0Wexe52g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765905253; a=rsa-sha256; cv=none; b=NRB29HHn/YDtqEuTcP0tcepL95VBqY5UIqEmYgQOZTaE916UwauJSt8S12FDZ6PmcmUIZY CWeD1RMOjQL5mlqIMxsp6kEKidCWG58Z3Kvq53ExmoGA5ZO4SZep+03DQ920FabyUXiSnP 47rkpSPRNsBNFZhmOUrLu7EhQeoJ0Wra9fj3rLCvBk0e1WOTmZQV7ABWgUrpYTx0TOZMEi O6TPuoMEVxJYWUqm0VzfxQSHACUTqirez5UHB9bliZDmog7qP1pLcunAQfmD/dzE3/uLkW 0P1cl8pig0I+m6UopkUUXOzmzz3ntXLJ2eHtgu7H8WZl3DQ9NrvnvpQeeKgvpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW3SP0QG2z1GS for ; Tue, 16 Dec 2025 17:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d435 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 17:14:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 2cd31bd8fa68 - main - makefs/tests: Use require.kmods property instead of ad-hoc checks 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cd31bd8fa687922d2a571ae53456ecd2e9ba095 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 17:14:13 +0000 Message-Id: <69419365.d435.765a7211@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=2cd31bd8fa687922d2a571ae53456ecd2e9ba095 commit 2cd31bd8fa687922d2a571ae53456ecd2e9ba095 Author: Siva Mahadevan AuthorDate: 2025-07-24 12:13:56 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-16 17:13:47 +0000 makefs/tests: Use require.kmods property instead of ad-hoc checks Signed-off-by: Siva Mahadevan MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1870 --- usr.sbin/makefs/tests/Makefile | 2 ++ usr.sbin/makefs/tests/makefs_cd9660_tests.sh | 19 ------------------- usr.sbin/makefs/tests/makefs_msdos_tests.sh | 8 -------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/usr.sbin/makefs/tests/Makefile b/usr.sbin/makefs/tests/Makefile index 748bafa06211..5c9ba983acdc 100644 --- a/usr.sbin/makefs/tests/Makefile +++ b/usr.sbin/makefs/tests/Makefile @@ -2,9 +2,11 @@ ATF_TESTS_SH+= makefs_cd9660_tests TEST_METADATA.makefs_cd9660_tests+= required_files="/sbin/mount_cd9660" +TEST_METADATA.makefs_cd9660_tests+= required_kmods="cd9660" ATF_TESTS_SH+= makefs_ffs_tests ATF_TESTS_SH+= makefs_msdos_tests TEST_METADATA.makefs_msdos_tests+= required_files="/sbin/mount_msdosfs" +TEST_METADATA.makefs_msdos_tests+= required_kmods="msdosfs" .if ${MK_ZFS} != "no" ATF_TESTS_SH+= makefs_zfs_tests .endif diff --git a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh index e058dfc57b7b..b36753de3393 100644 --- a/usr.sbin/makefs/tests/makefs_cd9660_tests.sh +++ b/usr.sbin/makefs/tests/makefs_cd9660_tests.sh @@ -58,11 +58,6 @@ check_base_iso9660_image_contents() atf_check -e empty -o empty -s exit:0 test -f $TEST_MOUNT_DIR/c } -check_cd9660_support() { - kldstat -m cd9660 || \ - atf_skip "Requires cd9660 filesystem support to be present in the kernel" -} - atf_test_case D_flag cleanup D_flag_body() { @@ -101,7 +96,6 @@ F_flag_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -122,7 +116,6 @@ from_mtree_spec_file_body() $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE cd - - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -145,7 +138,6 @@ from_multiple_dirs_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 - check_cd9660_support mount_image check_base_iso9660_image_contents -d $test_inputs_dir2 } @@ -162,7 +154,6 @@ from_single_dir_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -183,7 +174,6 @@ o_flag_allow_deep_trees_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o allow-deep-trees $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -207,7 +197,6 @@ o_flag_allow_max_name_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o allow-max-name $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -226,7 +215,6 @@ o_flag_isolevel_1_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o isolevel=1 $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -243,7 +231,6 @@ o_flag_isolevel_2_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o isolevel=2 $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents } @@ -265,7 +252,6 @@ o_flag_isolevel_3_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o isolevel=3 $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_base_iso9660_image_contents fi @@ -333,7 +319,6 @@ o_flag_rockridge_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_image_contents -X .rr_moved @@ -365,7 +350,6 @@ o_flag_rockridge_dev_nodes_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR - check_cd9660_support mount_image check_image_contents } @@ -378,7 +362,6 @@ atf_test_case T_flag_dir cleanup T_flag_dir_body() { timestamp=1742574909 - check_cd9660_support create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 @@ -436,7 +419,6 @@ T_flag_mtree_body() atf_check -e empty -o empty -s exit:0 \ $MAKEFS -T $timestamp -o rockridge $TEST_IMAGE $TEST_SPEC_FILE - check_cd9660_support mount_image eval $(stat -s $TEST_MOUNT_DIR/dir1) atf_check_equal $st_atime $timestamp @@ -456,7 +438,6 @@ duplicate_names_head() } duplicate_names_body() { - check_cd9660_support create_test_dirs # Create three directories which are identical in the first 31 characters. diff --git a/usr.sbin/makefs/tests/makefs_msdos_tests.sh b/usr.sbin/makefs/tests/makefs_msdos_tests.sh index fb94429b477b..ce246f3d268c 100644 --- a/usr.sbin/makefs/tests/makefs_msdos_tests.sh +++ b/usr.sbin/makefs/tests/makefs_msdos_tests.sh @@ -43,12 +43,6 @@ common_cleanup() mdconfig -d -u $test_md_device || : } -check_msdosfs_support() -{ - kldstat -m msdosfs || \ - atf_skip "Requires msdosfs filesystem support to be present in the kernel" -} - atf_test_case T_flag_dir cleanup T_flag_dir_body() { @@ -56,7 +50,6 @@ T_flag_dir_body() "The msdos backend saves the wrong timestamp value" \ "(possibly due to the 2s resolution for FAT timestamp)" timestamp=1742574909 - check_msdosfs_support create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 @@ -106,7 +99,6 @@ atf_test_case T_flag_mtree cleanup T_flag_mtree_body() { timestamp=1742574908 # Even value, timestamp precision is 2s. - check_msdosfs_support create_test_dirs mkdir -p $TEST_INPUTS_DIR/dir1 From nobody Tue Dec 16 17:45:38 2025 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 4dW48f6HRKz6KtD1 for ; Tue, 16 Dec 2025 17:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW48f4DCfz3TqS for ; Tue, 16 Dec 2025 17:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765907138; 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=DA7/wUMCsb15EROG2W27GDj08g6fm6QkkvsZubInDcA=; b=pENektY1fHIO6jAOMOD3kiIbnbC6u1lAuRFxty9YAzZm65M1MgDvs2oiJ2TKnMSL8efTCN 3jjEnTG8nn63fqN7oVb2jucFtYL5KfDDRD1Q6FhzOuSYDGp+FOu3szEeQOazLegTO1Yebz 1cnIQ1KgbX1/haT7bPVxfck7H1rccAXwP2OI3A+xJKVsF3MZnzBTrb1SF9vcRjoIWWfYgN 0D3fH2VVzKkR2YGhVpSqFpMWIOM2ca1EZwzphzB7edfc1kf2CyLRmw6NL6PfoDHTyrhnJK RJJQxZ4yjNsFPy2VbXdeNKE/VaRwYoeoWBv6V2VhX89dd7kMKd/duEj2U/LDyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765907138; 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=DA7/wUMCsb15EROG2W27GDj08g6fm6QkkvsZubInDcA=; b=VA/NL485/VyN4mxIgQ8b/YVco1P8kYXjX3jHmbJUwvCWCgkCY4aoj3f+/yMgkFcVpNjZCg KvrH1aNgcZsVJaRNgzF8O/rXeZRLp8HGrM1DNJDC9m9T+YPcWEm+tHqUTpm2GDSS3TMHFJ G2O0AuoR/QzXv0kbnDWVb7sJfgKPXi0p/wrllz7PDXcEKbU6LBwsTFLS1HeMJxWd7Nwt1D kreYTJGTJcizNcIyF55jjgs7xch8zMa4GXDcNx2pqeMq9OSHHVchNWgNu3n4I2MwwecGz0 lWYAwQpEWjsc0tcEutdYMAykBi8cCpPnt4TlbRqsVA0ydJ5mJSljOYn7vJZ9Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765907138; a=rsa-sha256; cv=none; b=pdaRLvlYjzjuwJuZPGQu8hkjJDKIv6YUonR+YGNn+Sslg0IFqU+pSqsugj0lEexveTnaM+ Nd9oKcoN+/CC4hFY7FSEhy2TNZRZInOypVxb/C7TKZc52G73yqzJxU2/I/jz0YzNrN69wg idOhpE/wwnDGUEXu6lppTVsauWVnmDQ4QnuIFy9uiqf5w+YWknPlVacmh4opYPwLFU9wbt SbqbBEj5n5xPtQC9haYwDk0S2PPgFJ2yqaUQ5rCgOfeuPR+q52Nf/YmnQDMWsemKAzWpLW Xy/zt4aWD0v/JFQHlT+g8MqNTWccYih7L5mALFdcT3iTolnLGQcfNqOjesxwPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW48f3JpVz1qs for ; Tue, 16 Dec 2025 17:45:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f143 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 17:45:38 +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: 2c75ac14d7e9 - main - libpathconv: Document library in the man pages 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: 2c75ac14d7e9d1d57d70bbf26716868607f0d1fe Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 17:45:38 +0000 Message-Id: <69419ac2.f143.3fe8df29@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=2c75ac14d7e9d1d57d70bbf26716868607f0d1fe commit 2c75ac14d7e9d1d57d70bbf26716868607f0d1fe Author: Artem Bunichev AuthorDate: 2025-12-16 17:42:46 +0000 Commit: Alexander Ziaee CommitDate: 2025-12-16 17:43:17 +0000 libpathconv: Document library in the man pages Reviewed by: ziaee, imp Differential Revision: https://reviews.freebsd.org/D54213 --- lib/libpathconv/abs2rel.3 | 3 ++- lib/libpathconv/rel2abs.3 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libpathconv/abs2rel.3 b/lib/libpathconv/abs2rel.3 index 9240ef1662e2..d8e39ef3b8b9 100644 --- a/lib/libpathconv/abs2rel.3 +++ b/lib/libpathconv/abs2rel.3 @@ -23,13 +23,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 7, 2022 +.Dd December 13, 2025 .Dt ABS2REL 3 .Os .Sh NAME .Nm abs2rel .Nd make a relative path name from an absolute path name .Sh SYNOPSIS +.Lb libpathconv .Ft "char *" .Fn abs2rel "const char *path" "const char *base" "char *result" "size_t size" .Sh DESCRIPTION diff --git a/lib/libpathconv/rel2abs.3 b/lib/libpathconv/rel2abs.3 index 1f607fd739e1..3d8f544fc3b3 100644 --- a/lib/libpathconv/rel2abs.3 +++ b/lib/libpathconv/rel2abs.3 @@ -23,13 +23,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 7, 2022 +.Dd December 13, 2025 .Dt REL2ABS 3 .Os .Sh NAME .Nm rel2abs .Nd make an absolute path name from a relative path name .Sh SYNOPSIS +.Lb libpathconv .Ft "char *" .Fn rel2abs "const char *path" "const char *base" "char *result" "size_t size" .Sh DESCRIPTION From nobody Tue Dec 16 18:16:50 2025 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 4dW4rf4SWDz6Kw1w for ; Tue, 16 Dec 2025 18:16: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW4rf3cjjz3XYt for ; Tue, 16 Dec 2025 18:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765909010; 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=CRhU/vruI11AASrWzx0hWVfKdJJnrZzd1vNT/fqWbHg=; b=veNw7/B9xFJ1YNlzKFXSrs1bfVmjP8d6/9uYWGMc/GCqSF8476t8hUfXQZRJNX0oWauURn AfW18ojBVHR6fImfmnPg5Qu6jeDzdhUy/48Izz++bH8xYMWL2OqKldQ7XEjvBYq3WLS/ZW 5FW1XIW/ZFQtTMvMdAVvqSqCFqhb/AwDEoBifIk1sG48JYSG6mP4yMyqdngV4QaUG7OIe6 jEYiNX+aS2jp7at50vZSwXI3asTqq6ToiS299RKnp4lfD2ER+bAZ/1UMAcrzIbSZWTtY8l uBvdONtohWk8gpqUgODW/fcnH+ei8tlihl2A3mmNoao/xsJXET12OJGUFmXZDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765909010; 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=CRhU/vruI11AASrWzx0hWVfKdJJnrZzd1vNT/fqWbHg=; b=F4kghJq8fslJcMG94IJdVze47iolI08ZMchlTm54BASkbvMWJ8tzhmIX2QfqMeurIQRz6r egj341ctuCy8eBFmIVg4BeBvGSWAy9ejnZW9IRDWfjcRq6EZySouw4mMjIhPltj8oK/ewQ dbxN+rwPQPRSwPzjb8KdSVkFxl9oJ2+HHPgFpqdkg4F7vr5nUAfTrPD9SG9r5XfgN29tcM aq6QevA8ni/D7+U/JArjAnBKwwQ059xzU3x6C9BSC0fkesBEJD7WqXSlMJJJrbdXCHvv1I 1Fk1EpXawSjh9r1Q5NDY/kM+y6wI3J0xrTocnYDR2GrMzRuVia4PQg7kJfxGIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765909010; a=rsa-sha256; cv=none; b=Bk5dnO/6bUbB780OZYgBTBs5zXdohmbHbHm9/QDBpUSpqs1tynShebc6LBQ2m+pP/ZmMj3 VTqXMc05HcJ8RzSkAsLy06CVYFVFuYB+5w0WUuL8DZfrepm5yXR9nqtOsY/u/c83+LmNNh viovtufo3jhDVE6WXuaG7NssAg8ToDm753XeoRg1H6Km7b/Lzqsv8RZPlFN3DMVVK6tGi6 AWTRpZbqbTMmGXXdCYICs0FGUAa3WO1lLgUg6wbTuKs13/OtuCs54dpIC1snrSxgCk/Eji uvKabCBPqQvmL97stGpoJW2BOqDQHRs5pmpSfxIsg2T/2NAE4StgFg47UOafAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW4rf34jtz2Kl for ; Tue, 16 Dec 2025 18:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22c2a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 18:16:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 6e297e1cdff3 - main - libpcap: don't try to create usbusX interfaces 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: 6e297e1cdff3568da19760e7e7c615ee4e8383ef Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 18:16:50 +0000 Message-Id: <6941a212.22c2a.71ed29ec@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6e297e1cdff3568da19760e7e7c615ee4e8383ef commit 6e297e1cdff3568da19760e7e7c615ee4e8383ef Author: Gleb Smirnoff AuthorDate: 2025-12-16 18:15:24 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-16 18:15:24 +0000 libpcap: don't try to create usbusX interfaces --- contrib/libpcap/pcap-bpf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/libpcap/pcap-bpf.c b/contrib/libpcap/pcap-bpf.c index 3767dd099d2c..aff33c218c0d 100644 --- a/contrib/libpcap/pcap-bpf.c +++ b/contrib/libpcap/pcap-bpf.c @@ -2037,11 +2037,11 @@ pcap_activate_bpf(pcap_t *p) } #endif /* __APPLE__ */ +#if defined(__FreeBSD__) && __FreeBSD_version < 1600006 /* - * If this is FreeBSD, and the device name begins with "usbus", + * If this is legacy FreeBSD, and the device name begins with "usbus", * try to create the interface if it's not available. */ -#if defined(__FreeBSD__) && defined(SIOCIFCREATE2) if (strncmp(p->opt.device, usbus_prefix, USBUS_PREFIX_LEN) == 0) { /* * Do we already have an interface with that name? @@ -2115,7 +2115,7 @@ pcap_activate_bpf(pcap_t *p) pcapint_add_to_pcaps_to_close(p); } } -#endif /* defined(__FreeBSD__) && defined(SIOCIFCREATE2) */ +#endif /* defined(__FreeBSD__) && __FreeBSD_version < 1600006 */ #ifdef HAVE_ZEROCOPY_BPF /* From nobody Tue Dec 16 18:25:47 2025 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 4dW52z225bz6Kx29 for ; Tue, 16 Dec 2025 18:25: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW52z1QYwz3Z1N for ; Tue, 16 Dec 2025 18:25:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765909547; 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=wu440wBqUQIT9yLxvQT/VJp57JG3/sNs+LM1MZjBgxU=; b=H33YHoDBt7YPgsg7vUf9YJF6gur1jWmXVujHoEPQ/QwisJlxKjmhDdArHWxyi7w+3c++r1 JFUERkhxaYzWSuFBjgPEDfUooDJkA3sY57JrEgrKppsYpjdKLOH7A2Rm/BEWfRgFBqwq98 8HsSrO3VTUd38W26coJ6wBt3Q9gftJVWtDUCJROSfo2+/ndLjZhyybLufgDT1KAicraKPS 1G1Ki2bTZgaYO6BIJofCo0+fqNU/COKKFaWwuznjhIjEZo1BereTPVc5aYq0aD+/wP7Nf6 dO+9cL4LWUURAMebfla2GNN7oD/Lta0vrYZqcLIVznGozCc3ZN4TFADtpPP7mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765909547; 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=wu440wBqUQIT9yLxvQT/VJp57JG3/sNs+LM1MZjBgxU=; b=t1l864HlLkGogc/3XsKED8a0pUFZ9GUIAtiJqsgqaoXlbBx2oVW4pBPoYCAGgb87JIYc+k Xlazd1EesjNu+HJWBxWddE/iogjUDWv4I072YNrYpwsXsgFKXLkhzA7MTgTxfQPa2BIy3z /4w8owbjJjgq37T/Ue8SJNbvXK8IY4iH0B4922u7dqwF7tveA2fb2PQDaR/SMm61BCn8PS eSIfVQ0yoYaldSkGpWEVz9PlH0IcNp4a0ConAzq618cjmje+lEVtbzy0Y898sRTZmfWMfk Kw5DEenAFMLmtO7RO06ptkpm0/EQBihCM4+JdDJKoET9/p60oWow+PquIU3PpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765909547; a=rsa-sha256; cv=none; b=xefjZUmob9vjky/mJVMg1k+s7fqn70kJKaZtE4OcWm4XeZZk3RZI8D8hvP6d/7I5M4v2Jb ac7bvHFyPh5eNGYJnKTKDzvjwjD23/QTGiV7NfVGxbMlelsGo2/3AQalH9oi16uMTQFazh dsFEy8GtL1N3m8c2N6FfswCNdRbhWKqxyQkjo6ItUqZpYD5Vmfl73j3/X4R5KcSN2OYsPI nWn9+yIfLHY3BwkETB0SgbxX6pybCnj7P3DtL4VCC+qY9yu686otJkLCRBGkYC7kFbbW42 jav2CH++mJDgNNj9EUudoNnpGh5galeZ3J5CATv7ay2H7A72h1zYeod4HVO8sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW52z11j3z2xM for ; Tue, 16 Dec 2025 18:25:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23f0f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 18:25:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8b780f75f7ef - main - libpcap: disable more code related to USB pseudo-interfaces 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: 8b780f75f7ef9ef56935800220e65c47171b74c4 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 18:25:47 +0000 Message-Id: <6941a42b.23f0f.21510f8f@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8b780f75f7ef9ef56935800220e65c47171b74c4 commit 8b780f75f7ef9ef56935800220e65c47171b74c4 Author: Gleb Smirnoff AuthorDate: 2025-12-16 18:25:12 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-16 18:25:12 +0000 libpcap: disable more code related to USB pseudo-interfaces Fixes: 6e297e1cdff3568da19760e7e7c615ee4e8383ef --- contrib/libpcap/pcap-bpf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/libpcap/pcap-bpf.c b/contrib/libpcap/pcap-bpf.c index aff33c218c0d..83a363eee0bd 100644 --- a/contrib/libpcap/pcap-bpf.c +++ b/contrib/libpcap/pcap-bpf.c @@ -43,7 +43,7 @@ #endif #include -#if defined(__FreeBSD__) && defined(SIOCIFCREATE2) +#if defined(__FreeBSD__) && __FreeBSD_version < 1600006 /* * Add support for capturing on FreeBSD usbusN interfaces. */ @@ -1721,7 +1721,7 @@ pcap_cleanup_bpf(pcap_t *p) } #endif /* HAVE_BSD_IEEE80211 */ -#if defined(__FreeBSD__) && defined(SIOCIFCREATE2) +#if defined(__FreeBSD__) && __FreeBSD_version < 1600006 /* * Attempt to destroy the usbusN interface that we created. */ @@ -1738,7 +1738,7 @@ pcap_cleanup_bpf(pcap_t *p) } } } -#endif /* defined(__FreeBSD__) && defined(SIOCIFCREATE2) */ +#endif /* defined(__FreeBSD__) && __FreeBSD_version < 1600006 */ /* * Take this pcap out of the list of pcaps for which we * have to take the interface out of some mode. From nobody Tue Dec 16 19:16:07 2025 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 4dW6942JjNz6L1C6 for ; Tue, 16 Dec 2025 19:16:08 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW6931g5Jz3fct for ; Tue, 16 Dec 2025 19:16:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765912568; 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=xrDb+TcyVL5FWteKRLwkfr3b6cs353pPVUrab6iTUt0=; b=u7mFJ9faAmlypDVqluTOx7g8vIiR43tmgw//ZD5NrVqWYxOf0AWa9F0zuGx1WVrw60ZP++ ykv5lmmPTOQDYQtg1beDr0ZKHRTArppu/thOYBy/EkHhRqBTQJuAKHCm33jrO8gYkp/eil w+S48zukrYBnDr5A7/zTQAeDWOgdD+fY65zGR1ATz7oOFGLE9i9cjTz8VTM7cSj6z9OYqO ViBL/7gFsqhVZqSfwTFff6bMxj4dt2cku9G3fNZ0evTp9Afjd0gmK/5McISwfdYFtFxpWC gOL00HWQc9cFMScDzN0oMEkfchr+ZvZ1IZ+qz0eW4OKTUlNJH/3QwBQz7BPdUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765912567; 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=xrDb+TcyVL5FWteKRLwkfr3b6cs353pPVUrab6iTUt0=; b=F6K7TDu8LRihpvyN0cURZ+eOngM6v005ro3EVS6evPZp4gUdH41hw6+puGjaWCCvoM44ub lsdO3WTh1y4nU9aPQs53z35tRd4I/T6weHalk5drZRYom+lcIfmqEDy6EnXchv5xxv8VEV ppWF86pMdikyW1jygTzdx/yShXpSw2BEB6tb966EMZoRqDn/VrMDH30qcyfhsw8tzalA5Z L8XT30pJSxxncR1qaJA8lIevg2giuUr6F7Xy75OyBkFqpQorHS3ZXL2ZVI5ldNqG+ZBBGs ATxdyoOqXkNVWxG4kvBChcn3cwDW5BqjG6guraRw3nJG53vnxGDx0N1aDITNqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765912567; a=rsa-sha256; cv=none; b=OQu1k1/P1h4ln9nUFGA4H1BTKOKlBzdp8mIc9Y6wLvDURRXHgLSoaoALY8LsG2SeBL3/Sj RKvU6fpqdPv0OMZMKxU7JC4uaTz7cuCqBDzvUzyaIIsEzsxVCqOyCBUV7mxYTTu0C3og/n FV0/PHUwQPy1eEGJlsAxi1xd+RmDimiucq6Aij3jGAWQvKxlivyjdXq411a5YEG6OnuJtX IaMqXnK0iLaWUddQIwc++YetlWwRE4sa94/5UpBwgzRN/+mqfnMBfJKvepuu5bVig14jRg 1Qr7wkFoBUICEIMlZvTnw/lkAR7kHg9DPb2gYQnDKVwlKWMzCFhnqfrz3s/C0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW6930wrgz44v for ; Tue, 16 Dec 2025 19:16:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26359 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 19:16:07 +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: ce9557d4ee17 - main - libc/amd64: Disable baseline version of stpncpy() 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: ce9557d4ee174267504a63b2c8f6009be27368c9 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 19:16:07 +0000 Message-Id: <6941aff7.26359.29dd85c8@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ce9557d4ee174267504a63b2c8f6009be27368c9 commit ce9557d4ee174267504a63b2c8f6009be27368c9 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-16 19:04:51 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-16 19:14:44 +0000 libc/amd64: Disable baseline version of stpncpy() This implementation appears to be broken on some CPUs. Disable it until the issue can be investigated and fixed. PR: 291720 Fixes: 66eb78377bf1 ("libc/amd64: fix overread conditions in stpncpy()") Fixes: 90253d49db09 ("lib/libc/amd64/string: add stpncpy scalar, baseline implementation") --- lib/libc/amd64/string/stpncpy.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/amd64/string/stpncpy.S b/lib/libc/amd64/string/stpncpy.S index df22bb9f0c53..764ee1d4008c 100644 --- a/lib/libc/amd64/string/stpncpy.S +++ b/lib/libc/amd64/string/stpncpy.S @@ -36,7 +36,9 @@ .set stpncpy, __stpncpy ARCHFUNCS(__stpncpy) ARCHFUNC(__stpncpy, scalar) +#if 0 /* temporarily disabled cf. PR 291720 */ ARCHFUNC(__stpncpy, baseline) +#endif ENDARCHFUNCS(__stpncpy) ARCHENTRY(__stpncpy, scalar) From nobody Tue Dec 16 19:33:32 2025 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 4dW6YD5wXsz6L2gS; Tue, 16 Dec 2025 19:33:36 +0000 (UTC) (envelope-from rpokala@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW6YD5PP1z3glT; Tue, 16 Dec 2025 19:33:36 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765913616; 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=rzLViezmAx0B5FHtRcjMnoh6af6GcEiRaAYs1/zrB6M=; b=VIoYo0VBMxJSacap2qq2U6HMvg0y6+ho9gqU/5RQeEtc2a6r4CIrj0Xx30NZPUbrgmEN1r w96Clyp15Di8B6d7AivD5hMl/QXAzyx+GtoSS0s2Ld5F3mrvtvmtdCCcNrKiQcps14c7WA E8DiXDKX6LFNrnT68ujVj1CJHmihYRDT0tce5Fso2gzjLhcO+BzI5a5D1cD5ofLwb7rsE+ 4TEAcFKXkgEwLNfz+OlVLJ3fmByYwuqtXyil2noKj8HzKnq5ACrbmdiD0F0R4XayhmjurR 8vdaM604lMo/y4KfN/OQWZGmyL/ThCqmNkMZRIRLqG6HzJZO5diUbNV0blSrvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765913616; 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=rzLViezmAx0B5FHtRcjMnoh6af6GcEiRaAYs1/zrB6M=; b=goN1Npq7AQMegDuMJ6afTleHBMvWREotMLKzcJuUKWQ1avo5rEo/ermS2otABngjbOJ0zp T24ZHdPBJRLQQUXJ4znuLdT3XjMra5cmYWdJepbdvrEeLufmLoYTVcxllUVjDEpspeJBS0 OKq6xL1wHQecALCqGhKm2KhcYP0R74zPW2LkPIOlHV5/T+EfIsc3CMCLU72VyMRyJwqMeq WEH6RBm7TgmWJfcelKcAz0HP2CQwBmesHuE/rMTj+mruWKCN0LSaANazZGtrsckz6YiMK4 sVqY6z8B7rmD8o7qEAebvrWyWO48SiZ/xnzrGmFACTDxtnz66uSICP5c6lDa8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765913616; a=rsa-sha256; cv=none; b=J0V3EE+FMl/fZnSG6opabIxFjAfg39QlywEqHoLIcYmHdjS2rgoKurxWuRwfvgMQoP77IO 8f88Q+g+32Rgwn1FEMLSWsPdGlD8H/SH7sajjE4cHeSRWnnQEdvpp68mWiBEE5PXjkULmo 3ETDhyJmaPntL2KjOn77oVNGXOi+qM2DgTcMPs0SgVLUR+a29FFqLjqh4jS+ELn3cUK13y sj8NmDi+Pf5+PB/vliytnTVzwSpMUixb/ziNCgu/pI9w7OGC+tu2s8Oev9v1PWuMvnRN4t z4D6Z8CpiAj1xlWVVnqfmuK6zjQXsqWTHQLgeAVVeZ4QiQN7Kdugs2ltrcYd9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [172.17.5.105] (dip-pa.panasas.com [65.205.22.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dW6YD0tH6z1bN; Tue, 16 Dec 2025 19:33:36 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.103.25120717 Date: Tue, 16 Dec 2025 14:33:32 -0500 Subject: Re: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() From: Ravi Pokala To: Cy Schubert CC: Robert Clausecker , , , Message-ID: Thread-Topic: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() References: <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org> <20251216135709.46D25203@slippy.cwsent.com> <20251216160002.A65D63D6@slippy.cwsent.com> In-Reply-To: <20251216160002.A65D63D6@slippy.cwsent.com> 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 I know ~nothing of assembly, but one thing that seems odd to me is that the= 'bts' line originally used '%r8d', but the new version uses '%r8'. And yet,= the new 'test' line uses '%r8d'. Again, knowing nothing about this, it seem= s to me that the 'bts' and 'test' should probably be talking about the same = thing...? -Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: > on behalf of Cy Schubert > Reply-To: Cy Schubert > Date: Tuesday, December 16, 2025 at 11:00 To: Cy Schubert > Cc: Robert Clausecker >, >, >, > Subject: Re: git: 66eb78377bf1 - main - libc/amd64: fix overread conditions= in stpncpy() In message <20251216135709.46D25203@slippy.cwsent.com >, Cy Schubert writes: > In message <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org >, Robert Clausecker=20 > wri > tes: > > The branch main has been updated by fuz: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D66eb78377bf109af1d9e25626b= f254 > b4 > > 369436ec > > > > commit 66eb78377bf109af1d9e25626bf254b4369436ec > > Author: Robert Clausecker > > > AuthorDate: 2025-12-10 20:45:18 +0000 > > Commit: Robert Clausecker > > > CommitDate: 2025-12-14 16:06:05 +0000 > > > > libc/amd64: fix overread conditions in stpncpy() > >=20 > > Due to incorrect unit test design, two overread conditions went > > undetected in the amd64 baseline stpncpy() implementation. > > For buffers of 1--16 and 32 bytes that do not contain nul bytes > > and end exactly at a page boundary, the code would incorrectly > > read 16 bytes from the next page, possibly crossing into an > > unmapped page and crashing the program. If the next page was > > mapped, the code would then proceed with the expected behaviour > > of the stpncpy() function. > >=20 > > Three changes were made to fix the bug: > >=20 > > - an off-by-one error is fixed in the code deciding whether to > > enter the runt case or not, entering it for 0 > instead of 0 > - in the runt case, the logic to skip reading a second 16-byte > > chunk if the buffer ends in the first chunk was fixed to > > account for buffers that end at a 16-byte boundary but do not > > hold a nul byte. > > - in the runt case, the logic to transform the location of the > > end of the input buffer into a bit mask was fixed to allow > > the case of n=3D=3D32, which was previously impossible due to the > > incorrect logic for entering said case. > >=20 > > The performance impact should be minimal. > >=20 > > PR: 291359 > > See also: D54169 > > Reported by: Collin Funk > > > Reviewed by: getz > > Approved by: markj (mentor) > > MFC after: 1 week > > Fixes: 90253d49db09a9b1490c448d05314f3e4bbfa468 (D42519) > > Differential Revision: https://reviews.freebsd.org/D54170 > > --- > > lib/libc/amd64/string/stpncpy.S | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/lib/libc/amd64/string/stpncpy.S b/lib/libc/amd64/string/st= pncp > y. > > S > > index 5ce0dd093a9e..df22bb9f0c53 100644 > > --- a/lib/libc/amd64/string/stpncpy.S > > +++ b/lib/libc/amd64/string/stpncpy.S > > @@ -100,7 +100,7 @@ ARCHENTRY(__stpncpy, baseline) > > movdqa (%rsi), %xmm0 # load head > > and $0xf, %ecx # offset from alignment > > mov $-1, %r9d > > - lea -32(%rcx), %rax # set up overflow-proof compari > > son rdx+rcx<=3D32 > > + lea -33(%rcx), %rax # set up overflow-proof compari > > son rdx+rcx<=3D32 > > shl %cl, %r9d # mask of bytes belonging to th > > e string > > sub %rcx, %rdi # adjust RDI to correspond to R > > SI > > pxor %xmm1, %xmm1 > > @@ -223,8 +223,9 @@ ARCHENTRY(__stpncpy, baseline) > >=20 > > /* 1--32 bytes to copy, bounce through the stack */ > > .Lrunt: movdqa %xmm1, bounce+16(%rsp) # clear out rest of on- > > stack copy > > - bts %r10d, %r8d # treat end of buffer as end of > > string > > - and %r9w, %r8w # end of string within first bu > > ffer? > > + bts %r10, %r8 # treat end of buffer as end of > > string > > + and %r9d, %r8d # mask out head before string > > + test $0x1ffff, %r8d # end of string within first ch > > unk or right after? > > jnz 0f # if yes, do not inspect second > > buffer > >=20 > > movdqa 16(%rsi), %xmm0 # load second chunk of input > > > > I've opened PR/291720 regarding a significant regression caused by this=20 > commit. It affects my older machines, resulting in enviornment (getenv)=20 > corruption. It does not affect my newer (and with more RAM) machines. BTW, this brought my postfix server effectively offline. I have not been=20 able to send or receive email until this commit was reverted locally. --=20 Cheers, Cy Schubert > FreeBSD UNIX: > Web: https://FreeBSD= .org NTP: > Web: https://nwtime.org e**(i*pi)+1=3D0 From nobody Tue Dec 16 20:22:41 2025 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 4dW7ds2gN3z6L6FG for ; Tue, 16 Dec 2025 20:22: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW7ds0myrz3nMt for ; Tue, 16 Dec 2025 20:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916561; 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=0uCznLpRQkfDRez4iEPik/AWxQofVXmzjbKrFC05hVw=; b=cT0xkE+3DE3Ks3H7Ap3bFJyUXuOzIMuy8YDxZOS3UDrGZKhrBHEGoYK8OGaRPGQzWuDYfC xDKhY/vZ8Z5QnKQwdLKF++L36BP44Mwf+454B4jN/J1Ybm8jZmCwJdKEwf7F1IognwDSN+ GqNT2LgpFzvskpLSAxIMEXRoJaN10FgyLdfCssmkjKdtd4VkPIFNuw8/tnLsULF7uUgND8 5s0PRhP/gUKFS+VR08rpFm3OJVF2BaWstrKo/YCzDOtAgbaFIxDcPeGHXp7roNDsMr8vpG 85GFmKJP9wZsh5crz8LJa4d/VGR525TbR8MKo2pHRALS8qPeJVHQHEOjh7nCVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916561; 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=0uCznLpRQkfDRez4iEPik/AWxQofVXmzjbKrFC05hVw=; b=UDX05U5K4z6br9g96icF1H2/fi4brsQlwuHwimZZ7icSBWRl1WbOqhshhYNZAYzDX5WgMO bWaBMZjfQ/z/c1JxxptTPxVhJVNMvBkkR4maQo7Uly/rkNUsN6xlEzZlTazRtKA+cePWlH BWuGr5gR3mCyXO3B3EupbV26/FfRa6LpxcvMurY1tcLcthi6BYwGP1E70pnU8PDtWSm3Bq FVTjSVJQ22xBV35MvJi4dq9zyzEWCvA+JLSHWxChlY0D2NfVAwTId8hn6LyL2P+aTVrHda qT9NCjeY4Svi/WhiN46DzMTpymCovHJD/NoFf8Mbv0SrC6LA3zkI+T3kNNkTcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765916561; a=rsa-sha256; cv=none; b=OrrQrkcpoW69aocaGpMhLqLEkqqdGXbMIAJgvB6mU2h7yyluZFJTLkCqTCe9xQ+aBGZVSF kN22emR7TRx1fxkisI7xgRKgRKzqEhXAa5PTM6fFy1ukCge9DLB33OJB+zx20UOCk/Gu2Z Ovpx/BYuahHe55CwX5N6mkwJZO5ysCmiRRVSE4Z7Bf2w2399LUA6kvyy6LqRElw40T9smt I2ZXGvIFU0zGA4P9ovaOr2t9BolSAy1gAmLYLkXIDXMEzWjQQ+wYNEaZrPjT1+KtiZbAq0 5yhYJivhaGMhb712grEq2ya4/liyA5Vo36qPrlDcWEDTf3QRj5/yM7RjRrFfQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW7ds0KmGz65b for ; Tue, 16 Dec 2025 20:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36d57 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 20:22:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 802c6d5d61d1 - main - cdefs.h: Introduce __nonstring attribute 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: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 802c6d5d61d15494a54a386dc2ffbcfefc68c8ab Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 20:22:41 +0000 Message-Id: <6941bf91.36d57.28d9764b@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=802c6d5d61d15494a54a386dc2ffbcfefc68c8ab commit 802c6d5d61d15494a54a386dc2ffbcfefc68c8ab Author: Alex Richardson AuthorDate: 2025-12-16 18:03:44 +0000 Commit: Alex Richardson CommitDate: 2025-12-16 20:21:45 +0000 cdefs.h: Introduce __nonstring attribute This attribute can be used to annotate char arrays that are not supposed to be terminated with a NUL char and is needed to silence clang's new -Wunterminated-string-initialization warning. The name matches linuxkpi. Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52565 --- sys/sys/cdefs.h | 7 +++++++ tools/build/cross-build/include/common/sys/cdefs.h | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 3bc4389346d2..ea6a92ad0056 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -394,6 +394,13 @@ #define __printf0like(fmtarg, firstvararg) #endif +/* To silence warnings about null terminator not fitting into an array. */ +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif + #define __strong_reference(sym,aliassym) \ extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) #ifdef __STDC__ diff --git a/tools/build/cross-build/include/common/sys/cdefs.h b/tools/build/cross-build/include/common/sys/cdefs.h index faad5eccb3af..c7e453394478 100644 --- a/tools/build/cross-build/include/common/sys/cdefs.h +++ b/tools/build/cross-build/include/common/sys/cdefs.h @@ -100,6 +100,14 @@ __attribute__((__format__(__printf0__, fmtarg, firstvararg))) #endif +#ifndef __nonstring +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif +#endif + #ifndef __predict_true #define __predict_true(exp) __builtin_expect((exp), 1) #endif From nobody Tue Dec 16 20:22:42 2025 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 4dW7dt3zdfz6L5yf for ; Tue, 16 Dec 2025 20:22: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW7dt1m5wz3nQX for ; Tue, 16 Dec 2025 20:22:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916562; 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=FD6+XpLTw2exft+i98uKNxYq2N1+jt0kGNl7c9sDOeM=; b=ZRl3WXVgKDoIUDobsNOqcYM9fMH1KTEndNq7c1ci6Bc7vEMSsUD2czJyKgjs6+Bx0NkWZh zc+HXjYohZddm4qTIdQXXDM1HIy8fFgtjVxihyInqDG4iRUIGVvu5+97RwshYcTEdJp4qQ 0rVJ6geOGoDLi8+R2VUCwRTUHKK5rrxX2CjDTW9Su6yMoJFFTQoQ75Qe5r5GODI/kN8vaV Rei4joAeKEB2FxlgfvTNxXWbmDhv23SA8LvWcFmum5edxqa0+e7aM2B1P3FUrND6ugqrUb MmWz8vsRic6aGzBrWhrcQBTj/bpafBwheBvK2zxL7y8YmB6iUt6V6xK0orOnUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916562; 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=FD6+XpLTw2exft+i98uKNxYq2N1+jt0kGNl7c9sDOeM=; b=rpmyRVXfC6I/e7Qf7QQKA1Jn93mE5xRH6gTo2ExDe6citRO6WKRt18MonRvVWUK4FMLIRq 4ztGe00xsYABTqJizBb0CBB/DOSvFO/cCMAUMR/8ykjYBWmurpm7t4ro4MiaBxX3mf+0bO 5ZQePJDiCP1zGd1AoXWxxHA5wgR2KwuzAYnOHfFcBqptHGI3vwZYvf/HHBbfcrqpx/RyPY tF5QKcnhiE7Ap9Be3N4NAwuPeHxzpp77cRpfxpIwuqPX39Oky4UlSxkvk07HOshi5UAJfw R4D7p3R/FZt8748pqTRJcpd73FiGy69yVLCbeXfqB0Ivsvx4M+2suIf+YxXTfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765916562; a=rsa-sha256; cv=none; b=BT+HsN9GSxM4rqiqvtL8cWn2aJVqmG/MjilEPz1m5zCkaBFmjektYP0tEAWP30y4m3Cs+F Wf4k+8gZS5k60QJSbCTVagTaWbmNMsTnZgfhEQiKhdBgkd9az+In7NQvaZ40pvl81RTPwx EYsTRWXR0H4l/JB7iAk8eYD5jYuJayOHjz0x0wkwgzghKyw/z0mqlNeLDulYyk3rpmwUiD SCRmeF/TJVdJ7sj4BJ8H9UnBeFavnUJ6W33OnPPsIjDMinbhVFZAqXI1jIyhDGfauITJ+a eO0LTZ1h2hO3pz5neO+sc/IXjqmiUj0j4nOWxdcmUrHi0uAasUHYrYI8to63KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW7dt17Ngz61R for ; Tue, 16 Dec 2025 20:22:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38884 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 20:22:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 4cfc7de13f11 - main - libthr: fix -Wunterminated-string-initialization 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: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cfc7de13f110563463c15be99690c6fe7b8676a Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 20:22:42 +0000 Message-Id: <6941bf92.38884.7e85027@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=4cfc7de13f110563463c15be99690c6fe7b8676a commit 4cfc7de13f110563463c15be99690c6fe7b8676a Author: Alex Richardson AuthorDate: 2025-12-16 18:04:18 +0000 Commit: Alex Richardson CommitDate: 2025-12-16 20:21:45 +0000 libthr: fix -Wunterminated-string-initialization Reviewed by: jhb, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52528 --- lib/libthr/thread/thr_printf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libthr/thread/thr_printf.c b/lib/libthr/thread/thr_printf.c index e1edffe5acb2..b7cb6ce81bda 100644 --- a/lib/libthr/thread/thr_printf.c +++ b/lib/libthr/thread/thr_printf.c @@ -61,7 +61,7 @@ _thread_printf(int fd, const char *fmt, ...) void _thread_vprintf(int fd, const char *fmt, va_list ap) { - static const char digits[16] = "0123456789abcdef"; + static const char digits[16] __nonstring = "0123456789abcdef"; char buf[20]; char *s; unsigned long r, u; @@ -147,4 +147,3 @@ pstr(int fd, const char *s) __sys_write(fd, s, strlen(s)); } - From nobody Tue Dec 16 20:22:43 2025 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 4dW7dv4fc3z6L6BT for ; Tue, 16 Dec 2025 20:22: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW7dv2HXNz3nMx for ; Tue, 16 Dec 2025 20:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916563; 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=algG6CUR4W5aoFDQeqGHH3ZK5aj9F9rKvqycLRzTiE4=; b=qAtqfP0bRxIgops6GB9E4tq8EQxjE0M3EbEsvUVJBTZgwfPWtCJaq/qfbw84RSVTdA3fhY wlZpIgsF9IZpISABQQP2YImpaV3P3bTEGJPi/b7291b6HMJNM2Zy6OaWpCN1JIgDe3Y/x/ hmJK90E6iSRDLsJ3k9eV9TWXH8QUQbJ3KiDTffpFdJOuUm9wdMBp9nPgfxv291YEJrARKa p9s69UOUePJbKs1osIslgMtz+DEEpueKsXE27mogHEKQVpw2+qIpv5olDmo02lSWUVwlIr uD/y4HwK4dsGM5807KZv4cOC56QFKWz49D/rBxEFiXgPpnNrR8ovTx/0BMXwxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916563; 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=algG6CUR4W5aoFDQeqGHH3ZK5aj9F9rKvqycLRzTiE4=; b=oCegwX5yvERTKz9rE+u5EslRCy8mcnMtddOv+m/pRIf++UDmclTynoWV7dnzlq4PqpVLT0 vK27nb4Fb1d9M99f2z/RTZQb5OF7RqD3EXqZ9jO0smMRS/KCFt/XAaDg25SYVpUJWzQQFQ riUcez6i/un5oCyFcX88pX8PPlynALMvzojkVRRrhjAQj0i1JKPo7UmSvdf32aidpF9sab SUHwbiFDV5kpR1IcceIWJ7dXjCXA+5XXsqDdYvvChi7yv1QkNq6ZD9ELOWu9bGb+Bh7Y6D 1qCZFXjkbdatwgxa6czzTvGJ66a6wjpatbBBbAfZPin1mfZNxwvv5l8u+EPfzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765916563; a=rsa-sha256; cv=none; b=vyd25NBLzlSrzwEHgo4edPeIRxV5d8fJt2eYcJJZ5q+5zDNAD6XHSwTEnqtgerI02sUcf3 jLhiEtDOh8CFgtnpeN2Eaf0iOCSzrQc39BbggUY/6/jhuHpb38XubFYVYDudNmOk3GSvkP aZe5+Ji3ujTrVabIS9JIMAAYpT3mVkhTeXGr5Z2LsZgude14BH/D85fqHpktLyjpcrPt9i VJCc3NGkv7ofETzcYjozHK6Aqapvkn0gGICKC0jpOtxPnLjkCoG/N0quxaRYYnmoWCWKwN 9IHFILgSX1N8qJSXiVkQjxWvPb1Xm4au+P1Md/6yaj8/IG+O8Sc0DznzRCQf6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW7dv1vVSz6HQ for ; Tue, 16 Dec 2025 20:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37c0c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 20:22:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 79f578531f21 - main - libfetch: Fix -Wunterminated-string-initialization 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: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79f578531f21aa57307cbffd858a8a89e562aa5c Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 20:22:43 +0000 Message-Id: <6941bf93.37c0c.2dc55cd8@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=79f578531f21aa57307cbffd858a8a89e562aa5c commit 79f578531f21aa57307cbffd858a8a89e562aa5c Author: Alex Richardson AuthorDate: 2025-12-16 18:08:51 +0000 Commit: Alex Richardson CommitDate: 2025-12-16 20:21:45 +0000 libfetch: Fix -Wunterminated-string-initialization This defaults to an error in clang HEAD, use a char-by-char initializer instead. Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52532 --- lib/libfetch/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 786d5647d993..2e1364edff04 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -135,7 +135,7 @@ static struct fetcherr socks5_errlist[] = { }; /* End-of-Line */ -static const char ENDL[2] = "\r\n"; +static const char ENDL[2] = { '\r', '\n' }; /*** Error-reporting functions ***********************************************/ From nobody Tue Dec 16 20:22:44 2025 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 4dW7dw5tN5z6L5yl for ; Tue, 16 Dec 2025 20:22: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW7dw3CXFz3nTK for ; Tue, 16 Dec 2025 20:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916564; 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=KMZughLcIlMStUcxqhQwRYlF4VNNdAEoa8ii0mGttBs=; b=qAqE78D/tgU3Qp2mQIQx91rcOK2f54VbPUqeHl0TeNx4mU0lE3LQCr76rU4B9GqXqat2pp od4JSu8clgOXiu2e/7W1RRzKXuL/WeGvIwaYMexl6ssv/PfiPV5CLjn+MrdusDyGFhtr5t waPyaqlYI1hWVoY0PWIlMSbI/Aln5sIFJIgrLuyFYU21vRBFEwb1NW+xcBVDAaJ5mdkPVZ HbGxmk6h1zzefGKxqLfnFn0w8kixHBCfp+iUCEbq93pcnOcwt2oowKgGDplzlFv93PCha2 nMnRws0vFFSvz2WkrvQ5COs3/Qb26wGzgaPHd0t1CH9Od+s5GFTVajQK2WQLqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916564; 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=KMZughLcIlMStUcxqhQwRYlF4VNNdAEoa8ii0mGttBs=; b=iCz3zPQ5IBl4gtqJuRTecOH33dGkC/UW9eM6Ax0oI6fJ/kqb5R+GKm1R7ECj/V5sm7RqzJ DwpeIlzmUXGWlLimcSCrXPrCLb7NnFMofApsHkePFxH07sMNjAJT6LDjzbcmNmxBpXze5w Bria2lEC8YIAeCWDIGoXUB6EVRPpDaT6reuj3LqhaByvjO3Txwx7dWpPTTTMpUGoH3GovI ABEjFbekq5FAMlc+nULSM2ak7Yjm3v9POqe6RLMdCSLGOnFMyLSI3Q4cHRE3PXebMiwPxq 4htR0iBtywcEg9fvjDXhzhA4zVCGzYtKDiCHOtcVUdji13LMzJwbH2IGvt6uSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765916564; a=rsa-sha256; cv=none; b=EPQj2wjU+5djzaqu8rEOMBCaek2dlaUXq67uvO9ls2OV3Z9BBHISMHEfAl+qCsIuflUy+3 UYpXeMHYevF2TvkngG5eiW3tCVEF231i0L4a3solOeZP/X+YCyfzD0dcfcd/gotWznlbGk ql59lQLdw0vcc6d5QkaYCUi3oIhZubkgnPjNitvpRTdbCjDe0q0IRyvxw/9HhyGz5Q8Epe FheL9641qavO5mfftXlMC6mGNUXsmV4do6WID8Kmjx6mdG4ExVYzZvxLx0SmbRqW7rG4CQ H6FArnOukIicFlX/DJnOLLlDRjAURpxeeuS9IORJk8B1UYCOmWNEUYS1rFUFPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW7dw2lwhz61T for ; Tue, 16 Dec 2025 20:22:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36b3b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 20:22:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 86f325711c07 - main - rtld: silence clang's unterminated-string-initialization warning 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: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86f325711c07b723b85c031d581d0a5c1a0964f3 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 20:22:44 +0000 Message-Id: <6941bf94.36b3b.100506da@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=86f325711c07b723b85c031d581d0a5c1a0964f3 commit 86f325711c07b723b85c031d581d0a5c1a0964f3 Author: Alex Richardson AuthorDate: 2025-12-16 18:09:10 +0000 Commit: Alex Richardson CommitDate: 2025-12-16 20:21:45 +0000 rtld: silence clang's unterminated-string-initialization warning Since the initializer is used in other places where we can't just replace it with a char-by-char initializer, this adds a macro for the nonstring attribute (match the linuxkpi definition). Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52535 --- lib/libsysdecode/utrace.c | 3 ++- libexec/rtld-elf/rtld.c | 3 ++- libexec/rtld-elf/rtld_utrace.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libsysdecode/utrace.c b/lib/libsysdecode/utrace.c index 67ba86bfbf7b..8932f4b7e58f 100644 --- a/lib/libsysdecode/utrace.c +++ b/lib/libsysdecode/utrace.c @@ -169,7 +169,8 @@ sysdecode_utrace(FILE *fp, void *p, size_t len) struct utrace_malloc um; struct utrace_malloc32 *pm; #endif - static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring = + RTLD_UTRACE_SIG; if (len == sizeof(struct utrace_rtld) && bcmp(p, rtld_utrace_sig, sizeof(rtld_utrace_sig)) == 0) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 8ac897508870..39fb6bc5fb31 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -348,7 +348,8 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize, int refcnt, const char *name) { struct utrace_rtld ut; - static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring = + RTLD_UTRACE_SIG; memset(&ut, 0, sizeof(ut)); /* clear holes */ memcpy(ut.sig, rtld_utrace_sig, sizeof(ut.sig)); diff --git a/libexec/rtld-elf/rtld_utrace.h b/libexec/rtld-elf/rtld_utrace.h index c14a62ddcb0b..dee807cc0098 100644 --- a/libexec/rtld-elf/rtld_utrace.h +++ b/libexec/rtld-elf/rtld_utrace.h @@ -49,7 +49,7 @@ #define RTLD_UTRACE_SIG "RTLD" struct utrace_rtld { - char sig[RTLD_UTRACE_SIG_SZ]; + char sig[RTLD_UTRACE_SIG_SZ] __nonstring; int event; void *handle; void *mapbase; /* Used for 'parent' and 'init/fini' */ From nobody Tue Dec 16 20:22:45 2025 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 4dW7dx6Rt2z6L5nK for ; Tue, 16 Dec 2025 20:22: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW7dx42yKz3nR3 for ; Tue, 16 Dec 2025 20:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916565; 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=xGDyGLvGBKfK+pNiRQOkEgl3kJwkaemW1d2poixGk2I=; b=b52oaF1BC0KEBJwMSmUBUs+oEuQqrceA8prfiZQ7uLPCBrpxVzd5RNGVKEyIaTTHIWv8Xa PQCtegNsYfZ/LPXXDK4tcEK1/YZ96/1BXe6s87ZkBpX/XbNFKlPbbplcHbZhV2+TtAvBZx HCQe4hVxio0t8kKq/CJ51z4OlcHSJipml4YX/VgtJkw2r9ySSb/20AsaF0bPIx9PHVRUx1 gONVT2ObH9i3DW/t8rfy8MT0ybN/ETFdipwJOYKHYDAdN1cTxHUi4sz0tDxeEG62wievHX k1npvFB/VOI5UtubM0N/bdGTXDfIShRRHMuJSKv7M3zYumu8YWo3EnU1UlJ26A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765916565; 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=xGDyGLvGBKfK+pNiRQOkEgl3kJwkaemW1d2poixGk2I=; b=mlPbyzTtkILyIGJUzs534U08cNppfoqN78oM9oATllyTOg8+VfOcq/ni44r5NppHlz6nL+ BQthonLdDXKRrKi9EGLhGRce8+z4kznUUH0JIch1soydARX13JBHjhBPZq8/kvLs39Wfe3 xnTKq9a1EIjvb3tPKIiOQtcZaayBjCCZ9WU6LTjQDx80/pPYrhYzXG5vF/d/nAGGhP9FrF 2C+CUCS4fByHPCOBKWTgpdLlUiZJvVYJMbgOVUX4wRLPdmw8zQPMVNPvzP6qu9gioOXtR1 b+d8up0avwMQKmeFPMkmrNL3B68AapgNa6yiTsy2HYcnZB3znzaieY46Zjv9pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765916565; a=rsa-sha256; cv=none; b=D6WC+pRWmaHgFGKE3bmf9/DWl1QIgIbT6dPnnJf7RMSVxXru75wTQmtiq+huiDETvgLqXa 7/M6TDh4qDweQL5eTVgycKm6brLyufwTJnYMoUe3SaK7nu9dDN0/7885KopLSBNagOcXqx U8Mr+pmY0gTacOPKEMRyNVvXR1e13HAP8WQNpGipED+F2nG1zw1srmAFo2RFvkvmntSUDT kwwpblI8keQEIIaS6OmhB7/zGnAbXNwUBAhf9MLCCA2con7IfywySsSBItifJRFyt871Om bAo2jKyPhAIdLGYegCFkQw++I2UnwKMDNVzq1hnvAt1TuzOufP1KyjkbHbu+bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dW7dx3YKvz65c for ; Tue, 16 Dec 2025 20:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37c10 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 20:22:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 2ed21f90906b - main - netmap: silence -Wdefault-const-init-field-unsafe warning 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: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ed21f90906b230476d3f12ff9dce0e2c4642af2 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 20:22:45 +0000 Message-Id: <6941bf95.37c10.4da4ae17@gitrepo.freebsd.org> The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=2ed21f90906b230476d3f12ff9dce0e2c4642af2 commit 2ed21f90906b230476d3f12ff9dce0e2c4642af2 Author: Alex Richardson AuthorDate: 2025-12-16 18:09:57 +0000 Commit: Alex Richardson CommitDate: 2025-12-16 20:21:45 +0000 netmap: silence -Wdefault-const-init-field-unsafe warning The netmap_ring struct starts with various const members and rencent clang warns about leaving them uninitialized. Having them const in the first place is highly suspicious since they are updated with various macros but using hand-coded __DECONST(). But fixing that is a more invasive change that I am unable to test. ``` .../freebsd/sys/dev/netmap/netmap_kloop.c:320:21: error: default initialization of an object of type 'struct netmap_ring' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe] 320 | struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ | ^ .../freebsd/sys/net/netmap.h:290:16: note: member 'buf_ofs' declared 'const' here 290 | const int64_t buf_ofs; | ^ ``` Test Plan: Compiles Reviewed by: vmaffione, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52568 --- sys/dev/netmap/netmap_kloop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/netmap/netmap_kloop.c b/sys/dev/netmap/netmap_kloop.c index ba9e67076e72..ac3ca2d8d21f 100644 --- a/sys/dev/netmap/netmap_kloop.c +++ b/sys/dev/netmap/netmap_kloop.c @@ -161,7 +161,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring_args *a) struct netmap_kring *kring = a->kring; struct nm_csb_atok *csb_atok = a->csb_atok; struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa; - struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ + /* shadow copy of the netmap_ring */ + struct netmap_ring shadow_ring = {0}; #ifdef SYNC_KLOOP_POLL bool more_txspace = false; #endif /* SYNC_KLOOP_POLL */ @@ -317,7 +318,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring_args *a) struct netmap_kring *kring = a->kring; struct nm_csb_atok *csb_atok = a->csb_atok; struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa; - struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */ + /* shadow copy of the netmap_ring */ + struct netmap_ring shadow_ring = {0}; int dry_cycles = 0; #ifdef SYNC_KLOOP_POLL bool some_recvd = false; From nobody Tue Dec 16 21:54:33 2025 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 4dW9h900BGz6LGTs; Tue, 16 Dec 2025 21:54:49 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (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 (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW9h83g8lz4JJX; Tue, 16 Dec 2025 21:54:48 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.18.1/8.18.1) with ESMTPS id 5BGLsX4L048109 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 16 Dec 2025 22:54:33 +0100 (CET) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.18.1/8.18.1/Submit) id 5BGLsX0k048108; Tue, 16 Dec 2025 22:54:33 +0100 (CET) (envelope-from fuz) Date: Tue, 16 Dec 2025 22:54:33 +0100 From: Robert Clausecker To: Ravi Pokala Cc: Cy Schubert , Robert Clausecker , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() Message-ID: References: <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org> <20251216135709.46D25203@slippy.cwsent.com> <20251216160002.A65D63D6@slippy.cwsent.com> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dW9h83g8lz4JJX Hi Ravi, The bts (bit test and set) instruction takes a bit index and an integer and sets the indicated bit in the register. I.e. bts a, b does a |= 1 << b. It also returns the previous value of the bit in the carry flag, but that's not really important here. R8 is the 64-bit variant of r8d. I switched to it for this instruction as bts masks its index to the operand size (i.e. to 5 bits for a range of 0--31 for the 32 bit case). However, due to the bug fix, the case r8 == 32 is now possible, which led to wrong behaviour (that is, the least-significant bit is set). This is avoided by switching to 64-bit operand size, instead setting the 32nd bit. test does not care about these bits, so 32 bit operand size is fine. Who does care is the tzcnt instruction further down, and that's probably the bug I added. Will have to investigate further and then submit a patch. I'm sorry for the continued errors. It's a bit of a stressful time for me. Yours, Robert Clausecker Am Tue, Dec 16, 2025 at 02:33:32PM -0500 schrieb Ravi Pokala: > I know ~nothing of assembly, but one thing that seems odd to me is that the 'bts' line > originally used '%r8d', but the new version uses '%r8'. And yet, the new 'test' line > uses '%r8d'. Again, knowing nothing about this, it seems to me that the 'bts' and 'test' > should probably be talking about the same thing...? > > -Ravi (rpokala@) > > -----Original Message----- > From: > on behalf of Cy Schubert > > Reply-To: Cy Schubert > > Date: Tuesday, December 16, 2025 at 11:00 > To: Cy Schubert > > Cc: Robert Clausecker >, >, >, > > Subject: Re: git: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() > > > In message <20251216135709.46D25203@slippy.cwsent.com >, Cy Schubert writes: > > In message <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org >, Robert Clausecker > > wri > > tes: > > > The branch main has been updated by fuz: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=66eb78377bf109af1d9e25626bf254 > > b4 > > > 369436ec > > > > > > commit 66eb78377bf109af1d9e25626bf254b4369436ec > > > Author: Robert Clausecker > > > > AuthorDate: 2025-12-10 20:45:18 +0000 > > > Commit: Robert Clausecker > > > > CommitDate: 2025-12-14 16:06:05 +0000 > > > > > > libc/amd64: fix overread conditions in stpncpy() > > > > > > Due to incorrect unit test design, two overread conditions went > > > undetected in the amd64 baseline stpncpy() implementation. > > > For buffers of 1--16 and 32 bytes that do not contain nul bytes > > > and end exactly at a page boundary, the code would incorrectly > > > read 16 bytes from the next page, possibly crossing into an > > > unmapped page and crashing the program. If the next page was > > > mapped, the code would then proceed with the expected behaviour > > > of the stpncpy() function. > > > > > > Three changes were made to fix the bug: > > > > > > - an off-by-one error is fixed in the code deciding whether to > > > enter the runt case or not, entering it for 0 > > instead of 0 > > - in the runt case, the logic to skip reading a second 16-byte > > > chunk if the buffer ends in the first chunk was fixed to > > > account for buffers that end at a 16-byte boundary but do not > > > hold a nul byte. > > > - in the runt case, the logic to transform the location of the > > > end of the input buffer into a bit mask was fixed to allow > > > the case of n==32, which was previously impossible due to the > > > incorrect logic for entering said case. > > > > > > The performance impact should be minimal. > > > > > > PR: 291359 > > > See also: D54169 > > > Reported by: Collin Funk > > > > Reviewed by: getz > > > Approved by: markj (mentor) > > > MFC after: 1 week > > > Fixes: 90253d49db09a9b1490c448d05314f3e4bbfa468 (D42519) > > > Differential Revision: https://reviews.freebsd.org/D54170 > > > --- > > > lib/libc/amd64/string/stpncpy.S | 7 ++++--- > > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > > > diff --git a/lib/libc/amd64/string/stpncpy.S b/lib/libc/amd64/string/stpncp > > y. > > > S > > > index 5ce0dd093a9e..df22bb9f0c53 100644 > > > --- a/lib/libc/amd64/string/stpncpy.S > > > +++ b/lib/libc/amd64/string/stpncpy.S > > > @@ -100,7 +100,7 @@ ARCHENTRY(__stpncpy, baseline) > > > movdqa (%rsi), %xmm0 # load head > > > and $0xf, %ecx # offset from alignment > > > mov $-1, %r9d > > > - lea -32(%rcx), %rax # set up overflow-proof compari > > > son rdx+rcx<=32 > > > + lea -33(%rcx), %rax # set up overflow-proof compari > > > son rdx+rcx<=32 > > > shl %cl, %r9d # mask of bytes belonging to th > > > e string > > > sub %rcx, %rdi # adjust RDI to correspond to R > > > SI > > > pxor %xmm1, %xmm1 > > > @@ -223,8 +223,9 @@ ARCHENTRY(__stpncpy, baseline) > > > > > > /* 1--32 bytes to copy, bounce through the stack */ > > > .Lrunt: movdqa %xmm1, bounce+16(%rsp) # clear out rest of on- > > > stack copy > > > - bts %r10d, %r8d # treat end of buffer as end of > > > string > > > - and %r9w, %r8w # end of string within first bu > > > ffer? > > > + bts %r10, %r8 # treat end of buffer as end of > > > string > > > + and %r9d, %r8d # mask out head before string > > > + test $0x1ffff, %r8d # end of string within first ch > > > unk or right after? > > > jnz 0f # if yes, do not inspect second > > > buffer > > > > > > movdqa 16(%rsi), %xmm0 # load second chunk of input > > > > > > > I've opened PR/291720 regarding a significant regression caused by this > > commit. It affects my older machines, resulting in enviornment (getenv) > > corruption. It does not affect my newer (and with more RAM) machines. > > > BTW, this brought my postfix server effectively offline. I have not been > able to send or receive email until this commit was reverted locally. > > > > > -- > Cheers, > Cy Schubert > > FreeBSD UNIX: > Web: https://FreeBSD.org > NTP: > Web: https://nwtime.org > > > e**(i*pi)+1=0 > > > > > > > > > > > -- () ascii ribbon campaign - for an encoding-agnostic world /\ - against html email - against proprietary attachments From nobody Tue Dec 16 21:58:16 2025 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 4dW9mF4Ghvz6LGfV; Tue, 16 Dec 2025 21:58:21 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (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 (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dW9mD1RpXz4Jdk; Tue, 16 Dec 2025 21:58:20 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fuz@fuz.su designates 2001:41d0:8:e508::1 as permitted sender) smtp.mailfrom=fuz@fuz.su Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.18.1/8.18.1) with ESMTPS id 5BGLwG7B048193 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 16 Dec 2025 22:58:16 +0100 (CET) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.18.1/8.18.1/Submit) id 5BGLwGMh048192; Tue, 16 Dec 2025 22:58:16 +0100 (CET) (envelope-from fuz) Date: Tue, 16 Dec 2025 22:58:16 +0100 From: Robert Clausecker To: Ravi Pokala Cc: Cy Schubert , Robert Clausecker , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() Message-ID: References: <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org> <20251216135709.46D25203@slippy.cwsent.com> <20251216160002.A65D63D6@slippy.cwsent.com> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR]; FREEFALL_USER(0.00)[fuz]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[fuz.su]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6] X-Rspamd-Queue-Id: 4dW9mD1RpXz4Jdk Am Tue, Dec 16, 2025 at 10:54:33PM +0100 schrieb Robert Clausecker: > Hi Ravi, > > The bts (bit test and set) instruction takes a bit index and an integer and > sets the indicated bit in the register. I.e. bts a, b does a |= 1 << b. That was supposed to be "bts a, b does b |= 1 << a" of course (in AT&T syntax). > It also returns the previous value of the bit in the carry flag, but that's > not really important here. R8 is the 64-bit variant of r8d. I switched to > it for this instruction as bts masks its index to the operand size (i.e. to > 5 bits for a range of 0--31 for the 32 bit case). However, due to the > bug fix, the case r8 == 32 is now possible, which led to wrong behaviour > (that is, the least-significant bit is set). This is avoided by switching to > 64-bit operand size, instead setting the 32nd bit. test does not care about > these bits, so 32 bit operand size is fine. Who does care is the tzcnt > instruction further down, and that's probably the bug I added. Will have > to investigate further and then submit a patch. > > I'm sorry for the continued errors. It's a bit of a stressful time for me. > > Yours, > Robert Clausecker > > Am Tue, Dec 16, 2025 at 02:33:32PM -0500 schrieb Ravi Pokala: > > I know ~nothing of assembly, but one thing that seems odd to me is that the 'bts' line > > originally used '%r8d', but the new version uses '%r8'. And yet, the new 'test' line > > uses '%r8d'. Again, knowing nothing about this, it seems to me that the 'bts' and 'test' > > should probably be talking about the same thing...? > > > > -Ravi (rpokala@) > > > > -----Original Message----- > > From: > on behalf of Cy Schubert > > > Reply-To: Cy Schubert > > > Date: Tuesday, December 16, 2025 at 11:00 > > To: Cy Schubert > > > Cc: Robert Clausecker >, >, >, > > > Subject: Re: git: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() > > > > > > In message <20251216135709.46D25203@slippy.cwsent.com >, Cy Schubert writes: > > > In message <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org >, Robert Clausecker > > > wri > > > tes: > > > > The branch main has been updated by fuz: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=66eb78377bf109af1d9e25626bf254 > > > b4 > > > > 369436ec > > > > > > > > commit 66eb78377bf109af1d9e25626bf254b4369436ec > > > > Author: Robert Clausecker > > > > > AuthorDate: 2025-12-10 20:45:18 +0000 > > > > Commit: Robert Clausecker > > > > > CommitDate: 2025-12-14 16:06:05 +0000 > > > > > > > > libc/amd64: fix overread conditions in stpncpy() > > > > > > > > Due to incorrect unit test design, two overread conditions went > > > > undetected in the amd64 baseline stpncpy() implementation. > > > > For buffers of 1--16 and 32 bytes that do not contain nul bytes > > > > and end exactly at a page boundary, the code would incorrectly > > > > read 16 bytes from the next page, possibly crossing into an > > > > unmapped page and crashing the program. If the next page was > > > > mapped, the code would then proceed with the expected behaviour > > > > of the stpncpy() function. > > > > > > > > Three changes were made to fix the bug: > > > > > > > > - an off-by-one error is fixed in the code deciding whether to > > > > enter the runt case or not, entering it for 0 > > > instead of 0 > > > - in the runt case, the logic to skip reading a second 16-byte > > > > chunk if the buffer ends in the first chunk was fixed to > > > > account for buffers that end at a 16-byte boundary but do not > > > > hold a nul byte. > > > > - in the runt case, the logic to transform the location of the > > > > end of the input buffer into a bit mask was fixed to allow > > > > the case of n==32, which was previously impossible due to the > > > > incorrect logic for entering said case. > > > > > > > > The performance impact should be minimal. > > > > > > > > PR: 291359 > > > > See also: D54169 > > > > Reported by: Collin Funk > > > > > Reviewed by: getz > > > > Approved by: markj (mentor) > > > > MFC after: 1 week > > > > Fixes: 90253d49db09a9b1490c448d05314f3e4bbfa468 (D42519) > > > > Differential Revision: https://reviews.freebsd.org/D54170 > > > > --- > > > > lib/libc/amd64/string/stpncpy.S | 7 ++++--- > > > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/lib/libc/amd64/string/stpncpy.S b/lib/libc/amd64/string/stpncp > > > y. > > > > S > > > > index 5ce0dd093a9e..df22bb9f0c53 100644 > > > > --- a/lib/libc/amd64/string/stpncpy.S > > > > +++ b/lib/libc/amd64/string/stpncpy.S > > > > @@ -100,7 +100,7 @@ ARCHENTRY(__stpncpy, baseline) > > > > movdqa (%rsi), %xmm0 # load head > > > > and $0xf, %ecx # offset from alignment > > > > mov $-1, %r9d > > > > - lea -32(%rcx), %rax # set up overflow-proof compari > > > > son rdx+rcx<=32 > > > > + lea -33(%rcx), %rax # set up overflow-proof compari > > > > son rdx+rcx<=32 > > > > shl %cl, %r9d # mask of bytes belonging to th > > > > e string > > > > sub %rcx, %rdi # adjust RDI to correspond to R > > > > SI > > > > pxor %xmm1, %xmm1 > > > > @@ -223,8 +223,9 @@ ARCHENTRY(__stpncpy, baseline) > > > > > > > > /* 1--32 bytes to copy, bounce through the stack */ > > > > .Lrunt: movdqa %xmm1, bounce+16(%rsp) # clear out rest of on- > > > > stack copy > > > > - bts %r10d, %r8d # treat end of buffer as end of > > > > string > > > > - and %r9w, %r8w # end of string within first bu > > > > ffer? > > > > + bts %r10, %r8 # treat end of buffer as end of > > > > string > > > > + and %r9d, %r8d # mask out head before string > > > > + test $0x1ffff, %r8d # end of string within first ch > > > > unk or right after? > > > > jnz 0f # if yes, do not inspect second > > > > buffer > > > > > > > > movdqa 16(%rsi), %xmm0 # load second chunk of input > > > > > > > > > > I've opened PR/291720 regarding a significant regression caused by this > > > commit. It affects my older machines, resulting in enviornment (getenv) > > > corruption. It does not affect my newer (and with more RAM) machines. > > > > > > BTW, this brought my postfix server effectively offline. I have not been > > able to send or receive email until this commit was reverted locally. > > > > > > > > > > -- > > Cheers, > > Cy Schubert > > > FreeBSD UNIX: > Web: https://FreeBSD.org > > NTP: > Web: https://nwtime.org > > > > > > e**(i*pi)+1=0 > > > > > > > > > > > > > > > > > > > > > > > > -- > () ascii ribbon campaign - for an encoding-agnostic world > /\ - against html email - against proprietary attachments -- () ascii ribbon campaign - for an encoding-agnostic world /\ - against html email - against proprietary attachments From nobody Tue Dec 16 23:39:18 2025 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 4dWD0l1Xg7z6LPNH for ; Tue, 16 Dec 2025 23:39: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWD0k6Fdlz3F7F for ; Tue, 16 Dec 2025 23:39:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765928358; 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/ZHqqSfHdIUAb2RxgQdWrvlzj2M9yhSruqP0/FvcbQ=; b=BUMkQ/ED6f4bqLrCdjtH0NLXT5gvXSkaIuVrAbBDWe7TjO+/3fRneM+r1YTZ3ksziiSsR0 dRD96GznFe6UfXEAN1IXmblUMLA23lpOEse66Gl05XOq9s6fzvbk8m7Uul33TxGaNp8aYd 9AmNSWWJZpuqCpb0aL1bJ4DGwaarTSm8p1i3Z4BQnbXBQFj+3HWIch4ANkdfF1PP50h6QL aBQUGoRLvH3WOuTpdhkHAcFeATzsGA7R/39qGySyHLqnH5b0EF2DWXnnpNImBLT6jRunS5 M0dF7TGel2j1vrBJhBnAIibMXXoi4NYEYE6TXrtuK4hg9jZx2jUTERIPrzWR2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765928358; 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/ZHqqSfHdIUAb2RxgQdWrvlzj2M9yhSruqP0/FvcbQ=; b=I7RVXYhoL8OTLBDbFjfdK6sB7wYgFCfm6nvcBHOr8jUM4TuODNXTPARmj2LFLomT01H98e o+e3mSbqYNQHyfmOtqhAQehlbNq5a01kBOI3Lso4sk8fThBoTsylErxE7hH5fW9FuwjkGd 5enWTyGw2ZgNhBkUcLV30H/u++hdIL4JImHB7tcTtt397dAoPlHTia5vIYxDRPOSYBJFZ8 zCqCgU7PZFukSIVrjPNXI+tdF/5x0c3rirye5AwbIdiK4NSlo5tA8SteQgg3Tr5UwKPMKE 52dukElfL5LxUXEeQAHfvKxLSgFH4sTvZvmU+vNod4IPGuewHCRjrW/aEgD9ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765928358; a=rsa-sha256; cv=none; b=fxqEd4arfjDkhUx65zfbO2kDwTpsaTdPzGjvMhdOfT2b9zNidG6fj1d7MgOlyyNLO03Ixm HeJxyA7hjESsvKCMEBSXK6BCc70z6+0jEe9BGEVNG3imiCMm+Nl0QfQylOK758f91bU7tV f40jj64M66xy5ITBuvHBMKCu4q+TzkZTWj4zgUV9/fsXlG4JKtJDPkVBOJj3We2iBfWnai +huEWfEzLQ006l5VdFyU/NoxRuuFXLLi84r2j8N7cbeuSclDgSoPqFARbXNKVI+yUYZHKa jMxHFAFzXB1XE0T123JcHkZ/3m1SXhRRSomYrvp2ezdJ9pDg2OcCeD3otwEbcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWD0k4b4ZzC1S for ; Tue, 16 Dec 2025 23:39:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2259d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 23:39:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bf804f69dd94 - main - rtsold: Validate entries in domain search lists 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: bf804f69dd94b3c98962618b4ad3b48a35bff2ff Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 23:39:18 +0000 Message-Id: <6941eda6.2259d.30df21a5@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bf804f69dd94b3c98962618b4ad3b48a35bff2ff commit bf804f69dd94b3c98962618b4ad3b48a35bff2ff Author: Mark Johnston AuthorDate: 2025-12-15 20:50:08 +0000 Commit: Mark Johnston CommitDate: 2025-12-16 23:38:48 +0000 rtsold: Validate entries in domain search lists Reported by: Kevin Day Approved by: so Security: FreeBSD-SA-25:12.rtsold Security: CVE-2025-14558 --- usr.sbin/rtsold/rtsol.c | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c index 79928932ca5c..a7d5a44a7d44 100644 --- a/usr.sbin/rtsold/rtsol.c +++ b/usr.sbin/rtsold/rtsol.c @@ -776,6 +776,41 @@ call_script(const char *const argv[], struct script_msg_head_t *sm_head) argv[0], status); } +#define PERIOD 0x2e +#define hyphenchar(c) ((c) == 0x2d) +#define periodchar(c) ((c) == PERIOD) +#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) || \ + ((c) >= 0x61 && (c) <= 0x7a)) +#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) + +#define borderchar(c) (alphachar(c) || digitchar(c)) +#define middlechar(c) (borderchar(c) || hyphenchar(c)) + +static int +res_hnok(const char *dn) +{ + int pch = PERIOD, ch = *dn++; + + while (ch != '\0') { + int nch = *dn++; + + if (periodchar(ch)) { + ; + } else if (periodchar(pch)) { + if (!borderchar(ch)) + return (0); + } else if (periodchar(nch) || nch == '\0') { + if (!borderchar(ch)) + return (0); + } else { + if (!middlechar(ch)) + return (0); + } + pch = ch, ch = nch; + } + return (1); +} + /* Decode domain name label encoding in RFC 1035 Section 3.1 */ static size_t dname_labeldec(char *dst, size_t dlen, const char *src) @@ -804,12 +839,11 @@ dname_labeldec(char *dst, size_t dlen, const char *src) } *dst = '\0'; - /* - * XXX validate that domain name only contains valid characters - * for two reasons: 1) correctness, 2) we do not want to pass - * possible malicious, unescaped characters like `` to a script - * or program that could be exploited that way. - */ + if (!res_hnok(dst_origin)) { + warnmsg(LOG_INFO, __func__, + "invalid domain name '%s' was ignored", dst_origin); + return (0); + } return (src - src_origin); } From nobody Wed Dec 17 03:53:14 2025 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 4dWKdk22BXz6LnrP for ; Wed, 17 Dec 2025 03:53: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWKdk1PS5z3DQw for ; Wed, 17 Dec 2025 03:53:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765943594; 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=+VLr6htXWDqOgxnChmo2CLF5twHtDFci5kkJ/7ycZGM=; b=GDxJUUsI/ws1XwVB4C+foHzoIjKGPq3ZcE8OeNcl7ECS4eiU5LEne1T2SqX38bx06x9qJ0 YYsSShumMgI8P7xcuUKpSavFkxaS6cl5cn7IZsGT56IPn7hw7w5leSZd9lj8yMg1Y9XTq0 f6yR4NdArC9K3B3iaevLFNRwaK6PtMCanu2cWt9XvBOGAKh8x7wwYsi3fSB+kf48HqVFpk 4uyken1JeQsg6ppFwqcHy5HRrJWhBqYXcPaJtGqyBYWMLbEEuWuTAw9g49e/7JC0wG3VFw 8VHMh9HCVwbme0n3TZD7SQAZzNz2OC6/PiO5j+5v9Q0MNB8sPC0JMO0NYGlssA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765943594; 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=+VLr6htXWDqOgxnChmo2CLF5twHtDFci5kkJ/7ycZGM=; b=Zq3ZgKZWS2sbJdxot/0WKV48scuBoVTh0oygQVHmdPE50Et2aJVgl9x1E0mheoUUO+VzcK kraNPZd9raLYHsyurNjog3tfM8r1s9Inpx4P3lAjVYUV/DOvtzpiXUToEFKbZCu7wgKaa4 +E8vaZrgu9fdelYNm9zgZmWI84yUGGCoBkEqoZ3fAnRaQ3pQTjwbglDNeU9ZNVvw13wV/L YwMDyCoYaKbLZBqt0Uy2Si6GY0ZQY34Q1BiRpGqguLJIwf56ZxnKI4HzgD9zcWYtEQOSdr 4Y7PtHQPybmoUv87IKRBaRqpB47qvF3HhdDOUNGau6vkv29rH/HoGPG6Zb+orw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765943594; a=rsa-sha256; cv=none; b=D2xAXUCsd7WIm5HC2rmO0PMtNBoxtOL73qkR6vLRaOXwgO9x5WbUJEBf9xEoJMHuPJ7t4A oJNd2/g5KBuzAXdMv8smd0W5nDmN91l2WLHOaEl87LCHXwG91KDVtKYI+kEwU2oOpip/ar 17Hb9HWgKGZJDcGABc6ViTRv+lGOY3QDx6fLl/UXJmgz4ljyt1mqzHM1Al49yBGnKdNWrc QGf9N5+8TEssZUx+zKcrMeFad4Q6sCKk389znQdejl4trM6cqvOfXtoYn0nnMtVaG1W6Dt 7UO9XQaDcuA5S1W11jroxYJf06boO568EwvTAO8YZ6WCs2a3aTU015cjo91R7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWKdk0kTKzc3B for ; Wed, 17 Dec 2025 03:53:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4355d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 03:53:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: bdfd695037a9 - main - swap_pager_seek_data(): improve assertions 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: bdfd695037a95b076aeffd04ed9fdf042b6ce218 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 03:53:14 +0000 Message-Id: <6942292a.4355d.5d66690d@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bdfd695037a95b076aeffd04ed9fdf042b6ce218 commit bdfd695037a95b076aeffd04ed9fdf042b6ce218 Author: Konstantin Belousov AuthorDate: 2025-12-14 09:30:21 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-17 03:40:31 +0000 swap_pager_seek_data(): improve assertions Check that the passed object indeed has the swap type. Accept any kind of the object lock ownership, not only for read. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54219 --- sys/vm/swap_pager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 676e585a6b53..5e9a0ad94cb3 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2460,7 +2460,8 @@ swap_pager_seek_data(vm_object_t object, vm_pindex_t pindex) vm_page_t m; vm_pindex_t swap_index; - VM_OBJECT_ASSERT_RLOCKED(object); + VM_OBJECT_ASSERT_LOCKED(object); + KASSERT((object->flags & OBJ_SWAP) != 0, ("non-swap obj %p", object)); vm_page_iter_init(&pages, object); m = vm_radix_iter_lookup_ge(&pages, pindex); if (m != NULL && pages.index == pindex && vm_page_any_valid(m)) From nobody Wed Dec 17 03:53:15 2025 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 4dWKdl3NVzz6Lnwx for ; Wed, 17 Dec 2025 03:53: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWKdl22nZz3DWN for ; Wed, 17 Dec 2025 03:53:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765943595; 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=Z5IVgLloLI/YV0PoPWvc9/cgTQ9LHzX3fDQLOBpQLKA=; b=BYYMhWP9eLdFyheyTEZu38gVVkZh+uKVIFVzqY/M2IBl7gN2301qd1ZVG4t0D81lw52iU+ pOTaqFt05sjvTOyigx6Ru+14DpOiTV1tbdIiEpHjZ8wikRYiUI2EWkoUW+39qX4GjM99/t EBIdDj0IWqNWQzR/g+nxdocK4CeW0rGOcJ7BpmTDYToaN4Dv8SP3qOPCOyUTQ03hPss0Rm l95uhAx4sF86PPN7rSAyQm5epfJBlf3vcdJCUtLWN3nFIKyXtHjVb+PXECPLbmKkLm3IBe NjvFXGWgy+JsL2YIgZsC8nymoNyBrjTMKuyRGUOFyrtwy9moBlP166XrXGAmqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765943595; 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=Z5IVgLloLI/YV0PoPWvc9/cgTQ9LHzX3fDQLOBpQLKA=; b=A5fx86kt+aZdjbLG1V7Hcqjh28tgYf+unkTi8HCHvsbvwbAcP1yh85Ie6YkIyDNu8F3r3G qqoA5fn/buFZsaQGUH7/U4FY4eC9M3aQKD2aiA+trgEyOv6PPAoK/x0dBP1pFlrjeZ6Oo2 I5h6n0m+1Cc0+YYiW9MiVZkM4EFoTF4UZCjw0kVlxedqLkBUTiuf4giaxHumL4i2vO7cSw lIXoIvEBASBuGmLLD+GwMnw6ynuArThkPqOU/2bwdd63EX78VOTAMSnJss0iqD9gpxN9ke h7RS21WyiaKA6nja+N4BWNeEwpAeswIxjKqIUY8qmzrKzx6zGjRAH/aLiugrYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765943595; a=rsa-sha256; cv=none; b=OLogzwdVRsmm0Q5HNWLpkxOBuHd60SKQE2RI2j3B0IMVUu5XdvZm0FhZl1vwUzH7dWSUVJ AIIY6/uM7oOK3/8VUXArwtU4Rl0Lz5dFKEmj9H+g6rOQRW4F9FDhUzR9ONUNz9L6v/OeCq LTMEY8d5lrVZAGuAHaQ9FmkeK1kS+lhz+lpOQBCFGOow2UtKEVBS73QXlB/N6dOnE40SA8 DBQO3JDB5wXgjGnOtQg6++QiTw9o9JQqWFDE9gYiLOuQ0fg2eFesrHuPtheS6s34Ljutw9 eIrqnsqtYBnQer0HT66OBCwkVviF3c+Do/cfd/Egp2Rk4kCD+UDBISybc5yQQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWKdl1cndzbmC for ; Wed, 17 Dec 2025 03:53:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41f7c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 03:53:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 30ae88e3b217 - main - swap_pager_seek_data(): move the clipping at the object size to consumers 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: 30ae88e3b217b12476dba665d163ab0d8dd6a8a7 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 03:53:15 +0000 Message-Id: <6942292b.41f7c.7595a669@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=30ae88e3b217b12476dba665d163ab0d8dd6a8a7 commit 30ae88e3b217b12476dba665d163ab0d8dd6a8a7 Author: Konstantin Belousov AuthorDate: 2025-12-16 05:32:37 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-17 03:40:31 +0000 swap_pager_seek_data(): move the clipping at the object size to consumers Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54219 --- sys/fs/tmpfs/tmpfs_vnops.c | 2 ++ sys/vm/swap_pager.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 5082ee1ebdd0..341c88e19115 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -2091,6 +2091,8 @@ tmpfs_seek_data_locked(vm_object_t obj, off_t noff) vm_pindex_t p; p = swap_pager_seek_data(obj, OFF_TO_IDX(noff)); + if (p == OBJ_MAX_SIZE) + p = obj->size; return (p == OFF_TO_IDX(noff) ? noff : IDX_TO_OFF(p)); } diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 5e9a0ad94cb3..ab95bde34ceb 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2479,8 +2479,6 @@ swap_pager_seek_data(vm_object_t object, vm_pindex_t pindex) return (pages.index); m = vm_radix_iter_step(&pages); } - if (swap_index == OBJ_MAX_SIZE) - swap_index = object->size; return (swap_index); } From nobody Wed Dec 17 03:53:16 2025 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 4dWKdn1dBrz6LntY for ; Wed, 17 Dec 2025 03:53: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWKdm2knLz3Dbx for ; Wed, 17 Dec 2025 03:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765943596; 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=WJQSebcFMvVuLdmfHAv4MfIvHD5dXqFlrqM9/xKP3Ac=; b=JHj8RwwCEDRG8K3n4vtqnhZIZyXESgMtxUQmv47opmloqLSCDgiiUsijoCkx1piwWLwq0u 4V9NcuoySppS7DYRcgpGwNUy2rVKuR6Z2zHhMo1LxlGeD4pDRN/NbIM3+z8UXnD66Bb3DI Ghr6AGOug4N3szudg7IzMTGyCWujoBx5MWhPQzow/mmvdFKuv+ZZ8Xz4dfGKxqCZwe4jz+ paMFKLF0Ga3HJI3exeew3F5hRmiqrRi7l6WemSn2W2sIdVkhKUU/9Mde2LNfz8gd6PeShQ M1JfYm5l5LJZW6scKvQQJI3yxvDbRLAiGvI8tKXIP26MzQEbt3ky5htPhMT31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765943596; 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=WJQSebcFMvVuLdmfHAv4MfIvHD5dXqFlrqM9/xKP3Ac=; b=Ey+pR1Zn6LF00YmMkaBB0AsUyghol5nP/bTAw1r2kKb2vGHQzbwp24KMPTFKtGAFKUu6hg vg2qJ8YusEyFR/uWXdTAeFw6OgN0Ysc5nftsLs6G5UbdaPEIuUtHj+gmgyXepFX1Nb6pa/ WK3h6tT8dm2/NZcztZNAevIFUIURLmKRDkkiVcpEGneh+B5xOTysfCyOubmin0a0iKg0bs /0Xsj91p6KnWzjJM5CIJrTYjF/8zNiBrudPYIx3OInZup0t8b3qWq4lpsTSIwrUMkQfgys WKjSCLmVHlnBtguQklDl2HYoEk2vsjOph2LyxCxGIV34Ba7yABONDnTKDxH8IQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765943596; a=rsa-sha256; cv=none; b=tNZgaw0NgfyF3g197m+qHfuNr9OxXUcob2o6beq7t4P+Yl9sKzpioJGPypiK++K7LJTkE4 pF05X2ioBvnNsqAzKo6XRo+QxlYjpHic4EF1YNOM0c2EV4k0Ks9q8/i2S3zwdzOtZpTusz ypDs3p9mpuxOQt/VkyXqBbZKTliv5dalFA4UeoufUqIGXvBJttN/KUUmyFBX/+fCIK97hq 3KXhdoYsNLjAbOBr6n7I8NI1hV7x1/bK2aI0hzC7bK4wAuSAJm9PkAoBykb0qqKk9FMPHe qbeL/DJgJMoLe3VJ843lAXGfw/T8pNMlbHf/hMH3H38Z6xZvd2OnEgDmdYlkGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWKdm25S5zbxT for ; Wed, 17 Dec 2025 03:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43561 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 03:53:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f94bfc469df9 - main - vm_object_coalesce(): check that coalescing does not revive stale pages 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: f94bfc469df9a2bc78ed15cc42525d09e3413e0b Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 03:53:16 +0000 Message-Id: <6942292c.43561.1cc242ea@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f94bfc469df9a2bc78ed15cc42525d09e3413e0b commit f94bfc469df9a2bc78ed15cc42525d09e3413e0b Author: Konstantin Belousov AuthorDate: 2025-11-22 18:43:57 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-17 03:40:31 +0000 vm_object_coalesce(): check that coalescing does not revive stale pages Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54219 --- sys/vm/vm_object.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 413ba5459e3d..117900135ac3 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2244,6 +2244,23 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, if (next_pindex + next_size > prev_object->size) prev_object->size = next_pindex + next_size; +#ifdef INVARIANTS + /* + * Re-check: there must be no pages in the next range backed + * by prev_entry's object. Otherwise, the resulting + * corruption is same as faulting in a non-zeroed page. + */ + if (vm_check_pg_zero) { + vm_pindex_t pidx; + + pidx = swap_pager_seek_data(prev_object, next_pindex); + KASSERT(pidx >= next_pindex + next_size, + ("found obj %p pindex %#jx e %#jx %#jx %#jx", + prev_object, pidx, (uintmax_t)prev_offset, + (uintmax_t)prev_size, (uintmax_t)next_size)); + } +#endif + VM_OBJECT_WUNLOCK(prev_object); return (TRUE); } From nobody Wed Dec 17 09:21:26 2025 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 4dWSwQ6Psnz6KgkY for ; Wed, 17 Dec 2025 09:21: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWSwQ58jpz3k06 for ; Wed, 17 Dec 2025 09:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765963286; 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=m7115GPCBfCsfxU521w1eUkSGkuYVhQAd1aHuBFxI2o=; b=f42S8ObEeH7jq5WkJP6F0SDmrZOryFlj0+E1+7wMa3tQci08lcBxdZUdn8z1y9T0QbNu0k rf2rbOW3Nc0N7ZsbJ+GhKME0ZuwzeXF6Nv8VylxSFDxWKQSTFpVczjJntFWQi6oY8lX9Kz SvV4bDPdkV9z7S3suvPSMn6385I30AdyEYjN4gVkWgq4oI96+i6LTeXFQDnqeha/9jJZsg xswN/eT4ieZw46rII1BYIi26Fj+ZAqFgde45wfqLIkQITLOQFUt+BuoYjEHoK0C6BLcVEJ qWSoqOzqFO3s/fiRUsNae3f+EGHZKi8PTt0ZRJu1nauMtGmeJvRKP+bqS+GSkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765963286; 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=m7115GPCBfCsfxU521w1eUkSGkuYVhQAd1aHuBFxI2o=; b=UjRlmoP5liampjOKdltFdRXxDvdFkyLN1lf12DLybE4DmZQGJq42f85kMomTNsz1A1qq4m 7Nenl9/YVAlAUxN2GL1DmmyFzDqZFD9OIftJCTbmVaXoLewJCN9fVBv2+rI8w5dX5aTdGm qhIJ5ajH8FslNjDiiWtdcsuIo8xaP+vpqccEGORjsJam+Zyn3eyt0uK2jlT7jXEuxLD+Zr jR64o+tUxxUQSa1wMp4tbwc2gJD+Yl2MCdNTMuOZSpdHv2T1Bb7T/0sfgBEdkkrIn1O2y3 89cDuCMHRdDkjCcvSom/3EAhuB4WNpCPXtb00J72SiNKXVmtO5gMiYztSl2+NA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765963286; a=rsa-sha256; cv=none; b=L827/VDReaf2/7vEYfHyIG28BsBap5znN1zPhOfAMFdil5v+adWt3MqQw9nARyh92d4ZUZ kg7C6FyqLH9QST/JxAAztoz3rJQNicohcyoQtBDB4yHptQ3+TQsTkLigGRMymfrzMgxwsq eSj1q+G7ILNNb2+/XASOG0e1BbJUPdSHFov3Kto7P9+28cJUMIeJbRst/tJbS3BDwNAB9Y UhbOG/ZGCK0ilQfo7sjv6RjduDvDJNxh+RyL7GQb1Kwu0p3gCcyWF5TSqXklf+iIZNT51O 9nsAl7lLn55gAGSBEsxMLXGc+Ea6CQ4rutLqJHLkYFAbrZQAL7Kk7ODyiyHVmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWSwQ4VzczmZW for ; Wed, 17 Dec 2025 09:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c460 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 09:21:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 14d5c13a8926 - main - tests/ci: Collect environment information 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: 14d5c13a89269862b51ef2a7f190b0d28cfbf8a2 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 09:21:26 +0000 Message-Id: <69427616.3c460.6f282e9c@gitrepo.freebsd.org> The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=14d5c13a89269862b51ef2a7f190b0d28cfbf8a2 commit 14d5c13a89269862b51ef2a7f190b0d28cfbf8a2 Author: Muhammad Moinur Rahman AuthorDate: 2025-12-16 09:24:55 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2025-12-17 09:20:33 +0000 tests/ci: Collect environment information For reproducing errors or test results it is important to gather environment information. These environments are divided into two parts. One part is in which environment the artifacts were built into and the second part is in which environment the tests were run. This patch collects thesee information and saves into a .env file in the metadir. After this patch lands we will also need to change our jenkins job where we are uploading the artifact to a central location. This environment file should also be stored along with the artifact. For easier location the image basename and the environment basename are kept same. Approved by: lwhsu MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54247 --- tests/ci/Makefile | 43 +++++++++++++++++++++++++++++++++++- tests/ci/tools/freebsdci | 57 +++++++++++++++++++++++++++++------------------- 2 files changed, 77 insertions(+), 23 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 30ca34a810be..a750b1265169 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -82,6 +82,7 @@ KYUA_TEST_FILTERS?= META_TAR!=mktemp /tmp/meta.XXXXXX META_DIR!=mktemp -d /tmp/meta.XXXXXX META_DIROUT!=mktemp -d /tmp/meta.XXXXXX +ENV_FILE= ${META_DIR}/ci-${OSRELEASE}-${GITREV}-${KERNCONF}.env DISC_CAM!=truncate -s 128m /tmp/disk-cam EXTRA_DISK_NUM?=5 DISK_NUMBERS!=jot - 1 ${EXTRA_DISK_NUM} @@ -201,7 +202,47 @@ CITYPE=smoke ci-set-full-var: .PHONY CITYPE=full -ci-create-meta: .PHONY +ci-get-env: .PHONY + @echo "TARGET=${TARGET}" > ${ENV_FILE} + @echo "TARGET_ARCH=${TARGET_ARCH}" >> ${ENV_FILE} + @echo "KERNCONF=${KERNCONF}" >> ${ENV_FILE} + @echo "OSRELEASE=${OSRELEASE}" >> ${ENV_FILE} + @echo "CIIMAGE=${CIIMAGE}" >> ${ENV_FILE} + @echo "CIDISK=${CIDISK}" >> ${ENV_FILE} + @echo "VMSIZE=${VMSIZE}" >> ${ENV_FILE} + @echo "VM_MEM_SIZE=${VM_MEM_SIZE}" >> ${ENV_FILE} + @echo "TIMEOUT=${TIMEOUT}s" >> ${ENV_FILE} + @echo "CITYPE=${CITYPE}" >> ${ENV_FILE} + @echo "KYUA_TEST_FILTERS='${KYUA_TEST_FILTERS}'" >> ${ENV_FILE} + @echo "META_MODE='${METAMODE}'" >> ${ENV_FILE} + @echo "USE_QEMU='${USE_QEMU}'" >> ${ENV_FILE} + @echo "GITREV='${GITREV}'" >> ${ENV_FILE} + @echo "GITBRANCH='${GITBRANCH}'" >> ${ENV_FILE} + @echo "GITCOUNT='${GITCOUNT}'" >> ${ENV_FILE} + @echo "BUILDDATE='${BUILDDATE}'" >> ${ENV_FILE} + @echo "CC='${CC}'" >> ${ENV_FILE} + @echo "CFLAGS='${CFLAGS}'" >> ${ENV_FILE} + @echo "CPP='${CPP}'" >> ${ENV_FILE} + @echo "CXX='${CXX}'" >> ${ENV_FILE} + @echo "CXXFLAGS='${CXXFLAGS}'" >> ${ENV_FILE} + @echo "COMPILER_FEATURES='${COMPILER_FEATURES}'" >> ${ENV_FILE} + @echo "COMPILER_FREEBSD_VERSION='${COMPILER_FREEBSD_VERSION}'" >> ${ENV_FILE} + @echo "COMPILER_TYPE='${COMPILER_TYPE}'" >> ${ENV_FILE} + @echo "COMPILER_VERSION='${COMPILER_VERSION}'" >> ${ENV_FILE} + @echo "HOST_CC='${HOST_CC}'" >> ${ENV_FILE} + @echo "HOST_MACHINE='${HOST_MACHINE}'" >> ${ENV_FILE} + @echo "HOST_OS='${HOST_OS}'" >> ${ENV_FILE} + @echo "HOST_OSMAJOR='${HOST_OSMAJOR}'" >> ${ENV_FILE} + @echo "HOST_OSTYPE='${HOST_OSTYPE}'" >> ${ENV_FILE} + @echo "LD='${LD}'" >> ${ENV_FILE} + @echo "LDFLAGS='${LDFLAGS}'" >> ${ENV_FILE} + @echo "MACHINE='${MACHINE}'" >> ${ENV_FILE} + @echo "MACHINE_ABI='${MACHINE_ABI}'" >> ${ENV_FILE} + @echo "MACHINE_ARCH='${MACHINE_ARCH}'" >> ${ENV_FILE} + @echo "MACHINE_CPU='${MACHINE_CPU}'" >> ${ENV_FILE} + @echo "MACHINE_CPUARCH='${MACHINE_CPUARCH}'" >> ${ENV_FILE} + +ci-create-meta: ci-get-env .PHONY truncate -s 512M ${META_TAR} tar rvf ${META_TAR} -C ${META_DIR} . diff --git a/tests/ci/tools/freebsdci b/tests/ci/tools/freebsdci index 42c565a45055..f71ccc1cad4f 100755 --- a/tests/ci/tools/freebsdci +++ b/tests/ci/tools/freebsdci @@ -57,6 +57,27 @@ auto_shutdown() esac } +set_environment() +{ + if [ "${istar}" -eq 1 ]; then + rm -fr ${metadir} + mkdir -p ${metadir} + tar xvf ${tardev} -C ${metadir} + ci_env_file=$(set -- "${metadir}"/ci-*.env; \ + [ "$#" -eq 1 ] && printf '%s\n' "$1") + if [ -z "${ci_env_file}" ]; then + echo "ci: No CI environment file found in ${metadir}" + else + env >> "${ci_env_file}" + fi + else + echo "ERROR: no device with POSIX tar archive format found." + # Don't shutdown because this is not run in unattended mode + exit 1 + fi + +} + smoke_tests() { echo @@ -72,29 +93,19 @@ full_tests() echo "--------------------------------------------------------------" echo "BOOT sequence COMPLETED" echo "TEST sequence STARTED" - if [ "${istar}" -eq 1 ]; then - rm -fr ${metadir} - mkdir -p ${metadir} - tar xvf ${tardev} -C ${metadir} - cd /usr/tests - set +e - kyua \ - -v parallelism=${parallelism} \ - test ${freebsdci_test_filters} - rc=$? - set -e - if [ ${rc} -ne 0 ] && [ ${rc} -ne 1 ]; then - exit ${rc} - fi - kyua report --verbose --results-filter passed,skipped,xfail,broken,failed --output test-report.txt - kyua report-junit --output=test-report.xml - mv test-report.* /${metadir} - tar cvf ${tardev} -C ${metadir} . - else - echo "ERROR: no device with POSIX tar archive format found." - # Don't shutdown because this is not run in unattended mode - exit 1 + cd /usr/tests + set +e + kyua \ + -v parallelism=${parallelism} \ + test ${freebsdci_test_filters} + rc=$? + set -e + if [ ${rc} -ne 0 ] && [ ${rc} -ne 1 ]; then + exit ${rc} fi + kyua report --verbose --results-filter passed,skipped,xfail,broken,failed --output test-report.txt + kyua report-junit --output=test-report.xml + mv test-report.* /${metadir} echo "TEST sequence COMPLETED" echo "INITIATING system SHUTDOWN" echo "--------------------------------------------------------------" @@ -102,11 +113,13 @@ full_tests() firstboot_ci_run() { + set_environment if [ "$freebsdci_type" = "smoke" ]; then smoke_tests elif [ "$freebsdci_type" = "full" ]; then full_tests fi + tar cvf ${tardev} -C ${metadir} . auto_shutdown } From nobody Wed Dec 17 10:32:49 2025 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 4dWVVn3hW1z6KpVK for ; Wed, 17 Dec 2025 10:32: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVVn2pM5z3sNZ for ; Wed, 17 Dec 2025 10:32:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765967569; 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=BK1OWNo2+nw0yD1gXUE6jojhO2TMY1+VS1euEJorqVc=; b=iSRpDg1yRPanifYZwN76Zjb1QLsO5XGVBALvwk6uXgqGVGwdgftaBJRx7UqPw93Z0CFJ6W gEXp6VDb503jcreprXAYHgPdB5CKkDAFPosQbivz9NBlCTVTEHcHEscUwHNqcl1I0gM1/X WtC1y6W3XhBrewTtwrw8tpu1kvz8IOMeqfFD+iFs2AWWb4N2NawC3LqMwgnXkmdXHGnaxg IfZn+wZ3VVydswNp9/dx2qzoipczPWDds/w6FGEBa+G2jQVZJLJC0aie6ScP0vKE+n8Bjb rVLV7GYPU/R36Xg1n8vSlV+6m6nRMPgS/A+gVP2pwoUrgMms6F3TrBjKq6eCMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765967569; 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=BK1OWNo2+nw0yD1gXUE6jojhO2TMY1+VS1euEJorqVc=; b=ac5lJCNg1Wlh4bs+FHhLuiq+2BhnMKM2J7Yu8u4aRwpKbBVLVt54A9mCnUNqF+n2+rX0sY 0jYhA32ws+WuUizWQTGtDvMkgmJ9XDJ6yyK7sy7XIoLmSIYeLmqUYEM5VJjoucfyaq0fZ/ Od/EtmvpNI6MuFsvkzn3x0Eqzu3aCBlYXF1m7jJxxAQESxQ0QszC9D9On3m7nIJY66opJF AnDug3nn0x/zEss/ujYLImABitmjxcw8k7OtRas6xJJdbkB1DMUwtfP4n89GtOYR+JJqff 5789cYJx516bs3VpUQIU+B5kOeeYh/mT+TItPh/GwArO28JuOyUQA99ze7CJ+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765967569; a=rsa-sha256; cv=none; b=HPWGaBzR/WDMQnfvtMwu/6AUVcPZyKCs1XJQ+qd1xzIsbDTLaDxUtHWQ+NcsTAK6iNfXdg RpRAKd4rTJWNXdY2fGeFhOPEREeVBXXx/zjN0oBxemdXF4BG+Yr8oZMbFXPsMbIkzTKZNS oDu+CADQU8IvcyAH9fRnmhcBLDNuJtBWXZoLgS2LBkVCQ+b3WkznQnn9hHAIadOYWz5Xc6 qhF317n+Xh4C9uXlisjmWaIYErB4a4O+mc32reCcRU02zdxLb3q/aeyyc+aJrNwqClUT6R hbIFuI8iX6ZapO/nqQS0FXuq2LBOVTq8p0Ij6jnhm5zIqZfo3SFbRAAOv8Z8Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVVn2KQCzpLY for ; Wed, 17 Dec 2025 10:32:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b6d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:32:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 66d2816407c3 - main - tests/lorder_test: Add require.progs for nm and cc 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66d2816407c32a0da0f039c4edb4f19b280f9bb5 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:32:49 +0000 Message-Id: <694286d1.b6d9.41c56b9a@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=66d2816407c32a0da0f039c4edb4f19b280f9bb5 commit 66d2816407c32a0da0f039c4edb4f19b280f9bb5 Author: Siva Mahadevan AuthorDate: 2025-09-26 17:46:19 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:32:17 +0000 tests/lorder_test: Add require.progs for nm and cc Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1858 --- usr.bin/lorder/tests/Makefile | 2 ++ usr.bin/lorder/tests/lorder_test.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/usr.bin/lorder/tests/Makefile b/usr.bin/lorder/tests/Makefile index 21207f413a8d..a7920b82c90a 100644 --- a/usr.bin/lorder/tests/Makefile +++ b/usr.bin/lorder/tests/Makefile @@ -1,4 +1,6 @@ PACKAGE= tests ATF_TESTS_SH= lorder_test +TEST_METADATA+= required_programs="nm" + .include diff --git a/usr.bin/lorder/tests/lorder_test.sh b/usr.bin/lorder/tests/lorder_test.sh index a4276b2dcfe6..9c2db08e1718 100644 --- a/usr.bin/lorder/tests/lorder_test.sh +++ b/usr.bin/lorder/tests/lorder_test.sh @@ -16,6 +16,7 @@ noargs_body() { atf_test_case onearg onearg_head() { atf_set descr "One argument" + atf_set require.progs "cc" } onearg_body() { echo "void a(void) { }" >a.c @@ -28,6 +29,7 @@ onearg_body() { atf_test_case dashdash dashdash_head() { atf_set descr "One argument" + atf_set require.progs "cc" } dashdash_body() { echo "void a(void) { }" >a.c @@ -59,6 +61,7 @@ invalid_body() { atf_test_case objects objects_head() { atf_set descr "Order objects" + atf_set require.progs "cc" } objects_body() { echo "void a(void) { }" >a.c @@ -77,6 +80,7 @@ objects_body() { atf_test_case archives archives_head() { atf_set descr "Order archives" + atf_set require.progs "cc" } archives_body() { echo "void a(void) { }" >a.c From nobody Wed Dec 17 10:35:07 2025 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 4dWVYR288dz6Kp4y for ; Wed, 17 Dec 2025 10:35:07 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVYR1f63z3sm7 for ; Wed, 17 Dec 2025 10:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765967707; 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=uaicKLFFj5QS8ZMeEx1Gr6zCy7KKwrhepNyIIE7stfU=; b=w+b29tdneez/r96NNkBXAqfz1pmOYUk0MGmKUZm2+4teq2XrFT3s2rF7+XsWXdtUx8wStr Xmqp+1GPtI7rq7QieVfeDH83Lgz1aumbSiLmwcqtHYG9O+3g0Y/NGY/L/Fnt+5Uu+2KzJ6 vFT9/0ThdtCUcEMXpAN9mXkGQEVi7TsUwhcmW3E4fhfoEA6qIJR0dix/+Iaky0DXp4YB2U O8pXKRp9f28Nh2iDw3FaZE/ZkQG2VxdhbL/1bFciIf7LSzCMo4kBJE4E/4QJFbVJHijgVW 0KKhKuj5IFwdvKEPRSZuASLOptuu1TsFXOwe7sM4D9hEKnaeyXXFzE7kbTbJYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765967707; 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=uaicKLFFj5QS8ZMeEx1Gr6zCy7KKwrhepNyIIE7stfU=; b=bAVJkjgOlau6U42WMFSg0sGsNTYau77fkSpI7fVMK6+XLOzY2v/pNYQ7EVxiowK2S6PBf7 D/trXMxREt0FV0z9pRSoF/+QHTHQzMyp8TwHfhHwRFbcfSZmg10Iq8wXzh4Og+b/ORmR3y x4DWyq+Ldu14OeNGMC+3B/IzJxZsPH0XIDt/zvzYqTh94mWHl0fQ0mvNhIf5M8YBmHpXEN yLH/qxxcMW9ZyUwk1+9UCFBaRMHmkibX+Oc0uyibaAsFLbIuwI5+bMGYuzekt3Yds9Mln5 9tGG+378KFXyH3WrZnWT3FwVJ3sQ9Lktvi8p4idJPl5L6hftG9Tv8dYq9PFH3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765967707; a=rsa-sha256; cv=none; b=xLfLWHXkCzdAxLc+uD840tcH6CBqqUbJJqoM9FaM6cekiLoij1XQTjNQpg0fsDwA8RWQu1 6KMkpxrclRSmNWNqx/+YS2AvNQVui4eek7HeqfHwxMtHjkkHKrho/GWijN0mdOIt1QYujC 4S0cBw1HX0IpkHRjyKwxmR2/TSFMd2J9F32r3rtPCV/Cj8oVY60BgByinwqj8kx663HeUg GzQQowHGeCfgtOvQMM4pGw0FqGJA+Hv6cdgECFMVHVfz5Qsfnosxib43DBXRcq/TFQClzH 9wcDk4EH3yQBaitXHkoagYrUtBbH4UcKC/GQAlMjFcQhuIVOtHe0874WCFl78w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVYR0mF3zpYW for ; Wed, 17 Dec 2025 10:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9859 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:35:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 5a674a069483 - main - tests/lorder_test: Update test case description from copy/paste 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a674a0694836616eaaff448345823594742ad76 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:35:07 +0000 Message-Id: <6942875b.9859.5ff70e0e@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=5a674a0694836616eaaff448345823594742ad76 commit 5a674a0694836616eaaff448345823594742ad76 Author: Li-Wen Hsu AuthorDate: 2025-12-17 10:34:14 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:34:14 +0000 tests/lorder_test: Update test case description from copy/paste MFC after: 3 days Sponsored by: The FreeBSD Foundation --- usr.bin/lorder/tests/lorder_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/lorder/tests/lorder_test.sh b/usr.bin/lorder/tests/lorder_test.sh index 9c2db08e1718..ad3a23f5b126 100644 --- a/usr.bin/lorder/tests/lorder_test.sh +++ b/usr.bin/lorder/tests/lorder_test.sh @@ -28,7 +28,7 @@ onearg_body() { atf_test_case dashdash dashdash_head() { - atf_set descr "One argument" + atf_set descr "One argument with double dash" atf_set require.progs "cc" } dashdash_body() { From nobody Wed Dec 17 10:44:09 2025 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 4dWVls6Tl9z6KqM9 for ; Wed, 17 Dec 2025 10:44:09 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVls40MCz3ttH for ; Wed, 17 Dec 2025 10:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968249; 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=CVaq8+6op4PqSjNtIBOimNU0KcCsHDmuPjjPbsYWpNo=; b=QdWxnkN5A4NG7yzat8AFC4zyDqhL1RqEDKJwR4DeHfLP0KFwF1anlvEt1N7PpvtTc0z3cw bEiMtqpdhoY1yf7F6MttLhTS3FEXTkD7WEUouwwu9zHspEJxQIJZyj/YaRoOTx0zIh2bv+ oK0ES1zHVB7o43diXt18QbR13HF2juVifsyxZXUAKMkWMNDSv+MuTlIQUkKZksPYYt4Cf+ kCsm3iofzi8i3d8QdMOW3bETOgsdnURQTsrqF5fRjdYEKHmPBa73BNY4L27vJTVDCOEblT yAlk5jxhHnutdETDceK6YiV07Wd4QqUFm/dd/SSgCvcbM7l4+UyDONAAjUE9/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968249; 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=CVaq8+6op4PqSjNtIBOimNU0KcCsHDmuPjjPbsYWpNo=; b=rHNUI8r4PyPdskV+ue9jfDQgRJla+tfYUEGVS6Xd1a6IXfcDoNS02tSmCmlveH6s+CnPMY 1+WzVJnzWIPOLV1dlbsqi6q32eyciL1WTorQg0mcyCfVGHwel+tbk+sXyZqQg/0a3vg5YA O9dyFQd+NKRP54+dSC7xQIuooZwZoTfAXKNS8PpEhxjbikgXFql9c/lmmzztlb0u5d3Olg C7I6P31OkV4UnxJCIhyJC/eDB44gpF0KEsA8wvnT6Vli77fAJspET8B3p+pcDvrSBySxQy u2y9JhTRtIc+fHUqg4kIoeCmn6+xFOaCzcz0LYknpCrj6fBjbLJ9ECq+e1vI+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765968249; a=rsa-sha256; cv=none; b=abPfdNRdg2CrXWxdUYTeyamrSyPBvrbzzg8uUkNU1yF6BU9MRHR6HLFApoiNkGBx/lmHXH I9e1HroowKLobaoTEAgTsX0fJr2pxTzzTn/1VFOqBhRbI0fB9s+YVNoVSSIfpE+D3U9Rji JXCSM2VWGrPo6/o7z7WLLEcdeBEsXCWMPILqjnquh2gD6Ypxw5MiA2xgvdQDBB6eqyW7eI n5RnWbXC/5fwGj69H/k3nVtr0ytCvyDNxuIYAC82+DJx7ABXg70J+DXahDdQN7IWK68REq ncnhrJRiB0yKZc/adWxjpM1H4a2aKjZxb16ceNgCs9uuMbAFdYeNgPdPMLCmeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVls395fzpFT for ; Wed, 17 Dec 2025 10:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c5bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:44:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: d03c9b8f6624 - main - lib/msun/tests: Replace remaining printf() with debug() 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d03c9b8f662466537753056608d6a64d8c5513c3 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:44:09 +0000 Message-Id: <69428979.c5bd.773f4927@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=d03c9b8f662466537753056608d6a64d8c5513c3 commit d03c9b8f662466537753056608d6a64d8c5513c3 Author: Siva Mahadevan AuthorDate: 2025-10-08 21:04:28 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:42:53 +0000 lib/msun/tests: Replace remaining printf() with debug() Signed-off-by: Siva Mahadevan MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871 --- lib/msun/tests/ctrig_test.c | 6 +++--- lib/msun/tests/fma_test.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/msun/tests/ctrig_test.c b/lib/msun/tests/ctrig_test.c index ac1b79f2a1ce..2a5f8b5982b8 100644 --- a/lib/msun/tests/ctrig_test.c +++ b/lib/msun/tests/ctrig_test.c @@ -323,9 +323,9 @@ ATF_TC_BODY(test_axes, tc) test_odd_tol(csinhf, z, CMPLXL(sinhf(nums[i]), 0), FLT_ULP()); test_even_tol(ccoshf, z, CMPLXL(coshf(nums[i]), 0), FLT_ULP()); - printf("%a %a\n", creal(z), cimag(z)); - printf("%a %a\n", creal(ctanhf(z)), cimag(ctanhf(z))); - printf("%a\n", nextafterf(tanhf(nums[i]), INFINITY)); + debug("%a %a\n", creal(z), cimag(z)); + debug("%a %a\n", creal(ctanhf(z)), cimag(ctanhf(z))); + debug("%a\n", nextafterf(tanhf(nums[i]), INFINITY)); test_odd_tol(ctanhf, z, CMPLXL(tanhf(nums[i]), 0), 1.3 * FLT_ULP()); test_odd_tol(csinf, z, CMPLXL(sinf(nums[i]), diff --git a/lib/msun/tests/fma_test.c b/lib/msun/tests/fma_test.c index f1aa855df6f2..2cbfd6d6c296 100644 --- a/lib/msun/tests/fma_test.c +++ b/lib/msun/tests/fma_test.c @@ -472,7 +472,7 @@ ATF_TC_WITHOUT_HEAD(zeroes); ATF_TC_BODY(zeroes, tc) { for (size_t i = 0; i < nitems(rmodes); i++) { - printf("rmode = %d\n", rmodes[i]); + debug("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_zeroes(); } @@ -482,7 +482,7 @@ ATF_TC_WITHOUT_HEAD(infinities); ATF_TC_BODY(infinities, tc) { for (size_t i = 0; i < nitems(rmodes); i++) { - printf("rmode = %d\n", rmodes[i]); + debug("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_infinities(); } @@ -500,7 +500,7 @@ ATF_TC_WITHOUT_HEAD(small_z); ATF_TC_BODY(small_z, tc) { for (size_t i = 0; i < nitems(rmodes); i++) { - printf("rmode = %d\n", rmodes[i]); + debug("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_small_z(); } @@ -511,7 +511,7 @@ ATF_TC_WITHOUT_HEAD(big_z); ATF_TC_BODY(big_z, tc) { for (size_t i = 0; i < nitems(rmodes); i++) { - printf("rmode = %d\n", rmodes[i]); + debug("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); test_big_z(); } From nobody Wed Dec 17 10:44:10 2025 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 4dWVlv0Xk7z6KqJ7 for ; Wed, 17 Dec 2025 10:44: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVlt4LV9z3tZj for ; Wed, 17 Dec 2025 10:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968250; 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=XhatxQ1O7SiS/2aaA/lsEi1kUgGKNUgBlXU5KqK7w1o=; b=mPDIPHM0WLj/EM8ztPAcs9F+C57Z8IbGjYcXIfoE/V39zCeJQg9z90x10iZykDRkn/LK2z 6zyyS7YCKXKK/HROFQbddzB53+RKk8emlcCEFLSkq4SUU3DRh9v4vImNXVyFOgVcuPqjZa wKeYy2soUix+oIS4zcNoQ4QSjE+l4vjj2RQ1Mt/qWciNe3jJyX8Hqz+axBie049y+l/Rdm 8dMetRvL3dMbPc23JWdP8yOz4ULDDhYxw76Cqy6mLvlOMvg8Yo/9LetCZp/+MiSAwpGJTH lVDZVtQNkCsw0MeaoIFP342+o2yquVgyKIK1THXXeMe85/4DNarW/TBQhrvPcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968250; 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=XhatxQ1O7SiS/2aaA/lsEi1kUgGKNUgBlXU5KqK7w1o=; b=MOj9pvCS7o55jDwn/Ca7y5WKhc73JGtUwSwzqAuyS8EC596m5N7BQZ6n4ulNYNbKMb+62m pPD+YAYjAzhvzKni0LSSIERgFnG/2rMLMSuc0pCCKmHGfGxDbCvcFVukuIz0JU4yASx8Uz tPWFjCPp1RIbQvY/Tobv30ztieGF3GX9K8fhkKO0XMf1jcVm8i9dN19GtByov1yqiPu7e0 8fyrv1FNe3k8imWhtSoqIg3XKOioGKg2IoWFdAVvoMA3v/yTEE0uxaa6+FPPJQrzB2M64m lxBnCUED0oIBu+EAQHfUlF4liYAhR1LegbaNyBrUEc6bYYZdkZmKGofV1gTVFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765968250; a=rsa-sha256; cv=none; b=C1NnTswb6qh8BihyWi5sR9ePQcPOFbeCWOprpTfxh/tpIi4TfuRbOtctjRkJF/fz8YB7Hj AQkyQJI4akuhJ1jbNYzO6SClQhbH1NpMuCAMXvwOJnN2mgdnnWRI84uZ7k4eJ2TJM5DhbF qz6cTMkO1939rYedT4gOWI26Cwdwb2wOysL3Psnm659Z5x3PU6wik2HvgJFddTqPHN+/0k +zkX5kQes5+jPH2Nraafeye7b8wzPvQqoBaHUGasgoL8yzy8tTRzX579KGtL0bNVI+Hy3w Fmust79rSLdoeoFRN6WFKW5PbTl5mNw+Xcf9EaQ9zh8SUZ2+3VrA8g4DvWEMhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVlt3xP9zpFV for ; Wed, 17 Dec 2025 10:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c406 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:44:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: ec640742e302 - main - lib/msun/tests: Remove newlines in ATF msgs 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec640742e30270098f8d982c1c0838f2dfde9ad5 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:44:10 +0000 Message-Id: <6942897a.c406.229d0e1c@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=ec640742e30270098f8d982c1c0838f2dfde9ad5 commit ec640742e30270098f8d982c1c0838f2dfde9ad5 Author: Siva Mahadevan AuthorDate: 2025-10-01 15:13:08 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:43:06 +0000 lib/msun/tests: Remove newlines in ATF msgs This fixes broken test reports with the following message: lib/msun/fe_round_test:fe_round -> broken: Test result contains multiple lines: expected_failure: /usr/src/contrib/netbsd-tests/lib/libm/t_fe_round.c:95: Didn't get the same rounding mode out!<>(index 0) fed in 64 rounding mode, got 0 out<> [0.079s] Signed-off-by: Siva Mahadevan MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871 --- contrib/netbsd-tests/lib/libm/t_fe_round.c | 24 ++++++++++++------------ lib/msun/tests/fmaxmin_test.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/netbsd-tests/lib/libm/t_fe_round.c b/contrib/netbsd-tests/lib/libm/t_fe_round.c index 33da289eb156..a7ee3bf77b98 100644 --- a/contrib/netbsd-tests/lib/libm/t_fe_round.c +++ b/contrib/netbsd-tests/lib/libm/t_fe_round.c @@ -80,15 +80,15 @@ ATF_TC_BODY(fe_round, tc) received = lrint(values[i].input); ATF_CHECK_MSG( (labs(received - values[i].expected) < EPSILON), - "lrint rounding wrong, difference too large\n" - "input: %f (index %d): got %ld, expected %ld\n", + "lrint rounding wrong, difference too large. " + "input: %f (index %d): got %ld, expected %ld", values[i].input, i, received, values[i].expected); /* Do we get the same rounding mode out? */ ATF_CHECK_MSG( (fegetround() == values[i].round_mode), - "Didn't get the same rounding mode out!\n" - "(index %d) fed in %d rounding mode, got %d out\n", + "Didn't get the same rounding mode out!. " + "(index %d) fed in %d rounding mode, got %d out", i, values[i].round_mode, fegetround()); } } @@ -109,15 +109,15 @@ ATF_TC_BODY(fe_nearbyint, tc) received = nearbyint(values[i].input); ATF_CHECK_MSG( (fabs(received - values[i].expected) < EPSILON), - "nearbyint rounding wrong, difference too large\n" - "input: %f (index %d): got %f, expected %ld\n", + "nearbyint rounding wrong, difference too large. " + "input: %f (index %d): got %f, expected %ld", values[i].input, i, received, values[i].expected); /* Do we get the same rounding mode out? */ ATF_CHECK_MSG( (fegetround() == values[i].round_mode), - "Didn't get the same rounding mode out!\n" - "(index %d) fed in %d rounding mode, got %d out\n", + "Didn't get the same rounding mode out! " + "(index %d) fed in %d rounding mode, got %d out", i, values[i].round_mode, fegetround()); } } @@ -151,8 +151,8 @@ ATF_TC_BODY(fe_nextafter, tc) } ATF_CHECK_MSG( res && (fabs(received - values2[i].expected) < EPSILON), - "nextafter() rounding wrong, difference too large\n" - "input: %f (index %d): got %f, expected %f, res %d\n", + "nextafter() rounding wrong, difference too large. " + "input: %f (index %d): got %f, expected %f, res %d", values2[i].input, i, received, values2[i].expected, res); } } @@ -177,8 +177,8 @@ ATF_TC_BODY(fe_nexttoward, tc) } ATF_CHECK_MSG( res && (fabs(received - values2[i].expected) < EPSILON), - "nexttoward() rounding wrong, difference too large\n" - "input: %f (index %d): got %f, expected %f, res %d\n", + "nexttoward() rounding wrong, difference too large. " + "input: %f (index %d): got %f, expected %f, res %d", values2[i].input, i, received, values2[i].expected, res); } } diff --git a/lib/msun/tests/fmaxmin_test.c b/lib/msun/tests/fmaxmin_test.c index 51956b1084af..85a105a7f44f 100644 --- a/lib/msun/tests/fmaxmin_test.c +++ b/lib/msun/tests/fmaxmin_test.c @@ -50,7 +50,7 @@ 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\n", \ + #func "(%.20Lg, %.20Lg) rmode%d = %.20Lg, expected %.20Lg", \ (x), (y), rmode, __result, (expected)); \ } while (0) From nobody Wed Dec 17 10:44:11 2025 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 4dWVlv61Ndz6KqQh for ; Wed, 17 Dec 2025 10:44: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVlv4t98z3tZk for ; Wed, 17 Dec 2025 10:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968251; 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=1jYXIcwPrxI/jmGnVcl1+cqmdJYIhSSQLPqDKwiCfr4=; b=AEaQAPzkwX0tfgVJYLGtjzMCdiibCOpNH/ofZtBUnKmkPWGLByxGJ8FVBtd4WDpPntMz9G rZr5+G/09JE+1hbp7cX0rB+7/217cYTCdONFrd+PCtSlFgiBsLbB4FvpgTwHedf2vUrCZN /3Uu31ImvHm9Z9zWYvafgzeREgkpvwxvt39qeAWxB39GduqBtZsU1ExiiS1MvJ1dv/fVG3 f1/dIpra4FcgKXaATKpAs62Z263lLN1aYh6ZzDxj7tQ+uj3JUv6PxNQN6ZxmgDJv3xv9N3 eK32mN+6oBbq8TcI55SABny7jcK/hhKC270CsVSS6hJmHCl6RbuFJzXkd9wm/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968251; 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=1jYXIcwPrxI/jmGnVcl1+cqmdJYIhSSQLPqDKwiCfr4=; b=SfjUq/3lUyo6Af9Urdt+R59dj1pDyRgqBq5jga1V+aIWAyR6K7rr4ufb1KjDTVe0mkUAKi JVWEpap+dTFSukbFANcvjvCQ6H1uh1Tllj0cWkF5GMsUy3zgXivmoVrAgCV0ykN/j3p45f DFhBanISikeSXX0ekVjBB4NLd8QAD2vvsd6PZW5nzC0+5Ms0b2KuqbZzynggj4xPSOLEtb ZJOow/p5Tx0VqOUgCnMCj96bjkxYYjHgSiLdVPQUNEqEznYTSWst73jaxQLWwZNYnYV3wL PU8Om4x3ju2V/mYwNeOEyWF+UWPCYs8Q9bayIbSYDmSOd4FNZCdhN8Pr+heMNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765968251; a=rsa-sha256; cv=none; b=T1VsBtstmPOdrAZ3UTPMVN0p4ILeLrMQh0kNHbStDtCZsIVnuJat9XwFFrmxz67c2uc50O rfdp+5wKmypNBx3/1k8nUdSVlzupaK/1aSXf8aQ9Ij84XPEzNeQ8HStOKHYXnV2zlsJKkp 6NdDNw8inQvHG/5t7FKLNBGSOoV4sv5gW5mvQNjTikftNQBmHSiw1jeDM+czM6rH+uoTs+ tNOHX7H/tQEQ1rRw0SKn4Dca6EjJ1kfj7jWRNY6ihsnzgDPzmHpuuyc/ZTu9KI5LKl6Kxs PONECvSrw0N6Hz9t9SGVcuFUgH7vb/peah1Am+pmdkWjObAnjaod/i1+K+p0vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVlv4KC5zpW7 for ; Wed, 17 Dec 2025 10:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a266 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:44:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: a9b1650f90f4 - main - lib/msun/tests: Add REQUIRE_ variants of test-utils macros 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9b1650f90f4dbc62baa52b395082b1714b6cbf3 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:44:11 +0000 Message-Id: <6942897b.a266.62b75094@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=a9b1650f90f4dbc62baa52b395082b1714b6cbf3 commit a9b1650f90f4dbc62baa52b395082b1714b6cbf3 Author: Siva Mahadevan AuthorDate: 2025-10-08 20:38:47 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:43:14 +0000 lib/msun/tests: Add REQUIRE_ variants of test-utils macros Signed-off-by: Siva Mahadevan MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871 --- lib/msun/tests/test-utils.h | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/lib/msun/tests/test-utils.h b/lib/msun/tests/test-utils.h index 0a926551639c..984833605fe8 100644 --- a/lib/msun/tests/test-utils.h +++ b/lib/msun/tests/test-utils.h @@ -144,21 +144,20 @@ fpequal_tol(long double x, long double y, long double tol, return (ret); } -#define CHECK_FPEQUAL(x, y) CHECK_FPEQUAL_CS(x, y, true) - -#define CHECK_FPEQUAL_CS(x, y, checksign) do { \ +#define _fpequal_cs(atf_variant, x, y, checksign) do { \ long double _x = x; \ long double _y = y; \ - ATF_CHECK_MSG(fpequal_cs(_x, _y, checksign), \ + ATF_##atf_variant##_MSG(fpequal_cs(_x, _y, checksign), \ "%s (%.25Lg) ~= %s (%.25Lg)", #x, _x, #y, _y); \ } while (0) -#define CHECK_FPEQUAL_TOL(x, y, tol, flags) do { \ +#define _fpequal_tol(atf_variant, x, y, tol, flags) do { \ long double _x = x; \ long double _y = y; \ bool eq = fpequal_tol(_x, _y, tol, flags); \ long double _diff = eq ? 0.0L : fabsl(_x - _y); \ - ATF_CHECK_MSG(eq, "%s (%.25Lg) ~= %s (%.25Lg), diff=%Lg, maxdiff=%Lg,", \ + ATF_##atf_variant##_MSG(eq, \ + "%s (%.25Lg) ~= %s (%.25Lg), diff=%Lg, maxdiff=%Lg,", \ #x, _x, #y, _y, _diff, fabsl(_y * tol)); \ } while (0) @@ -170,32 +169,48 @@ cfpequal(long double complex d1, long double complex d2) fpequal_cs(cimagl(d1), cimagl(d2), true)); } -#define CHECK_CFPEQUAL_CS(x, y, checksign) do { \ +#define _cfpequal_cs(atf_variant, x, y, checksign) do { \ long double _x = x; \ long double _y = y; \ bool equal_cs = \ fpequal_cs(creal(_x), creal(_y), (checksign & CS_REAL) != 0) && \ fpequal_cs(cimag(_x), cimag(_y), (checksign & CS_IMAG) != 0); \ - ATF_CHECK_MSG(equal_cs, "%s (%Lg + %Lg I) ~= %s (%Lg + %Lg I)", \ + ATF_##atf_variant##_MSG(equal_cs, \ + "%s (%Lg + %Lg I) ~= %s (%Lg + %Lg I)", \ #x, creall(_x), cimagl(_x), #y, creall(_y), cimagl(_y)); \ } while (0) -#define CHECK_CFPEQUAL_TOL(x, y, tol, flags) do { \ +#define _cfpequal_tol(atf_variant, x, y, tol, flags) do { \ long double _x = x; \ long double _y = y; \ bool equal_tol = (fpequal_tol(creal(_x), creal(_y), tol, flags) && \ fpequal_tol(cimag(_x), cimag(_y), tol, flags)); \ - ATF_CHECK_MSG(equal_tol, "%s (%Lg + %Lg I) ~= %s (%Lg + %Lg I)", \ + ATF_##atf_variant##_MSG(equal_tol, \ + "%s (%Lg + %Lg I) ~= %s (%Lg + %Lg I)", \ #x, creall(_x), cimagl(_x), #y, creall(_y), cimagl(_y)); \ } while (0) -#define CHECK_FP_EXCEPTIONS(excepts, exceptmask) \ - ATF_CHECK_EQ_MSG((excepts), fetestexcept(exceptmask), \ - "unexpected exception flags: got %#x not %#x", \ +#define _fp_exceptions(atf_variant, excepts, exceptmask) \ + ATF_##atf_variant##_EQ_MSG((excepts), fetestexcept(exceptmask), \ + "unexpected exception flags: got %#x not %#x", \ fetestexcept(exceptmask), (excepts)) -#define CHECK_FP_EXCEPTIONS_MSG(excepts, exceptmask, fmt, ...) \ - ATF_CHECK_EQ_MSG((excepts), fetestexcept(exceptmask), \ +#define _fp_exceptions_msg(atf_variant, excepts, exceptmask, fmt, ...) \ + ATF_##atf_variant##_EQ_MSG((excepts), fetestexcept(exceptmask), \ "unexpected exception flags: got %#x not %#x " fmt, \ fetestexcept(exceptmask), (excepts), __VA_ARGS__) +#define CHECK_FP_EXCEPTIONS(excepts, exceptmask) _fp_exceptions(CHECK, excepts, exceptmask) +#define CHECK_FP_EXCEPTIONS_MSG(excepts, exceptmask, fmt, ...) _fp_exceptions_msg(CHECK, excepts, exceptmask, fmt, __VA_ARGS__) +#define CHECK_CFPEQUAL_TOL(x, y, tol, flags) _cfpequal_tol(CHECK, x, y, tol, flags) +#define CHECK_CFPEQUAL_CS(x, y, checksign) _cfpequal_cs(CHECK, x, y, checksign) +#define CHECK_FPEQUAL(x, y) _fpequal_cs(CHECK, x, y, true) +#define CHECK_FPEQUAL_TOL(x, y, tol, flags) _fpequal_tol(CHECK, x, y, tol, flags) + +#define REQUIRE_FP_EXCEPTIONS(excepts, exceptmask) _fp_exceptions(REQUIRE, excepts, exceptmask) +#define REQUIRE_FP_EXCEPTIONS_MSG(excepts, exceptmask, fmt, ...) _fp_exceptions_msg(REQUIRE, excepts, exceptmask, fmt, __VA_ARGS__) +#define REQUIRE_CFPEQUAL_TOL(x, y, tol, flags) _cfpequal_tol(REQUIRE, x, y, tol, flags) +#define REQUIRE_CFPEQUAL_CS(x, y, checksign) _cfpequal_cs(REQUIRE, x, y, checksign) +#define REQUIRE_FPEQUAL(x, y) _fpequal_cs(REQUIRE, x, y, true) +#define REQUIRE_FPEQUAL_TOL(x, y, tol, flags) _fpequal_tol(REQUIRE, x, y, tol, flags) + #endif /* _TEST_UTILS_H_ */ From nobody Wed Dec 17 10:44:12 2025 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 4dWVlx1jy9z6Kq8p for ; Wed, 17 Dec 2025 10:44: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVlw5p9Pz3tXD for ; Wed, 17 Dec 2025 10:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968252; 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=MGTGOFE34KbYkW96d6jn5Yth7Sc4CNnu6QlFB2COzrA=; b=unG34vQLMf5MR9u5MbEVpw9NWCsV67ZC/iAg1y+6TxB/P+vo9ynIFHCItgyw5Er5gLawL8 Ec18i/2/A/cuZ8HLbAxK/OqNrDuPhhfvOmWwdl8q0JiqX6u/4F+O0WkS3N69Gv0wmBqeN+ MphecrPLSU7eKL22fblNjVis22MEOGL7Puw0rvkrIggV2YuEAg+RkNMh16PyXku3U05XXi p1tyOCz3+m7pN6/h1C9Q2PO/D4COy6wosjksKDaH+qpYglMVGXHqF3r2RBOIyq19FOwEz/ A0oXP/ZwKl9YtCLjYOTl8QzL4Z9mX5C47Z57aQcsLmr9mH8DNrkzznATcUqoNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968252; 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=MGTGOFE34KbYkW96d6jn5Yth7Sc4CNnu6QlFB2COzrA=; b=KyROw8gdjIAvZsLAJjd/gKK4frTGbakq+veKHmLxTy8WMBtiMHAdlGDezjMJ3aUaBMfyF1 eWe3VEx3rIaK9QK92/tIXlfZKooR0iPMg2Wq8fXCeKOhSjT+7TMh1TRCIMR/sNoCgdsmv1 +VWSFI3M6zaAtSGrYq8w4aBfPbq3C4F7POTHKlgrBAyh//bHnX1Hvj9bQCTSnmXl+0Bc6E lHKfKj1O7ODqMK2hA97+egQTId6vSy4oXx9VgxaHpfHZcpBKU8M8OmeGhuveyGDgQaI68g iJauigMxrT1l5sl0k0c9cRvxaRSpvkHKLKxHuqkxtxhjAVZ5LhQRd1fhWGECug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765968252; a=rsa-sha256; cv=none; b=Xzk9ycSWRzcXqgmBpcaNaKa0kAYaP5/LTshj/umSPuCi6qQLurFK7BFgTzsvpwpFxKLWPt JAPN1xO1nVZcL0J7A0Oiz+nPbDdlTVBJj6hbn7V38R42HPt86wUD3cxbFmPps7BRXX5ALB rc8ok4GWiz6YxXKQ5vLSVFa2q8hh1PA1gZ5PeHJcDyH4JAAGlquc30LbNgvDYnK7LLgxSJ 49ej22cEBHFwG6nyXq3tFLz0T9HXMr9eCcScCXw9MKkxX6Vd0awCc/MGW9fbFE6Hufjx91 pfpLVFXn9q8QkcryxruHa6LCJze9AtuB9rgNYmyPFsc1p8EGJtqffnkIHU6KKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVlw54SSzptp for ; Wed, 17 Dec 2025 10:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c120 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:44:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 6c18c40b29fd - main - lib/msun/tests: xfail fe_round on riscv64 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c18c40b29fd5ac66230af34726260ce2d47aecd Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:44:12 +0000 Message-Id: <6942897c.c120.8b1d408@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=6c18c40b29fd5ac66230af34726260ce2d47aecd commit 6c18c40b29fd5ac66230af34726260ce2d47aecd Author: Siva Mahadevan AuthorDate: 2025-10-08 20:40:15 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:43:19 +0000 lib/msun/tests: xfail fe_round on riscv64 Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid unexpected aborts. Signed-off-by: Siva Mahadevan PR: 290099 MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871 --- contrib/netbsd-tests/lib/libm/t_fe_round.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/netbsd-tests/lib/libm/t_fe_round.c b/contrib/netbsd-tests/lib/libm/t_fe_round.c index a7ee3bf77b98..58d1dbfc0e37 100644 --- a/contrib/netbsd-tests/lib/libm/t_fe_round.c +++ b/contrib/netbsd-tests/lib/libm/t_fe_round.c @@ -72,20 +72,23 @@ ATF_TC_HEAD(fe_round, tc) ATF_TC_BODY(fe_round, tc) { +#if defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif long int received; for (unsigned int i = 0; i < __arraycount(values); i++) { fesetround(values[i].round_mode); received = lrint(values[i].input); - ATF_CHECK_MSG( + ATF_REQUIRE_MSG( (labs(received - values[i].expected) < EPSILON), "lrint rounding wrong, difference too large. " "input: %f (index %d): got %ld, expected %ld", values[i].input, i, received, values[i].expected); /* Do we get the same rounding mode out? */ - ATF_CHECK_MSG( + ATF_REQUIRE_MSG( (fegetround() == values[i].round_mode), "Didn't get the same rounding mode out!. " "(index %d) fed in %d rounding mode, got %d out", From nobody Wed Dec 17 10:44:13 2025 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 4dWVly2gnhz6KqJK for ; Wed, 17 Dec 2025 10:44: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVlx6GRDz3tny for ; Wed, 17 Dec 2025 10:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968253; 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=JU6sFhER4PnISbSlCBxJVWppU89+MEPsB7AUL9fLFag=; b=OuTc/Y4loQrfcRgR36cukkOCIRSxMJEBpmbGmklfUEvMeXCY+8TARXdXSrZVL++BIpZx26 +pbtEo8dINbRQvrWsxSn0IN6gh1S0nRR+vYLcS11KAkVpOwiDP515V2CWrPB+GZlPU7m+W V4YeERHOIBaLooO1K5KpHVzbr0YzHk0MsVJX7ACQ6YQ07wK7ag1lluw5IJZ8ZAUd1+HiiJ ow8AJMQU8uyPkDN7ghoWbRqWVHh+95Z1EYbI3wSv3pvDnejC4zG4sIXtc3bKfhu81XJBRg 5lB4izyA9BjRiwiVOeaWdH2Kscf+eoayEtDswucELduS//4U/Mf8kSf7l27LPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968253; 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=JU6sFhER4PnISbSlCBxJVWppU89+MEPsB7AUL9fLFag=; b=Mc57zYiPgWPGML+Ly6WfG5DjPUUxMtfNp5INEx83gOK+sP+SWtikMN2hq4y46NN206KMEX 1LH/wo+/9RA2Shq+OOls8XrlARsf6+2Pzule4Fni94g4JIB29TgoQzqKsfCs+sbPChz6h9 vrAqGZwfZf1mC3RQRg2rqIu+V1fORvn2MhpszRI2nz6nXCwUJC27htUMxu7Kh0TRroB45l fm6dX+l19k4g/vIXY4uj20LjgOPSvBtrkO+Lfj7QWiVDedJ0OZ4EFEL8/WCcZge/Rn8miB aMuBMVb7ZU+0GdqmwO87oYMypWjFty45nVVGXO0oBNwN1QCH74RktT/tLfbpKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765968253; a=rsa-sha256; cv=none; b=UbdYppyUvRWeP1QsZYTW2x1zDKg3X9aK+YRq9+W4RQlKVTbKiDPAi9X9CYV6mONUEkOEBt qHP2jt3whUbIatC3cBdEKM+AsZfVJNx/75cFcKMIehsJ/AROqMsZvu9ztN3RnIgC4uJUZ+ HFy7w3ufltcVRvKdsxmwgV8NLpHsA0lJ8h0kuGezutYqoFbfQBcu/a7ZD0LMZPLE8/AEm0 q5eixGIZFYUSsEMhyd+w0qoJCCcOdAlPTQs4tmvNLN6uKX7nykohojGTqiGo2OGtiOQ0GK IZamDDp3NNsUvimkEo3ilxnrIr9PTGoaXG/jEs1WtUalzJsafz7GEFx3JBEoKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVlx5qlHzpFW for ; Wed, 17 Dec 2025 10:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c294 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:44:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 5a0617454e37 - main - lib/msun/tests: xfail failing invtrig_test cases on non-x86 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a0617454e37c6a3df4106c24bd5ad20b338fe3a Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:44:13 +0000 Message-Id: <6942897d.c294.6e5e82dd@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=5a0617454e37c6a3df4106c24bd5ad20b338fe3a commit 5a0617454e37c6a3df4106c24bd5ad20b338fe3a Author: Siva Mahadevan AuthorDate: 2025-10-08 20:40:15 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:43:24 +0000 lib/msun/tests: xfail failing invtrig_test cases on non-x86 Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid unexpected abort. PR: 290099 MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871 --- lib/msun/tests/invtrig_test.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/msun/tests/invtrig_test.c b/lib/msun/tests/invtrig_test.c index 8c6fdb7c6e2f..76fbd33bf73e 100644 --- a/lib/msun/tests/invtrig_test.c +++ b/lib/msun/tests/invtrig_test.c @@ -52,8 +52,8 @@ #define test_tol(func, x, result, tol, excepts) do { \ volatile long double _in = (x), _out = (result); \ ATF_REQUIRE_EQ(0, feclearexcept(FE_ALL_EXCEPT)); \ - CHECK_FPEQUAL_TOL(func(_in), _out, (tol), CS_BOTH); \ - CHECK_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \ + REQUIRE_FPEQUAL_TOL(func(_in), _out, (tol), CS_BOTH); \ + REQUIRE_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \ #func, #x); \ } while (0) #define test(func, x, result, excepts) \ @@ -82,8 +82,8 @@ #define test2_tol(func, y, x, result, tol, excepts) do { \ volatile long double _iny = (y), _inx = (x), _out = (result); \ ATF_REQUIRE_EQ(0, feclearexcept(FE_ALL_EXCEPT)); \ - CHECK_FPEQUAL_TOL(func(_iny, _inx), _out, (tol), CS_BOTH); \ - CHECK_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \ + REQUIRE_FPEQUAL_TOL(func(_iny, _inx), _out, (tol), CS_BOTH); \ + REQUIRE_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \ #func, #x); \ } while (0) #define test2(func, y, x, result, excepts) \ @@ -125,7 +125,9 @@ sqrt2m1 = 4.14213562373095048801688724209698081e-01L; ATF_TC_WITHOUT_HEAD(special); ATF_TC_BODY(special, tc) { - +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/283017"); +#endif testall(asin, 0.0, 0.0, 0); testall(acos, 0.0, pi / 2, FE_INEXACT); testall(atan, 0.0, 0.0, 0); @@ -238,7 +240,9 @@ ATF_TC_BODY(special_atan2, tc) ATF_TC_WITHOUT_HEAD(accuracy); ATF_TC_BODY(accuracy, tc) { - +#if defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif /* We expect correctly rounded results for these basic cases. */ testall(asin, 1.0, pi / 2, FE_INEXACT); testall(acos, 1.0, 0, 0); @@ -276,7 +280,9 @@ ATF_TC_BODY(accuracy, tc) ATF_TC_WITHOUT_HEAD(p2x_atan2); ATF_TC_BODY(p2x_atan2, tc) { - +#if defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif testall2(atan2, 1.0, 1.0, pi / 4, FE_INEXACT); testall2(atan2, 1.0, -1.0, c3pi / 4, FE_INEXACT); testall2(atan2, -1.0, 1.0, -pi / 4, FE_INEXACT); @@ -299,6 +305,9 @@ ATF_TC_BODY(p2x_atan2, tc) ATF_TC_WITHOUT_HEAD(tiny); ATF_TC_BODY(tiny, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/283017"); +#endif float tiny = 0x1.23456p-120f; testall(asin, tiny, tiny, FE_INEXACT); @@ -436,6 +445,9 @@ tanatanl(long double x) ATF_TC_WITHOUT_HEAD(inverse); ATF_TC_BODY(inverse, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif float i; for (i = -1; i <= 1; i += 0x1.0p-12f) { From nobody Wed Dec 17 10:44:14 2025 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 4dWVlz39m1z6KqQr for ; Wed, 17 Dec 2025 10:44: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVlz0Bv9z3txB for ; Wed, 17 Dec 2025 10:44:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968255; 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=eSeLmW5qcYAqYMhmLmkFGs+pPcdJqr0HW9spKWBhSoA=; b=hJKTCoWrmGLBwVXGGHBNZ+jboiFCezAi8mar6+F7nqFqqqDfaj/Z58V2hKXn8rIAbNc6I9 3v8k5PFpYWrzRZc7TBOkYPXmH2PwrEjfOHLMvgx/iTL4E3csM43VIRkDUI5Q+HsnczvlJj hgJ/XcpN2PVvRCIWScjWy9ePefPiU5cpvoF6lrD2OOAgT4oyOfJDWp5ZtQYdg83rzDXXaD D560jkvYKft++ZXcoeagf7/zdyV4GQSQMIlvPngWAF8YknRgocIGIergudIdCh5sXczM10 I58c+gSuCo0XyMsuccK/PJbRqnymEdBvtUG8uJm1sB0V9tAzSymw6XJb2JB4Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968255; 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=eSeLmW5qcYAqYMhmLmkFGs+pPcdJqr0HW9spKWBhSoA=; b=HWwqe2LdVz83vDKolzRA7OtnKsmnpdqHPF+H9Paxy5QdndxLlmDtrgeNQ7XXytYNQB0vSh xOjTiEfIS2uKh1ztOZQplon1q6Ku+10neNgAEjKvX1fBW7RE8kitakS5aZEFRh7iJ8qQUF oEgHcJrrAtPUnqv7ot4k6KzOjGyonZ5Yvngl4ipGkT1nBRme0UTWEuPunarQ5o4JlI0H7X 41IJeo1e/Kl4IIgvnGqMfUNgxqInjyV663dtN/VzPZGJD6hewjzx09a/Gc1YKyfAwlDeH3 OD5CDjLCW3zc9i5gZQaTnRxyzw+++o0XR+UXuhRBy2N7Emo0Bzt2SEuSmuGVsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765968255; a=rsa-sha256; cv=none; b=TfVTMdaz43JUiD8gQuvKI48GqS+IcVVV74VofDzLyBQNCpLPHCamMOrwHSLJAsvfLm3G1Y BLspVbi09iHXh6UlT2PO1M+W9al9tot7jZLnzVw9CdvwNvUf27nbEnnwteUClNhFZVSZQO 4pAdvSN07KsyJBrGfcHIXfFWAI0M1xuPHYb5jP5p/i+YhSmseVg/eqZAOv5bPvGm4mSGe7 0Aq1xayTdiMU1D7rLJPfhwHUOqNmtiSJBqUsjIjnzkFKe+O+UKEVWKqwmqt/hLMSoplqEc g0kdKlvQmGHoKhiMQf1qb1EhPda6x3/D1Zu/MKKR7jDgysF2I7wHSC1HBGNtIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVly6cszzpWB for ; Wed, 17 Dec 2025 10:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c6a5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:44:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: de601d5bf5c6 - main - lib/msun/tests: xfail failing lrint_test cases on non-x86 archs 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de601d5bf5c6d2409134abc4638c7a0818cc896e Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:44:14 +0000 Message-Id: <6942897e.c6a5.142889f3@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=de601d5bf5c6d2409134abc4638c7a0818cc896e commit de601d5bf5c6d2409134abc4638c7a0818cc896e Author: Siva Mahadevan AuthorDate: 2025-10-08 20:40:15 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:43:32 +0000 lib/msun/tests: xfail failing lrint_test cases on non-x86 archs Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid unexpected aborts. Signed-off-by: Siva Mahadevan PR: 290099 MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871 --- lib/msun/tests/lrint_test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/msun/tests/lrint_test.c b/lib/msun/tests/lrint_test.c index 29ba82222642..a3f4225dc569 100644 --- a/lib/msun/tests/lrint_test.c +++ b/lib/msun/tests/lrint_test.c @@ -41,9 +41,9 @@ #include "test-utils.h" #define test(func, x, result, excepts) do { \ - ATF_CHECK(feclearexcept(FE_ALL_EXCEPT) == 0); \ + ATF_REQUIRE(feclearexcept(FE_ALL_EXCEPT) == 0); \ long long _r = (func)(x); \ - ATF_CHECK_MSG(_r == (result) || fetestexcept(FE_INVALID), \ + ATF_REQUIRE_MSG(_r == (result) || fetestexcept(FE_INVALID), \ #func "(%Lg) returned %lld, expected %lld", (long double)x, _r, \ (long long)(result)); \ CHECK_FP_EXCEPTIONS_MSG(excepts, FE_ALL_EXCEPT & ALL_STD_EXCEPT, \ @@ -131,6 +131,9 @@ run_tests(void) ATF_TC_WITHOUT_HEAD(lrint); ATF_TC_BODY(lrint, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif run_tests(); #ifdef __i386__ fpsetprec(FP_PE); From nobody Wed Dec 17 10:44:16 2025 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 4dWVm03G1mz6Kq91 for ; Wed, 17 Dec 2025 10:44: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWVm00stRz3v0Y for ; Wed, 17 Dec 2025 10:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968256; 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=DZaxI4Io6B+KIpvc0ID+amMB7wbrTgwvnliqNd0Xd28=; b=RE3KnlSZcijCPB6FP6iCJy1RTCBwzan5FyD/NBxzrmhhTa8UWgGqipmsJky+QKWc6ZjT7N Zef5q3mBgF2M29OBOWaYLSi1dPfkVhQLWzo8iemhlHASeoXVDiNEkq/kWl82ZboYyRC8DO FbB7ENyhTMlkUPvHlpmz9Y/waIpAreOyoOQNr8hZJPHoDW2fbX5K0F0brTvQi8Saw0GDPE H2uU4uYS4F3lcvB62JwNWjrTGqd7UxHgYTD8JUr3YYyHHGfyNFbA2dATiRzYVw1deKHxBE O5LrZYjNMhzgweH1cpqu1bJLdMVySei2i5JXxiyUoyzTH7YOpZN6m3IRsiH1DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765968256; 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=DZaxI4Io6B+KIpvc0ID+amMB7wbrTgwvnliqNd0Xd28=; b=beHogStmUMe1g1gkMqsnb9mV1ckJK+xQmxTseiggmgXH1HfeTDOQIM+ML3SZ3LF2f3a30y iV0D4GS2ed9Y/dvBzqa+CJHI8q1E7IUoAieydIb15qjfSwchdQpYgx0UWFDEV309wESAoB KHyPHfmCodrfTM4Z4UsA98Yv1v1XFkg9DwezcdF9+UJCADWY9eBKudPpSe7WrZwMqjNv+h v0rFV0mRkZikJG1VW+VtMmkpGJMVa+Y67BVFYrvxhX1PWe5uCyQC0hsTS8/jL7uvw4/asH Mn0wP/TgK7w1uy2URhfCj329+Jrw6vOreBWGWzqxno9MYK2lV0GkVV23Rih3Hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765968256; a=rsa-sha256; cv=none; b=K8QOwvTIvniYFvK91R6kGnrsLhn6Njc8SdCjArzW8PKwtY/QGfnzd17Tm/bLWJdqKNoJ2V Rj+AEkPKhi8SQLO4ZuU0MShRX0V2fuDjap0uEA/5QxpKv4HO4hkhS9pzZADMwMobYlVwwJ rkmdRiWe82c3bMeniWakp4WqMdSXvqhZxjErDuemPtLxXIFRbHz9XIaxCheioEZJPufFy0 q4SSybYItKlgg5MyFtxDMsoCoWn++/UG9HxcsKjMVa1/l/LbogNSK7UdEfqs9qNKj71edM P83hCmZpaVieYOOTEop+vin3tMKNnyFj++KhMDTv5VFbOfVGir6xduwfBCxoZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWVm00LGFzpFY for ; Wed, 17 Dec 2025 10:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a445 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 10:44:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Li-Wen Hsu Subject: git: 405188aeac54 - main - lib/msun/tests: xfail remaining failing tests on non-x86 archs 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 405188aeac540f7666dfde37c2f32d222119f56e Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 10:44:16 +0000 Message-Id: <69428980.a445.519760c4@gitrepo.freebsd.org> The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=405188aeac540f7666dfde37c2f32d222119f56e commit 405188aeac540f7666dfde37c2f32d222119f56e Author: Siva Mahadevan AuthorDate: 2025-10-08 20:40:15 +0000 Commit: Li-Wen Hsu CommitDate: 2025-12-17 10:43:37 +0000 lib/msun/tests: xfail remaining failing tests on non-x86 archs These are the remaining trivial xfail cases where no other test logic changes are necessary. Signed-off-by: Siva Mahadevan PR: 290099 MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871 --- lib/msun/tests/cexp_test.c | 3 +++ lib/msun/tests/ctrig_test.c | 9 +++++++++ lib/msun/tests/exponential_test.c | 3 +++ lib/msun/tests/fma_test.c | 9 +++++++++ lib/msun/tests/invctrig_test.c | 15 +++++++++++++++ lib/msun/tests/logarithm_test.c | 11 +++++++++-- lib/msun/tests/lround_test.c | 3 +++ lib/msun/tests/nan_test.c | 3 +++ lib/msun/tests/nearbyint_test.c | 3 +++ lib/msun/tests/next_test.c | 9 +++++++++ lib/msun/tests/trig_test.c | 4 +++- 11 files changed, 69 insertions(+), 3 deletions(-) diff --git a/lib/msun/tests/cexp_test.c b/lib/msun/tests/cexp_test.c index 35b23990a3f3..a32872958c42 100644 --- a/lib/msun/tests/cexp_test.c +++ b/lib/msun/tests/cexp_test.c @@ -232,6 +232,9 @@ ATF_TC_BODY(imaginaries, tc) ATF_TC_WITHOUT_HEAD(small); ATF_TC_BODY(small, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif static const double tests[] = { /* csqrt(a + bI) = x + yI */ /* a b x y */ diff --git a/lib/msun/tests/ctrig_test.c b/lib/msun/tests/ctrig_test.c index 2a5f8b5982b8..778612430c93 100644 --- a/lib/msun/tests/ctrig_test.c +++ b/lib/msun/tests/ctrig_test.c @@ -302,6 +302,9 @@ ATF_TC_HEAD(test_axes, tc) } ATF_TC_BODY(test_axes, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif static const long double nums[] = { M_PI / 4, M_PI / 2, 3 * M_PI / 4, 5 * M_PI / 4, 3 * M_PI / 2, 7 * M_PI / 4, @@ -365,6 +368,9 @@ ATF_TC_HEAD(test_small_inputs, tc) } ATF_TC_BODY(test_small_inputs, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif /* * z = 0.5 + i Pi/4 * sinh(z) = (sinh(0.5) + i cosh(0.5)) * sqrt(2)/2 @@ -432,6 +438,9 @@ ATF_TC_HEAD(test_large_inputs, tc) } ATF_TC_BODY(test_large_inputs, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif long double complex z; /* tanh() uses a threshold around x=22, so check both sides. */ diff --git a/lib/msun/tests/exponential_test.c b/lib/msun/tests/exponential_test.c index 9dc3b2698744..c3dcca869dcb 100644 --- a/lib/msun/tests/exponential_test.c +++ b/lib/msun/tests/exponential_test.c @@ -159,6 +159,9 @@ ATF_TC_BODY(exp2l, tc) ATF_TC_WITHOUT_HEAD(generic); ATF_TC_BODY(generic, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif run_generic_tests(); } diff --git a/lib/msun/tests/fma_test.c b/lib/msun/tests/fma_test.c index 2cbfd6d6c296..ec57fc34c1b1 100644 --- a/lib/msun/tests/fma_test.c +++ b/lib/msun/tests/fma_test.c @@ -121,6 +121,9 @@ test_zeroes(void) static void test_infinities(void) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif testall(INFINITY, 1.0, -1.0, INFINITY, ALL_STD_EXCEPT, 0); testall(-1.0, INFINITY, 0.0, -INFINITY, ALL_STD_EXCEPT, 0); testall(0.0, 0.0, INFINITY, INFINITY, ALL_STD_EXCEPT, 0); @@ -471,6 +474,9 @@ static const int rmodes[] = { ATF_TC_WITHOUT_HEAD(zeroes); ATF_TC_BODY(zeroes, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif for (size_t i = 0; i < nitems(rmodes); i++) { debug("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); @@ -481,6 +487,9 @@ ATF_TC_BODY(zeroes, tc) ATF_TC_WITHOUT_HEAD(infinities); ATF_TC_BODY(infinities, tc) { +#if defined(__powerpc64__) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif for (size_t i = 0; i < nitems(rmodes); i++) { debug("rmode = %d\n", rmodes[i]); fesetround(rmodes[i]); diff --git a/lib/msun/tests/invctrig_test.c b/lib/msun/tests/invctrig_test.c index 18d59e6f5416..8380557f02b6 100644 --- a/lib/msun/tests/invctrig_test.c +++ b/lib/msun/tests/invctrig_test.c @@ -123,6 +123,9 @@ c3pi = 9.42477796076937971538793014983850839L; ATF_TC_WITHOUT_HEAD(zero); ATF_TC_BODY(zero, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif long double complex zero = CMPLXL(0.0, 0.0); testall_tol(cacosh, zero, CMPLXL(0.0, pi / 2), 1); @@ -143,6 +146,9 @@ ATF_TC_BODY(zero, tc) ATF_TC_WITHOUT_HEAD(nan); ATF_TC_BODY(nan, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif long double complex nan_nan = CMPLXL(NAN, NAN); long double complex z; @@ -222,6 +228,9 @@ ATF_TC_BODY(nan, tc) ATF_TC_WITHOUT_HEAD(inf); ATF_TC_BODY(inf, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif long double complex z; /* @@ -269,6 +278,9 @@ ATF_TC_BODY(inf, tc) ATF_TC_WITHOUT_HEAD(axes); ATF_TC_BODY(axes, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif static const long double nums[] = { -2, -1, -0.5, 0.5, 1, 2 }; @@ -306,6 +318,9 @@ ATF_TC_BODY(axes, tc) ATF_TC_WITHOUT_HEAD(small); ATF_TC_BODY(small, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif /* * z = 0.75 + i 0.25 * acos(z) = Pi/4 - i ln(2)/2 diff --git a/lib/msun/tests/logarithm_test.c b/lib/msun/tests/logarithm_test.c index de80b5b45615..df1fcdc8627d 100644 --- a/lib/msun/tests/logarithm_test.c +++ b/lib/msun/tests/logarithm_test.c @@ -92,7 +92,9 @@ ATF_TC_WITHOUT_HEAD(generic_tests); ATF_TC_BODY(generic_tests, tc) { - +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif /* log(1) == 0, no exceptions raised */ testall0(1.0, 0.0, ALL_STD_EXCEPT, 0); testall1(0.0, 0.0, ALL_STD_EXCEPT, 0); @@ -179,6 +181,9 @@ ATF_TC_BODY(roundingmode_tests, tc) ATF_TC_WITHOUT_HEAD(accuracy_tests); ATF_TC_BODY(accuracy_tests, tc) { +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif static const struct { float x; long double log2x; @@ -248,7 +253,9 @@ ATF_TC_BODY(log1p_accuracy_tests, tc) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) atf_tc_expect_fail("https://bugs.freebsd.org/253984"); #endif - +#if defined(__riscv) + atf_tc_expect_death("https://bugs.freebsd.org/290099"); +#endif test_tol(log1pf, 0x0.333333p0F, 1.82321546859847114303367992804596800640e-1L, FLT_ULP()); test_tol(log1p, 0x0.3333333333333p0, diff --git a/lib/msun/tests/lround_test.c b/lib/msun/tests/lround_test.c index a61672617081..e22f59c323a2 100644 --- a/lib/msun/tests/lround_test.c +++ b/lib/msun/tests/lround_test.c @@ -65,6 +65,9 @@ ATF_TC_WITHOUT_HEAD(main); ATF_TC_BODY(main, tc) { +#if defined(__powerpc64__) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif testall(0.0, 0, 0); testall(0.25, 0, FE_INEXACT); testall(0.5, 1, FE_INEXACT); diff --git a/lib/msun/tests/nan_test.c b/lib/msun/tests/nan_test.c index 32c5c39af0c1..3dcea3f9e402 100644 --- a/lib/msun/tests/nan_test.c +++ b/lib/msun/tests/nan_test.c @@ -105,6 +105,9 @@ testnan(const char *nan_format) ATF_TC_WITHOUT_HEAD(nan); ATF_TC_BODY(nan, tc) { +#if defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif /* Die if a signalling NaN is returned */ feenableexcept(FE_INVALID); diff --git a/lib/msun/tests/nearbyint_test.c b/lib/msun/tests/nearbyint_test.c index 749c2bb23c99..fa1dc7d739be 100644 --- a/lib/msun/tests/nearbyint_test.c +++ b/lib/msun/tests/nearbyint_test.c @@ -152,6 +152,9 @@ test_modf(int testindex) ATF_TC_WITHOUT_HEAD(nearbyint); ATF_TC_BODY(nearbyint, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif unsigned i; for (i = 0; i < nitems(tests); i++) { diff --git a/lib/msun/tests/next_test.c b/lib/msun/tests/next_test.c index 282e47d783a0..a14b1ba433d9 100644 --- a/lib/msun/tests/next_test.c +++ b/lib/msun/tests/next_test.c @@ -79,6 +79,9 @@ static const long double ldbl_eps = LDBL_EPSILON; ATF_TC_WITHOUT_HEAD(zeros); ATF_TC_BODY(zeros, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif long double ldbl_small; #ifdef __i386__ @@ -164,6 +167,9 @@ ATF_TC_BODY(ordinary, tc) ATF_TC_WITHOUT_HEAD(boundaries); ATF_TC_BODY(boundaries, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif /* * Tests at word boundaries, normalization boundaries, etc. */ @@ -211,6 +217,9 @@ ATF_TC_BODY(boundaries, tc) ATF_TC_WITHOUT_HEAD(overflow); ATF_TC_BODY(overflow, tc) { +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif long double ldbl_max; /* * We can't use a compile-time constant here because gcc on diff --git a/lib/msun/tests/trig_test.c b/lib/msun/tests/trig_test.c index fe8c5298093a..494b5b10b64c 100644 --- a/lib/msun/tests/trig_test.c +++ b/lib/msun/tests/trig_test.c @@ -85,7 +85,9 @@ ATF_TC_HEAD(special, tc) } ATF_TC_BODY(special, tc) { - +#if defined(__aarch64__) || defined(__riscv) + atf_tc_expect_fail("https://bugs.freebsd.org/290099"); +#endif /* Values at 0 should be exact. */ testall(tan, 0.0, 0.0, ALL_STD_EXCEPT, 0); testall(tan, -0.0, -0.0, ALL_STD_EXCEPT, 0); From nobody Wed Dec 17 14:08:04 2025 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 4dWbH93CZlz6L9sX for ; Wed, 17 Dec 2025 14:08: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWbH85rVjz3JJg for ; Wed, 17 Dec 2025 14:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980484; 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=0vdb5/2ldDPLzSIZZN04EwAwKb5h7JF1vGS1DZBLJKE=; b=Yn/ag3hHbFU6H7SdFV4l9NGffyMQlmExREDqJjcVtRblvL6aCmXm9jA3OkeX/SSa0VcQEL LVdjR25cHrvcGUxgCaycSSiVi42yNUGorxct80zH/Vi6gs2qEy4cCkgjRUj9z4IcWt5k4+ h0caQwgsk3JTQdJgksfckoyV6UDaCtExMFkAGuxMcN+RKhaiJ1mOfbRsmJGQTGb6BdhvU5 XUMZ32nZI5cMyAMw5pypgWH6QIQ1BnRGpbj8FUYPCPZVLQjOi03tlB8I5P3I+ZN7mBZt3T GsDBWtnRPhH8SMGc7+0wyHw9bN2qSxZFt7zLgbJ7gNJcdvbZ5iEbTUPbIIgOqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980484; 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=0vdb5/2ldDPLzSIZZN04EwAwKb5h7JF1vGS1DZBLJKE=; b=m+BtcTVLEWK+/+9Z8NP3Z+wx3OHLVfqhJlcLvY2sXi6Ru5d5ypj1c2AdWBMULKtRD8hEPP svX/dWDRarYEbWvkrKkBGl14NHvAOUe1i9ZJ7cqN054t815hYQ6iO8WzqKzmgj22I/7sq1 PpIdg4pK7PLpbQ4DuAZ8FUoSa+zpUqc2uIewi39uJmPXjSFiK2LZmndiSdV+PgqpqV7fPc QeHg2W949rXkj6eqKTpN8oycRIN1hWN9sGUS5QnIh6Acq6HdQcAFaILrez88nwTn2hjm52 juYLkXcXXxZoAyas6pDyg4Q4qaNt9dJNszj2Skax8fLe3J+pU4PadIQWqmqx+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765980484; a=rsa-sha256; cv=none; b=Mh6b7P/aKAIBCcRRezDuBjlTzP7FmqEsEf11HTZMR4j5jqY+Mx8dji/izjn/qMH7GbQ46f 73cwR7m694P08UAF79+f8NT0G/pPQqQTfy+OED0/6gyJgG8taak5N8bCUX/TYOs28wt436 eSPn01zZvHnADTjYTUcjYuRFJhZe7JnQi4KngM0dMAWSFEP9u6BixHl6OXFp3WdgfJxWxY fAZ9vItuQ5JLjaXJzM49naFPUdVwbkvnKMlNtUxKCNKQv3ixalPbuA1Va3XwsBc7HjZcOi fz8G9W+i2yrUtSNmZw7fukhOqkuZB/dtAf14eazV5YBpzYwwCxWxqzu8t1+lDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWbH8365tzvbf for ; Wed, 17 Dec 2025 14:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37a53 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 14:08:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Siva Mahadevan From: Ed Maste Subject: git: 2812c917e040 - main - Cirrus-CI: Bump to FreeBSD 15.0-RELEASE 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: 2812c917e0405ed8ee28c3b38c8f5f9cd37ef400 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 14:08:04 +0000 Message-Id: <6942b944.37a53.98bad12@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2812c917e0405ed8ee28c3b38c8f5f9cd37ef400 commit 2812c917e0405ed8ee28c3b38c8f5f9cd37ef400 Author: Siva Mahadevan AuthorDate: 2025-12-16 14:50:48 +0000 Commit: Ed Maste CommitDate: 2025-12-17 14:06:59 +0000 Cirrus-CI: Bump to FreeBSD 15.0-RELEASE Signed-off-by: Siva Mahadevan Reviewed by: asomers Pull request: https://github.com/freebsd/freebsd-src/pull/1929 Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index b5c96820c192..1036a3d60ca1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,7 +4,7 @@ compute_engine_instance: # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images platform: freebsd image_project: freebsd-org-cloud-dev - image: freebsd-14-3-release-amd64-ufs + image: freebsd-15-0-release-amd64-ufs cpu: 8 memory: 8G disk: 40 From nobody Wed Dec 17 14:08:55 2025 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 4dWbJ723Lgz6L9yR for ; Wed, 17 Dec 2025 14:08: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWbJ71PlLz3JvT for ; Wed, 17 Dec 2025 14:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980535; 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=+YksOnLJjcmpnO3XqDPMYarodCXVfDVg81njEczNpPA=; b=ffRbcnrC73BVOmvCxoyAjWOkZ2MyoTBAuOGfZ68GjhGRWAoBSEJe6BRAByXWtvmT73h0rL koZxjnMMMGa+Pfv+BAg5J26c+QvmLLFVTUszXrE5afENyGP7Nb0hl8eIM94fY/qYPNsMns HeUQQ5eiJwQECLs9tZrDAQ4Xa+S2Fr1j1W8+TmZHaqXjYI9jOg/RJgrzJxlG5ognF7+6ut 4wzOwT7L6uT/BjSptPauwtv1iAL2EW6fals3yK0NdMa8jSEZ+sJyftgZkS7+3S1lJ+TXmZ MBSX5X/HbJHDDcG/NNtH+iK1Jloojolljpq2nzrnYVymuTdvkm7noyLm2doHEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980535; 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=+YksOnLJjcmpnO3XqDPMYarodCXVfDVg81njEczNpPA=; b=FzNiNtvFDE62sJyTA5l3lawv0SclGwECdGaomzE53WsDRhNz6NUM4ge3DQcSMkMEMDyvju DdvZE6nircP0jN7IGUFiel32bTnn5lMd1zjxVGZPl51GtUBXwh0EGgyXacxuBtE1oYDK6J 8zoUpuAvQlHYcJ2pnzvOsT+iE+0/uuE/GfOk2XaDPD01eXKI87Wp3SWbGUUNCLARNXQz+A aOmYak+6H87cWE78jQ1oK8RaCndZgaIptPTMVw2UwBql9j3c72VLDO0un6qqvT0060nxsC bxiJlGQZ6Sq4K/WY5bkhSfAHXufqOVvqS4c/IhOLi4DugsV8vd3QAzA4T8pekA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765980535; a=rsa-sha256; cv=none; b=jDa3LwvUJZq50YCzaLjUN2CB7T3eNX58Hap7OAjb8/BdnM96bQs1ID3n8IaCyK0pVAzv+S dp7tlKGJ3UAqfC6XatJygoV6CvFdhNLAKo+DFj28QsUEu+snkg/6Rp+yMP0v82wSQUicHo F/qLdlsAr7tzJ0Z09tp3SuyJxCNe3CtjXDhuw0oK2v7HUwZhN9a+F94WHGYtJxQo5d4CwJ LRk1HxgNyWbJB1mK7tzxxn0ZxRcJLCELUzV8CWpVTpTJ9hIrUrJijed+ThcIz3K3DvKP9i 4Xg2/ZjSwyCq62vLc9jnMvVEzwTM982F5f6z+nph2T6IezI5P5Y3K1tmDT2Hew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWbJ70j10zvbh for ; Wed, 17 Dec 2025 14:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 387dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 14:08:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: 1092ec8b3375 - main - kern: Introduce RLIMIT_VMM 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1092ec8b337595ed8d52accf41c6904d75b3689d Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 14:08:55 +0000 Message-Id: <6942b977.387dc.1bc32951@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=1092ec8b337595ed8d52accf41c6904d75b3689d commit 1092ec8b337595ed8d52accf41c6904d75b3689d Author: Bojan Novković AuthorDate: 2025-11-07 13:11:03 +0000 Commit: Bojan Novković CommitDate: 2025-12-17 14:08:31 +0000 kern: Introduce RLIMIT_VMM This change introduces a new per-UID limit for controlling the number of vmm instances, in anticipation of unprivileged bhyve. This allows ut to limit the amount of kernel memory allocated by the vmm driver and prevent potential memory exhaustion attacks. Differential Revision: https://reviews.freebsd.org/D53728 Reviewed by: markj, olce, corvink MFC after: 3 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. --- sys/dev/vmm/vmm_dev.c | 18 +++++++++++++++--- sys/kern/kern_resource.c | 13 +++++++++++++ sys/sys/resource.h | 4 +++- sys/sys/resourcevar.h | 2 ++ usr.bin/procstat/procstat_rlimit.c | 1 + 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index d6543bf6534e..3a86a8f966ef 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -96,6 +97,10 @@ u_int vm_maxcpu; SYSCTL_UINT(_hw_vmm, OID_AUTO, maxcpu, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &vm_maxcpu, 0, "Maximum number of vCPUs"); +u_int vm_maxvmms; +SYSCTL_UINT(_hw_vmm, OID_AUTO, maxvmms, CTLFLAG_RWTUN, + &vm_maxvmms, 0, "Maximum number of VMM instances per user"); + static void devmem_destroy(void *arg); static int devmem_create_cdev(struct vmmdev_softc *sc, int id, char *devmem); @@ -870,6 +875,7 @@ vmmdev_destroy(struct vmmdev_softc *sc) int error __diagused; KASSERT(sc->cdev == NULL, ("%s: cdev not free", __func__)); + KASSERT(sc->ucred != NULL, ("%s: missing ucred", __func__)); /* * Destroy all cdevs: @@ -898,8 +904,8 @@ vmmdev_destroy(struct vmmdev_softc *sc) if (sc->vm != NULL) vm_destroy(sc->vm); - if (sc->ucred != NULL) - crfree(sc->ucred); + chgvmmcnt(sc->ucred->cr_ruidinfo, -1, 0); + crfree(sc->ucred); sx_xlock(&vmmdev_mtx); SLIST_REMOVE(&head, sc, vmmdev_softc, link); @@ -1021,6 +1027,12 @@ vmmdev_create(const char *name, struct ucred *cred) vmmdev_destroy(sc); return (error); } + if (!chgvmmcnt(cred->cr_ruidinfo, 1, vm_maxvmms)) { + sx_xunlock(&vmmdev_mtx); + destroy_dev(cdev); + vmmdev_destroy(sc); + return (ENOMEM); + } sc->cdev = cdev; sx_xunlock(&vmmdev_mtx); return (0); @@ -1172,7 +1184,7 @@ vmm_handler(module_t mod, int what, void *arg) } if (vm_maxcpu == 0) vm_maxcpu = 1; - + vm_maxvmms = 4 * mp_ncpus; error = vmm_modinit(); if (error == 0) vmm_initialized = true; diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index dcd38c6e6fbe..31f89bd41f6d 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -895,6 +895,9 @@ getrlimitusage_one(struct proc *p, u_int which, int flags, rlim_t *res) case RLIMIT_PIPEBUF: *res = ui->ui_pipecnt; break; + case RLIMIT_VMM: + *res = ui->ui_vmmcnt; + break; default: error = EINVAL; break; @@ -1643,6 +1646,9 @@ uifree(struct uidinfo *uip) if (uip->ui_inotifywatchcnt != 0) printf("freeing uidinfo: uid = %d, inotifywatchcnt = %ld\n", uip->ui_uid, uip->ui_inotifywatchcnt); + if (uip->ui_vmmcnt != 0) + printf("freeing vmmcnt: uid = %d, vmmcnt = %ld\n", + uip->ui_uid, uip->ui_vmmcnt); free(uip, M_UIDINFO); } @@ -1763,6 +1769,13 @@ chginotifywatchcnt(struct uidinfo *uip, int diff, rlim_t max) "inotifywatchcnt")); } +int +chgvmmcnt(struct uidinfo *uip, int diff, rlim_t max) +{ + + return (chglimit(uip, &uip->ui_vmmcnt, diff, max, "vmmcnt")); +} + static int sysctl_kern_proc_rlimit_usage(SYSCTL_HANDLER_ARGS) { diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 2725aa1ef646..9e0635cdb328 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -115,8 +115,9 @@ struct __wrusage { #define RLIMIT_KQUEUES 13 /* kqueues allocated */ #define RLIMIT_UMTXP 14 /* process-shared umtx */ #define RLIMIT_PIPEBUF 15 /* pipes/fifos buffers */ +#define RLIMIT_VMM 16 /* virtual machines */ -#define RLIM_NLIMITS 16 /* number of resource limits */ +#define RLIM_NLIMITS 17 /* number of resource limits */ #define RLIM_INFINITY ((rlim_t)(((__uint64_t)1 << 63) - 1)) #define RLIM_SAVED_MAX RLIM_INFINITY @@ -144,6 +145,7 @@ static const char *rlimit_ident[] = { "kqueues", "umtx", "pipebuf", + "vmm", }; #endif diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h index 61411890c85b..d5c4561eec66 100644 --- a/sys/sys/resourcevar.h +++ b/sys/sys/resourcevar.h @@ -124,6 +124,7 @@ struct uidinfo { long ui_pipecnt; /* (b) consumption of pipe buffers */ long ui_inotifycnt; /* (b) number of inotify descriptors */ long ui_inotifywatchcnt; /* (b) number of inotify watches */ + long ui_vmmcnt; /* (b) number of vmm instances */ uid_t ui_uid; /* (a) uid */ u_int ui_ref; /* (b) reference count */ #ifdef RACCT @@ -148,6 +149,7 @@ int chgumtxcnt(struct uidinfo *uip, int diff, rlim_t maxval); int chgpipecnt(struct uidinfo *uip, int diff, rlim_t max); int chginotifycnt(struct uidinfo *uip, int diff, rlim_t maxval); int chginotifywatchcnt(struct uidinfo *uip, int diff, rlim_t maxval); +int chgvmmcnt(struct uidinfo *uip, int diff, rlim_t max); int kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, struct rlimit *limp); struct plimit diff --git a/usr.bin/procstat/procstat_rlimit.c b/usr.bin/procstat/procstat_rlimit.c index c34550295f05..f3132758e005 100644 --- a/usr.bin/procstat/procstat_rlimit.c +++ b/usr.bin/procstat/procstat_rlimit.c @@ -64,6 +64,7 @@ static struct { {"kqueues", " "}, {"umtxp", " "}, {"pipebuf", "B "}, + {"virtual-machines", " "}, }; _Static_assert(nitems(rlimit_param) == RLIM_NLIMITS, From nobody Wed Dec 17 14:08:56 2025 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 4dWbJ849Ynz6L9v0 for ; Wed, 17 Dec 2025 14:08: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWbJ81x6jz3Jhn for ; Wed, 17 Dec 2025 14:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980536; 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=/7FTsmdHhJ87bxka7oME8i3x45a174MSjrYXh4ZHcfs=; b=pv6IBzONvQggiJ5EosMBvSf7BYMuZ/e6DYujCat2IS6qDgvna34puWJeu7728lGWaUaQhh M0MRDEcrZMu0UkVbPUrMKE+OmX3hUFLXmv547YIAA9Mv9zT5b3YbtDrGWEOpqNtABjYGDX rcc4IernuvWTf86z2Ex8Nb39evjkHN2Uv+wxm5o0jJwISP2UA7/7p2ALUrPyIVTmIBr++y /C2mpWXO4NY2y9R9NnDV4U2CIIDu03aCnBtmemRfGsTcIDBpVj626/1aiNcxh0CpGVxY81 1R+qLv82RxGdsFL5RU8/uRxAgR7xRaIkR4SoljPuN+dhxv56tFOejOp3KXN26A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980536; 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=/7FTsmdHhJ87bxka7oME8i3x45a174MSjrYXh4ZHcfs=; b=vApmTG1SQaBxYX/1GvwgHZt9ruqatj04C6ATm3q23FfRdMtehlMAGrHlfv1rFiAAfwgvXL H6s7cPTW+paAXplAxbKpr2xrS5NmHg9SyZ2BSQqrYDhcyMT4HrQ/RCLrMQjswtF/vx3xR/ btrxiuKq/XS45emLEEmn7l0F66tCkDHWGrQ9V9r8zSlUjyVBxQBLczMcznVc966WkKhMQL Dkh5wsfxy85LBjV6ihzbYo45Ij01jXrMo0CkXL73hD22IVNxwVw47oR3bfgA2ptXUNvXfO 0c0lvwXv2nqugx/chCRNC9adZvpFyNdncXzlKia0vA88kdxBLniYjl1Jv8KV/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765980536; a=rsa-sha256; cv=none; b=EJ9EFbYvptw5uk/L/LuDqP+Snuf+LiWK0NOOSKp6bnAcONYPMr3UAT5XkYirXrbvQFVvsC kJ+niZ/w8RJa/UVjfikLK6ktuZkO5soDStLCiC/N73hcy8rA82tMFzEQKG1Nks/ovqOfAG DFnTvextiaqQHh6UTMAuaG7MszIhzo15Sw2jJ3gBP/730280trIZB/menhCtEU5CylCoK2 aR2dHu/JyDkNqGf76yiFiNt5rZQSZyNQlh5yzecuORGQ+p8LyB4M8I4cgQiYFS3dCQcyKC 2VBmf7vm3f9sHJb9rIjDBEK3+MoiMdalh8q4sQH1zDJ7dNtYyzOgzJWzPmaZNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWbJ81TNYzvMc for ; Wed, 17 Dec 2025 14:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38803 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 14:08:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: bd16bac27e7e - main - vmm: Add ability to destroy VMs on close 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd16bac27e7e0d31bccf88feca95cd98f0ef0fd4 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 14:08:56 +0000 Message-Id: <6942b978.38803.12597991@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=bd16bac27e7e0d31bccf88feca95cd98f0ef0fd4 commit bd16bac27e7e0d31bccf88feca95cd98f0ef0fd4 Author: Bojan Novković AuthorDate: 2025-11-06 14:26:27 +0000 Commit: Bojan Novković CommitDate: 2025-12-17 14:08:32 +0000 vmm: Add ability to destroy VMs on close This change adds the ability to tie a virtual machine's lifecycle to a /dev/vmmctl file descriptor. A user can request `vmmctl` to destroy a virtual machine on close using the `VMMCTL_CREATE_DESTROY_ON_CLOSE` flag when creating the virtual machine. `vmmctl` tracks such virtual machines in per-descriptor lists. Differential Revision: https://reviews.freebsd.org/D53729 Reviewed by: markj Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. MFC after: 3 months --- lib/libvmmapi/vmmapi.c | 8 ++++-- lib/libvmmapi/vmmapi.h | 1 + sys/dev/vmm/vmm_dev.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++--- sys/dev/vmm/vmm_dev.h | 6 +++- 4 files changed, 85 insertions(+), 8 deletions(-) diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 77f0f8f5c581..ede46dce73b3 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -100,11 +100,13 @@ vm_ctl_open(void) } static int -vm_ctl_create(const char *name, int ctlfd) +vm_ctl_create(const char *name, int flags, int ctlfd) { struct vmmctl_vm_create vmc; memset(&vmc, 0, sizeof(vmc)); + if ((flags & VMMAPI_OPEN_CREATE_DESTROY_ON_CLOSE) != 0) + vmc.flags |= VMMCTL_CREATE_DESTROY_ON_CLOSE; if (strlcpy(vmc.name, name, sizeof(vmc.name)) >= sizeof(vmc.name)) { errno = ENAMETOOLONG; return (-1); @@ -121,7 +123,7 @@ vm_create(const char *name) if (fd < 0) return (-1); - error = vm_ctl_create(name, fd); + error = vm_ctl_create(name, 0, fd); if (error != 0) { error = errno; (void)close(fd); @@ -162,7 +164,7 @@ vm_openf(const char *name, int flags) vm->fd = vm_device_open(vm->name); if (vm->fd < 0 && errno == ENOENT) { if (flags & VMMAPI_OPEN_CREATE) { - if (vm_ctl_create(vm->name, vm->ctlfd) != 0) + if (vm_ctl_create(vm->name, flags, vm->ctlfd) != 0) goto err; vm->fd = vm_device_open(vm->name); created = true; diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index b637c45d1eff..5d3495a128d9 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -115,6 +115,7 @@ int vm_create(const char *name); struct vmctx *vm_open(const char *name); #define VMMAPI_OPEN_CREATE 0x01 /* create if the VM does not exist */ #define VMMAPI_OPEN_REINIT 0x02 /* reinitialize the VM if it exists */ +#define VMMAPI_OPEN_CREATE_DESTROY_ON_CLOSE 0x04 /* Destroy the VM when closing vmm_ctl */ struct vmctx *vm_openf(const char *name, int flags); void vm_close(struct vmctx *ctx); void vm_destroy(struct vmctx *ctx); diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index 3a86a8f966ef..840e810a39fb 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -77,10 +77,15 @@ struct vmmdev_softc { struct cdev *cdev; struct ucred *ucred; SLIST_ENTRY(vmmdev_softc) link; + LIST_ENTRY(vmmdev_softc) priv_link; SLIST_HEAD(, devmem_softc) devmem; int flags; }; +struct vmmctl_priv { + LIST_HEAD(, vmmdev_softc) softcs; +}; + static bool vmm_initialized = false; static SLIST_HEAD(, vmmdev_softc) head; @@ -103,6 +108,7 @@ SYSCTL_UINT(_hw_vmm, OID_AUTO, maxvmms, CTLFLAG_RWTUN, static void devmem_destroy(void *arg); 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) @@ -909,7 +915,10 @@ vmmdev_destroy(struct vmmdev_softc *sc) sx_xlock(&vmmdev_mtx); SLIST_REMOVE(&head, sc, vmmdev_softc, link); + if ((sc->flags & VMMCTL_CREATE_DESTROY_ON_CLOSE) != 0) + LIST_REMOVE(sc, priv_link); sx_xunlock(&vmmdev_mtx); + wakeup(sc); free(sc, M_VMMDEV); } @@ -934,7 +943,7 @@ vmmdev_lookup_and_destroy(const char *name, struct ucred *cred) sc->cdev = NULL; sx_xunlock(&vmmdev_mtx); - vm_suspend(sc->vm, VM_SUSPEND_DESTROY); + (void)vm_suspend(sc->vm, VM_SUSPEND_DESTROY); destroy_dev(cdev); vmmdev_destroy(sc); @@ -987,17 +996,24 @@ vmmdev_alloc(struct vm *vm, struct ucred *cred) } static int -vmmdev_create(const char *name, struct ucred *cred) +vmmdev_create(const char *name, uint32_t flags, struct ucred *cred) { struct make_dev_args mda; struct cdev *cdev; struct vmmdev_softc *sc; + struct vmmctl_priv *priv; struct vm *vm; int error; if (name == NULL || strlen(name) > VM_MAX_NAMELEN) return (EINVAL); + if ((flags & ~VMMCTL_FLAGS_MASK) != 0) + return (EINVAL); + error = devfs_get_cdevpriv((void **)&priv); + if (error) + return (error); + sx_xlock(&vmmdev_mtx); sc = vmmdev_lookup(name, cred); if (sc != NULL) { @@ -1012,6 +1028,9 @@ vmmdev_create(const char *name, struct ucred *cred) } sc = vmmdev_alloc(vm, cred); SLIST_INSERT_HEAD(&head, sc, link); + sc->flags = flags; + if ((flags & VMMCTL_CREATE_DESTROY_ON_CLOSE) != 0) + LIST_INSERT_HEAD(&priv->softcs, sc, priv_link); make_dev_args_init(&mda); mda.mda_devsw = &vmmdevsw; @@ -1055,7 +1074,7 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) buf = malloc(buflen, M_VMMDEV, M_WAITOK | M_ZERO); error = sysctl_handle_string(oidp, buf, buflen, req); if (error == 0 && req->newptr != NULL) - error = vmmdev_create(buf, req->td->td_ucred); + error = vmmdev_create(buf, 0, req->td->td_ucred); free(buf, M_VMMDEV); return (error); } @@ -1064,10 +1083,53 @@ SYSCTL_PROC(_hw_vmm, OID_AUTO, create, NULL, 0, sysctl_vmm_create, "A", "Create a vmm(4) instance (legacy interface)"); +static void +vmmctl_dtor(void *arg) +{ + struct cdev *sc_cdev; + struct vmmdev_softc *sc; + struct vmmctl_priv *priv = arg; + + /* + * Scan the softc list for any VMs associated with + * the current descriptor and destroy them. + */ + sx_xlock(&vmmdev_mtx); + while (!LIST_EMPTY(&priv->softcs)) { + sc = LIST_FIRST(&priv->softcs); + sc_cdev = sc->cdev; + if (sc_cdev != NULL) { + sc->cdev = NULL; + } else { + /* + * Another thread has already + * started the removal process. + * Sleep until 'vmmdev_destroy' notifies us + * that the removal has finished. + */ + sx_sleep(sc, &vmmdev_mtx, 0, "vmmctl_dtor", 0); + continue; + } + /* + * Temporarily drop the lock to allow vmmdev_destroy to run. + */ + sx_xunlock(&vmmdev_mtx); + (void)vm_suspend(sc->vm, VM_SUSPEND_DESTROY); + destroy_dev(sc_cdev); + /* vmmdev_destroy will unlink the 'priv_link' entry. */ + vmmdev_destroy(sc); + sx_xlock(&vmmdev_mtx); + } + sx_xunlock(&vmmdev_mtx); + + free(priv, M_VMMDEV); +} + static int 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); if (error != 0) @@ -1076,6 +1138,14 @@ vmmctl_open(struct cdev *cdev, int flags, int fmt, struct thread *td) if ((flags & FWRITE) == 0) return (EPERM); + priv = malloc(sizeof(*priv), M_VMMDEV, M_WAITOK | M_ZERO); + LIST_INIT(&priv->softcs); + error = devfs_set_cdevpriv(priv, vmmctl_dtor); + if (error != 0) { + free(priv, M_VMMDEV); + return (error); + } + return (0); } @@ -1098,7 +1168,7 @@ vmmctl_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, } } - error = vmmdev_create(vmc->name, td->td_ucred); + error = vmmdev_create(vmc->name, vmc->flags, td->td_ucred); break; } case VMMCTL_VM_DESTROY: { diff --git a/sys/dev/vmm/vmm_dev.h b/sys/dev/vmm/vmm_dev.h index f14176c8afad..f8f637fda687 100644 --- a/sys/dev/vmm/vmm_dev.h +++ b/sys/dev/vmm/vmm_dev.h @@ -70,9 +70,13 @@ extern u_int vm_maxcpu; #endif /* _KERNEL */ +#define VMMCTL_CREATE_DESTROY_ON_CLOSE 0x1 +#define VMMCTL_FLAGS_MASK (VMMCTL_CREATE_DESTROY_ON_CLOSE) + struct vmmctl_vm_create { char name[VM_MAX_NAMELEN + 1]; - int reserved[16]; + uint32_t flags; + int reserved[15]; }; struct vmmctl_vm_destroy { From nobody Wed Dec 17 14:08:57 2025 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 4dWbJ94r51z6LB0x for ; Wed, 17 Dec 2025 14:08: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWbJ92xPyz3JqC for ; Wed, 17 Dec 2025 14:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980537; 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=HlHMXx8yUEU+lRPShSMCz7e1K4KJe6UDkofSzfeAml8=; b=J3/G29QU98N2PPDOig+g/6lGwE2vLXyHvVmz6syj8PxBaXRNXEIYZZI6/QQbe0+XZYJRtl JmV33lNNfKK5UQk3brDo0LnaC39QVl7NDLcna6jUMCwwmce5R4D8AaVKtYbEvoSBIUHkha NT4708tlxvxU1ybN/jO0LQKjsXXnm3ArdFOJfPxHky3mE5mUyLrtiOTKVh8dPWsJCyP/XW Aw8eFr2V6fYLJRgUBJ0+euhPowWkdjc8FlOrDz5RPRngVyNP7VIENkrak4rGfxXL5oOKlf Wzjs3zrszm0X7ZkJ1bsVjNRWiG8BaQqhVJsRElGtH7CNxhu3vq+Gp2H24UrriQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980537; 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=HlHMXx8yUEU+lRPShSMCz7e1K4KJe6UDkofSzfeAml8=; b=W/daIZsku9Xk5E0emEFyRLtTvSPAkFDs7ageUYG9YCO92vy+4H4cx5hMpkn55jrXjAI2jx KPaBgDuQvSyCLKim7f0DecMsyq/f1c9l4VUSF7LDf6BOBYJbvShodN9dalGLCIS6VMzNow 0yzT6tQYtWkbeb2xsmbAL6AGxIy9nebc3Ngagqu0yU+D6D2tuvtZw5vp5qtbyHjdLH7RyL X39t+3UCctsFe6uaK+brexzYAtQ6+uGNJqLj4hNCzITDbkIKywVTQcLYdtPY5o7Ces4ccW Kpnv9TngzZJ1UILusKZl345gD7uJUAuotiYHhTU5UnT0Jg/tAvVXPmKIAlJhwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765980537; a=rsa-sha256; cv=none; b=NSV3rfb7kVcCUvpKsPK7vns08NfG89iPO6HiOX28J4WfoZcw7XxPFS7LxjRrElvkxRwITd lGx8YT7Y4qPDqq0di14onzhuOBHgVmbkI65nWMIyEGLhRpGsYN8pQ1f9U39M/884SqLOAk hALd+TnJjRh3TE3Av36Ly5VkyvhHq1yGkJnwqX29uU4vekJqdkUuQ9BgAEp9XI55r+Y6yX 9oEw7szBJ1mfhREYWXnkoKPXlNwSb3DS8f4fR84pjjVAwi1OfRBtme75DouhA2Fq/alog4 SCdkYr9fA0JmW69jSTLo0K9QKFeKeU3ZcbMzQzjp4XqfDxANB4KD0zuc3pSLFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWbJ928TFzvWB for ; Wed, 17 Dec 2025 14:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38156 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 14:08:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: 3c0686082df8 - main - bhyve: Eliminate exit status magic numbers 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c0686082df824ef06b739253c032ab35723e251 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 14:08:57 +0000 Message-Id: <6942b979.38156.5811bb07@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=3c0686082df824ef06b739253c032ab35723e251 commit 3c0686082df824ef06b739253c032ab35723e251 Author: Bojan Novković AuthorDate: 2025-11-06 14:28:24 +0000 Commit: Bojan Novković CommitDate: 2025-12-17 14:08:32 +0000 bhyve: Eliminate exit status magic numbers bhyve's exit status codes indicate how the VM was terminated. Unfortunately, their meaning within the source code is somewhat unclear since they are only used as magic numbers. Fix this by defining exit status macros and using them to replace the magic numbers in exit(3) function calls. Differential Revision: https://reviews.freebsd.org/D53730 Reviewed by: markj, corvink, emaste Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. MFC after: 3 months --- usr.sbin/bhyve/aarch64/bhyverun_machdep.c | 2 +- usr.sbin/bhyve/aarch64/vmexit.c | 8 +++--- usr.sbin/bhyve/amd64/bhyverun_machdep.c | 8 +++--- usr.sbin/bhyve/amd64/fwctl.c | 2 +- usr.sbin/bhyve/amd64/vmexit.c | 10 +++---- usr.sbin/bhyve/bhyverun.c | 46 +++++++++++++++---------------- usr.sbin/bhyve/bhyverun.h | 10 +++++++ usr.sbin/bhyve/gdb.c | 2 +- usr.sbin/bhyve/mevent.c | 3 +- usr.sbin/bhyve/mevent_test.c | 9 +++--- usr.sbin/bhyve/riscv/bhyverun_machdep.c | 2 +- usr.sbin/bhyve/riscv/vmexit.c | 8 +++--- usr.sbin/bhyve/snapshot.c | 2 +- 13 files changed, 62 insertions(+), 50 deletions(-) diff --git a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c index 06fe85f96e0a..1d35f958ffb7 100644 --- a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c @@ -168,7 +168,7 @@ bhyve_optparse(int argc, char **argv) pci_print_supported_devices(); exit(0); } else if (pci_parse_slot(optarg) != 0) - exit(4); + exit(BHYVE_EXIT_ERROR); else break; case 'S': diff --git a/usr.sbin/bhyve/aarch64/vmexit.c b/usr.sbin/bhyve/aarch64/vmexit.c index 2457cbe76b5e..cab3125b9c52 100644 --- a/usr.sbin/bhyve/aarch64/vmexit.c +++ b/usr.sbin/bhyve/aarch64/vmexit.c @@ -115,15 +115,15 @@ vmexit_suspend(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) switch (how) { case VM_SUSPEND_RESET: - exit(0); + exit(BHYVE_EXIT_RESET); case VM_SUSPEND_POWEROFF: if (get_config_bool_default("destroy_on_poweroff", false)) vm_destroy(ctx); - exit(1); + exit(BHYVE_EXIT_POWEROFF); case VM_SUSPEND_HALT: - exit(2); + exit(BHYVE_EXIT_HALT); case VM_SUSPEND_DESTROY: - exit(4); + exit(BHYVE_EXIT_ERROR); default: fprintf(stderr, "vmexit_suspend: invalid reason %d\n", how); exit(100); diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index dad8f1e52e4e..4fd3c29bd86a 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -186,7 +186,7 @@ bhyve_optparse(int argc, char **argv) pci_print_supported_devices(); exit(0); } else if (pci_parse_slot(optarg) != 0) - exit(4); + exit(BHYVE_EXIT_ERROR); else break; case 'S': @@ -276,7 +276,7 @@ bhyve_init_vcpu(struct vcpu *vcpu) err = vm_get_capability(vcpu, VM_CAP_HALT_EXIT, &tmp); if (err < 0) { EPRINTLN("VM exit on HLT not supported"); - exit(4); + exit(BHYVE_EXIT_ERROR); } vm_set_capability(vcpu, VM_CAP_HALT_EXIT, 1); } @@ -288,7 +288,7 @@ bhyve_init_vcpu(struct vcpu *vcpu) err = vm_get_capability(vcpu, VM_CAP_PAUSE_EXIT, &tmp); if (err < 0) { EPRINTLN("SMP mux requested, no pause support"); - exit(4); + exit(BHYVE_EXIT_ERROR); } vm_set_capability(vcpu, VM_CAP_PAUSE_EXIT, 1); } @@ -300,7 +300,7 @@ bhyve_init_vcpu(struct vcpu *vcpu) if (err) { EPRINTLN("Unable to set x2apic state (%d)", err); - exit(4); + exit(BHYVE_EXIT_ERROR); } vm_set_capability(vcpu, VM_CAP_ENABLE_INVPCID, 1); diff --git a/usr.sbin/bhyve/amd64/fwctl.c b/usr.sbin/bhyve/amd64/fwctl.c index 76e2eaf67849..730a76382996 100644 --- a/usr.sbin/bhyve/amd64/fwctl.c +++ b/usr.sbin/bhyve/amd64/fwctl.c @@ -368,7 +368,7 @@ fwctl_request(uint32_t value) /* Verify size */ if (value < 12) { printf("msg size error"); - exit(4); + exit(BHYVE_EXIT_ERROR); } rinfo.req_size = value; rinfo.req_count = 1; diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c index 14f89563fd0f..fb64f9bbe1a8 100644 --- a/usr.sbin/bhyve/amd64/vmexit.c +++ b/usr.sbin/bhyve/amd64/vmexit.c @@ -409,17 +409,17 @@ vmexit_suspend(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) switch (how) { case VM_SUSPEND_RESET: - exit(0); + exit(BHYVE_EXIT_RESET); case VM_SUSPEND_POWEROFF: if (get_config_bool_default("destroy_on_poweroff", false)) vm_destroy(ctx); - exit(1); + exit(BHYVE_EXIT_POWEROFF); case VM_SUSPEND_HALT: - exit(2); + exit(BHYVE_EXIT_HALT); case VM_SUSPEND_TRIPLEFAULT: - exit(3); + exit(BHYVE_EXIT_TRIPLEFAULT); case VM_SUSPEND_DESTROY: - exit(4); + exit(BHYVE_EXIT_ERROR); default: EPRINTLN("vmexit_suspend: invalid reason %d", how); exit(100); diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index bfc0b949a75d..6190e0039c9d 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -477,7 +477,7 @@ set_vcpu_affinities(void) value = get_config_value_node(nvl, "cpus"); if (value == NULL) { EPRINTLN("Missing CPU set for domain %d", dom); - exit(4); + exit(BHYVE_EXIT_ERROR); } parse_cpuset(dom, value, &cpus); @@ -487,7 +487,7 @@ set_vcpu_affinities(void) EPRINTLN( "Unable to set vCPU %d affinity for domain %d: %s", cpu, dom, strerror(errno)); - exit(4); + exit(BHYVE_EXIT_ERROR); } } } @@ -504,7 +504,7 @@ set_vcpu_affinities(void) EPRINTLN( "Unable to set vCPU %d affinity for domain %d: %s", cpu, 0, strerror(errno)); - exit(4); + exit(BHYVE_EXIT_ERROR); } } } @@ -562,7 +562,7 @@ fbsdrun_start_thread(void *param) vm_loop(vi->ctx, vi->vcpu); /* We get here if the VM was destroyed asynchronously. */ - exit(4); + exit(BHYVE_EXIT_ERROR); } void @@ -596,7 +596,7 @@ fbsdrun_deletecpu(int vcpu) pthread_mutex_lock(&resetcpu_mtx); if (!CPU_ISSET(vcpu, &cpumask)) { EPRINTLN("Attempting to delete unknown cpu %d", vcpu); - exit(4); + exit(BHYVE_EXIT_ERROR); } CPU_CLR(vcpu, &cpumask); @@ -645,7 +645,7 @@ vm_loop(struct vmctx *ctx, struct vcpu *vcpu) if (exitcode >= VM_EXITCODE_MAX || vmexit_handlers[exitcode] == NULL) { warnx("vm_loop: unexpected exitcode 0x%x", exitcode); - exit(4); + exit(BHYVE_EXIT_ERROR); } rc = (*vmexit_handlers[exitcode])(ctx, vcpu, &vmrun); @@ -656,7 +656,7 @@ vm_loop(struct vmctx *ctx, struct vcpu *vcpu) case VMEXIT_ABORT: abort(); default: - exit(4); + exit(BHYVE_EXIT_ERROR); } } EPRINTLN("vm_run error %d, errno %d", error, errno); @@ -816,7 +816,7 @@ main(int argc, char *argv[]) if (error) { fprintf(stderr, "Failed to read checkpoint info from " "file: '%s'.\n", restore_file); - exit(1); + exit(BHYVE_EXIT_ERROR); } vmname = lookup_vmname(&rstate); if (vmname != NULL) @@ -833,7 +833,7 @@ main(int argc, char *argv[]) if (get_config_bool_default("config.dump", false)) { dump_config(); - exit(1); + exit(BHYVE_EXIT_POWEROFF); } calc_topology(); @@ -855,7 +855,7 @@ main(int argc, char *argv[]) if (guest_ncpus < 1) { fprintf(stderr, "Invalid guest vCPUs (%d)\n", guest_ncpus); - exit(1); + exit(BHYVE_EXIT_ERROR); } #endif @@ -864,7 +864,7 @@ main(int argc, char *argv[]) if (guest_ncpus > max_vcpus) { fprintf(stderr, "%d vCPUs requested but only %d available\n", guest_ncpus, max_vcpus); - exit(4); + exit(BHYVE_EXIT_ERROR); } bhyve_init_vcpu(bsp); @@ -898,17 +898,17 @@ main(int argc, char *argv[]) init_mem(guest_ncpus); init_bootrom(ctx); if (bhyve_init_platform(ctx, bsp) != 0) - exit(4); + exit(BHYVE_EXIT_ERROR); if (qemu_fwcfg_init(ctx) != 0) { fprintf(stderr, "qemu fwcfg initialization error\n"); - exit(4); + exit(BHYVE_EXIT_ERROR); } if (qemu_fwcfg_add_file("opt/bhyve/hw.ncpu", sizeof(guest_ncpus), &guest_ncpus) != 0) { fprintf(stderr, "Could not add qemu fwcfg opt/bhyve/hw.ncpu\n"); - exit(4); + exit(BHYVE_EXIT_ERROR); } /* @@ -917,11 +917,11 @@ main(int argc, char *argv[]) if (init_pci(ctx) != 0) { EPRINTLN("Device emulation initialization error: %s", strerror(errno)); - exit(4); + exit(BHYVE_EXIT_ERROR); } if (init_tpm(ctx) != 0) { EPRINTLN("Failed to init TPM device"); - exit(4); + exit(BHYVE_EXIT_ERROR); } /* @@ -946,37 +946,37 @@ main(int argc, char *argv[]) FPRINTLN(stdout, "Pausing pci devs..."); if (vm_pause_devices() != 0) { EPRINTLN("Failed to pause PCI device state."); - exit(1); + exit(BHYVE_EXIT_ERROR); } FPRINTLN(stdout, "Restoring vm mem..."); if (restore_vm_mem(ctx, &rstate) != 0) { EPRINTLN("Failed to restore VM memory."); - exit(1); + exit(BHYVE_EXIT_ERROR); } FPRINTLN(stdout, "Restoring pci devs..."); if (vm_restore_devices(&rstate) != 0) { EPRINTLN("Failed to restore PCI device state."); - exit(1); + exit(BHYVE_EXIT_ERROR); } FPRINTLN(stdout, "Restoring kernel structs..."); if (vm_restore_kern_structs(ctx, &rstate) != 0) { EPRINTLN("Failed to restore kernel structs."); - exit(1); + exit(BHYVE_EXIT_ERROR); } FPRINTLN(stdout, "Resuming pci devs..."); if (vm_resume_devices() != 0) { EPRINTLN("Failed to resume PCI device state."); - exit(1); + exit(BHYVE_EXIT_ERROR); } } #endif if (bhyve_init_platform_late(ctx, bsp) != 0) - exit(4); + exit(BHYVE_EXIT_ERROR); /* * Change the proc title to include the VM name. @@ -1018,5 +1018,5 @@ main(int argc, char *argv[]) */ mevent_dispatch(); - exit(4); + exit(BHYVE_EXIT_ERROR); } diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h index 0a7bbd72a19c..5e6c81d008b8 100644 --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -34,6 +34,16 @@ #define VMEXIT_CONTINUE (0) #define VMEXIT_ABORT (-1) +/* + * Exit status codes as described in the bhyve(8) manpage. + */ +#define BHYVE_EXIT_RESET 0 +#define BHYVE_EXIT_POWEROFF 1 +#define BHYVE_EXIT_HALT 2 +#define BHYVE_EXIT_TRIPLEFAULT 3 +#define BHYVE_EXIT_ERROR 4 +#define BHYVE_EXIT_SUSPEND 5 + extern int guest_ncpus; extern uint16_t cpu_cores, cpu_sockets, cpu_threads; diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 983e7deb61c9..c0e9a1547271 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -1105,7 +1105,7 @@ gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit) if (!gdb_active) { EPRINTLN("vm_loop: unexpected VMEXIT_DEBUG"); - exit(4); + exit(BHYVE_EXIT_ERROR); } vcpuid = vcpu_id(vcpu); pthread_mutex_lock(&gdb_lock); diff --git a/usr.sbin/bhyve/mevent.c b/usr.sbin/bhyve/mevent.c index dbcc39148ca1..e92ee416f342 100644 --- a/usr.sbin/bhyve/mevent.c +++ b/usr.sbin/bhyve/mevent.c @@ -55,6 +55,7 @@ #include #include +#include "bhyverun.h" #include "mevent.h" #define MEVENT_MAX 64 @@ -517,7 +518,7 @@ mevent_dispatch(void) ret = pipe(mevent_pipefd); if (ret < 0) { perror("pipe"); - exit(0); + exit(BHYVE_EXIT_ERROR); } #ifndef WITHOUT_CAPSICUM diff --git a/usr.sbin/bhyve/mevent_test.c b/usr.sbin/bhyve/mevent_test.c index 60aab4ad849a..9a1761d3ca9e 100644 --- a/usr.sbin/bhyve/mevent_test.c +++ b/usr.sbin/bhyve/mevent_test.c @@ -45,6 +45,7 @@ #include #include +#include "bhyverun.h" #include "mevent.h" #define TEST_PORT 4321 @@ -139,7 +140,7 @@ echoer(void *param) mev = mevent_add(fd, EVF_READ, echoer_callback, &sync); if (mev == NULL) { printf("Could not allocate echoer event\n"); - exit(4); + exit(BHYVE_EXIT_ERROR); } while (!pthread_cond_wait(&sync.e_cond, &sync.e_mt)) { @@ -197,7 +198,7 @@ acceptor(void *param) if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("cannot create socket"); - exit(4); + exit(BHYVE_EXIT_ERROR); } sin.sin_len = sizeof(sin); @@ -207,12 +208,12 @@ acceptor(void *param) if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { perror("cannot bind socket"); - exit(4); + exit(BHYVE_EXIT_ERROR); } if (listen(s, 1) < 0) { perror("cannot listen socket"); - exit(4); + exit(BHYVE_EXIT_ERROR); } (void) mevent_add(s, EVF_READ, acceptor_callback, NULL); diff --git a/usr.sbin/bhyve/riscv/bhyverun_machdep.c b/usr.sbin/bhyve/riscv/bhyverun_machdep.c index 8ee505e86679..f4c248ee662a 100644 --- a/usr.sbin/bhyve/riscv/bhyverun_machdep.c +++ b/usr.sbin/bhyve/riscv/bhyverun_machdep.c @@ -159,7 +159,7 @@ bhyve_optparse(int argc, char **argv) pci_print_supported_devices(); exit(0); } else if (pci_parse_slot(optarg) != 0) - exit(4); + exit(BHYVE_EXIT_ERROR); else break; case 'S': diff --git a/usr.sbin/bhyve/riscv/vmexit.c b/usr.sbin/bhyve/riscv/vmexit.c index 985f8e4e9065..29afdcc25352 100644 --- a/usr.sbin/bhyve/riscv/vmexit.c +++ b/usr.sbin/bhyve/riscv/vmexit.c @@ -114,15 +114,15 @@ vmexit_suspend(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun) switch (how) { case VM_SUSPEND_RESET: - exit(0); + exit(BHYVE_EXIT_RESET); case VM_SUSPEND_POWEROFF: if (get_config_bool_default("destroy_on_poweroff", false)) vm_destroy(ctx); - exit(1); + exit(BHYVE_EXIT_POWEROFF); case VM_SUSPEND_HALT: - exit(2); + exit(BHYVE_EXIT_HALT); case VM_SUSPEND_DESTROY: - exit(4); + exit(BHYVE_EXIT_ERROR); default: fprintf(stderr, "vmexit_suspend: invalid reason %d\n", how); exit(100); diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index eabe6ab47f80..5b941984c0c0 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -1308,7 +1308,7 @@ vm_checkpoint(struct vmctx *ctx, int fddir, const char *checkpoint_file, if (stop_vm) { vm_destroy(ctx); - exit(5); + exit(BHYVE_EXIT_SUSPEND); } done: From nobody Wed Dec 17 14:08:58 2025 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 4dWbJB5xydz6LB0y for ; Wed, 17 Dec 2025 14:08: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWbJB3Q4Xz3JvX for ; Wed, 17 Dec 2025 14:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980538; 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=evnXP4DBqo/nG5KSFmBPozvr16stAzJp9yAChSD2MGc=; b=e+4w1PEWJhJkHf55O4o7JuoscVKZhG2DTTtCpzrrbHPVUBLJAWRDrHnCIdv/chrx3aSL3N BWg81F9he1NE9uWqj85r/X2KCGBkNb1S4Aw/5tiQWcGIs6hRdWMXzbKyehUb2Akv4yfW7a oH5QXqaDtXxKlcnZwW+fxJgO29tHbFy9U+pxzN8V3drNRwnIi9jQQhEeVBX9yrJnQ1PcMG IrVCkmmzRR+SMyWyF0H9NvP4+1p7pbfn8SibVlQP4I9AlEFLVy4Y4hMt1RM5dnQp2Qcwl5 I/6iOUKNhsLjbjee1/dACBuTe15pCdnr1/kOr+TtpgHR6X5sOS9uEU4Vl4fshQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765980538; 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=evnXP4DBqo/nG5KSFmBPozvr16stAzJp9yAChSD2MGc=; b=JkNOdrANhijLR94yD0KQ3M8g3RkEok0etpa3csRiBcXpjKQbpU/1dlc2RaXmL3BY/7uz/m /PDt9VWed1JxON+QuF6xx+vgxX/krYve957tfEmnHHQg4PiXjnqXG/mSwOOII1zkgzccFl 3vyXsU6/CZNuyGm8pXmtqbRRF6zLsXOrox6g3U+JOAMaIW7qZdwMi02N/5OKLk87TksrNi hyyqXwsoYTPu5vaodXcy5fR/RgwIafEmkla5rlmV0+SsU1DdNI3Wk6WJAmNE2e3C13VZ7D 4TObWOw+3Zzd6wM23GAc5IMO9uYoDXH4BLgGRP3btCpyEp2kBtwGm6UNp/1dwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765980538; a=rsa-sha256; cv=none; b=RLsiO4BAGxfKMvKq8NyzWVNY2Z0wVx4yGtgq/qrX5/t1XyYkxdThS8nx6aO2SUFdzUtG3V erlyI0zaGIotD8WdGI6KZvSINXuBOGSxccMJzlxVEGm9USjD9pd42mNZcEp32Qktv94WNc jxjB8H6128pzNKlIrMV320boRxOAw/p4S/YVafpD2tcNxdxwwc3VZ4ibaIcso4QDbP2wST uorW4YB6UtstlwWdmZSepiG3hRVypvC5XjpZ4virw16/l2GSuunFOTbu1ABEzSTuyYPJ41 CmngjOPVDRZF1cpWNXSmiOykoLZPwULPi+gbWYOCjsDd224ReIc+jgIj43w+JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWbJB2jnBzvWC for ; Wed, 17 Dec 2025 14:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 372b0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 14:08:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: f892c97b6109 - main - bhyve: Introduce monitor mode 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f892c97b6109639b8b03dfbccd4190389a88b067 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 14:08:58 +0000 Message-Id: <6942b97a.372b0.5f3336a1@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=f892c97b6109639b8b03dfbccd4190389a88b067 commit f892c97b6109639b8b03dfbccd4190389a88b067 Author: Bojan Novković AuthorDate: 2025-11-06 14:28:47 +0000 Commit: Bojan Novković CommitDate: 2025-12-17 14:08:32 +0000 bhyve: Introduce monitor mode This change introduces "monitor mode", a mechanism for automatically releasing virtual machine resources when bhyve dies, bringing us closer towards making non-root bhyve viable. Under this regime bhyve will create a transient virtual machine using `vmmctl`'s `VMMCTL_CREATE_DESTROY_ON_CLOSE` flag and automatically reboot said virtual machine as long as it exits with "reboot" status. This is done by splitting bhyve into two processes. The parent process creates the virtual machine while the child process initializes and runs the virtual machine. When the child exits the parent inspects its exit status and either exits or forks again. `vmmctl` automatically destroys the underlying virtual machine once the parent process dies. Differential Revision: https://reviews.freebsd.org/D53731 Reviewed by: markj Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. MFC after: 3 months --- usr.sbin/bhyve/aarch64/bhyverun_machdep.c | 6 ++- usr.sbin/bhyve/amd64/bhyverun_machdep.c | 8 ++- usr.sbin/bhyve/bhyve.8 | 12 ++++- usr.sbin/bhyve/bhyverun.c | 82 +++++++++++++++++++++++-------- usr.sbin/bhyve/riscv/bhyverun_machdep.c | 6 ++- 5 files changed, 87 insertions(+), 27 deletions(-) diff --git a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c index 1d35f958ffb7..e099df0559a1 100644 --- a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c @@ -107,6 +107,7 @@ bhyve_usage(int code) " -G: start a debug server\n" " -h: help\n" " -k: key=value flat config file\n" + " -M: monitor mode\n" " -m: memory size\n" " -o: set config 'var' to 'value'\n" " -p: pin 'vcpu' to 'hostcpu'\n" @@ -125,7 +126,7 @@ bhyve_optparse(int argc, char **argv) const char *optstr; int c; - optstr = "hCDSWk:f:o:p:G:c:s:m:U:"; + optstr = "hCDMSWk:f:o:p:G:c:s:m:U:"; while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { case 'c': @@ -149,6 +150,9 @@ bhyve_optparse(int argc, char **argv) case 'm': set_config_value("memory.size", optarg); break; + case 'M': + set_config_bool("monitor", true); + break; case 'o': if (!bhyve_parse_config_option(optarg)) { errx(EX_USAGE, diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index 4fd3c29bd86a..538d031fd1a4 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -90,6 +90,7 @@ bhyve_usage(int code) " -k: key=value flat config file\n" " -K: PS2 keyboard layout\n" " -l: LPC device configuration\n" + " -M: monitor mode\n" " -m: memory size\n" " -n: NUMA domain specification\n" " -o: set config 'var' to 'value'\n" @@ -118,9 +119,9 @@ bhyve_optparse(int argc, char **argv) int c; #ifdef BHYVE_SNAPSHOT - optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:n:l:K:U:r:"; + optstr = "aehuwxACDHIMPSWYk:f:o:p:G:c:s:m:n:l:K:U:r:"; #else - optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:n:l:K:U:"; + optstr = "aehuwxACDHIMPSWYk:f:o:p:G:c:s:m:n:l:K:U:"; #endif while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { @@ -195,6 +196,9 @@ bhyve_optparse(int argc, char **argv) case 'm': set_config_value("memory.size", optarg); break; + case 'M': + set_config_bool("monitor", true); + break; case 'n': if (bhyve_numa_parse(optarg) != 0) errx(EX_USAGE, diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 0893b0b719bc..7be1f7447adc 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 4, 2025 +.Dd December 17, 2025 .Dt BHYVE 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd "run a guest operating system inside a virtual machine" .Sh SYNOPSIS .Nm -.Op Fl aCDeHhPSuWwxY +.Op Fl aCDeHhMPSuWwxY .Oo .Sm off .Fl c\~ @@ -273,6 +273,14 @@ or to indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes. If no suffix is given, the value is assumed to be in megabytes. The default is 256M. +.It Fl M +Run the VM in +.Ql monitor +mode. +In this mode, a guest reboot does not cause the bhyve process to exit. +Instead, bhyve will restart the VM. +Once the bhyve process exits or is killed, the VM will be destroyed automatically. +The underlying virtual machine is automatically destroyed when the bhyve process exits. .Pp .It Fl n Ar id Ns Cm \&, Ns Ar size Ns Cm \&, Ns Ar cpus Ns Op Cm \&, Ns Ar domain_policy Configure guest NUMA domains. diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 6190e0039c9d..9db62972467c 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -41,6 +41,7 @@ #ifdef BHYVE_SNAPSHOT #include #endif +#include #include @@ -687,9 +688,10 @@ static struct vmctx * do_open(const char *vmname) { struct vmctx *ctx; - int error; - bool romboot; + int error, flags; + bool romboot, monitor; + monitor = get_config_bool_default("monitor", false); romboot = bootrom_boot(); /* @@ -702,7 +704,10 @@ do_open(const char *vmname) err(4, "vm_openf"); if (!romboot) errx(4, "no bootrom was configured"); - ctx = vm_openf(vmname, VMMAPI_OPEN_CREATE); + flags = VMMAPI_OPEN_CREATE; + if (monitor) + flags |= VMMAPI_OPEN_CREATE_DESTROY_ON_CLOSE; + ctx = vm_openf(vmname, flags); if (ctx == NULL) err(4, "vm_openf"); } @@ -792,7 +797,7 @@ bhyve_parse_gdb_options(const char *opt) int main(int argc, char *argv[]) { - int error; + int error, status; int max_vcpus, memflags; struct vcpu *bsp; struct vmctx *ctx; @@ -859,6 +864,58 @@ main(int argc, char *argv[]) } #endif + calc_mem_affinity(memsize); + memflags = 0; + if (get_config_bool_default("memory.wired", false)) + memflags |= VM_MEM_F_WIRED; + if (get_config_bool_default("memory.guest_in_core", false)) + memflags |= VM_MEM_F_INCORE; + vm_set_memflags(ctx, memflags); + error = vm_setup_memory_domains(ctx, VM_MMAP_ALL, guest_domains, + guest_ndomains); + if (error) { + fprintf(stderr, "Unable to setup memory (%d)\n", errno); + exit(BHYVE_EXIT_ERROR); + } + + set_vcpu_affinities(); + init_mem(guest_ncpus); + init_bootrom(ctx); + + if (get_config_bool_default("monitor", false)) { + while (1) { + pid_t child = fork(); + if (child == -1) { + EPRINTLN("Monitor mode fork failed: %s", + strerror(errno)); + exit(BHYVE_EXIT_ERROR); + } + if (child == 0) + break; + while ((error = waitpid(child, &status, 0)) == -1 && errno == EINTR) + ; + if (error == -1) { + EPRINTLN("Monitor mode wait failed: %s", + strerror(errno)); + exit(BHYVE_EXIT_ERROR); + } + if (WIFSIGNALED(status)) { + EPRINTLN("Child process was killed by signal %d", + WTERMSIG(status)); + exit(BHYVE_EXIT_ERROR); + } else { + status = WEXITSTATUS(status); + if (status != BHYVE_EXIT_RESET) + exit(status); + } + if (vm_reinit(ctx) != 0) { + EPRINTLN("Monitor mode reinit failed: %s", + strerror(errno)); + exit(BHYVE_EXIT_ERROR); + }; + } + } + bsp = vm_vcpu_open(ctx, BSP); max_vcpus = num_vcpus_allowed(ctx, bsp); if (guest_ncpus > max_vcpus) { @@ -880,23 +937,6 @@ main(int argc, char *argv[]) vcpu_info[vcpuid].vcpu = vm_vcpu_open(ctx, vcpuid); } - calc_mem_affinity(memsize); - memflags = 0; - if (get_config_bool_default("memory.wired", false)) - memflags |= VM_MEM_F_WIRED; - if (get_config_bool_default("memory.guest_in_core", false)) - memflags |= VM_MEM_F_INCORE; - vm_set_memflags(ctx, memflags); - error = vm_setup_memory_domains(ctx, VM_MMAP_ALL, guest_domains, - guest_ndomains); - if (error) { - fprintf(stderr, "Unable to setup memory (%d)\n", errno); - exit(4); - } - - set_vcpu_affinities(); - init_mem(guest_ncpus); - init_bootrom(ctx); if (bhyve_init_platform(ctx, bsp) != 0) exit(BHYVE_EXIT_ERROR); diff --git a/usr.sbin/bhyve/riscv/bhyverun_machdep.c b/usr.sbin/bhyve/riscv/bhyverun_machdep.c index f4c248ee662a..a90a508901bc 100644 --- a/usr.sbin/bhyve/riscv/bhyverun_machdep.c +++ b/usr.sbin/bhyve/riscv/bhyverun_machdep.c @@ -101,6 +101,7 @@ bhyve_usage(int code) " -D: destroy on power-off\n" " -h: help\n" " -k: key=value flat config file\n" + " -M: monitor mode\n" " -m: memory size\n" " -o: set config 'var' to 'value'\n" " -p: pin 'vcpu' to 'hostcpu'\n" @@ -119,7 +120,7 @@ bhyve_optparse(int argc, char **argv) const char *optstr; int c; - optstr = "hCDSWk:f:o:p:c:s:m:U:"; + optstr = "hCDMSWk:f:o:p:c:s:m:U:"; while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { case 'c': @@ -137,6 +138,9 @@ bhyve_optparse(int argc, char **argv) case 'k': bhyve_parse_simple_config_file(optarg); break; + case 'M': + set_config_bool("monitor", true); + break; case 'm': set_config_value("memory.size", optarg); break; From nobody Wed Dec 17 14:17:22 2025 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 4dWbTt3T0Zz6LC0W for ; Wed, 17 Dec 2025 14:17: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWbTt18GDz3LxN for ; Wed, 17 Dec 2025 14:17:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765981042; 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=KYk7wa0lrtjXHqlevzUPMRzcX+z7a4kJb2XmGcOJQsM=; b=NO71BGntRuqcH5Oot1UMtC5GSwpwpBhqKxUe0CzgMMMFSgXzEvIQzJg5MA/dxJ64yMnmZ2 mv8vJkGVHpTz2GeTbj0Wb1sQ5gXTGghmxHisHvBj2HyRyoohQhyZlVlFyLuX3s5MFx9Cb8 NZNE2v1WiVlU/gUhXp7YFjOdIdYZQnj15n6/PtVCsm7biUG6AmJ3qfMLTvcuuvtfjBXD+L xdKeALFCoOWjne9fCC5ndLBswZiU3qnyxyWv8NHDrmxZb84+9UWZMzrO4kkjdkyHIcuxYL LRzRCMb99eYv60alzvw9HNAjnWAOHjmqCX2L/u46WIKjH5wv1ky00FDQnylScg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765981042; 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=KYk7wa0lrtjXHqlevzUPMRzcX+z7a4kJb2XmGcOJQsM=; b=tidBTT5/sbn3wUf/+BmfOCKI/fM+6B1MIfjDp4nsFhHRwobrVL83MFAc1kPlOC0z1FJN6b 8prrTFfK+vlIUvGys3+60LIRZQvLhB7aatR+hr2ob5PylLlax2NN6knGtxZJw5nkZI1ihQ tsVE+i1apLLz387Sb6BvUO0y7SNdIH+4wuDMBqcyeJQ/OFGVTMjZCHBKLhZYmAZXyQpQou 21HhZucbe8dUEvtK9G8nrA7BRF5mG1fmlx/U757z8enERATV1JqAjEjhfEwXuJU1NawVqf sgr6NRPGc0XQF0OQ9PQ2xZ8YqNHjdKIdUICTTrTFibgnJGxItGDWse5ZPsPq2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765981042; a=rsa-sha256; cv=none; b=lGp52zDcl/dYoBvu6rSrmMj8f81SVh2pRn5RmolIcSbZ1IqKdUCkRjm7QaeP1OY6jziodn CPwbuX0aBZ7vyqqGmqmXIRdnkR9YP08QDdS2AeJuBeNFW0AVX6THqCeCYGnielagOMPLxL cKr/jYAovA9q22PABunhtG7u4+Erms03+osEfk4v/LIqnUuSiiY6k2j0GQuofzotJ3gegO 2BqoDBFJX9rd+UUYbp4IFSYnplBYEASpSxZcmUyTF2g4+XLkOgsQxvY6/HIlmsqLG8lcuW P54DELRPa4cKDPqT5y+dva7cjno7F2pvQ5bvr9UHndilUMBC7WDw9nRqS3G7Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWbTt0MwYzwB2 for ; Wed, 17 Dec 2025 14:17:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39406 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 14:17:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 1fad49baf390 - main - sdhci: Try to complete the last transaction if dumping 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: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fad49baf390cb52f238e6c352d0bc0893c008c3 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 14:17:22 +0000 Message-Id: <6942bb72.39406.4933958a@gitrepo.freebsd.org> The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=1fad49baf390cb52f238e6c352d0bc0893c008c3 commit 1fad49baf390cb52f238e6c352d0bc0893c008c3 Author: Justin Hibbits AuthorDate: 2025-12-17 14:15:40 +0000 Commit: Justin Hibbits CommitDate: 2025-12-17 14:17:06 +0000 sdhci: Try to complete the last transaction if dumping If the kernel panics while a thread is in the middle of an SDHCI transaction, trying to dump to a dump target on the MMC would result in a hang. Fix this by completing the transaction first. Reviewed by: imp Obtained from: Hewlett Packard Enterprise Differential Revision: https://reviews.freebsd.org/D54255 --- sys/dev/sdhci/sdhci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index b53b85bf44c2..0426d9d27916 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2183,6 +2183,18 @@ sdhci_generic_acquire_host(device_t brdev __unused, device_t reqdev) int err = 0; SDHCI_LOCK(slot); + /* + * If the bus is busy at dump time, it may have stopped in the middle of + * a transaction. Try to complete that transaction before continuing. + */ + if (slot->bus_busy && dumping) { + SDHCI_UNLOCK(slot); + while (slot->req != NULL) { + sdhci_generic_intr(slot); + DELAY(10); + } + return (0); + } while (slot->bus_busy) msleep(slot, &slot->mtx, 0, "sdhciah", 0); slot->bus_busy++; From nobody Wed Dec 17 17:01:13 2025 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 4dWg6x2bK2z6Kym1 for ; Wed, 17 Dec 2025 17:01: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWg6x1tDxz3kqy for ; Wed, 17 Dec 2025 17:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765990873; 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=x6i7jjJHFjyDTAFFevF6Fjvg2jTB89OeMMOQlwrag58=; b=mp23B9J7/WXS/muZmWufJedFH49NlYWrdCcNhPs2Vhd+UQ0ZKCaPMEG0XD0WqQJL98lDYk mfCs6/Izuh9fyOiwlZy+ohLXD+LQNeGJlW/MTwWNcuZYNUqOaPK1ievwtv3KQ5v76rVo6o tlI4vWZimp1HzTaHiLug7VSyx/6tN5SgTFOGU13sWbvWcV+5c6M3EQaSzcw+PnwWD98VLx uWhsib8BT9ZDbih2ZZarHfRgKNpR0vJHafmIuqB9NJfYX/016Baw+q5iCSrT1LJAMPyWdC uu+UQczQlJNemIW4LV30nDL1neZxMqXDlCIOK7IE3cVrTGYm4r5pujl/5ozWxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765990873; 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=x6i7jjJHFjyDTAFFevF6Fjvg2jTB89OeMMOQlwrag58=; b=S5Y+Ge2+2hGhTYgUeetZ4ovEVyR7CudYQATiFg1427WrBdqmnJ4YO/UW8fENerxTprv7ut bJ0CNXiSVzEUN66RpTnhoA4Pt8Zlw6kdMAv2BP+7URmefDITAkhjfyGotPYUqi+w+IVZc3 OBqMgUEvOfciV595lI2n+sqk13LBUqiDD46MXJG5/ZpQLBE+Y7DFDSyXiFVSZkTfWXkcrz +WzHqqu2fB8fOiFK9eQ6ieE9c67k5TzXqabm9ieuNmU1U+T6eegxGjbCwLSC7HA1FWZe89 QagmoFKdT7/g4zHKZ4lbkamqHPBnFa9C1dIT8DmxjMFNK4k5WhRE0B5LDsIIiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765990873; a=rsa-sha256; cv=none; b=cpilz/nxsHR+ttFjMyA7KLuFYysCuFZHUOfg2cSjXwrKxEsxt2Uhe0oCKaL98CbXnpRS7Z JyOjdSLLrjaMdXPDGwO10xHXvvwWPx9VU/u6NB36A+EXbyi85Y6UyBTVrJbEGpdJGOl+YZ ojOqxrpMCXFYPjkiygLTgyPfTe1gnqqfIyl5xM9hK3WEVu7a8SuAViQWqVgHJ0/0Ll2YCX 6q5xLJtejCFWUQ3Xv7gJ3MsOHidO0P2fklm3BwceN1gPZnnjmk3RYDxljlKtenqmCkGE/U fZCYfgqGNBdMrRutuxt9ar81/BCJn3pHz/gW1iTWrOLvbOnqexKscofJrp0IdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWg6x1SrZz10PM for ; Wed, 17 Dec 2025 17:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2207b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 17:01:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Rob Norris From: Kyle Evans Subject: git: 2a87929671e6 - main - bectl: log modifying functions to zpool history 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: 2a87929671e6e6919c18f2c25d60f2c73c3d18f4 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 17:01:13 +0000 Message-Id: <6942e1d9.2207b.33926565@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=2a87929671e6e6919c18f2c25d60f2c73c3d18f4 commit 2a87929671e6e6919c18f2c25d60f2c73c3d18f4 Author: Rob Norris AuthorDate: 2025-12-17 17:00:47 +0000 Commit: Kyle Evans CommitDate: 2025-12-17 17:00:47 +0000 bectl: log modifying functions to zpool history Modeled directly after the method used by the zfs/zpool commands: flag commands with a "please log me" flag, and when there, reconstruct the command line. On success, call the library function to add it to the log. (Majority of the change by Rob; minor edits by kevans@) Signed-off-by: Rob Norris Co-authored-by: Kyle Evans Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. --- lib/libbe/be.c | 12 +++++++++ lib/libbe/be.h | 2 ++ lib/libbe/libbe.3 | 16 ++++++++++-- sbin/bectl/bectl.c | 73 ++++++++++++++++++++++++++++++++++++++++++------------ 4 files changed, 85 insertions(+), 18 deletions(-) diff --git a/lib/libbe/be.c b/lib/libbe/be.c index 613235d5e908..4a7c2e43b2c1 100644 --- a/lib/libbe/be.c +++ b/lib/libbe/be.c @@ -1343,3 +1343,15 @@ be_activate(libbe_handle_t *lbh, const char *bootenv, bool temporary) return (BE_ERR_SUCCESS); } + +int +be_log_history(libbe_handle_t *lbh, const char *message) +{ + int err; + + err = zpool_log_history(lbh->lzh, message); + if (err) + return (set_error(lbh, BE_ERR_UNKNOWN)); + + return (BE_ERR_SUCCESS); +} diff --git a/lib/libbe/be.h b/lib/libbe/be.h index 01ee94fd03ca..d3f47c0604fe 100644 --- a/lib/libbe/be.h +++ b/lib/libbe/be.h @@ -107,6 +107,8 @@ int be_exists(libbe_handle_t *, const char *); int be_export(libbe_handle_t *, const char *, int fd); int be_import(libbe_handle_t *, const char *, int fd); +int be_log_history(libbe_handle_t *, const char *); + #if SOON int be_add_child(libbe_handle_t *, const char *, bool); #endif diff --git a/lib/libbe/libbe.3 b/lib/libbe/libbe.3 index 3b10711dd0f9..4331713e9227 100644 --- a/lib/libbe/libbe.3 +++ b/lib/libbe/libbe.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 20, 2025 +.Dd December 11, 2025 .Dt LIBBE 3 .Os .Sh NAME @@ -144,6 +144,9 @@ .Pp .Ft void .Fn be_prop_list_free "nvlist_t *prop_list" +.Pp +.Ft int +.Fn be_log_history "libbe_handle_t *hdl" "const char *message" .Sh DESCRIPTION .Nm interfaces with libzfs to provide a set of functions for various operations @@ -536,6 +539,14 @@ exactly as specified by The .Fn be_prop_list_free function will free the property list. +.Pp +The +.Fn be_log_history +function will log the given +.Fa message +to the zpool history, which can be later retrieved using the +.Xr zpool-history 8 +command. .Sh DIAGNOSTICS Upon error, one of the following values will be returned: .Bl -bullet -offset indent -compact @@ -583,7 +594,8 @@ BE_ERR_UNKNOWN BE_ERR_INVORIGIN .El .Sh SEE ALSO -.Xr bectl 8 +.Xr bectl 8 , +.Xr zpool-history 8 .Sh HISTORY .Xr bectl 8 and diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c index 95715b34336b..28483dae17b2 100644 --- a/sbin/bectl/bectl.c +++ b/sbin/bectl/bectl.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -76,27 +77,28 @@ struct command_map_entry { int (*fn)(int argc, char *argv[]); /* True if libbe_print_on_error should be disabled */ bool silent; + bool save_history; }; static struct command_map_entry command_map[] = { - { "activate", bectl_cmd_activate,false }, - { "create", bectl_cmd_create, false }, - { "destroy", bectl_cmd_destroy, false }, - { "export", bectl_cmd_export, false }, - { "import", bectl_cmd_import, false }, + { "activate", bectl_cmd_activate,false, true }, + { "create", bectl_cmd_create, false, true }, + { "destroy", bectl_cmd_destroy, false, true }, + { "export", bectl_cmd_export, false, true }, + { "import", bectl_cmd_import, false, true }, #if SOON - { "add", bectl_cmd_add, false }, + { "add", bectl_cmd_add, false, true }, #endif - { "jail", bectl_cmd_jail, false }, - { "list", bectl_cmd_list, false }, - { "mount", bectl_cmd_mount, false }, - { "rename", bectl_cmd_rename, false }, - { "unjail", bectl_cmd_unjail, false }, - { "ujail", bectl_cmd_unjail, false }, - { "unmount", bectl_cmd_unmount, false }, - { "umount", bectl_cmd_unmount, false }, - { "check", bectl_cmd_check, true }, + { "jail", bectl_cmd_jail, false, false }, + { "list", bectl_cmd_list, false, false }, + { "mount", bectl_cmd_mount, false, false }, + { "rename", bectl_cmd_rename, false, true }, + { "unjail", bectl_cmd_unjail, false, false }, + { "ujail", bectl_cmd_unjail, false, false }, + { "unmount", bectl_cmd_unmount, false, false }, + { "umount", bectl_cmd_unmount, false, false }, + { "check", bectl_cmd_check, true, false }, }; static struct command_map_entry * @@ -523,12 +525,42 @@ bectl_cmd_check(int argc, char *argv[] __unused) return (0); } +static char * +save_cmdline(int argc, char *argv[]) +{ + char *cmdline, *basename, *p; + int len, n, i; + + len = MAXPATHLEN * 2 + 1; /* HIS_MAX_RECORD_LEN from zfs.h */ + cmdline = p = malloc(len); + if (cmdline == NULL) + err(2, "malloc"); + + basename = strrchr(argv[0], '/'); + if (basename == NULL) + basename = argv[0]; + else + basename++; + + n = strlcpy(p, basename, len); + for (i = 1; i < argc; i++) { + if (n >= len) + break; + p += n; + *p++ = ' '; + len -= (n + 1); + n = strlcpy(p, argv[i], len); + } + + return (cmdline); +} + int main(int argc, char *argv[]) { struct command_map_entry *cmd; const char *command; - char *root = NULL; + char *root = NULL, *cmdline = NULL; int opt, rc; while ((opt = getopt(argc, argv, "hr:")) != -1) { @@ -565,10 +597,19 @@ main(int argc, char *argv[]) return (-1); } + if (cmd->save_history) + cmdline = save_cmdline(argc+optind, argv-optind); + libbe_print_on_error(be, !cmd->silent); rc = cmd->fn(argc, argv); + if (cmd->save_history) { + if (rc == 0) + be_log_history(be, cmdline); + free(cmdline); + } + libbe_close(be); return (rc); } From nobody Wed Dec 17 17:25:26 2025 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 4dWgft509Tz6L2MD for ; Wed, 17 Dec 2025 17:25: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWgft4Lp2z3mts for ; Wed, 17 Dec 2025 17:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765992326; 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=+oANIvJcHlAC3kz69z+PLuCbwKbsBf0vfHiYZWCkCss=; b=c29KYZ+Ay5bCXfsqxJYCXbfLWeLrdkRBVEaNBvSOnKon1lgcCyhMN9GNT5iBRDROh1kdQW wgOqhtte75vSzt7y6P2WKUOLzwUnNJJfLttwL3iVZLd+/9xjCbW4U+9B9XVKLY+rpaFqiB LUY/vc1mnWkpoBMKHrbuTmY5Svox6Y6b+xSBQnaJFi9bfamMkdYcn3S75MQSPVDrfVyeiW eU4NhyvM7inMuSzK5fdQa2yL/Q4cxPd2eG4yWWyEn8cm4gZtUVHYoULTFmfLCKLb3x0b5f 6M887cwPWdOZH9HtyUSBtx4vnTRueUIXcOKUhus1T2bX/IRJml++lOp5+b7aDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765992326; 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=+oANIvJcHlAC3kz69z+PLuCbwKbsBf0vfHiYZWCkCss=; b=I3O8RhX4iv0xvpoe7iaQPAm0iYtHyALGYc5HnVcP45mfkOjrW/CTasDlhaB9busoF70UKJ T/v6kh4S5w3pwNmGLdk7mHpt9rwPf2+9i5kRtQ/Jnq1m3lcwaOiedNoTSlZs/nmZUW5KpV qlTUSwugwcksM49g2n+KBg/N1S219Rmoh8fyd9y/mn8i35TSinClOgTv6QWXc8taUZJRzE LHuj/EHk9uquz3/l8DZ1dRxn2v71dcxeaDAU1x+RJNpcMbMUqPPba69Tf4ucRTYfHtuE8t gH0Lf+AhHNfBZ/GOOvajs9X8BEZJ/VUjq0I2gepIxu/YlW2GGr1XEd6VyyS70A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765992326; a=rsa-sha256; cv=none; b=pFBL7TUTt0RT7eNosRYItExlij9m5P9TINLrbL7+2M60c6cf7FStczsS5bn1zhc/3yhoCx 35Hwyy46Uap28V4Wc+ebI+4F+1Ni91GbgpT9AZKaOwUHLiht+6Cv2idykjEgm9NJc5zr1C W/RyAU1eqBp5F+BvByIHqWw+4mCTaXyoFQe6M48rTzs7MGBW7Os8QtV81wYXcI4nEXuAat VpPtsZgp24myDfru+8/Ff4PGW0nfaw4I2HgGLwrtzN8/oQI3xZYhQLavyBkN0xPgu2VBdw TvG2sq2lMJOWm+HctSn1D15LgtcnYeFp4P2DWFLOimigBQS3zwfiH3k4EWdxTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWgft3NYWz120c for ; Wed, 17 Dec 2025 17:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22db5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 17:25:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 067b62bd5834 - main - examples/mdoc: Remove document description quotes 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: 067b62bd5834484c927038aff28d36da6c5d6cca Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 17:25:26 +0000 Message-Id: <6942e786.22db5.574ce6e4@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=067b62bd5834484c927038aff28d36da6c5d6cca commit 067b62bd5834484c927038aff28d36da6c5d6cca Author: Alexander Ziaee AuthorDate: 2025-12-17 17:15:53 +0000 Commit: Alexander Ziaee CommitDate: 2025-12-17 17:25:19 +0000 examples/mdoc: Remove document description quotes Quotes in roff do not work the way quotes in shell do, remove them from the examples to hopefully lead less people astray. MFC after: 3 days --- share/examples/mdoc/example.1 | 2 +- share/examples/mdoc/example.3 | 2 +- share/examples/mdoc/example.4 | 2 +- share/examples/mdoc/example.9 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/examples/mdoc/example.1 b/share/examples/mdoc/example.1 index daffb8bc0422..8305cf45944c 100644 --- a/share/examples/mdoc/example.1 +++ b/share/examples/mdoc/example.1 @@ -10,7 +10,7 @@ .Os .Sh NAME .Nm example -.Nd "example command manual page" +.Nd example command manual page .Sh SYNOPSIS .Nm .Op Fl abc diff --git a/share/examples/mdoc/example.3 b/share/examples/mdoc/example.3 index 22c398e0491c..a1e47b34064b 100644 --- a/share/examples/mdoc/example.3 +++ b/share/examples/mdoc/example.3 @@ -10,7 +10,7 @@ .Os .Sh NAME .Nm example -.Nd "example library function manual page" +.Nd example library function manual page .Sh LIBRARY .\" Note: list of available libraries is available in mdoc(7) .Lb libc diff --git a/share/examples/mdoc/example.4 b/share/examples/mdoc/example.4 index a51d9ca9262b..534444b05abf 100644 --- a/share/examples/mdoc/example.4 +++ b/share/examples/mdoc/example.4 @@ -10,7 +10,7 @@ .Os .Sh NAME .Nm example -.Nd "example device driver manual page" +.Nd example device driver manual page .Sh SYNOPSIS To compile the driver into the kernel, place the following lines in the diff --git a/share/examples/mdoc/example.9 b/share/examples/mdoc/example.9 index f105f7465f2c..3e56aa4ad89c 100644 --- a/share/examples/mdoc/example.9 +++ b/share/examples/mdoc/example.9 @@ -10,7 +10,7 @@ .Os .Sh NAME .Nm example -.Nd "example kernel interface manual page" +.Nd example kernel interface manual page .Sh SYNOPSIS .In sys/example.h .Ft int From nobody Wed Dec 17 17:30:17 2025 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 4dWgmV1mjtz6L2Rn for ; Wed, 17 Dec 2025 17:30: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWgmT6bnvz3nW0 for ; Wed, 17 Dec 2025 17:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765992617; 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=2hUZC7xvwfQ6CanzDXhoFO4olpRXU1PrnYoX/7FET5g=; b=pqSnn6BjWLmFXuJlr35A5P8OiATOoiY2DZ9KgNlsDWYpNwnArhPAZ+JiwdzXhTs8/mWhg/ X2kPeMhmY3sbPYgLPG2D1D5TM/dRY6NtxzH+STNHip0ti8/02VC7e6VWhMgGdG5Uc2DP6e gMHF3HHouOoCTpGdQ1Yf2Iop9L4fZ4sA1pkNSId4SAroAwOKXnTtBCwCX0Ds1bi0tQ0fIj UHGsyc/IqdUkj8XSwzYQl/m1RVlBB+gqVtpIForCxEJNOnHvMmtyZF7hw66+IBAukDCGIb sASrxEcPD85/lyZodmXr9jsiX4zO4FrIpF/rMhgrseudASf6Fmlmwe2f2svNow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765992617; 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=2hUZC7xvwfQ6CanzDXhoFO4olpRXU1PrnYoX/7FET5g=; b=XDK4psLiVyj20yGyCW6auwvU3kknoxyYfAevmDLSzvHRYXsTWSaSyBaxKn6+kU8wHG4r68 GTKRGPZuTGBawBRq64f3GbC9deE1DuCv7/9UEKgeMl6YBIZiLYKc8tcxdNKH0Izt8nYr+U UiNd8pVB2R4eRRkn08nJUrmm6IJkQM8qZyOcHwN6uDYShRErClnheA3+QbtMWeK8ybRBa6 RW2BcAdNzwtloO/gomtY5kJMJ42uACS2ISkoNrVN0PI2n6sClK/bqSLm+2UlgmXGoWc2Gn alZQSz5EDe3udYco8lJeBxjH7DQbG3xfreB9J74WAlOTxY89qPFW4t3Ob0ytiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765992617; a=rsa-sha256; cv=none; b=U/tl6GDxEBpMhQAa3Ooq7tkOsTM2bkDLk4EvSy4BtroBVIzeOoX89OqQVrs4zY7cdyEEtG /jY1rQxWTFg4BOgYNEHLnILZDx57+vRbBv6sRjAIY0s/WKneWMrLGLooHWbe4mJrJPb+yN m5sUXsvzh+Sf6QJ6EtyhT08cjMOwM0iZkl4H7p4AJcQai0CQ2ys5rOJ0s12yVyVOCxevw8 hKFzDsgOf610ac3nSnD2hKGgWAA5EoVuNBGBQTDU3QEPoWrF+X9umuAzQnUg/MEX4907iL uIGwAwckvXPJkBSpuFqn6hI64es72trKuE9ucie3O8ggq3npu0u8cMkmFioUEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWgmT4ywQz11q5 for ; Wed, 17 Dec 2025 17:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24d26 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 17:30:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 3527e7e9f7b2 - main - example.3: Show updated library macro 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: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3527e7e9f7b2f1737706378b99af778921849e9d Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 17:30:17 +0000 Message-Id: <6942e8a9.24d26.67f9cb11@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=3527e7e9f7b2f1737706378b99af778921849e9d commit 3527e7e9f7b2f1737706378b99af778921849e9d Author: Alexander Ziaee AuthorDate: 2025-12-17 17:27:39 +0000 Commit: Alexander Ziaee CommitDate: 2025-12-17 17:27:39 +0000 example.3: Show updated library macro usage The LIBRARY section has been deprecated by upstream. Show the updated usage of the Lb macro in SYNOPSIS. Fixes: 4c07abdbacf49 (mandoc: Vendor import of upstream at 2025-06-13) --- share/examples/mdoc/example.3 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/share/examples/mdoc/example.3 b/share/examples/mdoc/example.3 index a1e47b34064b..44fb1c76798c 100644 --- a/share/examples/mdoc/example.3 +++ b/share/examples/mdoc/example.3 @@ -5,16 +5,15 @@ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd July 30, 2004 +.Dd December 17, 2025 .Dt EXAMPLE 3 .Os .Sh NAME .Nm example .Nd example library function manual page .Sh LIBRARY -.\" Note: list of available libraries is available in mdoc(7) -.Lb libc .Sh SYNOPSIS +.Lb libc .In example.h .Ft int .Fn example "char *ptr" "int mode" From nobody Wed Dec 17 18:03:48 2025 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 4dWhWG34hnz6L5v2; Wed, 17 Dec 2025 18:03:54 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp052.goneo.de [85.220.129.60]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWhWG0hJ3z3sCy; Wed, 17 Dec 2025 18:03:53 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub2.goneo.de (hub2.goneo.de [85.220.129.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id EA46B240E16; Wed, 17 Dec 2025 19:03:51 +0100 (CET) Received: from hub2.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPS id 2C158240285; Wed, 17 Dec 2025 19:03:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1765994630; 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=yJu6KKsIJf3qDNvzg/0ULU2cZTRIo5ZA0CD1S8e6VBU=; b=lfCHf33R06zQiUZ6AM8Ev5w5whuW5uvsWQEQZJ+DG3igzF5yaxP4ZhyIRdLCx65wgs2/kA 8mIGA3VJxBqlPiG4C89GEoFYTOD9boVZkrlSfWPePJrW6YQSctNpY4xjzGIKXO+DQhCIKN +ZYCUAlOKlSx4pAUEmF4Yh40Xyz2ojaIMusSv9poQfHl12EuDHWBZiniMRZhpbnrfflsf2 tqgD1/uRCSzj/0INMLg13unEvHnEGaPSPx1L9uEmmT5or4o4dHCDXuFDFdqPtdKvk2sAqC kVcnCyaWACVCV5BehUSJ5eYEmOcwoRZW/eaqpaYsA3qFVF0meqaUOiwCa7u4mw== Received: from hermann (dynamic-2a02-3100-23eb-e506-7eab-170c-13ee-c827.310.pool.telefonica.de [IPv6:2a02:3100:23eb:e506:7eab:170c:13ee:c827]) (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) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPSA id B6CF4240282; Wed, 17 Dec 2025 19:03:49 +0100 (CET) Date: Wed, 17 Dec 2025 19:03:48 +0100 From: FreeBSD User To: Bojan =?UTF-8?B?Tm92a292acSH?= Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1092ec8b3375 - main - kern: Introduce RLIMIT_VMM Message-ID: <20251217190348.7df7c756@hermann> In-Reply-To: <6942b977.387dc.1bc32951@gitrepo.freebsd.org> References: <6942b977.387dc.1bc32951@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: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-UID: a74f54 X-Rspamd-UID: b574f0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25394, ipnet:85.220.128.0/17, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dWhWG0hJ3z3sCy On Wed, 17 Dec 2025 14:08:55 +0000 Bojan Novkovi=C4=87 wrote: > The branch main has been updated by bnovkov: >=20 > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D1092ec8b337595ed8d52accf41c6904= d75b3689d >=20 > commit 1092ec8b337595ed8d52accf41c6904d75b3689d > Author: Bojan Novkovi=C4=87 > AuthorDate: 2025-11-07 13:11:03 +0000 > Commit: Bojan Novkovi=C4=87 > CommitDate: 2025-12-17 14:08:31 +0000 >=20 > kern: Introduce RLIMIT_VMM > =20 > This change introduces a new per-UID limit for controlling the > number of vmm instances, in anticipation of unprivileged bhyve. > This allows ut to limit the amount of kernel memory allocated > by the vmm driver and prevent potential memory exhaustion attacks. > =20 > Differential Revision: https://reviews.freebsd.org/D53728 > Reviewed by: markj, olce, corvink > MFC after: 3 months > Sponsored by: The FreeBSD Foundation > Sponsored by: Klara, Inc. > --- > sys/dev/vmm/vmm_dev.c | 18 +++++++++++++++--- > sys/kern/kern_resource.c | 13 +++++++++++++ > sys/sys/resource.h | 4 +++- > sys/sys/resourcevar.h | 2 ++ > usr.bin/procstat/procstat_rlimit.c | 1 + > 5 files changed, 34 insertions(+), 4 deletions(-) >=20 > diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c > index d6543bf6534e..3a86a8f966ef 100644 > --- a/sys/dev/vmm/vmm_dev.c > +++ b/sys/dev/vmm/vmm_dev.c > @@ -18,6 +18,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -96,6 +97,10 @@ u_int vm_maxcpu; > SYSCTL_UINT(_hw_vmm, OID_AUTO, maxcpu, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, > &vm_maxcpu, 0, "Maximum number of vCPUs"); > =20 > +u_int vm_maxvmms; > +SYSCTL_UINT(_hw_vmm, OID_AUTO, maxvmms, CTLFLAG_RWTUN, > + &vm_maxvmms, 0, "Maximum number of VMM instances per user"); > + > static void devmem_destroy(void *arg); > static int devmem_create_cdev(struct vmmdev_softc *sc, int id, char *dev= mem); > =20 > @@ -870,6 +875,7 @@ vmmdev_destroy(struct vmmdev_softc *sc) > int error __diagused; > =20 > KASSERT(sc->cdev =3D=3D NULL, ("%s: cdev not free", __func__)); > + KASSERT(sc->ucred !=3D NULL, ("%s: missing ucred", __func__)); > =20 > /* > * Destroy all cdevs: > @@ -898,8 +904,8 @@ vmmdev_destroy(struct vmmdev_softc *sc) > if (sc->vm !=3D NULL) > vm_destroy(sc->vm); > =20 > - if (sc->ucred !=3D NULL) > - crfree(sc->ucred); > + chgvmmcnt(sc->ucred->cr_ruidinfo, -1, 0); > + crfree(sc->ucred); > =20 > sx_xlock(&vmmdev_mtx); > SLIST_REMOVE(&head, sc, vmmdev_softc, link); > @@ -1021,6 +1027,12 @@ vmmdev_create(const char *name, struct ucred *cred) > vmmdev_destroy(sc); > return (error); > } > + if (!chgvmmcnt(cred->cr_ruidinfo, 1, vm_maxvmms)) { > + sx_xunlock(&vmmdev_mtx); > + destroy_dev(cdev); > + vmmdev_destroy(sc); > + return (ENOMEM); > + } > sc->cdev =3D cdev; > sx_xunlock(&vmmdev_mtx); > return (0); > @@ -1172,7 +1184,7 @@ vmm_handler(module_t mod, int what, void *arg) > } > if (vm_maxcpu =3D=3D 0) > vm_maxcpu =3D 1; > - > + vm_maxvmms =3D 4 * mp_ncpus; > error =3D vmm_modinit(); > if (error =3D=3D 0) > vmm_initialized =3D true; > diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c > index dcd38c6e6fbe..31f89bd41f6d 100644 > --- a/sys/kern/kern_resource.c > +++ b/sys/kern/kern_resource.c > @@ -895,6 +895,9 @@ getrlimitusage_one(struct proc *p, u_int which, int > flags, rlim_t *res) case RLIMIT_PIPEBUF: > *res =3D ui->ui_pipecnt; > break; > + case RLIMIT_VMM: > + *res =3D ui->ui_vmmcnt; > + break; > default: > error =3D EINVAL; > break; > @@ -1643,6 +1646,9 @@ uifree(struct uidinfo *uip) > if (uip->ui_inotifywatchcnt !=3D 0) > printf("freeing uidinfo: uid =3D %d, inotifywatchcnt =3D %ld\n", > uip->ui_uid, uip->ui_inotifywatchcnt); > + if (uip->ui_vmmcnt !=3D 0) > + printf("freeing vmmcnt: uid =3D %d, vmmcnt =3D %ld\n", > + uip->ui_uid, uip->ui_vmmcnt); > free(uip, M_UIDINFO); > } > =20 > @@ -1763,6 +1769,13 @@ chginotifywatchcnt(struct uidinfo *uip, int diff, > rlim_t max) "inotifywatchcnt")); > } > =20 > +int > +chgvmmcnt(struct uidinfo *uip, int diff, rlim_t max) > +{ > + > + return (chglimit(uip, &uip->ui_vmmcnt, diff, max, "vmmcnt")); > +} > + > static int > sysctl_kern_proc_rlimit_usage(SYSCTL_HANDLER_ARGS) > { > diff --git a/sys/sys/resource.h b/sys/sys/resource.h > index 2725aa1ef646..9e0635cdb328 100644 > --- a/sys/sys/resource.h > +++ b/sys/sys/resource.h > @@ -115,8 +115,9 @@ struct __wrusage { > #define RLIMIT_KQUEUES 13 /* kqueues allocated > */ #define RLIMIT_UMTXP 14 /* process-shared > umtx */ #define RLIMIT_PIPEBUF 15 /* pipes/fifos > buffers */ +#define RLIMIT_VMM 16 /* virtual > machines */=20 > -#define RLIM_NLIMITS 16 /* number of resource > limits */ +#define RLIM_NLIMITS 17 /* number of > resource limits */=20 > #define RLIM_INFINITY ((rlim_t)(((__uint64_t)1 << 63) - 1)) > #define RLIM_SAVED_MAX RLIM_INFINITY > @@ -144,6 +145,7 @@ static const char *rlimit_ident[] =3D { > "kqueues", > "umtx", > "pipebuf", > + "vmm", > }; > #endif > =20 > diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h > index 61411890c85b..d5c4561eec66 100644 > --- a/sys/sys/resourcevar.h > +++ b/sys/sys/resourcevar.h > @@ -124,6 +124,7 @@ struct uidinfo { > long ui_pipecnt; /* (b) consumption of pipe > buffers */ long ui_inotifycnt; /* (b) number of inotify > descriptors */ long ui_inotifywatchcnt; /* (b) number of > inotify watches */ > + long ui_vmmcnt; /* (b) number of vmm instances > */ uid_t ui_uid; /* (a) uid */ > u_int ui_ref; /* (b) reference count */ > #ifdef RACCT > @@ -148,6 +149,7 @@ int chgumtxcnt(struct uidinfo *uip, int diff, > rlim_t maxval); int chgpipecnt(struct uidinfo *uip, int diff, rlim_t > max); int chginotifycnt(struct uidinfo *uip, int diff, rlim_t maxval); > int chginotifywatchcnt(struct uidinfo *uip, int diff, rlim_t maxval); > +int chgvmmcnt(struct uidinfo *uip, int diff, rlim_t max); > int kern_proc_setrlimit(struct thread *td, struct proc *p, u_int > which, struct rlimit *limp); > struct plimit > diff --git a/usr.bin/procstat/procstat_rlimit.c > b/usr.bin/procstat/procstat_rlimit.c index c34550295f05..f3132758e005 100= 644 > --- a/usr.bin/procstat/procstat_rlimit.c > +++ b/usr.bin/procstat/procstat_rlimit.c > @@ -64,6 +64,7 @@ static struct { > {"kqueues", " "}, > {"umtxp", " "}, > {"pipebuf", "B "}, > + {"virtual-machines", " "}, > }; > =20 > _Static_assert(nitems(rlimit_param) =3D=3D RLIM_NLIMITS, >=20 After this commit - probably - my kernel pollutes the console with lots of= =20 pid XXXXX (limits), jid 0, uid 0: exited on signal 11 (core dumped) Especially bind920 (named) is failing immediately, surprisingly the mouse i= sn't working anymore and so on ... ssgd is also dying on startup - no access possible. Environment: customized kernel (especially commenting out unused driver and ZFS/IPFW in-kernel). Kind regards, oh =20 From nobody Wed Dec 17 18:56:29 2025 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 4dWjgy08z6z6LC3B for ; Wed, 17 Dec 2025 18:56: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWjgx2c1Fz41j2 for ; Wed, 17 Dec 2025 18:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765997789; 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=Q67kDvl3cQRy1iRaMOkSawLpMX49T70z9wA942uLdoo=; b=XhyeymzWsYgXEwJld2z8WuOE+PTFA5K2beTEw6utTK/SaH4geaI6KxjzdJuJ/nhbAbI/ZR kQBZ0deDyIvrgOx4ylbVvps2oUDUjBjYoWJ94Ifo7QwqN0sTBFCk5+eHxICyx2xEGP6GYZ LQN29psjyCjNQqlePYP7bjEXgIsSviM6aSdzvSQvV+J52LJtJggLHA3yJILnffBtImuOlk nn+dn6w765nDeRRxjzGedXpbLwD7NC/z8CTJtb+IlqchgeSjPYi0hGch0pH/jiVF0J2gR6 yXZE65ywvFUcfC8iNlpTDKDiCfeQCGaRqe+1xvhx/N0lV/bArIebEN2OqSq1sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765997789; 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=Q67kDvl3cQRy1iRaMOkSawLpMX49T70z9wA942uLdoo=; b=TZGOzXr66eLJm6NQI1xd9FXTojGp7L53f3b3ygXsrvua3FQPEUgQU62S/J/cXw+HZHFu6k hPxyu8qxbcl9dxNDkquqAImHMYfe29ROQTxsPGYAFng8o7qySsqHmxuPU1Zq8d3+e9ePik +0629KKP1O78WILYA1wvLTQSQ77LnpQYeAUsKUqPzKVDFYy2ArdRZhp4qvCQXEFp7/RL35 Ol/TBTD2lQMIKWs2CuBHN2dq0cNhnBes7nAWSFl/ZK6H3eGH8Sy7umHakPGL25pAAb4K0V sDLD27v898Zh31HbwU4tLJZRjjDXI9PbP3NA9/2/ymttJdgANvOpnqCADnwSfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765997789; a=rsa-sha256; cv=none; b=f9ChOJdzOe2IwlbhWqmT4sFI1CCmpBmxX0DTgemIxFaxufrYMxZTrAnI/6Ud7WKquVfgRA 8spmXY0Men932FWcOsLh384mxZgeDIGRbccFIuak+6igjq8Me8LXQ9XxcKNHLn8kJSjL0u Caz/k8fUcZ2bCHHYGDW2YFu5n13iS/GoYfBSQLzsN5qA14fL21c3wIhImgRkqRnT68weSi GIevNZqyW3hQaMmJGFuF7/KNTOb0SHULELSpC4YJTEi1/pMVe8iok2QPFwtpr7PVoS8hYM CuEQCD51OCTOpJghgcwp2y/6ij34irmS46Mg0NXynTwD50R+WkuNZRJqi7A6AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWjgx1rqQz14Rh for ; Wed, 17 Dec 2025 18:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3542d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 18:56:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 41e9414e2679 - main - .cirrus.yml: Add persistent worker 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: 41e9414e2679842e461cbc1d9193f7a9daca7546 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 18:56:29 +0000 Message-Id: <6942fcdd.3542d.5b08d406@gitrepo.freebsd.org> The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=41e9414e2679842e461cbc1d9193f7a9daca7546 commit 41e9414e2679842e461cbc1d9193f7a9daca7546 Author: Muhammad Moinur Rahman AuthorDate: 2025-12-14 12:17:06 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2025-12-17 18:55:42 +0000 .cirrus.yml: Add persistent worker As we have received an external box sponsored by NetActuate we can now enable the pre-commit tasks to be run in this box. Once we have enabled this debug if there are any errors and after confirmation we can enable this for other tasks too. Sponsored by: NetActuate Sponsored by: The FreeBSD Foundation Approved by: emaste, lwhsu Differential Revision: https://reviews.freebsd.org/D54220 --- .cirrus.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1036a3d60ca1..4d166e1c6818 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -191,16 +191,17 @@ task: - du -m -s /usr/obj precommit_task: + persistent_worker: + labels: + jail: FreeBSD-src matrix: - name: amd64 smoke test using internal ci systems only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' - trigger_type: manual env: TARGET: amd64 TARGET_ARCH: amd64 - name: aarch64 smoke test using internal ci systems only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' - trigger_type: manual env: TARGET: arm64 TARGET_ARCH: aarch64 From nobody Wed Dec 17 19:13:20 2025 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 4dWk3R2ffjz6LDt7; Wed, 17 Dec 2025 19:13:23 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWk3R0Wfgz45xx; Wed, 17 Dec 2025 19:13:23 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765998803; 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=cT7y0jnGEdfR62jjEwHiQpflbgw8fpGxF+mHKTr9Ljk=; b=ttt1tEKQ5uN8fT/lSbePFskaD6EiH+gbUjx4iihHiySOuJzZc77xd9Ja/btVvly0kv9ulr CuPs3WW82YG+frGBaZ7Drq93nicB9JyJNQh1rakhFA2OUeX6LhgzXaERaH6owaIat5eohi MLUvk/eCEw+R6Tqu/4mNqXz3A7fCITiNIEQFmIESd88RXTPYVvg/jZ1nqCEN2AEA+TuGjS lrGGeflTiCfcGBL90yTnZTMDnd2vH3WFobajGTUHkheRxgEzi39B0/ctWIwuv8fhBGiCxF BhTM+2xkcQ4P82BRCF2TMn34WWQ7UEZFKSk2VeuYtl2I4YRr0G+YsuNkVK9SiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765998803; 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=cT7y0jnGEdfR62jjEwHiQpflbgw8fpGxF+mHKTr9Ljk=; b=vbB2YuBZ+iYChQqBv7I8dNOdJtt1mfPALiIn5KhIxodOknOCCgwE8B4AZmEu+6xPIDWaS1 1ekTntSn8JXMBtJm++Xsnn0llVkXUPHcCs56yhDHyUgiIPQUDSB9lWQntujfKSVSpZEopd xnzpjgdec6O51yy/0gf86SplQln5Oi3+/Xig5gAPAMJhmMxlHRrFLoQg2rrKqe2qFAaEq4 ABHtqhHdr+fEegjV5pYzxcch00R3ffHY0O1Y+PVGpOz4ukJxTV/WDDF9578IANSFY0sKUQ 5bO6ouFc6tpnjHZa1D8Nz/hPGs60kSmgtjLtHDiIcH5RgdtNFeba77QkbsNO+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765998803; a=rsa-sha256; cv=none; b=Qjq3qAtDIcCFsx1zPY6OIYZRNi3QYe3mKvpBQ8O/2tVRqAyhyJmwdqi2qU+H2n2Waj/fxz 7Y/5XM59xrfB49fD5zD9+vJVxy6JGo93M7TUhfQ8K/0+DosIU4Yx3KCHijYSG2uKJg286U V5r4gbJqk3X3mI4pLPvfDEB2WNo1rU8cl3tOwswOe5o56jNh7gagMM048jTY+cIh8XkrsF zMbvwZs4AYrOloF7zXCHCaqaZyxsjLcWsuVh9SQMi3cJ6jpH5mvqjya3atYS+HcU7ss0do PTPyRWTOhVMZlE+RJUuhHfU4HyNhhwx6tYgdsTpGv0BTy2WiM4tn47eK8ELnmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4dWk3Q6N32zmrr; Wed, 17 Dec 2025 19:13:22 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 472FF8EE44; Wed, 17 Dec 2025 20:13:20 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: FreeBSD User Cc: Bojan =?utf-8?Q?Novkovi=C4=87?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1092ec8b3375 - main - kern: Introduce RLIMIT_VMM In-Reply-To: <20251217190348.7df7c756@hermann> (FreeBSD User's message of "Wed, 17 Dec 2025 19:03:48 +0100") References: <6942b977.387dc.1bc32951@gitrepo.freebsd.org> <20251217190348.7df7c756@hermann> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 17 Dec 2025 20:13:20 +0100 Message-ID: <86zf7g7whb.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 FreeBSD User writes: > After this commit - probably - my kernel pollutes the console with lots o= f=20 > > pid XXXXX (limits), jid 0, uid 0: exited on signal 11 (core dumped) https://reviews.freebsd.org/D54273 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Wed Dec 17 19:39:21 2025 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 4dWkdP5bYBz6LGwJ for ; Wed, 17 Dec 2025 19:39:21 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWkdP56bCz49Vr for ; Wed, 17 Dec 2025 19:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766000361; 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=ZROy7g3arMArRom1QJsxx52Wsyt9AFmv40TmTuxTbHs=; b=sHbslmpSfBdh4YhlcczmYqs2/uaayyzVSWM9l5HfavskEW3XZ6AzRYgc2VPH9Cha0CIk42 NEkaSxb1GWtjSWksZM3D5VuU+KFjfkE0Mzh5zu4fvDGRvtw+nXSDt3BNM2a+KCzUxFxAN2 G+HfVLCnTRrNFY7KH4Ez9EUJ1eazPeqWpRMF6CvfxjoHyMpWFpzYHWRgXK9kNWa7v14LR+ Qg0aeeLrmXu3nPR9K86kIiYaqy4TBjMCcJqYM4yJKT1lX+4ZGuPFDLIGMAV0jUdvujlP5a vIGddJSdaomwzBHTCztTS747Kr2Ky/b25c+r4VbY0Q9nO8NjsMK21O4h9ItM1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766000361; 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=ZROy7g3arMArRom1QJsxx52Wsyt9AFmv40TmTuxTbHs=; b=w8NKklDga5RzcD0Z1Wvm97iMrTFYf4YLbSBRCT8qQu8VZB4G12NnJK0wg2Emdj7fiapkhQ 7grEmrH4jnEwVtFLYwVm4L5D4Q2sDRSQIkzs6VvEwXSLVsrHzpMyk9iDjlBeCk7Efkmt/s ogz53y0scWOxu/HTf+rHOVy24Qu7k/D+5rdbPqfqpjwTJTwO26vMSs4i1nAlEqB/nSJGwE cQOSyHxToAwPw7PVwzEqgzhdXDyS2byEQ/ZPZL3Sdx1XaSOWoegEUgQDCVeQyRCaFt9Rjy VtGBJ/CFAtXQ9q/iSg/p86p7R7XgWtFYkJ51jeEAbGOWiKtN5MVUe9v05Zr28w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766000361; a=rsa-sha256; cv=none; b=YyZ4b+lY2cQg5fI9DFkWxhlyUNDrqrSXZO8fenkpqQbLMnbV02MgQr8tVfu3BbkRO8qiAO irtjC5/MwYemF24JeX+ldJp2YMHdPafiyF6WqnyBuX1il/AyMYezp5p6zCPM7RpE6mIKVB IuGOdJh+cMI2+KVGqcrdhbC2bu1RfbTBP7heDUX6W/WfQc9hblHZ1NQ08fTgl5ue9A9bSW U+wTpHwibAftq9SGqZQjUD9FU0fn2b/kpWIThw+hGDdki4DME6G+OKwaH9g4eji8Y1xV/9 9vexzYreXJEgAzgz35DcTBgFsU8N2eN8+2Tc84mC8nZb+svwZKcn59o8IQVbkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWkdP45qLz15Ws for ; Wed, 17 Dec 2025 19:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39782 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 19:39:21 +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: 53af2026f213 - main - limits: Unbreak after RLIMIT_VMM addition 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: 53af2026f2139ae10ff9178cf2deca2de59fd780 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 19:39:21 +0000 Message-Id: <694306e9.39782.3b99536e@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=53af2026f2139ae10ff9178cf2deca2de59fd780 commit 53af2026f2139ae10ff9178cf2deca2de59fd780 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-17 19:38:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-17 19:38:59 +0000 limits: Unbreak after RLIMIT_VMM addition Update structures and add assertions to prevent a reoccurrence. Fixes: 1092ec8b3375 ("kern: Introduce RLIMIT_VMM") Reviewed by: bnovkov, allanjude Differential Revision: https://reviews.freebsd.org/D54273 --- usr.bin/limits/limits.1 | 10 +++++++--- usr.bin/limits/limits.c | 18 +++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/usr.bin/limits/limits.1 b/usr.bin/limits/limits.1 index 0e374acd991b..e05685942f60 100644 --- a/usr.bin/limits/limits.1 +++ b/usr.bin/limits/limits.1 @@ -17,7 +17,7 @@ .\" 5. Modifications may be freely made to this file providing the above .\" conditions are met. .\" -.Dd June 25, 2020 +.Dd December 17, 2025 .Dt LIMITS 1 .Os .Sh NAME @@ -28,11 +28,11 @@ .Op Fl C Ar class | Fl P Ar pid | Fl U Ar user .Op Fl SHB .Op Fl ea -.Op Fl bcdfklmnopstuvw Op Ar val +.Op Fl bcdfklmnopstuVvwy Op Ar val .Nm .Op Fl C Ar class | Fl U Ar user .Op Fl SHB -.Op Fl bcdfklmnopstuvwy Op Ar val +.Op Fl bcdfklmnopstuVvwy Op Ar val .Op Fl E .Oo .Op Ar name Ns = Ns Ar value ... @@ -265,6 +265,10 @@ in the entire system is limited to the value of the .Va kern.maxproc .Xr sysctl 8 variable. +.It Fl V Op Ar val +Select or set the +.Va vmms +resource limit. .It Fl v Op Ar val Select or set the .Va virtualmem diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index c53066b52a9f..57551c556c25 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -228,7 +228,7 @@ static struct { static struct { const char * cap; rlim_t (*func)(login_cap_t *, const char *, rlim_t, rlim_t); -} resources[RLIM_NLIMITS] = { +} resources[] = { { "cputime", login_getcaptime }, { "filesize", login_getcapsize }, { "datasize", login_getcapsize }, @@ -245,8 +245,12 @@ static struct { { "kqueues", login_getcapnum }, { "umtxp", login_getcapnum }, { "pipebuf", login_getcapnum }, + { "vmms", login_getcapnum }, }; +_Static_assert(nitems(resources) == RLIM_NLIMITS, + "Please add entries to resources[] for the new limits"); + /* * One letter for each resource levels. * NOTE: There is a dependency on the corresponding @@ -254,8 +258,9 @@ static struct { * If sys/resource.h defines are changed, this needs * to be modified accordingly! */ - -#define RCS_STRING "tfdscmlunbvpwkoy" +static const char rcs_string[] = "tfdscmlunbvpwkoyV"; +_Static_assert(sizeof(rcs_string) - 1 == RLIM_NLIMITS, + "Please add letters to rcs_string[] for the new limits"); static rlim_t resource_num(int which, int ch, const char *str); static void usage(void) __dead2; @@ -266,8 +271,6 @@ static void getrlimit_proc(pid_t pid, int resource, struct rlimit *rlp); static void setrlimit_proc(pid_t pid, int resource, const struct rlimit *rlp); extern char **environ; -static const char rcs_string[] = RCS_STRING; - int main(int argc, char *argv[]) { @@ -295,7 +298,7 @@ main(int argc, char *argv[]) pid = -1; optarg = NULL; while ((ch = getopt(argc, argv, - ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:o:y:")) != -1) { + ":ab:BC:c:d:Eef:Hk:l:m:n:o:P:p:Ss:t:U:u:V:v:w:y:")) != -1) { switch(ch) { case 'a': doall = 1; @@ -552,7 +555,7 @@ usage(void) { (void)fprintf(stderr, "usage: limits [-C class|-P pid|-U user] [-eaSHBE] " - "[-bcdfklmnostuvpw [val]] [[name=val ...] cmd]\n"); + "[-bcdfklmnostuVvpwy [val]] [[name=val ...] cmd]\n"); exit(EXIT_FAILURE); } @@ -664,6 +667,7 @@ resource_num(int which, int ch, const char *str) case RLIMIT_NPTS: case RLIMIT_KQUEUES: case RLIMIT_UMTXP: + case RLIMIT_VMM: res = strtoq(s, &e, 0); s = e; break; From nobody Wed Dec 17 19:47:11 2025 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 4dWkpW1y4Gz6LHlt; Wed, 17 Dec 2025 19:47:15 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWkpV4rXcz4DVh; Wed, 17 Dec 2025 19:47:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004b.ext.cloudfilter.net ([10.228.9.230]) by cmsmtp with ESMTPS id Vw6tvfkG8PzKyVxUQvecm6; Wed, 17 Dec 2025 19:47:14 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id VxUOvz90O5aoCVxUPvDY80; Wed, 17 Dec 2025 19:47:13 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=YMSSCBGx c=1 sm=1 tr=0 ts=694308c2 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=wP3pNCr1ah4A:10 a=XldT38RWNwACPDQzwzUA:9 a=6I5d2MoRAAAA:8 a=VnXWKa5CLeFE0BT0QiwA:9 a=CjuIK1q_8ugA:10 a=Z14j0ZDFV8lcdf6Xq_sA:9 a=B2y7HmGcmWMA:10 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=ics_IjAVWSmO8OVX31YA:9 a=BOg4e644cxQA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id EF66FC9; Wed, 17 Dec 2025 11:47:11 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id AB0BDBD; Wed, 17 Dec 2025 11:47:11 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: FreeBSD User cc: Bojan =?UTF-8?B?Tm92a292acSH?= , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1092ec8b3375 - main - kern: Introduce RLIMIT_VMM In-reply-to: <20251217190348.7df7c756@hermann> References: <6942b977.387dc.1bc32951@gitrepo.freebsd.org> <20251217190348.7df7c756@hermann> Comments: In-reply-to FreeBSD User message dated "Wed, 17 Dec 2025 19:03:48 +0100." 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/mixed ; boundary="==_Exmh_1766000677_84540" Date: Wed, 17 Dec 2025 11:47:11 -0800 Message-Id: <20251217194711.AB0BDBD@slippy.cwsent.com> X-CMAE-Envelope: MS4xfBjrKM506OYH/H86nMOKrrsQuBP/njXrvzE9JFwGrGvcnk0nxD5GJFaNVYjKGLpl1tQIE14tHd8b8Xd+0JN8tUeI1jFgU4i3tNdJmHFQ+mxgyfXL85kT W33SJK6q45T7d58V5jEbvtV+OugWIu1JwL9BN2q8eCGPPYZhGlbm9ScQgCLRVtaUOZkm13izyXiG871PhZ88otLOtlynCx2jEBGQVwzJMQNYrW0OTsi/LF48 4KslpUCgME07EOKLuOjNv9dPOHZBnSq9QEIJUvy/p6Egfq2MrmDLcCi0fPcN1ujhV6+XTSTBOXn7BOb4AaKV5XFEHNuCsZW7HEXunDHPrGGEb783b5avrZo8 K5pPAvSEv7EuoHQJnAoonqFbbLO6QQ== X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dWkpV4rXcz4DVh This is a multipart MIME message. --==_Exmh_1766000677_84540 Content-Type: text/plain; charset=us-ascii In message <20251217190348.7df7c756@hermann>, FreeBSD User writes: > On Wed, 17 Dec 2025 14:08:55 +0000 > Bojan Novkovi=C4=87 wrote: > > > The branch main has been updated by bnovkov: > >=20 > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=3D1092ec8b337595ed8d52accf41c6904= > d75b3689d > >=20 > > commit 1092ec8b337595ed8d52accf41c6904d75b3689d > > Author: Bojan Novkovi=C4=87 > > AuthorDate: 2025-11-07 13:11:03 +0000 > > Commit: Bojan Novkovi=C4=87 > > CommitDate: 2025-12-17 14:08:31 +0000 > >=20 > > kern: Introduce RLIMIT_VMM > > =20 > > This change introduces a new per-UID limit for controlling the > > number of vmm instances, in anticipation of unprivileged bhyve. > > This allows ut to limit the amount of kernel memory allocated > > by the vmm driver and prevent potential memory exhaustion attacks. > > =20 > > Differential Revision: https://reviews.freebsd.org/D53728 > > Reviewed by: markj, olce, corvink > > MFC after: 3 months > > Sponsored by: The FreeBSD Foundation > > Sponsored by: Klara, Inc. > > --- > > sys/dev/vmm/vmm_dev.c | 18 +++++++++++++++--- > > sys/kern/kern_resource.c | 13 +++++++++++++ > > sys/sys/resource.h | 4 +++- > > sys/sys/resourcevar.h | 2 ++ > > usr.bin/procstat/procstat_rlimit.c | 1 + > > 5 files changed, 34 insertions(+), 4 deletions(-) > >=20 > > diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c > > index d6543bf6534e..3a86a8f966ef 100644 > > --- a/sys/dev/vmm/vmm_dev.c > > +++ b/sys/dev/vmm/vmm_dev.c > > @@ -18,6 +18,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -96,6 +97,10 @@ u_int vm_maxcpu; > > SYSCTL_UINT(_hw_vmm, OID_AUTO, maxcpu, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, > > &vm_maxcpu, 0, "Maximum number of vCPUs"); > > =20 > > +u_int vm_maxvmms; > > +SYSCTL_UINT(_hw_vmm, OID_AUTO, maxvmms, CTLFLAG_RWTUN, > > + &vm_maxvmms, 0, "Maximum number of VMM instances per user"); > > + > > static void devmem_destroy(void *arg); > > static int devmem_create_cdev(struct vmmdev_softc *sc, int id, char *dev= > mem); > > =20 > > @@ -870,6 +875,7 @@ vmmdev_destroy(struct vmmdev_softc *sc) > > int error __diagused; > > =20 > > KASSERT(sc->cdev =3D=3D NULL, ("%s: cdev not free", __func__)); > > + KASSERT(sc->ucred !=3D NULL, ("%s: missing ucred", __func__)); > > =20 > > /* > > * Destroy all cdevs: > > @@ -898,8 +904,8 @@ vmmdev_destroy(struct vmmdev_softc *sc) > > if (sc->vm !=3D NULL) > > vm_destroy(sc->vm); > > =20 > > - if (sc->ucred !=3D NULL) > > - crfree(sc->ucred); > > + chgvmmcnt(sc->ucred->cr_ruidinfo, -1, 0); > > + crfree(sc->ucred); > > =20 > > sx_xlock(&vmmdev_mtx); > > SLIST_REMOVE(&head, sc, vmmdev_softc, link); > > @@ -1021,6 +1027,12 @@ vmmdev_create(const char *name, struct ucred *cred) > > vmmdev_destroy(sc); > > return (error); > > } > > + if (!chgvmmcnt(cred->cr_ruidinfo, 1, vm_maxvmms)) { > > + sx_xunlock(&vmmdev_mtx); > > + destroy_dev(cdev); > > + vmmdev_destroy(sc); > > + return (ENOMEM); > > + } > > sc->cdev =3D cdev; > > sx_xunlock(&vmmdev_mtx); > > return (0); > > @@ -1172,7 +1184,7 @@ vmm_handler(module_t mod, int what, void *arg) > > } > > if (vm_maxcpu =3D=3D 0) > > vm_maxcpu =3D 1; > > - > > + vm_maxvmms =3D 4 * mp_ncpus; > > error =3D vmm_modinit(); > > if (error =3D=3D 0) > > vmm_initialized =3D true; > > diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c > > index dcd38c6e6fbe..31f89bd41f6d 100644 > > --- a/sys/kern/kern_resource.c > > +++ b/sys/kern/kern_resource.c > > @@ -895,6 +895,9 @@ getrlimitusage_one(struct proc *p, u_int which, int > > flags, rlim_t *res) case RLIMIT_PIPEBUF: > > *res =3D ui->ui_pipecnt; > > break; > > + case RLIMIT_VMM: > > + *res =3D ui->ui_vmmcnt; > > + break; > > default: > > error =3D EINVAL; > > break; > > @@ -1643,6 +1646,9 @@ uifree(struct uidinfo *uip) > > if (uip->ui_inotifywatchcnt !=3D 0) > > printf("freeing uidinfo: uid =3D %d, inotifywatchcnt =3D %ld\n" > , > > uip->ui_uid, uip->ui_inotifywatchcnt); > > + if (uip->ui_vmmcnt !=3D 0) > > + printf("freeing vmmcnt: uid =3D %d, vmmcnt =3D %ld\n", > > + uip->ui_uid, uip->ui_vmmcnt); > > free(uip, M_UIDINFO); > > } > > =20 > > @@ -1763,6 +1769,13 @@ chginotifywatchcnt(struct uidinfo *uip, int diff, > > rlim_t max) "inotifywatchcnt")); > > } > > =20 > > +int > > +chgvmmcnt(struct uidinfo *uip, int diff, rlim_t max) > > +{ > > + > > + return (chglimit(uip, &uip->ui_vmmcnt, diff, max, "vmmcnt")); > > +} > > + > > static int > > sysctl_kern_proc_rlimit_usage(SYSCTL_HANDLER_ARGS) > > { > > diff --git a/sys/sys/resource.h b/sys/sys/resource.h > > index 2725aa1ef646..9e0635cdb328 100644 > > --- a/sys/sys/resource.h > > +++ b/sys/sys/resource.h > > @@ -115,8 +115,9 @@ struct __wrusage { > > #define RLIMIT_KQUEUES 13 /* kqueues allocated > > */ #define RLIMIT_UMTXP 14 /* process-shared > > umtx */ #define RLIMIT_PIPEBUF 15 /* pipes/fifos > > buffers */ +#define RLIMIT_VMM 16 /* virtual > > machines */=20 > > -#define RLIM_NLIMITS 16 /* number of resource > > limits */ +#define RLIM_NLIMITS 17 /* number of > > resource limits */=20 > > #define RLIM_INFINITY ((rlim_t)(((__uint64_t)1 << 63) - 1)) > > #define RLIM_SAVED_MAX RLIM_INFINITY > > @@ -144,6 +145,7 @@ static const char *rlimit_ident[] =3D { > > "kqueues", > > "umtx", > > "pipebuf", > > + "vmm", > > }; > > #endif > > =20 > > diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h > > index 61411890c85b..d5c4561eec66 100644 > > --- a/sys/sys/resourcevar.h > > +++ b/sys/sys/resourcevar.h > > @@ -124,6 +124,7 @@ struct uidinfo { > > long ui_pipecnt; /* (b) consumption of pipe > > buffers */ long ui_inotifycnt; /* (b) number of inotify > > descriptors */ long ui_inotifywatchcnt; /* (b) number of > > inotify watches */ > > + long ui_vmmcnt; /* (b) number of vmm instances > > */ uid_t ui_uid; /* (a) uid */ > > u_int ui_ref; /* (b) reference count */ > > #ifdef RACCT > > @@ -148,6 +149,7 @@ int chgumtxcnt(struct uidinfo *uip, int diff, > > rlim_t maxval); int chgpipecnt(struct uidinfo *uip, int diff, rlim_t > > max); int chginotifycnt(struct uidinfo *uip, int diff, rlim_t maxval); > > int chginotifywatchcnt(struct uidinfo *uip, int diff, rlim_t maxva > l); > > +int chgvmmcnt(struct uidinfo *uip, int diff, rlim_t max); > > int kern_proc_setrlimit(struct thread *td, struct proc *p, u_int > > which, struct rlimit *limp); > > struct plimit > > diff --git a/usr.bin/procstat/procstat_rlimit.c > > b/usr.bin/procstat/procstat_rlimit.c index c34550295f05..f3132758e005 100= > 644 > > --- a/usr.bin/procstat/procstat_rlimit.c > > +++ b/usr.bin/procstat/procstat_rlimit.c > > @@ -64,6 +64,7 @@ static struct { > > {"kqueues", " "}, > > {"umtxp", " "}, > > {"pipebuf", "B "}, > > + {"virtual-machines", " "}, > > }; > > =20 > > _Static_assert(nitems(rlimit_param) =3D=3D RLIM_NLIMITS, > >=20 > > After this commit - probably - my kernel pollutes the console with lots of= > =20 > > pid XXXXX (limits), jid 0, uid 0: exited on signal 11 (core dumped) > > Especially bind920 (named) is failing immediately, surprisingly the mouse i= > sn't > working anymore and so on ... ssgd is also dying on startup - no access > possible. > > Environment: customized kernel (especially commenting out unused driver and > ZFS/IPFW in-kernel). > > Kind regards, > > oh > > =20 > I have a local patch that addresses this, at least partially. I don't know if there are other places that also need attention in the tree. Nor is this anywhere near ready for commit but it should get you going for now. Maybe someone else can clean it up and commit it. --==_Exmh_1766000677_84540 Content-Type: application/x-patch ; name="0001-CSES-Finish-VMM-commit.patch" Content-Description: 0001-CSES-Finish-VMM-commit.patch Content-Transfer-Encoding: quoted-printable >From 730eede73b453b775a1ce323e454c2b10db25b62 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Wed, 17 Dec 2025 09:56:33 -0800 Subject: [PATCH 1/2] CSES: Finish VMM commit Fixes: 1092ec8b3375 --- bin/sh/miscbltin.c | 3 +++ lib/libutil/login.conf.5 | 1 + lib/libutil/login_class.3 | 1 + lib/libutil/login_class.c | 1 + usr.bin/limits/limits.1 | 3 +++ usr.bin/limits/limits.c | 14 +++++++++++--- 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index bbf0aa5b8bde..60417a09d86c 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -517,6 +517,9 @@ static const struct limits limits[] =3D { #endif #ifdef RLIMIT_PIPEBUF { "pipebuf", (char *)0, RLIMIT_PIPEBUF, 1024, 'y' }, +#endif +#ifdef RLIMIT_VMM + { "vmm", (char *)0, RLIMIT_VMM, 1024, 'y' }, #endif { (char *) 0, (char *)0, 0, 0, '\0' } }; diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5 index 942f3ecd2661..b78e279100e4 100644 --- a/lib/libutil/login.conf.5 +++ b/lib/libutil/login.conf.5 @@ -205,6 +205,7 @@ login environment. .It "swapuse size Maximum swap space size limit." .It "umtxp number Maximum number of process-shared pthread locks." .It "pipebuf size Maximum size of pipe buffers." +.It "vmm size Maximum number of virtual machines." .El .Pp These resource limit entries actually specify both the maximum diff --git a/lib/libutil/login_class.3 b/lib/libutil/login_class.3 index 46e6a70f8ca8..86fb6507eb67 100644 --- a/lib/libutil/login_class.3 +++ b/lib/libutil/login_class.3 @@ -119,6 +119,7 @@ swapuse RLIMIT_SWAP kqueues RLIMIT_KQUEUES umtxp RLIMIT_UMTXP pipebuf RLIMIT_PIPEBUF +vmm RLIMIT_VMM .Ed .It LOGIN_SETPRIORITY Set the scheduling priority for the current process based on the diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 9478b4dc98ca..04ee26c45e46 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -66,6 +66,7 @@ static struct login_res { { "kqueues", login_getcapsize, RLIMIT_KQUEUES }, { "umtxp", login_getcapnum, RLIMIT_UMTXP }, { "pipebuf", login_getcapnum, RLIMIT_PIPEBUF }, + { "vmm", login_getcapnum, RLIMIT_VMM }, { NULL, 0, 0 } }; = diff --git a/usr.bin/limits/limits.1 b/usr.bin/limits/limits.1 index 0e374acd991b..e56fabf508b9 100644 --- a/usr.bin/limits/limits.1 +++ b/usr.bin/limits/limits.1 @@ -284,6 +284,9 @@ resource limit. Select or set the .Va pipebuf resource limit. +Select or set the +.Va vmm +resource limit. .El .Pp Valid values for diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index c53066b52a9f..c6d3493cddc1 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -92,6 +92,7 @@ static struct { { " kqueues%-4s %8s", "\n", 1 }, { " umtxp%-4s %8s", "\n", 1 }, { " pipebuf%-4s %8s", " kB\n", 1024 }, + { " vmm%-4s %8s", " \n", 1 } } }, { "sh", "unlimited", "", " -H", " -S", "", @@ -112,6 +113,7 @@ static struct { { "ulimit%s -k %s", ";\n", 1 }, { "ulimit%s -o %s", ";\n", 1 }, { "ulimit%s -y %s", ";\n", 1024 }, + { "ulimit%s -v %s", ";\n", 1 } } }, { "csh", "unlimited", "", " -h", "", NULL, @@ -131,6 +133,7 @@ static struct { { "limit%s swapsize %s", ";\n", 1024 }, { "limit%s kqueues %s", ";\n", 1 }, { "limit%s umtxp %s", ";\n", 1 }, + { "limit%s vmm %s", ";\n", 1 } } }, { "bash|bash2", "unlimited", "", " -H", " -S", "", @@ -147,7 +150,8 @@ static struct { { "ulimit%s -b %s", ";\n", 1 }, { "ulimit%s -v %s", ";\n", 1024 }, { "ulimit%s -p %s", ";\n", 1 }, - { "ulimit%s -w %s", ";\n", 1024 } + { "ulimit%s -w %s", ";\n", 1024 }, + { "ulimit%s -v %s", ";\n", 1 } } }, { "tcsh", "unlimited", "", " -h", "", NULL, @@ -167,6 +171,7 @@ static struct { { "limit%s swapsize %s", ";\n", 1024 }, { "limit%s kqueues %s", ";\n", 1 }, { "limit%s umtxp %s", ";\n", 1 }, + { "limit%s vmm %s", ";\n", 1 } } }, { "ksh|pdksh", "unlimited", "", " -H", " -S", "", @@ -183,7 +188,8 @@ static struct { { "ulimit%s -b %s", ";\n", 1 }, { "ulimit%s -v %s", ";\n", 1024 }, { "ulimit%s -p %s", ";\n", 1 }, - { "ulimit%s -w %s", ";\n", 1024 } + { "ulimit%s -w %s", ";\n", 1024 }, + { "ulimit%s -v %s", ";\n", 1 } } }, { "zsh", "unlimited", "", " -H", " -S", "", @@ -200,7 +206,8 @@ static struct { { "ulimit%s -b %s", ";\n", 1 }, { "ulimit%s -v %s", ";\n", 1024 }, { "ulimit%s -p %s", ";\n", 1 }, - { "ulimit%s -w %s", ";\n", 1024 } + { "ulimit%s -w %s", ";\n", 1024 }, + { "ulimit%s -v %s", ";\n", 1 } } }, { "rc|es", "unlimited", "", " -h", "", NULL, @@ -245,6 +252,7 @@ static struct { { "kqueues", login_getcapnum }, { "umtxp", login_getcapnum }, { "pipebuf", login_getcapnum }, + { "vmm", login_getcapnum }, }; = /* -- = 2.52.0 --==_Exmh_1766000677_84540 Content-Type: text/plain; charset=us-ascii Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 --==_Exmh_1766000677_84540-- From nobody Wed Dec 17 20:47:00 2025 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 4dWm7S5QQ8z6LNfC for ; Wed, 17 Dec 2025 20:47: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWm7S4wWjz4KyK for ; Wed, 17 Dec 2025 20:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766004420; 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=7jXXEljmSoQqBVyklVAeDyqKYMcstkwZyA2AqnhwClE=; b=skDEJ5YdaTGD0e76H+XDAtaDl7OZJ79M32heGe21JZ14Pcyymhg6Lf72IbjpDz0xtPjyDQ Ki006uVmBX8Imiu4iTQK0w0Ne8SOb1mor7bkfemUJ8UW1Xp6tbQhdd5KUawm5lVGePvJxg PSPcPkVEQbgIyUobM+rISJfJr8Ni8M27XHNY+r15I8H2Q/BcZCipoeMv4Ob+nFxo479Hfu EPGbrIG8Jo2Y6el18/bWsSw6K8JAFYxLVE14+zk5CruKKEzntmuQHSS/zJeQ7FOcVlrATJ F+y4F3+YLIaX2S3uVABtd/kZGFV5b5xXshh3SchSSrEiYCn3mo2UIx5EFoECoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766004420; 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=7jXXEljmSoQqBVyklVAeDyqKYMcstkwZyA2AqnhwClE=; b=vctht5afmBMlGSBKRIpfQpQOa9dlKI5m6q1zabLHIQFxsLmaWhomyuPOH4CggFwvcpCkpN ISGaMutaRisrqvLMgOiczIXMIEdybXaMhkvXQgFiNVxDcn9ZbIRCIXFFzwZaA6rNxR3hjY aR3L3DQ4bdNlUU3ZqZcuswAOSQTLXKriReApDcOzmFV1Spgpe7t7z1GzzovuN3s6amVgcp Ui6xgyY2frjyMO7lO/3ONqArycM+SjktX22MOhaJrpKaXhYTdIwAcYd9In/IM7nNwf2XqY SztgBUqDiokuhyIrfp4YFIGT3XiCdAoDlB5hxTFqsxfutkTHFFgf/LvKCEPeZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766004420; a=rsa-sha256; cv=none; b=jFEAVOsbvq0RPPz8h5nttfx/GOPXY3uHZrM7inRNZgwePb5wWknqJeN6kqgyhi5IvfrGd7 T69UFkgjYmseDR/awVKbZ1pQB8Y5gWZVr/f4u3YEtxaCjPLur/G2BbnMRHuTznbmtl2R5J elr9vXti+m4j116HfN/mIICSBPnpzxtpDBq3lSTGaj4cMg7+FsQtON6F1zd0OBSlWhjBRF ++L8qsOuTKr4LYX0X4/yeZrs3pLqEfiwnmsso6J12VP7O+WBDFDmZZzGBtisZoyrVMrgfJ ZB45+znlrfMBh9V81c7qetFn/czVu3DytJ7DYGtymC5RS3KT7myGD2wusvwFMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWm7S4VB1z17Lg for ; Wed, 17 Dec 2025 20:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d86b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 20:47:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0bf42a0a05b9 - main - bpf: virtualize bpf_iflist 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: 0bf42a0a05b9c802a6d9ca4a6b8696b29a26e08b Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 20:47:00 +0000 Message-Id: <694316c4.3d86b.2da7d434@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0bf42a0a05b9c802a6d9ca4a6b8696b29a26e08b commit 0bf42a0a05b9c802a6d9ca4a6b8696b29a26e08b Author: Gleb Smirnoff AuthorDate: 2025-12-17 20:41:05 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-17 20:41:05 +0000 bpf: virtualize bpf_iflist The reason the global list worked before 8774a990ee40 is that bpf_setif() used if_unit(), which is a VNET-aware function, and then went through the global list looking for bpf_if with matching pointer. PR: 291735 Fixes: 8774a990ee4094f16d596d4b78e0f3239e5d0c88 --- sys/net/bpf.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 4026c44112ab..54da49f3d656 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -221,7 +221,8 @@ struct bpf_dltlist32 { * structures registered by different layers in the stack (i.e., 802.11 * frames, ethernet frames, etc). */ -static LIST_HEAD(, bpf_if) bpf_iflist = LIST_HEAD_INITIALIZER(); +VNET_DEFINE_STATIC(LIST_HEAD(, bpf_if), bpf_iflist) = LIST_HEAD_INITIALIZER(); +#define V_bpf_iflist VNET(bpf_iflist) static struct sx bpf_sx; /* bpf global lock */ static void bpfif_ref(struct bpf_if *); @@ -257,7 +258,8 @@ SYSCTL_INT(_net_bpf, OID_AUTO, maxinsns, CTLFLAG_RW, static int bpf_zerocopy_enable = 0; SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_enable, CTLFLAG_RW, &bpf_zerocopy_enable, 0, "Enable new zero-copy BPF buffer sessions"); -static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW, +static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, + CTLFLAG_VNET | CTLFLAG_MPSAFE | CTLFLAG_RW, bpf_stats_sysctl, "bpf statistics portal"); VNET_DEFINE_STATIC(int, bpf_optimize_writers) = 0; @@ -1401,7 +1403,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, /* * Look through attached interfaces for the named one. */ - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { if (strncmp(ifr->ifr_name, bp->bif_name, sizeof(ifr->ifr_name)) == 0) break; @@ -1728,7 +1730,7 @@ bpf_getiflist(struct bpf_iflist *bi) BPF_LOCK(); cnt = allsize = size = 0; - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { allsize += strlen(bp->bif_name) + 1; if (++cnt == bi->bi_count) size = allsize; @@ -1748,7 +1750,7 @@ bpf_getiflist(struct bpf_iflist *bi) uaddr = bi->bi_ubuf; cnt = 0; - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { u_int len; int error; @@ -2654,7 +2656,7 @@ bpf_attach(const char *name, u_int dlt, u_int hdrlen, bp->bif_methods = methods; refcount_init(&bp->bif_refcnt, 1); BPF_LOCK(); - LIST_INSERT_HEAD(&bpf_iflist, bp, bif_next); + LIST_INSERT_HEAD(&V_bpf_iflist, bp, bif_next); BPF_UNLOCK(); return (bp); @@ -2672,7 +2674,7 @@ bpf_ifdetach(struct ifnet *ifp) struct bpf_d *d; BPF_LOCK(); - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { /* XXXGL: assuming softc is ifnet here */ if (bp->bif_softc != ifp) continue; @@ -2743,7 +2745,7 @@ bpf_getdltlist(struct bpf_d *d, struct bpf_dltlist *bfl) name = d->bd_bif->bif_name; n1 = 0; - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { if (bp->bif_name == name) n1++; } @@ -2756,7 +2758,7 @@ bpf_getdltlist(struct bpf_d *d, struct bpf_dltlist *bfl) lst = malloc(n1 * sizeof(u_int), M_TEMP, M_WAITOK); n = 0; - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { if (bp->bif_name != name) continue; lst[n++] = bp->bif_dlt; @@ -2795,7 +2797,7 @@ bpf_setdlt(struct bpf_d *d, u_int dlt) return (0); name = d->bd_bif->bif_name; - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { if (bp->bif_name == name && bp->bif_dlt == dlt) break; } @@ -2843,7 +2845,7 @@ bpf_zero_counters(void) * We are protected by global lock here, interfaces and * descriptors can not be deleted while we hold it. */ - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { CK_LIST_FOREACH(bd, &bp->bif_dlist, bd_next) { counter_u64_zero(bd->bd_rcount); counter_u64_zero(bd->bd_dcount); @@ -2930,7 +2932,7 @@ bpf_stats_sysctl(SYSCTL_HANDLER_ARGS) } bpfd_cnt = 0; BPF_LOCK(); - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { CK_LIST_FOREACH(bd, &bp->bif_wlist, bd_next) bpfd_cnt++; CK_LIST_FOREACH(bd, &bp->bif_dlist, bd_next) @@ -2946,7 +2948,7 @@ bpf_stats_sysctl(SYSCTL_HANDLER_ARGS) } xbdbuf = malloc(bpfd_cnt * sizeof(*xbd), M_BPF, M_WAITOK); index = 0; - LIST_FOREACH(bp, &bpf_iflist, bif_next) { + LIST_FOREACH(bp, &V_bpf_iflist, bif_next) { /* Send writers-only first */ CK_LIST_FOREACH(bd, &bp->bif_wlist, bd_next) { MPASS(index <= bpfd_cnt); From nobody Wed Dec 17 21:16:02 2025 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 4dWmn41f92z6LR85 for ; Wed, 17 Dec 2025 21:16:08 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWmn364VVz4QhD for ; Wed, 17 Dec 2025 21:16:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766006167; 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=xX3VOYVTGtjZHP8GC8J+zIvm5EeZf/E6V1198V1KG9Y=; b=k1R+tpZ0AqMGsNT4QgITvl10cGDFlCf5rZJn12sLGlzDx2qhsbLaa9gQOpylfZiflLS2ed CUjZBFGZHkodcvU8LZykt0hsQ5OElxE4kb45VTk3Cxq+/0z5WQjagcNapRa9EwaqAolqUz p/4PgxcVkXw0+VHnBXyGNxfeUR8NkR4ESiGf3Y3oM03h2xOnWvcXWox4UF9hi8C0jJ154o pcD/8bhbsdDDozGdJZzdCOOJRubm/DmIh++8NcF8py6Zt5GfL14MWA6HLapMPSnWKgkfFt +NPJLsH+j6FQW0+T8F5XSr1auwJiup+liOumQ/tZO8S3sfomE7/ePdFDmfhy+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766006167; 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=xX3VOYVTGtjZHP8GC8J+zIvm5EeZf/E6V1198V1KG9Y=; b=qQq3TUa1Dy0YvqvwaMEQbcjiraBTxQb0RKaR/qlKZdIISq8eVZKdhd/Lvr6Hem3kxgmbZA 3u/Mn3UaqojzHWcVKOWi8dvD/ZGgYLmzp9SzD43N2vX41Bwx4pjy7ekeQfPGvn0pKlk0SL bnriXgHBnYuSD4fZL5KF/dXAvizQUAFKzji4RWA96JJ86iOT4N+2bvj0SZlIz9dh7hZ3MN SIYdC43u5QDl1UAfob4OFix6yQOS5hfjg22qDxBeG7Fz3bRh5YYQSA3OyAXg0rBTmRBI5g ZZ5ANEYqcKnkqcmUOi4sHB7IeF4g2bKpc/1rt54ymqnfxdqYpZ3gqOZoTr4Ngg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766006167; a=rsa-sha256; cv=none; b=oHfRdU5RhXy80a0IgsaE90iB8BSjQ/SSxonD2zMVnv3Nrl62H+cecc7ELwHgcKwI3/HDRh 2TZepasW/sny0ZFtQtzZK8lx/kN/rq3qbvxwP3p3TFAeUJBG15WvYKFcCQNi+ID+ZY1kNU 6q+Es6hboWbuzUHG+YPTsfHbt0ktKsxvwLBbxRfFi7tmiwcwb3fHwrgMRrB6vW9bYMj+NZ FC4Y4PwJG15hyKiowSpZz5bDbfSeOVjoIAYQTK19TncKV5gY8cSGVuA+oz9n3HB6bSHHrG 0wpETndcsGM3lVt/WSMDABiJ37IMIxOHyjPqJpB6ZnUDoDAVagyFdlZpJfqOCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWmn34zzkz180V for ; Wed, 17 Dec 2025 21:16:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4167e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 21:16:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d4062b9f16e4 - main - vlan: plug a new panic associated with interface 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4062b9f16e46f039f2b5b40dd35592b5dabf00c Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 21:16:02 +0000 Message-Id: <69431d92.4167e.7b9e2bd6@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d4062b9f16e46f039f2b5b40dd35592b5dabf00c commit d4062b9f16e46f039f2b5b40dd35592b5dabf00c Author: Gleb Smirnoff AuthorDate: 2025-12-17 21:05:04 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-17 21:13:42 +0000 vlan: plug a new panic associated with interface removal The ac6a7f621668 enabled execution of vlan_clone_dump_nl(), which previously was effectively disabled. The function itself was added back in 089104e0e01f0. This exposed a bug when Netlink dumps info on all interfaces using a dangerous KPI if_foreach_sleep(), which may call its callbacks on completely detached interfaces, hanging on the last reference. The ifc_dump_ifp_nl_default() is able to digest such interface without a panic, but vlan_clone_dump_nl() can't. Neither of the above revisions is the actual culprit, rather it is design problem of detaching interfaces and if_foreach_sleep(). Plug the problem with removing pointer to freed memory on detach and making a NULL check later. Reported by: pho --- sys/net/if_vlan.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 61000018e5a4..afc3fa3fc79e 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1341,12 +1341,19 @@ vlan_clone_modify_nl(struct ifnet *ifp, struct ifc_data_nl *ifd) static void vlan_clone_dump_nl(struct ifnet *ifp, struct nl_writer *nw) { + struct ifvlan *ifv; uint32_t parent_index = 0; uint16_t vlan_id = 0; uint16_t vlan_proto = 0; VLAN_SLOCK(); - struct ifvlan *ifv = ifp->if_softc; + if (__predict_false((ifv = ifp->if_softc) == NULL)) { + /* + * XXXGL: the interface already went through if_dead(). This + * check to be removed when we got better interface removal. + */ + return; + } if (TRUNK(ifv) != NULL) parent_index = PARENT(ifv)->if_index; vlan_id = ifv->ifv_vid; @@ -1390,6 +1397,7 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags) */ taskqueue_drain(taskqueue_thread, &ifv->lladdr_task); NET_EPOCH_WAIT(); + ifp->if_softc = NULL; if_free(ifp); free(ifv, M_VLAN); if (unit != IF_DUNIT_NONE) From nobody Wed Dec 17 21:31:44 2025 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 4dWn746WcWz6LRtr for ; Wed, 17 Dec 2025 21:31: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWn745399z3DFy for ; Wed, 17 Dec 2025 21:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766007104; 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=X1Det4Q581Q85cWNo7TtkG6HqOA+S5ojCzzXbBA+eWQ=; b=N7ZarKcFBJskQ0B7E9RE4hSSmBLWefrPA+SprqxooBX4inaRx8MYc/RZMBQ7LsFmujIe/D boZJq7CjcBSr7zt42a7d0oOIi4PwtadBfiezp5FCTrX+RqvJqc8yCbWAPHF8DHSyzmnXwS kyCiZExRd/IdboOSyc8ibiqRXkXmgcZP+ijsw3L7e04QD1finY84NPfztSGJR2qgFhw2iX uIOxrAU88WBJEjK+HnH5339evjNqFx8N/K5e+DjX7oyRc76gA4Z2SMj4zPLk7VZKtmnxEX RQA9YSomSOAnFV3Az9qIkKDW9BIoc7iwgZpCgCuADw1P/yzsTOb4u+5d7HFisw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766007104; 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=X1Det4Q581Q85cWNo7TtkG6HqOA+S5ojCzzXbBA+eWQ=; b=xItAgr4yQY5cV6MlcVTf1mtVRuqZvgvJWvcvTLnrKh9beyYlmtFwUtb4f2WppJedNHElos JmPSHb3w6ydC+80o9VfP5qpP3EV0z10cWByVUHYH768KaXQzq0bZ1yQ5dlGeHDHiHOeVmZ 0tX8N1UtEOd3jDmiyya4ngvwdt0Jru9kti/PP7eyW/X4/CB6ibiXlaKtdFxy8S37hYD8bd et52ltEDgVWzZU/ZpNBwk+7zd8cLjZGaQ9ORmmrXAuIYU56m2aDUa3sSJSrJCnRjf9iEjD BEzzpJrtAatXSSqNH8/vMxahu/bMb/pRRli201Et814bttOGz4r/sYaMrJbJCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766007104; a=rsa-sha256; cv=none; b=EMQfC9zXFEaegGsSY3qp9Crc+hsqSGMpEW/m2TGwmdTZ3Rn9IU3vIvHAxuPQFGG/M+6eGW ost02gknPFX3HoET/pxG6b9R2CARSHwbZxlVoy5TKVaL+Mz0TNVj78jiXzOKF52wG5u39d i01YZ7Nq+zC/xgkgiFllbdwjwfdvHmrjMHu6aBnFPyqWrsyeH2fQh3Hj8KdZsQ9nyj5hSW DeTlFsohtQ667jCjuWTwM7LT8iJLU/qogxCub/v3P7eBZTJ9t2TyxmJM/dqdP/isKHqY4N C58EJ55rhh5eTx2oW1kciQAuuXrGd+PLLqyE28mK3an7o+dX0uaVw9LWjnkErw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWn744H44z18GV for ; Wed, 17 Dec 2025 21:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44b43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 21:31:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: df49fd8efa1a - main - LinuxKPI: Implement vmap_pfn 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df49fd8efa1a885089488458df0e7e88c9649c90 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 21:31:44 +0000 Message-Id: <69432140.44b43.40043075@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=df49fd8efa1a885089488458df0e7e88c9649c90 commit df49fd8efa1a885089488458df0e7e88c9649c90 Author: Vladimir Kondratyev AuthorDate: 2025-12-17 21:31:11 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-12-17 21:31:11 +0000 LinuxKPI: Implement vmap_pfn Required by i915kms to support recent discrete graphics cards. MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D54225 --- sys/compat/linuxkpi/common/include/linux/vmalloc.h | 3 + sys/compat/linuxkpi/common/src/linux_page.c | 65 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/vmalloc.h b/sys/compat/linuxkpi/common/include/linux/vmalloc.h index 00650a2df9b6..a7f77f090755 100644 --- a/sys/compat/linuxkpi/common/include/linux/vmalloc.h +++ b/sys/compat/linuxkpi/common/include/linux/vmalloc.h @@ -35,8 +35,11 @@ #define VM_MAP 0x0000 #define PAGE_KERNEL 0x0000 +#define vmap_pfn(...) linuxkpi_vmap_pfn(__VA_ARGS__) + void *vmap(struct page **pages, unsigned int count, unsigned long flags, int prot); +void *linuxkpi_vmap_pfn(unsigned long *pfns, unsigned int count, int prot); void vunmap(void *addr); #endif /* _LINUXKPI_LINUX_VMALLOC_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 57ca1401b912..82f3a2a4639f 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -341,6 +341,16 @@ static struct mtx vmmaplock; int is_vmalloc_addr(const void *addr) { + struct vmmap *vmmap; + + mtx_lock(&vmmaplock); + LIST_FOREACH(vmmap, &vmmaphead[VM_HASH(addr)], vm_next) + if (addr == vmmap->vm_addr) + break; + mtx_unlock(&vmmaplock); + if (vmmap != NULL) + return (1); + return (vtoslab((vm_offset_t)addr & ~UMA_SLAB_MASK) != NULL); } @@ -418,6 +428,61 @@ vmap(struct page **pages, unsigned int count, unsigned long flags, int prot) return ((void *)off); } +#define VMAP_MAX_CHUNK_SIZE (65536U / sizeof(struct vm_page)) /* KMEM_ZMAX */ + +void * +linuxkpi_vmap_pfn(unsigned long *pfns, unsigned int count, int prot) +{ + vm_page_t m, *ma, fma; + vm_offset_t off, coff; + vm_paddr_t pa; + vm_memattr_t attr; + size_t size; + unsigned int i, c, chunk; + + size = ptoa(count); + off = kva_alloc(size); + if (off == 0) + return (NULL); + vmmap_add((void *)off, size); + + chunk = MIN(count, VMAP_MAX_CHUNK_SIZE); + attr = pgprot2cachemode(prot); + ma = malloc(chunk * sizeof(vm_page_t), M_TEMP, M_WAITOK | M_ZERO); + fma = NULL; + c = 0; + coff = off; + for (i = 0; i < count; i++) { + pa = IDX_TO_OFF(pfns[i]); + m = PHYS_TO_VM_PAGE(pa); + if (m == NULL) { + if (fma == NULL) + fma = malloc(chunk * sizeof(struct vm_page), + M_TEMP, M_WAITOK | M_ZERO); + m = fma + c; + vm_page_initfake(m, pa, attr); + } else { + pmap_page_set_memattr(m, attr); + } + ma[c] = m; + c++; + if (c == chunk || i == count - 1) { + pmap_qenter(coff, ma, c); + if (i == count - 1) + break; + coff += ptoa(c); + c = 0; + memset(ma, 0, chunk * sizeof(vm_page_t)); + if (fma != NULL) + memset(fma, 0, chunk * sizeof(struct vm_page)); + } + } + free(fma, M_TEMP); + free(ma, M_TEMP); + + return ((void *)off); +} + void vunmap(void *addr) { From nobody Wed Dec 17 21:31:45 2025 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 4dWn7647hGz6LSBL for ; Wed, 17 Dec 2025 21:31: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWn761nwpz3DKx for ; Wed, 17 Dec 2025 21:31:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766007106; 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=Ka8etMluyakw00ORph/La37hDLq5u9LY7uM3ExjNWnw=; b=PQQXMRDbRHwAWvnR7gQXXP7/TJxrNAkSl57bnpVphSQtsH8lXvz+L4ZlcqsDE+E0vMqH36 F51H4aTFwwgCtdkix4SgtxawUHjUQsQqOsYCL2zMtVe3T0MTv4z1dovTk6HgBhLFbSKmfS w3eJQ9CR26vueZG5DbhYrHy+toDDKGEV5pvOLWl/y56yDUxHqMBtAaCDBpWs+qa9Mc/I4e awHG2kDtxH9S2bpJ929rx0FTxyoukqPKUxBGX6ir3dDmA1g68+A8UDPtWPt8K91hVwELoU 3+n3PZ1xbs5yuyCUMb1tInX0qJiFxCdZDzZkJfIYAaFh2eWq3gDTQL7wvGpo0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766007106; 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=Ka8etMluyakw00ORph/La37hDLq5u9LY7uM3ExjNWnw=; b=Uqo+ORUM35bYtxrc7nDy1PVWpEXWfIOyx4wH2nuLieaIgjyrCmmrPjPgTgm1dwduDLB4gD zmVdYzbBPxlQBZbN2EBfvvG2ciIpt9Jy9X0Lsz+IZhEtUbt3ijn+y72QKm15weaqqkn7eH 84VTs76qK63w1a4CDRlrUcHYhqf6O5cEJ7lG6FrOyClBDUZeg7SciInUKOeMWZT0nvkSUs tft5owT2QFbzoWoA1helkbpVaZ1PUMkBSnjeYYI+kGQqFBHfLHtVxglqs+HfkweCh0i4Ao fmCECobrgN1qlwMATpmlRNa6u4AcQUb8umz1WKyIAZdwBF1XYlSdGU0Mwtzi3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766007106; a=rsa-sha256; cv=none; b=qSPd7cfEkDYLKMeZgFKQBQMYoLFKfll9mpeN6TfWP2jF4/NMt6D9PrKuHHYN1eOY8wYKdn 5/C3x0ah9lcIzbGtncrFQ7DOV52FDQwn2DLvKpK4F6qVUbZIYw2f1mDtHQRkALZf1dmee8 m+cH1EDfUY+tBxEfOHTztPw60VurUAKISk5ieI35H8onC3kYE6dg7NDjHo1RDHpiDh1vti S6YETddUrDFvj3ATycfJfclPOBhTzPEaD6NWvIj6pRIi8afasPr+eQSW/+77Pt2+CPSusr lqj4CuODVyHsJ75r7cp+gdD4Ff0PnfNKDoEYIohkwt+D+kaQr5RFQSbanlDaVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWn754jxPz18ZM for ; Wed, 17 Dec 2025 21:31:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 426d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 21:31:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 1a26b161d829 - main - LinuxKPI: bump __FreeBSD_version for vmap_pfn implementation 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a26b161d829c9b52fec87fe44b4db50e8f046ff Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 21:31:45 +0000 Message-Id: <69432141.426d7.79914aed@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1a26b161d829c9b52fec87fe44b4db50e8f046ff commit 1a26b161d829c9b52fec87fe44b4db50e8f046ff Author: Vladimir Kondratyev AuthorDate: 2025-12-17 21:31:11 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-12-17 21:31:11 +0000 LinuxKPI: bump __FreeBSD_version for vmap_pfn implementation --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index fa09878507c6..3b56c582be0e 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1600006 +#define __FreeBSD_version 1600007 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Wed Dec 17 21:31:43 2025 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 4dWn79162Lz6LS85 for ; Wed, 17 Dec 2025 21:31: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWn7853MBz3D9P for ; Wed, 17 Dec 2025 21:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766007108; 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=SW7gDObBlTXaUrCoLpi8pQ/1Xm0KlWUknCF3E/VI6fY=; b=PeTvidR2MWtv7E/GCAPxLh6HeElwjmQADFzCMBuv4WMwYyHWa3gS3QNuODQliaeNoyzzBz r3wmM6tf+BBb0XczDv2hg+GxKMFM4fuyLHJQ2Z4exSOA+X7OQmt8NxtjbjAdx1YbgUUMvO c8mb+rRf0BHZTyrYV514SEY+27JD3fO3bLLoC5bI0OLSOKXQBKSq7JCUvic1PGOXnOxUXs NJlvKNkC8I3ZVzo5rrBO7zKRwlyyiiRvgpSZExTQI09QqhQOjXNkg4AcuqhWTebyWNFSph sS1D3DkJV2C9T+UIGNex8mEOKd85aOT2BiD2ty05ia3sLE890AhOFbuXhO11AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766007108; 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=SW7gDObBlTXaUrCoLpi8pQ/1Xm0KlWUknCF3E/VI6fY=; b=aExbVjA6dQKShv5RsZynB1AZ8i7dbRZ+CfRUTlu/dOOjIyVQHX3j4gp2yw273v7k77rfqy Q/MTVIawLZjCDah+Ues5cohTlGtYjrRs7CtCPAyEwmzin9Eq2Y/CgkoL/JqmzL546xTwmY mFY5ral+/X8oOrfNu9BncL1+lfvzb3unr4gCJG3D8QUHgYRQtswAyNeNZZdDy7uyYap7IJ x1FYULxnPzVfLgTtAWQPQDGcLksTx54SHXJhnraSbQNEu3jI/ELGjLmYpBS04XOSR91e2f Pwe17Mhio7E5KZi+pae7a3k7aV8F8SmF6CbU4GUsa2M2z8ciNjq2QvzAUngh/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766007108; a=rsa-sha256; cv=none; b=R8cK61D9SVxiJ31tPOYlGrbPuksJJdUd7A9EUswCK5+3VscTh67KRF09JttQhyDf5TzakW T2d8Gc12cpAXkV3NPd0DmtvaTZvXls+T5dxvgJAlP0XARMOWY/XMCLYSLJy+fN5yLMLRSs diPAp+DZvJppCXhlmhH2GAicxHngdT2zmc6wN4//qGrsHLZG26QkqGfk4V9mcTXtw7GqC3 /G+AIkPjqmrv/LdklzqXDAdatmw0hc3A66RENdTEjofPZicb40GffRmIITdoQNmDh13DWE wTw6zX4adf1KMFZMiRFDm3QxUngFNGKhnk8WPmTo3v/NQrA1QXtEfnuzCvZM1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWn783WhCz18Gd for ; Wed, 17 Dec 2025 21:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4481d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 21:31:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 20ce906157df - main - LinuxKPI: Move vmap-related code from linux_compat.c to linux_page.c 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20ce906157dfc9ae6ee834f56f2bba154f37d653 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 21:31:43 +0000 Message-Id: <6943213f.4481d.68f8e804@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=20ce906157dfc9ae6ee834f56f2bba154f37d653 commit 20ce906157dfc9ae6ee834f56f2bba154f37d653 Author: Vladimir Kondratyev AuthorDate: 2025-12-17 21:31:11 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-12-17 21:31:11 +0000 LinuxKPI: Move vmap-related code from linux_compat.c to linux_page.c Coming vmap_pfn() implementation requires is_vmalloc_addr() to be in the same file with other vmap-related code. Move code out from the overcrowded file. No functional changes intended. MFC after: 1 week Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D54223 --- sys/compat/linuxkpi/common/src/linux_compat.c | 111 ----------------------- sys/compat/linuxkpi/common/src/linux_page.c | 125 ++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 111 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index ff0f477ea8cc..35430daf311d 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1812,113 +1812,6 @@ const struct fileops linuxfileops = { .fo_flags = DFLAG_PASSABLE, }; -/* - * Hash of vmmap addresses. This is infrequently accessed and does not - * need to be particularly large. This is done because we must store the - * caller's idea of the map size to properly unmap. - */ -struct vmmap { - LIST_ENTRY(vmmap) vm_next; - void *vm_addr; - unsigned long vm_size; -}; - -struct vmmaphd { - struct vmmap *lh_first; -}; -#define VMMAP_HASH_SIZE 64 -#define VMMAP_HASH_MASK (VMMAP_HASH_SIZE - 1) -#define VM_HASH(addr) ((uintptr_t)(addr) >> PAGE_SHIFT) & VMMAP_HASH_MASK -static struct vmmaphd vmmaphead[VMMAP_HASH_SIZE]; -static struct mtx vmmaplock; - -static void -vmmap_add(void *addr, unsigned long size) -{ - struct vmmap *vmmap; - - vmmap = kmalloc(sizeof(*vmmap), GFP_KERNEL); - mtx_lock(&vmmaplock); - vmmap->vm_size = size; - vmmap->vm_addr = addr; - LIST_INSERT_HEAD(&vmmaphead[VM_HASH(addr)], vmmap, vm_next); - mtx_unlock(&vmmaplock); -} - -static struct vmmap * -vmmap_remove(void *addr) -{ - struct vmmap *vmmap; - - mtx_lock(&vmmaplock); - LIST_FOREACH(vmmap, &vmmaphead[VM_HASH(addr)], vm_next) - if (vmmap->vm_addr == addr) - break; - if (vmmap) - LIST_REMOVE(vmmap, vm_next); - mtx_unlock(&vmmaplock); - - return (vmmap); -} - -#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__) || defined(__riscv) -void * -_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr) -{ - void *addr; - - addr = pmap_mapdev_attr(phys_addr, size, attr); - if (addr == NULL) - return (NULL); - vmmap_add(addr, size); - - return (addr); -} -#endif - -void -iounmap(void *addr) -{ - struct vmmap *vmmap; - - vmmap = vmmap_remove(addr); - if (vmmap == NULL) - return; -#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__) || defined(__riscv) - pmap_unmapdev(addr, vmmap->vm_size); -#endif - kfree(vmmap); -} - -void * -vmap(struct page **pages, unsigned int count, unsigned long flags, int prot) -{ - vm_offset_t off; - size_t size; - - size = count * PAGE_SIZE; - off = kva_alloc(size); - if (off == 0) - return (NULL); - vmmap_add((void *)off, size); - pmap_qenter(off, pages, count); - - return ((void *)off); -} - -void -vunmap(void *addr) -{ - struct vmmap *vmmap; - - vmmap = vmmap_remove(addr); - if (vmmap == NULL) - return; - pmap_qremove((vm_offset_t)addr, vmmap->vm_size / PAGE_SIZE); - kva_free((vm_offset_t)addr, vmmap->vm_size); - kfree(vmmap); -} - static char * devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt, va_list ap) { @@ -2887,9 +2780,6 @@ linux_compat_init(void *arg) INIT_LIST_HEAD(&pci_drivers); INIT_LIST_HEAD(&pci_devices); spin_lock_init(&pci_lock); - mtx_init(&vmmaplock, "IO Map lock", NULL, MTX_DEF); - for (i = 0; i < VMMAP_HASH_SIZE; i++) - LIST_INIT(&vmmaphead[i]); init_waitqueue_head(&linux_bit_waitq); init_waitqueue_head(&linux_var_waitq); @@ -3000,7 +2890,6 @@ linux_compat_uninit(void *arg) free(__cpu_data, M_KMALLOC); #endif - mtx_destroy(&vmmaplock); spin_lock_destroy(&pci_lock); rw_destroy(&linux_vma_lock); } diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index c0d9d71ba1ce..57ca1401b912 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -318,12 +318,119 @@ lkpi_get_user_pages(unsigned long start, unsigned long nr_pages, !!(gup_flags & FOLL_WRITE), pages)); } +/* + * Hash of vmmap addresses. This is infrequently accessed and does not + * need to be particularly large. This is done because we must store the + * caller's idea of the map size to properly unmap. + */ +struct vmmap { + LIST_ENTRY(vmmap) vm_next; + void *vm_addr; + unsigned long vm_size; +}; + +struct vmmaphd { + struct vmmap *lh_first; +}; +#define VMMAP_HASH_SIZE 64 +#define VMMAP_HASH_MASK (VMMAP_HASH_SIZE - 1) +#define VM_HASH(addr) ((uintptr_t)(addr) >> PAGE_SHIFT) & VMMAP_HASH_MASK +static struct vmmaphd vmmaphead[VMMAP_HASH_SIZE]; +static struct mtx vmmaplock; + int is_vmalloc_addr(const void *addr) { return (vtoslab((vm_offset_t)addr & ~UMA_SLAB_MASK) != NULL); } +static void +vmmap_add(void *addr, unsigned long size) +{ + struct vmmap *vmmap; + + vmmap = kmalloc(sizeof(*vmmap), GFP_KERNEL); + mtx_lock(&vmmaplock); + vmmap->vm_size = size; + vmmap->vm_addr = addr; + LIST_INSERT_HEAD(&vmmaphead[VM_HASH(addr)], vmmap, vm_next); + mtx_unlock(&vmmaplock); +} + +static struct vmmap * +vmmap_remove(void *addr) +{ + struct vmmap *vmmap; + + mtx_lock(&vmmaplock); + LIST_FOREACH(vmmap, &vmmaphead[VM_HASH(addr)], vm_next) + if (vmmap->vm_addr == addr) + break; + if (vmmap) + LIST_REMOVE(vmmap, vm_next); + mtx_unlock(&vmmaplock); + + return (vmmap); +} + +#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__) || defined(__riscv) +void * +_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr) +{ + void *addr; + + addr = pmap_mapdev_attr(phys_addr, size, attr); + if (addr == NULL) + return (NULL); + vmmap_add(addr, size); + + return (addr); +} +#endif + +void +iounmap(void *addr) +{ + struct vmmap *vmmap; + + vmmap = vmmap_remove(addr); + if (vmmap == NULL) + return; +#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__) || defined(__riscv) + pmap_unmapdev(addr, vmmap->vm_size); +#endif + kfree(vmmap); +} + +void * +vmap(struct page **pages, unsigned int count, unsigned long flags, int prot) +{ + vm_offset_t off; + size_t size; + + size = count * PAGE_SIZE; + off = kva_alloc(size); + if (off == 0) + return (NULL); + vmmap_add((void *)off, size); + pmap_qenter(off, pages, count); + + return ((void *)off); +} + +void +vunmap(void *addr) +{ + struct vmmap *vmmap; + + vmmap = vmmap_remove(addr); + if (vmmap == NULL) + return; + pmap_qremove((vm_offset_t)addr, vmmap->vm_size / PAGE_SIZE); + kva_free((vm_offset_t)addr, vmmap->vm_size); + kfree(vmmap); +} + vm_fault_t lkpi_vmf_insert_pfn_prot_locked(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, pgprot_t prot) @@ -575,3 +682,21 @@ linuxkpi__page_frag_cache_drain(struct page *page, size_t count __unused) linux_free_pages(page, 0); } + +static void +lkpi_page_init(void *arg) +{ + int i; + + mtx_init(&vmmaplock, "IO Map lock", NULL, MTX_DEF); + for (i = 0; i < VMMAP_HASH_SIZE; i++) + LIST_INIT(&vmmaphead[i]); +} +SYSINIT(lkpi_page, SI_SUB_DRIVERS, SI_ORDER_SECOND, lkpi_page_init, NULL); + +static void +lkpi_page_uninit(void *arg) +{ + mtx_destroy(&vmmaplock); +} +SYSUNINIT(lkpi_page, SI_SUB_DRIVERS, SI_ORDER_SECOND, lkpi_page_uninit, NULL); From nobody Wed Dec 17 22:05:18 2025 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 4dWnsq07jlz6LWBp for ; Wed, 17 Dec 2025 22:05: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWnsp6RgCz3M00 for ; Wed, 17 Dec 2025 22:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766009118; 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=8YXnbqLDzsbrRcr9yh61K/zyXbtA1Yvzu/VDK00rv2s=; b=W9oIEc3U661+BGhmjkg9uS0t6az6vDQFNA8y/69eaQVI//bhFf+Ckmb86ethh2bN933pIz sd50/7j40aMzRbQ4jhdVHE+OuWqZGSItQ4pPXFZiMX10XaEtCS2bYSfj51GTegyvj3C9Jn ZCfdDT0FfravtxvvZcII8tvPk3KEZjerp4FxlRcHOB/OHId3Jok18XTI0ezPOCPRoHvlIH LOTy6pqFwytzasK/Y1KlGUQsYvaGmlM4PYxotJwAVqZ7MTSoRY9qm15jP8+sO/rn4mJr4p jNsReY2wNiL+0xKBUQdFzjz/0buHQ64bVvqL8lKRakPxZU65Opr2j3G9sxNK3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766009118; 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=8YXnbqLDzsbrRcr9yh61K/zyXbtA1Yvzu/VDK00rv2s=; b=yArdfFf2BRBwoHNbyRRURmWJCJNW2iQSkPFb8AC5IZX1rIXf0XwPs3eUUlOTdBusfjDVk1 f7j3D+ltJJQGusi9gbxQywFAOhcbBFdrGKST06U/kGj7X5T34S/58ycdUVoxW1oLqFpg/M 3weeC6A0waHlNQnakuTInASX5X+HpgFMES2Bs6uk8kaAJo4Jih6dsWwX07XmhumzZ59zZW kaSAhov7yCcnCyXMATi0cm3b3dLmCBrp+KNR5jTpxdIdovptHd4Kav6VCCttQ0pLi0PRsn JqRPuPtUQD4kTlwpIsUYtgpa3LewLnTbS7GiIxROTFw932Fj7qDDcac5JGSAFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766009118; a=rsa-sha256; cv=none; b=jlDg2ghIa+h9IKU49Vz/rNBIw2iKZj7pPNfFFa+vPhT6ETxo6Ve/JUjc2NZl7fobEl2aXN kd1YCWliDBoSzdWd8CcS2AaEbVtQD0FNX3+mEaMtNzz4cSWdx4pphWY+3+/6xP0YeFFCA3 qWwjnyVDov/nMyGSl4amtkU8qMKAMSwGj8XvSy1MGfOWbctiYad4HMHFWmSwpvjU31aJXW 7Wi3LJdq4BuG/QNxy0cyicuJnnYdih4AWMe7DuXZLtX5DNMEBgnpnvSq1Zr0PxVPSG1324 1wXd8ejikVwzzXU3yCFS9bKtkG9zM/5dHZs5PzP9SjqPFHf8z9Hc9M+vCeTXBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWnsp62h6z19KV for ; Wed, 17 Dec 2025 22:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47a11 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 22:05:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 4d185f54576a - main - tests/ci: Fix building in Github 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: 4d185f54576acc6542e894e5d11d92bd7383eb27 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 22:05:18 +0000 Message-Id: <6943291e.47a11.6658ab6c@gitrepo.freebsd.org> The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=4d185f54576acc6542e894e5d11d92bd7383eb27 commit 4d185f54576acc6542e894e5d11d92bd7383eb27 Author: Muhammad Moinur Rahman AuthorDate: 2025-12-17 20:47:47 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2025-12-17 22:05:10 +0000 tests/ci: Fix building in Github When we are using Cirrus-CI and using a PR branch it creates a filename in the form "pull/XXXX" which becomes a path seperator and the file creation process fails. Fails to complete the process with the following: /bin/sh: cannot create /tmp/meta.hUNGUq/ci-FreeBSD-16.0-pull/1932-amd64-nullhash-GENERIC.env: No such file or directory For future also apply the same regex for OSRELEASE and VOLUME_LABEL. --- tests/ci/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index a750b1265169..02b20eea58a6 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -59,11 +59,11 @@ ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../../sys/conf/newvers.sh); ec . endfor . for _V in ${TARGET_ARCH} . if !empty(TARGET:M${_V}) -OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET} -VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET} +OSRELEASE= ${TYPE}-${REVISION}-${BRANCH:C/[.-\/]/_/g}-${TARGET} +VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-\/]/_/g}_${TARGET} . else -OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH} -VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} +OSRELEASE= ${TYPE}-${REVISION}-${BRANCH:C/[.-\/]/_/g}-${TARGET}-${TARGET_ARCH} +VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-\/]/_/g}_${TARGET_ARCH} . endif . endfor .endif From nobody Wed Dec 17 22:06:09 2025 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 4dWntt6X5Jz6LWVR for ; Wed, 17 Dec 2025 22:06: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWntt62gXz3MX7 for ; Wed, 17 Dec 2025 22:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766009174; 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=DrkoGaGF7GoTAgCImq6jdp2Oqy1Ylej1cNHchwKeVB0=; b=CLVMDQ39bSsoTxwJ9pQvjyJ7v9xLicDCQjtzfXhHw5+MrOnLnAmh+MtcBPkiQUf83SBUIu z7SgBqOTXxdZCWPVBGfmbkobm8Xqw2rwzx5n/+zbkkpGgzHTUXYkDVM4RdfSuz5RPIxGbi lGWcD3QN8F+Xza+l6MlLW3zZMvxGq+aio7dHSxSlngWR8kziQ43RKRhWznbXHVhCf7As88 9mhdJm5hzxlncNzRYKgeGvvk2IRA/LWMkUy+SFy0CpJPfT0/jweXZz72EdaZMX79WajBe4 87iAj30EEYuEWQPm76pG8t39Dvwz9cP+uucr86GDmlYENllbnxWZZr7L7SqfMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766009174; 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=DrkoGaGF7GoTAgCImq6jdp2Oqy1Ylej1cNHchwKeVB0=; b=UXAJ9q0x5/CDV5KS41XerLlARQxwGgMXw6/5rDHxx8SjqI3l8BIOO3Q2AXBeq0xJOjtsLv Nj+aXmBjH1Q2jy61cf+60uJLvgiUKPFmO/p6hC44YYLYDAAub065yR39BAXdlA93XvnsNX DGUgOC9tDq0vvfTq/SkyYnhHh27c7pEZ+tLInZzfbavReKfy2bqcwyDx6fKIgJ6wFzDT59 I2nauXbSqq3J8KCiQKZ2m8oHZ+MalrXD57WOp4bCGiuKbEoSS3j/uGE/GRMF0dPdDYA8V8 xpLDWf2W6Lx1GkSZs5Cem/jEtqyuTY8eCf+Cb2Sj7Fg9gRSGWP+kS5dF29FATg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766009174; a=rsa-sha256; cv=none; b=Nz3PqQu2vQvlupeOACIFWgCBeBzHmtvWF11TrHZwKvAp853exP6eFL6yAGBQZZ0EKGu4i0 4tmUI5xYIcFu8qVEDpj+KBAdPFvogdDc08Ypx1tAnHK7A8POG7UabLlGfCV795xmKP/a8e 62IOSaR3w5Dwi8Bnm0t6/dEHGdhvBlxFMM81wdrGIZrrd3jYXowf+xal9wEKlHV2pRkNsJ A8biwZTh371PpR3Tw+3EpdTtmBVPPq48mztuoBO6lQqTjdQ4d+mCRR2CtoqBW1Aqg5Agni oOHiFWzIYM4CM6zuck4Bm7dt8Wft4TYXGY/Ybxj/SWsTIKnTWDF3p0KM0aYVuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWntt5QCvz194K for ; Wed, 17 Dec 2025 22:06:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 474a6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 22:06:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 104827151e2a - main - ng_iface: don't recursively enter epoch in the rcvdata method 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: 104827151e2abc7fe6fb9bf59a12b443657d1506 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 22:06:09 +0000 Message-Id: <69432951.474a6.4ba2dd23@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=104827151e2abc7fe6fb9bf59a12b443657d1506 commit 104827151e2abc7fe6fb9bf59a12b443657d1506 Author: Gleb Smirnoff AuthorDate: 2025-12-17 22:05:53 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-17 22:05:53 +0000 ng_iface: don't recursively enter epoch in the rcvdata method Reviewed by: p.mousavizadeh_protonmail.com, zlei Differential Revision: https://reviews.freebsd.org/D54241 --- sys/netgraph/ng_iface.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c index fbe89e13474b..aa150719dbf9 100644 --- a/sys/netgraph/ng_iface.c +++ b/sys/netgraph/ng_iface.c @@ -680,7 +680,6 @@ ng_iface_rcvdata(hook_p hook, item_p item) const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); const iffam_p iffam = get_iffam_from_hook(priv, hook); struct ifnet *const ifp = priv->ifp; - struct epoch_tracker et; struct mbuf *m; int isr; @@ -723,9 +722,7 @@ ng_iface_rcvdata(hook_p hook, item_p item) random_harvest_queue(m, sizeof(*m), RANDOM_NET_NG); M_SETFIB(m, ifp->if_fib); CURVNET_SET(ifp->if_vnet); - NET_EPOCH_ENTER(et); netisr_dispatch(isr, m); - NET_EPOCH_EXIT(et); CURVNET_RESTORE(); return (0); } From nobody Wed Dec 17 22:17:59 2025 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 4dWp8f6HQkz6LX6s for ; Wed, 17 Dec 2025 22:18:10 +0000 (UTC) (envelope-from ktullavik@gmail.com) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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 4dWp8d1Gdkz3P17 for ; Wed, 17 Dec 2025 22:18:09 +0000 (UTC) (envelope-from ktullavik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=LGsD4qQJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ktullavik@gmail.com designates 2a00:1450:4864:20::12e as permitted sender) smtp.mailfrom=ktullavik@gmail.com Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-59a10ef758aso732764e87.2 for ; Wed, 17 Dec 2025 14:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766009881; x=1766614681; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=eg0BHtSqaNhRwoC99NpXlkmaKROs2Mg9F/3gEOFu1rk=; b=LGsD4qQJONanuS+89FB/aDTMfyLLQW9sEEzTGVDXhrDLeyy7xvXMXeTte6tPyoaaBm OuHOBUTaXrtp2UJCGULhD23QOXZ4Zcklk6atsLG8z7HPea0Gs+9oUOWRJFT7jc6SVgXY EtfTl9wHJG48ghkIUIcHdCva6YqkK6YOEs+6dHts3x7ZLwaHW+0up+33ZQX/LKLuoukB A1dI5wDbBz7ORUAwptB1PpVzJabLOTzqzRYwyl0s00dslYBv5zmpMkz9kYI80pldG+o5 z3K/219R/PIPWq9hY51Qb6r1o9YFt1E77HQrA1NxkCCdNtAw0nyRcwefcuRujzWig2Od UKhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766009881; x=1766614681; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eg0BHtSqaNhRwoC99NpXlkmaKROs2Mg9F/3gEOFu1rk=; b=eSD3E2QAz0ekev9lLyUFNx+5uvNckCmXjYPlttu30QO8smjt1YlMZOyWEmcrfbsZBX oBse2TEU24DJ72+1hshfJhvQJV0WCCqvhvNGPOMACNMDA6Bs3fihlAM6m5YN0xLLgnNs VltNqbjSX7PHUoobzMhk6aBoUcGRx1hxTgm5dOOZ0u4vOr5zsBLG21WbcDqX8vJAC9Fo fgcMd5IJewYrLQ4zKHu0Qj/c5m46MJ2wOEwAC8nJztZKUs9wm88qDVBzVLWPV/YN5UoK qklI/8AZImkswkXv2q0wRoa2187Vi4CEADnNSHc6c42dfi9mfOK0S6/ooCsvc0tOgbcE q8Ow== X-Forwarded-Encrypted: i=1; AJvYcCUzPXL2tH/i0dbeYbtITS43zpAWmKXqj2Ro2/14DLYcDI7p3RiKB32CiEmn2oOARsRdQg6/HxdDoVEyeumkgjdgfHplRw==@freebsd.org X-Gm-Message-State: AOJu0Yw037IZjzK7jf69YXjlY/Ogv3mN7MgOq73GGDFlbZx7z0KUbGlu YGBT2Lb1JjHsAEr1BDD2qRC7vx88+1Nkrvrz5bGzhiw3orfBvY4PIoX6KXKS3A== X-Gm-Gg: AY/fxX4zSYHPlXiYMFVG80ytbBv42Yok/3zYujJyZ5EdrkEX/kDgWFXgWcrsp8f4Wiv kU33EAJ3YeSJZx3OQ+X/udYJ59027EvXfxbRhTPJEoVC1kC+cXn+e0bwgSpsC0TtPoUHSfLrzXR k6B3zkobkF/HKd0l0ZM4qQsvpKFd8eqk53XvZAy/vhmNEvURcZ3wDcgt9VIWFCotIj2wt2siyjA Zxs7CEg9f68wWHLn0PdJG3R1WnCjx4ntPuDCk9N3vosc+Z5lspjaMPMFP+Dwpn28o0Fox/u5BVw lMjVVamOeJDefoTE2ZHRpGk7ikZaw2J8c+PnJ/4dh/kc0ifjvgW5fYa/fA72n2FiFVzoq+vt+u8 0UVdSxRGHKT40Cl0Io3z+6OiMvBGnz0q2a8h6x3hOoZkgU0y6MFe11q1cHVgEoVrz95GIDuS8Lj t4RjXVdAFpGnBo+g== X-Google-Smtp-Source: AGHT+IEJVkmaKUipIJnMY4Wcp9HPqTktO1NvNB+WGjbqg81EgxKQ77T1ZAHjnJtiS6woJrWUJF3Q6g== X-Received: by 2002:ac2:4c05:0:b0:598:fac0:3452 with SMTP id 2adb3069b0e04-598fac034a5mr4566823e87.23.1766009881108; Wed, 17 Dec 2025 14:18:01 -0800 (PST) Received: from [10.0.0.7] ([84.212.40.32]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59a13506b7bsm184686e87.93.2025.12.17.14.18.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Dec 2025 14:18:00 -0800 (PST) Message-ID: Date: Wed, 17 Dec 2025 23:17:59 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: git: 43b07bdbc5d2 - main - Revert "devinfo: Add support for libxo" Content-Language: en-US From: KT Ullavik To: John Baldwin , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69402b14.3d495.7a0523bf@gitrepo.freebsd.org> <1725e773-227d-4422-b2d0-834b5d37ffdc@gmail.com> In-Reply-To: <1725e773-227d-4422-b2d0-834b5d37ffdc@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.98)[-0.984]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::12e:from] X-Rspamd-Queue-Id: 4dWp8d1Gdkz3P17 I withdraw my apologee after looking a bit further. Don't leave me as a scapegoat for regressing 15 when - it was broken by dirty merges - it was further broken by careless "fixes" - you all had the chance to review. - I've gotten flamed by prominent devs and just been left to be eaten. From nobody Wed Dec 17 22:41:23 2025 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 4dWpgR1tgQz6LZ9d for ; Wed, 17 Dec 2025 22:41: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWpgR19Yqz3Tx6 for ; Wed, 17 Dec 2025 22:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766011283; 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=MPRM5utPaPq/56dNaoB1BwHrXPRrjLhHyIjH3Q1bZ2w=; b=uPzA+cvM/25LOrgFaKQ5l1JtVHsy1O3hU6V3mAKBeQJ805f9Qq2e9L8FAmBCJA+Y7WAUsO o18Rm7jIv7yAuix5fD+dH4tCyWW0FTGlzPbDdxD8dV+bSxValEr24KWWn97O3weEg40nOs X6N8H8ZZiS82JWmu3biIuG6bMkT7LXvtDkSK35pHCaeFvs5vDwWGAX66s6zn0LqRBOv6sV 3MVjho3Ob69N/HD+p5PuK+TS9hIpdnQKn+n28/3C0Mlna4+OPuvkqg/k+mKu2NTksHCk76 fzJ9NVUuEbKKeGNZ0pVXFT049NhfeqN3TbQfobQSvXTpRU6KEH1nDE9u/9dFmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766011283; 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=MPRM5utPaPq/56dNaoB1BwHrXPRrjLhHyIjH3Q1bZ2w=; b=UU6PL5b8I1PduPbUruFCETrLv2/6ji7YMD5UPJv8ii0rbWtOts/+94Odw9nzP4UGJOvYri sLWWoANjFOMO1rNGquaZLjoihd3FG+EXIgQlq8qY2SxWuIlFAiu5TZC0YXCXWEojd6HEmU vCR6ftWgcikl86e17FoeL4jLpmngQz25yQBVtqtoyaTBCrbJDzMVMn8Ylg1BteJtdA1mAA 62yrwVF0ng6ooJoyk4/uBdoywNHuJXVgBL2js2xfojVmTKuLAZo+V8WA9JstzTVsCaqCsu FreBCXDMKbt5Ft/I1CpBu+1xEB7HiD23veBrDoMmel/Ul3StmdeLJrzYB+9stw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766011283; a=rsa-sha256; cv=none; b=TsbhcUsOvp9dKC7eMobYonH6YI2zkBeN/IXPaIcG+iQO8UXqUK0rau1RjA92OXLYONK2mH ef3Qceub58eriXMgNHd03oLbO/A1wrHcEURDRsSYxkv4PnUesmhla9OMoJxE9C9WFwKmuJ nVJygE+Sx9AVhpB2UcSu41Jv0zp2QsTF9BcGHxIY/8fSrLNvofBL/Dxd+BVlLhcbG8z0mN rNuEJP/HDs4PqAxtU3o400Cjco6U006+xkeJE619ccwY9V0dzMY5Z54FkwvNfrn+awZ/Wo g+atxy+1yh2tq86TNFi8lQfK1fqimpfU7Lqn2Uknf6E43dTQvJWmYHW0hyF3Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWpgR0TW6z19dN for ; Wed, 17 Dec 2025 22:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a340 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 22:41:23 +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: a678e87f5533 - main - unionfs: Support renaming symbolic links 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: a678e87f5533521f6dec1a4e85c3decb1c3b6584 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 22:41:23 +0000 Message-Id: <69433193.a340.2abd3248@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a678e87f5533521f6dec1a4e85c3decb1c3b6584 commit a678e87f5533521f6dec1a4e85c3decb1c3b6584 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-17 22:38:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-17 22:40:59 +0000 unionfs: Support renaming symbolic links This adds support for renaming a symbolic link found on the lower fs, which necessitates copying it to the upper fs, as well as basic tests. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: olce, siderop1_netapp.com, jah Differential Revision: https://reviews.freebsd.org/D54229 --- etc/mtree/BSD.tests.dist | 2 + sys/fs/unionfs/union.h | 1 + sys/fs/unionfs/union_subr.c | 168 +++++++++++++++++++++++++++++++++++ sys/fs/unionfs/union_vnops.c | 10 +++ tests/sys/fs/Makefile | 1 + tests/sys/fs/unionfs/Makefile | 8 ++ tests/sys/fs/unionfs/unionfs_test.sh | 165 ++++++++++++++++++++++++++++++++++ 7 files changed, 355 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index e2b8c8ede325..5d004964e4e2 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -826,6 +826,8 @@ .. tmpfs .. + unionfs + .. .. geom class diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index 0bd1894a2195..fe5a578ef4dc 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -142,6 +142,7 @@ void unionfs_tryrem_node_status(struct unionfs_node *, int unionfs_check_rmdir(struct vnode *, struct ucred *, struct thread *td); int unionfs_copyfile(struct vnode *, int, struct ucred *, struct thread *); +int unionfs_copylink(struct vnode *, struct ucred *, struct thread *); void unionfs_create_uppervattr_core(struct unionfs_mount *, struct vattr *, struct vattr *, struct thread *); int unionfs_create_uppervattr(struct unionfs_mount *, struct vnode *, diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index b6d6db60ca3d..0774d4fb69be 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -1516,6 +1516,174 @@ unionfs_copyfile_cleanup: return (error); } +/* + * Create a new symbolic link on upper. + * + * If an error is returned, *vpp will be invalid, otherwise it will hold a + * locked, referenced and opened vnode. + * + * unp is never updated. + */ +static int +unionfs_vn_symlink_on_upper(struct vnode **vpp, struct vnode *udvp, + struct vnode *vp, struct vattr *uvap, const char *target, + struct thread *td) +{ + struct unionfs_mount *ump; + struct unionfs_node *unp; + struct vnode *uvp; + struct vnode *lvp; + struct ucred *cred; + struct vattr lva; + struct nameidata nd; + int error; + + ASSERT_VOP_ELOCKED(vp, __func__); + unp = VTOUNIONFS(vp); + ump = MOUNTTOUNIONFSMOUNT(UNIONFSTOV(unp)->v_mount); + uvp = NULL; + lvp = unp->un_lowervp; + cred = td->td_ucred; + error = 0; + + if ((error = VOP_GETATTR(lvp, &lva, cred)) != 0) + return (error); + unionfs_create_uppervattr_core(ump, &lva, uvap, td); + + if (unp->un_path == NULL) + panic("%s: NULL un_path", __func__); + + nd.ni_cnd.cn_namelen = unp->un_pathlen; + nd.ni_cnd.cn_pnbuf = unp->un_path; + nd.ni_cnd.cn_nameiop = CREATE; + nd.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | ISLASTCN; + nd.ni_cnd.cn_lkflags = LK_EXCLUSIVE; + nd.ni_cnd.cn_cred = cred; + nd.ni_cnd.cn_nameptr = nd.ni_cnd.cn_pnbuf; + NDPREINIT(&nd); + + vref(udvp); + VOP_UNLOCK(vp); + if ((error = vfs_relookup(udvp, &uvp, &nd.ni_cnd, false)) != 0) { + vrele(udvp); + return (error); + } + + if (uvp != NULL) { + if (uvp == udvp) + vrele(uvp); + else + vput(uvp); + error = EEXIST; + goto unionfs_vn_symlink_on_upper_cleanup; + } + + error = VOP_SYMLINK(udvp, &uvp, &nd.ni_cnd, uvap, target); + if (error == 0) + *vpp = uvp; + +unionfs_vn_symlink_on_upper_cleanup: + vput(udvp); + return (error); +} + +/* + * Copy symbolic link from lower to upper. + * + * vp is a unionfs vnode that should be locked on entry and will be + * locked on return. + * + * If no error returned, unp will be updated. + */ +int +unionfs_copylink(struct vnode *vp, struct ucred *cred, + struct thread *td) +{ + struct unionfs_node *unp; + struct unionfs_node *dunp; + struct mount *mp; + struct vnode *udvp; + struct vnode *lvp; + struct vnode *uvp; + struct vattr uva; + char *buf = NULL; + struct uio uio; + struct iovec iov; + int error; + + ASSERT_VOP_ELOCKED(vp, __func__); + unp = VTOUNIONFS(vp); + lvp = unp->un_lowervp; + uvp = NULL; + + if ((UNIONFSTOV(unp)->v_mount->mnt_flag & MNT_RDONLY)) + return (EROFS); + if (unp->un_dvp == NULL) + return (EINVAL); + if (unp->un_uppervp != NULL) + return (EEXIST); + + udvp = NULL; + VI_LOCK(unp->un_dvp); + dunp = VTOUNIONFS(unp->un_dvp); + if (dunp != NULL) + udvp = dunp->un_uppervp; + VI_UNLOCK(unp->un_dvp); + + if (udvp == NULL) + return (EROFS); + if ((udvp->v_mount->mnt_flag & MNT_RDONLY)) + return (EROFS); + ASSERT_VOP_UNLOCKED(udvp, __func__); + + error = unionfs_set_in_progress_flag(vp, UNIONFS_COPY_IN_PROGRESS); + if (error == EJUSTRETURN) + return (0); + else if (error != 0) + return (error); + + uio.uio_td = td; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_offset = 0; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + iov.iov_base = buf = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); + uio.uio_resid = iov.iov_len = MAXPATHLEN; + uio.uio_rw = UIO_READ; + + if ((error = VOP_READLINK(lvp, &uio, cred)) != 0) + goto unionfs_copylink_cleanup; + buf[iov.iov_len - uio.uio_resid] = '\0'; + if ((error = vn_start_write(udvp, &mp, V_WAIT | V_PCATCH)) != 0) + goto unionfs_copylink_cleanup; + error = unionfs_vn_symlink_on_upper(&uvp, udvp, vp, &uva, buf, td); + vn_finished_write(mp); + if (error != 0) { + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + goto unionfs_copylink_cleanup; + } + + vn_lock_pair(vp, false, LK_EXCLUSIVE, uvp, true, LK_EXCLUSIVE); + unp = VTOUNIONFS(vp); + if (unp == NULL) { + error = ENOENT; + goto unionfs_copylink_cleanup; + } + + if (error == 0) { + /* Reset the attributes. Ignore errors. */ + uva.va_type = VNON; + VOP_SETATTR(uvp, &uva, cred); + unionfs_node_update(unp, uvp, td); + } + +unionfs_copylink_cleanup: + if (buf != NULL) + free(buf, M_TEMP); + unionfs_clear_in_progress_flag(vp, UNIONFS_COPY_IN_PROGRESS); + return (error); +} + /* * Determine if the unionfs view of a directory is empty such that * an rmdir operation can be permitted. diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 060863866fcf..cefd591a9a0f 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1478,6 +1478,13 @@ unionfs_rename(struct vop_rename_args *ap) */ VOP_UNLOCK(tdvp); relock_tdvp = true; + } else if (fvp->v_type == VLNK) { + /* + * The symbolic link case is similar to the + * regular file case. + */ + VOP_UNLOCK(tdvp); + relock_tdvp = true; } else if (fvp->v_type == VDIR && tdvp != fdvp) { /* * For directories, unionfs_mkshadowdir() will expect @@ -1501,6 +1508,9 @@ unionfs_rename(struct vop_rename_args *ap) case VREG: error = unionfs_copyfile(fvp, 1, fcnp->cn_cred, td); break; + case VLNK: + error = unionfs_copylink(fvp, fcnp->cn_cred, td); + break; case VDIR: error = unionfs_mkshadowdir(fdvp, fvp, fcnp, td); break; diff --git a/tests/sys/fs/Makefile b/tests/sys/fs/Makefile index e36a97d2335a..254394f43714 100644 --- a/tests/sys/fs/Makefile +++ b/tests/sys/fs/Makefile @@ -14,6 +14,7 @@ TESTS_SUBDIRS+= fusefs .endif TESTS_SUBDIRS+= tarfs TESTS_SUBDIRS+= tmpfs +TESTS_SUBDIRS+= unionfs ${PACKAGE}FILES+= h_funcs.subr ${PACKAGE}FILESDIR= ${TESTSDIR} diff --git a/tests/sys/fs/unionfs/Makefile b/tests/sys/fs/unionfs/Makefile new file mode 100644 index 000000000000..da25fcefb473 --- /dev/null +++ b/tests/sys/fs/unionfs/Makefile @@ -0,0 +1,8 @@ +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/fs/unionfs +BINDIR= ${TESTSDIR} + +ATF_TESTS_SH+= unionfs_test + +.include diff --git a/tests/sys/fs/unionfs/unionfs_test.sh b/tests/sys/fs/unionfs/unionfs_test.sh new file mode 100644 index 000000000000..ee8a9bae19e7 --- /dev/null +++ b/tests/sys/fs/unionfs/unionfs_test.sh @@ -0,0 +1,165 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Klara, Inc. +# +# 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. +# + +# Create and mount a filesystem for use in our tests +unionfs_mkfs() { + local name=$1 + local size=${2:-1} + # Create mountpoint + atf_check mkdir ${name} + # Create filesystem image + atf_check -e ignore dd if=/dev/zero of=${name}.img bs=1m count=${size} + echo ${name} >>imgs + # Create memory disk + atf_check -o save:${name}.md mdconfig ${name}.img + md=$(cat ${name}.md) + echo ${md} >>mds + # Format and mount filesystem + atf_check -o ignore newfs /dev/${md} + atf_check mount /dev/${md} ${name} + echo ${name} >>mounts +} + +# Mount a unionfs +unionfs_mount() { + local upper=$1 + local lower=$2 + # Mount upper over lower + atf_check mount -t unionfs ${upper} ${lower} + echo ${lower} >>mounts +} + +# Clean up after a test +unionfs_cleanup() { + # Unmount filesystems + if [ -f mounts ]; then + tail -r mounts | while read mount; do + umount ${mount} || true + done + fi + # Destroy memory disks + if [ -f mds ]; then + tail -r mds | while read md; do + mdconfig -d -u ${md} || true + done + fi + # Delete filesystem images and mountpoints + if [ -f imgs ]; then + tail -r imgs | while read name; do + rm -f ${name}.img || true + rmdir ${name} || true + done + fi +} + +atf_test_case unionfs_basic cleanup +unionfs_basic_head() { + atf_set "descr" "Basic function test" + atf_set "require.user" "root" + atf_set "require.kmods" "unionfs" +} +unionfs_basic_body() { + # Create upper and lower + unionfs_mkfs upper + unionfs_mkfs lower + # Mount upper over lower + unionfs_mount upper lower + # Create object on unionfs + atf_check touch upper/file + atf_check mkdir upper/dir + atf_check touch lower/dir/file + # Verify that objects were created on upper + atf_check test -f lower/file + atf_check test -d lower/dir + atf_check test -f upper/dir/file +} +unionfs_basic_cleanup() { + unionfs_cleanup +} + +atf_test_case unionfs_exec cleanup +unionfs_exec_head() { + atf_set "descr" "Test executing programs" + atf_set "require.user" "root" + atf_set "require.kmods" "unionfs" +} +unionfs_exec_body() { + # Create upper and copy a binary to it + unionfs_mkfs upper + atf_check cp -p /usr/bin/true upper/upper + # Create lower and copy a binary to it + unionfs_mkfs lower + atf_check cp -p /usr/bin/true lower/lower + # Mount upper over lower + unionfs_mount upper lower + # Execute both binaries + atf_check lower/lower + atf_check lower/upper +} +unionfs_exec_cleanup() { + unionfs_cleanup +} + +atf_test_case unionfs_rename cleanup +unionfs_rename_head() { + atf_set "descr" "Test renaming objects on lower" + atf_set "require.user" "root" + atf_set "require.kmods" "unionfs" +} +unionfs_rename_body() { + # Create upper and lower + unionfs_mkfs upper + unionfs_mkfs lower + # Create objects on lower + atf_check touch lower/file + atf_check mkdir lower/dir + atf_check ln -s dead lower/link + # Mount upper over lower + unionfs_mount upper lower + # Rename objects + atf_check mv lower/file lower/newfile + atf_check mv lower/dir lower/newdir + atf_check mv lower/link lower/newlink + # Verify that old names no longer exist + atf_check test ! -f lower/file + atf_check test ! -d lower/dir + atf_check test ! -L lower/link + # Verify that new names exist on upper + atf_check test -f upper/newfile + atf_check test -d upper/newdir + atf_check test -L upper/newlink +} +unionfs_rename_cleanup() { + unionfs_cleanup +} + +atf_init_test_cases() { + atf_add_test_case unionfs_basic + atf_add_test_case unionfs_exec + atf_add_test_case unionfs_rename +} From nobody Wed Dec 17 22:46:28 2025 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 4dWpnK0nGfz6LZl9 for ; Wed, 17 Dec 2025 22:46: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWpnJ5Jhlz3VM5 for ; Wed, 17 Dec 2025 22:46:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766011588; 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=B5pEErLzYyrsQhxllT/PRNI5aabUM2IjFRGcP6CyHEg=; b=w1rKWL+t3az/Cp54k+RbKIf6MelcVugoXxOEpZBxpkE24YWE4zCSaZH1jY03EA2193u65Q 7r9CmotIYe41ih5QIs3meWvOPJohFk9mPyb9IpJZfba7TvuQkAWgY9J6sSIn8AtFQYN6US LNhbbRLqLp7Bj0Fj7ujgdF06hdZRpblaecm3596Qlj0YmV2vijphSy54K6bUehtgSSDs9B r7M64tIYZ4BjfwTrXTfuSLPGyzv+hICcVrKQPJjci1fDRf7/zRnETcy47sabQ/vOn9NDZ1 ZHSYsxQ5E6tIHqzIvCfSUNFTqubCFsS9g/1D9Hv0OPOElc9Hb8oTKavUKpyGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766011588; 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=B5pEErLzYyrsQhxllT/PRNI5aabUM2IjFRGcP6CyHEg=; b=Y4NdiZGHtr32Sh6yxvo+oqauNse5k5taX8Jfa7f+84bsETCQg6CCoPOxuSfuMLGRtHt0B2 0KA/FRbUpg/llLkQjm4/BFyS8gwm7tH16/JdmM5wcRwMZWZHPB27hLCA3grwiKZxbzuH8r kRp74ttI+t/faMIA4Nbe01ae6hrZ039v3dMkH3dUnVrgdXhkI+9L5EjHqBIJFZppT6rYOT U0gTIzoWSWlHbZigVoDFkg8JccC9hMEAJC7H+TvSVpBVGqmZXdPihqKcifgFODoWxMoySu m9o5bElthbWSqTQzz6gfZni8pdwOvYtj1Q2jPKh9+/zLXtaISNvKKQJg7xpykQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766011588; a=rsa-sha256; cv=none; b=FONy5Cwv8zuFJ5s0fivl4GpsWMiohTcd63DhqnQnEuWbwL8gJCeVAlvLlueb3edfZ44N1e RYlHtKoV6TuxyaLjpPmRu0pid5SJUkVwhe0Co0NAw+LG9roexAz7Xo47rvSdfQBevjORdq EqKls4FkihvNI+hJp4esLPLbBnb8z33Gnj2lDsSro2AYTQib5QtVNV2mBhAIy0uFkHoAiG Mt8K7dVUy5PxA6evHwylzeYv0awE+DyGjnIw4v1z5po/8Wsk2CKz9ohxjc9AWiuN16yPIc jNzPsyYRp8I5OMft8y6M4MGgEMgs2tAx0i0zqQu3u803YOYz38GtNSYbeefpsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWpnJ4NTpz1BLp for ; Wed, 17 Dec 2025 22:46:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b206 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 17 Dec 2025 22:46:28 +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: e64928611b3d - main - unionfs: Sporadic cleanup 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: e64928611b3d157608d4fb3906b7362ab98c4ad1 Auto-Submitted: auto-generated Date: Wed, 17 Dec 2025 22:46:28 +0000 Message-Id: <694332c4.b206.2556e4bc@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e64928611b3d157608d4fb3906b7362ab98c4ad1 commit e64928611b3d157608d4fb3906b7362ab98c4ad1 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-14 23:35:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-17 22:46:04 +0000 unionfs: Sporadic cleanup Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. --- sys/fs/unionfs/union.h | 5 ++--- sys/fs/unionfs/union_subr.c | 37 ++++++++++++++++++------------------- sys/fs/unionfs/union_vnops.c | 6 +++--- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index fe5a578ef4dc..7317bfff534c 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -139,9 +139,8 @@ void unionfs_get_node_status(struct unionfs_node *, struct thread *, struct unionfs_node_status **); void unionfs_tryrem_node_status(struct unionfs_node *, struct unionfs_node_status *); -int unionfs_check_rmdir(struct vnode *, struct ucred *, struct thread *td); -int unionfs_copyfile(struct vnode *, int, struct ucred *, - struct thread *); +int unionfs_check_rmdir(struct vnode *, struct ucred *, struct thread *); +int unionfs_copyfile(struct vnode *, int, struct ucred *, struct thread *); int unionfs_copylink(struct vnode *, struct ucred *, struct thread *); void unionfs_create_uppervattr_core(struct unionfs_mount *, struct vattr *, struct vattr *, struct thread *); diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 0774d4fb69be..90be4d6af812 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -84,19 +84,19 @@ static void unionfs_deferred_rele(void *, int); /* * Initialize */ -int +int unionfs_init(struct vfsconf *vfsp) { UNIONFSDEBUG("unionfs_init\n"); /* printed during system boot */ TASK_INIT(&unionfs_deferred_rele_task, 0, unionfs_deferred_rele, NULL); - mtx_init(&unionfs_deferred_rele_lock, "uniondefr", NULL, MTX_DEF); + mtx_init(&unionfs_deferred_rele_lock, "uniondefr", NULL, MTX_DEF); return (0); } /* * Uninitialize */ -int +int unionfs_uninit(struct vfsconf *vfsp) { taskqueue_quiesce(taskqueue_unionfs_rele); @@ -290,7 +290,7 @@ unionfs_nodeget_cleanup(struct vnode *vp, struct unionfs_node *unp) /* * Make a new or get existing unionfs node. - * + * * uppervp and lowervp should be unlocked. Because if new unionfs vnode is * locked, uppervp or lowervp is locked too. In order to prevent dead lock, * you should not lock plurality simultaneously. @@ -709,9 +709,9 @@ unionfs_create_uppervattr(struct unionfs_mount *ump, struct vnode *lvp, /* * relookup - * + * * dvp should be locked on entry and will be locked on return. - * + * * If an error is returned, *vpp will be invalid, otherwise it will hold a * locked, referenced vnode. If *vpp == dvp then remember that only one * LK_EXCLUSIVE lock is held. @@ -756,7 +756,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp, /* * Update the unionfs_node. - * + * * uvp is new locked upper vnode. unionfs vnode's lock will be exchanged to the * uvp's lock and lower's lock will be unlocked. */ @@ -875,10 +875,10 @@ unionfs_clear_in_progress_flag(struct vnode *vp, unsigned int flag) /* * Create a new shadow dir. - * + * * dvp and vp are unionfs vnodes representing a parent directory and * child file, should be locked on entry, and will be locked on return. - * + * * If no error returned, unp will be updated. */ int @@ -1201,7 +1201,7 @@ unionfs_forward_vop_finish_pair( /* * Create a new whiteout. - * + * * dvp and vp are unionfs vnodes representing a parent directory and * child file, should be locked on entry, and will be locked on return. */ @@ -1259,11 +1259,11 @@ unionfs_mkwhiteout_cleanup: } /* - * Create a new vnode for create a new shadow file. - * + * Create a new regular file on upper. + * * If an error is returned, *vpp will be invalid, otherwise it will hold a * locked, referenced and opened vnode. - * + * * unp is never updated. */ static int @@ -1343,8 +1343,8 @@ unionfs_vn_create_on_upper_cleanup: } /* - * Copy from lvp to uvp. - * + * Copy contents of lvp to uvp. + * * lvp and uvp should be locked and opened on entry and will be locked and * opened on return. */ @@ -1410,13 +1410,12 @@ unionfs_copyfile_core(struct vnode *lvp, struct vnode *uvp, /* * Copy file from lower to upper. - * - * If you need copy of the contents, set 1 to docopy. Otherwise, set 0 to - * docopy. + * + * If docopy is non-zero, copy the contents as well. * * vp is a unionfs vnode that should be locked on entry and will be * locked on return. - * + * * If no error returned, unp will be updated. */ int diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index cefd591a9a0f..63e5cd54ade5 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1183,7 +1183,7 @@ unionfs_ioctl(struct vop_ioctl_args *ap) KASSERT_UNIONFS_VNODE(ap->a_vp); - vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); unp = VTOUNIONFS(ap->a_vp); unionfs_get_node_status(unp, ap->a_td, &unsp); ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp); @@ -1210,7 +1210,7 @@ unionfs_poll(struct vop_poll_args *ap) KASSERT_UNIONFS_VNODE(ap->a_vp); - vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY); unp = VTOUNIONFS(ap->a_vp); unionfs_get_node_status(unp, ap->a_td, &unsp); ovp = (unsp->uns_upper_opencnt ? unp->un_uppervp : unp->un_lowervp); @@ -3089,7 +3089,7 @@ struct vop_vector unionfs_vnodeops = { .vop_add_writecount = unionfs_add_writecount, .vop_vput_pair = unionfs_vput_pair, .vop_set_text = unionfs_set_text, - .vop_unset_text = unionfs_unset_text, + .vop_unset_text = unionfs_unset_text, .vop_unp_bind = unionfs_unp_bind, .vop_unp_connect = unionfs_unp_connect, .vop_unp_detach = unionfs_unp_detach, From nobody Thu Dec 18 01:58:30 2025 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 4dWv3017CPz6FxxF; Thu, 18 Dec 2025 01:58:36 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWv300bBXz3wh6; Thu, 18 Dec 2025 01:58:36 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766023116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OpBRWnpZC3vMKnnPPWMF5Ubss1z8TLypOSzTZAaTTt0=; b=FSHwT7Hx417TxjvOnR0kBCSb/o0e3XeMT9xCybUnTTyzd44/v3UkbFyHipJpq5jryiqtbL rihaty8TPPrnmW8nrFBAGi8dR81Bfefy2I4owyrLn9KQhXptx5J5dyQtSUPCS6yiygr2ca 3u+B6NV+I4A/tloqrLVdGlxHCyvZTT2iHtNZnO45v1/iyDHesBapx9VaF+RJWFVSyx18x3 luThbLW9UasMiRP7Q3mQ2nYJEZe4KNrP/Erw7uNOxGckomS439ThogjqQb5NTejj/i+v5I JWQzdtpDZs49H98Q1KXVz/lK2N9aA8IW1dwmOpFu1ruDgts9+rlfkKepPSpDpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766023116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OpBRWnpZC3vMKnnPPWMF5Ubss1z8TLypOSzTZAaTTt0=; b=EfsR5yYYf8WD9X0r3qKTV4WYyiQxi9Xuc9xyyIFgWbmYpxS6NqWYv5vGpoE4tk8g6q3lMx guON8MrSGwarexRXOkls1fIp21yNk57Nb9TdS/0W31tGy08tYmXHdUu/H2U5iafEK/Z1ab UCqdjMBY3Skh2XlQxxhFfXNXRDExUe5TLvfw3ENacBVRuwUnLm6kD4bKY5XdlfAZLHzyVi /AuNh6FOKcUcqUsMbTApXr1JrenwXRsFrBLVOxqw25bPYEXpKvYmzAMDsu0VJ2kYDX94xY YrOCAzJG1Obg4a9MM2fyQ+jHFmQI3FXV4dSGBBjohIGnOY0DD3hU5TYK8+PLQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766023116; a=rsa-sha256; cv=none; b=dBMZj+NcUrWq9pz9wXbid9AjUjv2dliuNXp+s7m3uw7AocpkT630ViJMt5HRBCcOtJD6b/ 8taXQPovgiv6jKIU7p9JFXNs8OKyKtDJ7lhfdu4LZx+KnSvr14VfGKq2yfcp+hJX1SQoLh adhoGI+gJCVp3QKmqnAfgiNFOgwW6x+ZtzVTsWpUsR6PnhqbVtGERp48xHwpdxFdepzspY p9ZYWP6EcBV2pamsaR0aNxolCKFdR6kdR72lGhVbkKsDC5qdVG1Cp+8wj7hMOLY6xctH+W U8QnmVqCG3IMeQk06dgJ5QW/5scOy+6jeGjbfRBO86k+k/lDzGREBGOX1HGKMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dWv2y0lgpzxmk; Thu, 18 Dec 2025 01:58:33 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Wed, 17 Dec 2025 17:58:30 -0800 From: Gleb Smirnoff To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0bf42a0a05b9 - main - bpf: virtualize bpf_iflist Message-ID: References: <694316c4.3d86b.2da7d434@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <694316c4.3d86b.2da7d434@gitrepo.freebsd.org> On Wed, Dec 17, 2025 at 08:47:00PM +0000, Gleb Smirnoff wrote: T> The branch main has been updated by glebius: T> T> URL: https://cgit.FreeBSD.org/src/commit/?id=0bf42a0a05b9c802a6d9ca4a6b8696b29a26e08b T> T> commit 0bf42a0a05b9c802a6d9ca4a6b8696b29a26e08b T> Author: Gleb Smirnoff T> AuthorDate: 2025-12-17 20:41:05 +0000 T> Commit: Gleb Smirnoff T> CommitDate: 2025-12-17 20:41:05 +0000 T> T> bpf: virtualize bpf_iflist T> T> The reason the global list worked before 8774a990ee40 is that bpf_setif() T> used if_unit(), which is a VNET-aware function, and then went through the T> global list looking for bpf_if with matching pointer. T> T> PR: 291735 T> Fixes: 8774a990ee4094f16d596d4b78e0f3239e5d0c88 Yes, I already learned that this broke the bpf:inject test in tests/net/bpf. Damn if_vmove again. The moved interface does not move its bpf_if. I'm looking for a solution. -- Gleb Smirnoff From nobody Thu Dec 18 03:23:53 2025 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 4dWwxP5gHhz6K5Xk for ; Thu, 18 Dec 2025 03:23:53 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dWwxP1tFWz44vj for ; Thu, 18 Dec 2025 03:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766028233; 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=4uIy+9FwTvx5H0cSW4BiEtbvyv+yXB0a4TQ/xVkyQhk=; b=b4pc3lLWYbUNgw/QURMjP/6FITTFHjUV0YZtgviNmFPuSBZ4gIvp7dYvmnwS0gvGzg/uTe O7cX13XuxusB8vn7VRq/hpGfpUsvtUK2wgsJr8outqTFkReXPu8dsIwhqFgQBrPI7nrJN2 27HDOSx99C0uLa4wKgPGFs8JUErX+oL1OMQChNJSoZRAHRkIbupfQgAhbndvGLLNjX/Cu4 tEGGc23f2rZAfrCgZHfyF1n7elx1BNS/2FmeirHtgf3xFxF6oUliI0a8u+LSlgH3cmqdQN mQ1Sg/ggeok896KFFZSXiOZ+fErH/iFyDsDLYSolpwB6tM6bDJ51GJIR+BbIHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766028233; 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=4uIy+9FwTvx5H0cSW4BiEtbvyv+yXB0a4TQ/xVkyQhk=; b=xixiz8TQWkdbvxiUd+TXFiQMn+4jKqo5btf+uYktg2olP5LZuVfwtdPdxNg5fK5+APTvW3 GdXwjXtlaiJ5tgn7J+Cha7gSwnXWhM3X5cnGiWVZD5gLoYHRTiC5yIcqMvzUywMWz8qy8z FSnRwzdhtSy05dPqn0i3nOTh1oNdzfHroQ8aLq5+YGLxZfpkUfMZTgx8aw46vy7Y1Y93ci oiD0B0Xutg0OwNRvjq+FcqjhuujbZ62GHd9vb8OyvFCIIUySqjjC5xGTpUtJP01YYc+Clw rq7DTvg6pkuxCGdVc0TyiJ1m9VqQblSInol9U4g2/McAa/BZRJdp86cxUVlCHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766028233; a=rsa-sha256; cv=none; b=TxFbr2c1Xx3iyKeqcWZcCuLLVfkpJblaBVxeksvlBzlz7DTLB9oTEzBFS8Cdb7igR6RiiQ oUFYISlWfpcJ7jNuG/nUk6tum4SAmS684+yknO6SMawZs/Z+VhlPfzbSYrAO5ljUgUW51v WSe//Me8BMO7RMjTzdl5SjFtIqazWrWJHFYwtn2ig9zrMZHaUIhNrGxWJU4+SbHGulabLn yyiaI/fYZnnX1tAXbQ9Eibgk98XNQ/1RxQV/9Y10dhPus9lYHGkFM+wTDJ46gBBKvfV+ny MtFXQ4bNEFjL1NVgVEWaFtBx2/idV+rQGLxyux3a/0UdfD7BfI0bqWMkbEVQ7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dWwxP06Slz5VY for ; Thu, 18 Dec 2025 03:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cfe8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 03:23:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Rob Nichols From: Alexander Ziaee Subject: git: d1d88b6e8c31 - main - jail.conf.5: Fix mandoc typos 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: d1d88b6e8c31b1e472d66471ff1e666e5310709e Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 03:23:53 +0000 Message-Id: <694373c9.3cfe8.dcb2349@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=d1d88b6e8c31b1e472d66471ff1e666e5310709e commit d1d88b6e8c31b1e472d66471ff1e666e5310709e Author: Rob Nichols AuthorDate: 2025-12-16 03:26:26 +0000 Commit: Alexander Ziaee CommitDate: 2025-12-18 03:20:40 +0000 jail.conf.5: Fix mandoc typos MFC after: 3 days Reviewed by: ziaee Signed-off-by: Rob Nichols Closes: https://github.com/freebsd/freebsd-src/pull/1928 --- usr.sbin/jail/jail.conf.5 | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/usr.sbin/jail/jail.conf.5 b/usr.sbin/jail/jail.conf.5 index 627c38b0f8b6..7cc7a7cf9fca 100644 --- a/usr.sbin/jail/jail.conf.5 +++ b/usr.sbin/jail/jail.conf.5 @@ -44,13 +44,11 @@ A parameter assignment consists of a single word, the parameter name, an equals sign, a value enclosed in double quotes, and a terminating semicolon. .Pp The syntax of a jail definition is as follows: -.Bd -unfilled -. Ar jailname Cm \&{ -.Bd -unfilled -offset indent -compact -.Ar parameter Cm = Qq Ar value ; -\&... -.Ed -.Cm \&} +.Bd -literal -offset indent +jailname { + parameter = "value"; + ... +} .Ed .Pp This is used by @@ -234,11 +232,11 @@ bar { } # Include configurations from standard locations. -\[char46]include "/etc/jail.conf.d/*.conf"; -\[char46]include "/etc/jail.*.conf"; -\[char46]include "/usr/local/etc/jail[.]conf"; -\[char46]include "/usr/local/etc/jail.conf.d/*.conf"; -\[char46]include "/usr/local/etc/jail.*.conf"; +\&.include "/etc/jail.conf.d/*.conf"; +\&.include "/etc/jail.*.conf"; +\&.include "/usr/local/etc/jail[.]conf"; +\&.include "/usr/local/etc/jail.conf.d/*.conf"; +\&.include "/usr/local/etc/jail.*.conf"; .Ed .Sh SEE ALSO .Xr jail 2 , From nobody Thu Dec 18 07:56:56 2025 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 4dX30S3t0pz6Kr0X for ; Thu, 18 Dec 2025 07:56: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dX30S2j2Gz3ffG for ; Thu, 18 Dec 2025 07:56:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766044616; 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=kSE2wbjjatmLT6enw/9FkBWOQYe1Tb5z/o+07FyJGlI=; b=m1xUIotv1mc63R/Nlq58ueKEc2BLzO9vDttDtirBMC5mYzghqnEU14AvML+g7m7lQSoDVl EiEmevaCyG2b5Nl04hhaiHuqocgcpKTnz97ROAeANpz7H8TaGHbamq34Nmo+Jc1DqKlVS8 w2lodMiHZEXByIH5Eg1nwn5AB1I9ObkmIVvklQFfAqz7cHDndivX4y9jS326oAvnZCALIw IPMpC+Tt9+h9nbn+bkZ2TiQqaaFVL9efrrXsdUR9UiELVFM4Tf1YqJn3DBmRBOnYG8gfUT XHx3hh58QQlyIQSyB1exNa5zRjpH/Oz/cibyDE9wscmxWmTuWN4oVo/UwZQTQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766044616; 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=kSE2wbjjatmLT6enw/9FkBWOQYe1Tb5z/o+07FyJGlI=; b=Yx6L2I6zv/N6vCRUm/rUFzjmgarbWoPLbA/AwnRWW/k2hOKi8okzPZ4+c9wv3aFVIhU5cL VyCiTG1ZQMtfpI44+DVXPe/mW0+o8+2e7N1EsQ9zKxtmj2ml4y1JZ78+wkbPBqD3Em9MVe /4KOG+AXEqxa52LFdHX3ATtrcjgJjfq2Y0i5ndyAna2TodtVGw6X7L36Fk1TW4GCxledUH 3I91D64kxePd7rx+auMpZbVewI5ZYfMsiHO5xRIINs5vENRyEtSfhK6ARbhoQL2E+Th6Mu 9w19RbD3H2rYCG0TpHVaGZU3UefaPKH0RFv/aI//VD+oa6D+4bMx30M0P5zxTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766044616; a=rsa-sha256; cv=none; b=tjMyWBUaTgOy8eII03+e/kcJpqbd2x1ND+4z9TsLevd125D1pdfUycxle21OUkW6SVOtnG pBeoz+z4dWPqrMPYsbyoC+Mr2Q/EafpjaLUj3GMsH4gOx9j3aFbLveyg9HBPyBk3UVTYAh CcraebzCvg+GH0XgMiKHbFVDYJD5CJT5ezOSvY1rhAK9jeU/6LobCLIXWeT/Ls2tGj9LPH OwjJTLXfMmC0KaPsFFK1FImQgXnhSL6yH7tY06VVmF0rIw4PgqNHXo9fvynKBHz6aNmP7t ybosQDGtjoj3qsl9HEMM36rmgyQHYcspL+NpCzvnFQlelOM2ytqrrgUiKlHv2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dX30S2CznzDWb for ; Thu, 18 Dec 2025 07:56:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37d76 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 07:56:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefa=?utf-8?Q?n E=C3=9Fer?= Subject: git: cf5eed715915 - main - if_rge: fix typo in 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: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf5eed71591563ecfc7a40c28d7c4f001f903219 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 07:56:56 +0000 Message-Id: <6943b3c8.37d76.6e48da27@gitrepo.freebsd.org> The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=cf5eed71591563ecfc7a40c28d7c4f001f903219 commit cf5eed71591563ecfc7a40c28d7c4f001f903219 Author: Stefan Eßer AuthorDate: 2025-12-18 07:55:03 +0000 Commit: Stefan Eßer CommitDate: 2025-12-18 07:55:03 +0000 if_rge: fix typo in man page Fix the list of devices supported by the driver: RTL8125 occured twice, should have been RTL8127 in one case. Approved by: adrian --- share/man/man4/rge.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/rge.4 b/share/man/man4/rge.4 index 072f1ece3230..5b624cb6bf95 100644 --- a/share/man/man4/rge.4 +++ b/share/man/man4/rge.4 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd December 12, 2025 +.Dd December 18, 2025 .Dt RGE 4 .Os .Sh NAME @@ -121,7 +121,7 @@ For more information on configuring this device, see .Sh HARDWARE The .Nm -driver supports RealTek RTL8125, RTL8126, RTL8125 and Killer E3000 based +driver supports RealTek RTL8125, RTL8126, RTL8127 and Killer E3000 based PCIe 1GB to 1GB Ethernet devices. .Sh SYSCTL VARIABLES The following variables are available as both From nobody Thu Dec 18 12:43:17 2025 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 4dX9Ls5qgtz6Kr4d for ; Thu, 18 Dec 2025 12:43: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dX9Ls4bjGz3G0V for ; Thu, 18 Dec 2025 12:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766061797; 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=7GogJbYc90F3la8n7jaf6cMjGZ0ziAxCNIqfb5PDpLc=; b=WT5h6lVxeICsl6s1N4w8zVKVmcexq2h8+h6GhUbk9fPR4OX+9Skf9FopFF6adfT5ql49FF +USc69lGJQ8z0p+7FJx+XlyitVqXP83DRV6if3XmtnZJpK9dBJ35fagQmH7XFaVy0fUPMw CAv2exPZOpG9W9KW7W/WlGEIi0C55mdMX5em9i2+XhNBDS/ha5igNUjxZmzeZy2FZJmvKD HlvRLuEDh7C9UJ46VIAiiVInVK3XK/wQGKgwDjrQbi4S4k8Z747iclpx1sjj+5lOPhRgkd ZdFEBOsakvyuM1hg29WPaGW/7hpGTWWBrXBXd/6ulC/5i84N7duYPwd47fy9xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766061797; 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=7GogJbYc90F3la8n7jaf6cMjGZ0ziAxCNIqfb5PDpLc=; b=lctUVhI7X9SjKJu58Xd5TcbqWlTqHTOThQ6N0lEYkeL9dgH7lSSFXyZ3UEEVp0X+uD5Vd/ VwuiHhFjXMAH2u3KinrQJA1Y2bJvCYBx6qsY8XxX8uIkNvL2Hl/wvkzhyZEUhLMAeKvnEg J2eVMAtVZP2qKrV4ZVTNt7suG5msUwgQomhCrDw0a8tj/y/XbcQVF+957Xx+aqg4xBBe+d vzRu+XamHtcnGjFNKfWPlnaWTwdDg3XL3+yhOonH4luzLX8ryMrd3iNAJMiOEELzfFMMCw uDXKeWyVV91VYkiYD+7I7L5hR7bfUVI0x85N3dAI9nVGJNnyPXwQhNJeWQ+A6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766061797; a=rsa-sha256; cv=none; b=Wa9ug5FHzcuitoJ1VfuF3qv2Yo9BgJCNC3+bgAh3uFAcs+96ErjfN2+EYvYSggJJ95Ql6L GkTaMr3CfLvXNjwaLdd6Joc/OI0ikqnvxtGb9R8FWlDywDyT5KJqE3DDO3hFfXTZIdEJij HmzWGT0QVwjxhBu66cc06BRwliaQZk88CrpMOxDXyY8Fel8y4AWc1RDcst6ueDfXJBIAuM IONfxKpbv5pytO45PQZ/ppUcmIks573bW9HeVsmN4XgaXwMr6zHdGgCkvQEsY3S+h9bplu 5XQdTAQRiQE8tG1QLxs9khFTg2+HEeUuMCkHdavaD/lGLSZbSuGVnZx2zIIAQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dX9Ls4C7QzfXd for ; Thu, 18 Dec 2025 12:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25da1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 12:43:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e0c6c4ecfc75 - main - vtnet: define flags in a consistent way 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: e0c6c4ecfc755b78ac9135033053d2f15c62bf04 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 12:43:17 +0000 Message-Id: <6943f6e5.25da1.2d2d4db5@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e0c6c4ecfc755b78ac9135033053d2f15c62bf04 commit e0c6c4ecfc755b78ac9135033053d2f15c62bf04 Author: Michael Tuexen AuthorDate: 2025-12-18 12:41:29 +0000 Commit: Michael Tuexen CommitDate: 2025-12-18 12:41:29 +0000 vtnet: define flags in a consistent way This allows adding flags in the upper 32 bits in a consistent way. No functional change intended. MFC after: 1 week --- sys/dev/virtio/network/virtio_net.h | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/dev/virtio/network/virtio_net.h b/sys/dev/virtio/network/virtio_net.h index 9ea53cbe2376..e61a4a993052 100644 --- a/sys/dev/virtio/network/virtio_net.h +++ b/sys/dev/virtio/network/virtio_net.h @@ -32,29 +32,29 @@ #define _VIRTIO_NET_H /* The feature bitmap for virtio net */ -#define VIRTIO_NET_F_CSUM 0x000001 /* Host handles pkts w/ partial csum */ -#define VIRTIO_NET_F_GUEST_CSUM 0x000002 /* Guest handles pkts w/ partial csum*/ -#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 0x000004 /* Dynamic offload configuration. */ -#define VIRTIO_NET_F_MTU 0x000008 /* Initial MTU advice */ -#define VIRTIO_NET_F_MAC 0x000020 /* Host has given MAC address. */ -#define VIRTIO_NET_F_GSO 0x000040 /* Host handles pkts w/ any GSO type */ -#define VIRTIO_NET_F_GUEST_TSO4 0x000080 /* Guest can handle TSOv4 in. */ -#define VIRTIO_NET_F_GUEST_TSO6 0x000100 /* Guest can handle TSOv6 in. */ -#define VIRTIO_NET_F_GUEST_ECN 0x000200 /* Guest can handle TSO[6] w/ ECN in. */ -#define VIRTIO_NET_F_GUEST_UFO 0x000400 /* Guest can handle UFO in. */ -#define VIRTIO_NET_F_HOST_TSO4 0x000800 /* Host can handle TSOv4 in. */ -#define VIRTIO_NET_F_HOST_TSO6 0x001000 /* Host can handle TSOv6 in. */ -#define VIRTIO_NET_F_HOST_ECN 0x002000 /* Host can handle TSO[6] w/ ECN in. */ -#define VIRTIO_NET_F_HOST_UFO 0x004000 /* Host can handle UFO in. */ -#define VIRTIO_NET_F_MRG_RXBUF 0x008000 /* Host can merge receive buffers. */ -#define VIRTIO_NET_F_STATUS 0x010000 /* virtio_net_config.status available*/ -#define VIRTIO_NET_F_CTRL_VQ 0x020000 /* Control channel available */ -#define VIRTIO_NET_F_CTRL_RX 0x040000 /* Control channel RX mode support */ -#define VIRTIO_NET_F_CTRL_VLAN 0x080000 /* Control channel VLAN filtering */ -#define VIRTIO_NET_F_CTRL_RX_EXTRA 0x100000 /* Extra RX mode control support */ -#define VIRTIO_NET_F_GUEST_ANNOUNCE 0x200000 /* Announce device on network */ -#define VIRTIO_NET_F_MQ 0x400000 /* Device supports Receive Flow Steering */ -#define VIRTIO_NET_F_CTRL_MAC_ADDR 0x800000 /* Set MAC address */ +#define VIRTIO_NET_F_CSUM (1ULL << 0) /* Host handles pkts w/ partial csum */ +#define VIRTIO_NET_F_GUEST_CSUM (1ULL << 1) /* Guest handles pkts w/ partial csum*/ +#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS (1ULL << 2) /* Dynamic offload configuration. */ +#define VIRTIO_NET_F_MTU (1ULL << 3) /* Initial MTU advice */ +#define VIRTIO_NET_F_MAC (1ULL << 5) /* Host has given MAC address. */ +#define VIRTIO_NET_F_GSO (1ULL << 6) /* Host handles pkts w/ any GSO type */ +#define VIRTIO_NET_F_GUEST_TSO4 (1ULL << 7) /* Guest can handle TSOv4 in. */ +#define VIRTIO_NET_F_GUEST_TSO6 (1ULL << 8) /* Guest can handle TSOv6 in. */ +#define VIRTIO_NET_F_GUEST_ECN (1ULL << 9) /* Guest can handle TSO[6] w/ ECN in. */ +#define VIRTIO_NET_F_GUEST_UFO (1ULL << 10) /* Guest can handle UFO in. */ +#define VIRTIO_NET_F_HOST_TSO4 (1ULL << 11) /* Host can handle TSOv4 in. */ +#define VIRTIO_NET_F_HOST_TSO6 (1ULL << 12) /* Host can handle TSOv6 in. */ +#define VIRTIO_NET_F_HOST_ECN (1ULL << 13) /* Host can handle TSO[6] w/ ECN in. */ +#define VIRTIO_NET_F_HOST_UFO (1ULL << 14) /* Host can handle UFO in. */ +#define VIRTIO_NET_F_MRG_RXBUF (1ULL << 15) /* Host can merge receive buffers. */ +#define VIRTIO_NET_F_STATUS (1ULL << 16) /* virtio_net_config.status available*/ +#define VIRTIO_NET_F_CTRL_VQ (1ULL << 17) /* Control channel available */ +#define VIRTIO_NET_F_CTRL_RX (1ULL << 18) /* Control channel RX mode support */ +#define VIRTIO_NET_F_CTRL_VLAN (1ULL << 19) /* Control channel VLAN filtering */ +#define VIRTIO_NET_F_CTRL_RX_EXTRA (1ULL << 20) /* Extra RX mode control support */ +#define VIRTIO_NET_F_GUEST_ANNOUNCE (1ULL << 21) /* Announce device on network */ +#define VIRTIO_NET_F_MQ (1ULL << 22) /* Device supports Receive Flow Steering */ +#define VIRTIO_NET_F_CTRL_MAC_ADDR (1ULL << 23) /* Set MAC address */ #define VIRTIO_NET_F_SPEED_DUPLEX (1ULL << 63) /* Device set linkspeed and duplex */ #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ From nobody Thu Dec 18 13:45:27 2025 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 4dXBkb3ZN8z6KyFv for ; Thu, 18 Dec 2025 13:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXBkb2fL8z3MqZ for ; Thu, 18 Dec 2025 13:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766065527; 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=UcTF5XW0XGa68VbIgixiF5iSC3nINwLU67IyQh//eIU=; b=k5lQcZnaibDe+K357kdiBc41SFGwA6SikwlM+SXgJg6S57YbgmLuY9ut5tXQkXb1lOgwJx gTKWza2iX9bLlQR4v3hKP7TeMP53RE7haumvJHVwlEdjqanZYJzZ5R76fr9qlzDBuTtA08 xN/nzfAjn4tMRtHahSDCHo6QdqjHaKFN94o2agNkx8EkplA/7n8IH5u8iMWoz+P6WByYVd 13r83pFlARwZKFDk/d1PTJadSwxtt1N+fwN9W/CojJd0RjAc2wfENN0a6EkdtD842fnoYX rP245D4WBKEJiNNTcFEyKoJwrXYP0zJm50iIx1vICTM9WSHZVa2EDaqNq6lKow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766065527; 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=UcTF5XW0XGa68VbIgixiF5iSC3nINwLU67IyQh//eIU=; b=rwT63asAuNO7lau/RUj0PQZ1AUAbicvdG1LM4hpNvpMLxb2CDjoRBaIGgtFCI7fc34QLW3 gIgCKpM6O5mFdJ7TDaNVMZTqSzq4aOlOU3X0ZZD6GrNQnRKfrsRMQhuvS6j+k/KU6HnB2R OtLE7kkS5qWbZn9GvN7YGQWQQWWcwa6gqEpRnwAVtpW0Zns0he8/1t2vyOAgntrFiR4Wps D/tv0Fp16s0gzyIdCxcEZqk6c2mphuEzwFpQVLL/c1lZNoKC/pMHvdb43uRcgnigOBgAH3 rF7ejgcVaIxhSiel50aZrg4mrjsKuzuUKx1ReaiSQ0xpFS6i7zlnfP7/8GofhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766065527; a=rsa-sha256; cv=none; b=Cj2QLLIZvOPHcTY1vEbrbFCqkRZ1t9jLoiNVqKT4jI5W/b3IRKr874WrOR2bHKzd8LQdJg 1nWzBwy3DuKYdA8HNxg0FqOzhOxgGT3/idD37sLhZzSUYgELtm9TFpWUAcEf3tQ7HL3Mz+ R9aobbZ6IYIQZWwIYe54YBTZKG4g8rxmhGY8eoTi6J7dspZFCVQm773Nw0D5GtFEtaFMil sh5Sc71WwaiiZ5rn2q5GT0Z4vK8PRXiH/k778AI4Jgl4qk3A2HH+uxPLHlRuvnV7ouIomr GcfIaBO8r1M47qdZb+j5qAWeTptI/Wp7IKwqif8BC4DH/ZAf5MGi6Dw92p3ZAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXBkb1hFZzh06 for ; Thu, 18 Dec 2025 13:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31af0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 13:45:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a862e4b5a27c - main - snmp_pf: fix refresh 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: a862e4b5a27c356e2584ee74fd9e211c18b1b125 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 13:45:27 +0000 Message-Id: <69440577.31af0.55d25d79@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a862e4b5a27c356e2584ee74fd9e211c18b1b125 commit a862e4b5a27c356e2584ee74fd9e211c18b1b125 Author: Kristof Provost AuthorDate: 2025-12-17 13:22:05 +0000 Commit: Kristof Provost CommitDate: 2025-12-18 13:39:27 +0000 snmp_pf: fix refresh Some refresh functions had two layers of 'do we need to refresh now?' checks, leading to inconsistent refreshes. Consolidate them. PR: 291725 Sponsored by: Rubicon Communications, LLC ("Netgate") --- usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c index 91194516614f..b62ecf791500 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c +++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c @@ -673,7 +673,7 @@ pf_tables(struct snmp_context __unused *ctx, struct snmp_value *val, return (SNMP_ERR_NOT_WRITEABLE); if (op == SNMP_OP_GET) { - if ((time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) + if (! started || (time(NULL) - pft_table_age) > PFT_TABLE_MAXAGE) if (pft_refresh() == -1) return (SNMP_ERR_GENERR); @@ -812,7 +812,7 @@ pf_tbladdr(struct snmp_context __unused *ctx, struct snmp_value __unused *val, asn_subid_t which = val->var.subs[sub - 1]; struct pfa_entry *e = NULL; - if ((time(NULL) - pfa_table_age) > PFA_TABLE_MAXAGE) + if (! started || (time(NULL) - pfa_table_age) > PFA_TABLE_MAXAGE) pfa_refresh(); switch (op) { @@ -1035,7 +1035,7 @@ pf_lbltable(struct snmp_context __unused *ctx, struct snmp_value *val, asn_subid_t which = val->var.subs[sub - 1]; struct pfl_entry *e = NULL; - if ((time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) + if (! started || (time(NULL) - pfl_table_age) > PFL_TABLE_MAXAGE) pfl_refresh(); switch (op) { @@ -1322,9 +1322,6 @@ pft_refresh(void) struct pft_entry *e; int i, numtbls = 1; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pft_table)) { e = TAILQ_FIRST(&pft_table); TAILQ_REMOVE(&pft_table, e, link); @@ -1422,9 +1419,6 @@ pfa_refresh(void) struct pfa_entry *e; int i, numtbls = 1, cidx, naddrs; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pfa_table)) { e = TAILQ_FIRST(&pfa_table); TAILQ_REMOVE(&pfa_table, e, link); @@ -1590,9 +1584,6 @@ pfl_refresh(void) { struct pfl_entry *e; - if (started && this_tick <= pf_tick) - return (0); - while (!TAILQ_EMPTY(&pfl_table)) { e = TAILQ_FIRST(&pfl_table); TAILQ_REMOVE(&pfl_table, e, link); From nobody Thu Dec 18 13:45:28 2025 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 4dXBkc3mfxz6Kxyn for ; Thu, 18 Dec 2025 13:45:28 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXBkc2Nmsz3Mmy for ; Thu, 18 Dec 2025 13:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766065528; 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=j2KYeopk/qDdfVh7fZPTWO7YBrsivZcNuTp2sc9ToU0=; b=W1HrFVrAQi1LMERGPc9fTiPgTVFqPErf3440j5uHZVINt/q7RDRgh215PXn0s2aLcz8QFd FY+JR28+cnvI7+gP5YyE0tMC9KoQlYsBnNJzVG8TczpgONqmtrAshVwLb9YAQPcLkXfzvJ AX8GwFrIJLmygaZ5c49E9O7AfzgnURHQV0v8Nw69d40kczVrrg3nok6+jxUB9uniTH431Q TRpnVP1gm5HTHnf5OMwhewGtMz46C2YNlWs32pvk4SPBOXyOvWhXkKlHJioInfead+y7DP YvSw3dTZH8+rlbY0IdBEVsbPp48i0Kce3Dz0GioGje+jqVe8RODUbZ/sFtCFmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766065528; 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=j2KYeopk/qDdfVh7fZPTWO7YBrsivZcNuTp2sc9ToU0=; b=Yr7tCiX0fRR3NMPnRHoN2G1Z8gS9G1W9of/0Wu5aV9auW9zCLpdnHDDjlWhutvlK9Hgve4 UB3LkGwkAPdmm/h1H5YrUTniyuN6h3fjDvl8efYwiT/b4qUehaa4ukbNnGXPLoXY543TiS J6T5w/BA4sTs25tBUP+VjtO4OVg/zPQ5R6E5pWQwGThJO1krN5drkCMssw6ETTaf6camOJ fqOhWj29hlLEy4o6BPxc1E9zrDwptMUGvgE6BYNvS+VLZaSwk4vY3n2NUUXjYoHYt0rd6c Kgb6EKqn3pfMcz/N1uLMsUEkC6833BtNDtxWWn9QCf8Mxl1RPecuGBupB/KA+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766065528; a=rsa-sha256; cv=none; b=fTjo3pmFeszkCf8s3IVEDym6hRY8hJRrzA4kWioikhLO1xdiobiPbGLEgu0tcwQgJThbRg rTvefJyzg0uV4LBLjilorXbXktVCNKA2a7gzoxlz/56e6BCOVGYSxgJ1LkHeYIXnbmKibE 2MiMH88j/DtZLLPPv2UUjUIz9UxYvxdTIivWKKGpFBt3FT41bu4eb6pU3QGaYEKqKGLej1 LmC99LXMLm8D9QvmN4xSSbHT92qDk1hSXtaYxlds0OxIvFUg7EhODiKrK9MMqXFEJ2mWCp Lb2p3U9oql0k2oHMD6MpIEv7T0f81yiAq4+Ch5Qkkm970tDfOB5iwBPR5IOetw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXBkc1tXYzgRn for ; Thu, 18 Dec 2025 13:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33ba3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 13:45:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ad7f49f98b1a - main - libpfctl: fix tstats address count 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: ad7f49f98b1ae7504f69db897901a055613c8300 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 13:45:28 +0000 Message-Id: <69440578.33ba3.6a54275e@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ad7f49f98b1ae7504f69db897901a055613c8300 commit ad7f49f98b1ae7504f69db897901a055613c8300 Author: Kristof Provost AuthorDate: 2025-12-17 13:59:34 +0000 Commit: Kristof Provost CommitDate: 2025-12-18 13:39:27 +0000 libpfctl: fix tstats address count Reported by: Marcos Mendoza See also: https://redmine.pfsense.org/issues/16588 Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 3 ++- tests/sys/netpfil/pf/table.sh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index ab49dabe88c2..1959f7bebc39 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -3611,7 +3611,8 @@ static struct snl_attr_parser ap_tstats[] = { { .type = PF_TS_MATCH, .off = _OUT(pfrts_match), .cb = snl_attr_get_uint64 }, {. type = PF_TS_NOMATCH, .off = _OUT(pfrts_nomatch), .cb = snl_attr_get_uint64 }, { .type = PF_TS_TZERO, .off = _OUT(pfrts_tzero), .cb = snl_attr_get_uint64 }, - { .type = PF_TS_REFCNT, .off = _OUT(pfrts_cnt), . arg = (void *)PFR_REFCNT_MAX, .cb = snl_attr_get_uint64_into_int_array }, + { .type = PF_TS_CNT, .off = _OUT(pfrts_cnt), .cb = snl_attr_get_uint64 }, + { .type = PF_TS_REFCNT, .off = _OUT(pfrts_refcnt), . arg = (void *)PFR_REFCNT_MAX, .cb = snl_attr_get_uint64_into_int_array }, }; #undef _OUT SNL_DECLARE_PARSER(tstats_parser, struct genlmsghdr, snl_f_p_empty, ap_tstats); diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 0b2b56592404..cd83ac90e559 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -194,6 +194,10 @@ zero_one_body() jexec alcatraz pfctl -t foo -T show -vv + atf_check -s exit:0 -e ignore \ + -o match:'Addresses: 2' \ + jexec alcatraz pfctl -vvsTables + atf_check -s exit:0 -e ignore \ -o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \ -o match:'In/Pass:.*'"$TABLE_STATS_NONZERO_REGEXP" \ From nobody Thu Dec 18 13:47:38 2025 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 4dXBn66yLZz6KyRf for ; Thu, 18 Dec 2025 13:47: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXBn659PRz3Nt9 for ; Thu, 18 Dec 2025 13:47:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766065658; 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=ZBVHY8gHQKkrCxfFsu4853lmtR7ciyqjc4rdBxv4x5E=; b=wmTdP+C2VUk0UHzqTXeimjmSA4TX9t4oGqUaE9O57NKpSEL0AXrkAtMr8Tllbn6raBqCcS qQ03sDEtlrlyXKOdMs5a0MhQ7v1QieR+8ZfdMnbiex8zdeYbj06e1XLRfMnUT/UvL90PSQ uAq+pJ+b+nYmcj70QPNY8r+kPluA4E1qcsOefwK/kULyYK7lT0FL66FcPO3nDjo2JlU9Sb 9C1avk0NuRTUUTywQvihz0BcgnlCo+ezqq2NHqdsy03esEkv0192QM+UIhk8lB77kA2xa7 3DQd1uUgGR+j5FrnBCZY1xdOlVP40EL0Ach/vv12Y13YK9eUTqyqDO3US2ERtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766065658; 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=ZBVHY8gHQKkrCxfFsu4853lmtR7ciyqjc4rdBxv4x5E=; b=xHnbUzm6qnvnEESQBJTp0/hrjVxZ6DZy/W1t55Jva3pJZJrAKH421kXqkRi2JeGOOcfOzp q0p0Sc2Cs8J77vo8prpZSeW0jFMx9mYjLTncQ+PUSn2wfQPXWDdiGaDlkd6OgbD0402dFC FsSBkG7XvbTRf5VJgDCCf5Bu7OEDwkd5CYA3i3Sm2dKP03TaZSN0nDfFirRw3AZjGk6DGN zaq5t1P1hUB5fuFacILnMsEa+2SmMoakOPA7XFnZa4U76SHYcmBWaoOF0hu+7+DLUjeozE mMZU0VAF62NBZtQMDnyR5hNSQNPsXnReOgr+1XCvw997aa2KsRPf6fOoq53KaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766065658; a=rsa-sha256; cv=none; b=eKHw4jqIt3dyAmvv49vFFYCm7Y7xQpSN/OcZ8v48Firuqxi2bC0daG/B5PNqvfukzZCOm4 65LHnfRgbB5z0JEh2TkWzsYby8iIjcdtdpJmSOvU4ZS4NepH8BbhrpN6pqQa9s8VEBbNNX DpoQ6Z1Nyw+Fe/Ia5h4zIDky7qA+FaX5nFsfg/5c8hlKnkc1PP6SqidM8nqw8nov0UT3Qh GgF2udHExmj1yplT1a8AXb90RDZTDfteJldBKEKeLmya/IfCGn/yHwkKov0feOkFXck43h hwHtb/3vEa9Ik9O1yXkC874RUfNCmKPRN82DruMmr6GVqoqiIowBrQk/50ZiKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXBn64mrQzhM8 for ; Thu, 18 Dec 2025 13:47:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33ba7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 13:47:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 377e6050c1cb - main - vmem: Fix the gcc 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 377e6050c1cb9edce90d2a3caa2833fcc09b8c68 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 13:47:38 +0000 Message-Id: <694405fa.33ba7.3a4b0eaf@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=377e6050c1cb9edce90d2a3caa2833fcc09b8c68 commit 377e6050c1cb9edce90d2a3caa2833fcc09b8c68 Author: Mark Johnston AuthorDate: 2025-12-17 20:54:40 +0000 Commit: Mark Johnston CommitDate: 2025-12-18 13:47:29 +0000 vmem: Fix the gcc build gcc complains when building libuvmem because the last two operands of ?: in ORDER2SIZE and SIZE2ORDER have different signs. Add explicit casts to address this. Reported by: Jenkins Reviewed by: alc, kib MFC after: 1 week Fixes: 1ecf01065b45 ("libuvmem: usermode port of vmem(9)") Differential Revision: https://reviews.freebsd.org/D54268 --- sys/kern/subr_vmem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index afc327c512ce..8b834a2e2a79 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -285,10 +285,12 @@ static LIST_HEAD(, vmem) vmem_list = LIST_HEAD_INITIALIZER(vmem_list); #define VMEM_CROSS_P(addr1, addr2, boundary) \ ((((addr1) ^ (addr2)) & -(boundary)) != 0) -#define ORDER2SIZE(order) ((order) < VMEM_OPTVALUE ? ((order) + 1) : \ - (vmem_size_t)1 << ((order) - (VMEM_OPTVALUE - VMEM_OPTORDER - 1))) -#define SIZE2ORDER(size) ((size) <= VMEM_OPTVALUE ? ((size) - 1) : \ - (flsl(size) + (VMEM_OPTVALUE - VMEM_OPTORDER - 2))) +#define ORDER2SIZE(order) ((order) < VMEM_OPTVALUE ? \ + (vmem_size_t)((order) + 1) : \ + (vmem_size_t)1 << ((order) - (VMEM_OPTVALUE - VMEM_OPTORDER - 1))) +#define SIZE2ORDER(size) ((size) <= VMEM_OPTVALUE ? \ + (int)((size) - 1) : \ + (flsl(size) + (VMEM_OPTVALUE - VMEM_OPTORDER - 2))) /* * Maximum number of boundary tags that may be required to satisfy an From nobody Thu Dec 18 14:07:15 2025 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 4dXCCm0St1z6L11S for ; Thu, 18 Dec 2025 14:07: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXCCl733tz3RNb for ; Thu, 18 Dec 2025 14:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766066836; 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=sNfpSVyX5xwSKh6ad0Sqm9d6oQxfYrGDfm3hpyIf7GY=; b=Vp9tGLOxrwZGzP5m/4vzT6ZNq3rksLEB2RyrS/errudPB1LZejjB12EHnhd+Rh4/nXBiq+ PKu5QPo6HlH4MUBvVLYNzcgevS3dz4+MePIivm2Cw7Ll+sTuSIho07po6C8wXw3mDN3gzI liGNuXCxJ23dGaDaVjHtmuX6JvGry2qXLi8dgDVmIEhVkqcRWcFq9Odxcmsha/atP+EDUo bE7+zn3j6abEwVvOTYbzNueRUGEzLdCmNLcjlreeuU+NGgRBFdwhbTkOANNjCDU3fS6Wsh Il2+RRIWZCDAjKRhCgYoarNdFHUyaA7ibwOv5tSEVvKyTf81xQDRMnu0g9Cs2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766066836; 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=sNfpSVyX5xwSKh6ad0Sqm9d6oQxfYrGDfm3hpyIf7GY=; b=foRCr63cmBYefkvZxN8M42gyzBaIraamlLaaEDc44f1SHDMYNZQ64VnLY9Q6Xm4ZapLiwn /SDE+AZpjixcmz/J5jReBorxQ8QkxlRxTb47CeYyPRl48/9x5GJV28RjlvE4rDImB3vxEz FfBbKWg1fi5uNleofFxF4ZK6fgTNReW/63SfmSdaOVk0uUusRReR1hI3oVf0uUySzS17Wu VcY8X4kB6i5Lv1JD7XM+NxGR9ZZtmkBnFOXW/vdL7zbyaULfl1+zaA+WkC0Q2rvh+TDbnd BE+al1Z0VUlcIJdoH3QkKzQUg7BIfpwALUW5JpitjvxmWO9ePJ1l13LP4ZrK0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766066836; a=rsa-sha256; cv=none; b=j36Wk8Zt+/bEmdMjwwg2EfsDZagyaiknDVHfA9nm3AJDPb54SGU0ckFklX+k+5dZkKFH43 SVQ4zTaMgC1LaNftyGthjYQ1f/8b15BqlidNFqfpWXtUpdUhc9zJSMk17/Uwo26osgLzd+ z2EYESsrWaUBgOeTtnLTcUiXV/vxIfFECVFkTz0ZuXHbBKeRIIzjDrZi81g3SYdqmLAaFg kBAxf+ByrL+PjcT7L+Z3nWM+9LpfamgEwanDWg3WGNbTdT4UN/WxFsT5rl+WqPLRrq4M5G m44wViQ9y8qKsAke8zaYAS20vCgtQrwW7ffNm7+a76K9fTl3FIxndrfHA/Pomw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXCCl5rJnzhdh for ; Thu, 18 Dec 2025 14:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34cc0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 14:07:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a8be81456cfe - main - jail: Don't define malloc type M_PRISON_RACCT on !RACCT 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: a8be81456cfeecc66ba3b41eb9a2d3dfea7ebc8c Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 14:07:15 +0000 Message-Id: <69440a93.34cc0.901ff2@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a8be81456cfeecc66ba3b41eb9a2d3dfea7ebc8c commit a8be81456cfeecc66ba3b41eb9a2d3dfea7ebc8c Author: Olivier Certner AuthorDate: 2025-12-02 14:39:33 +0000 Commit: Olivier Certner CommitDate: 2025-12-18 14:07:00 +0000 jail: Don't define malloc type M_PRISON_RACCT on !RACCT Reviewed by: emaste, jamie MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54271 --- sys/kern/kern_jail.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 07b98fef8dfb..f803be76a70e 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -83,7 +83,9 @@ #define PRISON0_HOSTUUID_MODULE "hostuuid" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +#ifdef RACCT static MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); +#endif /* Keep struct prison prison0 and some code in kern_jail_set() readable. */ #ifdef INET From nobody Thu Dec 18 14:45:10 2025 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 4dXD3V1k5Nz6L5NP for ; Thu, 18 Dec 2025 14:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXD3V0lR8z3WR8 for ; Thu, 18 Dec 2025 14:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766069110; 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=A1X134/94OXBJy1FrCzwni9DeudEBuUV4jaqoz+0eg4=; b=y2W7fGiIir+YpyRtmmJ7JnvaNi3XXkGUNML9zv7kKpWn7WryFm77uyJxKlcp8fGxSoogxW OoOoRhMP27HfLQ+kyBoPSP5FeGqmb9+OIZljCNOFl6LdiDNx0wbkD3ObRVsWDuyX4Dw3mI mkbGd6qw0OtrRuNZpIehoBzBnHAtVIorDtFzDPyTbDjuJCN90tUBRVSSzJ2vpw6jDb/0A5 XA/ayVgs7x2tAPy/OfyekNAfNGA2gJJiN1GwKeTorYpYOxdWaY+nz0rHqDwZfYxg0qZjyS T/fi3RD+gSpa+GMcrPyXoAo/ExFOY/DUnlCNt4TcwD6OVifTelhyrN774k6C1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766069110; 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=A1X134/94OXBJy1FrCzwni9DeudEBuUV4jaqoz+0eg4=; b=kVZQ37MuyMeuQ7aq5RiXcfh1rSHxqTN5RS7lItb6kYIqTdFpMLtKDg2SsCpLc6qnxVq2UK lyWiWnnxYuSODDzL5yMGc3j6h7x2H3s2l0qok/KFOfJjXsfIUV8OPACUHmO6VZcwmFPOCR lsA2oR2O5YR1fAU4hotw1reD37gYwfVbWiZUNaF01Hxg8J1LE9mgq/qyBxsrremdEBupng ukIfdZAdvf2v3fJSudIM8C21a5NbL4IodNPvYicuatc7ZZxhIl10AcP1dntAjphspIdvJE rmc5lmho4SPXlITrJYTAWZW2FZxujE1DABp4MkVb3zKPGFInKWw3yCxQ9lAJPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766069110; a=rsa-sha256; cv=none; b=NQEfHVGsUtn0HyZi70dwLBs52A2cIyT5ernYrgRI5Jq18Wn1FWBQKN8VGzs8qqhlJtxJSJ 8XxEDUW1HbQoOd6whro4EVwWU57TE10dtg0/cEWW/EyZv3Qk3JexmJHkAaGVok7opKqO+3 1YKGxa2FkWob/CaA9/YZBzVuILCH6ASBpVPHCdL6Zv7feCuk9jqB1M3YJ+Q+I6YYvaXMU4 V4Y1x+Fbs0/0QDkETCu+3E5aG+Dn60ewMwmA0Smmld8lTfCfXJJSyBIWZbfK7DluNgTTxm usSQiv1tbjJEie7mP1gD9iSCxhxOhbYLGc9S8BTTMKrE2dwUTDSKuf3IxR0Pzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXD3V0KkNzjss for ; Thu, 18 Dec 2025 14:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39916 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 14:45:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e3a0571ad74d - main - vtnet: expose flags via sysctl tree 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: e3a0571ad74d8429a95fcae9efc1d91cc109a337 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 14:45:10 +0000 Message-Id: <69441376.39916.119146bf@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e3a0571ad74d8429a95fcae9efc1d91cc109a337 commit e3a0571ad74d8429a95fcae9efc1d91cc109a337 Author: Michael Tuexen AuthorDate: 2025-12-18 14:42:13 +0000 Commit: Michael Tuexen CommitDate: 2025-12-18 14:42:13 +0000 vtnet: expose flags via sysctl tree Provide the flags used for a vtnet interface via the sysctl tree. This is mostly used for debugging purposes. Reviewed by: Timo Völker MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54283 --- share/man/man4/vtnet.4 | 4 +++- sys/dev/virtio/network/if_vtnet.c | 20 ++++++++++++++++++++ sys/dev/virtio/network/if_vtnetvar.h | 5 +++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index fd41b36882a6..92f72030fc31 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2025 +.Dd December 18, 2025 .Dt VTNET 4 .Os .Sh NAME @@ -271,6 +271,8 @@ The number of active virtqueue pairs. The number of requested virtqueue pairs. .It Va dev.vtnet. Ns Ar X Ns Va .max_vq_pairs The maximum number of supported virtqueue pairs. +.It Va dev.vtnet. Ns Ar X Ns Va .flags +The flags of the interface. Mostly for debugging purposes. .El .Sh SEE ALSO .Xr arp 4 , diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index d9daa5bfd70a..58cef9b34449 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -4398,6 +4399,22 @@ vtnet_setup_stat_sysctl(struct sysctl_ctx_list *ctx, "Times the transmit interrupt task rescheduled itself"); } +static int +vtnet_sysctl_flags(SYSCTL_HANDLER_ARGS) +{ + struct vtnet_softc *sc; + struct sbuf *sb; + int error; + + sb = sbuf_new_auto(); + sc = (struct vtnet_softc *)arg1; + sbuf_printf(sb, "%b", sc->vtnet_flags, VTNET_FLAGS_BITS); + sbuf_finish(sb); + error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); + sbuf_delete(sb); + return (error); +} + static void vtnet_setup_sysctl(struct vtnet_softc *sc) { @@ -4420,6 +4437,9 @@ vtnet_setup_sysctl(struct vtnet_softc *sc) SYSCTL_ADD_INT(ctx, child, OID_AUTO, "act_vq_pairs", CTLFLAG_RD, &sc->vtnet_act_vq_pairs, 0, "Number of active virtqueue pairs"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "flags", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + vtnet_sysctl_flags, "A", "Flags"); vtnet_setup_stat_sysctl(ctx, child, sc); } diff --git a/sys/dev/virtio/network/if_vtnetvar.h b/sys/dev/virtio/network/if_vtnetvar.h index cab7ced639a7..eb5e6784b07f 100644 --- a/sys/dev/virtio/network/if_vtnetvar.h +++ b/sys/dev/virtio/network/if_vtnetvar.h @@ -191,6 +191,11 @@ struct vtnet_softc { char vtnet_mtx_name[16]; uint8_t vtnet_hwaddr[ETHER_ADDR_LEN]; }; +/* vtnet flag descriptions for use with printf(9) %b identifier. */ +#define VTNET_FLAGS_BITS \ + "\20\1MODERN\2MAC\3CTRL_VQ\4CTRL_RX\5CTRL_MAC\6VLAN_FILTER\7TSO_ECN" \ + "\10MRG_RXBUFS\11LRO_NOMRG\12MQ\13INDIRECT\14EVENT_IDX\15SUSPENDED" \ + "\16FIXUP_NEEDS_CSUM\17SW_LRO" static bool vtnet_modern(struct vtnet_softc *sc) From nobody Thu Dec 18 15:23:29 2025 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 4dXDvj6fJ7z6L9F7 for ; Thu, 18 Dec 2025 15:23: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXDvj5ZG5z3fK8 for ; Thu, 18 Dec 2025 15:23:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766071409; 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=oFhb1ptXIcqV/mrtjpYpIjgKvZFMRhUobeeHsRAbUmU=; b=bK8HE8kRPOi/cNmOg1T4vhRIsfUomKJjMGhwIg9jenwOUUO78pGSbbzGG8tswh+BRdjMCS 3dIhDAcaEZwmJNg833USYA8OWJoJMPtBJrmi8CG8IYG176MMVIU3C8aLfHgaMKt6Edc2va WMEv1W1th5Qd7nH7Kr+Fg1xg5LBApHoxt9NlkIViEaGGRlWSXiHAj98Tx1HbdW6zDvRn1h aw6nAhmmJ5iqsbHLFZFAPZNmblqxa2LVLKG9Uc2aZMohWyBEGKBwUFj0BCPvSVDQMm9NqF qntjw1JU+cD75UtXwQZzVQvJ96Q7pW/O7fewYDS6SzzcA0dDeEEcGIDryY6cWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766071409; 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=oFhb1ptXIcqV/mrtjpYpIjgKvZFMRhUobeeHsRAbUmU=; b=L5Llw9+WLccUeBwX1PokCvWifq39MyTzz9wF+67pWGlwVKugmyXDOsP4bYtXVAi8JMPZui yDeh/aEcwt4f0kxtJkLa996QRJ3L/AtU9EMohT8AmYaSHO4iuJLAx01SDq2qaWuLC5bkqv oFW1b9UcCdI647Fv6gpIHfVXgFLgSJtfTfYce0e3318TOTv8N3lT++9cHRXAcd7TAjMfwL ooebDz967ZOXGCm3t5sQZhwBEn+5kIouhQipikBkYNzkiOp5idPGaFH4Jj9XZCSMYYIzX7 M5eg3gZudOHCCv5I7kNXDLjo7gKYF5pow1/ummzW3X17WYChrmkp0VcUPJ2B+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766071409; a=rsa-sha256; cv=none; b=OG8Qo/beSHQhDwZQEO+61jm3+8aDr+VT8u48/EhLWB24Msl1Ns5Rxeiujp8KznV4U3cDaB THjRgsDlRHkaV71QONz5yOQuFsgCYAFR1VSfzr3zMHRIgffHa7b5WqIsKtMwjBTzAtqV2y Stk+0VBwd4/5955T7R23h7y9t2O1zq+J7zHVNCd59sAVfBb4bcFCRdzppOqDCU8fDTIySX ianWLRcSo8dFPpJa/1zUQ7SO5f4I4ZxAK7hMLG4YX6MTmpR+fnfDu4e0MZbpJccUivE9Z1 WrBFKi1XW36ctq0bhZ7PD1Nw2fOlp1RPeOIVa4OJDPllEHyMDtz2gBam5svBOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXDvj57YkzkvJ for ; Thu, 18 Dec 2025 15:23:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cabf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 15:23:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Johan=?utf-8?Q? S=C3=B6llv?=ander Subject: git: 4f809ffec69c - main - gpart: add libxo support for "show" subcommand + man page updates 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: js X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f809ffec69cd6ede3e7be9a5bc876b2e5931028 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 15:23:29 +0000 Message-Id: <69441c71.3cabf.277d1ceb@gitrepo.freebsd.org> The branch main has been updated by js: URL: https://cgit.FreeBSD.org/src/commit/?id=4f809ffec69cd6ede3e7be9a5bc876b2e5931028 commit 4f809ffec69cd6ede3e7be9a5bc876b2e5931028 Author: Johan Söllvander AuthorDate: 2025-12-18 15:06:09 +0000 Commit: Johan Söllvander CommitDate: 2025-12-18 15:22:59 +0000 gpart: add libxo support for "show" subcommand + man page updates Added libxo support to `gpart show`, also updated the man pages for geom and gpart to show where you can expect libxo formatted output. PR: 290629 MFC after: 1 week Sponsored by: ConnectWise Reviewed by: asomers, mckusick, phil Approved by: asomers (mentor) Differential Revision: https://reviews.freebsd.org/D53950 --- lib/geom/part/Makefile | 2 +- lib/geom/part/geom_part.c | 94 ++++++++++++++++++++++++++++++----------------- lib/geom/part/gpart.8 | 11 +++++- sbin/geom/core/geom.8 | 12 +++++- 4 files changed, 83 insertions(+), 36 deletions(-) diff --git a/lib/geom/part/Makefile b/lib/geom/part/Makefile index 58390e299d6f..4a273eca3a6d 100644 --- a/lib/geom/part/Makefile +++ b/lib/geom/part/Makefile @@ -2,6 +2,6 @@ PACKAGE=geom GEOM_CLASS= part -LIBADD= util +LIBADD= util xo .include diff --git a/lib/geom/part/geom_part.c b/lib/geom/part/geom_part.c index cbbc81d3cc60..ac1bc25118f1 100644 --- a/lib/geom/part/geom_part.c +++ b/lib/geom/part/geom_part.c @@ -46,6 +46,7 @@ #include #include #include +#include #include "core/geom.h" #include "misc/subr.h" @@ -77,7 +78,6 @@ static int geom_is_withered(struct ggeom *); static const char *find_geomcfg(struct ggeom *, const char *); static const char *find_provcfg(struct gprovider *, const char *); static struct gprovider *find_provider(struct ggeom *, off_t); -static const char *fmtsize(int64_t); static int gpart_autofill(struct gctl_req *); static int gpart_autofill_resize(struct gctl_req *); static void gpart_bootcode(struct gctl_req *, unsigned int); @@ -283,16 +283,6 @@ find_provider(struct ggeom *gp, off_t minsector) return (bestpp); } -static const char * -fmtsize(int64_t rawsz) -{ - static char buf[5]; - - humanize_number(buf, sizeof(buf), rawsz, "", HN_AUTOSCALE, - HN_B | HN_NOSPACE | HN_DECIMAL); - return (buf); -} - static const char * fmtattrib(struct gprovider *pp) { @@ -622,6 +612,7 @@ static void gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) { struct gprovider *pp; + struct gconfig *gc; const char *s, *scheme; off_t first, last, sector, end; off_t length, secsz; @@ -659,12 +650,14 @@ gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) wname = wmax; pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; secsz = pp->lg_sectorsize; - printf("=>%*jd %*jd %*s %s (%s)%s\n", - wblocks, (intmax_t)first, wblocks, (intmax_t)(last - first + 1), - wname, gp->lg_name, - scheme, fmtsize(pp->lg_mediasize), - s ? " [CORRUPT]": ""); - + xo_open_instance("part"); + xo_emit("=>{t:start/%*jd} {t:sectors/%*jd} {t:name/%*s} {:scheme} ({h:size/%ld}){t:state}\n", + wblocks, (intmax_t)first, wblocks, (intmax_t)(last - first + 1), + wname, gp->lg_name, + scheme, pp->lg_mediasize, + s ? " [CORRUPT]": ""); + + xo_open_list("partitions"); while ((pp = find_provider(gp, first)) != NULL) { s = find_provcfg(pp, "start"); sector = (off_t)strtoimax(s, NULL, 0); @@ -676,33 +669,66 @@ gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) s = find_provcfg(pp, "index"); idx = atoi(s); if (first < sector) { - printf(" %*jd %*jd %*s - free - (%s)\n", + xo_open_instance(s); + xo_emit(" {t:start/%*jd} {t:sectors/%*jd} {P:/%*s} {ne:free}- free - ({h:size/%ld})\n", wblocks, (intmax_t)first, wblocks, (intmax_t)(sector - first), wname, "", - fmtsize((sector - first) * secsz)); + "true", (sector - first) * secsz); + xo_close_instance(s); } + xo_open_instance(s); + xo_emit(" {t:start/%*jd} {t:sectors/%*jd}", + wblocks, (intmax_t)sector, wblocks, (intmax_t)length); if (show_providers) { - printf(" %*jd %*jd %*s %s %s (%s)\n", - wblocks, (intmax_t)sector, wblocks, - (intmax_t)length, wname, pp->lg_name, - find_provcfg(pp, element), fmtattrib(pp), - fmtsize(pp->lg_mediasize)); + xo_emit(" {t:name/%*s}{e:index/%d}", wname, pp->lg_name, idx); } else - printf(" %*jd %*jd %*d %s %s (%s)\n", - wblocks, (intmax_t)sector, wblocks, - (intmax_t)length, wname, idx, - find_provcfg(pp, element), fmtattrib(pp), - fmtsize(pp->lg_mediasize)); + xo_emit(" {t:index/%*d}{e:name}", wname, idx, pp->lg_name); + + if (strcmp(element, "label") == 0) + xo_emit(" {:label}{e:type}{e:rawtype}", + find_provcfg(pp, element), + find_provcfg(pp, "type"), + find_provcfg(pp, "rawtype")); + else if (strcmp(element, "type") == 0) + xo_emit(" {:type}{e:label}{e:rawtype}", + find_provcfg(pp, element), + find_provcfg(pp, "label"), + find_provcfg(pp, "rawtype")); + else + xo_emit(" {:rawtype}{e:type}{e:label}", + find_provcfg(pp, element), + find_provcfg(pp, "type"), + find_provcfg(pp, "label")); + + idx = 0; + LIST_FOREACH(gc, &pp->lg_config, lg_config) { + if (strcmp(gc->lg_name, "attrib") != 0) + continue; + idx++; + if (idx == 1) + xo_emit(" ["); + else + xo_emit(","); + xo_emit("{l:attribute}", gc->lg_val); + } + if (idx) + xo_emit("]"); + xo_emit(" ({h:size/%ld})\n", pp->lg_mediasize); + xo_close_instance(s); first = end + 1; } + if (first <= last) { + xo_open_instance("unallocated"); length = last - first + 1; - printf(" %*jd %*jd %*s - free - (%s)\n", + xo_emit(" {t:start/%*jd} {t:sectors/%*jd} {P:/%*s} {ne:free}- free - ({h:size/%ld})\n", wblocks, (intmax_t)first, wblocks, (intmax_t)length, - wname, "", - fmtsize(length * secsz)); + wname, "", "true", length * secsz); + xo_close_instance("unallocated"); } - printf("\n"); + xo_close_list("partitions"); + xo_close_instance("part"); + xo_emit("\n"); } static int @@ -752,6 +778,7 @@ gpart_show(struct gctl_req *req, unsigned int fl __unused) errx(EXIT_FAILURE, "Class %s not found.", name); } show_providers = gctl_get_int(req, "show_providers"); + xo_open_list(name); if (nargs > 0) { for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); @@ -766,6 +793,7 @@ gpart_show(struct gctl_req *req, unsigned int fl __unused) gpart_show_geom(gp, element, show_providers); } } + xo_close_list(name); geom_deletetree(&mesh); } diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8 index 2e11417f8494..97dd60182435 100644 --- a/lib/geom/part/gpart.8 +++ b/lib/geom/part/gpart.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 24, 2025 +.Dd December 4, 2025 .Dt GPART 8 .Os .Sh NAME @@ -112,6 +112,7 @@ .Ar geom .\" ==== SHOW ==== .Nm +.Op Fl -libxo .Cm show .Op Fl l | r .Op Fl p @@ -537,6 +538,13 @@ See .It Cm unload See .Xr geom 8 . +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_options 7 +for details on command line arguments. .El .Sh PARTITIONING SCHEMES Several partitioning schemes are supported by the @@ -1519,6 +1527,7 @@ for details .El .Sh SEE ALSO .Xr geom 4 , +.Xr xo_options 7 , .Xr boot0cfg 8 , .Xr geom 8 , .Xr glabel 8 , diff --git a/sbin/geom/core/geom.8 b/sbin/geom/core/geom.8 index b864b3b238f5..29c6385da3f7 100644 --- a/sbin/geom/core/geom.8 +++ b/sbin/geom/core/geom.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 9, 2023 +.Dd December 4, 2025 .Dt GEOM 8 .Os .Sh NAME @@ -36,11 +36,13 @@ .Ar class .Cm help .Nm +.Op Fl -libxo .Ar class .Cm list .Op Fl a .Op Ar name ... .Nm +.Op Fl -libxo .Ar class .Cm status .Op Fl ags @@ -118,6 +120,13 @@ Print detailed information about the geom which provides .Ar provider-name . .It Fl t Display geoms hierarchy as a tree. +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_options 7 +for details on command line arguments. .El .Pp Class-specific commands are implemented as shared libraries which @@ -205,6 +214,7 @@ geom md unload .Sh SEE ALSO .Xr libgeom 3 , .Xr geom 4 , +.Xr xo_options 7 , .Xr gcache 8 , .Xr gconcat 8 , .Xr geli 8 , From nobody Thu Dec 18 16:47:07 2025 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 4dXGmD20R1z6LKjD for ; Thu, 18 Dec 2025 16:47:08 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXGmD0pHSz3rhb for ; Thu, 18 Dec 2025 16:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766076428; 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=5ekn7BQXiG+vkqtijJEjD8cyfo6PPu4S5FuZeI7qS2Y=; b=qCis+k0nyshIm/HIcwUor77RyR0WRmd6CZmN32cFKxMK4h5Les49WyzW+dYZ2j2QX9n59M LpUynGSQuiiJUallCqB6gB9cS28vJdxJPSA2PRBrFSlTsx633x08pUOKSmMnS6Pw0XO2YG laXh1USpoGVHNho1IomnTV/AhaAyGZJqKNerBYTgEjNEC7EF5Et0NzxSCmgvkLlpDa3vEd RDi6TR5kLIclsVkArzOJyv9p/wxmxXq5T8NukojUt2W9iNvYDILU7BHCqzwYRE25kSh/9t +nsJbqB6zO/sCOvtqrHo1fJ1ulG0tN42bs5aZyhdV/pbQ2SytcZ5oWuX9TRD2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766076428; 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=5ekn7BQXiG+vkqtijJEjD8cyfo6PPu4S5FuZeI7qS2Y=; b=WcxILErHP/zmhjook8yfE8PeyB0JXkrxr5OmzyZm5QDqBt15FDe8Wrlc4yeTUJIrlGWEdR bXIcyR5evW5qNYp0j3LqPfuAnpezHxX8Xh0lnrJ0OdYizaVHQbq0Sfuercy/29SPCFPnQf hP6EYqQNzeJZflA63hAFZbctyNM/NBeUZ9S00WNBR9crii7Bh0otHYq6MSWRWNcr54vmtF 1u8WFrZEJkm2G1KRgyQcEfwC+qPUamAlvpNS/qXbd3bUB2FareM+VxtTvdm2WVrPxAphGY rQolZezch8TxEdMLwoY+w+wKdUOCLifW1E5n/ybWCzNlg7EFGNxfm2SXUz3FJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766076428; a=rsa-sha256; cv=none; b=SyV9l3ntScbmJ4GNTdJVn9hBqOvyBkpUjeiTKvsfdDqrVovTr6cRoyVXRKuylf86nBpZbm AJ3xi7ZZzEJ5OkQ7bmsUxTfU5gYhrUYg8x72aA+Ro9Nw+sZ4KXtVfyPZ5Lm0xb1YcAuiA7 KeYOWauM7wsBx+RKDYDazPd4JZlen3f8qCzfbZseNzMAJvR7j9EXS9BGWx6V5OaR8fw5Kq wlkqV3F7uNylvQwyBA8hDWxCYTopGKcPheaR2XwZl50b6VlrypNRF5KjwuHHCU0V5d10+4 0R0VfH/1OipWSBQaWhLGTRNI071f0DS17YJWjzQ1tSNFHERgAUVuwoDEpLCyDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXGmC6XkkzmYG for ; Thu, 18 Dec 2025 16:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c8c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 16:47:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a4d766caf711 - main - bpf: add a crutch to support if_vmove 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: a4d766caf7114392b80793c8306d5a712f31557c Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 16:47:07 +0000 Message-Id: <6944300b.c8c6.e13af2c@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a4d766caf7114392b80793c8306d5a712f31557c commit a4d766caf7114392b80793c8306d5a712f31557c Author: Gleb Smirnoff AuthorDate: 2025-12-18 16:46:20 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-18 16:46:20 +0000 bpf: add a crutch to support if_vmove Fixes: 0bf42a0a05b9c802a6d9ca4a6b8696b29a26e08b --- sys/net/bpf.c | 16 ++++++++++++++++ sys/net/bpf.h | 1 + sys/net/if.c | 1 + 3 files changed, 18 insertions(+) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 54da49f3d656..9f0b57728e88 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2722,6 +2722,22 @@ bpf_detach(struct bpf_if *bp) BPF_UNLOCK(); } +#ifdef VIMAGE +/* + * Move bpf to a different VNET. This KPI is a crutch to support if_vmove + * and is not supposed to be used anywhere else. + */ +void +bpf_vmove(struct bpf_if *bp) +{ + + BPF_LOCK(); + LIST_REMOVE(bp, bif_next); + LIST_INSERT_HEAD(&V_bpf_iflist, bp, bif_next); + BPF_UNLOCK(); +} +#endif + bool bpf_peers_present_if(struct ifnet *ifp) { diff --git a/sys/net/bpf.h b/sys/net/bpf.h index f6bcb0e34ed4..6d2ecd985225 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -425,6 +425,7 @@ CK_LIST_HEAD(bpfd_list, bpf_d); struct bpf_if * bpf_attach(const char *, u_int, u_int, const struct bif_methods *, void *); void bpf_detach(struct bpf_if *); +void bpf_vmove(struct bpf_if *bp); void bpf_bufheld(struct bpf_d *d); int bpf_validate(const struct bpf_insn *, int); void bpf_tap(struct bpf_if *, u_char *, u_int); diff --git a/sys/net/if.c b/sys/net/if.c index f5006781541c..d7c6b22821e2 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1285,6 +1285,7 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet) */ CURVNET_SET_QUIET(new_vnet); if_attach_internal(ifp, true); + bpf_vmove(ifp->if_bpf); CURVNET_RESTORE(); } From nobody Thu Dec 18 17:04:41 2025 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 4dXH8V2qj6z6LMHP for ; Thu, 18 Dec 2025 17:04: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXH8V04d2z3vP1 for ; Thu, 18 Dec 2025 17:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766077482; 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=mBxQvXMX+eyPzos+c54chVjaihHTpksN5mpT0OAuS8k=; b=w6moCyUCFkDrhD/MTxlDekh41uq8gtA99zdd/c7cc1tg5VJ3NOJQyk3JT4VXKlDv5t8UWf AAfZcpyigSp8X11GxBrntPNbgVbL/EFlDg51mvo1yPujFrNrUEIFZR/eqi3eJGUQ8V3bAS vWhpyUAlw+JUfEcfSE+8uXqtHvMOL7tP8zwV1i/J9q0ovDOZOJs+4vd7JSqUlNxQ8Rnnlo YEAT1E3YL2Lb4ElyO7D2KoxAYduimP8IQHJuEFkHO3GkSgbqwYSP/LxpsoMct1xRI29fRA Gb2njggJOqSj6iROw+zqvc0kJRTs9bzLnw13sAOE3rkZPeF1f9IBvUIo1eShtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766077482; 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=mBxQvXMX+eyPzos+c54chVjaihHTpksN5mpT0OAuS8k=; b=kksT9Cl6310/aZJXfwR/WEGAHq+JUPFt5xEYFQSCuVZVj4BDGRttuhPar6ZXly1PpiDX/e bLVov9v7JnxjeJ2h73H4z3+fugirAEhUQScri+i11aBCxM09wpyCjDLnCPAIe88SmbGmGj ha2a3CvLVqtXgsimaIYC+pmrC9OairFscXfEF7echmDpXZQSByrLHvcRJRgzUF8uEe4Fdr s5weuTfKSXneaOdmWcLkWedvlQVvo0RY5ws4CDtYb+2yKvld3LlSx1RGCpIlDTA6/DeAir d+nstOI6EhEbqoAk/tv3Y2757efp+pLUGnspeU9BR06e9lqqeBBbXPyvrGAAqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766077482; a=rsa-sha256; cv=none; b=w6du1ubXWEzj+1eyEeCfwTg3Bve//M9gXswvcXdSHATyVsBSGvtlW4CKjeKT2oVVIXmDL4 FrFRWFQpg97bl3jX/N5gRobY2kfusMBKmv0Ts7Q/pZrGeY5iPe06+sA/NuXB1BLyk3j2Sp mUH0aJVoB/pMPJOUsgBgrasWliYLzY3MvdJUWOYdYItgZDulHsTO5uTU5fNwv7PKkKl2Hz KzyZM6Rfb5OixMNT8oFj/v2y2Iw2z08s3MadHlpaUfdwt+SAd1gJWvseyqN3mPMmYQAW38 tnb2e4qiVva3fABRzfAWn5/Er/nkxiYWJvw6R2TYRmUSW8kUrjpTJvWuOIEW3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXH8T61TqznBP for ; Thu, 18 Dec 2025 17:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f868 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 17:04:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: f6e183301851 - main - vtnet.4: put each sentence on its own line 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: f6e183301851e3e826d53a29e76cfc9bc7626477 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 17:04:41 +0000 Message-Id: <69443429.f868.2678052@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f6e183301851e3e826d53a29e76cfc9bc7626477 commit f6e183301851e3e826d53a29e76cfc9bc7626477 Author: Michael Tuexen AuthorDate: 2025-12-18 14:57:46 +0000 Commit: Michael Tuexen CommitDate: 2025-12-18 14:57:46 +0000 vtnet.4: put each sentence on its own line Reported by: ziaee Fixes: e3a0571ad74d ("vtnet: expose flags via sysctl tree") MFC after: 1 week --- share/man/man4/vtnet.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 92f72030fc31..4ef8693305cf 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -272,7 +272,8 @@ The number of requested virtqueue pairs. .It Va dev.vtnet. Ns Ar X Ns Va .max_vq_pairs The maximum number of supported virtqueue pairs. .It Va dev.vtnet. Ns Ar X Ns Va .flags -The flags of the interface. Mostly for debugging purposes. +The flags of the interface. +Mostly for debugging purposes. .El .Sh SEE ALSO .Xr arp 4 , From nobody Thu Dec 18 18:17:06 2025 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 4dXJm24Wqpz6LTGc for ; Thu, 18 Dec 2025 18:17:06 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXJm21cYLz45yb for ; Thu, 18 Dec 2025 18:17:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766081826; 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=yOOvKfTp4nXGtsaNH17tfohBms9P4K2EP+gKPVNquo0=; b=rnVxq9Zaf8VWUPnu98UfAWsXjWcme3TeWOZl7C7n/PxsOpQtWoVxGuVEEe51V4UR4XtaUP o3wziB/cdTrDXnD6G5+TDgz+CFzD+yZdQ7S8gNdxKzgLuvc7BBHhbJReKtIvbpd7J+8vsM vDhCvAeW1JCGUngdngYubqBAaWnNbIJZ7uN05GvuJavnWmdDU0IMnyh8yPx+hvOciXC6op 5mHI7hRaynxx3o/hkOspCqJ8h++q5B6AXJd+lQ/Rc6WJv5+MOeOsG8v/thAtx5oZNDBs53 Edgl1ytFiy23UduePqryNun6XLj5jGLxG2pNiGfxWGFsJUMdUq8Kd4AQctACYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766081826; 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=yOOvKfTp4nXGtsaNH17tfohBms9P4K2EP+gKPVNquo0=; b=tH3FzF83aoUVMPat5DlJ48yWt1Yl7ysljFPAGS80YO+acqvqu8QT9VnQcv2fwdumbRBKOD Jnx4WIZ4OaPLxSkkNhrapzcruYMBXF/IMQ/9VFFVPlXT4AHaoKFEPrPEEGDL4sxmxxVFpC BJfqHfLS2JqaU0CI+fa6USm8BKru1Gwk3DeDljWCAl84PhUw8Ovwgv2+X0PKD6cu94S0DB Yix7CoyB/dN+8iA9UcXHJzx2U6RXl1rhvDniIZSceVVlmuVFeKAQqIvGJyKzt/cywEF62a Va1AfCtGPLx6zusyBpePkLnVamhcCYVta5c3AbqBUSUTdnb3uzlKSa3aGE62qA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766081826; a=rsa-sha256; cv=none; b=hzrSiEzfb12T5qv0G9DyEpczVC+hdIMFpa1zd5BbqbldshEZnTescSdmp4Lnyo9NdrO/vl 9MnOOmnCyH6kHeagPTwtsrnzL/OFmWs1yaOxZ/NNHIny7x7gkFR27AipYYX02lUgxm5HDk 9vq/BgMON0ISkBMj7SYNG7cwSyfy9QgbYmTdCW3Yl7Gb2Qlsg1DbmckuYUv39oH2ecO4oT /k1jR+G5YFJb3l+5aqZNt7I4j6ijgW+PQhdtT3FnRzgmX3FD1/En8z4sgUDv5KkhdoQEfN p9pgFM1ycUtHgYRXodPSJIF6J5xO9cnL4ffC6pYqPmOF+Eyt1YZx3bpltPcnpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXJm20hm7zqHm for ; Thu, 18 Dec 2025 18:17:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26716 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 18:17:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: f74173b5da3d - main - krb5: Remove extraneous exports file 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f74173b5da3df22ec49c3bf6e8d10bcffdd1f4d3 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 18:17:06 +0000 Message-Id: <69444522.26716.575ca24d@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f74173b5da3df22ec49c3bf6e8d10bcffdd1f4d3 commit f74173b5da3df22ec49c3bf6e8d10bcffdd1f4d3 Author: Cy Schubert AuthorDate: 2025-12-18 18:15:12 +0000 Commit: Cy Schubert CommitDate: 2025-12-18 18:16:39 +0000 krb5: Remove extraneous exports file We use version.map in the FreeBSD MIT KRB5 build. The exports file is a lefteover from when the version map file was created. MFC after: 1 week --- krb5/util/verto/libverto.exports | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/krb5/util/verto/libverto.exports b/krb5/util/verto/libverto.exports deleted file mode 100644 index 3745d5014653..000000000000 --- a/krb5/util/verto/libverto.exports +++ /dev/null @@ -1,33 +0,0 @@ -verto_add_child -verto_add_idle -verto_add_io -verto_add_signal -verto_add_timeout -verto_break -verto_cleanup -verto_convert_module -verto_default -verto_del -verto_fire -verto_free -verto_get_ctx -verto_get_fd -verto_get_fd_state -verto_get_flags -verto_get_interval -verto_get_private -verto_get_proc -verto_get_proc_status -verto_get_signal -verto_get_supported_types -verto_get_type -verto_new -verto_reinitialize -verto_run -verto_run_once -verto_set_allocator -verto_set_default -verto_set_fd_state -verto_set_flags -verto_set_private -verto_set_proc_status From nobody Thu Dec 18 18:50:05 2025 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 4dXKVP2dWQz6LX2W; Thu, 18 Dec 2025 18:50:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXKVN61yvz4G3R; Thu, 18 Dec 2025 18:50:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BIIo5AE026227; Thu, 18 Dec 2025 20:50:08 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BIIo5AE026227 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BIIo5vn026226; Thu, 18 Dec 2025 20:50:05 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Dec 2025 20:50:05 +0200 From: Konstantin Belousov To: Stefan =?utf-8?B?RcOfZXI=?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cf5eed715915 - main - if_rge: fix typo in man page Message-ID: References: <6943b3c8.37d76.6e48da27@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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6943b3c8.37d76.6e48da27@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dXKVN61yvz4G3R On Thu, Dec 18, 2025 at 07:56:56AM +0000, Stefan Eßer wrote: > The branch main has been updated by se: > > URL: https://cgit.FreeBSD.org/src/commit/?id=cf5eed71591563ecfc7a40c28d7c4f001f903219 > > commit cf5eed71591563ecfc7a40c28d7c4f001f903219 > Author: Stefan Eßer > AuthorDate: 2025-12-18 07:55:03 +0000 > Commit: Stefan Eßer > CommitDate: 2025-12-18 07:55:03 +0000 > > if_rge: fix typo in man page > > Fix the list of devices supported by the driver: RTL8125 occured > twice, should have been RTL8127 in one case. > > Approved by: adrian > --- > share/man/man4/rge.4 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/share/man/man4/rge.4 b/share/man/man4/rge.4 > index 072f1ece3230..5b624cb6bf95 100644 > --- a/share/man/man4/rge.4 > +++ b/share/man/man4/rge.4 > @@ -3,7 +3,7 @@ > .\" > .\" SPDX-License-Identifier: BSD-2-Clause > .\" > -.Dd December 12, 2025 > +.Dd December 18, 2025 > .Dt RGE 4 > .Os > .Sh NAME > @@ -121,7 +121,7 @@ For more information on configuring this device, see > .Sh HARDWARE > The > .Nm > -driver supports RealTek RTL8125, RTL8126, RTL8125 and Killer E3000 based > +driver supports RealTek RTL8125, RTL8126, RTL8127 and Killer E3000 based > PCIe 1GB to 1GB Ethernet devices. Should this line be '1GB to 10GB'? > .Sh SYSCTL VARIABLES > The following variables are available as both From nobody Thu Dec 18 19:07:33 2025 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 4dXKtF5cLZz6LYfV for ; Thu, 18 Dec 2025 19:07:33 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXKtF3b17z4JtX for ; Thu, 18 Dec 2025 19:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766084853; 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=ZsNtPMDAwX+OU2PXT7Qi3uLcC4HI8BA4hrgB33m6ajY=; b=wlsM8W9BLvUsU+5Xfwwv+mr42kflU64+KmjAFq7O3DlDXbQgtQkhTsaSGLfwYCIV16/FCw dYULmrsg1GtjVuTT3ZwyuvOeIxyiqxySSPbmZ0nZ5LQOAax8WeNWYDpXxRp+N/qM8GbEVM /BromMQWNc3Ot11FGQjzQ9R8B6slANR4p1m3r9evh+OaAIvUm9pppRJaoYI2NHu8dxomXF O7MiDFby8eEu1qaJ6Sig+lLk0yFUaEm7gfPPH4zNGOMd7ALBP+VoqSuvF9+QBp0/BMOfon VLDgLjmGUBJ8ke3BXJ2R/nr1Nir1+dlmMwh1r8wZ9uijas82A0shOuw+wvoN5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766084853; 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=ZsNtPMDAwX+OU2PXT7Qi3uLcC4HI8BA4hrgB33m6ajY=; b=CVtn//27fra05sTBYADRyF2KeksR+f0BB2zd2yVKkJIJhoCpxeOVnqcnW8QCWvk7Pd+95I /l7QfZd6co8gauD5sPT2b0c205FlTci9dyoBjF+Ivdg4BeutyQyd1fok7JyNdumnq34f1r DqoYg6wMhDQkhndq6VxMRncZzsQY7Nq4Ya2MXctLbHkC8e/CDiQ4xaIBmzVx5BsLCdPAzd jbxJrJUwE0fw9QB9zztStZuqknxOJXYGhenJfiVGoPUOXqPIpnsXa2Sdmn+/8sKR9+s+YV YEpnp9RfAp6EDP0bmf98RZKKOqsYxqoBvwkWD8iTmDxSy6VCeftbR5uGawih3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766084853; a=rsa-sha256; cv=none; b=aAOPeUCZMxKPvDdcYNMHFg2pFavFPNYK7YxcyWZj7I6BAVh4K+4Yz48lXgsP1RdGNE2r2X BRxm0TCfV8QYT6gZ9yapLRy0UJrfcjT0UXg5+vUg5z8Gnw0NqznMwOMFbPGmgRiPi9Zub3 asq4635AY79rS2JlHHpaU8pscsaPIUq3oWmtyjTCfu+NO39yGsXn6DLHu5ohAEBssKqzYX CMazUMTMVC/Y8UzEWj9pKPkeMfBzBN9iwIOuKuU8IOB9Yoq21zxEsBuam1p3HCKKQ/+vot 8US5RMFfjeSY+Ij/1sxYBvKVpfi1ifnHG2wgQaVRnFMT9uAr1sa3744dniIoZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXKtF2d2jzrT2 for ; Thu, 18 Dec 2025 19:07:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3341b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:07:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 75177aebf039 - main - aq(4): Add build infrastructure 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: 75177aebf0397af36b1f28f6b6e64207ec3d8188 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:07:33 +0000 Message-Id: <694450f5.3341b.5fc4f477@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=75177aebf0397af36b1f28f6b6e64207ec3d8188 commit 75177aebf0397af36b1f28f6b6e64207ec3d8188 Author: Ed Maste AuthorDate: 2025-11-13 19:05:38 +0000 Commit: Ed Maste CommitDate: 2025-12-18 19:06:24 +0000 aq(4): Add build infrastructure Reviewed by: adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53839 --- sys/conf/files | 11 +++++++++++ sys/modules/Makefile | 1 + sys/modules/aq/Makefile | 12 ++++++++++++ 3 files changed, 24 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index aa0d05df45c7..d41e3ccc23be 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -844,6 +844,17 @@ dev/alpm/alpm.c optional alpm pci dev/amdpm/amdpm.c optional amdpm pci | nfpm pci dev/amdsmb/amdsmb.c optional amdsmb pci # +dev/aq/aq_main.c optional aq +dev/aq/aq_media.c optional aq +dev/aq/aq_irq.c optional aq +dev/aq/aq_ring.c optional aq +dev/aq/aq_hw.c optional aq +dev/aq/aq_hw_llh.c optional aq +dev/aq/aq_fw.c optional aq +dev/aq/aq_fw1x.c optional aq +dev/aq/aq_fw2x.c optional aq +dev/aq/aq_dbg.c optional aq +# dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-dma.c optional ata | atacore diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 88ebe601ca0e..731a959976c3 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -44,6 +44,7 @@ SUBDIR= \ ${_armv8crypto} \ ${_armv8_rng} \ ${_asmc} \ + aq \ ata \ ath \ ath_dfs \ diff --git a/sys/modules/aq/Makefile b/sys/modules/aq/Makefile new file mode 100644 index 000000000000..603bb6770ff4 --- /dev/null +++ b/sys/modules/aq/Makefile @@ -0,0 +1,12 @@ +.PATH: ${SRCTOP}/sys/dev/aq + +KMOD = if_aq +SRCS = aq_main.c aq_media.c aq_irq.c +SRCS += aq_ring.c aq_hw.c aq_hw_llh.c +SRCS += aq_fw.c aq_fw1x.c aq_fw2x.c aq_dbg.c +SRCS += device_if.h bus_if.h pci_if.h +SRCS += ifdi_if.h opt_inet.h opt_inet6.h opt_platform.h opt_rss.h +SRCS += miibus_if.h + +.include + From nobody Thu Dec 18 19:07:34 2025 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 4dXKtG4yrMz6LYn6 for ; Thu, 18 Dec 2025 19:07: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXKtG3RwJz4JrY for ; Thu, 18 Dec 2025 19: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=1766084854; 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=NLR/zbXb8z39ov3xkmdkfZVYnI3Pgp1fDuit2idbHJQ=; b=PC/TNjDdNigMcuhC2mclaFAOGiuM0th/TAPt5HtOP2HeuHEGgw//cAzufEBMT9X0XGfw0V yZMODwf3k5/i6T7sRhUJqRqSMBZ3mk85yXr+jhPZwdgzoRx8CTl3NHPiNgqqIyscw20m7m nWa/tO/XgUJOjoBilWmDBQxDg7Jf2CQ8g/zBvdx9zmcd0eiPd9p4TkYN6eK7ljV0gPOsC/ oE4QhUaZpGi4lu+SpQFfc9TPhZ4sPtpxa1TWa/2nN3pkoglIQxovH1w4q+qE2UTbtLjNkL hnZEmg4HHOsbvsJcvc/IlnWiZcX1UaOZIHfneBWIjcm8yB8PX6pjZXNjqTn4Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766084854; 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=NLR/zbXb8z39ov3xkmdkfZVYnI3Pgp1fDuit2idbHJQ=; b=YQocnaB09KoR0eznXh1mkbp+Jozo461oK80tTPDtz9XSOpStV1G/I+fEieaqcUH68wV3ut KZyjZXKk5isxP6Z7zRVldKMqqXbyes3iEvfax6u3qCTd5AbECv53QPyBaEn6JWlfrsjz5p 70Tgujq2JNO6stJaJIXdFwocd+rN0oXg9JEiSugbybZQVYgwFy3diJW2mdUMt2EpH4YUqj ZtVMAyWYC0NR1R2YiD1cQMtqvalQ3WLTZWypi1D6Glf9UMkGO/vGEjh1wayJO9bTRDhDtI KpbvkDljYIZEvSH9mN5KlXfZoHrtyg4PBngAUhG1XKFqKJYYE7eVN3q0Af9pfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766084854; a=rsa-sha256; cv=none; b=a8kNoX5lQ1W7gAeISZy59w3fZuzNtJ5t1reg+wWYAB0GjRSqRgGPlu6XaoK8z9CldhWQvA yAQae7if6fkBfn6bMSCAE5351oWNs32jMAYGoIWs3VUfLhzCiHJHy4o4SE04RmhGsWmpgs YJ6XMomodr4LL4j/Gkw9YFOYm/HHWH3bAyc6BZu4Qft+D7XMasfs76BBf2cUANPamDqtT7 iXBOYD7LlzbMWkGKXx+HBcA5rVicel65DOaxvyyyUbu+gf9jyrKNCFAovc2b3IXRln/XFp fIs2CLXgjb+ot+ccBRyIxM3caS9jVmdUZKOmKCI4+bEkXbpjlvN+zE7B9fmw9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXKtG2wtBzr1q for ; Thu, 18 Dec 2025 19:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33585 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:07:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fb1994e03c88 - main - aq(4): Add 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb1994e03c88cf087e61f7aa608dd82531e3a4e8 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:07:34 +0000 Message-Id: <694450f6.33585.258284f0@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fb1994e03c88cf087e61f7aa608dd82531e3a4e8 commit fb1994e03c88cf087e61f7aa608dd82531e3a4e8 Author: Ed Maste AuthorDate: 2025-11-14 19:52:12 +0000 Commit: Ed Maste CommitDate: 2025-12-18 19:06:24 +0000 aq(4): Add man page Reviewed by: ziaee Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53840 --- share/man/man4/Makefile | 1 + share/man/man4/aq.4 | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 25c3ba18073f..5ee6eedd89ee 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -53,6 +53,7 @@ MAN= aac.4 \ ${_bxe.4} \ ${_aout.4} \ ${_apic.4} \ + aq.4 \ arcmsr.4 \ arswitch.4 \ ${_asmc.4} \ diff --git a/share/man/man4/aq.4 b/share/man/man4/aq.4 new file mode 100644 index 000000000000..248502797503 --- /dev/null +++ b/share/man/man4/aq.4 @@ -0,0 +1,56 @@ +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd December 1, 2025 +.Dt AQ 4 +.Os +.Sh NAME +.Nm aq +.Nd Aquantia / Marvell AQ1xx 10 Gigabit Ethernet driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device aq" +.Ed +.Pp +To load the driver as a module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_aq_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for PCIe 1/2.5/5/10 Gigabit Ethernet adapters +based on +Aquantia (now Marvell) AQtion AQC1xx Ethernet controllers. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Pp +The +.Nm +driver is experimental, and has a number of caveats and limitations. +.Sh HARDWARE +The +.Nm +driver supports the following 10 Gigabit Ethernet PCIe controllers: +.Pp +.Bl -bullet -compact +.It +aQuantia AQC107 +.It +aQuantia AQC108 +.It +aQuantia AQC109 +.It +aQuantia AQC111 +.It +aQuantia AQC112 +.El +.Sh SEE ALSO +.Xr arp 4 , +.Xr miibus 4 , +.Xr ifconfig 8 From nobody Thu Dec 18 19:16:02 2025 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 4dXL431zlVz6LZX7 for ; Thu, 18 Dec 2025 19:16: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXL423H9Wz4P9d for ; Thu, 18 Dec 2025 19:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766085362; 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=hxmj1/j4pvk84N3GnUKo6pc1onXllK3LtMtK6s8J7jc=; b=PSxgDqGDL2Lc9lpefh383VHUq4xA2LGLcHxLUmpND5e4ODIVyPhjjHtuwdAMVjwyIXBAEu d0MvhYU3vGDpwAS0b1iEXSnpkctEsgLsYnd6WfRYu5F4kzmIXXkC6nnA0ADCeD4z2ZNY9n 7+djtcWm3fLiHvJN2Ld1Z6lgLywTImiPI9ApeBW1YPIkCJPy6smZUFZw4FQupfSzveA/CO GDkUxW3zLSkB7HJs2ZrK/MY7/FRTMJO9M9slrbnL8XXDdgkeZ1nfntoRHvg0zNJ1FdQAXU rUYHB5D8Ig5rcwst6cbOiMALZlp1xZ1MuGzS/2HvpN1gqhEQwZNKAf6BMLKQKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766085362; 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=hxmj1/j4pvk84N3GnUKo6pc1onXllK3LtMtK6s8J7jc=; b=EeuFLPviDcFzAA4C2nkOiAAwW7fwn4zKgWd8nPYxRRzI1rGjLin8nQyfa+hRMBZLK66URR ZlDv3A0OLFaRaUgg2TIy6WudzwpgD/XdIrW0ZDB1ytf9rgrowPrfUsnO45UkTANHfwH3nD vk2/H+duc8Xs9oY6VOC7bC0h8aqONxxJJ01TtHpu9QCt7GvpiG2UVQpTBD+NQr53ESjunt QGLzyONh/Ujvvb7koU5jI9BlbrUXajSPitmi+QzkaaDNZTALBQ+XHP8nlJOnkfjuDhJCdS 5XpfsVNNk8LkxzwuuTa+QzITx8mOhn77R6Eq6ol0j7JUbuwz4f8C545sa59Z0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766085362; a=rsa-sha256; cv=none; b=OwrQc+nj2ZX55xDrJadG2hSON/FxQzYHXjqKZ6PGhn6xbD5i77XEF4qZIaQNC1bbaHxzLm W+xJtNwM8kFJ6tL82eroGPSRIf5U79fSfnvNg7sAuNnr0zDuIy0l3vZltvP6TykCT+7qrM kSjhj8rAgz5LtpPFVMICL/lqGKwhay432mWEl8dAQ2na4Y21gCiq8jEFGbZh73Kpp69G8L vPHOV5QWyra1c6NGZt3D/MiA0xGfQ4oJ7d3rXGIyJWyM6PcpQVH4hapjY4K/w6sVS982PU s8qT30Z4Z6hD5ydZmzY0yFE7u0qe7BdmUeIQ2YrL3NVmUj03V8Rs1Jkxt2QC0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXL422qRJzrXN for ; Thu, 18 Dec 2025 19:16:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 346f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:16:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 713b57c414b7 - main - net: split ifnet_arrival_event into two 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 713b57c414b789fd6c3eb2ce7ecb682b6cb4ba30 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:16:02 +0000 Message-Id: <694452f2.346f3.4214bebb@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=713b57c414b789fd6c3eb2ce7ecb682b6cb4ba30 commit 713b57c414b789fd6c3eb2ce7ecb682b6cb4ba30 Author: Gleb Smirnoff AuthorDate: 2025-12-18 16:47:31 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-18 19:15:53 +0000 net: split ifnet_arrival_event into two events Run the original ifnet_arrival_event before linking the interface. Otherwise there is a race window when interface is already visible, but not all of the protocols have completed their attach. Provide a new event handler ifnet_attached_event, that is executed when the inteface is fully visible. Use it in route(4) socket and netlink(4) to announce new interface to the userland. Properly document the ifnet events in if_var.h. Reviewed by: zlei, melifaro Differential Revision: https://reviews.freebsd.org/D54085 --- sys/net/if.c | 5 ++--- sys/net/if_var.h | 23 +++++++++++++++++------ sys/net/rtsock.c | 4 ++-- sys/netlink/route/iface.c | 2 +- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index d7c6b22821e2..b603c72bd106 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -932,10 +932,9 @@ if_attach_internal(struct ifnet *ifp, bool vmove) if (domain_init_status >= 2) if_attachdomain1(ifp); - - if_link_ifnet(ifp); - EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp); + if_link_ifnet(ifp); + EVENTHANDLER_INVOKE(ifnet_attached_event, ifp); if (IS_DEFAULT_VNET(curvnet)) devctl_notify("IFNET", ifp->if_xname, "ATTACH", NULL); } diff --git a/sys/net/if_var.h b/sys/net/if_var.h index b717e879815b..cbc4969918ba 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -358,12 +358,23 @@ typedef void (*ifaddr_event_ext_handler_t)(void *, if_t, struct ifaddr *, int); EVENTHANDLER_DECLARE(ifaddr_event_ext, ifaddr_event_ext_handler_t); #define IFADDR_EVENT_ADD 0 #define IFADDR_EVENT_DEL 1 -/* new interface arrival event */ -typedef void (*ifnet_arrival_event_handler_t)(void *, if_t); -EVENTHANDLER_DECLARE(ifnet_arrival_event, ifnet_arrival_event_handler_t); -/* interface departure event */ -typedef void (*ifnet_departure_event_handler_t)(void *, if_t); -EVENTHANDLER_DECLARE(ifnet_departure_event, ifnet_departure_event_handler_t); + +/* + * Interface arrival & departure events. + * The ifnet_arrival_event is executed before the is yet globally visible. + * Protocols shall use this event to attach themselves. Protocols shall not + * expect other protocols to be fully attached. + * The ifnet_attached_event is executed after the interface is attached to all + * protocols, is globally visible and fully functional. + * The ifnet_departure_event is complementary to ifnet_arrival_event. The + * interface is no longer globally visible, protocols may detach. + * XXXGL: immediate memory reclamation may not be safe in ifnet_departure_event. + */ +typedef void (*ifnet_event_handler_t)(void *, if_t); +EVENTHANDLER_DECLARE(ifnet_arrival_event, ifnet_event_handler_t); +EVENTHANDLER_DECLARE(ifnet_attached_event, ifnet_event_handler_t); +EVENTHANDLER_DECLARE(ifnet_departure_event, ifnet_event_handler_t); + /* Interface link state change event */ typedef void (*ifnet_link_event_handler_t)(void *, if_t, int); EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index be858428bb3e..82af92545b79 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -317,11 +317,11 @@ rtsock_init(void *dummy __unused) SYSINIT(rtsock_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, rtsock_init, NULL); static void -rts_handle_ifnet_arrival(void *arg __unused, struct ifnet *ifp) +rts_ifnet_attached(void *arg __unused, struct ifnet *ifp) { rt_ifannouncemsg(ifp, IFAN_ARRIVAL); } -EVENTHANDLER_DEFINE(ifnet_arrival_event, rts_handle_ifnet_arrival, NULL, 0); +EVENTHANDLER_DEFINE(ifnet_attached_event, rts_ifnet_attached, NULL, 0); static void rts_handle_ifnet_departure(void *arg __unused, struct ifnet *ifp) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 70ec5e688c57..29a9a89fd20c 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -1508,7 +1508,7 @@ void rtnl_ifaces_init(void) { ifattach_event = EVENTHANDLER_REGISTER( - ifnet_arrival_event, rtnl_handle_ifattach, NULL, + ifnet_attached_event, rtnl_handle_ifattach, NULL, EVENTHANDLER_PRI_ANY); ifdetach_event = EVENTHANDLER_REGISTER( ifnet_departure_event, rtnl_handle_ifdetach, NULL, From nobody Thu Dec 18 19:16:03 2025 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 4dXL443qF3z6LZXb for ; Thu, 18 Dec 2025 19:16: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXL434kBZz4PTS for ; Thu, 18 Dec 2025 19:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766085363; 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=oD/gcSRqUD0Fi5ZQk+eT6G1HhVUjjk/l2ffdaMpawOg=; b=l2HiiIT3v19YLtE5Fk4+yq22BU1FgMiV+KjmbRjNWOaaW3h8HG0e5bU90e2mdp5mzaII7e mbjnR2sQr7HJQ6ROJo0hhYfspY4dXGyl4lkJSNnnlbXVAUiwYSTMKn1xqGF18n5vOGnxVE Fmfd80pL8GVwqdcM9nmKyuIxu6eoEQ79FRU+VhjQ9758s4llucKueox03aIv/3uGB8PjQl AC+7EYOEal4ZBdoS8agSKEEnaYpfjQt638QkXXfmsTbfqbDfTxEvNWB7T+XWaPljG2PXLY ByD/3LTh6rriWlaRoCnDQvLUhIaR+q8xloaWGIjddgAM9yUmZlqqw17MDrW3fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766085363; 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=oD/gcSRqUD0Fi5ZQk+eT6G1HhVUjjk/l2ffdaMpawOg=; b=oNX+JkDZy9I8Z+xwbCkShLa5sU/kVNovQwbsPx0OsAq91Hhn63quzE+F21D00YOPJb5/7/ /6rVKcXTha0GnkG+hehYMeWhUfhEeLKyeMQ7VuEpm7W2IW1fPCOEtDDoCMsM2/ZR2+Ae+P ++aCXypfOWXP+5VRidN/fZbYxX9ad1WojkqJgFzM+sbKjchxgX0MicseTZwA1oFvScjyjQ jZeT42+A7WCoh8Sp/N9ysitVU1+DHAjcK3G+Utl5hL9mNJ3ZbHam7YKHkj31oeG2omMmZc mjfacymoKDqDVg0h//PgwyMq7wZq9LJBP6wMpTjfHrDepBss4oFXAJfHDLo29w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766085363; a=rsa-sha256; cv=none; b=pPv2qe92eA/b7a0hIId8HOSsOoiutmNyllXh+sbJquqRdXjsRPEMV2Yk6gqEHG3q0QvgjP HQFp0+jcyo5IEqUyiEiDFT+3/1+UhB7JVMI13FWCNAjLRS6yALgn6wv6Ux5IPZPQoCzS5N wAtQ8Ook/la3WB2R7JnZkp+jCGkHevhFYXf6pM3HOl+bTF14CA+mZkOvOardHvQre01iv6 Bnj6ZqdWICg51/k7urjddfwzxPkoFjKWASlX/rnLyKBn+2iBJCpKLTx3eibRmUkZvjDaqL AAh9zHS0WDTKf/gnvsbCOw40D7Xv+OFFmoF7ZxMrFRvOVHlZzVnx1WCfWMqe6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXL433sHmzrmM for ; Thu, 18 Dec 2025 19:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32deb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:16:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0d469d23715d - main - net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9) 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: 0d469d23715d690b863787ebfa51529e1f6a9092 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:16:03 +0000 Message-Id: <694452f3.32deb.4d0ab2a7@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0d469d23715d690b863787ebfa51529e1f6a9092 commit 0d469d23715d690b863787ebfa51529e1f6a9092 Author: Gleb Smirnoff AuthorDate: 2025-12-18 16:47:39 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-18 19:15:53 +0000 net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9) This change retires two historic relics: the if_afdata[] array and the dom_ifattach/dom_ifdetach methods. The if_afdata[] array is a relic of the era, when there was expectation that many transport protocols will coexist with IP, e.g. IPX or NetAtalk. The array hasn't had any members except AF_INET and AF_INET6 for over a decade already. This change removes the array and just leaves two pointer fields: if_inet and if_inet6. The dom_ifattach/dom_ifdetach predates the EVENTHANDLER(9) framework and was a good enough method to initialize protocol contexts back then. Today there is no good reason to treat IPv4 and IPv6 stacks differently to other protocols/features that attach and detach from an interface. The locking of if_afdata[] is a relic of SMPng times, when the system startup and the interface attach was even more convoluted than before this change, and we also had unloadable protocols that used a field in if_afdata[]. Note that IPv4 and IPv6 are not unloadable. Note that this change removes NET_EPOCH_WAIT() from the interface detach sequence. This may surface several new races associated with interface removal. I failed to hit any with consecutive test suite runs, though. The expected general race scenario is that while struct ifnet is freed with proper epoch_call(9) itself, some structures hanging off ifnet are freed with direct free(9). The proper fix is either make if_foo point at some static "dead" structure providing SMP visibility of this store, or free those structure with epoch_call(9). All of these cases are planned to be found and resolved during 16.0-CURRENT lifetime. Reviewed by: zlei, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D54089 --- sys/kern/uipc_debug.c | 4 -- sys/net/if.c | 122 ++++---------------------------------------- sys/net/if_loop.c | 2 +- sys/net/if_private.h | 19 +------ sys/net/if_var.h | 3 +- sys/net/vnet.h | 3 ++ sys/netinet/icmp6.h | 2 +- sys/netinet/if_ether.c | 4 +- sys/netinet/igmp.c | 10 ++-- sys/netinet/in.c | 98 +++++++++++++++++++---------------- sys/netinet/in.h | 1 - sys/netinet/in_mcast.c | 2 +- sys/netinet/in_proto.c | 2 - sys/netinet/in_var.h | 7 ++- sys/netinet/ip_input.c | 9 ++++ sys/netinet6/in6.c | 49 +++++------------- sys/netinet6/in6_ifattach.c | 39 +++++++++++++- sys/netinet6/in6_mcast.c | 2 +- sys/netinet6/in6_proto.c | 2 - sys/netinet6/in6_var.h | 11 ++-- sys/netinet6/ip6_input.c | 7 +++ sys/netinet6/ip6_output.c | 2 +- sys/netinet6/mld6_var.h | 3 +- sys/netinet6/nd6.c | 11 ++-- sys/netinet6/nd6.h | 3 +- sys/netinet6/scope6.c | 10 ++-- sys/sys/domain.h | 2 - sys/sys/kernel.h | 2 +- 28 files changed, 173 insertions(+), 258 deletions(-) diff --git a/sys/kern/uipc_debug.c b/sys/kern/uipc_debug.c index df36ec75cb5f..f6b7b1899d02 100644 --- a/sys/kern/uipc_debug.c +++ b/sys/kern/uipc_debug.c @@ -242,10 +242,6 @@ db_print_domain(struct domain *d, const char *domain_name, int indent) db_print_indent(indent); db_printf("dom_rtattach: %p ", d->dom_rtattach); - - db_print_indent(indent); - db_printf("dom_ifattach: %p ", d->dom_ifattach); - db_printf("dom_ifdetach: %p\n", d->dom_ifdetach); } static void diff --git a/sys/net/if.c b/sys/net/if.c index b603c72bd106..3c16246e8b62 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -102,7 +102,6 @@ #endif /* INET */ #ifdef INET6 #include -#include #endif /* INET6 */ #endif /* INET || INET6 */ @@ -270,8 +269,6 @@ struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int) = NULL; * static functions should be prototyped. Currently they are sorted by * declaration order. */ -static void if_attachdomain(void *); -static void if_attachdomain1(struct ifnet *); static int ifconf(u_long, caddr_t); static void if_input_default(struct ifnet *, struct mbuf *); static int if_requestencap_default(struct ifnet *, struct if_encap_req *); @@ -348,11 +345,6 @@ struct sx ifnet_detach_sxlock; SX_SYSINIT_FLAGS(ifnet_detach, &ifnet_detach_sxlock, "ifnet_detach_sx", SX_RECURSE); -#ifdef VIMAGE -#define VNET_IS_SHUTTING_DOWN(_vnet) \ - ((_vnet)->vnet_shutdown && (_vnet)->vnet_state < SI_SUB_VNET_DONE) -#endif - static if_com_alloc_t *if_com_alloc[256]; static if_com_free_t *if_com_free[256]; @@ -553,8 +545,6 @@ if_alloc_domain(u_char type, int numa_domain) IF_ADDR_LOCK_INIT(ifp); TASK_INIT(&ifp->if_linktask, 0, do_link_state_change, ifp); TASK_INIT(&ifp->if_addmultitask, 0, if_siocaddmulti, ifp); - ifp->if_afdata_initialized = 0; - IF_AFDATA_LOCK_INIT(ifp); CK_STAILQ_INIT(&ifp->if_addrhead); CK_STAILQ_INIT(&ifp->if_multiaddrs); CK_STAILQ_INIT(&ifp->if_groups); @@ -641,7 +631,6 @@ if_free_deferred(epoch_context_t ctx) #ifdef MAC mac_ifnet_destroy(ifp); #endif /* MAC */ - IF_AFDATA_DESTROY(ifp); IF_ADDR_LOCK_DESTROY(ifp); ifq_delete(&ifp->if_snd); @@ -930,8 +919,6 @@ if_attach_internal(struct ifnet *ifp, bool vmove) #endif } - if (domain_init_status >= 2) - if_attachdomain1(ifp); EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp); if_link_ifnet(ifp); EVENTHANDLER_INVOKE(ifnet_attached_event, ifp); @@ -947,45 +934,6 @@ if_epochalloc(void *dummy __unused) } SYSINIT(ifepochalloc, SI_SUB_EPOCH, SI_ORDER_ANY, if_epochalloc, NULL); -static void -if_attachdomain(void *dummy) -{ - struct ifnet *ifp; - - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) - if_attachdomain1(ifp); -} -SYSINIT(domainifattach, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_SECOND, - if_attachdomain, NULL); - -static void -if_attachdomain1(struct ifnet *ifp) -{ - struct domain *dp; - - /* - * Since dp->dom_ifattach calls malloc() with M_WAITOK, we - * cannot lock ifp->if_afdata initialization, entirely. - */ - IF_AFDATA_LOCK(ifp); - if (ifp->if_afdata_initialized >= domain_init_status) { - IF_AFDATA_UNLOCK(ifp); - log(LOG_WARNING, "%s called more than once on %s\n", - __func__, ifp->if_xname); - return; - } - ifp->if_afdata_initialized = domain_init_status; - IF_AFDATA_UNLOCK(ifp); - - /* address family dependent data region */ - bzero(ifp->if_afdata, sizeof(ifp->if_afdata)); - SLIST_FOREACH(dp, &domains, dom_next) { - if (dp->dom_ifattach) - ifp->if_afdata[dp->dom_family] = - (*dp->dom_ifattach)(ifp); - } -} - /* * Remove any unicast or broadcast network addresses from an interface. */ @@ -1098,9 +1046,6 @@ static void if_detach_internal(struct ifnet *ifp, bool vmove) { struct ifaddr *ifa; - int i; - struct domain *dp; - void *if_afdata[AF_MAX]; #ifdef VIMAGE bool shutdown; @@ -1151,7 +1096,7 @@ if_detach_internal(struct ifnet *ifp, bool vmove) * if_detach() calls us in void context and does not care * about an early abort notification, so life is splendid :) */ - goto finish_vnet_shutdown; + return; } #endif @@ -1172,20 +1117,6 @@ if_detach_internal(struct ifnet *ifp, bool vmove) #endif if_purgeaddrs(ifp); - -#ifdef INET - in_ifdetach(ifp); -#endif - -#ifdef INET6 - /* - * Remove all IPv6 kernel structs related to ifp. This should be done - * before removing routing entries below, since IPv6 interface direct - * routes are expected to be removed by the IPv6-specific kernel API. - * Otherwise, the kernel will detect some inconsistency and bark it. - */ - in6_ifdetach(ifp); -#endif if_purgemaddrs(ifp); EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); @@ -1212,43 +1143,6 @@ if_detach_internal(struct ifnet *ifp, bool vmove) } rt_flushifroutes(ifp); - -#ifdef VIMAGE -finish_vnet_shutdown: -#endif - /* - * We cannot hold the lock over dom_ifdetach calls as they might - * sleep, for example trying to drain a callout, thus open up the - * theoretical race with re-attaching. - */ - IF_AFDATA_LOCK(ifp); - i = ifp->if_afdata_initialized; - ifp->if_afdata_initialized = 0; - if (i != 0) { - /* - * Defer the dom_ifdetach call. - */ - _Static_assert(sizeof(if_afdata) == sizeof(ifp->if_afdata), - "array size mismatch"); - memcpy(if_afdata, ifp->if_afdata, sizeof(if_afdata)); - memset(ifp->if_afdata, 0, sizeof(ifp->if_afdata)); - } - IF_AFDATA_UNLOCK(ifp); - if (i == 0) - return; - /* - * XXXZL: This net epoch wait is not necessary if we have done right. - * But if we do not, at least we can make a guarantee that threads those - * enter net epoch will see NULL address family dependent data, - * e.g. if_afdata[AF_INET6]. A clear NULL pointer derefence is much - * better than writing to freed memory. - */ - NET_EPOCH_WAIT(); - SLIST_FOREACH(dp, &domains, dom_next) { - if (dp->dom_ifdetach != NULL && - if_afdata[dp->dom_family] != NULL) - (*dp->dom_ifdetach)(ifp, if_afdata[dp->dom_family]); - } } #ifdef VIMAGE @@ -5121,10 +5015,16 @@ if_getvnet(if_t ifp) return (ifp->if_vnet); } -void * -if_getafdata(if_t ifp, int af) +struct in_ifinfo * +if_getinet(if_t ifp) +{ + return (ifp->if_inet); +} + +struct in6_ifextra * +if_getinet6(if_t ifp) { - return (ifp->if_afdata[af]); + return (ifp->if_inet6); } u_int @@ -5189,8 +5089,6 @@ if_show_ifnet(struct ifnet *ifp) IF_DB_PRINTF("%d", if_amcount); IF_DB_PRINTF("%p", if_addr); IF_DB_PRINTF("%p", if_broadcastaddr); - IF_DB_PRINTF("%p", if_afdata); - IF_DB_PRINTF("%d", if_afdata_initialized); IF_DB_PRINTF("%u", if_fib); IF_DB_PRINTF("%p", if_vnet); IF_DB_PRINTF("%p", if_home_vnet); diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index ec0ff0e77aa6..37309260a0d3 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -151,7 +151,7 @@ vnet_loif_init(const void *unused __unused) struct ifc_data ifd = { .unit = 0 }; ifc_create_ifp(loname, &ifd, &V_loif); } -VNET_SYSINIT(vnet_loif_init, SI_SUB_PSEUDO, SI_ORDER_ANY, +VNET_SYSINIT(vnet_loif_init, SI_SUB_PROTO_IF, SI_ORDER_ANY, vnet_loif_init, NULL); #ifdef VIMAGE diff --git a/sys/net/if_private.h b/sys/net/if_private.h index b8cd0722eba6..c4ade7308df4 100644 --- a/sys/net/if_private.h +++ b/sys/net/if_private.h @@ -101,9 +101,8 @@ struct ifnet { struct ifaddr *if_addr; /* pointer to link-level address */ void *if_hw_addr; /* hardware link-level address */ const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ - struct mtx if_afdata_lock; - void *if_afdata[AF_MAX]; - int if_afdata_initialized; + struct in_ifinfo *if_inet; + struct in6_ifextra *if_inet6; /* Additional features hung off the interface. */ u_int if_fib; /* interface FIB */ @@ -193,20 +192,6 @@ struct ifnet { int if_ispare[4]; /* general use */ }; -#define IF_AFDATA_LOCK_INIT(ifp) \ - mtx_init(&(ifp)->if_afdata_lock, "if_afdata", NULL, MTX_DEF) - -#define IF_AFDATA_WLOCK(ifp) mtx_lock(&(ifp)->if_afdata_lock) -#define IF_AFDATA_WUNLOCK(ifp) mtx_unlock(&(ifp)->if_afdata_lock) -#define IF_AFDATA_LOCK(ifp) IF_AFDATA_WLOCK(ifp) -#define IF_AFDATA_UNLOCK(ifp) IF_AFDATA_WUNLOCK(ifp) -#define IF_AFDATA_TRYLOCK(ifp) mtx_trylock(&(ifp)->if_afdata_lock) -#define IF_AFDATA_DESTROY(ifp) mtx_destroy(&(ifp)->if_afdata_lock) - -#define IF_AFDATA_LOCK_ASSERT(ifp) MPASS(in_epoch(net_epoch_preempt) || mtx_owned(&(ifp)->if_afdata_lock)) -#define IF_AFDATA_WLOCK_ASSERT(ifp) mtx_assert(&(ifp)->if_afdata_lock, MA_OWNED) -#define IF_AFDATA_UNLOCK_ASSERT(ifp) mtx_assert(&(ifp)->if_afdata_lock, MA_NOTOWNED) - #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *)((ifp)->if_addr->ifa_addr)) diff --git a/sys/net/if_var.h b/sys/net/if_var.h index cbc4969918ba..4fb51aca0cd7 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -673,7 +673,8 @@ void *if_getl2com(if_t ifp); struct ifvlantrunk *if_getvlantrunk(if_t ifp); bool if_altq_is_enabled(if_t ifp); -void *if_getafdata(if_t ifp, int); +struct in_ifinfo *if_getinet(if_t ifp); +struct in6_ifextra *if_getinet6(if_t ifp); int if_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **mstp); diff --git a/sys/net/vnet.h b/sys/net/vnet.h index 670e99a455ae..f8ffcb4e2b76 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -395,6 +395,9 @@ do { \ } \ } while(0) +#define VNET_IS_SHUTTING_DOWN(_vnet) \ + ((_vnet)->vnet_shutdown && (_vnet)->vnet_state < SI_SUB_VNET_DONE) + #else /* !VIMAGE */ /* diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 2ca5b3433e47..082ef5d29ce9 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -718,7 +718,7 @@ int icmp6_ratelimit(const struct in6_addr *, const int, const int); do { \ if (ifp) \ counter_u64_add(((struct in6_ifextra *) \ - ((ifp)->if_afdata[AF_INET6]))->icmp6_ifstat[\ + ((ifp)->if_inet6))->icmp6_ifstat[ \ offsetof(struct icmp6_ifstat, tag) / sizeof(uint64_t)], 1);\ } while (/*CONSTCOND*/ 0) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 7b223f1f2f11..8d65b88913b8 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1485,8 +1485,8 @@ static void arp_iflladdr(void *arg __unused, struct ifnet *ifp) { /* if_bridge can update its lladdr during if_vmove(), after we've done - * if_detach_internal()/dom_ifdetach(). */ - if (ifp->if_afdata[AF_INET] == NULL) + * with in_ifdetach(). XXXGL: needs to be fixed. */ + if (ifp->if_inet == NULL) return; lltable_update_ifaddr(LLTABLE(ifp)); diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index ad22efb16495..de9d38c7fb9d 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -690,7 +690,7 @@ igmp_ifdetach(struct ifnet *ifp) SLIST_INIT(&inm_free_tmp); IGMP_LOCK(); - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + igi = ((struct in_ifinfo *)ifp->if_inet)->ii_igmp; if (igi->igi_version == IGMP_VERSION_3) { IF_ADDR_WLOCK(ifp); NET_EPOCH_ENTER(et); @@ -781,7 +781,7 @@ igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip, IN_MULTI_LIST_LOCK(); IGMP_LOCK(); - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + igi = ((struct in_ifinfo *)ifp->if_inet)->ii_igmp; KASSERT(igi != NULL, ("%s: no igmp_ifsoftc for ifp %p", __func__, ifp)); if (igi->igi_flags & IGIF_LOOPBACK) { @@ -874,7 +874,7 @@ igmp_input_v2_query(struct ifnet *ifp, const struct ip *ip, IN_MULTI_LIST_LOCK(); IGMP_LOCK(); - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + igi = ((struct in_ifinfo *)ifp->if_inet)->ii_igmp; KASSERT(igi != NULL, ("%s: no igmp_ifsoftc for ifp %p", __func__, ifp)); if (igi->igi_flags & IGIF_LOOPBACK) { @@ -1066,7 +1066,7 @@ igmp_input_v3_query(struct ifnet *ifp, const struct ip *ip, IN_MULTI_LIST_LOCK(); IGMP_LOCK(); - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + igi = ((struct in_ifinfo *)ifp->if_inet)->ii_igmp; KASSERT(igi != NULL, ("%s: no igmp_ifsoftc for ifp %p", __func__, ifp)); if (igi->igi_flags & IGIF_LOOPBACK) { @@ -2347,7 +2347,7 @@ igmp_change_state(struct in_multi *inm) IGMP_LOCK(); - igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp; + igi = ((struct in_ifinfo *)ifp->if_inet)->ii_igmp; KASSERT(igi != NULL, ("%s: no igmp_ifsoftc for ifp %p", __func__, ifp)); /* diff --git a/sys/netinet/in.c b/sys/netinet/in.c index e824c937af8e..510cfa79d54b 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -669,7 +669,7 @@ in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct ucred *cred struct in_addr allhosts_addr; struct in_ifinfo *ii; - ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); + ii = (struct in_ifinfo *)ifp->if_inet; allhosts_addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP); error = in_joingroup(ifp, &allhosts_addr, NULL, @@ -789,7 +789,7 @@ in_difaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct ucred *cred if (iaIsLast && (ifp->if_flags & IFF_MULTICAST)) { struct in_ifinfo *ii; - ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); + ii = (struct in_ifinfo *)ifp->if_inet; if (ii->ii_allhosts) { (void)in_leavegroup(ii->ii_allhosts, NULL); ii->ii_allhosts = NULL; @@ -1329,26 +1329,62 @@ in_ifnet_broadcast(struct in_addr in, struct ifnet *ifp) return (false); } + +static struct lltable *in_lltattach(struct ifnet *); +void +in_ifattach(void *arg __unused, struct ifnet *ifp) +{ + struct in_ifinfo *ii; + + ii = malloc(sizeof(struct in_ifinfo), M_IFADDR, M_WAITOK|M_ZERO); + ii->ii_llt = in_lltattach(ifp); + ii->ii_igmp = igmp_domifattach(ifp); + ifp->if_inet = ii; +} +EVENTHANDLER_DEFINE(ifnet_arrival_event, in_ifattach, NULL, + EVENTHANDLER_PRI_ANY); + /* * On interface removal, clean up IPv4 data structures hung off of the ifnet. */ -void -in_ifdetach(struct ifnet *ifp) +static void +in_ifdetach(void *arg __unused, struct ifnet *ifp) { - IN_MULTI_LOCK(); - in_pcbpurgeif0(&V_ripcbinfo, ifp); - in_pcbpurgeif0(&V_udbinfo, ifp); - in_pcbpurgeif0(&V_ulitecbinfo, ifp); - in_purgemaddrs(ifp); - IN_MULTI_UNLOCK(); + struct in_ifinfo *ii = ifp->if_inet; +#ifdef VIMAGE /* - * Make sure all multicast deletions invoking if_ioctl() are - * completed before returning. Else we risk accessing a freed - * ifnet structure pointer. + * On VNET shutdown abort here as the stack teardown will do all + * the work top-down for us. XXXGL: this logic is copied from + * if_detach() before dom_ifattach removal. Ideally we'd like to have + * same logic for VNET shutdown and normal detach. This means that + * interfaces should be detach before protocols destroyed during VNET + * shutdown. */ - inm_release_wait(NULL); + if (!VNET_IS_SHUTTING_DOWN(ifp->if_vnet)) +#endif + { + IN_MULTI_LOCK(); + in_pcbpurgeif0(&V_ripcbinfo, ifp); + in_pcbpurgeif0(&V_udbinfo, ifp); + in_pcbpurgeif0(&V_ulitecbinfo, ifp); + in_purgemaddrs(ifp); + IN_MULTI_UNLOCK(); + + /* + * Make sure all multicast deletions invoking if_ioctl() are + * completed before returning. Else we risk accessing a freed + * ifnet structure pointer. + */ + inm_release_wait(NULL); + } + + igmp_domifdetach(ifp); + lltable_free(ii->ii_llt); + free(ii, M_IFADDR); } +EVENTHANDLER_DEFINE(ifnet_departure_event, in_ifdetach, NULL, + EVENTHANDLER_PRI_ANY); static void in_ifnet_event(void *arg __unused, struct ifnet *ifp, int event) @@ -1862,35 +1898,9 @@ in_lltattach(struct ifnet *ifp) struct lltable * in_lltable_get(struct ifnet *ifp) { - struct lltable *llt = NULL; - - void *afdata_ptr = ifp->if_afdata[AF_INET]; - if (afdata_ptr != NULL) - llt = ((struct in_ifinfo *)afdata_ptr)->ii_llt; - return (llt); -} - -void * -in_domifattach(struct ifnet *ifp) -{ - struct in_ifinfo *ii; - - ii = malloc(sizeof(struct in_ifinfo), M_IFADDR, M_WAITOK|M_ZERO); - - ii->ii_llt = in_lltattach(ifp); - ii->ii_igmp = igmp_domifattach(ifp); - - return (ii); -} - -void -in_domifdetach(struct ifnet *ifp, void *aux) -{ - struct in_ifinfo *ii = (struct in_ifinfo *)aux; - - MPASS(ifp->if_afdata[AF_INET] == NULL); + /* XXXGL: ??? */ + if (ifp->if_inet == NULL) + return (NULL); - igmp_domifdetach(ifp); - lltable_free(ii->ii_llt); - free(ii, M_IFADDR); + return (((struct in_ifinfo *)ifp->if_inet)->ii_llt); } diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 3f2c388548ec..0cd55bd1e409 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -684,7 +684,6 @@ int inet_aton(const char *, struct in_addr *); /* in libkern */ char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */ char *inet_ntop(int, const void *, char *, socklen_t); /* in libkern */ int inet_pton(int af, const char *, void *); /* in libkern */ -void in_ifdetach(struct ifnet *); static inline bool in_broadcast(struct in_addr in) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index ba112afbf002..131e72780ebe 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -500,7 +500,7 @@ in_getmulti(struct ifnet *ifp, const struct in_addr *group, IN_MULTI_LOCK_ASSERT(); - ii = (struct in_ifinfo *)ifp->if_afdata[AF_INET]; + ii = (struct in_ifinfo *)ifp->if_inet; IN_MULTI_LIST_LOCK(); inm = inm_lookup(ifp, *group); if (inm != NULL) { diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 3ec515d216fa..ff3040bfc7b1 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -76,8 +76,6 @@ struct domain inetdomain = { #ifdef VIMAGE .dom_rtdetach = in_detachhead, #endif - .dom_ifattach = in_domifattach, - .dom_ifdetach = in_domifdetach, .dom_nprotosw = 14, .dom_protosw = { &tcp_protosw, diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 1f6f6edb9219..311d82da4605 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -102,8 +102,7 @@ struct in_ifaddr { ((((d).s_addr ^ (a).s_addr) & (m).s_addr)) == 0 ) #endif -#define LLTABLE(ifp) \ - ((struct in_ifinfo *)(ifp)->if_afdata[AF_INET])->ii_llt +#define LLTABLE(ifp) ((struct in_ifinfo *)(ifp)->if_inet)->ii_llt /* * Hash table for IP addresses. */ @@ -471,9 +470,9 @@ void ip_input(struct mbuf *); void ip_direct_input(struct mbuf *); void in_ifadown(struct ifaddr *ifa, int); struct mbuf *ip_tryforward(struct mbuf *); -void *in_domifattach(struct ifnet *); -void in_domifdetach(struct ifnet *, void *); struct rib_head *in_inithead(uint32_t fibnum); +void in_ifattach(void *, struct ifnet *); + #ifdef VIMAGE void in_detachhead(struct rib_head *rh); #endif diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 6ddec6726428..2e0635f8e482 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -352,6 +352,7 @@ VNET_SYSINIT(ip_vnet_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, static void ip_init(const void *unused __unused) { + struct ifnet *ifp; ipreass_init(); @@ -376,6 +377,14 @@ ip_init(const void *unused __unused) #ifdef RSS netisr_register(&ip_direct_nh); #endif + /* + * XXXGL: we use SYSINIT() here, but go over V_ifnet. It was the same + * way before dom_ifattach removal. This worked because when any + * non-default vnet is created, there are no interfaces inside. + * Eventually this needs to be fixed. + */ + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) + in_ifattach(NULL, ifp); } SYSINIT(ip_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip_init, NULL); diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 158129258587..a953bb5546d6 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -478,7 +478,7 @@ in6_control_ioctl(u_long cmd, void *data, /* FALLTHROUGH */ case SIOCGIFSTAT_IN6: case SIOCGIFSTAT_ICMP6: - if (ifp->if_afdata[AF_INET6] == NULL) { + if (ifp->if_inet6 == NULL) { error = EPFNOSUPPORT; goto out; } @@ -525,15 +525,13 @@ in6_control_ioctl(u_long cmd, void *data, break; case SIOCGIFSTAT_IN6: - COUNTER_ARRAY_COPY(((struct in6_ifextra *) - ifp->if_afdata[AF_INET6])->in6_ifstat, + COUNTER_ARRAY_COPY(ifp->if_inet6->in6_ifstat, &ifr->ifr_ifru.ifru_stat, sizeof(struct in6_ifstat) / sizeof(uint64_t)); break; case SIOCGIFSTAT_ICMP6: - COUNTER_ARRAY_COPY(((struct in6_ifextra *) - ifp->if_afdata[AF_INET6])->icmp6_ifstat, + COUNTER_ARRAY_COPY(ifp->if_inet6->icmp6_ifstat, &ifr->ifr_ifru.ifru_icmp6stat, sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); break; @@ -2567,16 +2565,14 @@ in6_lltattach(struct ifnet *ifp) struct lltable * in6_lltable_get(struct ifnet *ifp) { - struct lltable *llt = NULL; + if (ifp->if_inet6 == NULL) + return (NULL); - void *afdata_ptr = ifp->if_afdata[AF_INET6]; - if (afdata_ptr != NULL) - llt = ((struct in6_ifextra *)afdata_ptr)->lltable; - return (llt); + return (ifp->if_inet6->lltable); } -void * -in6_domifattach(struct ifnet *ifp) +void +in6_ifarrival(void *arg __unused, struct ifnet *ifp) { struct in6_ifextra *ext; @@ -2584,7 +2580,8 @@ in6_domifattach(struct ifnet *ifp) switch (ifp->if_type) { case IFT_PFLOG: case IFT_PFSYNC: - return (NULL); + ifp->if_inet6 = NULL; + return; } ext = (struct in6_ifextra *)malloc(sizeof(*ext), M_IFADDR, M_WAITOK); bzero(ext, sizeof(*ext)); @@ -2606,8 +2603,10 @@ in6_domifattach(struct ifnet *ifp) ext->mld_ifinfo = mld_domifattach(ifp); - return ext; + ifp->if_inet6 = ext; } +EVENTHANDLER_DEFINE(ifnet_arrival_event, in6_ifarrival, NULL, + EVENTHANDLER_PRI_ANY); uint32_t in6_ifmtu(struct ifnet *ifp) @@ -2615,26 +2614,6 @@ in6_ifmtu(struct ifnet *ifp) return (IN6_LINKMTU(ifp)); } -void -in6_domifdetach(struct ifnet *ifp, void *aux) -{ - struct in6_ifextra *ext = (struct in6_ifextra *)aux; - - MPASS(ifp->if_afdata[AF_INET6] == NULL); - - mld_domifdetach(ifp); - scope6_ifdetach(ext->scope6_id); - nd6_ifdetach(ifp, ext->nd_ifinfo); - lltable_free(ext->lltable); - COUNTER_ARRAY_FREE(ext->in6_ifstat, - sizeof(struct in6_ifstat) / sizeof(uint64_t)); - free(ext->in6_ifstat, M_IFADDR); - COUNTER_ARRAY_FREE(ext->icmp6_ifstat, - sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); - free(ext->icmp6_ifstat, M_IFADDR); - free(ext, M_IFADDR); -} - /* * Convert sockaddr_in6 to sockaddr_in. Original sockaddr_in6 must be * v4 mapped addr or v4 compat addr @@ -2736,7 +2715,7 @@ in6_purge_proxy_ndp(struct ifnet *ifp) struct lltable *llt; bool need_purge; - if (ifp->if_afdata[AF_INET6] == NULL) + if (ifp->if_inet6 == NULL) return; llt = LLTABLE6(ifp); diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 090ba610460b..a2d236cccc41 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -783,7 +784,8 @@ in6_ifattach(struct ifnet *ifp, struct ifnet *altifp) { struct in6_ifaddr *ia; - if (ifp->if_afdata[AF_INET6] == NULL) + /* XXXGL: can this happen after IFT_PFLOG and IFT_PFSYNC are gone? */ + if (ifp->if_inet6 == NULL) return; /* * quirks based on interface type @@ -857,7 +859,8 @@ _in6_ifdetach(struct ifnet *ifp, int purgeulp) { struct ifaddr *ifa, *next; - if (ifp->if_afdata[AF_INET6] == NULL) + /* XXXGL: can this happen after IFT_PFLOG and IFT_PFSYNC are gone? */ + if (ifp->if_inet6 == NULL) return; /* @@ -895,6 +898,38 @@ in6_ifdetach(struct ifnet *ifp) _in6_ifdetach(ifp, 1); } +static void +in6_ifdeparture(void *arg __unused, struct ifnet *ifp) +{ + struct in6_ifextra *ext = ifp->if_inet6; + + /* XXXGL: can this happen after IFT_PFLOG and IFT_PFSYNC are gone? */ + if (ifp->if_inet6 == NULL) + return; + +#ifdef VIMAGE + /* + * On VNET shutdown abort here as the stack teardown will do all + * the work top-down for us. XXXGL: see comment in in.c:in_ifdetach(). + */ + if (!VNET_IS_SHUTTING_DOWN(ifp->if_vnet)) +#endif + _in6_ifdetach(ifp, 1); + mld_domifdetach(ifp); + scope6_ifdetach(ext->scope6_id); + nd6_ifdetach(ifp, ext->nd_ifinfo); + lltable_free(ext->lltable); + COUNTER_ARRAY_FREE(ext->in6_ifstat, + sizeof(struct in6_ifstat) / sizeof(uint64_t)); + free(ext->in6_ifstat, M_IFADDR); + COUNTER_ARRAY_FREE(ext->icmp6_ifstat, + sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); + free(ext->icmp6_ifstat, M_IFADDR); + free(ext, M_IFADDR); +} +EVENTHANDLER_DEFINE(ifnet_departure_event, in6_ifdeparture, NULL, + EVENTHANDLER_PRI_ANY); + void in6_ifdetach_destroy(struct ifnet *ifp) { diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c index 613bd14428bb..4075e75eac85 100644 --- a/sys/netinet6/in6_mcast.c +++ b/sys/netinet6/in6_mcast.c @@ -400,7 +400,7 @@ in6_getmulti(struct ifnet *ifp, const struct in6_addr *group, /* * Does ifp support IPv6 multicasts? */ - if (ifp->if_afdata[AF_INET6] == NULL) + if (ifp->if_inet6 == NULL) error = ENODEV; else inm = in6m_lookup_locked(ifp, group); diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index f3ed72719abf..dbbe7c4b3eca 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -111,8 +111,6 @@ struct domain inet6domain = { #ifdef VIMAGE .dom_rtdetach = in6_detachhead, #endif - .dom_ifattach = in6_domifattach, - .dom_ifdetach = in6_domifdetach, .dom_nprotosw = 14, .dom_protosw = { &tcp6_protosw, diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 1210937a5dc4..0cfdde652c0a 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -109,8 +109,8 @@ struct in6_ifextra { u_int dad_failures; /* DAD failures when using RFC 7217 stable addresses */ }; -#define LLTABLE6(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->lltable) -#define DAD_FAILURES(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->dad_failures) +#define LLTABLE6(ifp) ((ifp)->if_inet6->lltable) +#define DAD_FAILURES(ifp) ((ifp)->if_inet6->dad_failures) #ifdef _KERNEL @@ -545,8 +545,7 @@ extern struct rmlock in6_ifaddr_lock; #define in6_ifstat_inc(ifp, tag) \ do { \ if (ifp) \ - counter_u64_add(((struct in6_ifextra *) \ - ((ifp)->if_afdata[AF_INET6]))->in6_ifstat[ \ + counter_u64_add((ifp)->if_inet6->in6_ifstat[ \ offsetof(struct in6_ifstat, tag) / sizeof(uint64_t)], 1);\ } while (/*CONSTCOND*/ 0) #endif /* _KERNEL */ @@ -867,8 +866,6 @@ void in6_purgeaddr(struct ifaddr *); void in6_purgeifaddr(struct in6_ifaddr *); int in6if_do_dad(struct ifnet *); void in6_savemkludge(struct in6_ifaddr *); -void *in6_domifattach(struct ifnet *); -void in6_domifdetach(struct ifnet *, void *); uint32_t in6_ifmtu(struct ifnet *); struct rib_head *in6_inithead(uint32_t fibnum); void in6_detachhead(struct rib_head *rh); @@ -893,6 +890,8 @@ int in6_src_ioctl(u_long, caddr_t); void in6_newaddrmsg(struct in6_ifaddr *, int); void in6_purge_proxy_ndp(struct ifnet *); +void in6_ifarrival(void *, struct ifnet *); + /* * Extended API for IPv6 FIB support. */ diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 380391fd71f4..29fa4741a509 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -286,6 +286,7 @@ VNET_SYSINIT(ip6_vnet_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, static void ip6_init(void *arg __unused) { + struct ifnet *ifp; /* * Register statically those protocols that are unlikely to ever go @@ -312,6 +313,12 @@ ip6_init(void *arg __unused) #ifdef RSS netisr_register(&ip6_direct_nh); #endif + /* + * XXXGL: we use SYSINIT() here, but go over V_ifnet. See comment + * in sys/netinet/ip_input.c:ip_init(). + */ + CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) + in6_ifarrival(NULL, ifp); } SYSINIT(ip6_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip6_init, NULL); diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 8ade50b13568..eb5a3a971ea0 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -2920,7 +2920,7 @@ ip6_setpktopt(int optname, u_char *buf, int len, struct ip6_pktopts *opt, if (ifp == NULL) return (ENXIO); } - if (ifp != NULL && (ifp->if_afdata[AF_INET6] == NULL || + if (ifp != NULL && (ifp->if_inet6 == NULL || (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) != 0)) return (ENETDOWN); diff --git a/sys/netinet6/mld6_var.h b/sys/netinet6/mld6_var.h index 96b841f1564b..d75ac2450c10 100644 --- a/sys/netinet6/mld6_var.h +++ b/sys/netinet6/mld6_var.h @@ -155,8 +155,7 @@ struct mld_ifsoftc { /* * Per-link MLD context. */ *** 133 LINES SKIPPED *** From nobody Thu Dec 18 19:47:19 2025 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 4dXLm80cwCz6LdcV for ; Thu, 18 Dec 2025 19:47: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXLm76jKjz3Gtc for ; Thu, 18 Dec 2025 19:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766087239; 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=JIBkL+A8iVAmupEv2RO2yqsJlL9WLYnNeNDy8lGzRII=; b=WpIiB721I1jGkn2mFkBy9ZQ5Y+anDcaKK6eA4DLZcI1QePrVlhEC1qSyaQP8H8Tm+JBJAI N5gf5R79wsdWstzJmNOgy+8iQRUvSLNiDVgCuAJvpaNM37DnZL3YjT7zfy7xJkU81hLZvO 81hNLYxEp7rsC+q9FCKoOOLuNYKblefxjHrti5wo1UbsMFpyQqdLP5jQgdXByeI/DBXFhM ZIgdKWHCZwkIASvMb8jT1/GrcjoXR1T1mObpk+anXPIQVpUGlY+6gMmdLvSiuWwRAKyE0Y hdB6BcHlK6wDybcpMPYIemPN9BzOq25u+i3ZlDJYZHbN2xbVijZhuyX7VPf0yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766087239; 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=JIBkL+A8iVAmupEv2RO2yqsJlL9WLYnNeNDy8lGzRII=; b=hesNpJk19kS2nBQM5MiHl0HsZvcGjLZJjkVxVyFoOUT4ulNl7kn9tVQkeKqWW0JAeUGubg xLHkAYDsVZzSTxynqD10FPvdC1SH/e7Pi8AGdpYKx/q5/AAp5UP5GUhD2UEfWKIzYmQJWG eOSL6RthBRI0UbWblcf3sDuozeZE6Ca+9erYKg/2YaYAP+q27YeWuCorSGY9aLjpMG/5js GneXLMQMDFjgiWQHQKYhPNFBxSYyGP8PqL6ZwLIBNftvIYBFCMmU7zifva5J3maDvth5Tm Y6XAAwOpwGqPegc8w9g/Bakw+R/wMoBkenGFKU4SL2Ewi30OAps8nqqPsOe5Fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766087239; a=rsa-sha256; cv=none; b=CNvJgAtBV9SmQgINiWonN89+mvVs2q17QkBWCq+4SR4xxOF2wmXN8Fj3H25f9540j7/k8k GVlIsrjcDP4Kdo9PMKx1P8uD6h96bq9VIpInEyAm1FyzYeBR4Tk4eC2eXuHq0/Dv0tRoAd M6p0Z8M38xM0q44uTefdRnLHGVz+roLnT+hinFjxB5WsPN3IQipZExGmTSd19XPrKB4w6v 8lxaoqs/jm/psO9Ai+bvvG18DK6oBwH0DwPM6jajnI+uB0RYuT1BJOKJfF0G5EuJCby5US cn3RxBLncELEWAkZXxL3E2vOjeNsp6V7Z4l2oFIgF2oB1WTq1cBqeMrcHGEp7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXLm75xWXzsMn for ; Thu, 18 Dec 2025 19:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3731a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:47:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 93811883500b - main - armv8rng: Fix an inverted test in random_rndr_read_one() 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: 93811883500b99f9f1fb4ffd6e764226d37dcfd0 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:47:19 +0000 Message-Id: <69445a47.3731a.1226cb3@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=93811883500b99f9f1fb4ffd6e764226d37dcfd0 commit 93811883500b99f9f1fb4ffd6e764226d37dcfd0 Author: Mark Johnston AuthorDate: 2025-12-18 14:17:20 +0000 Commit: Mark Johnston CommitDate: 2025-12-18 19:46:42 +0000 armv8rng: Fix an inverted test in random_rndr_read_one() If we get a random number, the NZCV is set to 0b0000. Then "cset %w1, ne" will test whether Z == 0 and set %w1 to 1 if so. More specifically, "cset %w1, ne" maps to "csinc %w1, wzr, wzr, eq", which stores 0 in %w1 when NZCV == 0b0100 and 1 otherwise. Thus, on a successful read we expect ret != 0, so the loop condition needs to be fixed. In practice this means that we would end up trying to fetch entropy up to ten times in a row. If all attempts are successful, the last will be returned, otherwise no entropy will be returned. Reported by: Kevin Day Reviewed by: andrew Fixes: 9eecef052155 ("Add an Armv8 rndr random number provider") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54259 --- sys/dev/random/armv8rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/random/armv8rng.c b/sys/dev/random/armv8rng.c index 524d80317681..9573c09aa77a 100644 --- a/sys/dev/random/armv8rng.c +++ b/sys/dev/random/armv8rng.c @@ -64,7 +64,7 @@ random_rndr_read_one(u_long *buf) /* 1 on success, 0 on failure */ "cset %w1, ne\n" : "=&r" (val), "=&r"(ret) :: "cc"); - } while (ret != 0 && --loop > 0); + } while (ret == 0 && --loop > 0); if (ret != 0) *buf = val; From nobody Thu Dec 18 19:47:20 2025 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 4dXLm95Rbcz6Ldnm for ; Thu, 18 Dec 2025 19:47:21 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXLm911q7z3Gjh for ; Thu, 18 Dec 2025 19:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766087241; 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=DLhHhN5N2o8JV4EPTKJ1wwU6wPLvKnCu9J9DGWLDcZY=; b=xsVUKhKCdCuBuok3CdSTtIIJvAohMfEx3TsaTp0o54sd20mElcyNY8xTpZSSIYZz7siCSd hsXX1M8EIJ7qoAf3Fj2h8/8dFeYR3WOq3JNOAsx3/GA6Hun3wRGddF4tarJk4QjAhliwr8 xTjB7+egWU2TYd3rBi3uhvnhoE1ukVLLSiIskUG6PSPb/Q9f7uqznBgKoog+oh/jmDuYmO I8yqVG/Ol74FZsQFkfm4s09e7c3UHqOUadfcRJKEtA8Gar3e15o2Kcu9T9mSYM1Ri/BqwQ 4/o9ZhtKKlyviMhnsJ3DQTUx6ixh5YtSWN4/EDBGjCcE/rC9jerl15BcbdcjIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766087241; 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=DLhHhN5N2o8JV4EPTKJ1wwU6wPLvKnCu9J9DGWLDcZY=; b=f37KkiFJnV/0ygP0fHf6UyIp/YGRaopmertiE7t9s8Fleg14B8QSf5t8+pO1gpr1SJBDCv 9TjAI9Ov7JrYnkQyEEHpQ2EcCfOE2A3oK/q+dGMWq/qOEbO6reuaqmSbmQVQv2uzqxKLjm KSQfZanyu33JGeT6i+v6YLNa0QywFB8UPnsMImCJbzzmnbwwtCr2+bjBihwF9G4edwx8yC mXnGocysS58tTvdhl+b38t1JXFz316NNq6kWFMf541MhbUKFxAeHvQVP3tMytkwHgZ4LeO oTjUxmVuI/rJvr3Jxmr8wGYmI5QZ0bzvfQh2w2Q+x9FwXsvmdOdcHOymRH7cww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766087241; a=rsa-sha256; cv=none; b=KcQTWKd+n+TBSZNUmMvG4jssvQECUNfYSFaTxCqiuTBV2aiuHPATwmSyvgc2qYAQ33Ct5l vFOqsSkFhQvzxUvm0Ky2yxnEjwYcycHRfz1Ff5PkaikXBRERamPZdWUYgZTCiR4G38s8gk 6Ww4lWq3OFAUzwJQtXnHirQ9KZ06vo8drMh989vjrwZk2kiQzvBu98pe27ZYaeVyMm5bRX s/pgnwxXssndtFV8zg0GP8VKZcP/ghEqikM/I8/V2ETA7JyxrfO+RYhAd7hkVxArK6by+V 8568cvDB7VLjYFpDfX+Dy+2KGKGMfDZ+pHlC1Lo/j2ZPcQys46snL7eMEXHASA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXLm867F0zsKy for ; Thu, 18 Dec 2025 19:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3786f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:47:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 7c02ba0cd034 - main - pf: Fix the reply command in a couple of places 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: 7c02ba0cd03495163b55ea24efe0b6feee7490b1 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:47:20 +0000 Message-Id: <69445a48.3786f.abe8a86@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7c02ba0cd03495163b55ea24efe0b6feee7490b1 commit 7c02ba0cd03495163b55ea24efe0b6feee7490b1 Author: Mark Johnston AuthorDate: 2025-12-18 14:26:41 +0000 Commit: Mark Johnston CommitDate: 2025-12-18 19:46:42 +0000 pf: Fix the reply command in a couple of places libpfctl doesn't notice the mismatch. Reported by: Kevin Day Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54199 --- sys/netpfil/pf/pf_nl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 8d0c7a2cf543..6bd858373bd2 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1905,7 +1905,7 @@ pf_handle_del_table(struct nlmsghdr *hdr, struct nl_pstate *npt) return (ENOMEM); ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); - ghdr_new->cmd = PFNL_CMD_ADD_TABLE; + ghdr_new->cmd = PFNL_CMD_DEL_TABLE; ghdr_new->version = 0; ghdr_new->reserved = 0; @@ -2242,7 +2242,7 @@ pf_handle_table_set_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) return (ENOMEM); ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); - ghdr_new->cmd = PFNL_CMD_TABLE_DEL_ADDR; + ghdr_new->cmd = PFNL_CMD_TABLE_SET_ADDR; ghdr_new->version = 0; ghdr_new->reserved = 0; From nobody Thu Dec 18 19:51:01 2025 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 4dXLrQ15Tgz6LdTw for ; Thu, 18 Dec 2025 19: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXLrP4G6Mz3Hms for ; Thu, 18 Dec 2025 19:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766087461; 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=ZG0ODgKyWgMmI86PF0Wcp+wstEIcGCf9XFh4MkTXhBc=; b=srbMIsBzW4HWuzjNSo9V2PfJ+AQma03+MIkrhHVQtqTwDDK23xKs7nSerU4KmKeo8bVC58 Ou3iVD3i0pj9xvsJlwrRS9QC1Zi9X1sN46nNgLHtGIHZLdIi+LasAxNyGxJQSVZyYVF0ZA knIC/5mAZ2Yshgl3BsswoaBdsopqkSUvdN9iSC956aSXRcDygS75/6yKVMhVpjzbKWne1k bF8/vVYsGbaHLfE9VVbZcX0gu4VtJ1nJ+55AM0N/WHHKGsF30mwNuOeJwg53qv0Q+Kq6ok hpVJEhv3m52Iab6+9EgqQXoGYzfzE+BVFJk4Ud3ILrRONoiIBE/KpfVqZU4a3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766087461; 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=ZG0ODgKyWgMmI86PF0Wcp+wstEIcGCf9XFh4MkTXhBc=; b=hqZAZLS6jU0whvRs9AQAQTH6aZaMLmGLPlh7hlUiHKuCLUcQhfydMcTwto15z4wsI6wePc U254ImhHRZfCHnJFqQieR2UXY6SNn7t2zwF5xNohqA4iieJRkPCbnJUmkNVbPplMJG9K6W uYIo7HjLvbS8Yl7pFiV5nyMsj4aUdYrv70JDd/2MftycIMv7SNaPW+GjZeR6cElgJjIL7D TH2q/CFmlz8eXJo49kG2MZ8a7U/rwztHs2bR79BXyk1DuGUntJ1MiBOVbz6Bnh45/cjL57 NPRZJBtLIIFLZqocXI6DeSJHjPvSra5VMgFNOGHGnxTyoPc1ARiKozgKqq8v0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766087461; a=rsa-sha256; cv=none; b=Urs+l3YBXt5DhU5ltMTel4NoFX8Ab7MHwiV+MBh4kER89drQC3fcNIEMsO8z/x4VI8is3n kpsIrfut23aE/ycaaPJYm1sMETpFcF59X1h2TeRj+CUr2+9Lge44i8CgFzNr1rjLiepSO6 Ju50eT8Pb466Yj81lUBpD3eiJFnWcUfC6rJQvHaSsA2xVK2WW2iq5O+imIg26oZ0D7nBQd dIChRDDZVz7LQ8+88icseULzR4Al69UbmBtNTtjJ645sUHugh5U4IQR5kG/vmx22zBG2vl 2gvxOWjeJnMKOpL5yyPwNPLDvJX+OBuVoLt8zO4EYvwbaRuN8HRWZEPWOsoA+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXLrP2pHgzs88 for ; Thu, 18 Dec 2025 19:51:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3667e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 19:51:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Krzysztof Galazka Subject: git: ca10598b10bc - main - ice(4): Remove unused function 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: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca10598b10bc906938195af2268256ae08647039 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 19:51:01 +0000 Message-Id: <69445b25.3667e.497fadbf@gitrepo.freebsd.org> The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=ca10598b10bc906938195af2268256ae08647039 commit ca10598b10bc906938195af2268256ae08647039 Author: Krzysztof Galazka AuthorDate: 2025-12-18 19:47:50 +0000 Commit: Krzysztof Galazka CommitDate: 2025-12-18 19:50:45 +0000 ice(4): Remove unused function rss_getkey function is now available even if kernel RSS option is disabled. This makes ice_get_default_rss_key no longer needed. Signed-off-by: Krzysztof Galazka Reviewed by: gallatin Approved by: kbowling (mentor) Fixes: 012ecdde3a810 ("ice: use newly exposed RSS hash key API rather than ad-hoc hashing") Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D54281 --- sys/dev/ice/ice_lib.c | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 393726eb1f59..baf5c6889aa8 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -90,7 +90,6 @@ static u_int ice_sync_one_mcast_filter(void *p, struct sockaddr_dl *sdl, u_int e static void ice_add_debug_tunables(struct ice_softc *sc); static void ice_add_debug_sysctls(struct ice_softc *sc); static void ice_vsi_set_rss_params(struct ice_vsi *vsi); -static void ice_get_default_rss_key(u8 *seed); static int ice_set_rss_key(struct ice_vsi *vsi); static int ice_set_rss_lut(struct ice_vsi *vsi); static void ice_set_rss_flow_flds(struct ice_vsi *vsi); @@ -7341,38 +7340,11 @@ ice_add_rxq_sysctls(struct ice_rx_queue *rxq) "Traffic Class that Queue belongs to"); } -/** - * ice_get_default_rss_key - Obtain a default RSS key - * @seed: storage for the RSS key data - * - * Copies a pre-generated RSS key into the seed memory. The seed pointer must - * point to a block of memory that is at least 40 bytes in size. - * - * The key isn't randomly generated each time this function is called because - * that makes the RSS key change every time we reconfigure RSS. This does mean - * that we're hard coding a possibly 'well known' key. We might want to - * investigate randomly generating this key once during the first call. - */ -static void -ice_get_default_rss_key(u8 *seed) -{ - const u8 default_seed[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE] = { - 0x39, 0xed, 0xff, 0x4d, 0x43, 0x58, 0x42, 0xc3, 0x5f, 0xb8, - 0xa5, 0x32, 0x95, 0x65, 0x81, 0xcd, 0x36, 0x79, 0x71, 0x97, - 0xde, 0xa4, 0x41, 0x40, 0x6f, 0x27, 0xe9, 0x81, 0x13, 0xa0, - 0x95, 0x93, 0x5b, 0x1e, 0x9d, 0x27, 0x9d, 0x24, 0x84, 0xb5, - }; - - bcopy(default_seed, seed, ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE); -} - /** * ice_set_rss_key - Configure a given VSI with the default RSS key * @vsi: the VSI to configure * * Program the hardware RSS key. We use rss_getkey to grab the kernel RSS key. - * If the kernel RSS interface is not available, this will fall back to our - * pre-generated hash seed from ice_get_default_rss_key(). */ static int ice_set_rss_key(struct ice_vsi *vsi) @@ -7383,16 +7355,16 @@ ice_set_rss_key(struct ice_vsi *vsi) int status; /* - * If the RSS kernel interface is disabled, this will return the - * default RSS key above. + * Even if the RSS kernel interface is disabled, this function + * is still available. */ rss_getkey(keydata.standard_rss_key); status = ice_aq_set_rss_key(hw, vsi->idx, &keydata); if (status) { device_printf(sc->dev, - "ice_aq_set_rss_key status %s, error %s\n", - ice_status_str(status), ice_aq_str(hw->adminq.sq_last_status)); + "ice_aq_set_rss_key status %s, error %s\n", + ice_status_str(status), ice_aq_str(hw->adminq.sq_last_status)); return (EIO); } From nobody Thu Dec 18 20:15:15 2025 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 4dXMNM4CdTz6Lh4d for ; Thu, 18 Dec 2025 20:15: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXMNM3VwZz3KVF for ; Thu, 18 Dec 2025 20:15:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766088915; 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=Ba0PPn4BI75699UmlyXByWEYzH5fWJlGNI7ngKzl/7M=; b=WWuz13Wevi9UHwHXmdbzVGRUnadAwgjzSc2eOZ1mvwnVe9uCcbV4wK0hpVxlU9KfHsV+aw KjmH+UbRy+DczAHGAX0KY0lzzdz97i1c+PJ2bLLTtC+QDCOCu7Af3Ogeky7pRTM9IWotAP 2JCSOKan15WQ3JYtFovD0MvwzQRHpWUx2kX21Hd8MQIa4ytRCq1+O2lc/9nqBXySkcrNyZ GM6MfW0+5m2ipeR3mfL1XXujpISrBJlDGkcTg1bKJwaTQmkNHy5hLCzr7fkJlOaK/P9no3 1IoAg6rByPRFu1uK7rvuNdZoT0nTmVHAI9Ln2HEqrcLOZzuqZf6/GyLXpWDbaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766088915; 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=Ba0PPn4BI75699UmlyXByWEYzH5fWJlGNI7ngKzl/7M=; b=W/WAhMjZYXFFO5dAQ24VBUKQjH18/VZInPBaoOHZBaRTsOJVnYqIgdL8nwAQgRPZQAt92W dxpZTJeozB2VpUCy/8VQc7J5XkQw9wsk4MqrCac64N/L3ym649xx+zB82kRORB8wh3iRB4 gIatX2qMRG+rDHtfsA+4Y52/6OX8iSoViYrtALYGhk9ITkR66qWWx/4rajx8sjXcdWizdy 2IjUC2gj/rA1MZsJ/tWO/GkIldXEYk8Sm21VBdzrTyhtAHZ190m997PyJCv2BYG67ZvTmM sjmmABOoej64q1pvtDaE9rUOvVrhwpPi8CRavt0IBxH+Iy/8gcHGOAmGddS5SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766088915; a=rsa-sha256; cv=none; b=MEiY3GpgtoOHqtR22S0IsYSz6IuVoO8AfxtZgFNMJ0ETnCGgLEvv7ZqhCvBvLRATY4Uk/u ++nZCWbtBzuD3eDsM3ZsSUcUgXYEu8198zIQEOjd4AwBhvnyHzcpNh+vrFRHt1DvFvra6/ hP9TiJch7mY73HVjjSYo6hhJ2y3p7WULPhKOuKyc33VH7ts5yDGxIJPLFbUML7uTd/bvFp SqmivUZZCwVGhKm8CeRKrk3EOf7ov5wD/92+jXDLu+lK4zYXgJ031dcdVsxiX0ByMcKMAj Sq8nbrDZDeucieJ7VVkaWq+CN5UVOTWtZFwqEK+tf0Cgo3x/eZjNVsrUCw/SwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXMNM2qcmzt43 for ; Thu, 18 Dec 2025 20:15:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 391ba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 20:15:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5c1d9df10b78 - main - vmem.9: provide a reference to libuvmem(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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c1d9df10b78f8d2e13e16f5db2e4542f582aebd Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 20:15:15 +0000 Message-Id: <694460d3.391ba.3b07d6d7@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5c1d9df10b78f8d2e13e16f5db2e4542f582aebd commit 5c1d9df10b78f8d2e13e16f5db2e4542f582aebd Author: Konstantin Belousov AuthorDate: 2025-12-18 20:13:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-18 20:13:05 +0000 vmem.9: provide a reference to libuvmem(3) Sponsored by: The FreeBSD Foundation MFC after: 3 days --- share/man/man9/vmem.9 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man9/vmem.9 b/share/man/man9/vmem.9 index 053aec856a78..119815e818b9 100644 --- a/share/man/man9/vmem.9 +++ b/share/man/man9/vmem.9 @@ -281,6 +281,9 @@ subsystem is implemented within the file .\" ------------------------------------------------------------ .Sh SEE ALSO .Xr malloc 9 +.Pp +.Xr libuvmem 3 +for the userspace port of the allocator. .Rs .%A Jeff Bonwick .%A Jonathan Adams From nobody Thu Dec 18 21:30:48 2025 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 4dXP3d6Bryz6Lq24 for ; Thu, 18 Dec 2025 21:30:53 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXP3X5Rl8z3WSL for ; Thu, 18 Dec 2025 21:30:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766093448; 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=5Alu955SWx4kHxW+w4UC1RL60m3lk72mM6ZxilKgtK4=; b=xe2rKj+Nyl0+klOca1BFG+AUIIP5P5ziOxnnQVmm2goP3vdgaEddrtgC5EAD5M4qfTnRWS XT484tDSZjXUB5Ny5odeYtP9sha9N9cmirk5TVWN32Zmck+DYGqpL+EFzfwuTgMZmKVcqe VWBmCoc4gdOKB0Gru1jOV4VFpQz+CnzPXni1OPztewReU/dQXWuI6hLSZbKpQIDjgtpvZg dO82IW8/wc6LpGmD/7Y63yFdqzXUZ6QETO/JMB7yso4hjAO4jqXczZKLZJbBFK3Xn3yAbz gp9V+umRs1x2lqf+WPoXp9xqiEQcGNe24BXj6jMKXcuTmhIbBZAjzujNtC21Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766093448; 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=5Alu955SWx4kHxW+w4UC1RL60m3lk72mM6ZxilKgtK4=; b=W3xrCaUVvMCty/OQBeOZ4/pYdaCP8Gy/NS19qnoSDzQSHTJf2pl+jFIHWfum8DvJkkTvHH kzVvjUKVEppuetFLSKTsDtdmBUrAYrLS7T+mEncUW5PGbmWQjNYViT3BFTw8Fc+3JEDbeN 09awUUKsoN/+t57XGhtqofXvYowCmkbH93a5XyfWa3nL/fS9sagP+XlJqMQ6kPQBjM9Y30 Ly2qYrOu4Q3Xugv9rXIE2ncDdIM9HlJH5WFLR05lTQhc/358bmRDbekGh5Xpwh1roBEQ8l fqnEUIQc/USf3l8Pq28ilCn/RVO8We1ZEunDVSNN1J5JP3EkDVr63X6Uv3ihbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766093448; a=rsa-sha256; cv=none; b=B/hlJC37L/OtHD+Iw2gEKShW50nAaP0vnMc1U183dJlTYAZ4Egp+qbnubxYFHGff4I92Lk 8xIRGF2nUz+d/E04jiXlqpmZab8bH1vRXGell0s4x/V1ayeD5k4y5uOdscahTALqbbIMkK 8O4Zx4thGbqA/4beh8yWYj/oxfQvUocbbEGYyXXlt+4hiE7MDWdktJ4b9+oYl8snKPj6nS nKHe5xHv0jq+BFnQyhdVIgqGT4Vm586cnRURlM8kNG1+WP5+IhGuB1+IIMgQSOM58Xey0S V5M3XtcFFaUoXLbk3SdFDVaUH1xdFohnQ41Lc41JkYCDKB8iq+1ElzFFkKzwTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXP3X52dGzvnQ for ; Thu, 18 Dec 2025 21:30:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42009 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 21:30:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 55ce12672b94 - main - kern: racct: Remove code unused since %cpu resource computation revamp 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: 55ce12672b948c002431851af54843bfc7f50d6f Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 21:30:48 +0000 Message-Id: <69447288.42009.509fe959@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=55ce12672b948c002431851af54843bfc7f50d6f commit 55ce12672b948c002431851af54843bfc7f50d6f Author: Olivier Certner AuthorDate: 2025-12-18 14:05:11 +0000 Commit: Olivier Certner CommitDate: 2025-12-18 21:30:18 +0000 kern: racct: Remove code unused since %cpu resource computation revamp Reviewed by: emaste, markj Fixes: c72188d85a79 ("racct: Improve handling of the pcpu resource") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54284 --- sys/kern/kern_racct.c | 133 -------------------------------------------------- 1 file changed, 133 deletions(-) diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index d1324935bdc3..2e243db04607 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -78,14 +78,6 @@ SYSCTL_BOOL(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable, SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold, 0, "Processes with higher %cpu usage than this value can be throttled."); -/* - * How many seconds it takes to use the scheduler %cpu calculations. When a - * process starts, we compute its %cpu usage by dividing its runtime by the - * process wall clock time. After RACCT_PCPU_SECS pass, we use the value - * provided by the scheduler. - */ -#define RACCT_PCPU_SECS 3 - struct mtx racct_lock; MTX_SYSINIT(racct_lock, &racct_lock, "racct lock", MTX_DEF); @@ -190,131 +182,6 @@ int racct_types[] = { static const fixpt_t RACCT_DECAY_FACTOR = 0.3 * FSCALE; -#ifdef SCHED_4BSD -/* - * Contains intermediate values for %cpu calculations to avoid using floating - * point in the kernel. - * ccpu_exp[k] = FSCALE * (ccpu/FSCALE)^k = FSCALE * exp(-k/20) - * It is needed only for the 4BSD scheduler, because in ULE, the ccpu equals to - * zero so the calculations are more straightforward. - */ -fixpt_t ccpu_exp[] = { - [0] = FSCALE * 1, - [1] = FSCALE * 0.95122942450071400909, - [2] = FSCALE * 0.90483741803595957316, - [3] = FSCALE * 0.86070797642505780722, - [4] = FSCALE * 0.81873075307798185866, - [5] = FSCALE * 0.77880078307140486824, - [6] = FSCALE * 0.74081822068171786606, - [7] = FSCALE * 0.70468808971871343435, - [8] = FSCALE * 0.67032004603563930074, - [9] = FSCALE * 0.63762815162177329314, - [10] = FSCALE * 0.60653065971263342360, - [11] = FSCALE * 0.57694981038048669531, - [12] = FSCALE * 0.54881163609402643262, - [13] = FSCALE * 0.52204577676101604789, - [14] = FSCALE * 0.49658530379140951470, - [15] = FSCALE * 0.47236655274101470713, - [16] = FSCALE * 0.44932896411722159143, - [17] = FSCALE * 0.42741493194872666992, - [18] = FSCALE * 0.40656965974059911188, - [19] = FSCALE * 0.38674102345450120691, - [20] = FSCALE * 0.36787944117144232159, - [21] = FSCALE * 0.34993774911115535467, - [22] = FSCALE * 0.33287108369807955328, - [23] = FSCALE * 0.31663676937905321821, - [24] = FSCALE * 0.30119421191220209664, - [25] = FSCALE * 0.28650479686019010032, - [26] = FSCALE * 0.27253179303401260312, - [27] = FSCALE * 0.25924026064589150757, - [28] = FSCALE * 0.24659696394160647693, - [29] = FSCALE * 0.23457028809379765313, - [30] = FSCALE * 0.22313016014842982893, - [31] = FSCALE * 0.21224797382674305771, - [32] = FSCALE * 0.20189651799465540848, - [33] = FSCALE * 0.19204990862075411423, - [34] = FSCALE * 0.18268352405273465022, - [35] = FSCALE * 0.17377394345044512668, - [36] = FSCALE * 0.16529888822158653829, - [37] = FSCALE * 0.15723716631362761621, - [38] = FSCALE * 0.14956861922263505264, - [39] = FSCALE * 0.14227407158651357185, - [40] = FSCALE * 0.13533528323661269189, - [41] = FSCALE * 0.12873490358780421886, - [42] = FSCALE * 0.12245642825298191021, - [43] = FSCALE * 0.11648415777349695786, - [44] = FSCALE * 0.11080315836233388333, - [45] = FSCALE * 0.10539922456186433678, - [46] = FSCALE * 0.10025884372280373372, - [47] = FSCALE * 0.09536916221554961888, - [48] = FSCALE * 0.09071795328941250337, - [49] = FSCALE * 0.08629358649937051097, - [50] = FSCALE * 0.08208499862389879516, - [51] = FSCALE * 0.07808166600115315231, - [52] = FSCALE * 0.07427357821433388042, - [53] = FSCALE * 0.07065121306042958674, - [54] = FSCALE * 0.06720551273974976512, - [55] = FSCALE * 0.06392786120670757270, - [56] = FSCALE * 0.06081006262521796499, - [57] = FSCALE * 0.05784432087483846296, - [58] = FSCALE * 0.05502322005640722902, - [59] = FSCALE * 0.05233970594843239308, - [60] = FSCALE * 0.04978706836786394297, - [61] = FSCALE * 0.04735892439114092119, - [62] = FSCALE * 0.04504920239355780606, - [63] = FSCALE * 0.04285212686704017991, - [64] = FSCALE * 0.04076220397836621516, - [65] = FSCALE * 0.03877420783172200988, - [66] = FSCALE * 0.03688316740124000544, - [67] = FSCALE * 0.03508435410084502588, - [68] = FSCALE * 0.03337326996032607948, - [69] = FSCALE * 0.03174563637806794323, - [70] = FSCALE * 0.03019738342231850073, - [71] = FSCALE * 0.02872463965423942912, - [72] = FSCALE * 0.02732372244729256080, - [73] = FSCALE * 0.02599112877875534358, - [74] = FSCALE * 0.02472352647033939120, - [75] = FSCALE * 0.02351774585600910823, - [76] = FSCALE * 0.02237077185616559577, - [77] = FSCALE * 0.02127973643837716938, - [78] = FSCALE * 0.02024191144580438847, - [79] = FSCALE * 0.01925470177538692429, - [80] = FSCALE * 0.01831563888873418029, - [81] = FSCALE * 0.01742237463949351138, - [82] = FSCALE * 0.01657267540176124754, - [83] = FSCALE * 0.01576441648485449082, - [84] = FSCALE * 0.01499557682047770621, - [85] = FSCALE * 0.01426423390899925527, - [86] = FSCALE * 0.01356855901220093175, - [87] = FSCALE * 0.01290681258047986886, - [88] = FSCALE * 0.01227733990306844117, - [89] = FSCALE * 0.01167856697039544521, - [90] = FSCALE * 0.01110899653824230649, - [91] = FSCALE * 0.01056720438385265337, - [92] = FSCALE * 0.01005183574463358164, - [93] = FSCALE * 0.00956160193054350793, - [94] = FSCALE * 0.00909527710169581709, - [95] = FSCALE * 0.00865169520312063417, - [96] = FSCALE * 0.00822974704902002884, - [97] = FSCALE * 0.00782837754922577143, - [98] = FSCALE * 0.00744658307092434051, - [99] = FSCALE * 0.00708340892905212004, - [100] = FSCALE * 0.00673794699908546709, - [101] = FSCALE * 0.00640933344625638184, - [102] = FSCALE * 0.00609674656551563610, - [103] = FSCALE * 0.00579940472684214321, - [104] = FSCALE * 0.00551656442076077241, - [105] = FSCALE * 0.00524751839918138427, - [106] = FSCALE * 0.00499159390691021621, - [107] = FSCALE * 0.00474815099941147558, - [108] = FSCALE * 0.00451658094261266798, - [109] = FSCALE * 0.00429630469075234057, - [110] = FSCALE * 0.00408677143846406699, -}; -#endif - -#define CCPU_EXP_MAX 110 - static void racct_add_racct(struct racct *dest, const struct racct *src) { From nobody Thu Dec 18 21:56:17 2025 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 4dXPcx6fnPz6LsPH for ; Thu, 18 Dec 2025 21:56: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXPcx3KJYz3bhS for ; Thu, 18 Dec 2025 21:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766094977; 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=6OqOC35Cr03FqajjRl6+ubP2Lv5JWrDHHep9E7Tz8R8=; b=Mld7Z95gOOfuPH7eZtboh2CCvrVKANaMlhdntUv+ieZxQnDIU5rBmJooDoaIliP4yjT8rL MlIgIczwEy64NEENWMQbyLjlVQiOXdvipu46XZh4RkLRxjhnrbwYHwwiY83Tuqnox2yhNO odYqbgNGyPqjCoE0Eokc6ZtcQfMTOJ7XbPrQoFWDYnqonLVuMLVEcaX1uDnlN3Z5G0BOLB YYsdc/+J3eM0+nvVceJhNU06LXigXt8W/J2gSDoZPNrsvaaB3jS+CwgMrkrt3yS/tZu4qt l4zyotuF9Msneyjvh++RlKxF0X5tmaY9WUPCbhGMY14CVGymMwGeFXoNGaQGog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766094977; 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=6OqOC35Cr03FqajjRl6+ubP2Lv5JWrDHHep9E7Tz8R8=; b=Ln5qTP2lKN1s5AjwMThk1XSTfafAy+ZbtOfN8u0/Z6PwCl8WGPnlAoqlgPxwut/Zk+DQpe G3CBFSwHhum1JK+Jj2e8vvG5AcJ8XffianQJmNUFR8Vhd7nKLwg4S/yxkVhsu8ejk4MOjA p+EivTa/HYJxOd9TDhOxpZiMXOENt19+lbqMcA/zYADVSZChdzftbOJRpsKaEMo7tULLfg g2mNQd4vIAgjRSBG/CLlx4uJja1EYrx598Fy/0ahH06n5WfEgVFTxslxkpud+9P/k5pm+z MPn1CP37dR48vLPec5j/ND7NLRYSa0CzWE3egGFEqlc1Y16BkvwpTLL8l7fZzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766094977; a=rsa-sha256; cv=none; b=jQqeqpX5/r7goz+2Qc7Q/81chUFP50umM53HsrxXTkr5KtQ4zAq0b8lYtqPDX8OgiArj8k O32dquHq0K1G9o+W9JONbkKxlLtdXN0BNbh3abj9e0cTW5RPx2DGLpV6dQlLcQwmNLvyUH Je3PrVNgFZC923D3dt47YyCkZUpt6YB2Kvh4HXbu1JNVaaTIVAhduBHWI6m2WyGASoCYV0 TpERjt8PZcLqhTmSM6UArdJnKd+GWasaRcK5skcL1IpcsKVDTt8M4vF2LZDrGhQlJDjMMF NsVIaZz+5KTxaN/qaDRHoSBjaKSJy6Udwy2cDmVomhrJ78vwakLvrzWnqj2UZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXPcx2ZQWzwFn for ; Thu, 18 Dec 2025 21:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 442f4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 21:56:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7f3da1f800f7 - main - aq(4): Build on x86 only for now 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: 7f3da1f800f77150fab2a07ce9cafdca41b29ee9 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 21:56:17 +0000 Message-Id: <69447881.442f4.17ec6ae5@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7f3da1f800f77150fab2a07ce9cafdca41b29ee9 commit 7f3da1f800f77150fab2a07ce9cafdca41b29ee9 Author: Ed Maste AuthorDate: 2025-12-18 21:54:38 +0000 Commit: Ed Maste CommitDate: 2025-12-18 21:55:46 +0000 aq(4): Build on x86 only for now It fails to build on arm64. As it is experimental and in development just limit it to x86 until this is fixed. Reported by: brd Fixes: 75177aebf039 ("aq(4): Add build infrastructure") --- sys/modules/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 731a959976c3..bf3588926acf 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -44,8 +44,8 @@ SUBDIR= \ ${_armv8crypto} \ ${_armv8_rng} \ ${_asmc} \ - aq \ ata \ + ${_aq} \ ath \ ath_dfs \ ath_hal \ @@ -735,6 +735,7 @@ _imx= imx .endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_aq= aq _agp= agp .if ${MACHINE_CPUARCH} == "i386" || !empty(COMPAT_FREEBSD32_ENABLED) _aout= aout From nobody Thu Dec 18 22:15:42 2025 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 4dXQ3c6y8bz6Ltpl; Thu, 18 Dec 2025 22:15:56 +0000 (UTC) (envelope-from se@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXQ3c66vhz3gYp; Thu, 18 Dec 2025 22:15:56 +0000 (UTC) (envelope-from se@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766096156; 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:autocrypt:autocrypt; bh=OTsCxyBWAi4uVUPgYQUPVrOBz+eeZP7cE/0l52cEy1s=; b=gqarfedmgmwvIh9sFIONdghuUVlbx9SoPfIOOZagaRVs2cCavvaAW+87aCkOWZF0srUpNW LTF24Gj9z5gahEOrzBHNtfg3yeFagzIfcI88Ky7V85nwiAxFYS4xeB1YjEsNfgm2HOitr6 BMDTyDIe2HLj/8se6I92aKOsBhX1aIYvF7jVPYA33Gejf/INEAV534qBZut+EM4S91tUK/ esa+FnjVhZgd27fUwvKmopghozMLKwnlnxDL/oL1bCr2V6+KxE4sbXGJZFHBb8shjDZhbV XRpwSVx4PYzNON0hF4kQLHOH89qG8OGQdcDrrY+orp2N1+Z1+yQDtHJ3RgAg4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766096156; 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:autocrypt:autocrypt; bh=OTsCxyBWAi4uVUPgYQUPVrOBz+eeZP7cE/0l52cEy1s=; b=w04fZHqVpfVf3OmQQZW0C5Ww6I9flCzfSGk8UkfIAp0RjG3KZFcGFfCURRYhLygIcBxK9Z L2wd2IBrSnXMzuE3nFE7iIDm90YRMdmGwQwMNp/9LhUh7oG+vCsFR7f6U8cc9BVOCsfQaU g6NlJ5IXt5nRQNNyHvyu7JDi82A1WMNr28K5JU3I4rXdHxdU9e2qZGGmS5VgOpYR0mXld1 tvZj3s4Hz50G7C5JWnk5JE45G7OnMGGJppE8puJFOMUg4MTatqGwsABw5GBztPf9Z6eWBT tK5iARKYuvINJN57U1bINGDBeMfZRf/SAGmmnqAkaGrH9Fduo6KWNveu7bix1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766096156; a=rsa-sha256; cv=none; b=xu1HRF+SZRM852n6pEpSadvqiRD+78dy/e9LiaDlV4XI1BGYGDFWZykeA6Q6z6B9fx/8BS PJsN/N/dDiwihks4SxkgnuNp0XTKTomI3q96Qz7piV/GqCYwoRiUF5sY98HTyv242WE5HX oy4Uk9fEh7xQ8mn25PrzPHiOZnBj3QvTyMu9BFeSZH9OKe/AYVbJNy7BdkfGTmFj9gZT4r SYojcwaXI5+17EDIh+1v9xI/wFBeSxQ13avik9+aQKxj2ySBbXvhsVu2Nzwn5p7hlookmt cq7Ksm457U0bLRiGP1w5f3Sy60y7S0iNZpNvug3yG4dYBiA+04mXDokyjXK0kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.119.151] (p5dc836f3.dip0.t-ipconnect.de [93.200.54.243]) (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 did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXQ3b5gWKz8QK; Thu, 18 Dec 2025 22:15:55 +0000 (UTC) (envelope-from se@freebsd.org) Message-ID: <7c2745c8-6ab6-4eb7-918b-63e3b7eb556a@freebsd.org> Date: Thu, 18 Dec 2025 23:15:42 +0100 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 User-Agent: Mozilla Thunderbird From: =?UTF-8?Q?Stefan_E=C3=9Fer?= Subject: Re: git: cf5eed715915 - main - if_rge: fix typo in man page To: Konstantin Belousov , Adrian Chadd Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <6943b3c8.37d76.6e48da27@gitrepo.freebsd.org> Content-Language: de-DE, en-US Autocrypt: addr=se@freebsd.org; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAHNJ1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPsLAlAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJogi3z BQlsQ8JgAAoJEEfrte9a/fVEkoUH/0Tzhysy8mlOFmfY2ckS9zjOk/RGMtaLSAN3ewixyi8F U13V4MXftZwaVBGp91d2MB+unXQsDEDfMFX9Y/oiXyvndEA0hMbdtPwMoCukOkPHY8e42b7f 78H1Rs8chVP/+yljb2I64awEXf7X7J/N/qGaYaoEsKcvOXtcMGrybm5Y0tvAT9b/1bnUaq3z SjBOCmNbofXBmay6gw+VlbSHO/u9fTRqQqTOurc/gm6eCYEfJYiscJP3B+7IRF7Ryd73Vusg qJDwAGK00KP8XhbEEOeyvpkt4/Yo6IJt65+idGawT8+0ha+HjHCYTGwOojydnLksLK9Vt4XS fiMlqnvI66bOwE0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAcLAhgQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJogi3zBQls Q8JgABQJEEfrte9a/fVECRBH67XvWv31RD+aCAC9ieuBN9w3qnHWKcZ2OjFhlGdXs/hSKyNz jxrXn5a/k2qHN4fR27xSfyx1c2GvUaNG6Zt7kNOB6H8oyAwTk8KSj66U4FO4/iScaZr/EY14 vhOCecuJHNAps8MBHTm2GLI6Fr81uCv9ksEpc2DgAvaYzrblia4Me3AytHxuA/oqnqcXBMlg Srl3okIebxAFUGJICIfn1tGCEokC/waJfjQJ/HHkFOogVsNrWwtDWPXfHzmsWLkspZybREkZ nYsVi+ajCwhQAc3NYjIrpr2jcpg+5eQQJFGmbZR3t3mA+0/GW9fqi8ZL2wJAhAMmLWp4IqrB pZLQIv7TCldyeY/YD7BP In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Am 18.12.25 um 19:50 schrieb Konstantin Belousov: > On Thu, Dec 18, 2025 at 07:56:56AM +0000, Stefan Eßer wrote: >>[...] >> -driver supports RealTek RTL8125, RTL8126, RTL8125 and Killer E3000 based >> +driver supports RealTek RTL8125, RTL8126, RTL8127 and Killer E3000 based >> PCIe 1GB to 1GB Ethernet devices. > Should this line be '1GB to 10GB'? Yes, the upper limit should be 10GB - but the lower limit should probably be 2.5GB (the lowest maximum data rate of a device supported by this driver). And GB could be read to be Gigabytes, how about "PCIe 2.5/5/10 Gbps Ethernet devices." ? From nobody Thu Dec 18 22:15:42 2025 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 4dXQ3d6bLsz6LtkD; Thu, 18 Dec 2025 22:15:57 +0000 (UTC) (envelope-from se@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXQ3d5vYtz3gYq; Thu, 18 Dec 2025 22:15:57 +0000 (UTC) (envelope-from se@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766096157; 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:autocrypt:autocrypt; bh=OTsCxyBWAi4uVUPgYQUPVrOBz+eeZP7cE/0l52cEy1s=; b=vH1B5c5yo1hB14nOoDfhjsgAoK2neNRgJ7lyFKKqMn+yxMWGtJ//YCLeM0PtbeLqTHG98+ eJhPWS3lrgL/Pn2Ryx+nVzY0RWxer00S/IrivJVZNC0nUzQzxTjdgS+KKGc6rzGPCymXoy FhBZIInvGjpqqX0z0TgMi1xt3aCKXT8dh5Y8O8NqMpl8Pm9Ul7lTiBEkO3ViV5TR9UN+dw lYRmCoYmkcae3RNtsO/oNh9wS6zX4JkQEGRJAxbYviCxjS7lmpq1mKUgm4i+UE5i8gRrQr daJZaeTYeyGghQLJ7wg3uPxxwykn5+bTpqcgwu0uoXLR+eNoe6U2hTyAwGCsgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766096157; 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:autocrypt:autocrypt; bh=OTsCxyBWAi4uVUPgYQUPVrOBz+eeZP7cE/0l52cEy1s=; b=KOCO8B9FPCmOBg5cRRyGKpfblOjOSD++tzKx+ZhaNV3ZQOryMuHJBWg4IN7qDJBaP+OR2q nRk9M/IqjiCL3oPE+bryp9QfuEcLSvvnKE3bx8qbpe4lDUJFQIYebctvm8kZVaSuK+ZP9H h0lgBHq55pgDdDa1f1CHuhqiZS82v29FeUiqQV/26QfBaw2CJKbGiMRrqDKsxjehAuUCnu 3912QHHv3d2Q+dKHNeAhSylGiR1AOBXN95TKLwW0GCRJG919SK6Tkr3S0V75+FPKK3rsXo dJcjyprcvFoVLQQXYVuU1RGkAoKZo49USsiCOgnTd3xwkMThK8Q+d1N2Wl0byA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766096157; a=rsa-sha256; cv=none; b=RrWY1eRsY+na1uGrNGwnL7GMVR03e9dJ+CMlD7BkxauSy60Rv6HZrnZ8Na5UPVQVphx5Wa mQ0fryahxjRqYH3+o+UkYPtt9GkUeu2+DArk0BGnEwNbMd0pD9vItrYdFJ8nZg4N3SJMa+ T1VZzRAL67Wjz01Bcj7v70ekbd3JMiycIDdnmupLXdmvGt7/vL8SuwI2A6+0vFZQllY7DX pxCSZQ9Mwq8rSSGjfLLQIZmUsJfKK2upnBTiiaLsgNFOR8Kg6yYIAOg7JUDlB7EcGrT3Db 3rbnXuTLxZKhm6nPrx+DJ85YcY6l+/VtlR2NkmeueequQpue+LxUmlIdFFfhig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.119.151] (p5dc836f3.dip0.t-ipconnect.de [93.200.54.243]) (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 did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXQ3d037Vz8x3; Thu, 18 Dec 2025 22:15:56 +0000 (UTC) (envelope-from se@freebsd.org) Message-ID: <7c2745c8-6ab6-4eb7-918b-63e3b7eb556a@freebsd.org> Date: Thu, 18 Dec 2025 23:15:42 +0100 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 User-Agent: Mozilla Thunderbird From: =?UTF-8?Q?Stefan_E=C3=9Fer?= Subject: Re: git: cf5eed715915 - main - if_rge: fix typo in man page To: Konstantin Belousov , Adrian Chadd Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <6943b3c8.37d76.6e48da27@gitrepo.freebsd.org> Content-Language: de-DE, en-US Autocrypt: addr=se@freebsd.org; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAHNJ1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPsLAlAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJogi3z BQlsQ8JgAAoJEEfrte9a/fVEkoUH/0Tzhysy8mlOFmfY2ckS9zjOk/RGMtaLSAN3ewixyi8F U13V4MXftZwaVBGp91d2MB+unXQsDEDfMFX9Y/oiXyvndEA0hMbdtPwMoCukOkPHY8e42b7f 78H1Rs8chVP/+yljb2I64awEXf7X7J/N/qGaYaoEsKcvOXtcMGrybm5Y0tvAT9b/1bnUaq3z SjBOCmNbofXBmay6gw+VlbSHO/u9fTRqQqTOurc/gm6eCYEfJYiscJP3B+7IRF7Ryd73Vusg qJDwAGK00KP8XhbEEOeyvpkt4/Yo6IJt65+idGawT8+0ha+HjHCYTGwOojydnLksLK9Vt4XS fiMlqnvI66bOwE0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAcLAhgQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJogi3zBQls Q8JgABQJEEfrte9a/fVECRBH67XvWv31RD+aCAC9ieuBN9w3qnHWKcZ2OjFhlGdXs/hSKyNz jxrXn5a/k2qHN4fR27xSfyx1c2GvUaNG6Zt7kNOB6H8oyAwTk8KSj66U4FO4/iScaZr/EY14 vhOCecuJHNAps8MBHTm2GLI6Fr81uCv9ksEpc2DgAvaYzrblia4Me3AytHxuA/oqnqcXBMlg Srl3okIebxAFUGJICIfn1tGCEokC/waJfjQJ/HHkFOogVsNrWwtDWPXfHzmsWLkspZybREkZ nYsVi+ajCwhQAc3NYjIrpr2jcpg+5eQQJFGmbZR3t3mA+0/GW9fqi8ZL2wJAhAMmLWp4IqrB pZLQIv7TCldyeY/YD7BP In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Am 18.12.25 um 19:50 schrieb Konstantin Belousov: > On Thu, Dec 18, 2025 at 07:56:56AM +0000, Stefan Eßer wrote: >>[...] >> -driver supports RealTek RTL8125, RTL8126, RTL8125 and Killer E3000 based >> +driver supports RealTek RTL8125, RTL8126, RTL8127 and Killer E3000 based >> PCIe 1GB to 1GB Ethernet devices. > Should this line be '1GB to 10GB'? Yes, the upper limit should be 10GB - but the lower limit should probably be 2.5GB (the lowest maximum data rate of a device supported by this driver). And GB could be read to be Gigabytes, how about "PCIe 2.5/5/10 Gbps Ethernet devices." ? From nobody Thu Dec 18 22:25:19 2025 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 4dXQGR3fRfz6Lw4T for ; Thu, 18 Dec 2025 22:25: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXQGR29lTz3kZ0 for ; Thu, 18 Dec 2025 22:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766096719; 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=ITkdWHmOvgtR7iToiJ5JiOeec6yPzVTjhw6dFxggQSU=; b=kwnYHOF4vebncxI5aV8ltkqf9N1klydZInE5eOuLersq0hR9tfqFIydmUHdSp5clWUuDLZ bCIdlfkF+4FCrRC2fFSYZav9NBtKKmz64H69wwQ9uAd8+E+HV4l1OyOKPwRLMEjSapP6cL ecU+cCChX/fbOEW3vGTDhIlvHjNqAUEjEOmuYsV3/aOhGSE2Lkz34kl5pHNGiNOfuKt/PF y2D6IgACrNxY8G1rmQsgaaKJeOKG0pgPAHoYkoZE5Z01Bg1tHLHiieXBNr+6zt2pCrAliN kzsFdIHsTuw8M92kpvAcE5PLRvzdjc4wAVPbjiH5KeqAAO9e4+jw6vxG39gifw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766096719; 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=ITkdWHmOvgtR7iToiJ5JiOeec6yPzVTjhw6dFxggQSU=; b=ZDQ3rYl97R12VNAv9zlg2gahTxwRizE9sHQlIQmnhCdw4/eDUwx5R3XFn9mFslkgD62XNJ DfX0eqlAc5An2RpVzC9EUSa10QOIvuo2xDSl3A0Pgu+JLEuj7D2OM0TAVWKvY0NL87S1jh 9kXB5IMM8zsr5mI5xkxX18FuWuDEbK66CTxMkB6zXPI80u5s2h84eYznKqpo3A3oq0mkIV hWA/tzz5kqoCl3pHY9KK2WltHP9QpHogymBXRgS4Vv6LpjJEsnFVMC2GN9HdoIF56zXc0G Z7YZgqtojLclznvOA+jz4XU/R5zGNQvBtcGQngIplaCcRy6sicZiCgNVPxTS4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766096719; a=rsa-sha256; cv=none; b=OclTIhak9VFo+qPOz6PC4TMVKBvRqLkEcRiR+E35qG6Ua4qo2shb4WDs+mwihqcpiN241n 6nX3XZNL2f0rnnc0I94Qkv2ArlkwKUYwazk12chj9YctZzso2jtKaxtHmyykT34taEIC5g TZrNyEwCnHa1QDbDHt4CPGVGUGOdF5B88nwv/bnvjttWgslDxf0AdzHfI/Wthpmj64RSSU gZ+tvmpjPFTF9rAhYNkFyMIWT9cv7n4mPfhmO+QPf/3rxaHPdxd+5lEAnI9rJ9SHZKyNKB 8knPa1cWay+rM8cI4vc69onWFrZqeV6eg5wlsCx0IFobpV/qiUm2GnTaITIrPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXQGR10zdzxHm for ; Thu, 18 Dec 2025 22:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46fab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 22:25:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Rick Parrish From: Alexander Ziaee Subject: git: ca2413d21619 - main - librt/mq_getfd_np.3: Initial 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: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca2413d216197fd55f9363d6f65c641ff1aa3ec5 Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 22:25:19 +0000 Message-Id: <69447f4f.46fab.28f0b01e@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=ca2413d216197fd55f9363d6f65c641ff1aa3ec5 commit ca2413d216197fd55f9363d6f65c641ff1aa3ec5 Author: Rick Parrish AuthorDate: 2025-12-18 22:12:32 +0000 Commit: Alexander Ziaee CommitDate: 2025-12-18 22:19:42 +0000 librt/mq_getfd_np.3: Initial manual page The mq_getfd_np function appeared in FreeBSD 11 with no documentation. This function dereferences the mqd_t as a pointer to an int. Relnotes: yes MFC after: 3 days Reviewed by: kib (previous), markj, ziaee Differential Revision: https://reviews.freebsd.org/D43947 --- lib/librt/Makefile | 2 ++ lib/librt/mq_getfd_np.3 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/lib/librt/Makefile b/lib/librt/Makefile index c755bb123c73..1189636d0416 100644 --- a/lib/librt/Makefile +++ b/lib/librt/Makefile @@ -24,4 +24,6 @@ SYMBOL_MAPS=${.CURDIR}/Symbol.map HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +MAN= mq_getfd_np.3 + .include diff --git a/lib/librt/mq_getfd_np.3 b/lib/librt/mq_getfd_np.3 new file mode 100644 index 000000000000..44c29fbdbf73 --- /dev/null +++ b/lib/librt/mq_getfd_np.3 @@ -0,0 +1,57 @@ +.\" +.\" Copyright (c) 2024 Rick Parrish +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd December 18, 2025 +.Dt MQ_GETFD_NP 3 +.Os +.Sh NAME +.Nm mq_getfd_np +.Nd get a file descriptor for an open message queue descriptor +.Sh SYNOPSIS +.Lb librt +.In mqueue.h +.Ft int +.Fn mq_getfd_np "mqd_t mqd" +.Sh DESCRIPTION +The +.Nm +function retrieves the underlying file descriptor +from the given message queue descriptor returned from +.Xr mq_open 2 . +The file descriptor is used by other functions +to refer to that message queue. +The +.Fa mqd +argument must be an open message queue descriptor. +.Sh IMPLEMENTATION NOTES +.Fx +implements retrieval or alteration of message queue attributes +based on the file descriptor. +The open file descriptor is copied into a child after +.Xr fork 2 . +The +.Xr fstat 2 , +.Xr fchmod 2 , +and +.Xr fchown 2 +system calls are supported for the file descriptor. +.Pp +The file descriptor is safe to use so long as +the message queue descriptor remains open. +.Sh RETURN VALUES +Upon successful completion, the function returns a file descriptor. +.Sh ERRORS +The +.Nm +function does not return any errors. +.Sh SEE ALSO +.Xr mq_close 2 , +.Xr mq_open 2 , +.Xr mqueuefs 4 +.Sh HISTORY +Support for the +.Nm +function first appeared in +.Fx 11.0 . From nobody Thu Dec 18 22:29:52 2025 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 4dXQMy0mnsz6LwCV; Thu, 18 Dec 2025 22:30:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXQMx25rfz3lFT; Thu, 18 Dec 2025 22:30:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BIMTqqN035957; Fri, 19 Dec 2025 00:29:55 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BIMTqqN035957 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BIMTq8b035956; Fri, 19 Dec 2025 00:29:52 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Dec 2025 00:29:52 +0200 From: Konstantin Belousov To: Stefan =?utf-8?B?RcOfZXI=?= Cc: Adrian Chadd , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cf5eed715915 - main - if_rge: fix typo in man page Message-ID: References: <6943b3c8.37d76.6e48da27@gitrepo.freebsd.org> <7c2745c8-6ab6-4eb7-918b-63e3b7eb556a@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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7c2745c8-6ab6-4eb7-918b-63e3b7eb556a@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dXQMx25rfz3lFT On Thu, Dec 18, 2025 at 11:15:42PM +0100, Stefan Eßer wrote: > Am 18.12.25 um 19:50 schrieb Konstantin Belousov: > > On Thu, Dec 18, 2025 at 07:56:56AM +0000, Stefan Eßer wrote: > > > [...] > > > -driver supports RealTek RTL8125, RTL8126, RTL8125 and Killer E3000 based > > > +driver supports RealTek RTL8125, RTL8126, RTL8127 and Killer E3000 based > > > PCIe 1GB to 1GB Ethernet devices. > > Should this line be '1GB to 10GB'? > > Yes, the upper limit should be 10GB - but the lower limit should probably > be 2.5GB (the lowest maximum data rate of a device supported by this driver). 2.5G is the min(max rate) so to say. But it is fine. > > And GB could be read to be Gigabytes, how about > > "PCIe 2.5/5/10 Gbps Ethernet devices." ? Ok with me. From nobody Thu Dec 18 22:36:15 2025 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 4dXQWz0fGCz6Lx26; Thu, 18 Dec 2025 22:37:03 +0000 (UTC) (envelope-from ivy@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXQWy5fcXz3mbj; Thu, 18 Dec 2025 22:37:02 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766097422; 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=0aLLJSTRQ99ttby9XKFjIU3h1PO4Znx13RvChs9EVCA=; b=koaIw3uT5qRprxe5IjtnlDy3zRa1Wbc/t7y3pzQ6cZFlMJZYxVi711mlg42z+cUCOhpjco 5ryn4HATUHYu1KrVkX28xII7vDardD/fbTzfFF4yOCXhZ5sCQ/a5TS/kaebM4kEEVz+/xM GlOQIgK4IXjZkWIUtmFDC9wBIxB8ia1jPNLNuTEhtLPaLPVJQB9VjjYL/xoqe7drNv0nCu ELFQxKBfhSUMq17E9axhkASqOqsMYA6cBWhu+Nanq1+uq5ExC4FgxTuonsknRNGusUISaW yTTFrdVGEuvXhbB6DOhI2rJMyu9HuuqkveGfT8126q8AgE3Ay4lkdSQ2iRZsqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766097422; 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=0aLLJSTRQ99ttby9XKFjIU3h1PO4Znx13RvChs9EVCA=; b=vtmqLcLTuZcvJXDuO5UoPncG82YsEnMTih2ZMUjd6mzoYvp2I9NemT6RWFkirpJyfuG/N5 0asEvjCC/Jis2FfuqwaKamt2ji74Y78YT2pgQz6183P3O+NvaTLi2wsOAF+jLOJ2+hvSQ6 GWaQlkv+DYAVyy+vZ/uLSRCu/8Q5Xn+wlKnhHTJqYX2eZ+mOd1mRTfj5x/RCHxr0y7mIgv 5iNQKV7m9rvW9VG43rPbNcXXAV/LIWskKuE/Yrl29/uG4wYZz20QpTqRYGt4bqXrxS29ey WNvdbO2rGLiwwI+UdzbTXvp6CyHPoi2yiVpeXYHoQxMzyphJ0wVcg/zWTsLSEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766097422; a=rsa-sha256; cv=none; b=qDvrAZFKnN8LPSl+kYHA+U2iXQqJW5cSN0OnzyRHQasV5E6RF4NurOhD0CakGGnTEvRLBu CJcndzyvSy3oTsDMDsGJq6lPI1+xmdRiywNqjkNQVF7oe++mal1OBCjKbwP9b4jVuxZK4i oNFiVY8MqM9S4opff/uYmRf5DNPreJrHVUI6tzi/pfEAvPvGyM4uUveZgWTO7bXq6iUfXd SrOgCi5nc3jKH+d8kYoGCmodlxzRrlrZK4Do7tRi+Aux7lrUhPTiHsFOKywWatXdZ39hOm bRgL6mw81MTxLTbtuPHctk4vVHO+Y/WDr8Hno3KdUlLPvR83MBb/2Aq6j8wgjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (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: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXQWy0RgGz9Jt; Thu, 18 Dec 2025 22:37:01 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Thu, 18 Dec 2025 22:36:15 +0000 From: Lexi Winter To: Konstantin Belousov Cc: Stefan =?iso-8859-1?Q?E=DFer?= , Adrian Chadd , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cf5eed715915 - main - if_rge: fix typo in man page Message-ID: Mail-Followup-To: Konstantin Belousov , Stefan =?iso-8859-1?Q?E=DFer?= , Adrian Chadd , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <6943b3c8.37d76.6e48da27@gitrepo.freebsd.org> <7c2745c8-6ab6-4eb7-918b-63e3b7eb556a@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-sha512; protocol="application/pgp-signature"; boundary="KMOFqHaoBmu6idpd" Content-Disposition: inline In-Reply-To: --KMOFqHaoBmu6idpd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Konstantin Belousov wrote in : > On Thu, Dec 18, 2025 at 11:15:42PM +0100, Stefan E=DFer wrote: > > And GB could be read to be Gigabytes, how about > >=20 > > "PCIe 2.5/5/10 Gbps Ethernet devices." ? > Ok with me. i would suggest "2.5Gb/s" as the more common terminology here. no real preference either way, though. --KMOFqHaoBmu6idpd Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaUSB3AAKCRD1nT63mIK/ YMXmAP4ryNxtJQ4Z0UAfuOUmW2RYoQqaAFMm2mc3XIHnzqJvzwEA+heD0VVmA9dH 3yoC1TrU1WOlU9e5Xy/BS+41fCmAygQ= =T/lD -----END PGP SIGNATURE----- --KMOFqHaoBmu6idpd-- From nobody Thu Dec 18 23:00:26 2025 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 4dXR2z0L7Hz6M00g for ; Thu, 18 Dec 2025 23:00: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXR2y5HVLz3tRW for ; Thu, 18 Dec 2025 23:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766098826; 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=4P/s2wdEL3YU96zljPGjmV4vxffFYJvqbfNQRRbeUIU=; b=EH+zuMbwscxXgjGdhkAruNAhTVd/NfU2Mmnuvo5wN+G5zS3X0JFz4bwqhCGzvWYqk9KuJh jSTHI4ErZArhi1hwaUxigQUHNVf6NnO7HF2JZ+wvY9Pdvg4ZHdQoZVGVmNMaEYfusRGspA vl9bZUvB7c3cqVQfaqgmsab1hKsvWP/uopvz5GhvX1H99ibWhP3HtWh/DeINUj1ZVSST5x VPDWZ8O1gZibZTC1xIC1ASzenh2eSXZry/00Rb4cPplkQxT21/6n8wQCX42pWfwMM8821I nGuhoC0ydllZU4y5OpqWtx3smqIoPd9G7E5ax5Q/2TQQqMBgav2ko8nIziOuWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766098826; 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=4P/s2wdEL3YU96zljPGjmV4vxffFYJvqbfNQRRbeUIU=; b=WDXpzrHtMKecv0Ppyu1mJmYMdyl3Yj9SLg9VATjPx5b3Do1O0yp8hCayfcoju3XHLaLwmN nYJNPuYvelzh+ic+hwbfAVMc5TcObJTLsTEadiW//lBeVSeenwkWRKzsfybeVKsBkaOiGa b51YJSMRFTUC+N4UitXpHxNDbz7fcS4/jya1ag/ch+uTbH8tb9QTFlpvu+MRgyfaTMaguN mjfFar4Xf2Vbf9gUJvXdJgj8wkSVd2YUn4CgtNdcrD8BFm5SIwLx45HVhpN8RAk3rCklaD 0QDwDFKqAjSS9H23fu/70bvMt4i9DM9J82tCgfSSyuH7h6NTFJmL5hr8ukD+Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766098826; a=rsa-sha256; cv=none; b=E1NsVTqfuA1ncxjOxjk0JGBqtG69j25WDsT5oggCeFV8WBGk1WUsBFZpzEXFSeqldOJMsg NQKdZZAPMvbDIhjxNLjG4koUUyGsEhQ4aZUJYo+O9AbVXjC95oJIdgbZgSByMLsonD/ujC O8T2v7xmjUlW5pKWRKWCfePff7XwzYfvYcEKUrHA9McK8c0PfVKaDNCl7s6001ufT10tU6 4FNJBJ471KFxPYugbDAxMxluBpbVC8prjpqLYla3vFYcOxnihhL0LKtcmVwClwrZYhpqJp iul/2G4tmsZkOQzX5iYIWeT4f2X3nqbsWsGrBheukzHWKmE1AG5VvuOIQ73+fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXR2y42v8zy5h for ; Thu, 18 Dec 2025 23:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 89cd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 18 Dec 2025 23:00:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 391e8709315d - main - printf.9: fix style 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: 391e8709315d4a0e8f5ba91912e370571ab6841b Auto-Submitted: auto-generated Date: Thu, 18 Dec 2025 23:00:26 +0000 Message-Id: <6944878a.89cd.18607704@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=391e8709315d4a0e8f5ba91912e370571ab6841b commit 391e8709315d4a0e8f5ba91912e370571ab6841b Author: Michael Tuexen AuthorDate: 2025-12-18 22:49:51 +0000 Commit: Michael Tuexen CommitDate: 2025-12-18 22:49:51 +0000 printf.9: fix style Follow the style described by style.9. Reported by: markj MFC after: 1 week --- share/man/man9/printf.9 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/man/man9/printf.9 b/share/man/man9/printf.9 index 9f026d1d2004..8006590b3d2a 100644 --- a/share/man/man9/printf.9 +++ b/share/man/man9/printf.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 25, 2023 +.Dd December 18, 2025 .Dt PRINTF 9 .Os .Sh NAME @@ -162,7 +162,6 @@ The function void printf_test(void) { - printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE"); printf("out: %4D\en", "AAZZ", ":"); } From nobody Fri Dec 19 00:02:30 2025 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 4dXSQb238sz6K6h3 for ; Fri, 19 Dec 2025 00:02: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXSQb1G3Jz43MH for ; Fri, 19 Dec 2025 00:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766102551; 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=Bem5vGNrOBFli++BU8OgLnTjh3XOfa8MOypNYInfBQ4=; b=MlMruADS4tgPrbMdCWU34UCa10PCgPmW1QsOEbkxVUqkAoDTDvdCTnONYdd9ljZ5d9ZtKK xf4PvsvYVFpdeW+6fdap+cMZeG3u04HDbnmEUb6ytj25BHiBrugqFbd0Gq78Lp2Z293yPz ad4Ej1aMZS7spiuFyz7omc+hdYUGFIwIfYkf9sqcLrqJl7tZLysOmmi7ldSGVbca68UvLv Vwz9Xi4AVp1jwtno3BcHs3Zo9Qn1NJ63upLuNOBmeAeCSQts9ttibEQQ+oBT8z12aArJX/ z9YvEf8AlhjxJi7Cu8DEpw4R+iT8VFSi3VY1gyWS06Ww6AEb18YXQRKSD8e8+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766102551; 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=Bem5vGNrOBFli++BU8OgLnTjh3XOfa8MOypNYInfBQ4=; b=xJ30gg72vgrzr93yg9Ee97Wpzun55vbaUF3hXWUdMKs7gI/S9XP63vCyncYchy4QSwtIiX TS16tJW2fd4/GZiSBfs7MEI5Z5NIldU8jht76psxuj5/BmgZ9a1BXm7zmg4SGFdK3hPj8c jaWwuZQMOula4XBKBoJQz3Qych9rqrnZwU/uxlx/o/Oir0UcqbME+SajUhKWZDnCL+13wj /3uEhbF57hFuX/cz9B/vpWbl9KZzjKpvIlNDTMYmSGDD2lVFQQG6pApFAYWWBiszoRKExv u9t1/gU3KJDaNjpuVW0b+663MWxnBLAqxBi2ltP0HxYPvJEUjbclgKxi/DBwTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766102551; a=rsa-sha256; cv=none; b=DEDO1O7zWDp850YfrKy55tnm70rbNf0/LxQm7xNVP40tuuVFeurs0FfwCwNVpU0uWUt7fL 99Eu4tXdCPK0kIu/bRIfVAtGML+fl3/NM4NElsIMzS/VQEnD/P7lt3KCif7Cklf+Xm5NTY IpPMWlLcau/Z8ut4VhQjEhhFcpRm3PFfikTQpDIeSP8zHKQ/CtJz+t57h2MQwheO+Ntsvo IZszYfuoa/K3PMYVcNm3JIMZZUgcXl/1P5BWFqYygv+A8oLUVOQYOiss4l0CyBod4DYJgE JsofdF76c2GvLrI5xWjE1sov79PmwqkV1U80jmW0P0iWV0pW8S/Q+Jb8a5TbHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXSQb0MNCz10mN for ; Fri, 19 Dec 2025 00:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id f9fd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 00:02:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 8c64625d9079 - main - aq(4): Use standard ETHER_ADDR_LEN definition 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: 8c64625d90792462289686e0209a9f3fff67fc9b Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 00:02:30 +0000 Message-Id: <69449616.f9fd.a3105e1@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8c64625d90792462289686e0209a9f3fff67fc9b commit 8c64625d90792462289686e0209a9f3fff67fc9b Author: Ed Maste AuthorDate: 2025-11-13 22:20:13 +0000 Commit: Ed Maste CommitDate: 2025-12-19 00:01:14 +0000 aq(4): Use standard ETHER_ADDR_LEN definition No need for a bespoke #define. --- sys/dev/aq/aq_common.h | 2 -- sys/dev/aq/aq_fw1x.c | 2 +- sys/dev/aq/aq_fw2x.c | 2 +- sys/dev/aq/aq_hw.h | 3 ++- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/aq/aq_common.h b/sys/dev/aq/aq_common.h index 17dcc5f23fb1..5f52ce915bc5 100644 --- a/sys/dev/aq/aq_common.h +++ b/sys/dev/aq/aq_common.h @@ -37,8 +37,6 @@ #include -#define ETH_MAC_LEN 6 - #define s8 __int8_t #define u8 __uint8_t #define u16 __uint16_t diff --git a/sys/dev/aq/aq_fw1x.c b/sys/dev/aq/aq_fw1x.c index 02b3f649201c..2aec2cc6f0a5 100644 --- a/sys/dev/aq/aq_fw1x.c +++ b/sys/dev/aq/aq_fw1x.c @@ -272,7 +272,7 @@ int fw1x_get_mac_addr(struct aq_hw* hw, u8* mac) mac_addr[0] = bswap32(mac_addr[0]); mac_addr[1] = bswap32(mac_addr[1]); - memcpy(mac, (u8*)mac_addr, ETH_MAC_LEN); + memcpy(mac, (u8*)mac_addr, ETHER_ADDR_LEN); trace(dbg_init, "fw1x> eFUSE MAC addr -> %02x-%02x-%02x-%02x-%02x-%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); diff --git a/sys/dev/aq/aq_fw2x.c b/sys/dev/aq/aq_fw2x.c index b532977b748f..19de3b7a2746 100644 --- a/sys/dev/aq/aq_fw2x.c +++ b/sys/dev/aq/aq_fw2x.c @@ -372,7 +372,7 @@ int fw2x_get_mac_addr(struct aq_hw* hw, u8* mac) mac_addr[0] = bswap32(mac_addr[0]); mac_addr[1] = bswap32(mac_addr[1]); - memcpy(mac, (u8*)mac_addr, ETH_MAC_LEN); + memcpy(mac, (u8*)mac_addr, ETHER_ADDR_LEN); AQ_DBG_EXIT(EOK); return (EOK); diff --git a/sys/dev/aq/aq_hw.h b/sys/dev/aq/aq_hw.h index 97744de118b8..86689fce832e 100644 --- a/sys/dev/aq/aq_hw.h +++ b/sys/dev/aq/aq_hw.h @@ -39,6 +39,7 @@ #include #include #include +#include #include "aq_common.h" #define AQ_WRITE_REG(hw, reg, value) writel(((hw)->hw_addr + (reg)), htole32(value)) @@ -138,7 +139,7 @@ struct aq_hw { u8 *hw_addr; u32 regs_size; - u8 mac_addr[ETH_MAC_LEN]; + u8 mac_addr[ETHER_ADDR_LEN]; enum aq_hw_irq_type irq_type; From nobody Fri Dec 19 05:45:05 2025 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 4dXc1t1nGXz6L2MM for ; Fri, 19 Dec 2025 05:45:06 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXc1t1F3Yz3hGG for ; Fri, 19 Dec 2025 05:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766123106; 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=jztpu6IJ2r+7YOpmFav+f0un9tneVdy04mqHaaHuyeI=; b=uqguRoYxLlQjHZgrKLPAF2ZafZycak7PW78QY9Qoipt5DmG2UyTAOkP95QWGnhU5DP+hTR IEKrRpDcZf8qxn5sED4zCLY/JqVHJUCA7O05OoSnvJGxrE1K9EPYOh7C/ppizwiWYvchVx 1MiJWNrLCV18S50Gs7rg9yH8O/xdd8GYt0dmiuvsu7GSsxW3e9kAG1cL5Cy++Qmd/397KC Y+aeDJWx7SFd0AgnsUVs8or4hd52cmareJQr9yOZUECuJ/2dgDUpGZrKUNmQYE6DYcdPmr hI5hXpP30FsjfA2zmpzj34c0UC+4Ec7dG9WcRTvb1fBfTn+t7CKcj3uPr341gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766123106; 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=jztpu6IJ2r+7YOpmFav+f0un9tneVdy04mqHaaHuyeI=; b=S0OrBbV91jytj3BfedZ+vn4+9xYBTWBCSE7jdNYRpJUj8bLPs+SrsUqqX6CNBXyI1KYpzh f0z1SlBIqM0q7npUE+c2DSthvB+iaR8E5CkHPAbBzcW+4pg2Eip8WWjZXKxoJvBBTgj4JG 84xjb9IyDKgPNvot+Z8UQszvOyYgp5Feij6WladdYd5JWGTuM1Kp7pjrOnLHAihMztZHGf Z3Ku9JHoiNSmzBfBkr5hax/GCIX0z0lE1BjUIH+lMoltYmO3VUi1Vg4JWAveTLf2iZfZLj 6eGDgEewhkfgnaRye6ekPpML/aISjTUh8WXZ/MIoBVOU6adruf7ktKwmp1atPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766123106; a=rsa-sha256; cv=none; b=IoSgeq6IMGbu7kjrP1zBmuQTaMiAdt3krf/78u2B4aDrqjRG38489LsPpQ6xM6CZ1lZxWa PEMbHdD6Vp5U23lkpZkBzgSVrF9f0j+jDcGR0VodtGF1U404w9a2L9SAuDAnVRmC22+zS7 xhtgmgjz9aGbrVCPb9OodKba5qYA4yrQtQYZ50uoOSsVZqgAo9h+x0CTdMomg97Acpg35u z+Lcy7Ds25blQEZgGyK2dTNcp5xNoyYUX5aLd84kiWmP/f33uPbNitRo2QDr7yOVgmujIE WIaLPI0reGfZtUnhYfzjPI6WmDjpAZ3HKV24P47+xAw2iEDrbual12trtBGmBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXc1t0TSBz19Wh for ; Fri, 19 Dec 2025 05:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2213e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 05:45:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 1efb6541c677 - main - acpica: Merge ACPICA 20251212 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: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1efb6541c67792702db075015d48615168ba3783 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 05:45:05 +0000 Message-Id: <6944e661.2213e.1c143eca@gitrepo.freebsd.org> The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=1efb6541c67792702db075015d48615168ba3783 commit 1efb6541c67792702db075015d48615168ba3783 Merge: 8c64625d9079 5cab380e2a26 Author: Jung-uk Kim AuthorDate: 2025-12-19 05:43:14 +0000 Commit: Jung-uk Kim CommitDate: 2025-12-19 05:43:14 +0000 acpica: Merge ACPICA 20251212 Merge commit '5cab380e2a2644aaa920b93f1580a1cfc803a8de' sys/contrib/dev/acpica/changes.txt | 140 +++++++++---- sys/contrib/dev/acpica/common/ahids.c | 2 + sys/contrib/dev/acpica/common/ahpredef.c | 1 + sys/contrib/dev/acpica/common/ahtable.c | 1 + sys/contrib/dev/acpica/common/ahuuids.c | 6 + sys/contrib/dev/acpica/common/dmtable.c | 117 ++++++++--- sys/contrib/dev/acpica/common/dmtbdump2.c | 185 +++++++++++++++-- sys/contrib/dev/acpica/common/dmtbdump3.c | 67 +++++++ sys/contrib/dev/acpica/common/dmtbinfo2.c | 123 +++++++++++- sys/contrib/dev/acpica/common/dmtbinfo3.c | 25 +++ sys/contrib/dev/acpica/compiler/dtcompiler.h | 10 + sys/contrib/dev/acpica/compiler/dttable1.c | 85 ++++++++ sys/contrib/dev/acpica/compiler/dttable2.c | 85 ++++++-- sys/contrib/dev/acpica/compiler/dttemplate.h | 65 +++++- sys/contrib/dev/acpica/compiler/dtutils.c | 2 + .../dev/acpica/components/debugger/dbutils.c | 0 .../dev/acpica/components/events/evregion.c | 2 +- .../dev/acpica/components/executer/exoparg3.c | 46 ++--- .../dev/acpica/components/namespace/nswalk.c | 11 +- .../dev/acpica/components/namespace/nsxfname.c | 2 +- sys/contrib/dev/acpica/components/tables/tbprint.c | 5 + .../dev/acpica/components/utilities/utobject.c | 2 +- .../dev/acpica/components/utilities/utosi.c | 6 +- sys/contrib/dev/acpica/include/acdisasm.h | 21 ++ sys/contrib/dev/acpica/include/aclocal.h | 2 +- sys/contrib/dev/acpica/include/acpixf.h | 2 +- sys/contrib/dev/acpica/include/acpredef.h | 5 +- sys/contrib/dev/acpica/include/actbinfo.h | 12 ++ sys/contrib/dev/acpica/include/actbl1.h | 5 +- sys/contrib/dev/acpica/include/actbl2.h | 220 ++++++++++++++++++++- sys/contrib/dev/acpica/include/actbl3.h | 1 + sys/contrib/dev/acpica/include/acuuid.h | 6 + 32 files changed, 1106 insertions(+), 156 deletions(-) diff --cc sys/contrib/dev/acpica/components/debugger/dbutils.c index 4a39f9aca9e0,9db2425d6aa8..4a39f9aca9e0 mode 100644,100644..100755 --- a/sys/contrib/dev/acpica/components/debugger/dbutils.c +++ b/sys/contrib/dev/acpica/components/debugger/dbutils.c diff --cc sys/contrib/dev/acpica/components/executer/exoparg3.c index 7c17e2868132,722bbec46521..30de8487e676 --- a/sys/contrib/dev/acpica/components/executer/exoparg3.c +++ b/sys/contrib/dev/acpica/components/executer/exoparg3.c @@@ -150,11 -150,12 +150,12 @@@ * *****************************************************************************/ -#include "acpi.h" -#include "accommon.h" -#include "acinterp.h" -#include "acoutput.h" -#include "acparser.h" -#include "amlcode.h" +#include +#include +#include ++#include +#include +#include #define _COMPONENT ACPI_EXECUTER diff --cc sys/contrib/dev/acpica/include/acpixf.h index b5961e21bb9b,67d60c68b6c5..00f0c08d4789 --- a/sys/contrib/dev/acpica/include/acpixf.h +++ b/sys/contrib/dev/acpica/include/acpixf.h @@@ -154,12 -154,12 +154,12 @@@ /* Current ACPICA subsystem version in YYYYMMDD format */ - #define ACPI_CA_VERSION 0x20250807 + #define ACPI_CA_VERSION 0x20251212 -#include "acconfig.h" -#include "actypes.h" -#include "actbl.h" -#include "acbuffer.h" +#include +#include +#include +#include /***************************************************************************** From nobody Fri Dec 19 11:10:09 2025 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 4dXlF53w4nz6LNvK; Fri, 19 Dec 2025 11:10:17 +0000 (UTC) (envelope-from kp@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXlF5345Fz3QQj; Fri, 19 Dec 2025 11:10:17 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766142617; 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=biHezS3LDmnsWXb8fWCkT9QIeJIHSQiYBRZ6TsSOOZY=; b=LOf8N7q/zp/NGMUxMSz8kEEI0/E31BeNFziiYXQPxEarVK8SrXtO1RtCWHd5TDpCNweqo9 0TKpBEIp2Hl9OblmSQ4SpeXxicjBg8EKXg8v8OkG0Za3SYnJi2jSZ7M6x6obqGWy0lVumb EXqsaaa08fg9KPnL7IBetZRxdJL+1og+FbhUvgGEzHJiioxBjvQBrbBUFd7UyVau9fbDHx 4HXtuE451UalR2KhF+oAsHglV+B+9sEwCKmXe9Ligg1Pj2RSo+heErArTwG3nlUhMHa7Q9 4RA9i8hs1nj0iaen27D/kT0XDRvPiVzBLOxVMwbFiIVjLpyfJ2xVkDIQge8TxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766142617; 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=biHezS3LDmnsWXb8fWCkT9QIeJIHSQiYBRZ6TsSOOZY=; b=jdS6LzSzEt8AbFCtIETSsYnyRc5Wi3X5BZcxa3wRQujF47Ow46SW9K5S2DYE/LLHWA9jnx ufsllGu2I+wH1FF9v4cr1RXybroJV31FLQ7UqPRqD5XYgW/elwKhQuFrg6CCq6MZt5k2uT 1MZiYWu/k0oFjMmLkBt9xjssp0xnGE3Xj0cXxf66SPTNKwhU/isoTPfFCuv3KmN1w5DBc2 KwukEn2B8ImI8139AKKXp9M6aCHVxTUTn0ok1zrfy56Q+zYU3mVGdCwoEQoCz22wBd8tmc jyL5TSwAWw9u0jlpJ/sn70QYE9sJgxWaF3oXogydIPiONBOt/GqxtLUPmtq49g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766142617; a=rsa-sha256; cv=none; b=GYyLO647Dh5yZC0MZlUpneA6APhPPIxL6ZFiDUzo5qljRJMOwFCnvCV1YeuYYKtluXmyqA 4Hlq1jERW6uJ8BMniv+iC+idR+VkXd5XfKmykDt/nXDipQVqWp3JyqkZueso2jYmpT2Gxc tT1alaVcKN+XWwgR3FCuHL23sKIj8DpIs71VEp7NohKlBThMvwq0K7zmuWvGLeUAyLQgz7 DE0jsBLKdwalElK8UeM1E7dUiH91BSFcd7VYw3cs+u/N+Io4sG6KE8zMTochdh3154cKd9 +S3IqcwbFO4fuXyaHJcizENJivT3SzgVfhC5JxRnjglfnR3mdqhdAsL2BFAS8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R12" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXlF518dCzQvs; Fri, 19 Dec 2025 11:10:17 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 11379106B4; Fri, 19 Dec 2025 12:10:15 +0100 (CET) From: Kristof Provost To: Gleb Smirnoff Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0d469d23715d - main - net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9) Date: Fri, 19 Dec 2025 12:10:09 +0100 X-Mailer: MailMate (2.0r6272) Message-ID: <4A394DAA-1FCE-440A-8E92-88BD9B4EE087@FreeBSD.org> In-Reply-To: <694452f3.32deb.4d0ab2a7@gitrepo.freebsd.org> References: <694452f3.32deb.4d0ab2a7@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/alternative; boundary="=_MailMate_EB1B9EEC-6095-4BD3-BD15-5B1CDB331F05_=" --=_MailMate_EB1B9EEC-6095-4BD3-BD15-5B1CDB331F05_= Content-Type: text/plain; charset=UTF-8; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable On 18 Dec 2025, at 20:16, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D0d469d23715d690b863787ebfa515= 29e1f6a9092 > > commit 0d469d23715d690b863787ebfa51529e1f6a9092 > Author: Gleb Smirnoff > AuthorDate: 2025-12-18 16:47:39 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-12-18 19:15:53 +0000 > > net: attach IPv4 and IPv6 stacks to an interface with = > EVENTHANDLER(9) > > This change retires two historic relics: the if_afdata[] array and = > the > dom_ifattach/dom_ifdetach methods. > > The if_afdata[] array is a relic of the era, when there was = > expectation > that many transport protocols will coexist with IP, e.g. IPX or = > NetAtalk. > The array hasn't had any members except AF_INET and AF_INET6 for = > over a > decade already. This change removes the array and just leaves two = > pointer > fields: if_inet and if_inet6. > > The dom_ifattach/dom_ifdetach predates the EVENTHANDLER(9) = > framework and > was a good enough method to initialize protocol contexts back = > then. Today > there is no good reason to treat IPv4 and IPv6 stacks differently = > to other > protocols/features that attach and detach from an interface. > > The locking of if_afdata[] is a relic of SMPng times, when the = > system > startup and the interface attach was even more convoluted than = > before this > change, and we also had unloadable protocols that used a field in > if_afdata[]. Note that IPv4 and IPv6 are not unloadable. > > Note that this change removes NET_EPOCH_WAIT() from the interface = > detach > sequence. This may surface several new races associated with = > interface > removal. I failed to hit any with consecutive test suite runs, = > though. > The expected general race scenario is that while struct ifnet is = > freed > with proper epoch_call(9) itself, some structures hanging off = > ifnet are > freed with direct free(9). The proper fix is either make if_foo = > point at > some static "dead" structure providing SMP visibility of this = > store, or > free those structure with epoch_call(9). All of these cases are = > planned > to be found and resolved during 16.0-CURRENT lifetime. > > Reviewed by: zlei, gallatin, melifaro > Differential Revision: https://reviews.freebsd.org/D54089 I=E2=80=99m seeing panics on pfsync interface destruction now: panic: mld_change_state: bad ifp cpuid =3D 19 time =3D 1766142554 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe01843fd990 vpanic() at vpanic+0x136/frame 0xfffffe01843fdac0 panic() at panic+0x43/frame 0xfffffe01843fdb20 mld_change_state() at mld_change_state+0x6d0/frame 0xfffffe01843fdb90 in6_leavegroup_locked() at in6_leavegroup_locked+0xa9/frame = 0xfffffe01843fdbf0 in6_leavegroup() at in6_leavegroup+0x32/frame 0xfffffe01843fdc10 pfsync_multicast_cleanup() at pfsync_multicast_cleanup+0x83/frame = 0xfffffe01843fdc40 pfsync_clone_destroy() at pfsync_clone_destroy+0x260/frame = 0xfffffe01843fdc90 ifc_simple_destroy_wrapper() at ifc_simple_destroy_wrapper+0x26/frame = 0xfffffe01843fdca0 if_clone_destroyif_flags() at if_clone_destroyif_flags+0x69/frame = 0xfffffe01843fdce0 if_clone_detach() at if_clone_detach+0xe6/frame 0xfffffe01843fdd10 vnet_pfsync_uninit() at vnet_pfsync_uninit+0xf0/frame = 0xfffffe01843fdd30 vnet_destroy() at vnet_destroy+0x154/frame 0xfffffe01843fdd60 prison_deref() at prison_deref+0xaf5/frame 0xfffffe01843fddd0 sys_jail_remove() at sys_jail_remove+0x15c/frame 0xfffffe01843fde00 amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe01843fdf30 fast_syscall_common() at fast_syscall_common+0xf8/frame = 0xfffffe01843fdf30 --- syscall (508, FreeBSD ELF64, jail_remove), rip =3D 0x2d8234c9e31a, = rsp =3D 0x2d823179b928, rbp =3D 0x2d823179b9b0 --- KDB: enter: panic The pfsync:basic_ipv6 seems to trigger this reliably. Best regards, Kristof --=_MailMate_EB1B9EEC-6095-4BD3-BD15-5B1CDB331F05_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 18 Dec 2025, at 20:16, Gleb Smirnoff wrote:

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3D0d469d23715d690b863787ebfa51529e1f6a9092

commit 0d469d23715d690b863787ebfa51529e1f6a9092
Author: Gleb Smirnoff glebius@= FreeBSD.org
AuthorDate: 2025-12-18 16:47:39 +0000
Commit: Gleb Smirnoff glebius@= FreeBSD.org
CommitDate: 2025-12-18 19:15:53 +0000

ne=
t: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9)

This change retires two historic relics: the if_afdata[] array and the
dom_ifattach/dom_ifdetach methods.

The if_afdata[] array is a relic of the era, when there was expectation
that many transport protocols will coexist with IP, e.g. IPX or NetAtalk.=

The array hasn't had any members except AF_INET and AF_INET6 for over a
decade already. This change removes the array and just leaves two pointer=

fields: if_inet and if_inet6.

The dom_ifattach/dom_ifdetach predates the EVENTHANDLER(9) framework and
was a good enough method to initialize protocol contexts back then.  Toda=
y
there is no good reason to treat IPv4 and IPv6 stacks differently to othe=
r
protocols/features that attach and detach from an interface.

The locking of if_afdata[] is a relic of SMPng times, when the system
startup and the interface attach was even more convoluted than before thi=
s
change, and we also had unloadable protocols that used a field in
if_afdata[].  Note that IPv4 and IPv6 are not unloadable.

Note that this change removes NET_EPOCH_WAIT() from the interface detach
sequence.  This may surface several new races associated with interface
removal.  I failed to hit any with consecutive test suite runs, though.
The expected general race scenario is that while struct ifnet is freed
with proper epoch_call(9) itself, some structures hanging off ifnet are
freed with direct free(9).  The proper fix is either make if_foo point at=

some static "dead" structure providing SMP visibility of this s=
tore, or
free those structure with epoch_call(9).  All of these cases are planned
to be found and resolved during 16.0-CURRENT lifetime.

Reviewed by:            zlei, gallatin, melifaro
Differential Revision:  https://reviews.freebsd.org/D54089

I=E2=80=99m seeing panics on pfsync interface destruction= now:

pa=
nic: mld_change_state: bad ifp
cpuid =3D 19
time =3D 1766142554
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01843=
fd990
vpanic() at vpanic+0x136/frame 0xfffffe01843fdac0
panic() at panic+0x43/frame 0xfffffe01843fdb20
mld_change_state() at mld_change_state+0x6d0/frame 0xfffffe01843fdb90
in6_leavegroup_locked() at in6_leavegroup_locked+0xa9/frame 0xfffffe01843=
fdbf0
in6_leavegroup() at in6_leavegroup+0x32/frame 0xfffffe01843fdc10
pfsync_multicast_cleanup() at pfsync_multicast_cleanup+0x83/frame 0xfffff=
e01843fdc40
pfsync_clone_destroy() at pfsync_clone_destroy+0x260/frame 0xfffffe01843f=
dc90
ifc_simple_destroy_wrapper() at ifc_simple_destroy_wrapper+0x26/frame 0xf=
ffffe01843fdca0
if_clone_destroyif_flags() at if_clone_destroyif_flags+0x69/frame 0xfffff=
e01843fdce0
if_clone_detach() at if_clone_detach+0xe6/frame 0xfffffe01843fdd10
vnet_pfsync_uninit() at vnet_pfsync_uninit+0xf0/frame 0xfffffe01843fdd30
vnet_destroy() at vnet_destroy+0x154/frame 0xfffffe01843fdd60
prison_deref() at prison_deref+0xaf5/frame 0xfffffe01843fddd0
sys_jail_remove() at sys_jail_remove+0x15c/frame 0xfffffe01843fde00
amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe01843fdf30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01843fdf3=
0
--- syscall (508, FreeBSD ELF64, jail_remove), rip =3D 0x2d8234c9e31a, rs=
p =3D 0x2d823179b928, rbp =3D 0x2d823179b9b0 ---
KDB: enter: panic

The pfsync:basic_ipv6 seems to trigger this reliably.

=

Best regards,
Kristof

--=_MailMate_EB1B9EEC-6095-4BD3-BD15-5B1CDB331F05_=-- From nobody Fri Dec 19 12:55:42 2025 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 4dXnZk4jr4z6Lc7s for ; Fri, 19 Dec 2025 12:55: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXnZk3RxLz49Br for ; Fri, 19 Dec 2025 12:55:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766148942; 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=FreY5w2yom9fJaRqOtmpe/IhdBMFcMnJBeM1effKgds=; b=d0Wt0+HmSNlc0nH4i0izpBDkOXXoWs6TG/ltLozSQYXkEuytwYr/n3Z3AW7iexaTBE3N60 r+gW48X5ZyIjwO+3mdjxlI1p/3IfJ3OPJ++V4LSQ/3+RS2XsZitA+re+/ksE0zieyIEssu eLsdMBOZv7bDDkw33Zoeqaiev7VtjG1FgU9SVs4BTcd2220NoFwWzAj0YqAf8bWLiV9GF7 CWQpQUPxIp56pdO/2F/6F+VrNlExrhM4T72Rl+Btl6Lm1rvtlDPhP2vqQlgzi5xaU9SWGN YNkSxdh0lsqAkyrAGQFCy+yy4/sHdXr3AZX+0H3EmxcThw/bQsETFbVdpOtguA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766148942; 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=FreY5w2yom9fJaRqOtmpe/IhdBMFcMnJBeM1effKgds=; b=CTbeDL5Lo9MD9PEkAaDVKta9TvAD4Q96CgpksTrTS5SFSW0FMWfbM1TuB8umSGhFCFHoeg 8yXta3JvJDBtwjWB6Crf0gY/DWojp5TwiGKDPHajKEOFHyf9jT5ynBz2zm380KvhDlULMI GoGzn/EYRqcL80j4MOrNjsR/L+ymMbKhIFkueq46rgIWsKAqsRCcBzpbBWjjFb0udvW5f0 h8ua+3M6KDu9NQEIMN2B8gC2j+Y72OWgGV5Ck+tBTo37EdFDKjGG+JXhZQR3j5ivIvKPim PFegyLkcQe+rzYowI8ni5arNJm7YLmVw7kWJ+flcurEcdTJniyW7wc3HESWt8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766148942; a=rsa-sha256; cv=none; b=B2F2J6+m1A4zC5AADDFXeUxlh5y+zxqA9/xJU08u+iqKrmC2z/4ftaoblvBfMUbRUR23i5 eRobUvdvro86MDDhtadizETyV2vR5qGt/ID7s8Vko5pXSQ1SQos8/0v0rn+m8iWKGbe2yo 08w5I6dL3c4ukwKvWs6dEG26afRsO/VsvG19yKCIUk8JwobqhQ0hHeMYw1Ppqaay3JNU9L tR3N7cdzX3Fr9UpTGk3VOxtrQPUfupP9z+NlQsIQb/gLt3LW9ZyNLOBbDFq03tjvZa8o0q NZOQjS8jDG7UK8d3FjEsA36hSiNO0aJAzU7C4oJ6l9ueP1PWMEmD5pnN1MIt7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXnZk2ytSz1NlX for ; Fri, 19 Dec 2025 12:55:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35339 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 12:55:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 2804461adfc6 - main - ntp: Fix buildworld with MK_OPENSSL=no 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2804461adfc670c78c1dcb9cab6b2191c8d486ec Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 12:55:42 +0000 Message-Id: <69454b4e.35339.7ec756f9@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=2804461adfc670c78c1dcb9cab6b2191c8d486ec commit 2804461adfc670c78c1dcb9cab6b2191c8d486ec Author: Cy Schubert AuthorDate: 2025-12-19 04:59:38 +0000 Commit: Cy Schubert CommitDate: 2025-12-19 12:54:11 +0000 ntp: Fix buildworld with MK_OPENSSL=no Reported by: wosch Tested by: wosch MFC after: 1 week --- usr.sbin/ntp/Makefile.inc | 2 +- usr.sbin/ntp/config.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc index 5801d91aac46..85340a5a9eea 100644 --- a/usr.sbin/ntp/Makefile.inc +++ b/usr.sbin/ntp/Makefile.inc @@ -9,7 +9,7 @@ NTPDEFS= -DSYS_FREEBSD CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS} .if ${MK_OPENSSL} != "no" -CFLAGS+= -DOPENSSL -DAUTOKEY +CFLAGS+= -DOPENSSL -DAUTOKEY -DUSE_OPENSSL_CRYPTO_RAND .endif WARNS?= 0 diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index 3d6a1364dd10..6b0ef0b6ae6a 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -1664,7 +1664,8 @@ typedef unsigned int uintptr_t; #define USE_FSETOWNCTTY 1 /* Use OpenSSL's crypto random functions */ -#define USE_OPENSSL_CRYPTO_RAND 1 +/* We define this in Makefile.inc instead */ +/* #undef USE_OPENSSL_CRYPTO_RAND */ /* OK to use snprintb()? */ /* #undef USE_SNPRINTB */ From nobody Fri Dec 19 13:02:00 2025 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 4dXnk32hZgz6LcXM; Fri, 19 Dec 2025 13:02:03 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXnk30rgdz3CPc; Fri, 19 Dec 2025 13:02:03 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766149323; 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=W7hAX/ZEA2/hsWUbwKY5kzFyoViwECYpF5VNXkiq/8Y=; b=CdM/Co9rydMbb0IXDrUi0eY0jFJWVU25FH9ZEJXs/xkutKQEKD3l3MfiZKZp7atXUmIfkz Yugqj09SDNtM7TW9nj5+GX/v788OlkvzhuV/7WdRD3qXQyHxSEyoKjyuOVCTICrOghRrJG 94mLifKNMat+wdixmVN+WUGWUVAvtlSsd/gPSDvNbRShjRWFuocMAZxi5wwb+IPMXovNWJ ltPrPyApoSMCO18PmONBFXNDvDdfND89uJWIyLdwuk7MNJW0VOU/IlS/4VZMwfue9UMcsR jS3zAsjwVJhid5iWunfBPBLia/01pzBIXd2PiTwcN/qJnWRs/50cgcL4bsDCGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766149323; 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=W7hAX/ZEA2/hsWUbwKY5kzFyoViwECYpF5VNXkiq/8Y=; b=Lkso3hn2d+Ytt+BYZZ3bnDzQJB0thkoib3H5dK/c+58/KwFNLpbxV+x2KJFCrjgSP/wVtT WWPvdIfaJOI0RgHxvvnfSw4T/g2lEB6ICsd0nhliIHtXbv82gC2OTjpsoEkaMkzultbWOS A8tMtt3hhNpSUVTdkeGB52U23PpF/hvKEHkMq0bRFqRL+HfJ3cygu2C6TvTMzSDUyPPzAy v8igz/V62itnHyFVY7MIBivgmE4LOoBCUEcsdnr7Pv74Lfrb/FkhPSPB65ctkLhe6efQTX rwN/jXOJgEaKsEXQFUJWe/olgBVcsR70MfzJxy+UoYPKXdxvA2GkdQdvvE0omA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766149323; a=rsa-sha256; cv=none; b=IhDxku3NAwXgvgHgG5nXwVHAMpr8FHoilpEdi0JC2sNwZNTKniRlmeC/y0V9HGUKAC0g5n VWyEeWDVtU0Ig1dmGCMEar4caW/XSIg52l9L39EE2KA4V2v5wM+pItIB/woYso1YE6IuHL xzjKtmigcfWdLBuhemmXlJdMKgPy40CVpAfCPk+0//8YsKxHBkcHpHIPCGR5UFS1bXvYBd dFLnZZGM3QVv8mYnwHO2fXHfBTpxidI1nOzbdF2kcauXlJ6mgSFONmXR8BIW4QXNcUHxwH GKFzB2+4pMM1KS9b1Xnhbc1HpRDgQDD266Q/+Y1LAANLE1skWgks1O+D6qzANQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4dXnk26s1tzZLK; Fri, 19 Dec 2025 13:02:02 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 9FC65F3C08; Fri, 19 Dec 2025 14:02:00 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Maste Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: cd240957d7ba - main - netinet: Disallow connections to INADDR_ANY In-Reply-To: <202505241814.54OIEgPR025138@gitrepo.freebsd.org> (Ed Maste's message of "Sat, 24 May 2025 18:14:42 GMT") References: <202505241814.54OIEgPR025138@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Fri, 19 Dec 2025 14:02:00 +0100 Message-ID: <86ecoq7hh3.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 Ed Maste writes: > commit cd240957d7ba43d819e9d59c6f6517fe915102c7 > Author: Ed Maste > AuthorDate: 2024-11-25 14:07:11 +0000 > Commit: Ed Maste > CommitDate: 2025-05-24 18:13:09 +0000 > > netinet: Disallow connections to INADDR_ANY >=20=20=20=20=20 > Previously connect() or sendto() to INADDR_ANY reached some socket bo= und > to some host interface address. Although this was intentional it was = an > artifact of a different era, and is not desirable now. >=20=20=20=20=20 > In 417b35a97b76 markj added support to disallow connect() to INADDR_A= NY. > Take the next logical step and disable it by default. It is still possible to connect to IN6ADDR_ANY. IMO we should either allow both or disallow both. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Fri Dec 19 14:13:19 2025 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 4dXqJH2WtRz6LlLJ for ; Fri, 19 Dec 2025 14:13: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXqJH1jTKz3LJR for ; Fri, 19 Dec 2025 14:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766153599; 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=Mq3d611jbMDt8b/9DL4ur2Fv1KPqdK99bjSJTQv57Vk=; b=w7W3IBoHPn2JXSquzdiM3mbW/1d28hnE5VFF2lj5HADHB0w7h1q+pw/GnuIPQCFtDwRhfg //09HZ0PLlc0UrBoXkekPJ+ZxujHksyO0w0yM1EGMk1+B4nyCOUjtzgI0wSlNCP7Sqrj3F E5NTpWx0ntlg8+6f0EX9KwsrXDIemXfFc+lLohVXq1pT7l9s4G9vIv9zI7g5+6kyvMGaO4 37tCzKsVTMSGYmMHRohikcvENrI1pmzx0JD8O1I/3W4kuQPnq3TF1Q1m6rz9Tzw545HLIT kBglMYN0IRiWPb6Vpun5nSD7fRq62Oj3FCmaKSa5lcKwNaIJ+O0prf4H5QwoCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766153599; 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=Mq3d611jbMDt8b/9DL4ur2Fv1KPqdK99bjSJTQv57Vk=; b=ypzqfCKPE1+UY1dhGEAWR0F4vdZoDJOOjbQyQiiG3x19V4IP7SlW3DIolmq8lDvu81LuoZ SmjrqoQeF9prYbvsxyYChm4EAmwIZsScnNdLtN5s0aE6vQEHN8x99n6C8gP4/9ESPxHQrv YA1tvTrlAThk8ybwXYS/E+j0xRENT43Ua2DKd2AEF1nNYCaPgk0s0QuCQuV6RsP1xzro/+ 0oW4zwH+rROE9MTdG38ybPwQ3+8qavsZ4QuJyHjhm4Sa8krM7QDfFhLFhBkA3GHfg+z6L2 X1FwsxATRpGJjll0j82W3+iBan/PwO/DEsmWmq6lERyMjs5L74R5g4n49eLBuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766153599; a=rsa-sha256; cv=none; b=ab4Dj77kQvsAOvPzqODCH3hq+vBp7gGoXc8QyriKbmWAjR6rfJzBHqaR4SMLTVOgAtoTYL +Ioz6SvX4BEDHet04vAA5L6TkB9s7j9EczQDpnvDkjagaX+hY6yF0aN+3ECcBftKE1qtYs syZOMpFyhIEhm5wZ263rdKEd8RTPGwEhjpiISugbYjpDevDlRD6Kzq/RxRXQVHXgDZMNg9 MGNR8VJ3GQep3g6qfbVhhRdSKtUnLqWj3fgiKxoyiGuiRVAtmGCrNqMQBlHokncz+FAJa3 lyxNIBtJBCC1IMsLvnAJNwSOX3wlEossRaZpcLnKrxLhGhxQjgFZ+6zg6CrAMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXqJH1GXfz1Qh0 for ; Fri, 19 Dec 2025 14:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ca92 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 14:13:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ae96ff302f8a - main - pf: Avoid taking the pf rules write lock in a couple of ioctls 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: ae96ff302f8ae50903a96d3a1857f9acf243f3c4 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 14:13:19 +0000 Message-Id: <69455d7f.3ca92.3cf68097@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ae96ff302f8ae50903a96d3a1857f9acf243f3c4 commit ae96ff302f8ae50903a96d3a1857f9acf243f3c4 Author: Mark Johnston AuthorDate: 2025-12-19 14:07:26 +0000 Commit: Mark Johnston CommitDate: 2025-12-19 14:07:26 +0000 pf: Avoid taking the pf rules write lock in a couple of ioctls The DIOCGETRULES ioctl handlers has taken the write lock ever since fine-grained locking was merged to pf, but I believe it's unneeded. Use the read lock instead. DIOCGETRULENV takes the write lock as well but I believe this is only required when clearing rule counters. Acquire the read lock if that is not the case. Reviewed by: kp, allanjude MFC after: 2 weeks Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54292 --- sys/netpfil/pf/pf_ioctl.c | 91 ++++++++++++++++++++++------------------------- sys/netpfil/pf/pf_nv.c | 2 +- sys/netpfil/pf/pf_nv.h | 2 +- 3 files changed, 45 insertions(+), 50 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 9856842c72b2..ca1815984797 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2087,19 +2087,20 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) int pf_ioctl_getrules(struct pfioc_rule *pr) { + PF_RULES_RLOCK_TRACKER; struct pf_kruleset *ruleset; struct pf_krule *tail; int rs_num; - PF_RULES_WLOCK(); + PF_RULES_RLOCK(); ruleset = pf_find_kruleset(pr->anchor); if (ruleset == NULL) { - PF_RULES_WUNLOCK(); + PF_RULES_RUNLOCK(); return (EINVAL); } rs_num = pf_get_ruleset_number(pr->rule.action); if (rs_num >= PF_RULESET_MAX) { - PF_RULES_WUNLOCK(); + PF_RULES_RUNLOCK(); return (EINVAL); } tail = TAILQ_LAST(ruleset->rules[rs_num].active.ptr, @@ -2109,7 +2110,7 @@ pf_ioctl_getrules(struct pfioc_rule *pr) else pr->nr = 0; pr->ticket = ruleset->rules[rs_num].active.ticket; - PF_RULES_WUNLOCK(); + PF_RULES_RUNLOCK(); return (0); } @@ -3692,6 +3693,7 @@ DIOCADDRULENV_error: } case DIOCGETRULENV: { + PF_RULES_RLOCK_TRACKER; struct pfioc_nv *nv = (struct pfioc_nv *)addr; nvlist_t *nvrule = NULL; nvlist_t *nvl = NULL; @@ -3702,6 +3704,13 @@ DIOCADDRULENV_error: bool clear_counter = false; #define ERROUT(x) ERROUT_IOCTL(DIOCGETRULENV_error, x) +#define ERROUT_LOCKED(x) do { \ + if (clear_counter) \ + PF_RULES_WUNLOCK(); \ + else \ + PF_RULES_RUNLOCK(); \ + ERROUT(x); \ +} while (0) if (nv->len > pf_ioctl_maxcount) ERROUT(ENOMEM); @@ -3733,78 +3742,64 @@ DIOCADDRULENV_error: nr = nvlist_get_number(nvl, "nr"); - PF_RULES_WLOCK(); + if (clear_counter) + PF_RULES_WLOCK(); + else + PF_RULES_RLOCK(); ruleset = pf_find_kruleset(nvlist_get_string(nvl, "anchor")); - if (ruleset == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(ENOENT); - } + if (ruleset == NULL) + ERROUT_LOCKED(ENOENT); rs_num = pf_get_ruleset_number(nvlist_get_number(nvl, "ruleset")); - if (rs_num >= PF_RULESET_MAX) { - PF_RULES_WUNLOCK(); - ERROUT(EINVAL); - } + if (rs_num >= PF_RULESET_MAX) + ERROUT_LOCKED(EINVAL); if (nvlist_get_number(nvl, "ticket") != - ruleset->rules[rs_num].active.ticket) { - PF_RULES_WUNLOCK(); - ERROUT(EBUSY); - } + ruleset->rules[rs_num].active.ticket) + ERROUT_LOCKED(EBUSY); - if ((error = nvlist_error(nvl))) { - PF_RULES_WUNLOCK(); - ERROUT(error); - } + if ((error = nvlist_error(nvl))) + ERROUT_LOCKED(error); rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr); while ((rule != NULL) && (rule->nr != nr)) rule = TAILQ_NEXT(rule, entries); - if (rule == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(EBUSY); - } + if (rule == NULL) + ERROUT_LOCKED(EBUSY); nvrule = pf_krule_to_nvrule(rule); nvlist_destroy(nvl); nvl = nvlist_create(0); - if (nvl == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(ENOMEM); - } + if (nvl == NULL) + ERROUT_LOCKED(ENOMEM); nvlist_add_number(nvl, "nr", nr); nvlist_add_nvlist(nvl, "rule", nvrule); nvlist_destroy(nvrule); nvrule = NULL; - if (pf_kanchor_nvcopyout(ruleset, rule, nvl)) { - PF_RULES_WUNLOCK(); - ERROUT(EBUSY); - } + if (pf_kanchor_nvcopyout(ruleset, rule, nvl)) + ERROUT_LOCKED(EBUSY); free(nvlpacked, M_NVLIST); nvlpacked = nvlist_pack(nvl, &nv->len); - if (nvlpacked == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(ENOMEM); - } + if (nvlpacked == NULL) + ERROUT_LOCKED(ENOMEM); - if (nv->size == 0) { - PF_RULES_WUNLOCK(); - ERROUT(0); - } - else if (nv->size < nv->len) { - PF_RULES_WUNLOCK(); - ERROUT(ENOSPC); - } + if (nv->size == 0) + ERROUT_LOCKED(0); + else if (nv->size < nv->len) + ERROUT_LOCKED(ENOSPC); - if (clear_counter) + if (clear_counter) { pf_krule_clear_counters(rule); - - PF_RULES_WUNLOCK(); + PF_RULES_WUNLOCK(); + } else { + PF_RULES_RUNLOCK(); + } error = copyout(nvlpacked, nv->data, nv->len); +#undef ERROUT_LOCKED #undef ERROUT DIOCGETRULENV_error: free(nvlpacked, M_NVLIST); diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index 2f484e2dabc6..3e741dd39974 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -684,7 +684,7 @@ error: } nvlist_t * -pf_krule_to_nvrule(struct pf_krule *rule) +pf_krule_to_nvrule(const struct pf_krule *rule) { nvlist_t *nvl, *tmp; u_int64_t src_nodes_total = 0; diff --git a/sys/netpfil/pf/pf_nv.h b/sys/netpfil/pf/pf_nv.h index cf9fbf8bcf5b..9e43ff1e642a 100644 --- a/sys/netpfil/pf/pf_nv.h +++ b/sys/netpfil/pf/pf_nv.h @@ -78,7 +78,7 @@ int pf_nvstring(const nvlist_t *, const char *, char *, size_t); int pf_check_rule_addr(const struct pf_rule_addr *); -nvlist_t *pf_krule_to_nvrule(struct pf_krule *); +nvlist_t *pf_krule_to_nvrule(const struct pf_krule *); int pf_nvrule_to_krule(const nvlist_t *, struct pf_krule *); int pf_nvstate_kill_to_kstate_kill(const nvlist_t *, struct pf_kstate_kill *); From nobody Fri Dec 19 14:13:20 2025 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 4dXqJJ4ZH7z6Ll45 for ; Fri, 19 Dec 2025 14:13: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXqJJ2NB0z3LPQ for ; Fri, 19 Dec 2025 14:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766153600; 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=EkM9lKEfiUtBkcJiCk6qza24hlfTN9RlMO1o9KUTT/c=; b=XK2gBJBQ68vg55TSnIk6hU19UF70MEzw9JRSQ2PaF2Gt11/GTbF2gtAbwywWEAMIVP62uc OqMTRC2+srXsVNxESjH5PY8MQOnSsk72PGAg/UyRWTIHq7dtY1WXUM9CfaYCK5YEA+24R0 lucpT891Z1gZpA/Yni8JL0bggf7tYkUvpx82jfeh/urWC1wKF7Cd5vwSLr3c/HluMrbY8v WsPL25ml5vCpJcCGgOKXpqZhNWbja9dB6R75Mc/7HcT84b+n1rDdzv6wmaUbYIHVo3Lobr M+m6N5YGgsNZyM3+9bZ7oPWMAdh0xZ9Mh/QUitLqCSTtNMYFtur9eEqifGEDXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766153600; 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=EkM9lKEfiUtBkcJiCk6qza24hlfTN9RlMO1o9KUTT/c=; b=BLD9PDegg/PVWQ2xNi5GovzNCLd+AvRkavbwU4QJnW3RAb0FZkuQXlvpmpuJ0eCWwHUTcn yhsYxiIjby4gdw/yz9YrQe12kVIndMvakWvoJonOsclwDkt8Rl01VdyEVpPBJyBK//5gu8 dagiTwrsXg8aThD+/mMAMCasW3V35x9h50Q/6DS56qM0WaE3vxE7kdhASecrnksUSMAkTV +7D5OXkqDg76ctmhHR8ErvnzEuCdo+VC0VML7hDJhd0Tvj6UQTGI9akhPzgwTMVj6fLlcn VllVjxYNfplBqD8JQERxxRc1NF+YjxoAr3aHWQGcXXMCpwUpHF7me9IgPJxnbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766153600; a=rsa-sha256; cv=none; b=ooSMF9jBWxx3VGpNGfdS7bHQaLmc7icglAor4W+oGMGvW1bucoTmewgJFJKB4KrsXFxEq2 0P6EL7uLyVU6s/nwlCtbTPiJc7SFjdTTnLTYAGBNNmSuKkiW8rVQuwkZmxfEVBXes9odTQ oXpN7FhxGs1pNC/20qFqYcPElE5ec8wqxLg4mjtiQ2O+NSdgVc7Uil26BmnGWEiZwVfMYt uQqgEsKrUSMCUemf0gAZflkOCiZQ5DEqY3WPoTnI9jszSdlS7N8k1CHAK9xEIEYMGVEMfq GXdQz+KBAkQq3p7qDpFeaMBV4mXRc2CQ8JyKzQHGkk7zX0JIF1UmA69qLG1iTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXqJJ1yqxz1QNT for ; Fri, 19 Dec 2025 14:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c918 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 14:13:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 7080c1b09d72 - main - tests: Fix style in ra.py 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: 7080c1b09d72e64f17185e90d7b660175f8fbaba Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 14:13:20 +0000 Message-Id: <69455d80.3c918.383f8f8a@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7080c1b09d72e64f17185e90d7b660175f8fbaba commit 7080c1b09d72e64f17185e90d7b660175f8fbaba Author: Mark Johnston AuthorDate: 2025-12-19 14:11:01 +0000 Commit: Mark Johnston CommitDate: 2025-12-19 14:11:01 +0000 tests: Fix style in ra.py No functional change intended. MFC after: 2 weeks --- tests/sys/netinet6/ra.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/sys/netinet6/ra.py b/tests/sys/netinet6/ra.py index 44814418da48..a5016b3f6e9b 100644 --- a/tests/sys/netinet6/ra.py +++ b/tests/sys/netinet6/ra.py @@ -1,4 +1,4 @@ -#- +# # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2024 Klara, Inc. @@ -8,31 +8,33 @@ import argparse import scapy.all as sp import sys + # # Emit a router advertisement with the specified prefix. # def main(): parser = argparse.ArgumentParser("ra.py", - description="Emits Router Advertisement packets") + description="Emits Router Advertisement packets") parser.add_argument('--sendif', nargs=1, required=True, - help='The interface through which the packet will be sent') + help='The interface through which the packet will be sent') parser.add_argument('--src', nargs=1, required=True, - help='The source IP address') + help='The source IP address') parser.add_argument('--dst', nargs=1, required=True, - help='The destination IP address') + help='The destination IP address') parser.add_argument('--prefix', nargs=1, required=True, - help='The prefix to be advertised') + help='The prefix to be advertised') parser.add_argument('--prefixlen', nargs=1, required=True, type=int, - help='The prefix length to be advertised') + help='The prefix length to be advertised') args = parser.parse_args() pkt = sp.Ether() / \ - sp.IPv6(src=args.src, dst=args.dst) / \ - sp.ICMPv6ND_RA(chlim=64) / \ - sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, prefixlen=args.prefixlen) + sp.IPv6(src=args.src, dst=args.dst) / \ + sp.ICMPv6ND_RA(chlim=64) / \ + sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, prefixlen=args.prefixlen) sp.sendp(pkt, iface=args.sendif[0], verbose=False) sys.exit(0) + if __name__ == '__main__': main() From nobody Fri Dec 19 14:13:21 2025 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 4dXqJK4X6Tz6LlQX for ; Fri, 19 Dec 2025 14:13:21 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXqJK3J6Xz3LRK for ; Fri, 19 Dec 2025 14:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766153601; 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=rfG7ru3u/euoQnWKdjR7o2kbYk2+08q/070W7hkIazk=; b=hu1mUl07RZznpktwZ0V8sdPJcpCMhIe2+KbJIrPIbJrxcisYLBfXeOkt0z1lVP/VUdZTtg /zFaaUR5rR5U/+54ivTthYTCj6L1jj/Qo/2iFVKGSfDxlikmsIbnGjsuNaRBrmaOxO6zGm PsqiUZJlliLk6Qy1iAJSic5KbbCmmHOnIkOwzzkOAuELUefnSuO9kn75iEMKup2f/WTeQk k6CccCyQNdj5mvvKe39FlmUq2SwMPGVZQyYyPdgS+OBtL3QZrg2mzwtSiRuR70LkQVEKL7 jnBLecaLjLdliTb+Ycngs7iYzwdzwCNQyuRjgwmX+rQ0fEfTOMaoGYK+VwhhNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766153601; 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=rfG7ru3u/euoQnWKdjR7o2kbYk2+08q/070W7hkIazk=; b=IgXFV1bEoadvOltyNYkfh2Pu6uoLDv9FPyiVY1Ro9DlsWLFto1Pt2xuamnbICAzQTxdFLq 4EbyGRAFiJ+MO1aOnS0uwUQlGrz3zaK0ulGQDA+Nc6nlGOz1ZAutDTJvzRwaBM/b6HQ97D FGv6NiLxTygWECD6W76uLNO3fXPcronBVGOShoPAQ5zg3LPkZF6iqjJ0SoA/Z4GCm9ChG8 njTVJPucMCzkcQY9d5SN3O08s9JMIzskcI++XSd6d4gfUuLLDewGHSgK8zHqnAkjSm2TiT X1C1XCAuzL9vA5T9Bu2V/5kbNz8z/Wbt4eFLdMukrPGjp+kES1IN7ubYYNglPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766153601; a=rsa-sha256; cv=none; b=HZawnkimV+oYxa4rPGVXkpsSd8GdMHqgAjctnY7RO8VQUpHFR51l+CBFkyhfOpx8gd6mxi +MinVB6aGm3w81vEp/7VNVMl/9HIaOO+U/zDTTq6aNfo91fnm0g7/j8Qllc8yHTUP0Qkgk IzywI+2fWrHs0NyKGECVe4uD4zjbIYr3+yeQFsWOM8CE33h1aUl3npiMPoCIEOSREjcAsT gazKLUi2KgnVMSpTGPztoK8oosR15Q8QpJVal8vysQ1NOk8QgyWPJ8DaKB4DCyAGElH2/V 1s2mzBAeR9M6vcTmgx9Ci1myMR6du+Z4APBrBI+MNs4Yfa6tZzblY7o2pHDumA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXqJK2mRHz1QNV for ; Fri, 19 Dec 2025 14:13:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ca96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 14:13:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: df6861d755c8 - main - ifconfig: Fix the -L flag when using netlink 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: df6861d755c8f72380ae7fb8df535b27eba8c0be Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 14:13:21 +0000 Message-Id: <69455d81.3ca96.63fd1fee@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df6861d755c8f72380ae7fb8df535b27eba8c0be commit df6861d755c8f72380ae7fb8df535b27eba8c0be Author: Mark Johnston AuthorDate: 2025-12-19 14:11:20 +0000 Commit: Mark Johnston CommitDate: 2025-12-19 14:11:20 +0000 ifconfig: Fix the -L flag when using netlink By default, when ifconfig shows a v6 address derived from a router-advertised prefix, it shows the initial preferred and valid lifetimes. When -L is specified, it is supposed to show the remaining lifetimes, but this was broken in the conversion to netlink. Fix that, and add a regression test which validates ifconfig output before and after a short-lived address expires. Reported by: Franco Fichtner Reviewed by: melifaro, allanjude, Seyed Pouria Mousavizadeh Tehrani Fixes: 4c91a5dfe483 ("ifconfig: make interface and address listing use Netlink as transport") MFC after: 2 weeks Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54294 --- sbin/ifconfig/af_inet6.c | 6 +++-- tests/sys/netinet6/ndp.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++ tests/sys/netinet6/ra.py | 11 ++++++++- 3 files changed, 76 insertions(+), 3 deletions(-) diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index 9386f5eaf513..365f01be9590 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -375,8 +375,10 @@ show_lifetime(struct ifa_cacheinfo *ci) vl = (ci->ifa_valid == ND6_INFINITE_LIFETIME) ? 0 : ci->ifa_valid; clock_gettime(CLOCK_MONOTONIC_FAST, &now); - print_lifetime("pltime", pl + now.tv_sec, &now); - print_lifetime("vltime", vl + now.tv_sec, &now); + print_lifetime("pltime", + pl + (ip6lifetime ? ci->tstamp / 1000 : now.tv_sec), &now); + print_lifetime("vltime", + vl + (ip6lifetime ? ci->tstamp / 1000 : now.tv_sec), &now); } static void diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh index 21a50cda02ba..3464ac59c898 100755 --- a/tests/sys/netinet6/ndp.sh +++ b/tests/sys/netinet6/ndp.sh @@ -226,10 +226,72 @@ ndp_prefix_len_mismatch_cleanup() { vnet_cleanup } +atf_test_case "ndp_prefix_lifetime" "cleanup" +ndp_prefix_lifetime_head() { + atf_set descr 'Test ndp slaac address lifetime handling' + atf_set require.user root + atf_set require.progs python3 scapy +} + +ndp_prefix_lifetime_body() { + local epair0 jname prefix + + vnet_init + + jname="v6t-ndp_prefix_lifetime" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname} ${epair0}a + + ndp_if_up ${epair0}a ${jname} + ndp_if_up ${epair0}b + atf_check jexec ${jname} ifconfig ${epair0}a inet6 accept_rtadv no_dad + + prefix="2001:db8:ffff:1000:" + + # Send an RA advertising a prefix. + atf_check -e ignore python3 $(atf_get_srcdir)/ra.py \ + --sendif ${epair0}b \ + --dst $(ndp_if_lladdr ${epair0}a ${jname}) \ + --src $(ndp_if_lladdr ${epair0}b) \ + --prefix "2001:db8:ffff:1000::" --prefixlen 64 \ + --validlifetime 10 --preferredlifetime 5 + + # Wait for a default router to appear. + while [ -z "$(jexec ${jname} ndp -r)" ]; do + sleep 0.1 + done + atf_check \ + -o match:"^default[[:space:]]+fe80:" \ + jexec ${jname} netstat -rn -6 + + atf_check \ + -o match:"inet6 ${prefix}.* prefixlen 64 autoconf pltime 5 vltime 10" \ + jexec ${jname} ifconfig ${epair0}a + + # Wait for the address to become deprecated. + sleep 6 + atf_check \ + -o match:"inet6 ${prefix}.* prefixlen 64 deprecated autoconf pltime 0 vltime [1-9]+" \ + jexec ${jname} ifconfig -L ${epair0}a + + # Wait for the address to expire. + sleep 6 + atf_check \ + -o not-match:"inet6 ${prefix}.*" \ + jexec ${jname} ifconfig ${epair0}a +} + +ndp_prefix_lifetime_cleanup() { + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "ndp_add_gu_success" atf_add_test_case "ndp_del_gu_success" atf_add_test_case "ndp_slaac_default_route" atf_add_test_case "ndp_prefix_len_mismatch" + atf_add_test_case "ndp_prefix_lifetime" } diff --git a/tests/sys/netinet6/ra.py b/tests/sys/netinet6/ra.py index a5016b3f6e9b..1b08c3e53c05 100644 --- a/tests/sys/netinet6/ra.py +++ b/tests/sys/netinet6/ra.py @@ -25,12 +25,21 @@ def main(): help='The prefix to be advertised') parser.add_argument('--prefixlen', nargs=1, required=True, type=int, help='The prefix length to be advertised') + parser.add_argument('--validlifetime', nargs=1, required=False, + type=int, default=4294967295, + help='The valid lifetime of the prefix') + parser.add_argument('--preferredlifetime', nargs=1, required=False, + type=int, default=4294967295, + help='The preferred lifetime of the prefix') args = parser.parse_args() pkt = sp.Ether() / \ sp.IPv6(src=args.src, dst=args.dst) / \ sp.ICMPv6ND_RA(chlim=64) / \ - sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, prefixlen=args.prefixlen) + sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, + prefixlen=args.prefixlen, + validlifetime=args.validlifetime, + preferredlifetime=args.preferredlifetime) sp.sendp(pkt, iface=args.sendif[0], verbose=False) sys.exit(0) From nobody Fri Dec 19 15:12:42 2025 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 4dXrcs049Rz6LrMf; Fri, 19 Dec 2025 15:12:45 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXrcr6Vtdz3Vrw; Fri, 19 Dec 2025 15:12:44 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766157164; 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=wT0OuKYatJ302J2IXrVtHCrWn68E/58eLDfz86ljWyw=; b=Qs+9NgYcnPII79zeda1vW9FOcr7aZ5Xxq/6VZ7NkuIOMwZHX0OpfsNIdSBuzSW8p9zIlGM O+N4ziS+sqJnC/F5RjIpSCJoiWo9M1CST+IY7iI8BPRKlzfQ9iMWybK5Nwcp3ERz82zq1f 8bXPcXcFUdAGODJjluYLn1+8OHdi1BlosFhqTj5LPxmQGU6fCIa37cHQkhCqpPK8LBflw4 /uoXLRo32cfLol8wZBkUupLfxWmtMS8tbCTI+66AaO66JyXSZY3Om4F4fdMfPEDX0yVTZz d7bTfGu3BX7MJ6hqCWsn4aGNlyByEKDnSXdq2bg9lMUhHGMAePVHjR/3Ct+xqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766157164; 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=wT0OuKYatJ302J2IXrVtHCrWn68E/58eLDfz86ljWyw=; b=Dw9k+seSWXWfLlPWe8gIZrJRLhLozMkIC1XFiMChMPBjZhQ07wILKCF4t1TceWPwgh6Ezv w+eWOsGvtXKiONZvdp6D7x8fVwbMwBWXtEI0Ss5KEG4XZ473aMOrrT/EsYEXoktUgnA1sF ePDHo30k5ufLBC1g4ttMrKpvf8Ws2N49ejJiwWeB2y5YDCXc0i4kM78KHTrVZVRbryeHgn bzPVg/EPR+ZZlW55KqIJwPeCXKWxYDTLOm/BztAIo3/aSYgxlNgZZwl9KPwiMtaGMTHbM6 vaktzXcF5jrglCTCmA9tlHbGFsVJ7UNPbihPVsTrkjkE0mNLbNceUqskLBug4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766157164; a=rsa-sha256; cv=none; b=G5HDsPI7xk9N/VV5K443ZiazJtLwhbLJvABt+N4PK+HzxhdRE1B1OORy/pSuH36e8/a12s v/ffV+MEcZqZrJFiPZtIT3RWSjvkzkID+akz9GhCF6a5e3E0EeeLnCSAq2oUnqjPtUU0cd ww4OlkXNqQvpRwZtFYUVxxBmajUXSVu3AXBp0iToDcgk/vWInw2z7lHGnyKuOZh7kODuMj qafepYLiRQqi/bs2INffuVeuNTfkWyadVKXIDTNbUhnLomqENh8Tg7JJk3SZygnunQ4m6N klQ8PawJGU8Qo3JpG8Bzg26cd/lRxYW2oY047HYfmLWpYjRdukt2c2fko/D+MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (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 4dXrcr4pDTzmmD; Fri, 19 Dec 2025 15:12:44 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Fri, 19 Dec 2025 10:12:42 -0500 From: Mark Johnston To: Konstantin Belousov Cc: Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Dec 11, 2025 at 05:39:33AM +0200, Konstantin Belousov wrote: > On Thu, Dec 11, 2025 at 02:07:22AM +0000, Gleb Smirnoff wrote: > > The branch main has been updated by glebius: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e967a2a03677f67d46b458d233a6e93c40d173c9 > > > > commit e967a2a03677f67d46b458d233a6e93c40d173c9 > > Author: Gleb Smirnoff > > AuthorDate: 2025-12-11 02:03:35 +0000 > > Commit: Gleb Smirnoff > > CommitDate: 2025-12-11 02:03:35 +0000 > > > > sockets: remove compat shim for divert(4) > > > > All known software in ports had been addressed three years ago and the > > shim stays in stable/14 and stable/15 for another couple years with its > > printf(), so all ourliers are expected to conform before 16.0-RELEASE. > > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. > So why breaking the binaries that users might have lingering around? Aside from that, with a PF_DIVERT socket sd it's not possible to call sd.recvfrom() in python (because python doesn't know which sockaddr subtype to use), whereas with a PF_INET divert socket it gives a sockaddr_in with an interface address, for inbound packets. So some applications cannot be quickly repaired. In fact, I'd find it useful to go the other way and add support for socket(PF_INET6, SOCK_RAW, IPPROTO_DIVERT). > Put this single if() under #ifdef COMPAT15, and perhaps remove the printf() > as well. > > > --- > > sys/kern/uipc_socket.c | 11 ----------- > > 1 file changed, 11 deletions(-) > > > > diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c > > index 9eba3ad2e082..8ed5dcc9336a 100644 > > --- a/sys/kern/uipc_socket.c > > +++ b/sys/kern/uipc_socket.c > > @@ -913,17 +913,6 @@ socreate(int dom, struct socket **aso, int type, int proto, > > struct socket *so; > > int error; > > > > - /* > > - * XXX: divert(4) historically abused PF_INET. Keep this compatibility > > - * shim until all applications have been updated. > > - */ > > - if (__predict_false(dom == PF_INET && type == SOCK_RAW && > > - proto == IPPROTO_DIVERT)) { > > - dom = PF_DIVERT; > > - printf("%s uses obsolete way to create divert(4) socket\n", > > - td->td_proc->p_comm); > > - } > > - > > prp = pffindproto(dom, type, proto); > > if (prp == NULL) { > > /* No support for domain. */ > From nobody Fri Dec 19 15:59:17 2025 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 4dXsfY3T7Dz6LwY5 for ; Fri, 19 Dec 2025 15:59: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXsfY2W0rz3hSF for ; Fri, 19 Dec 2025 15:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766159957; 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=DttRFfUuZnYsDQEHW2VXSHZBrarwjinpC4i9Mi9tsbs=; b=aI53/swbf14xsTV8d4uEEv4jvHvoctZFdTnMxTXXzG+TGwKkJut9h9kYL/WwclIbib5P9O Bpxa4mpJN6aOCq9NffMKf1/u7Yvq2lpJ2LmwFZzLF4xt5oiIubaB1S1BH8z85rjrUzL8H3 stwUt+5kWpT7gFi2G+aJzmnjYllk9yveQas4gTecAcN9SfBCJeGYkAilsc11Z3fFXg6yp7 ztzYO/DRWr145I2VCBGeJITpK+BiesUuEfStUeZaMmpbfnVpPg+Q6n+KhGe6y+0LYq2j55 Sgr1rfWOh4cysjJi+wXkSLTt0vn3t+Yw6UFuNBR1ShikEgYGrB7hmqLopKDwUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766159957; 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=DttRFfUuZnYsDQEHW2VXSHZBrarwjinpC4i9Mi9tsbs=; b=sowNJ/kLUPAEfLl/VybYMo11hLER3NKInFBWb8KIj5PIMWZ6FUqueRbucTzhvAyP6BXTn9 19f2Adi/Gb9r+cjojoa2vnQOera/hO2ekJ2OwMqah0ypbhW2s/6aH/xRDBmLttqkpfFvgx n4epIdG7A5aRaR/Una3GvNwlWOtyqbPlYfgPRUyds/KuL/tute/OtA4hu6OdqZ8mKui32K Nzv9vjvZzyXoXIlOShknuojhyjeqcTIO+rCJFuUQR7qF/Ptig/mQcUeUNlG30p9muzyZei HpV7a7Y5fw5XurVLqLhoFhps5cl6hPcTIUBU1qVHSaK5PIj0PKNzK8s7uHkG3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766159957; a=rsa-sha256; cv=none; b=ZpR9GVcR9OE7fSI9gRP0pmmhFV3w161fkgyNwM1CzMJXc/LzMy0/oQ0Mwno9khmiyJvEAG voHcqFBxv0KGK8GT1hkXaRBrKMsOHey70SdJIUQyAmovfIB3PkkmazhWiM0XrfOYRoDjAT X4b4vHDWJb+/UE8B2e825tn+Z3q4EI2o+KGpfcBtGwsNia2rrPKY8GjvEclFgVayIXlS3Z pqLovFJ6gGnNHc6nfVCL6vVGJzyOIcbqKgyePLQboC8alm78/VzPlPIHvE0Nu7l4X7pBGO GhtF4OdsRT7x2+OEOdWjDw/DTEFk/6GKuNlsMyjBVCJIO8ok2BhtfPIJyxSBaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXsfY1w9qzrC for ; Fri, 19 Dec 2025 15:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46694 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 15:59:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: a79e2278c58e - main - ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a79e2278c58e1c59e12fbf39b5b3bf36629bfc87 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 15:59:17 +0000 Message-Id: <69457655.46694.646dd290@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a79e2278c58e1c59e12fbf39b5b3bf36629bfc87 commit a79e2278c58e1c59e12fbf39b5b3bf36629bfc87 Author: Brooks Davis AuthorDate: 2025-12-19 15:59:08 +0000 Commit: Brooks Davis CommitDate: 2025-12-19 15:59:08 +0000 ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect These functions take the source or destintation address indirectly from a potentially missaligned buffer. Rename them to refect this and to free up the copy{in,out}ptr names. Some of the code in question is dead code and doesn't or won't compile, but I've changed it all for consistency. NB: If the pointers are actually stored under aligned then this code is broken with CHERI. Reviewed by: cy Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D54232 --- sbin/ipf/ipftest/ip_fil.c | 4 ++-- sbin/ipf/libipf/interror.c | 4 ++-- sys/netpfil/ipfilter/netinet/fil.c | 8 ++++---- sys/netpfil/ipfilter/netinet/ip_auth.c | 5 +++-- sys/netpfil/ipfilter/netinet/ip_fil.h | 5 +++-- sys/netpfil/ipfilter/netinet/ip_proxy.c | 4 ++-- sys/netpfil/ipfilter/netinet/ip_scan.c | 4 ++-- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/sbin/ipf/ipftest/ip_fil.c b/sbin/ipf/ipftest/ip_fil.c index 6df3bed8224e..72816a73327e 100644 --- a/sbin/ipf/ipftest/ip_fil.c +++ b/sbin/ipf/ipftest/ip_fil.c @@ -619,7 +619,7 @@ ipf_checkv6sum(fin) * See above for description, except that all addressing is in user space. */ int -copyoutptr(softc, src, dst, size) +ipf_copyout_indirect(softc, src, dst, size) void *src, *dst; size_t size; { @@ -635,7 +635,7 @@ copyoutptr(softc, src, dst, size) * See above for description, except that all addressing is in user space. */ int -copyinptr(src, dst, size) +ipf_copyin_indirect(src, dst, size) void *src, *dst; size_t size; { diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index a7e6f4a5e431..98f550b5e3ff 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -28,8 +28,8 @@ static ipf_error_entry_t *find_error(int); static ipf_error_entry_t ipf_errors[] = { { 1, "auth table locked/full" }, { 2, "" }, - { 3, "copyinptr received bad address" }, - { 4, "copyoutptr received bad address" }, + { 3, "ipf_copyin_indirect received bad address" }, + { 4, "ipf_copyout_indirect received bad address" }, { 5, "" }, { 6, "cannot load a rule with FR_T_BUILTIN flag set" }, { 7, "internal rule without FR_T_BUILDINT flag set" }, diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 242affeff000..f8b8ffec7bdd 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4051,7 +4051,7 @@ ipf_sync(ipf_main_softc_t *softc, void *ifp) * end up being unaligned) and on the kernel's local stack. */ /* ------------------------------------------------------------------------ */ -/* Function: copyinptr */ +/* Function: ipf_copyin_indirect */ /* Returns: int - 0 = success, else failure */ /* Parameters: src(I) - pointer to the source address */ /* dst(I) - destination address */ @@ -4062,7 +4062,7 @@ ipf_sync(ipf_main_softc_t *softc, void *ifp) /* NB: src - pointer to user space pointer, dst - kernel space pointer */ /* ------------------------------------------------------------------------ */ int -copyinptr(ipf_main_softc_t *softc, void *src, void *dst, size_t size) +ipf_copyin_indirect(ipf_main_softc_t *softc, void *src, void *dst, size_t size) { caddr_t ca; int error; @@ -4084,7 +4084,7 @@ copyinptr(ipf_main_softc_t *softc, void *src, void *dst, size_t size) /* ------------------------------------------------------------------------ */ -/* Function: copyoutptr */ +/* Function: ipf_copyout_indirect */ /* Returns: int - 0 = success, else failure */ /* Parameters: src(I) - pointer to the source address */ /* dst(I) - destination address */ @@ -4095,7 +4095,7 @@ copyinptr(ipf_main_softc_t *softc, void *src, void *dst, size_t size) /* NB: src - kernel space pointer, dst - pointer to user space pointer. */ /* ------------------------------------------------------------------------ */ int -copyoutptr(ipf_main_softc_t *softc, void *src, void *dst, size_t size) +ipf_copyout_indirect(ipf_main_softc_t *softc, void *src, void *dst, size_t size) { caddr_t ca; int error; diff --git a/sys/netpfil/ipfilter/netinet/ip_auth.c b/sys/netpfil/ipfilter/netinet/ip_auth.c index 13ae4d8ae54a..1611e7596623 100644 --- a/sys/netpfil/ipfilter/netinet/ip_auth.c +++ b/sys/netpfil/ipfilter/netinet/ip_auth.c @@ -1015,8 +1015,9 @@ ipf_auth_ioctlloop: for (t = auth.fra_buf; m && (len > 0); ) { i = MIN(M_LEN(m), len); - error = copyoutptr(softc, MTOD(m, char *), - &t, i); + error = ipf_copyout_indirect(softc, + MTOD(m, char *), + &t, i); len -= i; t += i; if (error != 0) { diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 24d4f9695322..81ad50373fe9 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1679,8 +1679,9 @@ extern char *getifname(struct ifnet *); extern int ipfattach(ipf_main_softc_t *); extern int ipfdetach(ipf_main_softc_t *); extern u_short ipf_cksum(u_short *, int); -extern int copyinptr(ipf_main_softc_t *, void *, void *, size_t); -extern int copyoutptr(ipf_main_softc_t *, void *, void *, size_t); +extern int ipf_copyin_indirect(ipf_main_softc_t *, void *, void *, size_t); +extern int ipf_copyout_indirect(ipf_main_softc_t *, void *, void *, + size_t); extern int ipf_fastroute(mb_t *, mb_t **, fr_info_t *, frdest_t *); extern int ipf_inject(fr_info_t *, mb_t *); extern int ipf_inobj(ipf_main_softc_t *, void *, ipfobj_t *, diff --git a/sys/netpfil/ipfilter/netinet/ip_proxy.c b/sys/netpfil/ipfilter/netinet/ip_proxy.c index 9fb6dbd2a9e1..c084b97c23d9 100644 --- a/sys/netpfil/ipfilter/netinet/ip_proxy.c +++ b/sys/netpfil/ipfilter/netinet/ip_proxy.c @@ -700,8 +700,8 @@ ipf_proxy_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, IPFERROR(80003); error = ENOMEM; } else { - error = copyinptr(softc, ctl.apc_data, ptr, - ctl.apc_dsize); + error = ipf_copyin_indirect(softc, ctl.apc_data, + ptr, ctl.apc_dsize); if (error == 0) ctl.apc_data = ptr; } diff --git a/sys/netpfil/ipfilter/netinet/ip_scan.c b/sys/netpfil/ipfilter/netinet/ip_scan.c index 744824bdb325..89d2fca855a3 100644 --- a/sys/netpfil/ipfilter/netinet/ip_scan.c +++ b/sys/netpfil/ipfilter/netinet/ip_scan.c @@ -106,7 +106,7 @@ ipf_scan_add(caddr_t data) return (ENOMEM); } - err = copyinptr(data, isc, sizeof(*isc)); + err = ipf_copyin_indirect(data, isc, sizeof(*isc)); if (err) { KFREE(isc); return (err); @@ -150,7 +150,7 @@ ipf_scan_remove(caddr_t data) ipscan_t isc, *i; int err; - err = copyinptr(data, &isc, sizeof(isc)); + err = ipf_copyin_indirect(data, &isc, sizeof(isc)); if (err) return (err); From nobody Fri Dec 19 16:30:29 2025 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 4dXtLZ4QHgz6M0d1 for ; Fri, 19 Dec 2025 16:30: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXtLZ0Wd1z3mj9 for ; Fri, 19 Dec 2025 16:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766161830; 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=acGXId49pxziRz/ZKAjc/MwhV6Jfvo7cCAz7CqqVLBw=; b=tnzOiF9McbLPKgqwpG6lPX+ITyKuupQ1t2PZAK16SHE8vAdqU3bbm0vIfjUPhIfqZNZlfC UtrLD7zxh2DW6fEuSUYj6j/PSTZDgMdweEmJGELU/MBYcZb+0LmEIAoIudDNfxen9y/YRJ KAqc2rt5cDU3KdK53NNJajqopwf0F4/rmgJa6lzi8Rc7hVplR+fUxrj2TYN7jciw9gxZhS W2Ra0C2fVEXQ8kFmJ4jzhB9l4qSmCG6aoyEnjV0Kk0vC6IumxzEbtj7fIqH+V6jVCEUWwK 2dZo2nSXvpopmYVLWXFEcnCQTMeIuWzaT4lI4rbWnTS2WLqoeWQ/1C3lcHpoFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766161830; 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=acGXId49pxziRz/ZKAjc/MwhV6Jfvo7cCAz7CqqVLBw=; b=gI//VBjOUiCV6+uHWKGoNHntKRy8DirNoef1bXDUEAOK6pcyer5WUa1IaeM3Ere70fS7zx A14xO6pG/BWqyqjxFVELrFGalEQ6PaNZj6yv8kcXCrwbggx+BC9bmFm05/aMJyYKieNf4r oJTkVetjZ2d82y7pxdCRPt5epuyFzRZXiPnSA2aGVyjxfg8EL0fq/jyGlH4tKQM2lLSxa+ r7wxgp6uOAJLg4hHOeee8Z4b55li0cDvpPcq6s5P+kbLcJgwGQ5QAYrYQpEsATdWc6dfAz R8e9um6ftj9yAmDatJtMYAGU+YbZNZOV4B11VsEBCUXnjjf1VIQwob+08dKtCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766161830; a=rsa-sha256; cv=none; b=mtg1h2ljEPoOpH9RvVu5pWmtyrOTGRkT0p3qjscD7ZBYvh4RhOZuEqdk3MV3VlRnk/Ftf4 fPEGTj0y1xfYgRWGHFPX7MXmaQqeOKePO9QwdQIn6qQnxPBT3vpFmIjE1qKZ6PH3U6jlSs IHpcGF4W8GelX3ZiziqjQUve5rMKevHGwJnTu2a2aXT11ASbP3aFsaThBCG/zTFco/b7m+ el4jkOrOfIwwheaW52W8/uQphUgjNEL4eCJryjmbVydRwNUaBaXfAzLwEWrFYFrvEhSmFI IrP62wyTwRc2PIQdPDdZlfm/pnPZ4UXLcbkn6Jri6VJ2yp4+MNVCtWmHAG+iyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXtLY6t7ZzpL for ; Fri, 19 Dec 2025 16:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id aadf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 16:30:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: d2cb9cab8457 - main - printf.9: Support more than 32 bits in %b 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: d2cb9cab8457b2a84898f0ac86f7b45e907f872c Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 16:30:29 +0000 Message-Id: <69457da5.aadf.1e1de424@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d2cb9cab8457b2a84898f0ac86f7b45e907f872c commit d2cb9cab8457b2a84898f0ac86f7b45e907f872c Author: Michael Tuexen AuthorDate: 2025-12-19 16:26:37 +0000 Commit: Michael Tuexen CommitDate: 2025-12-19 16:26:37 +0000 printf.9: Support more than 32 bits in %b This will be usable after clang has been extended to accept length modifiers for %b when compiling kernel code. But we need FreeBSD to support it first... Reviewed by: markj, Timo Völker MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54286 --- share/man/man9/printf.9 | 25 ++++++++++++++++++------- sys/kern/subr_prf.c | 40 +++++++++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/share/man/man9/printf.9 b/share/man/man9/printf.9 index 8006590b3d2a..5c819acbec09 100644 --- a/share/man/man9/printf.9 +++ b/share/man/man9/printf.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 18, 2025 +.Dd December 19, 2025 .Dt PRINTF 9 .Os .Sh NAME @@ -95,14 +95,15 @@ arguments. The base value is the output base (radix) expressed as an octal value; for example, \e10 gives octal and \e20 gives hexadecimal. The arguments are made up of a sequence of bit identifiers. -Each bit identifier begins with an -.Em octal -value which is the number of the bit (starting from 1) this identifier -describes. +Each bit identifier begins with a character specifying the number of the bit +(starting from 1) this identifier describes. +The characters from \e01 to \e40 can be used to specify bit numbers in the +range from 1 to 32 and characters from \e200 to \e377 to specify bit numbers +in the range from 1 to 128. The rest of the identifier is a string of characters containing the name of the bit. -The string is terminated by either the bit number at the start of the next -bit identifier or +The identifier is terminated by either the bit number at the start of the next +bit identifier or by .Dv NUL for the last bit identifier. .Pp @@ -173,6 +174,16 @@ reg=3 out: 41:41:5a:5a .Ed .Pp +The same output will be generated by the following function: +.Bd -literal -offset indent +void +printf_test(void) +{ + printf("reg=%b\en", 3, "\e10\e201BITTWO\e200BITONE"); + printf("out: %4D\en", "AAZZ", ":"); +} +.Ed +.Pp The call .Bd -literal -offset indent log(LOG_DEBUG, "%s%d: been there.\en", sc->sc_name, sc->sc_unit); diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index e2070ae3f865..bbf81b7a4ffe 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -628,6 +628,18 @@ ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper) return (p); } +static inline bool +isbitpos(char c) +{ + return (c != '\0' && (c <= ' ' || (c & 0x80) != 0)); +} + +static inline bool +isprintnospace(char c) +{ + return (isprint(c) && c != ' '); +} + /* * Scaled down version of printf(3). * @@ -640,9 +652,12 @@ ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper) * * where is the output base expressed as a control character, e.g. * \10 gives octal; \20 gives hex. Each arg is a sequence of characters, - * the first of which gives the bit number to be inspected (origin 1), and - * the next characters (up to a control character, i.e. a character <= 32), - * give the name of the register. Thus: + * the first of which gives the bit number to be inspected and the next + * characters (up to the bit number of the next argument or a final NUL + * character), give the name of the register. + * The bit number can be encoded as a character between 1 and 32 or as a + * character between 128 and 255. + * Thus: * * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE"); * @@ -650,6 +665,10 @@ ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper) * * reg=3 * + * The same output would be generated by using: + * + * kvprintf("reg=%b\n", 3, "\10\201BITTWO\200BITONE"); + * * XXX: %D -- Hexdump, takes pointer and separator string: * ("%6D", ptr, ":") -> XX:XX:XX:XX:XX:XX * ("%*D", len, ptr, " " -> XX XX XX XX ... @@ -950,15 +969,18 @@ number: if (bconv && num != 0) { /* %b conversion flag format. */ tmp = retval; - while (*q) { - n = *q++; - if (num & (1 << (n - 1))) { + while (isbitpos(*q)) { + if ((*q & 0x80) != 0) + n = *q++ & 0x7f; + else + n = *q++ - 1; + if (num & (1ULL << n)) { PCHAR(retval != tmp ? ',' : '<'); - for (; (n = *q) > ' '; ++q) - PCHAR(n); + for (; isprintnospace(*q); ++q) + PCHAR(*q); } else - for (; *q > ' '; ++q) + for (; isprintnospace(*q); ++q) continue; } if (retval != tmp) { From nobody Fri Dec 19 16:41:51 2025 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 4dXtbg31fsz6M1kS for ; Fri, 19 Dec 2025 16:41: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXtbg28Qsz3p45 for ; Fri, 19 Dec 2025 16:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766162511; 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=4uEVGyQVjyWEteFa/Bz7CMSl8QIGRfxjHEJ5oVXMt8I=; b=J9pNTJ+xI6EAmbGfoFmXCYmlX4LXRfxatiwcMvrK9CAwEwLb7d+lQqpyJKuTiiKKOWYo0q VeWiGFCegEHhL2qdNgw2RTX9hfx/NVgnvKQr2qB+wh4+bGCbxJ95XFMlk1bfZzxf+WcDDv wnGkhQNxEnQrAHilKYCwx0P5/7roEIp4ecOicpraJ1bD+sOKdgtEu0vGijS/42phTCJ0y+ +AfjTmEp7YitxdEpPLDCKdL4MGWZERzEOoos7uILXvR1aU8SdqR199Ql5sqf34Nv8nOmXd a+EEIY+pmz3HSMTWKB9nt2lsndNnGaS32FHYtM1EJZk2Yx8imIFsiikATSHGHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766162511; 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=4uEVGyQVjyWEteFa/Bz7CMSl8QIGRfxjHEJ5oVXMt8I=; b=k7NBQXKwbPloIg5YQYLWy1CulpUhksi8GsHjX2Q/OZr5XPpCapx6TCsO7NAu6CxiDFO2ja Zg5zMTKJLNoUZGPx+j7oFqMqrPr1jB0FOIpCZepq4rO+TfTU/41wzE4jygMgJetooE9rY/ /JiWGR1ng6Nzm+OrQXkOTXrzuLP6EghgZthXH4DJlWnJUqY52syCHuMP0lva0qg9y23GMK hF8lTegAZ69SaAOtLfocE7GNiDBLgSN5ZVugfiApKdOCwMLiiXA8+TODCCTho0MXxDv9iC ZpNej9AM64uTOe6e7+tp/2rI44inbw0D1/7FHX4L1a3Ggk/oY2uiPzuxRRA0Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766162511; a=rsa-sha256; cv=none; b=cSufFwgshEX2u0Q/ex2IdGCTBFlLKomMuV+fEmVwUXt6IrG+93XGEDAnG8im21sRz+wn36 JPf61brJHDf2FZsoZAq2rdsfQq4Z6euGUXmBAmi4DFrH1r7K0B5Nz7yskrHda+zAbktYEO AVTi9OGShhonq5oMjYuY+ICVFdeEs4jvSxRT9PNAE6gSknmJbvc/PS1UeliCRH7sqGvW8C JBOedIffMjFjMlKaZxMVy6lj9Jpncj0oSRAOTsmZw2M9Bvq3GLuTD7fqcCMKrik4ett5EG 6zgvOvThbAKK/8+3c08AgLagS0OzvrEmwGvXTYdnXQp+p7c5cP4BCEPMkfUTJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXtbg1dlmz1f4 for ; Fri, 19 Dec 2025 16:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b4dd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 16:41:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 634d9c0d111b - main - vtnet: expose features via sysctl tree 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: 634d9c0d111b630c3d63a1cf25d15c32a37afab8 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 16:41:51 +0000 Message-Id: <6945804f.b4dd.7d2d2c49@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=634d9c0d111b630c3d63a1cf25d15c32a37afab8 commit 634d9c0d111b630c3d63a1cf25d15c32a37afab8 Author: Michael Tuexen AuthorDate: 2025-12-19 16:38:35 +0000 Commit: Michael Tuexen CommitDate: 2025-12-19 16:38:35 +0000 vtnet: expose features via sysctl tree Right now the 64-bit flags field needs to be casted to a 32-bit field, because clang warns if more than 32-bits are used. Once clang is fixed, this restriction will be removed and more bits will be added. Reviewed by: markj, Timo Völker MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54288 --- share/man/man4/vtnet.4 | 4 +++- sys/dev/virtio/network/if_vtnet.c | 18 ++++++++++++++++++ sys/dev/virtio/network/virtio_net.h | 8 ++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 4ef8693305cf..926f504d8070 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 18, 2025 +.Dd December 19, 2025 .Dt VTNET 4 .Os .Sh NAME @@ -274,6 +274,8 @@ The maximum number of supported virtqueue pairs. .It Va dev.vtnet. Ns Ar X Ns Va .flags The flags of the interface. Mostly for debugging purposes. +.It Va dev.vtnet. Ns Ar X Ns Va .features +The features of the interface as defined by the virtio specification. .El .Sh SEE ALSO .Xr arp 4 , diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 58cef9b34449..73f34808e008 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -4399,6 +4399,21 @@ vtnet_setup_stat_sysctl(struct sysctl_ctx_list *ctx, "Times the transmit interrupt task rescheduled itself"); } +static int +vtnet_sysctl_features(SYSCTL_HANDLER_ARGS) +{ + struct sbuf sb; + struct vtnet_softc *sc = (struct vtnet_softc *)arg1; + int error; + + sbuf_new_for_sysctl(&sb, NULL, 0, req); + sbuf_printf(&sb, "%b", (uint32_t)sc->vtnet_features, + VIRTIO_NET_FEATURE_BITS); + error = sbuf_finish(&sb); + sbuf_delete(&sb); + return (error); +} + static int vtnet_sysctl_flags(SYSCTL_HANDLER_ARGS) { @@ -4437,6 +4452,9 @@ vtnet_setup_sysctl(struct vtnet_softc *sc) SYSCTL_ADD_INT(ctx, child, OID_AUTO, "act_vq_pairs", CTLFLAG_RD, &sc->vtnet_act_vq_pairs, 0, "Number of active virtqueue pairs"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "features", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + vtnet_sysctl_features, "A", "Features"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "flags", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, vtnet_sysctl_flags, "A", "Flags"); diff --git a/sys/dev/virtio/network/virtio_net.h b/sys/dev/virtio/network/virtio_net.h index e61a4a993052..f4256664fba8 100644 --- a/sys/dev/virtio/network/virtio_net.h +++ b/sys/dev/virtio/network/virtio_net.h @@ -57,6 +57,14 @@ #define VIRTIO_NET_F_CTRL_MAC_ADDR (1ULL << 23) /* Set MAC address */ #define VIRTIO_NET_F_SPEED_DUPLEX (1ULL << 63) /* Device set linkspeed and duplex */ +/* virtio net feature flag descriptions for use with printf(9) %b identifier. */ +#define VIRTIO_NET_FEATURE_BITS \ + "\20\200CSUM\201GUEST_CSUM\202CTRL_GUEST_OFFLOADS\203MTU\205MAC\206GSO" \ + "\207GUEST_TSO4\210GUEST_TSO6\211GUEST_ECN\212GUEST_UFO\213HOST_TSO4" \ + "\214HOST_TSO6\215HOST_ECN\216HOST_UFO\217MRG_RXBUF\220STATUS\221CTRL_VQ" \ + "\222CTRL_RX\223CTRL_VLAN\224CTRL_RX_EXTRA\225GUEST_ANNOUNCE\226MQ" \ + "\227CTRL_MAC_ADDR\277SPEED_DUPLEX" + #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ From nobody Fri Dec 19 16:45:54 2025 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 4dXthR3D5Kz6M1h5 for ; Fri, 19 Dec 2025 16:45: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXthL2PQMz3pfZ for ; Fri, 19 Dec 2025 16:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766162754; 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=cK6Y8eyzvXWI4/Q2JmcZYRwzCZ5SbH+8K7YQbYnkiHM=; b=cTuPDcHm9ZdvzI+XwGoEfhy6mvUZ2WgR0+I2oEQUeOVbWpCn+VZXWcyuq4/Zf7lcxUbSS7 ut9z1iVunXfvby9Xa6WcSa02frTNIS8dyc1lFX6+HcP2E2nQa7tmfEUjaD/xkgHWSPuuyS cMhbsQeXUHlTHOGo8AP3r7sI565OmKOggVBzOO52OBKMKwnZaCvXpJZgmW6XJpXsszsZ2M W48xHzWH+pEiSG3AFUcai2puudtdWGAfGFyi6qv5q5dx+4iSCIITJ6gFmVzWnFSBMxpkRh q9PdsBi2ro8XoGedWof7XdhexFHzvClnFGD8iUzz/eX3Cr6suxiaFSbI3tdPhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766162754; 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=cK6Y8eyzvXWI4/Q2JmcZYRwzCZ5SbH+8K7YQbYnkiHM=; b=IELUqAa+Xxk2C/5Ej2os+zwNVLE8hUflTzz3iU2/bZaZCGXN3kf8avqakqogXx4crdZOzV I74MiIzklBHyYA+YAksdT9RjdHERHxg5ANvRF5OXB+dzUF+lbwIcRKdM5a74WlRYqyhRST hA4xlSyI+Qp8foId+ENOriDszqGY1Z1E9DaHbOUS1nZmqYBCB+BBGD+tO+u0hFYxCW3NMC Eqt1RoQE9QiYpdd1ZMVRXK9o/FxNY5CuDveP9OKu6r/tLZPqIWtrFobHtNZUfP1ydJ4AMf XUtGEiEE82H8kiNbzf54T+UNj/G+1nIIt3yzsDQLYzbN926pO/26jT/KTl/1Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766162754; a=rsa-sha256; cv=none; b=vPmosmCqivQzUBCGZNcn3AtwGvrMhSgx/ZpcX+BH2GHj+TrzxWxAnx02JlhX3Ds7H0xIdC kV6WDAlu2aZpVi9NTWMjfW86OFIoBNZ5C1uWp/lHZnndc/4XuWr5Me+7YzQVJSoQuRHWxT fkKJcok5JNJzKra9Ph9aemm7rcUlcm0Y+xZkFLXDieFotMVu792+U6c8ci8lGXfm1XxipW HiEPxLUjC3f0uAdH5Mpb6LMrDb6hLHuk2wiyw7NixuFLk3ZujWOcv3NBH0r+JaP9ZMkrlf GZ4XLo6+g23DL7JKIRv0ogqQM7l41i+liZvq+ZXPxtBKfp1s7kf2q9thNCYwbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXthL203Lz1vd for ; Fri, 19 Dec 2025 16:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b199 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 16:45:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 8da838ac3169 - main - vtnet: improve consistency 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: 8da838ac31692e381adfc63d83ea49f2adabbf23 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 16:45:54 +0000 Message-Id: <69458142.b199.511f6f8b@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8da838ac31692e381adfc63d83ea49f2adabbf23 commit 8da838ac31692e381adfc63d83ea49f2adabbf23 Author: Michael Tuexen AuthorDate: 2025-12-19 16:44:20 +0000 Commit: Michael Tuexen CommitDate: 2025-12-19 16:44:20 +0000 vtnet: improve consistency Use sbuf_new_for_sysctl() instead of sbuf_new_auto() when exposing the flags via sysctl. MFC after: 1 week --- sys/dev/virtio/network/if_vtnet.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 73f34808e008..19775416f8d4 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -4417,16 +4417,14 @@ vtnet_sysctl_features(SYSCTL_HANDLER_ARGS) static int vtnet_sysctl_flags(SYSCTL_HANDLER_ARGS) { - struct vtnet_softc *sc; - struct sbuf *sb; + struct sbuf sb; + struct vtnet_softc *sc = (struct vtnet_softc *)arg1; int error; - sb = sbuf_new_auto(); - sc = (struct vtnet_softc *)arg1; - sbuf_printf(sb, "%b", sc->vtnet_flags, VTNET_FLAGS_BITS); - sbuf_finish(sb); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); - sbuf_delete(sb); + sbuf_new_for_sysctl(&sb, NULL, 0, req); + sbuf_printf(&sb, "%b", sc->vtnet_flags, VTNET_FLAGS_BITS); + error = sbuf_finish(&sb); + sbuf_delete(&sb); return (error); } From nobody Fri Dec 19 17:00:27 2025 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 4dXv175Lp4z6M39Y for ; Fri, 19 Dec 2025 17:00: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXv172rnjz3rrn for ; Fri, 19 Dec 2025 17:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766163627; 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=5oFpleyeKwMlbONtREcF0tfUeax+9wLdhCkS6UarY5Y=; b=BGh8dIZUAISCiD+RaU/AtXO9qO5JIi4zLTKx+GIL/u4QyRg0rWtD+wP7It0crWxD4BRqNw Tur1aRLnQTO0P4xnCJB0qeGsPlx/U9lVDjBFFwFbCfXRjh3XSwA1aviZFD6LnwxKpqLAd+ hI/ePwRrG2IBo8G8Y5JU9NELDj8LVXLwUBsgtmsF+5uAt/3YVX4/HPOU3YrsVJFSGO0WRJ hQxBso7BU0uFtzzplblgXMMvCVIZmbbD4OZXn/ibG0r+Y3xDuF4dtQ2KkWbbCnvam8iLjz hgL5+4RIvhHyMM8AA3V+YDFg/WgmGPRAEAnjS9Je626s8meN0ke5ZwvGUCER9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766163627; 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=5oFpleyeKwMlbONtREcF0tfUeax+9wLdhCkS6UarY5Y=; b=KA8cK/QGQrP73xy4WzrSgyOv93/J7I9nn3lF/dLOJJW9wcErEXoWx0U06ey9/38vFV44vt Y0fVqUDMnLwzJoRr4bsNtR8yUEGuTOVR/Lyzcaytxe3DSoLdRocgVZWYe3sgbqHo7uOWmC 3iVPBfG2vtmxhbaBJWmIVGplYCFTzE7mfB1U2JreICU5QV4yE7/Pw+kAYJzfBEa9jN1dFl CpgMO9S4OUU5DflroOascj5Gn+8XV8Xqs1Uef48cEYRXXV5Vh+MJNXZ4Lp3KTFC35h+/fY Ok2Xl00US8M5bsc6SX64NTZl/uIYhzDRFkVBgaVD64Pjit1tiUn0jH16CxbpLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766163627; a=rsa-sha256; cv=none; b=UDvp6XtIDTiq3MIPZ9e5O5xXvpmgdzcionyzNwsqizinXzswlnwyBAWyicm+ycbAFu/ceQ V5ESiAhNtejIyCOU3duoXh66admfyEHWMEzTsaHx/Q1sPp9GkSK3YAfNI+Fkj//gKAjxWk sx21P8A/l8HC5cPzfyrTUtgbyYtWZaPzMYcnX4l/cnsOIeMYTbhtUbYKOgvfzLJu8nJ89r Xq5xiSMcLh+sFwI0UZh22vidim8M1Xju/mTvW0Ofj84Udvliroef6OpDoauEPFbFgBoVdN Rp7T2fy1upViukI5NhefqNocjViZlq4jcO03yNooCWB7bJlG7LoerRoOR6AGpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXv171wKMz1hg for ; Fri, 19 Dec 2025 17:00:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d516 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 17:00:27 +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: c8b3b605ae85 - main - tcp: fix checksum calculation bug 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: c8b3b605ae854ead6c8804e0400d80cb8fa73fdf Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 17:00:27 +0000 Message-Id: <694584ab.d516.79ef3b93@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c8b3b605ae854ead6c8804e0400d80cb8fa73fdf commit c8b3b605ae854ead6c8804e0400d80cb8fa73fdf Author: Timo Völker AuthorDate: 2025-12-19 16:50:20 +0000 Commit: Michael Tuexen CommitDate: 2025-12-19 16:50:20 +0000 tcp: fix checksum calculation bug The new function in_delayed_cksum_o() was introduced to compute the checksum in the case the mbuf chain does not start with the IP header. The offset of the IP header is specified by the parameter iph_offset. If iph_offset was positive, the function computed an incorrect checksum. Reviewed by: sobomax, tuexen Fixes: 5feb38e37847 ("netinet: provide "at offset" variant of the in_delayed_cksum() API") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54269 --- sys/netinet/ip_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index a6b29c6a7612..f1aa3c498ef7 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1066,8 +1066,8 @@ in_delayed_cksum_o(struct mbuf *m, uint16_t iph_offset) if (csum == 0) csum = 0xffff; } else { - cklen = ntohs(ip->ip_len); - csum = in_cksum_skip(m, cklen, offset); + cklen = ntohs(ip->ip_len) - (ip->ip_hl << 2); + csum = in_cksum_skip(m, cklen + offset, offset); } offset += m->m_pkthdr.csum_data; /* checksum offset */ From nobody Fri Dec 19 17:16:20 2025 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 4dXvMS6WTnz6M4Rt for ; Fri, 19 Dec 2025 17:16: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXvMS5pgTz3vCK for ; Fri, 19 Dec 2025 17:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766164580; 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=LxKgp5h/H4QnvCIMNhlNe1GKLbLE7Z0pvie1Lh8WN0g=; b=bOlHYKwIgQfAaZ13c6HTnu4AH7qqiCnPxcUDfx82JjgOzfNuYCRQc/FYKtjPONSa63qJX2 GZ6JlDhHoFo4jrKXM17GzDujN00JciIoNQzICp0Y32V87+fA27R+6ZJxsVzqrolBV/ru7b DUnsdmSdB6FfKmSqPSC00LsoUDj1YOWm3YGWN4J38v0xEkdRrx/PcN3mWBMuE3JBVbKPKA leUxxIjnD2L9FJStngsKYC07d8r0gGSswh4A6EXCZeQvqJgRKJtBmq5EzbUJuzzJ86GX4w RBlFJYmxRyC6A2wTXh2Zt29sKwfGz7gAljosex7pvnnZcD2yJxP6bCMEsUbAXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766164580; 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=LxKgp5h/H4QnvCIMNhlNe1GKLbLE7Z0pvie1Lh8WN0g=; b=qycURGIuvRwCK0Yeqau+yHKwg5CyVOko3dcFOJ6fC3cPUPUSCdm7jSxeDcQK8xut7EZni3 OcPrhSh2WxVRoezwq/32wplAYjhFErcnLKdzYilNN6gBj/0lQElZxfieEA2qyrrBfA1rHw HE8nOPXgX/MNpdZEPzoA/9q7WZl0hKhAQrnwv7+eKOC+JTi3K6e41eIs70oasutRUHYeO8 cDFGVSe7BlRq9FcHJHfV3+uveoKfIkJwYNJi9u0OxOSAlMFZo2x97wAWwKtKchSPs7VjMc 03eO57Va2DoYqWss4uGpymQCgR2wEg0UAD+UFZllXebzBCFPpdynXSQ0DmMogA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766164580; a=rsa-sha256; cv=none; b=pAOugaBq0ycpV9ZkjbLboY4h/ey5HH3IXtUU1X7KoC8avvYsm6H+kglr6Wq0bTbo0LUrux t/j7k1gSD8NL9Qlkg54h+oCQ/1p0/yNov7skuybnberXzJFb2e3KWx5oifqpwqYRKmIpTL a0EBN9Q8kZS22jskPxLE2qBQq+YmQIq5NMiqu4suEaMXpy4RtK8JG98YCsLEgy7jzWf8q8 4nMWr5f60JkYf7mTjNq6EaWTKtBkjtYcbOv7l+OO+wpBm70R2J7kNJKYwCcn8X35EpgfDr CUqHNWHJS00CMKnLlvDGXUMnIqNPMyw7SAuhRvhIGsuhtxJALJ8pUCQdFjv1oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXvMS56Dnz2K7 for ; Fri, 19 Dec 2025 17:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d4d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 17:16:20 +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: 4100bd6caa66 - main - usr.bin: Remove intrinsic utilities 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: 4100bd6caa66434bc901ca48d7364bc2b5fe2cfd Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 17:16:20 +0000 Message-Id: <69458864.d4d4.19320f65@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4100bd6caa66434bc901ca48d7364bc2b5fe2cfd commit 4100bd6caa66434bc901ca48d7364bc2b5fe2cfd Author: Dag-Erling Smørgrav AuthorDate: 2025-12-19 17:13:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-19 17:15:40 +0000 usr.bin: Remove intrinsic utilities These utilities can only function correctly if implemented as shell builtins and exist only because POSIX previously required them. As of POSIX 2024, they have all been reclassified as intrinsic utilities and are no longer required to exist in PATH. We can therefore retire them. Cf. XBD 1.7, XRAT C.1.8, Austin Group bug 854. Note that kill(1) is also considered an intrinsic utility (because only the shell can interpret job IDs correctly), but we have a working standalone implementation, which we will keep. PR: 291686 Relnotes: yes Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D54239 --- ObsoleteFiles.inc | 17 +++++++++++++++ share/man/man1/builtin.1 | 38 ++++++++++++++------------------- targets/pseudo/userland/Makefile.depend | 1 - usr.bin/Makefile | 3 +-- usr.bin/alias/Makefile | 19 ----------------- usr.bin/alias/Makefile.depend | 10 --------- usr.bin/alias/generic.sh | 3 --- 7 files changed, 34 insertions(+), 57 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1e7271c39385..5034f84e1295 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,23 @@ # xargs -n1 | sort | uniq -d; # done +# 20251215: Remove intrinsic utilities +OLD_FILES+=usr/bin/alias +OLD_FILES+=usr/bin/bg +OLD_FILES+=usr/bin/cd +OLD_FILES+=usr/bin/command +OLD_FILES+=usr/bin/fc +OLD_FILES+=usr/bin/fg +OLD_FILES+=usr/bin/getopts +OLD_FILES+=usr/bin/hash +OLD_FILES+=usr/bin/jobs +OLD_FILES+=usr/bin/read +OLD_FILES+=usr/bin/type +OLD_FILES+=usr/bin/ulimit +OLD_FILES+=usr/bin/umask +OLD_FILES+=usr/bin/unalias +OLD_FILES+=usr/bin/wait + # 20251208: Rename iwm8000C to correct name. OLD_FILES+=boot/firmware/iwm8000C diff --git a/share/man/man1/builtin.1 b/share/man/man1/builtin.1 index ee89006caea5..2fb9859ca545 100644 --- a/share/man/man1/builtin.1 +++ b/share/man/man1/builtin.1 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 29, 2025 +.Dd December 16, 2025 .Dt BUILTIN 1 .Os .Sh NAME @@ -61,9 +61,9 @@ and the standard shells that provide them. .It Ic \&[ Ta Yes Ta \&No Ta Yes .It Ic { Ta \&No Ta \&No Ta Yes .It Ic } Ta \&No Ta \&No Ta Yes -.It Ic alias Ta No* Ta Yes Ta Yes +.It Ic alias Ta \&No Ta Yes Ta Yes .It Ic alloc Ta \&No Ta Yes Ta \&No -.It Ic bg Ta No* Ta Yes Ta Yes +.It Ic bg Ta \&No Ta Yes Ta Yes .It Ic bind Ta \&No Ta \&No Ta Yes .It Ic bindkey Ta \&No Ta Yes Ta \&No .It Ic break Ta \&No Ta Yes Ta Yes @@ -71,9 +71,9 @@ and the standard shells that provide them. .It Ic builtin Ta \&No Ta \&No Ta Yes .It Ic builtins Ta \&No Ta Yes Ta \&No .It Ic case Ta \&No Ta Yes Ta Yes -.It Ic cd Ta No* Ta Yes Ta Yes +.It Ic cd Ta \&No Ta Yes Ta Yes .It Ic chdir Ta \&No Ta Yes Ta Yes -.It Ic command Ta No* Ta \&No Ta Yes +.It Ic command Ta \&No Ta \&No Ta Yes .It Ic complete Ta \&No Ta Yes Ta \&No .It Ic continue Ta \&No Ta Yes Ta Yes .It Ic default Ta \&No Ta Yes Ta \&No @@ -93,22 +93,22 @@ and the standard shells that provide them. .It Ic exit Ta \&No Ta Yes Ta Yes .It Ic export Ta \&No Ta \&No Ta Yes .It Ic false Ta Yes Ta \&No Ta Yes -.It Ic fc Ta No* Ta \&No Ta Yes -.It Ic fg Ta No* Ta Yes Ta Yes +.It Ic fc Ta \&No Ta \&No Ta Yes +.It Ic fg Ta \&No Ta Yes Ta Yes .It Ic filetest Ta \&No Ta Yes Ta \&No .It Ic fi Ta \&No Ta \&No Ta Yes .It Ic for Ta \&No Ta \&No Ta Yes .It Ic foreach Ta \&No Ta Yes Ta \&No -.It Ic getopts Ta No* Ta \&No Ta Yes +.It Ic getopts Ta \&No Ta \&No Ta Yes .It Ic glob Ta \&No Ta Yes Ta \&No .It Ic goto Ta \&No Ta Yes Ta \&No -.It Ic hash Ta No* Ta \&No Ta Yes +.It Ic hash Ta \&No Ta \&No Ta Yes .It Ic hashstat Ta \&No Ta Yes Ta \&No .It Ic history Ta \&No Ta Yes Ta \&No .It Ic hup Ta \&No Ta Yes Ta \&No .It Ic if Ta \&No Ta Yes Ta Yes .It Ic jobid Ta \&No Ta \&No Ta Yes -.It Ic jobs Ta No* Ta Yes Ta Yes +.It Ic jobs Ta \&No Ta Yes Ta Yes .It Ic kill Ta Yes Ta Yes Ta Yes .It Ic limit Ta \&No Ta Yes Ta \&No .It Ic local Ta \&No Ta \&No Ta Yes @@ -125,7 +125,7 @@ and the standard shells that provide them. .It Ic printf Ta Yes Ta \&No Ta Yes .It Ic pushd Ta \&No Ta Yes Ta \&No .It Ic pwd Ta Yes Ta \&No Ta Yes -.It Ic read Ta No* Ta \&No Ta Yes +.It Ic read Ta \&No Ta \&No Ta Yes .It Ic readonly Ta \&No Ta \&No Ta Yes .It Ic rehash Ta \&No Ta Yes Ta \&No .It Ic repeat Ta \&No Ta Yes Ta \&No @@ -148,27 +148,21 @@ and the standard shells that provide them. .It Ic times Ta \&No Ta \&No Ta Yes .It Ic trap Ta \&No Ta \&No Ta Yes .It Ic true Ta Yes Ta \&No Ta Yes -.It Ic type Ta No* Ta \&No Ta Yes -.It Ic ulimit Ta No* Ta \&No Ta Yes -.It Ic umask Ta No* Ta Yes Ta Yes -.It Ic unalias Ta No* Ta Yes Ta Yes +.It Ic type Ta \&No Ta \&No Ta Yes +.It Ic ulimit Ta \&No Ta \&No Ta Yes +.It Ic umask Ta \&No Ta Yes Ta Yes +.It Ic unalias Ta \&No Ta Yes Ta Yes .It Ic uncomplete Ta \&No Ta Yes Ta \&No .It Ic unhash Ta \&No Ta Yes Ta \&No .It Ic unlimit Ta \&No Ta Yes Ta \&No .It Ic unset Ta \&No Ta Yes Ta Yes .It Ic unsetenv Ta \&No Ta Yes Ta \&No .It Ic until Ta \&No Ta \&No Ta Yes -.It Ic wait Ta No* Ta Yes Ta Yes +.It Ic wait Ta \&No Ta Yes Ta Yes .It Ic where Ta \&No Ta Yes Ta \&No .It Ic which Ta Yes Ta Yes Ta \&No .It Ic while Ta \&No Ta Yes Ta Yes .El -.Pp -\&No*: Commands marked -.Ql No* -exist externally, but are implemented as scripts using a -.Nm -command of the same name. .Ss Keybinds The command line environment also provides the following default keyboard bindings: diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index e21d7dd70eb7..e159fdf39822 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -128,7 +128,6 @@ DIRDEPS+= \ sbin/sysctl \ sbin/tunefs \ sbin/umount \ - usr.bin/alias \ usr.bin/apply \ usr.bin/ar \ usr.bin/asa \ diff --git a/usr.bin/Makefile b/usr.bin/Makefile index da1a9b3a681f..844a2312fd73 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,7 +1,6 @@ .include -SUBDIR= alias \ - apply \ +SUBDIR= apply \ asa \ awk \ backlight \ diff --git a/usr.bin/alias/Makefile b/usr.bin/alias/Makefile deleted file mode 100644 index 1098c7b7ef1f..000000000000 --- a/usr.bin/alias/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -SCRIPTS=generic.sh -SCRIPTSNAME=alias - -LINKS= ${BINDIR}/alias ${BINDIR}/bg \ - ${BINDIR}/alias ${BINDIR}/cd \ - ${BINDIR}/alias ${BINDIR}/command \ - ${BINDIR}/alias ${BINDIR}/fc \ - ${BINDIR}/alias ${BINDIR}/fg \ - ${BINDIR}/alias ${BINDIR}/getopts \ - ${BINDIR}/alias ${BINDIR}/hash \ - ${BINDIR}/alias ${BINDIR}/jobs \ - ${BINDIR}/alias ${BINDIR}/read \ - ${BINDIR}/alias ${BINDIR}/type \ - ${BINDIR}/alias ${BINDIR}/ulimit \ - ${BINDIR}/alias ${BINDIR}/umask \ - ${BINDIR}/alias ${BINDIR}/unalias \ - ${BINDIR}/alias ${BINDIR}/wait - -.include diff --git a/usr.bin/alias/Makefile.depend b/usr.bin/alias/Makefile.depend deleted file mode 100644 index 11aba52f82cf..000000000000 --- a/usr.bin/alias/Makefile.depend +++ /dev/null @@ -1,10 +0,0 @@ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.bin/alias/generic.sh b/usr.bin/alias/generic.sh deleted file mode 100644 index c07b119b560f..000000000000 --- a/usr.bin/alias/generic.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# This file is in the public domain. -builtin ${0##*/} ${1+"$@"} From nobody Fri Dec 19 17:48:00 2025 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 4dXw466HB2z6M7tc; Fri, 19 Dec 2025 17:48:06 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXw4641rZz42Dn; Fri, 19 Dec 2025 17:48:06 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766166486; 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=ZL+4T5BM5iXATMnJede1Z3XQY6g59GmG/Nl9QoCxB40=; b=Fnu0YjzRGB7dO+DSggh+5vDAlrXKrrmZaFar+hqeyO3/Z+pn8pN/AW1AY6Pfk4kpTIsKDl ms5ca1SAj6rFRw7BNr6ScxVUpHlleIxRScg6y11EfQu1/u0qHHnx9uHu0M1bPpSX30kakU UXCRv2MKieDvKIep50DQibheVub2dMODkdxJ2nb3WEmu3F7NIBbylyAz0qzk8XpQ6yNvWx zL6PEnW+cwfrhU4qSuYwm6zvaVCSmvSIJbxcH0UztBPOTVbNMRZdX8go6Su++CUdzf6Lmk jYobTLZABavB5UnmGk3+kGRSqEb0f5FNCx7TAC67TUhvJRTA/uMxMqed7MzYbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766166486; 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=ZL+4T5BM5iXATMnJede1Z3XQY6g59GmG/Nl9QoCxB40=; b=BcaRE4RpUnRUAljCFqF3EvYTreUZWKFJlb8Onood4u/aVykIpcdS2CSTsb7hmeXMG1UHxb 9YRkdKnDX/ZbDsXAsA72CedOesHZSOXerFQlsrCYyUaHRKUcNpTd3xiugAMeRiRfpRB3Y9 RBN7lgwiAmdIoyr+OXhB2hLkxPwykUb5Stv2dSYHxN19kWEtNtXGFoV2Vnls5ui52rpfID S5vGEfRnUxZMGuNQvYSLCeEHkeFFAzGM3yxmWbJIhhZtFZD9CM6IgNrfej+axhjBzBMatA +7Oh1AeZYpLUR7VmujXYT7NOKIc6neiybMYPeB9zEB5LSbwXrRVlTkE+5raBkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766166486; a=rsa-sha256; cv=none; b=oby6BrH+CIi4bmubArk4mZK57C//63ss8FfOzLjwmrsU7TnPI9BXOmuNZ6FymlvCe+x9OW X3tgi+EGjfjEQ4jX96R9Llw7Rx8OUJud5ms8lEHORuKURtzva6yaLxEzxnx22WNetqFpA7 0gCGw2dMcvG7Cqwo1rdCISE9I8uiZed570mLSV9w8j2axwjF/GvPR/2K+pWdxyQWd1V28I w1rK33zlX0LtLUbicrd9xGbTLZTGEAswNiVpD31eWBvU+l+Ygv83VEocIn6SwkYKvAgV+l Gk8uK5/WsMZG2NxZiEsgTAsMHRlUz5OyL2HugDkUcR6fB4jqSvIYd0EOu/wqFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXw4454PBzqM9; Fri, 19 Dec 2025 17:48:04 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 09:48:00 -0800 From: Gleb Smirnoff To: Mark Johnston Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Dec 19, 2025 at 10:12:42AM -0500, Mark Johnston wrote: M> > > All known software in ports had been addressed three years ago and the M> > > shim stays in stable/14 and stable/15 for another couple years with its M> > > printf(), so all ourliers are expected to conform before 16.0-RELEASE. M> > > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. M> > So why breaking the binaries that users might have lingering around? M> M> Aside from that, with a PF_DIVERT socket sd it's not possible to call M> sd.recvfrom() in python (because python doesn't know which sockaddr M> subtype to use), whereas with a PF_INET divert socket it gives a M> sockaddr_in with an interface address, for inbound packets. This means my submission to python back in 2022 was missing couple lines. The Modules/socketmodule.c:makesockaddr() is missing a case. :( If people were not ignoring the warning message and switched to PF_DIVERT earlier, I would learn that my patch to python was missing a bit earlier. I will start a new submission to python. Usually they are very slow to accept. I'm fine if you revert e967a2a03677. But let's plan to remove it before stable/17. M> So some M> applications cannot be quickly repaired. In fact, I'd find it useful to M> go the other way and add support for M> socket(PF_INET6, SOCK_RAW, IPPROTO_DIVERT). How this will help? The divert(4) is actually not tied to any protocol. If you use ipfw layer 2 divert, the socket will receive Ethernet frames. -- Gleb Smirnoff From nobody Fri Dec 19 17:56:18 2025 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 4dXwFp71Kgz6M8KB; Fri, 19 Dec 2025 17:56:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXwFp3KDtz430S; Fri, 19 Dec 2025 17:56:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BJHuIBK085978; Fri, 19 Dec 2025 19:56:21 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BJHuIBK085978 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BJHuIVo085977; Fri, 19 Dec 2025 19:56:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Dec 2025 19:56:18 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dXwFp3KDtz430S On Fri, Dec 19, 2025 at 09:48:00AM -0800, Gleb Smirnoff wrote: > On Fri, Dec 19, 2025 at 10:12:42AM -0500, Mark Johnston wrote: > M> > > All known software in ports had been addressed three years ago and the > M> > > shim stays in stable/14 and stable/15 for another couple years with its > M> > > printf(), so all ourliers are expected to conform before 16.0-RELEASE. > M> > > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. > M> > So why breaking the binaries that users might have lingering around? > M> > M> Aside from that, with a PF_DIVERT socket sd it's not possible to call > M> sd.recvfrom() in python (because python doesn't know which sockaddr > M> subtype to use), whereas with a PF_INET divert socket it gives a > M> sockaddr_in with an interface address, for inbound packets. > > This means my submission to python back in 2022 was missing couple lines. The > Modules/socketmodule.c:makesockaddr() is missing a case. :( > > If people were not ignoring the warning message and switched to PF_DIVERT > earlier, I would learn that my patch to python was missing a bit earlier. > > I will start a new submission to python. Usually they are very slow to accept. > I'm fine if you revert e967a2a03677. But let's plan to remove it before > stable/17. Why? Apparently, the feature is widely used by applications. It is even present in python. Breaking it is abrupt and must be reverted. > > M> So some > M> applications cannot be quickly repaired. In fact, I'd find it useful to > M> go the other way and add support for > M> socket(PF_INET6, SOCK_RAW, IPPROTO_DIVERT). > > How this will help? The divert(4) is actually not tied to any protocol. > If you use ipfw layer 2 divert, the socket will receive Ethernet frames. > > -- > Gleb Smirnoff From nobody Fri Dec 19 18:07:37 2025 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 4dXwVj4NCWz6M9GH; Fri, 19 Dec 2025 18:07:41 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXwVj2ZbZz47JC; Fri, 19 Dec 2025 18:07:41 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766167661; 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=Xdiqimv749EoRcCS3U47wa4dsrJeTB7PvFcE/nDNYdM=; b=xLUR/3iizqM/NVaE7CRI+g0oAIcw9yLqZb7BwNWWhRMpDY1r32/uzbUz0s6cYImmvNLJEH 2hq1QTLgiKndZQEz5C0snIlQBryyNn3yfIYwf8x0Emd5Wj1HRpbsCMNljY8zdD9LmR+9fO Rjh3toepFLPQ2S9tSXLYn71ANGXPKEl8dkrzJN/B3t1ywiUne7u/mP83Qecz5NimigjhKL XmHZ/aj+IJWAFSxq8Il4qQkkgkCfejBG9MJJ0FXghFXFsQKJQ7WC8xEfPwutfw3m4/HXnw avf0pbtETK2abQ4GNTdFo/+xod3E6PMPDr6LvFwHj6TxvIH0T5hTDbEmRMqGXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766167661; 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=Xdiqimv749EoRcCS3U47wa4dsrJeTB7PvFcE/nDNYdM=; b=Ya0rZyW0et+9LP8kpoCNeh/w++UcO5DIO/EYA26ixwrPmVWILmd7hQhsvKff6Xa99uZA8O mZSHbEAyxjMdcciTXsyEVMbn1mwbtRYaiuYEm3t9dgaPKdPNu11REeZ0NpI1fe8efcssyc ih5TTJDSKJlC46Zo6TiVEEH7QzqA0ir6DADyfqn9r/7B0JkMj32scVFKu02s5u49jW5k+v qvGLV+dN0mJw07+uP/xtqoYCzuUrPfjgh6ormZRnfjxCFf8nYLwc3Wxz/z1go+G6sE9I+P H9ukJV5rYDQ459vALUvRfw+nu4GsWJ5eRSl2jyN1dW2KV1bgGUosdzMKsyiMXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766167661; a=rsa-sha256; cv=none; b=T8E6VLsvpPPVNcedRMUWBEEKQgDKrpqaNLbpaH9kzcPxYVZGkiGC2LA+BeHM8e2pNWSGwq KrsumeN2AYROSw6U4Bz8Om9MNo8Q08b0mnsWOcxP3gDPNEbeEF9KHVxotQxKYuVx2HM3hl bspCcIckOCbNbP3QedsJkc/uj4XLvL9rKRVmkZr1aGgqHr7F7Z89sC/6lVP29HHGgaiTkU 5pamXLt3SEoJ/GGbxBa5XuUDcQEqe/YNVwCLpdTZJqABZAwU9QJVcBwJM1vf2na3abgDNy F/sDdybUtsRd5iU0y+zRJmtdpofXaHU93Wn92c69qXo72k3MkNe65aHKdyD6yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXwVg4GgGzrN1; Fri, 19 Dec 2025 18:07:39 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 10:07:37 -0800 From: Gleb Smirnoff To: Konstantin Belousov Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Dec 19, 2025 at 07:56:18PM +0200, Konstantin Belousov wrote: K> On Fri, Dec 19, 2025 at 09:48:00AM -0800, Gleb Smirnoff wrote: K> > On Fri, Dec 19, 2025 at 10:12:42AM -0500, Mark Johnston wrote: K> > M> > > All known software in ports had been addressed three years ago and the K> > M> > > shim stays in stable/14 and stable/15 for another couple years with its K> > M> > > printf(), so all ourliers are expected to conform before 16.0-RELEASE. K> > M> > > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. K> > M> > So why breaking the binaries that users might have lingering around? K> > M> K> > M> Aside from that, with a PF_DIVERT socket sd it's not possible to call K> > M> sd.recvfrom() in python (because python doesn't know which sockaddr K> > M> subtype to use), whereas with a PF_INET divert socket it gives a K> > M> sockaddr_in with an interface address, for inbound packets. K> > K> > This means my submission to python back in 2022 was missing couple lines. The K> > Modules/socketmodule.c:makesockaddr() is missing a case. :( K> > K> > If people were not ignoring the warning message and switched to PF_DIVERT K> > earlier, I would learn that my patch to python was missing a bit earlier. K> > K> > I will start a new submission to python. Usually they are very slow to accept. K> > I'm fine if you revert e967a2a03677. But let's plan to remove it before K> > stable/17. K> Why? Because 99.9999% socket() syscalls specify correct domain/type tuple but still do this check. 99% FreeBSD's don't event have ipdivert.ko loaded or added to kernel config. And out of 1% that uses divert, 99% specify correct PF_DIVERT domain, cause all known software had been addressed. K> Apparently, the feature is widely used by applications. It is even present K> in python. Breaking it is abrupt and must be reverted. First, I am not removing any features. The divert(4) feature only get better with my changes back in 2022. Second, python also knows about PF_DIVERT since version 3.12. As Mark noted the patch to python wasn't complete and I'm working on this now. So I'm fine with prolonging the compat shim, but not forever. -- Gleb Smirnoff From nobody Fri Dec 19 18:42:31 2025 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 4dXxGy46MGz6MDMM; Fri, 19 Dec 2025 18:42:34 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXxGy21rTz4FjT; Fri, 19 Dec 2025 18:42:34 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766169754; 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=e09q2+gpR/9kXHhDrLUP5cscrK2R5EhXzCuoecX/Nw4=; b=RPNVsVh9YfKpjxfONPp758Z1580jvnpAdfj2IYpmXYAoyORlcJ0LUBzgpid3i1ItK3DfB5 z1osSXOWL6Hn/GFUDcmGSb0ZGQ38uBDv2f+fuSNa5NKnVAFA81Si1p6BKkWsAWZO8zGFBR QGOSfLU8SgjCHNjFSZWf/D10dIydvHSI81+Ck7L4lufILQm6lSzPWaKzFnYCE75uO/N/Sm Kk2xuMOlV/uXgQV5PfbfTP1rVEPq/Oz/+A4R2IENehfrbY72FZmQdlaUWYBcJd4BhwaSHW h0qN8Hnvm4F+qpEBt4DnrKbF8dtnqM/apvmC7QiIZY9At65T6cdC4g6CMdIqtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766169754; 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=e09q2+gpR/9kXHhDrLUP5cscrK2R5EhXzCuoecX/Nw4=; b=Js0t744gEoUFh0jBr3W22d8msbzHhqN6ZUAa7C04WnaDoo50Xp9cA9endQG8XqI1WncWBW X4n9EE+I79G3yT7TyHDQUpTuMJwkNx5Req61GQTjNNHo/vye9vwIN/zJP9jY4iVLj6fVcf cjiXa/5oAd94lKC7cdmTlejv4uGPsiLJKZti8iGcDTrEs2YKsnqk7ZG/aXR9i9LY9nFEnI vT4RuFARkixqEW37seMXWU8cKtSoVxjnI5DgfeKJy4wMDA05PPra3BZcSbh3/LrVHDKJTq XL6qAyU0RjjYWg+lCQ3BtXfLy6F556p3Iklb4N4aJ8vAepBRIcFjc+4lMwKYkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766169754; a=rsa-sha256; cv=none; b=HnCmRkZRKKq/jGGYyMinD7uYPLFL1UYl4+DWGlbc/dTbKdB7zN4ImbFfWke6h50ZID1U5P Bxl2PT1T9DPzYVAami1PpfUJG5HggLC7LmBBBcOwkEhmaZ1AGhX5h4rOlP4wulLABXHIP5 m/DE0PeXi7U81pkbInocSpi9ka+nX/hHyiHYPvpoGwTIVziOKqBL+VGfBxGBTVRgfYEgQN jt6TbMOKKQ2OzcKrcBna2EtjXzwVNaLnh4/+dkjG0RmPfX7lH2jo4rLDIlmt+9bkBHL3lx fZOtYngCZyWonTRt4Fs5pnPPZrj/7Lo1MoFUBLSe/qpGa543CwGKyRb3aGXSdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXxGx4VMWzs8n; Fri, 19 Dec 2025 18:42:33 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 10:42:31 -0800 From: Gleb Smirnoff To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0d469d23715d - main - net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9) Message-ID: References: <694452f3.32deb.4d0ab2a7@gitrepo.freebsd.org> <4A394DAA-1FCE-440A-8E92-88BD9B4EE087@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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4A394DAA-1FCE-440A-8E92-88BD9B4EE087@FreeBSD.org> On Fri, Dec 19, 2025 at 12:10:09PM +0100, Kristof Provost wrote: K> I’m seeing panics on pfsync interface destruction now: K> K> panic: mld_change_state: bad ifp K> cpuid = 19 K> time = 1766142554 K> KDB: stack backtrace: K> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame K> 0xfffffe01843fd990 K> vpanic() at vpanic+0x136/frame 0xfffffe01843fdac0 K> panic() at panic+0x43/frame 0xfffffe01843fdb20 K> mld_change_state() at mld_change_state+0x6d0/frame 0xfffffe01843fdb90 K> in6_leavegroup_locked() at in6_leavegroup_locked+0xa9/frame K> 0xfffffe01843fdbf0 K> in6_leavegroup() at in6_leavegroup+0x32/frame 0xfffffe01843fdc10 K> pfsync_multicast_cleanup() at pfsync_multicast_cleanup+0x83/frame K> 0xfffffe01843fdc40 K> pfsync_clone_destroy() at pfsync_clone_destroy+0x260/frame K> 0xfffffe01843fdc90 K> ifc_simple_destroy_wrapper() at ifc_simple_destroy_wrapper+0x26/frame K> 0xfffffe01843fdca0 K> if_clone_destroyif_flags() at if_clone_destroyif_flags+0x69/frame K> 0xfffffe01843fdce0 K> if_clone_detach() at if_clone_detach+0xe6/frame 0xfffffe01843fdd10 K> vnet_pfsync_uninit() at vnet_pfsync_uninit+0xf0/frame 0xfffffe01843fdd30 K> vnet_destroy() at vnet_destroy+0x154/frame 0xfffffe01843fdd60 K> prison_deref() at prison_deref+0xaf5/frame 0xfffffe01843fddd0 K> sys_jail_remove() at sys_jail_remove+0x15c/frame 0xfffffe01843fde00 K> amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe01843fdf30 K> fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01843fdf30 K> --- syscall (508, FreeBSD ELF64, jail_remove), rip = 0x2d8234c9e31a, rsp = K> 0x2d823179b928, rbp = 0x2d823179b9b0 --- K> KDB: enter: panic K> K> The pfsync:basic_ipv6 seems to trigger this reliably. This actually surfaced an interesting problem, and pfsync being an interface isn't a culprit here :) Neither my changes are. The problem is that IPv6 multicast layer in in6_getmulti() will call into interface multicast layer with if_addmulti() to allocate struct ifmultiaddr. This new born ifmultiaddr will have refcount of 1, but it will be referenced both by the struct in6_multi and the interface linked list. It should have refcount of 2. For all normal cases the in6_multi structs are also somehow associated with the interface they were allocated for and at teardown sequence they will go away all together, so this refcounting bug never triggers. But with pfsync calling in6_joingroup() on some ifnet from its own pfsync's context we come into a situation when the struct in6_multi is external to the ifnet it is associated with. If this ifnet is detached before pfsync context is destroyed, then our in6_multi will point at a detached ifnet that is hanging on the last reference (all methods point to if_dead) and this in6_multi will also point at freed ifmultiaddr. I'm looking at either a proper fix or at hiding it back under carper as it was before. -- Gleb Smirnoff From nobody Fri Dec 19 18:48:42 2025 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 4dXxQ50JJ4z6MF4r; Fri, 19 Dec 2025 18:48:45 +0000 (UTC) (envelope-from dim@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXxQ46TrXz4G79; Fri, 19 Dec 2025 18:48:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766170124; 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=9S3kYE8Vu2ZHsxhR2fHgWP0lyfOH5wY3kPmj0FcyfGg=; b=EmqyjW3tgQtqOCz4LmB+GKo8SdWMr6hJfxQRkg1Sze9bg5wCApAxUzI7YRJo/0HlLGEqoG w3KUOkJat516XxGsbZV5ib0vDbzdXgL1LuZjawRq0CIr9vi8y9uk9vX9r4IuLsXqeW56Sj UQpc7TmaFWMHtEihodGUnPWVjBI1LrLWjWOtsBe6FwpKfL7JXY57wCiTDY44T+t/sHmeOR 9yx8k0/ooyWH4xof4/9MWAPFoyN18lXjk+W7ITw/tcuCjhHOEeDMVASIVeLoXfLJi0TwpF 7AUswInE6QKUUtEj8POMpg6hzjHHw4g19cKfZX/mnYmVja9Ip41jgbuk8PGWkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766170124; 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=9S3kYE8Vu2ZHsxhR2fHgWP0lyfOH5wY3kPmj0FcyfGg=; b=TD8IS/8iWaNwGKY5F8yEAfa4onlEselvXa8VJ9Lr6tvFzjsRthizJAatt7rz/VTmVwHRwY no7dgnccKRpmrpr1akNeTggBV7rflgUS0XsHDUYky9aMiXSoLjnr+2ej6f7DTe5gE8MKxi l/P9Rsit0TZPdkHvVTPlEyZArIxzTnh1+zqyLWFE+7GbAaLxSdVa1sugrY6SxePvMknhyI rkFsNWHdiEzmZfQKMwqddsS+5XwCJipzKoFGtyOp9wkIu1CPRQtEEKao6XOdLfkg3hNxTc KVQrq5QL4xuh+6TnQWboFEZ+CKqh6PdNXplRmfmzGnKSV6OYZ3+swt2EooZDFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766170124; a=rsa-sha256; cv=none; b=sXKGaGx/3LbGmCQugxqXbrqmjzGwclIP4FF8nwwzhk0KssNMbxBmvU+JVmoyNlbJfXBQta V7oM5k/Zy/bLpsIBNTdoJOZxZfgHHlhn/tuQXpJUUWVpnnzEToWGoq+xXXSSWYQGcnaMFx TdCfmm24MWRvaTGaIWE0idovbX8wIyDiy6xkeTerKZYqPo83YPdE2CdI2RRFV1ZmV/ym64 2HhYJFrw7+QMja2MsYe/Rm6x6959OquTjojgfkivmvtDYzA6ImuBIGfYqQODilWwao4zJk c4X7vlWQHm01QyW4vBjDc0+8WMv+mnB+lLqX73LEu0zFs+RSiPf8fJ+NI/K8yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 "tensor.andric.com", Issuer "E7" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXxQ44dMhzqWK; Fri, 19 Dec 2025 18:48:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (bladnoch.home.andric.com [192.168.0.20]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C79D141559; Fri, 19 Dec 2025 19:48:42 +0100 (CET) Content-Type: text/plain; charset=utf-8 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 \(3826.700.81.1.4\)) Subject: Re: git: 0d469d23715d - main - net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9) From: Dimitry Andric In-Reply-To: Date: Fri, 19 Dec 2025 19:48:42 +0100 Cc: Kristof Provost , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <40C4BA5F-1207-47FF-BF37-A2F4F0BE0AB1@FreeBSD.org> References: <694452f3.32deb.4d0ab2a7@gitrepo.freebsd.org> <4A394DAA-1FCE-440A-8E92-88BD9B4EE087@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3826.700.81.1.4) On 19 Dec 2025, at 19:42, Gleb Smirnoff wrote: >=20 > On Fri, Dec 19, 2025 at 12:10:09PM +0100, Kristof Provost wrote: > K> I=E2=80=99m seeing panics on pfsync interface destruction now: > K>=20 > K> panic: mld_change_state: bad ifp > K> cpuid =3D 19 > K> time =3D 1766142554 > K> KDB: stack backtrace: > K> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > K> 0xfffffe01843fd990 > K> vpanic() at vpanic+0x136/frame 0xfffffe01843fdac0 > K> panic() at panic+0x43/frame 0xfffffe01843fdb20 > K> mld_change_state() at mld_change_state+0x6d0/frame = 0xfffffe01843fdb90 > K> in6_leavegroup_locked() at in6_leavegroup_locked+0xa9/frame > K> 0xfffffe01843fdbf0 > K> in6_leavegroup() at in6_leavegroup+0x32/frame 0xfffffe01843fdc10 > K> pfsync_multicast_cleanup() at pfsync_multicast_cleanup+0x83/frame > K> 0xfffffe01843fdc40 > K> pfsync_clone_destroy() at pfsync_clone_destroy+0x260/frame > K> 0xfffffe01843fdc90 > K> ifc_simple_destroy_wrapper() at = ifc_simple_destroy_wrapper+0x26/frame > K> 0xfffffe01843fdca0 > K> if_clone_destroyif_flags() at if_clone_destroyif_flags+0x69/frame > K> 0xfffffe01843fdce0 > K> if_clone_detach() at if_clone_detach+0xe6/frame 0xfffffe01843fdd10 > K> vnet_pfsync_uninit() at vnet_pfsync_uninit+0xf0/frame = 0xfffffe01843fdd30 > K> vnet_destroy() at vnet_destroy+0x154/frame 0xfffffe01843fdd60 > K> prison_deref() at prison_deref+0xaf5/frame 0xfffffe01843fddd0 > K> sys_jail_remove() at sys_jail_remove+0x15c/frame 0xfffffe01843fde00 > K> amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe01843fdf30 > K> fast_syscall_common() at fast_syscall_common+0xf8/frame = 0xfffffe01843fdf30 > K> --- syscall (508, FreeBSD ELF64, jail_remove), rip =3D = 0x2d8234c9e31a, rsp =3D > K> 0x2d823179b928, rbp =3D 0x2d823179b9b0 --- > K> KDB: enter: panic > K>=20 > K> The pfsync:basic_ipv6 seems to trigger this reliably. >=20 > This actually surfaced an interesting problem, and pfsync being an = interface > isn't a culprit here :) Neither my changes are. >=20 > The problem is that IPv6 multicast layer in in6_getmulti() will call = into > interface multicast layer with if_addmulti() to allocate struct = ifmultiaddr. > This new born ifmultiaddr will have refcount of 1, but it will be = referenced > both by the struct in6_multi and the interface linked list. It should = have > refcount of 2. For all normal cases the in6_multi structs are also = somehow > associated with the interface they were allocated for and at teardown = sequence > they will go away all together, so this refcounting bug never = triggers. >=20 > But with pfsync calling in6_joingroup() on some ifnet from its own = pfsync's > context we come into a situation when the struct in6_multi is external = to the > ifnet it is associated with. If this ifnet is detached before pfsync = context > is destroyed, then our in6_multi will point at a detached ifnet that = is hanging > on the last reference (all methods point to if_dead) and this = in6_multi will > also point at freed ifmultiaddr. >=20 > I'm looking at either a proper fix or at hiding it back under carper = as it was > before. What I'm seeing with main-n282652-4100bd6caa66 is this: panic: bpf_ifnet_write: ifp 0xfffff8002d492800 type 209 not supported ... (kgdb) #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57 td =3D #1 doadump (textdump=3Dtextdump@entry=3D0) at /usr/src/sys/kern/kern_shutdown.c:399 error =3D 0 coredump =3D ... #10 0xffffffff80b9776b in vpanic ( fmt=3D0xffffffff811e552a "%s: ifp %p type %u not supported", ap=3Dap@entry=3D0xfffffe00d75f9c00) at = /usr/src/sys/kern/kern_shutdown.c:962 buf =3D "bpf_ifnet_write: ifp 0xfffff8002d492800 type 209 not = supported", '\000' __pc =3D 0x0 __pc =3D 0x0 __pc =3D 0x0 other_cpus =3D {__bits =3D {65534, 0 }} td =3D 0xfffff8000d8c7780 bootopt =3D newpanic =3D #11 0xffffffff80b975d3 in panic ( fmt=3D0xffffffff81d9fa50 = "\256`\035\201\377\377\377\377") at /usr/src/sys/kern/kern_shutdown.c:887 ap =3D {{gp_offset =3D 32, fp_offset =3D 48, overflow_arg_area =3D 0xfffffe00d75f9c30, reg_save_area =3D 0xfffffe00d75f9bd0}} #12 0xffffffff80cd600f in bpf_ifnet_write (arg=3D0xfffff8002d492800, m=3D0xfffff80033020900, mc=3D0x0, flags=3D32) at = /usr/src/sys/net/bpf_ifnet.c:141 ro =3D {ro_nh =3D 0x0, ro_lle =3D 0x0, ro_prepend =3D 0x0, = ro_plen =3D 0, ro_flags =3D 0, ro_mtu =3D 0, spare =3D 0, ro_dst =3D {sa_len = =3D 0 '\000', sa_family =3D 0 '\000', sa_data =3D '\000' }} dst =3D {sa_len =3D 0 '\000', sa_family =3D 0 '\000', sa_data =3D '\000' } hlen =3D 0 saved_vnet =3D error =3D ifp =3D #13 0xffffffff80cd2030 in bpfwrite (dev=3D, = uio=3D, ioflag=3D) at /usr/src/sys/net/bpf.c:1052 et =3D {et_link =3D {tqe_next =3D 0x0, tqe_prev =3D = 0xfffffe00167c2ad8}, et_td =3D 0xfffff8000d8c7780, et_section =3D {bucket =3D 1}, et_old_priority =3D 144 '\220'} d =3D 0xfffff8000eec8a00 error =3D bp =3D 0xfffff80001aa3d00 m =3D 0xfffff80033020900 mc =3D 0x0 len =3D #14 0xffffffff80a114a3 in devfs_write_f (fp=3D0xfffff8000d884140, uio=3D0xfffff80001aa3c80, cred=3D, flags=3D0, td=3D0xfffff8000d8c7780) at /usr/src/sys/fs/devfs/devfs_vnops.c:1960 dev =3D 0xfffff800017fc800 ref =3D 1 fpop =3D 0x0 dsw =3D 0xffffffff81af2b68 error =3D 0 ioflag =3D 0 resid =3D 342 -Dimitry From nobody Fri Dec 19 18:53:01 2025 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 4dXxW6078Yz6MFNK; Fri, 19 Dec 2025 18:53:06 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXxW56cbcz4H6B; Fri, 19 Dec 2025 18:53:05 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766170385; 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=RD/WUk1kudZaM2E7fsNxHr4JMAtWq2WqNo2GhFmcY8E=; b=px3IuBsOFDYcVAksseeXEvGjHz+vlHEIV6QA9QfxBxSe3WGmjD8X3v/wpyPnc/StVFNvnj 3cBm0QRITvlv2Ils9SRs/NDkfsW8tvDDxHKLjtJiYMSKgfkHYiShUoCCKo3aH0HhhkHSa3 7oyJxQ03Pf5Q/okhj4hEobojIwssiRHkvKWrY0BRz2lqoI1mMLO5hBplc5fAJdaQzYa5xV buz+DfPTV5iWfDauQnm7iUuRTXgyvRM5BgH4zSWCCkutqqQxmsPorc7DlvA+r2lqjqToAz ySiS/j7BnawxS/PSpAnZtSPU4P1eP93lG5lMUcFlfq1VxbMoo/7Cl1IKcQ9Y3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766170385; 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=RD/WUk1kudZaM2E7fsNxHr4JMAtWq2WqNo2GhFmcY8E=; b=cAP8tydxHhc37HY3rhcNSA4B103+yd7b6JBUl2Zp4BaYxQM8Vhnfd6sPwEC587sLhiH/KX M04V/fHdkOCI5WPf+WYjnQ1jbPe/cpoWo1De0Y9CfKknP0D3vY8wbsQXOENtIP4m9V2E5i bn/iM028oSNvjPefPN7Tg9Po0dyAGK9OeXZLwdCyIbE/Ztw7iOEoFMTfhZyzBE5ihGIv9M OjPjLaysOSFmHFZ5Od+RFEetAUasspp2LooZfGTD80lykZ2U5vtLJAIfjRVoV13ANhk357 h+Ubi3SS+lYHhdWOviikdjtQzQVexdl3YWjjNkQk+fQVccFLZxcypcAbL9hd8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766170385; a=rsa-sha256; cv=none; b=quFi0eC2OqDBnlOo+eKcgVdSRaa/A1Y8h0e+H7fUKfhq+HOSgQ7H/DKPdtI5oESaOXZNUf KBIDAIET4t6t7TkFeQWVvuJtG4mu5htdVALunqIsn63i5LcV/3EbuD2zMKUsbLbzsRSEMj bDej9/93CtOI9yOWRCXmzWF6WN6pDvMdK95fDahiDfLQkCpBuNfxedVP4cKu27NoK8gNt0 1Q7334bTj6Luv0sE015eiXCExNs1vX5KwXOIlZCA5b0iqOnTaJuuXD9aKDrTn3PJUGIpO0 Gi7WWi7HHxGfoc4zHR1bEjoOfTIG6GhS4otrdf6/JG1AIFW3SRhQnP8uTyrvGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXxW51jhFzsT0; Fri, 19 Dec 2025 18:53:05 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 10:53:01 -0800 From: Gleb Smirnoff To: Dimitry Andric Cc: Kristof Provost , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: panic: bpf_ifnet_write: ifp 0xfffff8002d492800 type 209 not supported Message-ID: References: <694452f3.32deb.4d0ab2a7@gitrepo.freebsd.org> <4A394DAA-1FCE-440A-8E92-88BD9B4EE087@FreeBSD.org> <40C4BA5F-1207-47FF-BF37-A2F4F0BE0AB1@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/mixed; boundary="6tLTqedWsGergFYq" Content-Disposition: inline In-Reply-To: <40C4BA5F-1207-47FF-BF37-A2F4F0BE0AB1@FreeBSD.org> --6tLTqedWsGergFYq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 19, 2025 at 07:48:42PM +0100, Dimitry Andric wrote: D> What I'm seeing with main-n282652-4100bd6caa66 is this: D> D> panic: bpf_ifnet_write: ifp 0xfffff8002d492800 type 209 not supported This is a very different thing, but this is also mine :( Fortunately it is a trivial miss. Please confirm the attached patch works. -- Gleb Smirnoff --6tLTqedWsGergFYq Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename=bpf_ifnet.diff diff --git a/sys/net/bpf_ifnet.c b/sys/net/bpf_ifnet.c index d4fd50bd3d8e..4123e9144fe8 100644 --- a/sys/net/bpf_ifnet.c +++ b/sys/net/bpf_ifnet.c @@ -89,6 +89,7 @@ bpf_ifnet_write(void *arg, struct mbuf *m, struct mbuf *mc, int flags) /* DLT_EN10MB */ case IFT_ETHER: /* if_ethersubr.c */ case IFT_L2VLAN: /* vlan(4) */ + case IFT_BRIDGE: /* if_bridge(4) */ case IFT_IEEE8023ADLAG: /* lagg(4) */ case IFT_INFINIBAND: /* if_infiniband.c */ { --6tLTqedWsGergFYq-- From nobody Fri Dec 19 19:08:58 2025 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 4dXxsR4sRkz6MGpP; Fri, 19 Dec 2025 19:08:59 +0000 (UTC) (envelope-from dim@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXxsR4BDvz4KMx; Fri, 19 Dec 2025 19:08:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766171339; 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=iEe3TAzFAz7B6JddFgrKvwC/5L90VrhSbgNDaGVXvow=; b=prbsGfvrOuumSx5Us4BEuCfHcEN5WXSDYBEKJ5XjJK2HoEF/L2+VVR+9Uoo4FS00l8VgDv xpQiIpsimAYkxbnjhRbO2hgqMS2tkeIxP3ukX3clgAD7WxV+NFhNj8m/aBap4Ab6nly/en aWGD/Zi24Cz/4wVDNBkOhWSLbyYKTSVUXvNVYtw/e3gG0DEGpB6pW9SijvsQpUSIfxczQs /b+V/XHKuRbsJ7Z7gVA1HA9yi3PeiM6fOZ4npDU0W04og/bwJaeMA9rrfpp5TZTy9msof/ MfAZ+yN2pN6OGbYrMFRDnmF9zu5bvn226IPEgJjibyTLMHUs6uK7pgxHx0brKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766171339; 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=iEe3TAzFAz7B6JddFgrKvwC/5L90VrhSbgNDaGVXvow=; b=fFksNVPTxgGstwc3TGNfrRyKDXOh/bchz8m6KY3IHKltaWumhDDdJ600Ncu7netjg6uSL7 uCRLVEWabMxHw1Mexn0Jsm7MVe1AC/RPzbdd3HzF+uhp6R8F+6wURpLTMNcRLP8OTj1ha3 A3tvwNLYjogq0xf2gmiORa8dk9jK10zgINvZAPH65p/eIAGnBue0g+Ky7UOhYRD05l9z/p rsx7xIgEMG/Z8ggWGU1ue+OJylseqgcH5JOmwKVaLa9BN/e/qU8IJGaxZtnWYyher1Qcjm VAiwwJD0hKtmJnprYKSX4NmsacQhSwWmU5POiOQ9Y0k+/GusGa71QuRp/cHD6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766171339; a=rsa-sha256; cv=none; b=XMKiPND/uTzAzkCmPsr4ipYeIOHdtLwdMuI8wi8NCeo2qO+g5qGqlsmkY2b7q+VVXWbZj3 U306BxYCmBI3oP/7AhL9JJpSIOtHYj5KcLAhqNzY+jtifWVjQL8DO9WLHjCaQDg+NjKhRQ buU5xdpKC5pAb1qqrbJ4K4ZoOedIb6Dv0R9TMpLQjkGAn0QPN3xpDusYGfQttscn55Mxqg ISCcBkr44q39+F2Vi7dO8M+BaFiGEack1ANogcdMaz1BXpBRv3nZwmpi7HoQksC147LEur Ri0E6ROJ3+fO4VPYYNczifPVPF5pFs0PnV4ZYCYm83o6RROEohw0hGOKoiK5/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 "tensor.andric.com", Issuer "E7" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXxsR2vnfzs9f; Fri, 19 Dec 2025 19:08:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (bladnoch.home.andric.com [192.168.0.20]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5030D416B7; Fri, 19 Dec 2025 20:08:58 +0100 (CET) Content-Type: text/plain; charset=us-ascii 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 \(3826.700.81.1.4\)) Subject: Re: panic: bpf_ifnet_write: ifp 0xfffff8002d492800 type 209 not supported From: Dimitry Andric In-Reply-To: Date: Fri, 19 Dec 2025 20:08:58 +0100 Cc: Kristof Provost , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <694452f3.32deb.4d0ab2a7@gitrepo.freebsd.org> <4A394DAA-1FCE-440A-8E92-88BD9B4EE087@FreeBSD.org> <40C4BA5F-1207-47FF-BF37-A2F4F0BE0AB1@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3826.700.81.1.4) On 19 Dec 2025, at 19:53, Gleb Smirnoff wrote: > > On Fri, Dec 19, 2025 at 07:48:42PM +0100, Dimitry Andric wrote: > D> What I'm seeing with main-n282652-4100bd6caa66 is this: > D> > D> panic: bpf_ifnet_write: ifp 0xfffff8002d492800 type 209 not supported > > This is a very different thing, but this is also mine :( > > Fortunately it is a trivial miss. Please confirm the attached > patch works. Yes, that works. Thanks for the fix! -Dimitry From nobody Fri Dec 19 19:23:56 2025 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 4dXyBh62FMz6MJN1 for ; Fri, 19 Dec 2025 19:23: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXyBh533Yz4MYN for ; Fri, 19 Dec 2025 19:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766172236; 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=t2bPQ6JgbKAjk3/z1y4TmmYLQfSV/xWj/U4e7OMoslE=; b=cnsyyZyTaT/zAuwT+TNVWQDvYl3878VN8FLfzVz/KIKFZXgZlxsVLqZyBe02cxb2Rp54/k cGVcEPav3mtgNg2XEaAQdhvjeecuNO6Mc/MzzKtDeMqoQ8cGl1sC3RwDtUcmtjd/uKJXoC gRSITgUNt8mWRkMWPEmrRzwweNU5YodNw8VUdKyzLUY1nD1HDjBb6qbrIlPOeIMqCwvSxC nd5T1lKcM2uu7YII4EVzy6SJEwHsEifuKn7NPXKtwBJlxtILkU3K6jhscZf2vv5UFVO34C 7dhSyiBJ4p1RKqDYqUIftVSI9vMsa8Fp0AMIwVaIUuHNLJBmR0vV5BEOCQxwDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766172236; 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=t2bPQ6JgbKAjk3/z1y4TmmYLQfSV/xWj/U4e7OMoslE=; b=wiM727sEumlDRIyASKOK2ip59n7h/UeQXJ56g0ndc4+XKnIUKUbB68OsjZPKveJ2gkAB1i EaPSJJqWzF3sAqDj0gz08GrEDXiX7L3+H5vB8I2GWLQeC6WpX2YAGKnmWWlaMB80rY6nJo RFsguosZLJfrlWXG2ET2rfgQmeHmKJMTwoGKD7Zm0f6I+bBmzDaR8/XqBvMbUTyTHVRzDL Rk1Ahiu1dRDbgtPghvPaCU0uIHPPGwfaJTRTEwhWNhuSAqvcPEjgEYZGbEWSKCAkeaBD9o EOtSiuAIs1GN2eadINgJTAT/49l9WDVbtRCoXtG4PwohnSh32lXdz3BB8BIm+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766172236; a=rsa-sha256; cv=none; b=yvDxF736NYR29Eu2iC2epbGqfo3ug3fdKIgbNT5fUKNJeuQALZHJUv+1Rem14QTrMlo8P4 EE0cdTnmeVH/dVhD5k4vjP5gQ7GOW1buImIe/2rYczIkPYXC+CanD6KGi/6eZ9vu3WxnM2 1AqzUKe05QnwFkErUuVOh5O7bMdJQqkQ5ZLvz662qWSmcwNlkn8SrrBYlqgSM5PjMz+pUo OE698BEyEvszPtBwk/XBcPECNK2Mg4P5PuRMkZzWF34dd4X+VRL4SlzQiGxKnWmeehM8Po 42hU2xaATueKGj1hKOykSxNk1wceDm6eOkm/Y1m0eyiQXytbye6TjHK5b7c0Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXyBh4Qrqz5lp for ; Fri, 19 Dec 2025 19:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 332a3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 19:23:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: fe53a8a82c81 - main - bpf: add missing IFT_BRIDGE in the write method 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: fe53a8a82c8185e332deb8e1926f0e137aeb2548 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 19:23:56 +0000 Message-Id: <6945a64c.332a3.8f6100@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fe53a8a82c8185e332deb8e1926f0e137aeb2548 commit fe53a8a82c8185e332deb8e1926f0e137aeb2548 Author: Gleb Smirnoff AuthorDate: 2025-12-19 19:23:17 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-19 19:23:17 +0000 bpf: add missing IFT_BRIDGE in the write method Fixes: 8774a990ee4094f16d596d4b78e0f3239e5d0c88 --- sys/net/bpf_ifnet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/bpf_ifnet.c b/sys/net/bpf_ifnet.c index d4fd50bd3d8e..4123e9144fe8 100644 --- a/sys/net/bpf_ifnet.c +++ b/sys/net/bpf_ifnet.c @@ -89,6 +89,7 @@ bpf_ifnet_write(void *arg, struct mbuf *m, struct mbuf *mc, int flags) /* DLT_EN10MB */ case IFT_ETHER: /* if_ethersubr.c */ case IFT_L2VLAN: /* vlan(4) */ + case IFT_BRIDGE: /* if_bridge(4) */ case IFT_IEEE8023ADLAG: /* lagg(4) */ case IFT_INFINIBAND: /* if_infiniband.c */ { From nobody Fri Dec 19 19:57:17 2025 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 4dXyxQ5Hj2z6K8S1; Fri, 19 Dec 2025 19:57:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXyxQ1dcrz3Drd; Fri, 19 Dec 2025 19:57:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BJJvHjB091242; Fri, 19 Dec 2025 21:57:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BJJvHjB091242 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BJJvH3L091241; Fri, 19 Dec 2025 21:57:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Dec 2025 21:57:17 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dXyxQ1dcrz3Drd On Fri, Dec 19, 2025 at 10:07:37AM -0800, Gleb Smirnoff wrote: > On Fri, Dec 19, 2025 at 07:56:18PM +0200, Konstantin Belousov wrote: > K> On Fri, Dec 19, 2025 at 09:48:00AM -0800, Gleb Smirnoff wrote: > K> > On Fri, Dec 19, 2025 at 10:12:42AM -0500, Mark Johnston wrote: > K> > M> > > All known software in ports had been addressed three years ago and the > K> > M> > > shim stays in stable/14 and stable/15 for another couple years with its > K> > M> > > printf(), so all ourliers are expected to conform before 16.0-RELEASE. > K> > M> > > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. > K> > M> > So why breaking the binaries that users might have lingering around? > K> > M> > K> > M> Aside from that, with a PF_DIVERT socket sd it's not possible to call > K> > M> sd.recvfrom() in python (because python doesn't know which sockaddr > K> > M> subtype to use), whereas with a PF_INET divert socket it gives a > K> > M> sockaddr_in with an interface address, for inbound packets. > K> > > K> > This means my submission to python back in 2022 was missing couple lines. The > K> > Modules/socketmodule.c:makesockaddr() is missing a case. :( > K> > > K> > If people were not ignoring the warning message and switched to PF_DIVERT > K> > earlier, I would learn that my patch to python was missing a bit earlier. > K> > > K> > I will start a new submission to python. Usually they are very slow to accept. > K> > I'm fine if you revert e967a2a03677. But let's plan to remove it before > K> > stable/17. > K> Why? > > Because 99.9999% socket() syscalls specify correct domain/type tuple but still > do this check. 99% FreeBSD's don't event have ipdivert.ko loaded or added to > kernel config. And out of 1% that uses divert, 99% specify correct PF_DIVERT > domain, cause all known software had been addressed. > > K> Apparently, the feature is widely used by applications. It is even present > K> in python. Breaking it is abrupt and must be reverted. > > First, I am not removing any features. The divert(4) feature only get better > with my changes back in 2022. Second, python also knows about PF_DIVERT since > version 3.12. As Mark noted the patch to python wasn't complete and I'm working > on this now. So I'm fine with prolonging the compat shim, but not forever. We are discussing different things altogether. I am saying that you are breaking binary compatibility, and asking why. I do not see a reason. It has no relation to the fact that there are other ways to get the same behaviour from the system. The removal of that three lines breaks existing binaries. Also it does not matter that e.g. newer versions of some apps do not use that feature (feature as in binary interface, not a system behaviour). The existing binaries must continue to work. From nobody Fri Dec 19 20:17:04 2025 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 4dXzN371zrz6KBN9 for ; Fri, 19 Dec 2025 20:17:07 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXzN365bVz3H2B for ; Fri, 19 Dec 2025 20:17:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766175427; 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=rgwLRzZXm7+c1Tnm6HspPetyaXY6wsUCEa0DLw1Q1d8=; b=UIllD0rD+4IZuUkk8ORCODpewIjBer3OJjop/X6BGEDUvWFO96PsatSBei7ihO+8vl8SwJ 3C9mVeTF+s52ysI7wWW4EzDZDI/p/nZWnzS8zNUcK7M5J9RW/ai1Yrz8Mp2I5Eng1sgEpO DfuVL7px3+j9BOxTEV3JtWlpxZL96FE4FTeMKPx+Ug/8Ye9mUi8jyE6qpmXYOptvuJVZO0 o3SxIvTvLWAr9WLGSeVe22lrzrc/1vBQcq1TbFsSLAKG43eOdytlknreLGkIXQGzKelbKV A7EK+ttPmhHXBaYM5QKK3eoNSXec+s19q2MFDYTXjvCw8pl+m8tE9LtDCQSYOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766175427; 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=rgwLRzZXm7+c1Tnm6HspPetyaXY6wsUCEa0DLw1Q1d8=; b=Rhk1OmSIa/CpZ6GoL9EOqzJ4rj3cLhT+SceevMbNNsBV+uKQvvH2+uoN+8wrpQ2O2jv/8r 5yeJ2qFHFOy46Co6k9wBIBvlsPhe8qpyRNptH7OSPnAOlMkrHWVE85pOUKCM7lX15x7SKk aPdI1h1j2SEf7tsrrkp8YBtw1QATKeoMOS64YM1ic7ME+iACvtFh+fa2rqkfluN505UeMZ vvAfFoX/UE/ZOy2dcfaK3Vy+BT8R5l9+l5Z7xIupAu+aHgnUQNXZF+UlIgLBdkCdfI8Dif 6jgh+2W6tUipAeJKG7LXdYjkRdL4Sj0Q03ptKAxXCYbImE3MYJ5Yn6K3sGqZpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766175427; a=rsa-sha256; cv=none; b=aICDFLlwy3iNizPePe1PbNSRV+F9vQdq3bpOyxyYkJdpUehXe7lzeq4CJq0vdCsjMlBhnM MlX5LZ7clf/NmjRt8gz2Xvu+zccSYWNnewsHBJ4C4MO5+45R6mxmVltIcSVW8iYXFMhi+i csDlMR9w7dI4wt1x5eyj5kbH1DjzCRZn112/06/OLrXEmZLZC4qTYcq/Q4mlUSL5nj3Bxu lESaem+xTSA6Q9RsxkHE6zJLWlSwLq5janXvqd+JWcQp9S6PRB9xe7vOsgaVqJjOGi9aDR veBLN/ssuz9VSoNOwdwtaf1WrjNr5rf4XJsl0dytXpHXziwC4kZpLLi9F76H2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dXzN35Nf6z7C8 for ; Fri, 19 Dec 2025 20:17:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38dfc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 20:17:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: f8cee1f2c2df - main - Import latest mtree from NetBSD 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8cee1f2c2dfba6223385fd711cce9faeca76451 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 20:17:04 +0000 Message-Id: <6945b2c0.38dfc.113800ae@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f8cee1f2c2dfba6223385fd711cce9faeca76451 commit f8cee1f2c2dfba6223385fd711cce9faeca76451 Merge: fe53a8a82c81 eb2ccba0c11b Author: Jose Luis Duran AuthorDate: 2025-12-19 20:14:35 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-19 20:14:35 +0000 Import latest mtree from NetBSD Merge commit 'eb2ccba0c11b405ac613c3046997765317cc8b5c' PR: 192839 PR: 219467 MFC after: 1 week contrib/mtree/compare.c | 16 ++++++---------- contrib/mtree/create.c | 7 ++++--- contrib/mtree/mtree.c | 36 ++++++++++++++++++++++-------------- contrib/mtree/spec.c | 25 +++++++++++-------------- 4 files changed, 43 insertions(+), 41 deletions(-) From nobody Fri Dec 19 20:18:04 2025 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 4dXzPD4Pxyz6KBVV; Fri, 19 Dec 2025 20:18:08 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXzPD2wPNz3HHV; Fri, 19 Dec 2025 20:18:08 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766175488; 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=2RLsuhhiTflY+kqa8u3Vdk37rlF6TJtH6Y2EnK722FU=; b=KyhaSSZb1aUAXsHF694zS9yCXcncVxoxjcvtrJKIDWdNkck0s2EvyHlvgfIddHL25QkoIe DGJuxVWfVNoLv1vhOyelG0ms7I1OeihQJBvoytXzD0/oyrtJHDFeoyX3vLTZM8xtqZk3CK veUeypvjeTiN0LncP46+zefzoLmFPGx6YEb06pijIE8bmdO0k7HV82/vENC0g6EOS8+WNS OK0tgqAJUyBK/uKW95Si9JCpxHo5A59gNE16DK1BUCliS9r1+l7BOkNNTphXnos0lUdopO +PN16uulG1tj7FwzXwy7p3PA4i5cse9gL7Q4vRa2oDKKZPKv5mQhmA0urhozbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766175488; 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=2RLsuhhiTflY+kqa8u3Vdk37rlF6TJtH6Y2EnK722FU=; b=LfGdHnfQF8pEbRRgHyotoCllLymLnQknMrPRZO0lW1zPASsip7Y5lhGrcF8bOozq5UGT1b 81tMURx5XYwAixgbdEzq9vXrAm6/XNG0yYXmCt/dyskBg3eF5FV9EjUndsmDH6pxdWzbu/ z8GyS2yEg4JXkfYrYarrQ7Um358UI5EdsUkjgsCiv0knII5oeij5LJnZkyB2jCdO0hqKrr YiOINEpMZargGTG7xRPI7mXcV6TqWEXCFeA++LQljgF4vXaJL/OUw6ZtRcuPQ4lhohMAQT 4hh1AdOVkXoeQigOnqBYMlkGQV2LdU2UF/J6COcsIzFhkhejdts3FCLVgl+bKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766175488; a=rsa-sha256; cv=none; b=M09JjP6RXgc80limNvL1jt3C1vAHKm29maynXjE6G8BwmFYvvsGAEXa/ONCmYypKnSV62I BeT+rtPOE0D8aG1ECv93ZgKdrYIcpd4tk1j590P+dlfMms80E+VMtVF3ynR7tUHXXUlyKk oZMYqAzC8kqx8t8d3O/Vtp6308V89L1Oam3NajeOX6vJBBZytg3cq6j11u254e9DfiOjlB +IcVJODyfHeSVR28C8RwEcvv+W773mlNkJWijGILpFUmeBsGZmv6q9P4PbzGCKXFn01tt5 X5EfYIh+ST0vCS7j9WsDP6+LXl1+8emHDMH3zJwGkUMTr7ibpI4ACZLyuCV8Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dXzPC3kmzztQP; Fri, 19 Dec 2025 20:18:07 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 12:18:04 -0800 From: Gleb Smirnoff To: Konstantin Belousov Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Dec 19, 2025 at 09:57:17PM +0200, Konstantin Belousov wrote: K> We are discussing different things altogether. K> K> I am saying that you are breaking binary compatibility, and asking why. K> I do not see a reason. K> K> It has no relation to the fact that there are other ways to get the same K> behaviour from the system. The removal of that three lines breaks existing K> binaries. Also it does not matter that e.g. newer versions of some apps K> do not use that feature (feature as in binary interface, not a system K> behaviour). The existing binaries must continue to work. We already have had this argument before for a different kind of issue - POLLINIGNEOF. The existence of such binaries is like existence the the God. You can't prove they exist. I can't prove they do not exist. You advocate for the compat shim to exist forever. I advocate to limit it existence to some countable number of years. For this particular case all open source software had been addressed. There are no known shareware binaries in the wild that used AF_INET/IPPROTO_DIVERT. Those hypothethical binaries that we can't prove/refute existence of in some corporate environments would print a warning on 14.x and on 15.x providing a time to their owners to recompile. If we speculate that somewhere in the universe exists a corporate body that uses AF_INET/IPPROTO_DIVERT tuple in their internal software and have lost its source code, they have a solution. The solution is a tiny preloaded library that would intercept socket(2). Of course you may say that somewhere in the world exists a closed ecosystem that uses AF_INET/IPPROTO_DIVERT in a binary AND the sources for the binary were lost AND the binary is statically compiled. If you decide to go that deep into the rabbit hole, I would reply that owners of such a binary should bit hack it to use the correct tuple before call to socket(2). -- Gleb Smirnoff From nobody Fri Dec 19 20:37:57 2025 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 4dXzrK3SYfz6KDg1; Fri, 19 Dec 2025 20:38:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXzrJ5qbHz3KX0; Fri, 19 Dec 2025 20:38:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BJKbvIo093268; Fri, 19 Dec 2025 22:38:00 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BJKbvIo093268 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BJKbvoI093267; Fri, 19 Dec 2025 22:37:57 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Dec 2025 22:37:57 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dXzrJ5qbHz3KX0 On Fri, Dec 19, 2025 at 12:18:04PM -0800, Gleb Smirnoff wrote: > On Fri, Dec 19, 2025 at 09:57:17PM +0200, Konstantin Belousov wrote: > K> We are discussing different things altogether. > K> > K> I am saying that you are breaking binary compatibility, and asking why. > K> I do not see a reason. > K> > K> It has no relation to the fact that there are other ways to get the same > K> behaviour from the system. The removal of that three lines breaks existing > K> binaries. Also it does not matter that e.g. newer versions of some apps > K> do not use that feature (feature as in binary interface, not a system > K> behaviour). The existing binaries must continue to work. > > We already have had this argument before for a different kind of issue - > POLLINIGNEOF. The existence of such binaries is like existence the the God. > You can't prove they exist. I can't prove they do not exist. You advocate for > the compat shim to exist forever. I advocate to limit it existence to some > countable number of years. > > For this particular case all open source software had been addressed. There > are no known shareware binaries in the wild that used AF_INET/IPPROTO_DIVERT. I do not understand this statement. It was demonstrated in this thread that python had it. > Those hypothethical binaries that we can't prove/refute existence of in some > corporate environments would print a warning on 14.x and on 15.x providing a > time to their owners to recompile. If we speculate that somewhere in the > universe exists a corporate body that uses AF_INET/IPPROTO_DIVERT tuple in > their internal software and have lost its source code, they have a solution. > The solution is a tiny preloaded library that would intercept socket(2). Of > course you may say that somewhere in the world exists a closed ecosystem that > uses AF_INET/IPPROTO_DIVERT in a binary AND the sources for the binary were > lost AND the binary is statically compiled. If you decide to go that deep into > the rabbit hole, I would reply that owners of such a binary should bit hack it > to use the correct tuple before call to socket(2). No. You abruptly break binary compatibility and claim that this is fine. It is not. From nobody Fri Dec 19 20:46:20 2025 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 4dY01n2C2Xz6KFGc for ; Fri, 19 Dec 2025 20:46:21 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dY01n1gnjz3MCg for ; Fri, 19 Dec 2025 20:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766177181; 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=yiz8XWw1qSpjYKWTBgy174vZwT9BO57m4GZarQVjrgM=; b=bvZ1NMluS51emVGCZ7BNg47PA4+Wv/MhDjvaJ3Y5RsCdqkMiqxoCUnbIFdlmbBd2QzE/UK ylVsXCaFYEdPEowFYeerTmcbAYPf+3qkwjGpWKVdjMqPQEmVBjt+hDXlXp9OwXY2hqF8JB gL6/dL1oRH56hD5oT8RPQK+X0WuhldppEokueFJoYO4OlUtpmzOEZzfuGv8ZiBf1jv9Xls MrVer9h3rGZzhb9u/1+F1PY6jPQENG/PaFFYY4K37f3Q04jLvEtARr03kVTLHOaHjSSRZY KM4QynTb/02Uwv2TcU44s29GUlIv2RJednmtdwhP/MUbA3uhPxRxqMu5po4uDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766177181; 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=yiz8XWw1qSpjYKWTBgy174vZwT9BO57m4GZarQVjrgM=; b=UvZYMwZcAO1lRfIUze+OeDXcU2ePQ6N2H+WNUYWBCKnjiQk8HT64R1YinFJ5e28SXTOf8N xD5zUbze5+h/Dbx6kvV4xmP3ms7xtZ9zxwkpzeGrKkFp+6ZOJK5DLNkIVJpH0BVrLThXut x9Mn07jEEpYzz62qRNfVY0rUj34TC9yi+W4o5+TSbN0+1LICLoyeRgEf2RUKh9BMIBRmJ3 wF4bUm+hXNu/gN0FMx5rj7Ii7z5v8HsbXfM+UisDOQASizAeJgdwcs+f4Cxm9VvRggJtl1 XwQvfnGxcUYuCPG0W4KkMV0J0Lk9k25K8EmI/7HTHZQN1MBugf2TNj99GSlIZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766177181; a=rsa-sha256; cv=none; b=uYbLsdA/ZGahajFrJ9atK+o6ADzKvkoOjnjWpdN74J+tiphjWqZo+Br1cgrx1pFpVUPBC3 gdt+JxgT0VAFJcTvRApkVWAkbenkzoFbD6ncWWlcNQQrExQgBOGxIjqymOTRC/Oi0CTW6K tDlrEeqhCoAURxQdamFCjSEJ1YXltQyKgGA6uNd+nGj/70E70wX23uAYco0nzwWYm+TLk8 ISPs+dOOZRatNQUN9bOrDYh/X+RmZt+LfG9aLKrZuyVzL+uJ+3A4g1o+5BhwQz82yrgthi AaWBeXHTcTyPBsYQxuzLt2EJ6gboxyKqA4bHeeOjLE6R4yfjspRtepCSgZ9edw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dY01n0kDkz8VF for ; Fri, 19 Dec 2025 20:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a35b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 20:46:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 546d3d08e599 - main - zfs: merge openzfs/zfs@962e68865 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 546d3d08e5993cbe2d6141b256e8c2ebad5aa102 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 20:46:20 +0000 Message-Id: <6945b99c.3a35b.342f089@gitrepo.freebsd.org> The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=546d3d08e5993cbe2d6141b256e8c2ebad5aa102 commit 546d3d08e5993cbe2d6141b256e8c2ebad5aa102 Merge: f8cee1f2c2df 962e68865e4a Author: Martin Matuska AuthorDate: 2025-12-19 20:44:42 +0000 Commit: Martin Matuska CommitDate: 2025-12-19 20:45:10 +0000 zfs: merge openzfs/zfs@962e68865 Notable upstream pull request merges: #16307 1d43387dd zdb: Add -O option for -r to specify object-id #17965 a62c62120 ARC: Pre-convert zfs_arc_min_prefetch_ms #17970 d393166c5 ARC: Increase parallel eviction batching #17981 20f09eae4 ZIO: ZIO_STAGE_DDT_WRITE is a blocking stage #17983 ff47dd35e Fix ddtprune causing space leak #18015 86b064469 FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync() (already merged) #18020 ff47dd35e Ensure 64-bit `off_t` is used in user space instead of `loff_t` #18028 09492e0f2 Reduce dataset buffers re-dirtying #18033 f72fd378c Defer async destroys on pool import #18043 3d76ba273 Improve async destroy processing timing #18044 46d6f1fe5 DDT: Move logs searches out of the lock #18047 ff5414406 DDT: Switch to using ZAP _by_dnode() interfaces #18048 3b1ff816b DDT: Add/use zap_lookup_length_uint64_by_dnode() #18055 22e89aca8 DDT: Fix compressed entry buffer size #18059 0550abd4b RAIDZ: Remove some excessive logging #18060 a83bb15fc Reduce minimal scrub/resilver times #18061 962e68865 Use reduced precision for scan times #18063 051a8c749 Bypass snprintf() in quota checks if no quotas set #18064 7ff329ac2 Fix rangelock test for growing block size Obtained from: OpenZFS OpenZFS commit: 962e68865e4a569a8a51a07a45dcae7c33cdca78 .../.github/workflows/scripts/qemu-1-setup.sh | 14 + .../.github/workflows/scripts/qemu-2-start.sh | 7 - .../.github/workflows/zfs-qemu-packages.yml | 5 - sys/contrib/openzfs/.github/workflows/zfs-qemu.yml | 8 +- sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 11 +- sys/contrib/openzfs/config/kernel-kasan-enabled.m4 | 23 + sys/contrib/openzfs/config/kernel.m4 | 2 + sys/contrib/openzfs/config/user-largefile.m4 | 21 + sys/contrib/openzfs/config/user.m4 | 1 + sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 655 +++++++++++---------- sys/contrib/openzfs/etc/default/zfs.in | 4 + sys/contrib/openzfs/etc/zfs/zfs-functions.in | 24 +- sys/contrib/openzfs/include/sys/ddt.h | 11 +- sys/contrib/openzfs/include/sys/ddt_impl.h | 31 +- sys/contrib/openzfs/include/sys/dsl_scan.h | 2 +- sys/contrib/openzfs/include/sys/zap.h | 6 + sys/contrib/openzfs/include/sys/zap_impl.h | 3 +- sys/contrib/openzfs/include/sys/zfs_file.h | 11 + sys/contrib/openzfs/include/sys/zio_impl.h | 3 +- sys/contrib/openzfs/lib/libspl/include/sys/kstat.h | 2 +- sys/contrib/openzfs/lib/libspl/include/sys/types.h | 15 - sys/contrib/openzfs/lib/libspl/kstat.c | 2 +- sys/contrib/openzfs/man/man4/zfs.4 | 31 +- sys/contrib/openzfs/man/man8/zdb.8 | 11 + sys/contrib/openzfs/module/Kbuild.in | 1 + .../openzfs/module/os/freebsd/zfs/zfs_znode_os.c | 7 +- sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 33 +- .../openzfs/module/os/linux/zfs/kasan_compat.c | 48 ++ .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 142 +++-- sys/contrib/openzfs/module/os/linux/zfs/zfs_uio.c | 10 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 1 - .../openzfs/module/os/linux/zfs/zfs_znode_os.c | 7 +- sys/contrib/openzfs/module/zfs/abd.c | 16 +- sys/contrib/openzfs/module/zfs/arc.c | 93 +-- sys/contrib/openzfs/module/zfs/ddt.c | 169 +++--- sys/contrib/openzfs/module/zfs/ddt_log.c | 32 +- sys/contrib/openzfs/module/zfs/ddt_zap.c | 70 ++- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 6 +- sys/contrib/openzfs/module/zfs/dsl_scan.c | 113 ++-- sys/contrib/openzfs/module/zfs/spa.c | 2 +- sys/contrib/openzfs/module/zfs/spa_misc.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 16 - sys/contrib/openzfs/module/zfs/zap.c | 5 +- sys/contrib/openzfs/module/zfs/zap_micro.c | 80 ++- sys/contrib/openzfs/module/zfs/zfs_quota.c | 8 +- sys/contrib/openzfs/module/zfs/zio.c | 23 +- sys/contrib/openzfs/scripts/commitcheck.sh | 4 +- sys/contrib/openzfs/scripts/paxcheck.sh | 4 +- sys/contrib/openzfs/tests/runfiles/common.run | 5 +- sys/contrib/openzfs/tests/runfiles/sanity.run | 2 +- .../tests/zfs-tests/cmd/clone_mmap_cached.c | 7 +- .../openzfs/tests/zfs-tests/cmd/clone_mmap_write.c | 7 +- .../openzfs/tests/zfs-tests/cmd/clonefile.c | 23 +- .../openzfs/tests/zfs-tests/include/libtest.shlib | 2 - .../openzfs/tests/zfs-tests/tests/Makefile.am | 2 + .../tests/functional/dedup/dedup_prune_leak.ksh | 86 +++ .../tests/functional/snapshot/snapshot_019_pos.ksh | 82 +++ .../functional/zvol/zvol_misc/zvol_misc_fua.ksh | 18 +- sys/modules/zfs/zfs_config.h | 24 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 61 files changed, 1340 insertions(+), 717 deletions(-) diff --cc sys/contrib/openzfs/config/kernel-kasan-enabled.m4 index 000000000000,71b2419995b6..71b2419995b6 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-kasan-enabled.m4 +++ b/sys/contrib/openzfs/config/kernel-kasan-enabled.m4 diff --cc sys/contrib/openzfs/config/user-largefile.m4 index 000000000000,e9e576f86885..e9e576f86885 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/user-largefile.m4 +++ b/sys/contrib/openzfs/config/user-largefile.m4 diff --cc sys/contrib/openzfs/module/os/linux/zfs/kasan_compat.c index 000000000000,d0faf5caf9a7..d0faf5caf9a7 mode 000000,100644..100644 --- a/sys/contrib/openzfs/module/os/linux/zfs/kasan_compat.c +++ b/sys/contrib/openzfs/module/os/linux/zfs/kasan_compat.c diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh index 000000000000,ca281cc3fcda..ca281cc3fcda mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapshot/snapshot_019_pos.ksh index 000000000000,c8a1a8a7b571..c8a1a8a7b571 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapshot/snapshot_019_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapshot/snapshot_019_pos.ksh diff --cc sys/modules/zfs/zfs_config.h index db7672000d8b,000000000000..41d529acf50e mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,895 -1,0 +1,913 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* __assign_str() has one arg */ +/* #undef HAVE_1ARG_ASSIGN_STR */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* backtrace() is available */ +/* #undef HAVE_BACKTRACE */ + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_file_open_by_path() exists */ +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* bdev_nr_bytes() is available */ +/* #undef HAVE_BDEV_NR_BYTES */ + +/* bdev_open_by_path() exists */ +/* #undef HAVE_BDEV_OPEN_BY_PATH */ + +/* bdev_release() exists */ +/* #undef HAVE_BDEV_RELEASE */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* __blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */ + +/* __blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */ + +/* blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() exists */ +/* #undef HAVE_BLKDEV_PUT */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* struct queue_limits has a features field */ +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_disk() exists and takes 2 args */ +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue hardware context is cached in struct request */ +/* #undef HAVE_BLK_MQ_RQ_HCTX */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* backing_dev_info is available through queue gendisk */ +/* #undef HAVE_BLK_QUEUE_DISK_BDI */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if getgeo() in block_device_operations takes struct gendisk * as its + first arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* 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 */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* 3-arg dequeue_signal() takes a type argument */ +/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* dops->d_revalidate() takes 4 args */ +/* #undef HAVE_D_REVALIDATE_4ARGS */ + +/* Define if d_set_d_op() is available */ +/* #undef HAVE_D_SET_D_OP */ + +/* Define to 1 if you have the 'execvpe' function. */ +#define HAVE_EXECVPE 1 + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* file->f_version exists */ +/* #undef HAVE_FILE_F_VERSION */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* GENHD_FL_EXT_DEVT flag is available */ +/* #undef HAVE_GENHD_FL_EXT_DEVT */ + +/* GENHD_FL_NO_PART flag is available */ +/* #undef HAVE_GENHD_FL_NO_PART */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the 'gettid' function. */ +/* #undef HAVE_GETTID */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* mnt_idmap does not have user_namespace */ +/* #undef HAVE_IDMAP_NO_USERNS */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_generic_drop() exists */ +/* #undef HAVE_INODE_GENERIC_DROP */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() returns struct dentry* */ +/* #undef HAVE_IOPS_MKDIR_DENTRY */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_get_pages2() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES2 */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* Define to 1 if you have the 'issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* iter_is_ubuf() is available */ +/* #undef HAVE_ITER_IS_UBUF */ + ++/* kasan_enabled() is GPL-only */ ++/* #undef HAVE_KASAN_ENABLED_GPL_ONLY */ ++ +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel defines intptr_t */ +/* #undef HAVE_KERNEL_INTPTR_T */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* strlcpy() exists */ +/* #undef HAVE_KERNEL_STRLCPY */ + +/* kernel has kmap_local_page */ +/* #undef HAVE_KMAP_LOCAL_PAGE */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [unwind] */ +/* #undef HAVE_LIBUNWIND */ + +/* libunwind has unw_get_elf_filename */ +/* #undef HAVE_LIBUNWIND_ELF */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* building against unsupported kernel version */ +/* #undef HAVE_LINUX_EXPERIMENTAL */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* PG_error flag is available */ +/* #undef HAVE_MM_PAGE_FLAG_ERROR */ + +/* page_mapping() is available */ +/* #undef HAVE_MM_PAGE_MAPPING */ + +/* page_size() is available */ +/* #undef HAVE_MM_PAGE_SIZE */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* Define if ns_type is accessible through ns_common */ +/* #undef HAVE_NS_COMMON_TYPE */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* readahead_page() exists */ +/* #undef HAVE_PAGEMAP_READAHEAD_PAGE */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* pin_user_pages_unlocked() is available */ +/* #undef HAVE_PIN_USER_PAGES_UNLOCKED */ + +/* proc_handler ctl_table arg is const */ +/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* If available, contains the Python version number currently in use. */ +/* #undef HAVE_PYTHON */ + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_sz exists */ +/* #undef HAVE_REGISTER_SYSCTL_SZ */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* Define if set_default_d_op() is available */ +/* #undef HAVE_SET_DEFAULT_D_OP */ + +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* sops->free_inode() exists */ +/* #undef HAVE_SOPS_FREE_INODE */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* STACK_FRAME_NON_STANDARD asm macro is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD_ASM */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* statx() is available */ +/* #undef HAVE_STATX */ + +/* STATX_MNT_ID is available */ +/* #undef HAVE_STATX_MNT_ID */ + +/* 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 the 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + +/* have super_block s_shrink pointer */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ + +/* have super_block s_wb_err */ +/* #undef HAVE_SUPER_BLOCK_S_WB_ERR */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* 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 + +/* timer_delete_sync is available */ +/* #undef HAVE_TIMER_DELETE_SYNC */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the 'udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +#ifdef __amd64__ +/* Define if host toolchain supports VAES */ +#define HAVE_VAES 1 +#endif + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* migratepage exists */ +/* #undef HAVE_VFS_MIGRATEPAGE */ + +/* migrate_folio exists */ +/* #undef HAVE_VFS_MIGRATE_FOLIO */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->remap_file_range() is available */ +/* #undef HAVE_VFS_REMAP_FILE_RANGE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* splice_copy_file_range() is available */ +/* #undef HAVE_VFS_SPLICE_COPY_FILE_RANGE */ + +/* address_space_operations->writepage exists */ +/* #undef HAVE_VFS_WRITEPAGE */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +#ifdef __amd64__ +/* Define if host toolchain supports VPCLMULQDQ */ +#define HAVE_VPCLMULQDQ 1 +#endif + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* write_cache_pages() is available */ +/* #undef HAVE_WRITE_CACHE_PAGES */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() takes mnt_idmap */ +/* #undef HAVE_XATTR_SET_IDMAP */ + +/* xattr_handler->set() takes user_namespace */ +/* #undef HAVE_XATTR_SET_USERNS */ + +/* Define if host toolchain supports XSAVE */ +#define HAVE_XSAVE 1 + +/* Define if host toolchain supports XSAVEOPT */ +#define HAVE_XSAVEOPT 1 + +/* Define if host toolchain supports XSAVES */ +#define HAVE_XSAVES 1 + +/* ZERO_PAGE() is GPL-only */ +/* #undef HAVE_ZERO_PAGE_GPL_ONLY */ + +/* Define if you have [z] */ +#define HAVE_ZLIB 1 + +/* libunwind is llvm libunwind */ +/* #undef IS_LIBUNWIND_LLVM */ + +/* kernel exports FPU functions */ +/* #undef KERNEL_EXPORTS_X86_FPU */ + +/* TBD: fetch(3) support */ +#if 0 +/* whether the chosen libfetch is to be loaded at run-time */ +#define LIBFETCH_DYNAMIC 1 + +/* libfetch is fetch(3) */ +#define LIBFETCH_IS_FETCH 1 + +/* libfetch is libcurl */ +#define LIBFETCH_IS_LIBCURL 0 + +/* soname of chosen libfetch */ +#define LIBFETCH_SONAME "libfetch.so.6" +#endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* make_request_fn() return type */ +/* #undef MAKE_REQUEST_FN_RET */ + ++/* The size of 'off_t', as computed by sizeof. */ ++/* #undef SIZEOF_OFF_T */ ++ +/* using complete_and_exit() instead */ +/* #undef SPL_KTHREAD_COMPLETE_AND_EXIT */ + +/* Defined for legacy compatibility. */ +#define SPL_META_ALIAS ZFS_META_ALIAS + +/* Defined for legacy compatibility. */ +#define SPL_META_RELEASE ZFS_META_RELEASE + +/* Defined for legacy compatibility. */ +#define SPL_META_VERSION ZFS_META_VERSION + +/* pde_data() is PDE_DATA() */ +/* #undef SPL_PDE_DATA */ + +/* 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 SYSTEM_FREEBSD 1 + *** 70 LINES SKIPPED *** From nobody Fri Dec 19 20:51:00 2025 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 4dY07G6VV8z6KFlK; Fri, 19 Dec 2025 20:51:06 +0000 (UTC) (envelope-from glebius@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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dY07G46nLz3Mkw; Fri, 19 Dec 2025 20:51:06 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766177466; 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=EE1HlVvQ0rsVybdQEXcvH2MXisI3ldoSbjo+vDjTW1M=; b=kOebvP9XQdvkYBbfuBygHXGIneo71GCSj3ZugUdeVI0/hK+Uimy+Ig0JS9Gc0KOtpn663s /4NRIbSYkZtvPLyIGaS381L6EgC+Gjuq8s3QxT2MnIm1V+rWb/2OPHSy5+owND2bUFn9ni oTgR32B69+PDXXh+iHYJKngkhgYW4iBYpPvim8xOeqJP+BISBWtXRc+rlIERS9QP3uZVKN HerzyQu2R6tGm+WGR10PY5plZLS3PF3J3DtewTAbaOGDC92TBHmTZlsflqpsJEy08pEVRE 0leydAhqA9jSOoPbS9iDEWmF5h+/6jLmwWlnnxPguBDMgzabgU0LoHojjAaNdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766177466; 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=EE1HlVvQ0rsVybdQEXcvH2MXisI3ldoSbjo+vDjTW1M=; b=ye9b+OWaqv++znlQIFXVVY4fUTmmKeq3hRlUo2p6P+I5f/b0fnqNd/bWvORQKJGk5k8EQ0 nuh0kEjVpXkzwiNGn+c4MMXPngiySUTKIFrIskcCIXQlV7ZIGOBmDSQA0h7R310+tCM/Qa oHmkd8oCkCnuxX4sfFkxdj2efu9wZPBLCsGlWOCBSG3e6p70lbIs1kecOJ0loSD2Bu+R2N f6GS2yPkoWrOeLqmb6TTIO9M3tKrZLLc2MLRyLkrrD/9cm2IhuMFu4OjyjRedahgbVh3bA yWsnQzcQnGvtXkXnGkbKv144cOc/oBuZqynjkO6C8jOXHECIWY732Eue5+47gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766177466; a=rsa-sha256; cv=none; b=BqnHORo7VuKj5j8zqaPM8BM7xyvFo3zUMiSVHAGYjH1UOKT8AUwVTKw/vCgEaaezNSqSZF 8co1ehm/SGVu2oJ5jZajWbJ9wVKFK1FSurulunNoRHl3K1nH1AlUyHL7u7TiE+tj+SU9/1 vg7ecsTJ4bD3JSrHvJQloCdTk5ay2hS27+di1hJnlf3WYLaGdR1pHmV3SQjaA2vGXnjH/V xhiIbn6MDUQJ7vRlkoMGnpQFGBvJwpYqwe4Y22TFcQlsxQVJBcHvxSMGtfnF7oueASvRRp El3DsKSGg4Ko5/9Rcm51nYFByx9GbyqAAJjs6fg1s0w9SLCn0v123DsX+tAtvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dY07F5c74ztx2; Fri, 19 Dec 2025 20:51:05 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 12:51:00 -0800 From: Gleb Smirnoff To: Konstantin Belousov Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Dec 19, 2025 at 10:37:57PM +0200, Konstantin Belousov wrote: K> > K> It has no relation to the fact that there are other ways to get the same K> > K> behaviour from the system. The removal of that three lines breaks existing K> > K> binaries. Also it does not matter that e.g. newer versions of some apps K> > K> do not use that feature (feature as in binary interface, not a system K> > K> behaviour). The existing binaries must continue to work. K> > K> > We already have had this argument before for a different kind of issue - K> > POLLINIGNEOF. The existence of such binaries is like existence the the God. K> > You can't prove they exist. I can't prove they do not exist. You advocate for K> > the compat shim to exist forever. I advocate to limit it existence to some K> > countable number of years. K> > K> > For this particular case all open source software had been addressed. There K> > are no known shareware binaries in the wild that used AF_INET/IPPROTO_DIVERT. K> I do not understand this statement. It was demonstrated in this thread K> that python had it. Python itself doesn't use divert(4). It allows scripts to open the divert sockets using constants instead of numbers, that's all. It is not the python but legacy scripts that use the old PF_INET/IPPROTO_DIVERT tuple that need adjustment. Python knows PF_DIVERT constant since 3.12. In our ports it is patched to know PF_DIVERT for all possible versions in ports. What Mark pointed out is that python's support of PF_DIVERT is not complete, wrt recvfrom method. I'm working on fixing it. I'm fine with prolonging existence of the shim until python 3.11 goes out of support, which is 2027-10. K> > Those hypothethical binaries that we can't prove/refute existence of in some K> > corporate environments would print a warning on 14.x and on 15.x providing a K> > time to their owners to recompile. If we speculate that somewhere in the K> > universe exists a corporate body that uses AF_INET/IPPROTO_DIVERT tuple in K> > their internal software and have lost its source code, they have a solution. K> > The solution is a tiny preloaded library that would intercept socket(2). Of K> > course you may say that somewhere in the world exists a closed ecosystem that K> > uses AF_INET/IPPROTO_DIVERT in a binary AND the sources for the binary were K> > lost AND the binary is statically compiled. If you decide to go that deep into K> > the rabbit hole, I would reply that owners of such a binary should bit hack it K> > to use the correct tuple before call to socket(2). K> No. You abruptly break binary compatibility and claim that this is fine. K> It is not. Can you please elaborate what question are you answering with "No"? If you think that my deprecation was too abrupt, can you please suggest your deprecation plan? -- Gleb Smirnoff From nobody Fri Dec 19 21:17:25 2025 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 4dY0jf1Gf8z6KJhr for ; Fri, 19 Dec 2025 21:17: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dY0jd6BFpz3RQF for ; Fri, 19 Dec 2025 21:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766179045; 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=acvOcDxtFAeg/ki+FRt97W9nx/RSKsqazs68use/cNU=; b=HAguqOPuHCfPKRU7jdl9fqLHLjl1y4lvNHy+Sm2nxbUyvV+d5zP/i+ri0xE8ejT7Zwljfl r70EkqK1TQB+ffJEJl8gWaHJifPcNCmpHoN3MRvUFVaiGbPIMz7Yjj1bzVoeW4l4nd0nmO iJKvTdkYEmGHbZVyPuUUpFwgxNTBD3+tFbiq1nb8C2KlaRDgZN/xU6m1qGCMJaAQxR8hLO KSt9TfyHVis210cQ31pDksyiWL1d7gmnDPjEBVB7kg5Msgx5jvedGM1gkIGB6N4hwl6hj5 sxBaGi/QHoBG2UEPXNAaKG0paZUKYgWt/LaUJpjpk9KC+KdEjP1eu9ondNg8NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766179045; 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=acvOcDxtFAeg/ki+FRt97W9nx/RSKsqazs68use/cNU=; b=t4NEEh4OT9AEqKnMoZR3W9tzOPHGPHCai13kfRHXtfi6dgs/lE61I33OE1TXVy12/gAQDm KxOLRPYVxAW390u3FZESLJFp+8w05DmGFz1corcEPjpZrx+FnTWgr5Kw2V0uw7LEnUn1DL CaqDEIkFWZiW/kd8tLv4vgTHtTjefCRUzudqIGOiZNoifZKHcTZH+5OHZkZGWEEqKlSi4s U1ZijWsbEecC2rsofpq1hOc1sRkAPJwn9BYjhrkJgyE2rp3PpUK3OFI3jqdX/AL5EmBM0x Ilsmaqyxuol6RQvW87YShmmacyU6noPl0qXRcEagVw04db7oDBHLVls5YG6lCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766179045; a=rsa-sha256; cv=none; b=i7z1hbmNjPm42RTQlvBWTJ7pN4VndTzQ4vC7rRCpYr54Sf6PYwKLkANq9KQ6QoN/LFKuX+ xFy46IxRQd/AUrb1N8PGwIdfRcpth+LsWULqK9GnKwAyy1K1pK8BXnY2Rt2IexS0Q8qyVW aVqWWJ/v/tp+YLUkdSljKkX4eakFh+LPzeWi4no7rR5KFdWp1qZT2fDfBJDMYiMWv3rLSx NiJxPhwfEHjuf6Q1jc08UGJJ6ohDM3EWZxt7NVED5FJ5+6UdHYai2ZGWfxpH1G0Yj9Aq4o yZ856k6Y3vKAxInppkuyUBW24HYvHj3a4EIwwK6I5nTKCQd9ufZE6hC4ZCcGTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dY0jd5c4Cz83Y for ; Fri, 19 Dec 2025 21:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cec0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 21:17:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 27aa23cee810 - main - sys/bitcount.h: add __const_bitcount 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: 27aa23cee81088b0ffa974eec9f03c654c36438e Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 21:17:25 +0000 Message-Id: <6945c0e5.3cec0.254dfc3e@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=27aa23cee81088b0ffa974eec9f03c654c36438e commit 27aa23cee81088b0ffa974eec9f03c654c36438e Author: Bjoern A. Zeeb AuthorDate: 2025-09-15 23:54:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-12-19 21:16:20 +0000 sys/bitcount.h: add __const_bitcount Add a version of __const_bitcount which can be used to get the numbers at compile-time when __builtin_popcountg() is not available (see sys/compat/linuxkpi/common/include/linux/bitops.h for LLVM before 19 and gcc before 14). Obtained from: https://reviews.freebsd.org/D50995#1174884 by obiwac Sponsored by: The FreeBSD Foundation Reviewed by: brooks, emaste Differential Revision: https://reviews.freebsd.org/D54301 --- sys/sys/bitcount.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/sys/bitcount.h b/sys/sys/bitcount.h index 171425032680..919dc4be06fc 100644 --- a/sys/sys/bitcount.h +++ b/sys/sys/bitcount.h @@ -39,6 +39,28 @@ #include +#define __const_bitcount8(x) ( \ + !!((x) & (1 << 0)) + \ + !!((x) & (1 << 1)) + \ + !!((x) & (1 << 2)) + \ + !!((x) & (1 << 3)) + \ + !!((x) & (1 << 4)) + \ + !!((x) & (1 << 5)) + \ + !!((x) & (1 << 6)) + \ + !!((x) & (1 << 7))) + +#define __const_bitcount16(x) ( \ + __const_bitcount8(x) + \ + __const_bitcount8((x) >> 8)) + +#define __const_bitcount32(x) ( \ + __const_bitcount16(x) + \ + __const_bitcount16((x) >> 16)) + +#define __const_bitcount64(x) ( \ + __const_bitcount32(x) + \ + __const_bitcount32((x) >> 32)) + #ifdef __POPCNT__ #define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) #define __bitcount32(x) __builtin_popcount((__uint32_t)(x)) From nobody Fri Dec 19 21:23:55 2025 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 4dY0s735mnz6KKfQ for ; Fri, 19 Dec 2025 21:23: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dY0s72J9Rz3SD2 for ; Fri, 19 Dec 2025 21:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766179435; 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=FXRLCauoI4YgUI9EFpv1cCFGtWhP7clQejbvR9RqDws=; b=i+Ht9qLtwnPlwWnDVNw+6d0OIrGrhB49vDNbjkDxtQiLY1nuAeHVopUXAx+IpudBE27tzl 1z+8UJTTi2YhB24IgmL/r/XDXjF/Uy8m0s6rZ9J/28dcDLWxGY9grflyR4J7g9E0xAK27J GGTYiGmbgof/aO8dxx2w6AwAZv4UwVgkObyMZrU3gsvYuKjfviy8gCFYPUzx1C/hwcD5i8 Sc8m6SxiphMH4p3dz/q7TzF7OrXWYyq58tGMrg12FW3ehz23ehU9AbMktehrwahNVfnBDq x0D4He3qWIRnCwstoDjBXcXPhpto3zoYlV5Lxs+eJkAvQt7/edO8Hm5GYc4Ptw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766179435; 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=FXRLCauoI4YgUI9EFpv1cCFGtWhP7clQejbvR9RqDws=; b=mHp4LDxJpKh8sTlQflcfWE+v4P6WXkJYw6Sby4fq2J2+0qT2umxTk0xZJLuCQZUNPnNbnH AmEToLRAOFL6P2c2RtO8XQukn+eyHWYbJgo8ldclWGQrUiC9ynPz+ZCsxhTo90GNGV/7uG Cgt2crrleG+I5FAsNgwAKNJOPzYYw8oAeu2K+O9f0hVn66EPkoCgQ+cwZvnc1fd2FYkrMy BgZeGNdIXD8WYEoiYi/mGk0VL4E9K/XMCzgMHqgphJDocembubqs+52Riwc1uyjjH3powQ c7FJ0XT7bj85PX6gvEFm491fyu2OgBaUjgaMGA6lypehDmTyDUno+XKBk+ftlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766179435; a=rsa-sha256; cv=none; b=UUGTJ1t/PR10b1UskpIWXBDgRiphfVYzl1RnyiBH6ggyBW0bqONoZ9D2UpM3bQKYfZfZnC HE9TuMHsgeQpGSSRY1BDIV25Xd9TNSqve8dYABeAYRUVhXYy5SyBydpWNsiAU+/TzdF6st tYzhib/GuKK0+oq86tl4sdX4at662j/cSaU58uE5ddgNrSvpuA1HLF3w0lG8YSNDoYw3vC LpBwgklTZGZPMnWV6uqHq3G2I0DTKx0yXnhCB0B0Ux3N/f0kkvsuyV6eBuXe+gk4pClMt6 BUI8rTup3+w3WIBbpgn0mTNc4S9Vh1kn2M8cLhFULW2yo+6bbSzFLmopeCgxeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dY0s71ht1z92H for ; Fri, 19 Dec 2025 21:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eb1f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 21:23:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 34892a8e3005 - main - LinuxKPI: bitcount fix builds with gcc and older llvm 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: 34892a8e30055000352d9612ad985be550c82bea Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 21:23:55 +0000 Message-Id: <6945c26b.3eb1f.3982f226@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=34892a8e30055000352d9612ad985be550c82bea commit 34892a8e30055000352d9612ad985be550c82bea Author: Bjoern A. Zeeb AuthorDate: 2025-09-15 23:52:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-12-19 21:19:28 +0000 LinuxKPI: bitcount fix builds with gcc and older llvm LLVM before 19 and gcc before 14 do not support __builtin_popcountg(). Use __const_bitcount from sys/bitcount.h as a replacement in these cases. This should still allow drm-kmod to build where the size needs to be known at compile-time. Remove the conditional for gcc around the iwlwifi modules build, which was collateral damage in all this. Sponsored by: The FreeBSD Foundation Fixes: 7cbc4d875971, 5e0a4859f28a MFC after: 3 days Reviewed by: brooks, emaste (without the sys/modules/Makefile change) Differential Revision: https://reviews.freebsd.org/D54297 --- sys/compat/linuxkpi/common/include/linux/bitops.h | 8 ++++++++ sys/modules/Makefile | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index a5a7abd55287..8fac80820f30 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -57,10 +57,18 @@ #define hweight64(x) bitcount64(x) #define hweight_long(x) bitcountl(x) +#if __has_builtin(__builtin_popcountg) #define HWEIGHT8(x) (__builtin_popcountg((uint8_t)(x))) #define HWEIGHT16(x) (__builtin_popcountg((uint16_t)(x))) #define HWEIGHT32(x) (__builtin_popcountg((uint32_t)(x))) #define HWEIGHT64(x) (__builtin_popcountg((uint64_t)(x))) +#else +/* LLVM before 19, gcc before 14. */ +#define HWEIGHT8(x) (__const_bitcount8((uint8_t)(x))) +#define HWEIGHT16(x) (__const_bitcount16((uint16_t)(x))) +#define HWEIGHT32(x) (__const_bitcount32((uint32_t)(x))) +#define HWEIGHT64(x) (__const_bitcount64((uint64_t)(x))) +#endif static inline int __ffs(int mask) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index bf3588926acf..83099c5fff14 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -582,10 +582,7 @@ _mlx5ib= mlx5ib _ena= ena _gve= gve _igc= igc -# gcc13 and earlier lack __builtin_bitcountg used by linux emulation -.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 140000) _iwlwifi= iwlwifi -.endif _rtw88= rtw88 _rtw89= rtw89 _vmware= vmware From nobody Fri Dec 19 22:17:37 2025 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 4dY2360Sv1z6Kh7n for ; Fri, 19 Dec 2025 22:17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dY2356YDqz3Ykj for ; Fri, 19 Dec 2025 22:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766182657; 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=PtDtm5VHWTJMiTo6Bj1sgJC6/iqx4hVD/pgCCpQfGA8=; b=DBQbMn8OfxcsRB6+Xlg+64ji6nx05XSS5CeBL5eZbtZfh5ScNxsAEUPB5wWoa1HMVfpA6u 3T2UMBi+6fA4p2/J1FsM7wQyvRk5oczfMy40ks/MdnnYpzqdy64qQ275CKdwg00XkZIt7K xf0/vKafW6azcCWxkyT/hcaOqqHtR1bhta1ZAR6SrcHGKn/eNb+mKJ2EOI7gzrtp0b61ND rKHs/3/qs70khFZQGg01nZzjTOdsUfGDSEc5XLvgncHFK9T94EV1Woq20FuhwxmY5rWmcz f1fepUebyZxbbCK2kCelxLzqKjJJvyl/8UjZ9usvdep5g7Nn0qNKJp1JAr+kpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766182657; 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=PtDtm5VHWTJMiTo6Bj1sgJC6/iqx4hVD/pgCCpQfGA8=; b=c6lNVqNf9puGHgbEBu4AVAVD1DForTiRpfaq8pZ/Dzt9PkwiyWqYFWnjtNP1xZAdboPzSh tZTSwWKQXZYo8oqdN8w2fXcok/AHO29+93myjX+bR7mQx7goTy2+ddXBv5rpjeayG+ywj8 kXo/e5lmf5EIWnVe+mZ/ugUCBevvkdko1PcvFbQ6Kbb0bDQPYBlH/zuAYS9ZOlJKWTS9UC yWO8gzrqPGPRqh8A93C4uodLpLfAar2DqmlJvKvqVVBPLM5IUr3owVJGjNUZXBi0kHr1JU QmfRWmHNSrupv6MeRjwgPv17srkkrqBTmVfN4dp2xMGLQ2u0JOEdNXroEsAE4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766182657; a=rsa-sha256; cv=none; b=szx05GH+AfOSaSYk3tP04DkzgA4rSR0nWpn/+YYnEAtuhrNpytyadkXRHKJHE02x2KujvB kqBZMaCQSAbNFBNkUUjaQ63f//gxXiTrCPgkNfdE5FFKkxgYvmx5IokHmC/bfGALK/GdSQ XDlNeR+mexcDw3hDFdzAjZ4ylM1admNC2buy/e5pJVRYuowAd4zuJe+uaYbVT43FJzBLRA DVjOfNxar8AlAgokYEMnVhQkUzToj3hKwHCSWEL1Y4yqUtP47FyufSYHl0YoHWnbEHbeM0 jPD9wCQqRwCYXf4T+tP+dohGZVVRwBNtKPBNGuDO8Q19+BfTrRqn6+Fc7CgfnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dY2355tNgzBLr for ; Fri, 19 Dec 2025 22:17:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9468 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 22:17:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: a8c594d27779 - main - files.amd64: remove some lines duplicated from files.x86 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: a8c594d27779b95f33c856521ec1039fa552d869 Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 22:17:37 +0000 Message-Id: <6945cf01.9468.45d8131f@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c594d27779b95f33c856521ec1039fa552d869 commit a8c594d27779b95f33c856521ec1039fa552d869 Author: Kyle Evans AuthorDate: 2025-12-19 22:17:30 +0000 Commit: Kyle Evans CommitDate: 2025-12-19 22:17:30 +0000 files.amd64: remove some lines duplicated from files.x86 These were added to files.x86 because they were duplicated in both files.i386 and files.amd64, but they did not end up removed in the latter. Garbage collect them now. Reviewed by: jhibbits Fixes: b9c6fa339d9c7 ("files.x86: Pull in some more duplicate [...]") Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D54295 --- sys/conf/files.amd64 | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index e4f01813bc8f..5de81ce58ef8 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -380,8 +380,6 @@ dev/smartpqi/smartpqi_tag.c optional smartpqi dev/sume/if_sume.c optional sume dev/syscons/apm/apm_saver.c optional apm_saver apm dev/tpm/tpm_crb.c optional tpm acpi -dev/tpm/tpm_acpi.c optional tpm acpi -dev/tpm/tpm_isa.c optional tpm isa dev/p2sb/p2sb.c optional p2sb pci dev/p2sb/lewisburg_gpiocm.c optional lbggpiocm p2sb dev/p2sb/lewisburg_gpio.c optional lbggpio lbggpiocm From nobody Fri Dec 19 23:27:13 2025 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 4dY3bP3Hldz6KqVY for ; Fri, 19 Dec 2025 23:27: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dY3bP2f0Hz3kDS for ; Fri, 19 Dec 2025 23:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766186833; 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=qCjHdqcXfiXzga1J1Tz1H4lTaBMcvGkG4hjjNguJnSI=; b=jfucA64CyLn0QHW2+jZjxbJmviPpJ0tPPI7COPYqfUwA776SHJcks61jk/DNBjsTSRnx/O StGS/3av30M4Jv9vonUTTy1e3o7RT7aaFvbNQ4Z7rbDvsZ6eOAsL220v8qZUIBVeXD6dkq sGLtPwa58UqXRyJBhlARQ9uGEEctQySCfJwXPRjvxK/vX0gP0PQKDVOdalqACHnW943PPQ rWAAQvokzE1IBItkDsWz3CyIjO21UlHPhbnXt8trgQ+V4vd8E0/OSX04fNEog5b3G7VZs9 dZlfEODBFtkr4v6vJ6FV4I3v+mC4AW7Oth8MnJWe8yt7+k2lOqPdBDLHlpfWfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766186833; 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=qCjHdqcXfiXzga1J1Tz1H4lTaBMcvGkG4hjjNguJnSI=; b=N8qBt/H8Nz4at2AB7m+6f7it8E3ArWDC6bgxJdWnrMGD8lE5W2dUvw96YNUmnChx2RB2ej VO6V46e355I4yZEfFr31wuMvkh6IL5If8/MLAUyv6dI24Ay3NkI50w6rxlPvCVGtYMeZx3 oxH9I6l6uNqFjZW1HOzh0jyKqparlJaxiSLbShWbCArpy6H6k34WFUgBM5oNu/qh49imPe eJ44yzrJgfRBgwZfOHXp94KqI+NMy/dZ7kygOL+Q41FVu9jZAsOAnoAQAOa68vzynK+eDl SICEyjZzAjJJyG/SM7JKGLBSOlzv8KKowwEb4rhb94h2zlwbblks0MtrNYHkzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766186833; a=rsa-sha256; cv=none; b=waLwqwgGD4FLopc1cVvA1rpyMHuVdWjqoXuW7jafMf5f4qclWBoHGAR7v9FRxGF2Lc8XcI 07A55JS8MJ+Pxx6a8d34UHFbiMPaeY+lOHjgCuNtsyyg6kbYllnJvKUREKmNm4eKlmyevW 3FqUYdOV9Fj9Wvh01yBsE6aQB7mkRaOVYisl9CtswTADiYaUiWK3uH+zcl/+YgKZkbIQfz QLek42M/0RniIxJIjDJKHMCNHMdGmTTqu1rRhQbk3dkqHsgAxty77RciuZbdJjI9r2pKBr SYHaYSGFKdF5GyebYIMbF94QZbNvNzieGjw0gswuFnENKyyB3E2mRx4OvHREHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dY3bP2BDkzDL5 for ; Fri, 19 Dec 2025 23:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22b37 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 19 Dec 2025 23:27:13 +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: 7f39d05b67ae - main - reboot: Fix halt -p behavior 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: 7f39d05b67aec8b87fbad8d5b6381084f99120ec Auto-Submitted: auto-generated Date: Fri, 19 Dec 2025 23:27:13 +0000 Message-Id: <6945df51.22b37.32a1af3d@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7f39d05b67aec8b87fbad8d5b6381084f99120ec commit 7f39d05b67aec8b87fbad8d5b6381084f99120ec Author: Dag-Erling Smørgrav AuthorDate: 2025-12-19 23:26:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-19 23:26:37 +0000 reboot: Fix halt -p behavior The RB_HALT bit is always set when invoked as `halt`, so to maintain a distinction between `halt` and `halt -p`, we must check the RB_POWEROFF bit first. PR: 291814 Fixes: 4453ec5b8716 ("reboot: Default to a clean shutdown") Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54320 --- sbin/reboot/reboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index a147b7e08a95..002a393000eb 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -235,9 +235,9 @@ shutdown(int howto) { char sigstr[SIG2STR_MAX]; int signo = - howto & RB_HALT ? SIGUSR1 : - howto & RB_POWEROFF ? SIGUSR2 : howto & RB_POWERCYCLE ? SIGWINCH : + howto & RB_POWEROFF ? SIGUSR2 : + howto & RB_HALT ? SIGUSR1 : howto & RB_REROOT ? SIGEMT : SIGINT; From nobody Sat Dec 20 11:43:35 2025 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 4dYMxK4mc7z6LwrL; Sat, 20 Dec 2025 11:43:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dYMxJ6rKjz3Cbl; Sat, 20 Dec 2025 11:43:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BKBhZJu030873; Sat, 20 Dec 2025 13:43:38 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BKBhZJu030873 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BKBhZbj030872; Sat, 20 Dec 2025 13:43:35 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 20 Dec 2025 13:43:35 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dYMxJ6rKjz3Cbl On Fri, Dec 19, 2025 at 12:51:00PM -0800, Gleb Smirnoff wrote: > On Fri, Dec 19, 2025 at 10:37:57PM +0200, Konstantin Belousov wrote: > K> > K> It has no relation to the fact that there are other ways to get the same > K> > K> behaviour from the system. The removal of that three lines breaks existing > K> > K> binaries. Also it does not matter that e.g. newer versions of some apps > K> > K> do not use that feature (feature as in binary interface, not a system > K> > K> behaviour). The existing binaries must continue to work. > K> > > K> > We already have had this argument before for a different kind of issue - > K> > POLLINIGNEOF. The existence of such binaries is like existence the the God. > K> > You can't prove they exist. I can't prove they do not exist. You advocate for > K> > the compat shim to exist forever. I advocate to limit it existence to some > K> > countable number of years. > K> > > K> > For this particular case all open source software had been addressed. There > K> > are no known shareware binaries in the wild that used AF_INET/IPPROTO_DIVERT. > K> I do not understand this statement. It was demonstrated in this thread > K> that python had it. > > Python itself doesn't use divert(4). It allows scripts to open the divert > sockets using constants instead of numbers, that's all. It is not the python > but legacy scripts that use the old PF_INET/IPPROTO_DIVERT tuple that need > adjustment. > > Python knows PF_DIVERT constant since 3.12. In our ports it is patched to know > PF_DIVERT for all possible versions in ports. > > What Mark pointed out is that python's support of PF_DIVERT is not complete, > wrt recvfrom method. I'm working on fixing it. > > I'm fine with prolonging existence of the shim until python 3.11 goes out of > support, which is 2027-10. You clearly misunderstand what ABI compat is. Whanever the specific version 'goes out of support', there are still binaries which must continue to work. > > K> > Those hypothethical binaries that we can't prove/refute existence of in some > K> > corporate environments would print a warning on 14.x and on 15.x providing a > K> > time to their owners to recompile. If we speculate that somewhere in the > K> > universe exists a corporate body that uses AF_INET/IPPROTO_DIVERT tuple in > K> > their internal software and have lost its source code, they have a solution. > K> > The solution is a tiny preloaded library that would intercept socket(2). Of > K> > course you may say that somewhere in the world exists a closed ecosystem that > K> > uses AF_INET/IPPROTO_DIVERT in a binary AND the sources for the binary were > K> > lost AND the binary is statically compiled. If you decide to go that deep into > K> > the rabbit hole, I would reply that owners of such a binary should bit hack it > K> > to use the correct tuple before call to socket(2). > K> No. You abruptly break binary compatibility and claim that this is fine. > K> It is not. > > Can you please elaborate what question are you answering with "No"? By 'no' I am reacting to the whole attititude of voluntaristically breaking the ABI guarantees that we, as the project, aim (or struggle) to provide. The citation above is self-illustrative in this regard: 1. Your change forces user to debug the broken application, so the user must have the detective skills. It is not quite trivial even to detect the cause of brokeness. 2. Then, the user must have dev skills to implement one of the workaround you listed (I would call them hacks). And all that trouble is for what? Do you think that the victim would do all that, or just abandon the idea of using an app? Really she must be quite dedicated to abandon the app and not the FreeBSD use. But this dialog directs the discussion in the invalid direction: if we as the project maintain ABI backward compatibility, it should not happen at all. > > If you think that my deprecation was too abrupt, can you please suggest your > deprecation plan? I already said that in my first response. If you cannot tolerate having this in code you run, wrap the helper into COMPAT_FREEBSD15, and comment out this option from the kernel config locally. From nobody Sat Dec 20 18:04:20 2025 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 4dYXNX6zzqz6KfSJ; Sat, 20 Dec 2025 18:04:28 +0000 (UTC) (envelope-from glebius@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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dYXNX4JyMz3x9m; Sat, 20 Dec 2025 18:04:28 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766253868; 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=1LILDiBxX8Qu4ktnlhSllxzWfRJoIbCi10tIe9LFoow=; b=LLpZ1j4mHkCGcoi8qgIWaWnINlUC3gWNGpGoybqCvNdJJnPHMRgdjayYsZxu5hot55f5x0 F6j4yrV/Ab/BDQMArgm+tWwaMLKNCm857AulDbQBATYisK2myodCqeXmkhiW4PsPHhLDnV 2+x6bxSnnHTmgP0gegxVlSs6IJNTQOyneZ61x6QINB88cBzKbNXjTbFcRZ3omPjGKlkrDy ZppgYGGvSH5iZYkuYgaLEZbre3hEPZTBuek3CToPhl3aWORdF2I+MxpqTOyxQp6vwE63Io 6Z4dEiCM6Q54OOzihQrnQAFzS+EbEPBeyk96JffOhpqDNyiiJsCHeDZimFP4mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766253868; 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=1LILDiBxX8Qu4ktnlhSllxzWfRJoIbCi10tIe9LFoow=; b=BvdFezrS5JN6xL9LLks0Siajnbjd3ry1M+1981LOywJyLbwdNgyb/tgUtuQKYqtU/ABlhP Sp3yxyBuk4Qp5O8LxZe4CaE//7URgKfMHPHRwVoWWGzODYYRgbNUEI9f9yX5rAHBZKcAva 9pNVYmPwErkNSb/ObPWqlzvu1YO43F+BD3msSCDMg/QS11s8v8DWd15DsCDKwhVIt73r2e f4oy+ot3eOg6efUuafjSa3n4OfTBiRsBkYRsgwvfDn5/m1f5TQcHFK+i/cZB2PlL9gh3xm ysE6b9HIazQP0VN9h10zQg8pvlV/JSA30eIslo1WO4V9Qn99Vz8Yt0HkZlNKDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766253868; a=rsa-sha256; cv=none; b=KO2CWFx7ra/YK11iF2KvCvoU6Yh873tY6aRKhwgDUDImR8ONiYLDYFBy98Q/7+GZ2EbzGu OUngeOu8v+ysWM95DGOXRfJiTEgg6ACRTMMptg8rFMzopv9cU5IX554/PRWrpDfsrNaCOo yfv55OXbFgUhA3pe+oMpvczrgzH5DW4v+sVmvgD28TBHKkUeBzm5W296t6cYtV9ZepX4A+ 40Syc3sP32w+ZoVjHiRbSrnFiIDsY/3zWUAx74izmLSjXj42Uclly3fZcIuczMufCDaGgU R7Zvf2CS2uVn+8hvJ4YE5zBNspPR7tgM5lrrzs6KMiwCYi8i5VTq3IX0Kn3tYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dYXNT2tY4z1M29; Sat, 20 Dec 2025 18:04:25 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sat, 20 Dec 2025 10:04:20 -0800 From: Gleb Smirnoff To: Konstantin Belousov Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: 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: On Sat, Dec 20, 2025 at 01:43:35PM +0200, Konstantin Belousov wrote: K> > K> > Those hypothethical binaries that we can't prove/refute existence of in some K> > K> > corporate environments would print a warning on 14.x and on 15.x providing a K> > K> > time to their owners to recompile. If we speculate that somewhere in the K> > K> > universe exists a corporate body that uses AF_INET/IPPROTO_DIVERT tuple in K> > K> > their internal software and have lost its source code, they have a solution. K> > K> > The solution is a tiny preloaded library that would intercept socket(2). Of K> > K> > course you may say that somewhere in the world exists a closed ecosystem that K> > K> > uses AF_INET/IPPROTO_DIVERT in a binary AND the sources for the binary were K> > K> > lost AND the binary is statically compiled. If you decide to go that deep into K> > K> > the rabbit hole, I would reply that owners of such a binary should bit hack it K> > K> > to use the correct tuple before call to socket(2). K> > K> No. You abruptly break binary compatibility and claim that this is fine. K> > K> It is not. K> > K> > Can you please elaborate what question are you answering with "No"? K> By 'no' I am reacting to the whole attititude of voluntaristically breaking K> the ABI guarantees that we, as the project, aim (or struggle) to provide. K> The citation above is self-illustrative in this regard: K> 1. Your change forces user to debug the broken application, so the user K> must have the detective skills. It is not quite trivial even to detect K> the cause of brokeness. K> 2. Then, the user must have dev skills to implement one of the workaround K> you listed (I would call them hacks). K> And all that trouble is for what? K> Do you think that the victim would do all that, or just abandon the idea K> of using an app? Really she must be quite dedicated to abandon the app and K> not the FreeBSD use. K> K> But this dialog directs the discussion in the invalid direction: if we as K> the project maintain ABI backward compatibility, it should not happen at K> all. ABI backward compatibility is not just a binary thing. There are different kinds of it. For example, if ABI for some standardized API has changed, we probably need to carry the ABI shim for a very long time, probably indefinite. Do you really insist that any API/ABI that was committed to FreeBSD should stay in it indefinitely? There were lots of ideas that were proved wrong and there were lots of code that was pushed non-polished. Later that was refactored with breaking ABI and API changes. If the project followed your strategy you would still stay with ipfw(4) functionality of FreeBSD 2.2.8 and I would still have a carp(4) "interface", ... I can continue this list. I can also ask are we allowed to completely remove certain interfaces or device drivers completely. Cause removing something definitely breaks compatibility. In my opinion ABI backward compatibility is not just a binary thing. Every particular case requires independent judgement. My analysis shows that expected negative impact of this change is close to zero, if not an absolute zero. I know that you didn't do any analysis, cause you pointed at python. The thing is that the python does know about PF_DIVERT and it never ever knew about IPPROTO_DIVERT. The change basically can't break python itself, only scripts that hardcoded value of IPPROTO_DIVERT internally. Your example with a hypothetical user that would abandon FreeBSD due to this issue doesn't buy me. At work I do routine updates of our software dependencies, and fixing internal code due to changes in curl, OpenSSL, etc and basically stronger compiler restriction is my monthly burden. But it doesn't make me abandon curl, OpenSSL or clang. K> I already said that in my first response. If you cannot tolerate having K> this in code you run, wrap the helper into COMPAT_FREEBSD15, and comment K> out this option from the kernel config locally. Of course COMPAT_FREEBSD15 will stay in GENERIC forever, right? -- Gleb Smirnoff From nobody Sat Dec 20 18:50:24 2025 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 4dYYPX4LNhz6Kl9V for ; Sat, 20 Dec 2025 18:50: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dYYPX2Lb5z42Pw for ; Sat, 20 Dec 2025 18:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766256624; 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=2TLn4k0cMKgEmsnaQIkQGKtuFje9ARok96M79keosQE=; b=I6mA+SH0gRwe6Hfe+WNuVJboA+qFsTPHh12ZWrnw00LhNf37au3QXIBIE7HDN66Y6WQ5qe WDYWmzvf/D9n534400zAdDwmhkV7P+ih+J332QQmaSX/n1wcHW3US4gZZ5WKeENuwPI/0D M8JpIXvfdpYXmsGKCiycKktCQJ5FjsnUf4/oFEwezsjQJuflM4F9miLZIp6QcOQUGJ4/mO rgzXDS/jeFFJ9siJjzc/LMIMWtx5pFzGjJtO2ZzcimQWieJQt6QeBObYCVwvZnbTIVFWeL Vj+jrWqrpz625tWAoHNkTVF6AJFfvcRrP8QofRuXWBYmWZllx05EhFMwU1ObVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766256624; 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=2TLn4k0cMKgEmsnaQIkQGKtuFje9ARok96M79keosQE=; b=aPwIKG0zImfvw3mzA12WSX2Rsj4qpCY3NyCn94PIg/5CiQUO3othi0iv/LjGhoEvZD8OIZ JFRq9o3Ndn/U5aqGpcfjeUvAPUe7CVIDhDME3zibsMzTIz2YVHZlKFvIAxf+TUw80IVrEj B0hmHK9fY9grRfZ9uGeJUBC5TaOMKJhxwZ9K3YFH60ZxtwJGn5O3sdxJhz0lZBa2Sg2iWU XlHTlMdR3tw6NgRoNkYiZsuQC8jErqUGNwA1qiLhF8m9zmIN2fBBJyrtkoSZkriLLN5BsK rmqfl8RBU9GIuiVBDpDrIZv/QOPSzNNS+oZQPZvNz6HhUpn4O9Vd+Rzq8riMBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766256624; a=rsa-sha256; cv=none; b=Ea2XttmIZ1UaJWjNBG7nn3O5mlJutUEkuNPc4GFJr8vgfoHd3PUl+FplFhY5oDkMFJWxaJ QIV/2pdw+10MRzbPm4ir2wdq/CYc4joj0kN+tHOnZYsuTYIpGBLlYdtfnMkCGwQbzcdEZ3 uWlcWmf49kXXUKbUwT5x4tHfmBgLZGybnPIdLqaQCyE2cZCZBCiEXNZ0/3yQGyXkMGUq0L pQy0xW24QQatGm5D3giq1ICTMvSLSBf0eeX35/ZV71FQzZ4ubPZNbDMAJB+s5ZjyW4UCI+ SxOve2BPA58I0uvdM2p4nG0/njMPnAHtL0wCjb1iCRM5RCP6K3fkFnfctLSc1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dYYPX1Qnyz15dl for ; Sat, 20 Dec 2025 18:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35858 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 20 Dec 2025 18:50:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: dd5a48f95786 - main - fwget: Add Navi 33 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd5a48f957868ce1809d06cebe03ad92a07af75a Auto-Submitted: auto-generated Date: Sat, 20 Dec 2025 18:50:24 +0000 Message-Id: <6946eff0.35858.46975ac3@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=dd5a48f957868ce1809d06cebe03ad92a07af75a commit dd5a48f957868ce1809d06cebe03ad92a07af75a Author: Emmanuel Vadot AuthorDate: 2025-12-20 18:48:30 +0000 Commit: Emmanuel Vadot CommitDate: 2025-12-20 18:49:51 +0000 fwget: Add Navi 33 support Tested on a RX7600 MFC After: 3 days --- usr.sbin/fwget/pci/pci_video_amd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr.sbin/fwget/pci/pci_video_amd b/usr.sbin/fwget/pci/pci_video_amd index 7e50454d3944..11f33eef78dd 100644 --- a/usr.sbin/fwget/pci/pci_video_amd +++ b/usr.sbin/fwget/pci/pci_video_amd @@ -138,6 +138,14 @@ pci_video_amd() 0x740*|0x741*) addpkg "gpu-firmware-amd-kmod-aldebaran" ;; + 0x7480) + addpkg "gpu-firmware-amd-kmod-psp-13-0-7" + addpkg "gpu-firmware-amd-kmod-smu-13-0-7" + addpkg "gpu-firmware-amd-kmod-dcn-3-2-1" + addpkg "gpu-firmware-amd-kmod-gc-11-0-2" + addpkg "gpu-firmware-amd-kmod-vcn-4-0-4" + addpkg "gpu-firmware-amd-kmod-sdma-6-0-2" + ;; 0x13fe|0x143f) addpkg "gpu-firmware-amd-kmod-cyan-skillfish2" ;; From nobody Sat Dec 20 20:03:15 2025 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 4dYb1b5Gqbz6Kt1l for ; Sat, 20 Dec 2025 20:03: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dYb1b4T69z49LD for ; Sat, 20 Dec 2025 20:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766260995; 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=+VJwXNcOMdcJ8+dN8zvgPp6IoyRvvkRZ0LZ3WCRv2Rg=; b=fmD3w4plwaEGyQ3/0aEsFsa0OXHqiizsHx5A3B8othiRePhg0gg/Tt6foE6DTGgCGkyzk9 A7kwSt+S22WIgkRKt7pl0Z2Eh7vGLFBhgaDk+u6ZYKVykVWzAAGnfPwPrOdqs3HnJg9hE9 UX2fxmIBMR2uYi99z10EfYbKwAUJPWOXMDFzHZTcX+XReJ1wy4uwLel3ibl9TA5rnOrdoK 4jy+LkbkeRmbdkLVYARiZp4i7h+CNI9oUGAvYcrLd51d2yl6yYTV97FhaUPapeIMNwMynl r1Vppg0PXyrdmtGlDxTnpq4Oiap67Ara77KuuOWjpuqd9aCtHoYn8Bv9o0BOVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766260995; 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=+VJwXNcOMdcJ8+dN8zvgPp6IoyRvvkRZ0LZ3WCRv2Rg=; b=EQNJdUyKhaRk6JWEVXzJySa6p+lblYqTt7dPryZ5TcPNAgUVo0BVFg4T7NERFWRE64DBbu 24Q91W5PAGkUeW17778SRLPskwriNRKfMk7Zo+7F/qqOCsJpW+7gMMQJiFrrhjy61GDbY4 h49CA7X8CwKv1Ee+DNHZ/jvRcUe3loI703uju9pvtsK/96PXhDu547KWPL1Kzwa808P/XY cyCnWUJZ6N/cRn6F7RslWu3LD6bWw4LbqU4y7vhDK2K/ZBU8Wr/WeelBFp1+2CWZ0Nu2dW niMiz0KV2+gJ2HOTWsiXKtTnt8pKcdZYoFycyQ1LbKlNVGKvsC9tHAARBM0f4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766260995; a=rsa-sha256; cv=none; b=XAMUz//wx6HcxBQ8mHn3NE4Qp1pqG2ewBFL32aOG73EQIiMWXVZOjhBg4EzQkyOsJPXVvc mZEVMh2QYYDLu9eDlVj0D2d6F3YEaOfXZvGKFrXaosMTAtIyM3l8Z/9L5ImoF6oEv/RbMm +AF0UMAErwLXXvotWpBt+wXgB/qHrQpjN6H8htfYMDvfHaAUMsm2VwVTc0CoG6Zbb+Vqfa metCP7U4M6+IEWx8w7J7jCPBfjkzORPcHvJP2qZcQ3k3g2kFbEdT3+4y9YMHYkcZLuWHWr jV/OxdC0ecHBsfGtmT7Vgh7o5lB5hc+j7qRvAPBZN0qD5A8hko6ET5xkL9x1Lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dYb1b40vRz17Qn for ; Sat, 20 Dec 2025 20:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d475 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 20 Dec 2025 20:03:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 27cb2610ef0b - main - powerpc/intr: Minor cleanup 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: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27cb2610ef0ba6871f2649658778fb83179c0b2e Auto-Submitted: auto-generated Date: Sat, 20 Dec 2025 20:03:15 +0000 Message-Id: <69470103.3d475.473ab606@gitrepo.freebsd.org> The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=27cb2610ef0ba6871f2649658778fb83179c0b2e commit 27cb2610ef0ba6871f2649658778fb83179c0b2e Author: Justin Hibbits AuthorDate: 2025-12-20 19:53:37 +0000 Commit: Justin Hibbits CommitDate: 2025-12-20 20:02:51 +0000 powerpc/intr: Minor cleanup Use MTX_SYSINIT() instead of rolling our own. --- sys/powerpc/powerpc/intr_machdep.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c index 6e8cb4febf28..daab391bb800 100644 --- a/sys/powerpc/powerpc/intr_machdep.c +++ b/sys/powerpc/powerpc/intr_machdep.c @@ -159,13 +159,7 @@ intrcnt_setname(const char *name, int index) INTRNAME_LEN - 1, name); } -static void -intr_init(void *dummy __unused) -{ - - mtx_init(&intr_table_lock, "intr sources lock", NULL, MTX_DEF); -} -SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); +MTX_SYSINIT(intr_table_lock, &intr_table_lock, "intr sources lock", MTX_DEF); static void intr_init_sources(void *arg __unused) From nobody Sat Dec 20 22:49:38 2025 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 4dYfjZ3sBQz6LBMX for ; Sat, 20 Dec 2025 22:49: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dYfjZ2v7Rz3Dtl for ; Sat, 20 Dec 2025 22:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766270978; 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=kvYQhuAlEaS0gRqJn4OFuKPPKShFlakIHc2jJHbCeac=; b=tqncYs58iUD0JnsZoanHKqI/IoXLwRv7wbT3apuiriYT90uwnkX2mWZXogMIjG0a4eHMwH BPTLaBpWs1keauY0jlMdhjFWrCbjJqroqRiGTs4d6k/Zc6DmujuxZ+/gq0T/elUI1slYF2 XCD+0G7P+uhRsV1gH87zDf3SemfsCdBM5vZzFgZZxS6kSfooa4hogH+V6H+86bl/Lx6Elb GMGRTJQsnEfrgjgChcYALDkXV2L8PzYkfHzujYira5QJ5g02s8B26nxc/gcTY9G+V/GLhr EaqXSgo+0CcBkqPsDgP4iRkVFGy12gXPSP1dLlGocnrsmwJh3T56pWXBeYfYfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766270978; 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=kvYQhuAlEaS0gRqJn4OFuKPPKShFlakIHc2jJHbCeac=; b=e7AjBUIwneAEyCp5JdxoeAyhcxhVHK90t6KKXL53Isfq2YxQjoKsZTBrxv5P1nZ2Lh+e/6 nYaDyyex3AH8nyFykgk/sFdfYNXJK5uzSZ0dP2pliZlEYX8+5rqUhcT/DHbb9LQpID/9sx 15nfq8/mAyS9HH60CM2BDR/YE2wNj8Olz85TlFsBqu28/klT5J71khsrMKGAEiW9asY4L0 jvWMLXqYSxOnODzouliWvh4r6YlpLjXGc8WoGqd7zMZfF8wjvtE6htUTxtAdz/WCoNLB7p CvVqATfXJVsLa5Y1bfEYLmeA2keU6048qBsee0ohijUyzPhKlFxl+khoPcpI2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766270978; a=rsa-sha256; cv=none; b=uK1mxnXn6Wd7fMjNYMVgGNeaU2s4hENbXR2W6rYeAsTOcYJQPWulJALqgrhjRFfSFj1Oap 2qNWqvT6iL0KJpMmmrBklJdm5j6xbqWkHsngOvE51c4ZRH5QWcdSIMoSs8W4/ZaZ9AEU30 hasrSISCwh08Um8EWAqrHen1gOuNu2EOSytdkqXJI2gfMWVoLuYjjIEDm+Mno28zNHf/XD 1UAmT/1TtCBSLrKQSpypAdOA2GA0RJsH1gr/ZtYf89sBAASmxLLWbC/VhzGp9Xg/jN4X9z 2a9HXPuQFGwT9kLYuNPxcPHu0Bt9OP4z1shko3NUuAmsnEbs+Sy/woMwzu3vhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dYfjZ2B4Cz1CwB for ; Sat, 20 Dec 2025 22:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d1cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 20 Dec 2025 22:49:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 117306dc606b - main - in6_ifattach: include sys/eventhandler.h to unbreak NOVIMAGE builds 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: 117306dc606bf331795636b165b25be66e40d6a0 Auto-Submitted: auto-generated Date: Sat, 20 Dec 2025 22:49:38 +0000 Message-Id: <69472802.d1cf.15a0bf93@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=117306dc606bf331795636b165b25be66e40d6a0 commit 117306dc606bf331795636b165b25be66e40d6a0 Author: Bjoern A. Zeeb AuthorDate: 2025-12-20 22:47:40 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-12-20 22:47:40 +0000 in6_ifattach: include sys/eventhandler.h to unbreak NOVIMAGE builds LINT-NOVIMAGE fails to build due to a missing eventhandler.h include which in hte VIMAGE case is likely leaked through some other header. Add the #include to unbreak the build. Fixes: 0d469d23715d6 (net: attach IPv4 and IPv6 stacks to an ...) --- sys/netinet6/in6_ifattach.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index a2d236cccc41..c3d256a8d51f 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -32,6 +32,7 @@ */ #include +#include #include #include #include From nobody Sun Dec 21 02:45:12 2025 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 4dYlxh2Wzbz6LNt1 for ; Sun, 21 Dec 2025 02:45:28 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 4dYlxg4YwFz3k1Z for ; Sun, 21 Dec 2025 02:45:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.47 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-477b198f4bcso19304415e9.3 for ; Sat, 20 Dec 2025 18:45:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766285126; x=1766889926; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YjcpZfL8KvWSLtsJANwkzILgJ9uHCGNBKn0NTzixTxw=; b=lOvy9AL6TJogoG9UBvhWGQMWL02Ah74WBLAV/kkBNeQBDmycXFvWjmnD/qeRCWIGP+ yz4YQcVCUlB+GwnDZQDwDcMPqmBEesGm4QQrX12T3JGV1/HuT+In3KoHP3i80M1v/gDu gT4sY2BLZ53Glh7S1tUlCjLngNTQSFM2ox7zP1hpJXgpiCJ9Ij5Y0aFdCoP285mlxk/h TaAaGAxXi39ELIOFsmsfX7mU5usWCBrVA/gJe9fLPqJHr9FLOzIV2IQQOWfk0cvQ2/if 5nOGp+ivyByAiTnE/yL/N2f9vDgztTaKuTPcUFuqUTpwLS8fql1ScN+DITWAzNTD7l2N bvGQ== X-Forwarded-Encrypted: i=1; AJvYcCX7bCsURCmwBSLSGJ54yt6mTYzOvbSjIt6BHO9E3Ohiy04/AWbMFAIV79i6Er+MG/UeBcAuz01i8Y68tfU0G4Stmf+eww==@freebsd.org X-Gm-Message-State: AOJu0YzSRFK7xY8pfgxX9SOaetJ4XxjVP4CsAV6U6ShHIeYV8acF7buV Q53OJILcj07fsI4tbvaNssYwU1JTXGZRWaIAcjce9eRXOH6ra+wMSYFWkaZt7jdRmcY= X-Gm-Gg: AY/fxX6/Iu+WBvMUiXhf1baXM2dTs9NMpsllBcP5ATMcpITKkrThpqBqWn71JMu0/Xh 3ZJbj3ZuGGlrZ1Zy11hbtjOwHSlFEuPCMUQ1VfYmeKWhrNSvoBL2M5U7BKskLZMWOU3pMWedpM8 kJxg0aPEwTa94vzBmpgg5oR7k/TUU3YvGSdoOt/NLsJRAexVK/hijUNg17fomE7SpHQ/rIeFULU MmzxWu5rivhYB3T3snI29BqhbW1w34Yv4JY/MJF5LUstM9o1+BnvYNrHoxZfcQTmdsNpTMaR/Mz A0gn9iYiowJyat+O1ymbVxdQdr8q3yL9d/bRkaOXg8FrZtd5GtoVZ+H5YzGpD+P+oZdXvGRLN6C SbTKB3RXfsRBYPLY9b2YCAjmndYcln8ORfSZ/vGG6x71Ys3zIy3bXoXY1XvrKTxWFLlOWh+RMvO w3YlIBYVjWYCm/+1ANfqupmA4wg/D/aGJ/5f60FrT9MXrlImG/BZ57 X-Google-Smtp-Source: AGHT+IHph1QoXC5mrI1vSG/eEmJZBMQzMqcZacJAxf2tTOB2sa++rw4MRzcVKpfellaW8oM4Ii8/9Q== X-Received: by 2002:a05:6000:22c8:b0:430:ff0c:360f with SMTP id ffacd0b85a97d-4324e4f6addmr9217120f8f.33.1766285125902; Sat, 20 Dec 2025 18:45:25 -0800 (PST) Received: from smtpclient.apple (nat-184-7.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa46c0sm13702802f8f.34.2025.12.20.18.45.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2025 18:45:24 -0800 (PST) Content-Type: text/plain; charset=utf-8 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 \(3864.300.41.1.7\)) Subject: Re: git: 35dd53a9e132 - main - librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping From: Jessica Clarke In-Reply-To: Date: Sun, 21 Dec 2025 02:45:12 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <31FE47D1-CE81-422B-8475-7D326FE09D10@freebsd.org> References: <69302037.3d155.40084cd7@gitrepo.freebsd.org> To: Sumit Saxena X-Mailer: Apple Mail (2.3864.300.41.1.7) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.04 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.64)[-0.638]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_THREE(0.00)[4]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.47:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; BLOCKLISTDE_FAIL(0.00)[209.85.128.47:server fail,131.111.184.7:server fail]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.47:from] X-Rspamd-Queue-Id: 4dYlxg4YwFz3k1Z On 3 Dec 2025, at 14:13, Jessica Clarke wrote: >=20 > On 3 Dec 2025, at 11:34, Sumit Saxena wrote: >>=20 >> The branch main has been updated by ssaxena: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D35dd53a9e13265f7a479649776453efc= 5b737a0f >>=20 >> commit 35dd53a9e13265f7a479649776453efc5b737a0f >> Author: Sumit Saxena >> AuthorDate: 2025-12-03 11:28:33 +0000 >> Commit: Sumit Saxena >> CommitDate: 2025-12-03 11:33:40 +0000 >>=20 >> librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping >>=20 >> By default ibv_devices and rping are not statically bound to >> libbnxtre.so.1. i.e. 'ldd /usr/bin/rping' command doesn't list >> 'libbnxtre.so.1' entry. So, statically bound the libbnxtre.so.1 >> library to rping & ibv_devices utils. >=20 > Firstly, this is some very unusual terminology, there=E2=80=99s no = =E2=80=9Cbinding=E2=80=9D > going on here (binding in ELF linker/loader terminology is about > symbols, not libraries), it=E2=80=99s =E2=80=9Clinking=E2=80=9D. Also, = whilst strictly true > that this pertains to the static linker, repeating the static part > makes it sound like you=E2=80=99re talking about static linking in the = ld > -static / libfoo.a sense, which would still have the effect of not > showing up in ldd=E2=80=99s output. >=20 > Secondly, this states some things, but I don=E2=80=99t see why this = change > follows from it. *Why* does it matter that ibv_devices and rping do = not > link against libbnxtre? If it builds, that means none of libbnxtre=E2=80= =99s > symbols were needed. Is there some magic dynamic registration going on > in linker sets / constructors inside libbnxtre? Please explain the why > in the commit message. Ping? I don=E2=80=99t see any follow-up to this. Jessica From nobody Sun Dec 21 13:31:00 2025 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 4dZ2Gq6dwkz6KkGG; Sun, 21 Dec 2025 13:31:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4dZ2Gq0RzQz3rFc; Sun, 21 Dec 2025 13:31:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BLDV0JU096021; Sun, 21 Dec 2025 15:31:03 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BLDV0JU096021 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BLDV0VW096020; Sun, 21 Dec 2025 15:31:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 21 Dec 2025 15:31:00 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: 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: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dZ2Gq0RzQz3rFc On Sat, Dec 20, 2025 at 10:04:20AM -0800, Gleb Smirnoff wrote: > On Sat, Dec 20, 2025 at 01:43:35PM +0200, Konstantin Belousov wrote: > K> > K> > Those hypothethical binaries that we can't prove/refute existence of in some > K> > K> > corporate environments would print a warning on 14.x and on 15.x providing a > K> > K> > time to their owners to recompile. If we speculate that somewhere in the > K> > K> > universe exists a corporate body that uses AF_INET/IPPROTO_DIVERT tuple in > K> > K> > their internal software and have lost its source code, they have a solution. > K> > K> > The solution is a tiny preloaded library that would intercept socket(2). Of > K> > K> > course you may say that somewhere in the world exists a closed ecosystem that > K> > K> > uses AF_INET/IPPROTO_DIVERT in a binary AND the sources for the binary were > K> > K> > lost AND the binary is statically compiled. If you decide to go that deep into > K> > K> > the rabbit hole, I would reply that owners of such a binary should bit hack it > K> > K> > to use the correct tuple before call to socket(2). > K> > K> No. You abruptly break binary compatibility and claim that this is fine. > K> > K> It is not. > K> > > K> > Can you please elaborate what question are you answering with "No"? > K> By 'no' I am reacting to the whole attititude of voluntaristically breaking > K> the ABI guarantees that we, as the project, aim (or struggle) to provide. > K> The citation above is self-illustrative in this regard: > K> 1. Your change forces user to debug the broken application, so the user > K> must have the detective skills. It is not quite trivial even to detect > K> the cause of brokeness. > K> 2. Then, the user must have dev skills to implement one of the workaround > K> you listed (I would call them hacks). > K> And all that trouble is for what? > K> Do you think that the victim would do all that, or just abandon the idea > K> of using an app? Really she must be quite dedicated to abandon the app and > K> not the FreeBSD use. > K> > K> But this dialog directs the discussion in the invalid direction: if we as > K> the project maintain ABI backward compatibility, it should not happen at > K> all. > > ABI backward compatibility is not just a binary thing. There are different > kinds of it. For example, if ABI for some standardized API has changed, we > probably need to carry the ABI shim for a very long time, probably indefinite. > > Do you really insist that any API/ABI that was committed to FreeBSD should stay > in it indefinitely? Yes, once it hits the stable branch. This is the guarantee for the branches, and otherwise their existence is pointless. > There were lots of ideas that were proved wrong and there > were lots of code that was pushed non-polished. Later that was refactored with > breaking ABI and API changes. First, please do not mix API and ABI (and then KBI as well). Your point is right, but its interpretation should different: the premature ideas must not be added to the source tree. If something not that good was added to HEAD, it must be reverted before a next stable branch is created, otherwise it indeed stays there forever. > If the project followed your strategy you would > still stay with ipfw(4) functionality of FreeBSD 2.2.8 and I would still have a > carp(4) "interface", ... I can continue this list. I can also ask are we > allowed to completely remove certain interfaces or device drivers completely. > Cause removing something definitely breaks compatibility. Note the 'A' in the ABI TLA. Typically, we are tolerable to the changes to the management interfaces on the basis that applications do not manage the system, this is delegated to the management utilities normally from the base. So both examples with ipfw and carp would fit there. But, in the global landscape we have exemplary actions were people go to quite the efforts to keep things running. I mean at least both Windows and Linux. Last time I looked, Linux care to provide drm1-compatible ioctls which allows to run arbitrary old X server on newest kernels, assuming old X servers have the drivers for the hardware. This is insane, isn't it? On the similar scale, I am aware that Windows provides the bug compatibility features in the memory allocators, again to provide perfect ABI. Clearly FreeBSD has not enough work power to be on par, but why voluntaristically break things when it costs nothing to not break them? > > In my opinion ABI backward compatibility is not just a binary thing. Every > particular case requires independent judgement. My analysis shows that > expected negative impact of this change is close to zero, if not an absolute > zero. I know that you didn't do any analysis, cause you pointed at python. > The thing is that the python does know about PF_DIVERT and it never ever knew > about IPPROTO_DIVERT. The change basically can't break python itself, only > scripts that hardcoded value of IPPROTO_DIVERT internally. > > Your example with a hypothetical user that would abandon FreeBSD due to this > issue doesn't buy me. At work I do routine updates of our software > dependencies, and fixing internal code due to changes in curl, OpenSSL, etc and > basically stronger compiler restriction is my monthly burden. But it doesn't > make me abandon curl, OpenSSL or clang. > > K> I already said that in my first response. If you cannot tolerate having > K> this in code you run, wrap the helper into COMPAT_FREEBSD15, and comment > K> out this option from the kernel config locally. > > Of course COMPAT_FREEBSD15 will stay in GENERIC forever, right? Well, I think GENERIC is sometimes trimmed from COMPAT_ options. Similarly, the most spicy options are not added there. E.g. COMPAT43 or a.out activator together with the lcall $7,$0 syscall interface on amd64 (but adding them allows you do to buildworld in 1.1.x jail, nice?). From nobody Sun Dec 21 14:46:37 2025 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 4dZ3xn5dGRz6Kt53 for ; Sun, 21 Dec 2025 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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dZ3xn4qrYz401Z for ; Sun, 21 Dec 2025 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=1766328397; 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=bcvEX31TapsygOVGQR5Sl4+d0aitFm1WxJxqpoc0+CM=; b=YDqbWSMmaHy6pEUnTBgZh1xmk3l/bDgM4eNAb4r+w1rTTQkkaOhEeH8LP5DoAI+yL+0ID1 oyyqOeI+x/7LQpc6ZEqKqFVT/qzfeA8bf+gOI8lwZYBMk123N6XsPf1DaANe4iOCIO5nmD brCE565xqxXJkBDUab9mBeL52R/5AUqECEo9RPXFBbFvBJbjCwyBMBIvOwUiVfVZE1bUU/ doCBHRavIqeY5ZQ2DEIOXJnVYstfd8cvgBg+iJuEPdL1lys71adA8YIdNrDU2hl9KK8wRb 3+qkGD4q8PCIPzE1KoXmw7jY/e8IZbPEM+qVtpDiwJXqnTE6O0PSPEXivPc+kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766328397; 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=bcvEX31TapsygOVGQR5Sl4+d0aitFm1WxJxqpoc0+CM=; b=pbY5szw5TBiMsWi9FnqnFplWzJc/P5FbMl2H92QVD3LVVgZSkCvOt7pYO4cdR0VUiU0OfA kZnkfJf0ZVyEpRCT9dpsBC+/aqazI0Oz1q/ImWi/NRp/VHdOgxXGQ36Te98PlI4d9LRSeH YdVABTi+kURWiahsfzigUJy93MWMF+uytFPKquUbkdx2AX9NQaMP75GM6olh2QCJJxWoKy zkn7uDBS/caIToj1tKh7NX18oyZrxk57F+iUzFwR6ZDXORcLPQnwTRP45luxcpVE68o3pZ HG7+SZHAL3XkGXSZDvXTZRXNmt/YBwsosE3Moy8vYhnHE/VZPKSizeTE6Yo9gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766328397; a=rsa-sha256; cv=none; b=bQY6GzevLhVV46jmhc/rrQLZbUb9o7uJ12B+XSQQaJEpd1mAv8EAMvnnfWaAxtgOFzS2md YC7gS0/nMdlq/Euu6zzSmSEdNk61ZtmRNDvSzNcUUeTB2fYU1Jbq3eXVDadIfrGWOJRHGw qKhTUd1BhcBNdm3hi31YaA6XN5rmWX9QUdXzF8Be63RDBEEW4bvbqnZLdthDg1Dh/pV8ci erp2xPhIvjaOhirHL2izH9077EqsaHxrNdDg3jJ9Tu6PJ3VoRE8t4mpPlIq070k5erOrUN CD9+dgfvm4Ajm4JKs/AA9sNnji/+1cmAbO8HgqtvZM/JojyLatLc1PsnX4xecQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dZ3xn45Htzl34 for ; Sun, 21 Dec 2025 14:46:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ae04 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 21 Dec 2025 14:46:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 43d7ee540efe - main - iflib: support for transmit side nic KTLS offload 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: 43d7ee540efe0df1def80ce24255b32f9f9396ba Auto-Submitted: auto-generated Date: Sun, 21 Dec 2025 14:46:37 +0000 Message-Id: <6948084d.3ae04.60ca348b@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=43d7ee540efe0df1def80ce24255b32f9f9396ba commit 43d7ee540efe0df1def80ce24255b32f9f9396ba Author: Andrew Gallatin AuthorDate: 2025-12-19 20:48:36 +0000 Commit: Andrew Gallatin CommitDate: 2025-12-21 14:45:12 +0000 iflib: support for transmit side nic KTLS offload This change adds support to iflib for drivers that want to do transmit-side NIC ktls offload. This change does 2 things: 1) Extends the pkt info to include an optional mbuf pointer. This gives drivers the ability to find the start of a TLS record if they need to re-DMA part of the record to re-construct TLS state on the NIC. This mbuf pointer is only passed when CSUM_SND_TAG is present on the pkthdr. Note that I don't bother to inspect the send tag on purpose; this will only be present for TLS offloaded or paced connections 2) Allows the driver to specify how much ring padding is needed before the ring is considered to be full using the new isc_tx_pad field in if_softc_ctx. This re-uses a field that was marked spare in 2019 via d49e83eac3baf. Iflib initializes this to the previous value of 2 slots and allows the driver to override it. The TXQ_AVAIL() macro has been adjusted to subtract this padding, and uses of the macro have removed +2 from the other side of the comparison. To avoid potential cache misses from looking at the ifc_softc_ctx in TXQ_AVAIL(), the value is mirrored in the txq (in an alignment hole). Reviewed by: kbowling, kgalazka, sumit.saxena_broadcom.com, shurd Sponsored by: Netflix MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D54274 --- sys/net/iflib.c | 31 +++++++++++++++++++------------ sys/net/iflib.h | 5 +++-- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 3181bdbcb849..bd0bfe4742df 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -375,6 +375,7 @@ struct iflib_txq { struct ifmp_ring *ift_br; struct grouptask ift_task; qidx_t ift_size; + qidx_t ift_pad; uint16_t ift_id; struct callout ift_timer; #ifdef DEV_NETMAP @@ -445,7 +446,8 @@ get_inuse(int size, qidx_t cidx, qidx_t pidx, uint8_t gen) return (used); } -#define TXQ_AVAIL(txq) (txq->ift_size - get_inuse(txq->ift_size, txq->ift_cidx, txq->ift_pidx, txq->ift_gen)) +#define TXQ_AVAIL(txq) ((txq->ift_size - txq->ift_pad) -\ + get_inuse(txq->ift_size, txq->ift_cidx, txq->ift_pidx, txq->ift_gen)) #define IDXDIFF(head, tail, wrap) \ ((head) >= (tail) ? (head) - (tail) : (wrap) - (tail) + (head)) @@ -485,11 +487,11 @@ typedef struct if_rxsd { /* multiple of word size */ #ifdef __LP64__ -#define PKT_INFO_SIZE 6 +#define PKT_INFO_SIZE 7 #define RXD_INFO_SIZE 5 #define PKT_TYPE uint64_t #else -#define PKT_INFO_SIZE 11 +#define PKT_INFO_SIZE 12 #define RXD_INFO_SIZE 8 #define PKT_TYPE uint32_t #endif @@ -1933,6 +1935,7 @@ iflib_txq_setup(iflib_txq_t txq) txq->ift_cidx_processed = 0; txq->ift_pidx = txq->ift_cidx = txq->ift_npending = 0; txq->ift_size = scctx->isc_ntxd[txq->ift_br_offset]; + txq->ift_pad = scctx->isc_tx_pad; for (i = 0, di = txq->ift_ifdi; i < sctx->isc_ntxqs; i++, di++) bzero((void *)di->idi_vaddr, di->idi_size); @@ -3100,7 +3103,7 @@ iflib_txd_db_check(iflib_txq_t txq, int ring) max = TXQ_MAX_DB_DEFERRED(txq, txq->ift_in_use); /* force || threshold exceeded || at the edge of the ring */ - if (ring || (txq->ift_db_pending >= max) || (TXQ_AVAIL(txq) <= MAX_TX_DESC(ctx) + 2)) { + if (ring || (txq->ift_db_pending >= max) || (TXQ_AVAIL(txq) <= MAX_TX_DESC(ctx))) { /* * 'npending' is used if the card's doorbell is in terms of the number of descriptors @@ -3604,14 +3607,18 @@ defrag: return (err); } ifsd_m[pidx] = m_head; + if (m_head->m_pkthdr.csum_flags & CSUM_SND_TAG) + pi.ipi_mbuf = m_head; + else + pi.ipi_mbuf = NULL; /* * XXX assumes a 1 to 1 relationship between segments and * descriptors - this does not hold true on all drivers, e.g. * cxgb */ - if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) { + if (__predict_false(nsegs > TXQ_AVAIL(txq))) { (void)iflib_completed_tx_reclaim(txq); - if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) { + if (__predict_false(nsegs > TXQ_AVAIL(txq))) { txq->ift_no_desc_avail++; bus_dmamap_unload(buf_tag, map); DBG_COUNTER_INC(encap_txq_avail_fail); @@ -3635,7 +3642,7 @@ defrag: */ txq->ift_rs_pending += nsegs + 1; if (txq->ift_rs_pending > TXQ_MAX_RS_DEFERRED(txq) || - iflib_no_tx_batch || (TXQ_AVAIL(txq) - nsegs) <= MAX_TX_DESC(ctx) + 2) { + iflib_no_tx_batch || (TXQ_AVAIL(txq) - nsegs) <= MAX_TX_DESC(ctx)) { pi.ipi_flags |= IPI_TX_INTR; txq->ift_rs_pending = 0; } @@ -3658,10 +3665,9 @@ defrag: txq->ift_gen = 1; } /* - * drivers can need as many as - * two sentinels + * drivers can need up to ift_pad sentinels */ - MPASS(ndesc <= pi.ipi_nsegs + 2); + MPASS(ndesc <= pi.ipi_nsegs + txq->ift_pad); MPASS(pi.ipi_new_pidx != pidx); MPASS(ndesc > 0); txq->ift_in_use += ndesc; @@ -3816,7 +3822,7 @@ iflib_txq_can_drain(struct ifmp_ring *r) iflib_txq_t txq = r->cookie; if_ctx_t ctx = txq->ift_ctx; - if (TXQ_AVAIL(txq) > MAX_TX_DESC(ctx) + 2) + if (TXQ_AVAIL(txq) > MAX_TX_DESC(ctx)) return (1); bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, BUS_DMASYNC_POSTREAD); @@ -3880,7 +3886,7 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) #endif do_prefetch = (ctx->ifc_flags & IFC_PREFETCH); err = 0; - for (i = 0; i < count && TXQ_AVAIL(txq) >= MAX_TX_DESC(ctx) + 2; i++) { + for (i = 0; i < count && TXQ_AVAIL(txq) >= MAX_TX_DESC(ctx); i++) { int rem = do_prefetch ? count - i : 0; mp = _ring_peek_one(r, cidx, i, rem); @@ -4740,6 +4746,7 @@ iflib_reset_qvalues(if_ctx_t ctx) scctx->isc_ntxd[i] = sctx->isc_ntxd_default[i]; } } + scctx->isc_tx_pad = 2; } static void diff --git a/sys/net/iflib.h b/sys/net/iflib.h index e65c936fc4b4..fe70fc5775cd 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -127,7 +127,8 @@ typedef struct if_pkt_info { uint8_t ipi_ip_tos; /* IP ToS field data */ uint8_t ipi_mflags; /* packet mbuf flags */ uint8_t __spare0__; - uint8_t __spare1__; + uint8_t __spare1__; + struct mbuf *ipi_mbuf; /* mbuf for ktls */ } *if_pkt_info_t; typedef struct if_irq { @@ -191,7 +192,7 @@ typedef struct if_softc_ctx { int isc_vectors; int isc_nrxqsets; int isc_ntxqsets; - uint16_t __spare0__; + uint16_t isc_tx_pad; uint32_t __spare1__; int isc_msix_bar; /* can be model specific - initialize in attach_pre */ int isc_tx_nsegments; /* can be model specific - initialize in attach_pre */ From nobody Sun Dec 21 14:46:38 2025 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 4dZ3xq0DMSz6Kt2X for ; Sun, 21 Dec 2025 14:46: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dZ3xp50vxz401c for ; Sun, 21 Dec 2025 14:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766328398; 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=0bHdboMUQUg7rpZ8PdkbqJDKvmFVkimq7fhnCPWuHQg=; b=pq/FC1MdMM7FcTrtKmDzfweYXE2hs+V9br9JkFUF/YHmsBnq1Yzw52vqmsZs7tZN5OgV2p HQKZHl2mdgFUo9SO8dNRkL8dalARHeG+S/XzKV6wFPmmn6kJ9PC86K3z5vjRPdX/8a3VMb kgCJB5CsOXKiurY3i8cHxjRtIxpXzXJKOQimi3YQ/vfDr4wqTH57uthooN6NqwPMX1sldh UBZ1aHuen6nUp9T5m49Kez0/wNVTdBin355CHMwlcAM1pKuOWMTcjjvPtGBi0X6V12v1lw PdY+TmIz7imH5DbMdqKlP3Jy2bEE2UY9DwqDU8ruB6yJZrRF8FFocYYeDypeyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766328398; 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=0bHdboMUQUg7rpZ8PdkbqJDKvmFVkimq7fhnCPWuHQg=; b=GAVGRGvLo2BdiW6J1s0eSpLVqBkS8sK9xCKZb+zSddG5s7e4wOrmv86ZIkaVsl2ysYC7Wg 3SczUNVhcsOxvtDxVy8CCfOSuIoReRYkgtl2NsTqeQor4C3wVy8GE+YJ+cmPvfFlfnUj2O da3pgXcRtPY3Z4bV7vdXAEIxyVS+dFOGuWXjtDdcsrvbQn963SESJJ7o4F1QSRPU4UVxKY o+dS8n8N59eoJKiyuTHIaeFloHW4VfnDjBRMQthJHR3DrYd6ScykQ2xp22v7DvlKJaAd82 MZCvh05vetxCQlRx6NNfBQdIJevF+otls1W0A9qB4PG2XxY0Zyg/PQ2nlMb1yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766328398; a=rsa-sha256; cv=none; b=FRjO3N+slG1qsUA6WQKLkVcS8IZ0cE2KHsotvD4cRn/Au9oXXq8Zf+57yr9dLkLsVW2pos ZOJLDeM10wCxZSpOSlZAKTpBjGQDlZRtFp+VEGylRuWCFfrFaImk4xWcKkA0QPTmoK4far JCRdxhnx9/7qpm2xiD9233YZ+MwdJg57OoeT8lK8hKvQvm3tPyQ3BX1GcZ/OinLvBz8XMI zJEkKbApsFpMIEe5I6Lbu/ZpDpe6b9xULbqEnOA+za5GeVf+21pPZ8o+sZ2c/Dzzw5rnj2 4dWeEQd6TPEJIKvmUAL8KBsB91xvrU0eXblYOU9/PS8t+GW4PPglUUFidTZVhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dZ3xp4YBYzl35 for ; Sun, 21 Dec 2025 14:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39145 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 21 Dec 2025 14:46:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 4d692068f685 - main - ktls: Capture initial tls seqno at time offload is initiated 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: 4d692068f6850282dabde9e35b3098a4ebec9592 Auto-Submitted: auto-generated Date: Sun, 21 Dec 2025 14:46:38 +0000 Message-Id: <6948084e.39145.65287bf8@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=4d692068f6850282dabde9e35b3098a4ebec9592 commit 4d692068f6850282dabde9e35b3098a4ebec9592 Author: Andrew Gallatin AuthorDate: 2025-12-20 21:10:12 +0000 Commit: Andrew Gallatin CommitDate: 2025-12-21 14:45:25 +0000 ktls: Capture initial tls seqno at time offload is initiated Some drivers want the TLS seqno when offload starts. Capture this for them by adding a union for initial_seqno, sharing space with the TLS 1.0 next_seqno. Reviewed by: jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54275 MFC After: 1 month --- sys/kern/uipc_ktls.c | 3 +++ sys/sys/ktls.h | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 66ce1b5a081d..35009ad77722 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1406,6 +1406,9 @@ ktls_enable_tx(struct socket *so, struct tls_enable *en) if (error) return (error); + /* some ktls offload NICs require initial seqno to start offload */ + tls->initial_offload_seqno = be64dec(en->rec_seq); + /* Prefer TOE -> ifnet TLS -> software TLS. */ #ifdef TCP_OFFLOAD error = ktls_try_toe(so, tls, KTLS_TX); diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h index a940bcfaba25..6c7e7d3c5ee3 100644 --- a/sys/sys/ktls.h +++ b/sys/sys/ktls.h @@ -221,9 +221,12 @@ struct ktls_session { bool tx; bool sync_dispatch; bool sequential_records; - - /* Only used for TLS 1.0. */ - uint64_t next_seqno; + union { + /* Only used for TLS 1.0. */ + uint64_t next_seqno; + /* Needed by some ktls offload NICs */ + uint64_t initial_offload_seqno; + }; STAILQ_HEAD(, mbuf) pending_records; /* Used to destroy any kTLS session */ From nobody Sun Dec 21 15:15:22 2025 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 4dZ4bJ6Jzqz6Kwfb for ; Sun, 21 Dec 2025 15:15:40 +0000 (UTC) (envelope-from sumit.saxena@broadcom.com) Received: from mail-pl1-x661.google.com (mail-pl1-x661.google.com [IPv6:2607:f8b0:4864:20::661]) (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 4dZ4bJ3tqsz44RY for ; Sun, 21 Dec 2025 15:15:40 +0000 (UTC) (envelope-from sumit.saxena@broadcom.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x661.google.com with SMTP id d9443c01a7336-29efd139227so42827155ad.1 for ; Sun, 21 Dec 2025 07:15:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766330137; x=1766934937; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MvaXIV8CKMHJUJG+HzxGouAyqu9Oi3ihE6f7ZPAuEYA=; b=Y91kdhjCZflc+jZvpVE08fJBDDMM6r5eTRRw0O8OeITkly2tQIqp8GeaWfdNGcBAOm QPJjsUl8CtZjPNRVQgHmyG5PdDUJoBfdvCpYaiRusBhrdOI0mHTVWge+MrDs1TqEE3tT WcLyq9bZzGaGn7SCWAcOOQGGXt7ch/iOxs78yHtFVKyEWLjcvkHoUQl8JB15U593httW pPLFSFdHwcD9jkDfOzqCJLPlCLHOE3bZUGJekQVw4vv9Jh15ZWYXzA5EnqDj6TzU75PL 331pXyDr73qwNDYygA4NtGpxlEHpPbLFBmhZxwLe5Pt6H9Tle99hNT6LU3qF0fecLgvx 9XeQ== X-Forwarded-Encrypted: i=1; AJvYcCWhcsgh7nDOMMf2G6fHkHwFVY8Es3/vDuOy6p8BzBiLEkojJDpVoA7EiwNl02sQObZGMi6Dc3Hi1qnCNkFIuIdTCBb/GA==@freebsd.org X-Gm-Message-State: AOJu0Yw2phkuSjUcld75FFP6lpWQ2dcw6a+kqBkDtAoJPn1/sfMvtdov RHSM7knT9iZVCCtR25aEIkKNHzYEPAkmy8+fYW8QXMKajxWighSer8s4zV2YmtU3APNXw3BXld3 +3MP4AeItzWuG4TxVAgfkMBdQiG8O/O0TlNm3NMOJJZ0spxTbWIFkv4OunsN2Ahmf1lxoDIS+bi FBfrY9B9oHB1U/FQaAThtrw8yc5qM5/recyKNkxdz4/BE/maKWqU00fgOy/J6onAXgAvofb6/Dc 3LX2wYS4CaM8C0zztcDZwfu X-Gm-Gg: AY/fxX7p+pRx6pr/P/XTXsGN57kzZSF5wxoMkkQ9hGvq8/QVaR0uYpDBv8HcyAFppqG O+s0MfZOLwl+TXhiQrBiPJ4NtTdAnwGcSoHdlPMBUUBDQ6VUjLV6rQ+KPBWT2UzCk9KMX3jqIei 9jFkV22yo7r94mdKAYe9R6++qFTSv3qQxDGp2eiMWMsWFj8JuzRsdey7L1vGlIAbhQFZDnZozdB GJYTT8QcbH/2WbTciM88hwRjN6RI84zvM61A45D1isOTKyJZU4EgLrzL7Hl3daBKZprNtbSPW8i x9FwPPDRoEvZ/b/8dRSAsq36ltJuUNv+TEX7WB46/81/jzV7D86VWTq0/kx11Nf/hM9XrMw1DXl 2Obkl29MjXYndO0id/h6jFYh0COKXiDZ6zHeRgR/VlYOzyuieODOCC0D+ITxrPG8AI7k2+QsUK6 MTdV4CyALOQs5+siQ/RyQ8cBaTq/Cb7vNlYg24UcsYhl+y X-Google-Smtp-Source: AGHT+IGWbzNDsI4k384KfE/Swenktyb6mvWwMSR1BXuu0x/rWUG6vwZ9aC4d+W7v4iTDnR2JWUxG8l4fgzDi X-Received: by 2002:a05:7022:7e04:b0:11b:b882:3ed5 with SMTP id a92af1059eb24-121722eb273mr8376397c88.37.1766330136804; Sun, 21 Dec 2025 07:15:36 -0800 (PST) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-19.dlp.protect.broadcom.com. [144.49.247.19]) by smtp-relay.gmail.com with ESMTPS id a92af1059eb24-121724cbe73sm1670432c88.1.2025.12.21.07.15.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Dec 2025 07:15:36 -0800 (PST) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-37fd43951e2so18738841fa.2 for ; Sun, 21 Dec 2025 07:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1766330134; x=1766934934; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MvaXIV8CKMHJUJG+HzxGouAyqu9Oi3ihE6f7ZPAuEYA=; b=amaqyQ7/RH95Je3WNsx2MBceHUFd28CjgPFGcZL6GmOKdWrEh2p9eLQVby9P5v9Q3R cj6wO0NkXI5qxgT9omV+ZDX6Uez4mnxfNa7FNM0JITlf4fYgXFkUKN+g9eRw3cWaoyia Q/mOi0b6Q1ng5wHYmRbmy4RCvsZPOQOovmN5U= X-Forwarded-Encrypted: i=1; AJvYcCWFm3FcU8I5JHwBClM7+6r8taA5Sn+mcFyNbJpoREsknC6D/r+ywgFHsA8f6TF+4CN+AodR2ZWBtSamLNiw+H4Dq9/yuQ==@freebsd.org X-Received: by 2002:a05:651c:542:b0:378:ea85:7f06 with SMTP id 38308e7fff4ca-3812169d974mr24032181fa.36.1766330134260; Sun, 21 Dec 2025 07:15:34 -0800 (PST) X-Received: by 2002:a05:651c:542:b0:378:ea85:7f06 with SMTP id 38308e7fff4ca-3812169d974mr24032081fa.36.1766330133788; Sun, 21 Dec 2025 07:15:33 -0800 (PST) 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: <69302037.3d155.40084cd7@gitrepo.freebsd.org> <31FE47D1-CE81-422B-8475-7D326FE09D10@freebsd.org> In-Reply-To: <31FE47D1-CE81-422B-8475-7D326FE09D10@freebsd.org> From: Sumit Saxena Date: Sun, 21 Dec 2025 20:45:22 +0530 X-Gm-Features: AQt7F2qOtMWXq8mq_oYwsg9O5ftWldV_Fn8rHHJiVNq3ee2HOck1yTpw8PMvuK0 Message-ID: Subject: Re: git: 35dd53a9e132 - main - librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping To: Jessica Clarke Cc: Sumit Saxena , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" X-DetectorID-Processed: b00c1d49-9d2e-4205-b15f-d015386d3d5e Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000003c5deb064677c8e6" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dZ4bJ3tqsz44RY --0000000000003c5deb064677c8e6 Content-Type: multipart/alternative; boundary="0000000000002e55a8064677c855" --0000000000002e55a8064677c855 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Apologies for the delay, will resolve it this week. Thanks, Sumit On Sun, 21 Dec 2025 at 8:15=E2=80=AFAM, Jessica Clarke = wrote: > On 3 Dec 2025, at 14:13, Jessica Clarke wrote: > > > > On 3 Dec 2025, at 11:34, Sumit Saxena wrote: > >> > >> The branch main has been updated by ssaxena: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3D35dd53a9e13265f7a479649776453ef= c5b737a0f > >> > >> commit 35dd53a9e13265f7a479649776453efc5b737a0f > >> Author: Sumit Saxena > >> AuthorDate: 2025-12-03 11:28:33 +0000 > >> Commit: Sumit Saxena > >> CommitDate: 2025-12-03 11:33:40 +0000 > >> > >> librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping > >> > >> By default ibv_devices and rping are not statically bound to > >> libbnxtre.so.1. i.e. 'ldd /usr/bin/rping' command doesn't list > >> 'libbnxtre.so.1' entry. So, statically bound the libbnxtre.so.1 > >> library to rping & ibv_devices utils. > > > > Firstly, this is some very unusual terminology, there=E2=80=99s no =E2= =80=9Cbinding=E2=80=9D > > going on here (binding in ELF linker/loader terminology is about > > symbols, not libraries), it=E2=80=99s =E2=80=9Clinking=E2=80=9D. Also, = whilst strictly true > > that this pertains to the static linker, repeating the static part > > makes it sound like you=E2=80=99re talking about static linking in the = ld > > -static / libfoo.a sense, which would still have the effect of not > > showing up in ldd=E2=80=99s output. > > > > Secondly, this states some things, but I don=E2=80=99t see why this cha= nge > > follows from it. *Why* does it matter that ibv_devices and rping do not > > link against libbnxtre? If it builds, that means none of libbnxtre=E2= =80=99s > > symbols were needed. Is there some magic dynamic registration going on > > in linker sets / constructors inside libbnxtre? Please explain the why > > in the commit message. > > Ping? I don=E2=80=99t see any follow-up to this. > > Jessica > > --0000000000002e55a8064677c855 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Apologies for the delay, will resolve it this week.

Thanks,
Sumit
On = Sun, 21 Dec 2025 at 8:15=E2=80=AFAM, Jessica Clarke <jrtc27@freebsd.org> wrote:
<= /div>
On 3 Dec 2025, at 14:13, Jessica Clarke= <jrtc27@FreeBSD.org> wrote:
>
> On 3 Dec 2025, at 11:34, Sumit Saxena <ssaxena@freebsd.org> wrote:
>>
>> The branch main has been updated by ssaxena:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3D35dd53a9e13265f7a479649776453efc5b737= a0f
>>
>> commit 35dd53a9e13265f7a479649776453efc5b737a0f
>> Author:=C2=A0 =C2=A0 =C2=A0Sumit Saxena <ssaxena@FreeBSD.org>= ;
>> AuthorDate: 2025-12-03 11:28:33 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Sumit Saxena <ssaxena@FreeBSD.org>= ;
>> CommitDate: 2025-12-03 11:33:40 +0000
>>
>>=C2=A0 =C2=A0librdmacm/libibverbs: Statically bound libbnxtre.so.1 = to rping
>>
>>=C2=A0 =C2=A0By default ibv_devices and rping are not statically bo= und to
>>=C2=A0 =C2=A0libbnxtre.so.1. i.e. 'ldd /usr/bin/rping' comm= and doesn't list
>>=C2=A0 =C2=A0'libbnxtre.so.1' entry. So, statically bound t= he libbnxtre.so.1
>>=C2=A0 =C2=A0library to rping & ibv_devices utils.
>
> Firstly, this is some very unusual terminology, there=E2=80=99s no =E2= =80=9Cbinding=E2=80=9D
> going on here (binding in ELF linker/loader terminology is about
> symbols, not libraries), it=E2=80=99s =E2=80=9Clinking=E2=80=9D. Also,= whilst strictly true
> that this pertains to the static linker, repeating the static part
> makes it sound like you=E2=80=99re talking about static linking in the= ld
> -static / libfoo.a sense, which would still have the effect of not
> showing up in ldd=E2=80=99s output.
>
> Secondly, this states some things, but I don=E2=80=99t see why this ch= ange
> follows from it. *Why* does it matter that ibv_devices and rping do no= t
> link against libbnxtre? If it builds, that means none of libbnxtre=E2= =80=99s
> symbols were needed. Is there some magic dynamic registration going on=
> in linker sets / constructors inside libbnxtre? Please explain the why=
> in the commit message.

Ping? I don=E2=80=99t see any follow-up to this.

Jessica

--0000000000002e55a8064677c855-- --0000000000003c5deb064677c8e6 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIVWQYJKoZIhvcNAQcCoIIVSjCCFUYCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ghLGMIIGqDCCBJCgAwIBAgIQfofDCS7XZu8vIeKo0KeY9DANBgkqhkiG9w0BAQwFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMzA0MTkwMzUzNTNaFw0yOTA0MTkwMDAwMDBaMFIxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSgwJgYDVQQDEx9HbG9iYWxTaWduIEdDQyBS NiBTTUlNRSBDQSAyMDIzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwjAEbSkPcSyn 26Zn9VtoE/xBvzYmNW29bW1pJZ7jrzKwPJm/GakCvy0IIgObMsx9bpFaq30X1kEJZnLUzuE1/hlc hatYqyORVBeHlv5V0QRSXY4faR0dCkIhXhoGknZ2O0bUJithcN1IsEADNizZ1AJIaWsWbQ4tYEYj ytEdvfkxz1WtX3SjtecZR+9wLJLt6HNa4sC//QKdjyfr/NhDCzYrdIzAssoXFnp4t+HcMyQTrj0r pD8KkPj96sy9axzegLbzte7wgTHbWBeJGp0sKg7BAu+G0Rk6teO1yPd75arbCvfY/NaRRQHk6tmG 71gpLdB1ZhP9IcNYyeTKXIgfMh2tVK9DnXGaksYCyi6WisJa1Oa+poUroX2ESXO6o03lVxiA1xyf G8lUzpUNZonGVrUjhG5+MdY16/6b0uKejZCLbgu6HLPvIyqdTb9XqF4XWWKu+OMDs/rWyQ64v3mv Sa0te5Q5tchm4m9K0Pe9LlIKBk/gsgfaOHJDp4hYx4wocDr8DeCZe5d5wCFkxoGc1ckM8ZoMgpUc 4pgkQE5ShxYMmKbPvNRPa5YFzbFtcFn5RMr1Mju8gt8J0c+dxYco2hi7dEW391KKxGhv7MJBcc+0 x3FFTnmhU+5t6+CnkKMlrmzyaoeVryRTvOiH4FnTNHtVKUYDsCM0CLDdMNgoxgkCAwEAAaOCAX4w ggF6MA4GA1UdDwEB/wQEAwIBhjBMBgNVHSUERTBDBggrBgEFBQcDAgYIKwYBBQUHAwQGCisGAQQB gjcUAgIGCisGAQQBgjcKAwwGCisGAQQBgjcKAwQGCSsGAQQBgjcVBjASBgNVHRMBAf8ECDAGAQH/ AgEAMB0GA1UdDgQWBBQAKTaeXHq6D68tUC3boCOFGLCgkjAfBgNVHSMEGDAWgBSubAWjkxPioufi 1xzWx/B/yGdToDB7BggrBgEFBQcBAQRvMG0wLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3NwMi5nbG9i YWxzaWduLmNvbS9yb290cjYwOwYIKwYBBQUHMAKGL2h0dHA6Ly9zZWN1cmUuZ2xvYmFsc2lnbi5j b20vY2FjZXJ0L3Jvb3QtcjYuY3J0MDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwuZ2xvYmFs c2lnbi5jb20vcm9vdC1yNi5jcmwwEQYDVR0gBAowCDAGBgRVHSAAMA0GCSqGSIb3DQEBDAUAA4IC AQCRkUdr1aIDRmkNI5jx5ggapGUThq0KcM2dzpMu314mJne8yKVXwzfKBtqbBjbUNMODnBkhvZcn bHUStur2/nt1tP3ee8KyNhYxzv4DkI0NbV93JChXipfsan7YjdfEk5vI2Fq+wpbGALyyWBgfy79Y IgbYWATB158tvEh5UO8kpGpjY95xv+070X3FYuGyeZyIvao26mN872FuxRxYhNLwGHIy38N9ASa1 Q3BTNKSrHrZngadofHglG5W3TMFR11JOEOAUHhUgpbVVvgCYgGA6dSX0y5z7k3rXVyjFOs7KBSXr dJPKadpl4vqYphH7+P40nzBRcxJHrv5FeXlTrb+drjyXNjZSCmzfkOuCqPspBuJ7vab0/9oeNERg nz6SLCjLKcDXbMbKcRXgNhFBlzN4OUBqieSBXk80w2Nzx12KvNj758WavxOsXIbX0Zxwo1h3uw75 AI2v8qwFWXNclO8qW2VXoq6kihWpeiuvDmFfSAwRLxwwIjgUuzG9SaQ+pOomuaC7QTKWMI0hL0b4 mEPq9GsPPQq1UmwkcYFJ/Z4I93DZuKcXmKMmuANTS6wxwIEw8Q5MQ6y9fbJxGEOgOgYL4QIqNULb 5CYPnt2LeiIiEnh8Uuh8tawqSjnR0h7Bv5q4mgo3L1Z9QQuexUntWD96t4o0q1jXWLyrpgP7Zcnu CzCCBYMwggNroAMCAQICDkXmuwODM8OFZUjm/0VRMA0GCSqGSIb3DQEBDAUAMEwxIDAeBgNVBAsT F0dsb2JhbFNpZ24gUm9vdCBDQSAtIFI2MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQDEwpH bG9iYWxTaWduMB4XDTE0MTIxMDAwMDAwMFoXDTM0MTIxMDAwMDAwMFowTDEgMB4GA1UECxMXR2xv YmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh bFNpZ24wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCVB+hzymb57BTKezz3DQjxtEUL LIK0SMbrWzyug7hBkjMUpG9/6SrMxrCIa8W2idHGsv8UzlEUIexK3RtaxtaH7k06FQbtZGYLkoDK RN5zlE7zp4l/T3hjCMgSUG1CZi9NuXkoTVIaihqAtxmBDn7EirxkTCEcQ2jXPTyKxbJm1ZCatzEG xb7ibTIGph75ueuqo7i/voJjUNDwGInf5A959eqiHyrScC5757yTu21T4kh8jBAHOP9msndhfuDq jDyqtKT285VKEgdt/Yyyic/QoGF3yFh0sNQjOvddOsqi250J3l1ELZDxgc1Xkvp+vFAEYzTfa5MY vms2sjnkrCQ2t/DvthwTV5O23rL44oW3c6K4NapF8uCdNqFvVIrxclZuLojFUUJEFZTuo8U4lptO TloLR/MGNkl3MLxxN+Wm7CEIdfzmYRY/d9XZkZeECmzUAk10wBTt/Tn7g/JeFKEEsAvp/u6P4W4L sgizYWYJarEGOmWWWcDwNf3J2iiNGhGHcIEKqJp1HZ46hgUAntuA1iX53AWeJ1lMdjlb6vmlodiD D9H/3zAR+YXPM0j1ym1kFCx6WE/TSwhJxZVkGmMOeT31s4zKWK2cQkV5bg6HGVxUsWW2v4yb3BPp DW+4LtxnbsmLEbWEFIoAGXCDeZGXkdQaJ783HjIH2BRjPChMrwIDAQABo2MwYTAOBgNVHQ8BAf8E BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUrmwFo5MT4qLn4tcc1sfwf8hnU6AwHwYD VR0jBBgwFoAUrmwFo5MT4qLn4tcc1sfwf8hnU6AwDQYJKoZIhvcNAQEMBQADggIBAIMl7ejR/ZVS zZ7ABKCRaeZc0ITe3K2iT+hHeNZlmKlbqDyHfAKK0W63FnPmX8BUmNV0vsHN4hGRrSMYPd3hckSW tJVewHuOmXgWQxNWV7Oiszu1d9xAcqyj65s1PrEIIaHnxEM3eTK+teecLEy8QymZjjDTrCHg4x36 2AczdlQAIiq5TSAucGja5VP8g1zTnfL/RAxEZvLS471GABptArolXY2hMVHdVEYcTduZlu8aHARc phXveOB5/l3bPqpMVf2aFalv4ab733Aw6cPuQkbtwpMFifp9Y3s/0HGBfADomK4OeDTDJfuvCp8g a907E48SjOJBGkh6c6B3ace2XH+CyB7+WBsoK6hsrV5twAXSe7frgP4lN/4Cm2isQl3D7vXM3PBQ ddI2aZzmewTfbgZptt4KCUhZh+t7FGB6ZKppQ++Rx0zsGN1s71MtjJnhXvJyPs9UyL1n7KQPTEX/ 07kwIwdMjxC/hpbZmVq0mVccpMy7FYlTuiwFD+TEnhmxGDTVTJ267fcfrySVBHioA7vugeXaX3yL SqGQdCWnsz5LyCxWvcfI7zjiXJLwefechLp0LWEBIH5+0fJPB1lfiy1DUutGDJTh9WZHeXfVVFsf rSQ3y0VaTqBESMjYsJnFFYQJ9tZJScBluOYacW6gqPGC6EU+bNYC1wpngwVayaQQMIIGjzCCBHeg AwIBAgIMdI2Nfq/Vk8dzZMUnMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAkJFMRkwFwYDVQQK ExBHbG9iYWxTaWduIG52LXNhMSgwJgYDVQQDEx9HbG9iYWxTaWduIEdDQyBSNiBTTUlNRSBDQSAy MDIzMB4XDTI1MDYyMDEwNTUwNVoXDTI3MDYyMTEwNTUwNVowgdcxCzAJBgNVBAYTAlVTMRMwEQYD VQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTEZMBcGA1UEYRMQTlRSVVMrREUtNjYx MDExNzEPMA0GA1UEBBMGU2F4ZW5hMQ4wDAYDVQQqEwVTdW1pdDEWMBQGA1UEChMNQlJPQURDT00g SU5DLjEiMCAGA1UEAwwZc3VtaXQuc2F4ZW5hQGJyb2FkY29tLmNvbTEoMCYGCSqGSIb3DQEJARYZ c3VtaXQuc2F4ZW5hQGJyb2FkY29tLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB ANWfdRsD0NsQr9oaNovE6N6ldgUGyJipSPE9u2SuA5SLtk4//f6PIFdR6h5fMMUsw7H4eBqY88Do ifscJ8gSasrjdgcsGC9lCyPXLwfNEU5C3Mbnua8OK6sTBpf6mvY88HW/6AoKiSpfo5jxCZQOm4Zz oJWD5ea7ThJ2XdDk1rRtGUkwFgN9GRNfOoiIwkkA7EdEfV0eQkVqNgkqUyBSABXcduul2sd4/JQO SsVmTdSKid7L6yZsqk5b3Xj+GMJwPdRfeKP2SRoys0SVnajc9Di+9Jy7uGKxxtb562egZauDFX/0 o0UgYfZrbwWfzJDYMLKzlrOD0M8yGkD8BnyIiVECAwEAAaOCAd0wggHZMA4GA1UdDwEB/wQEAwIF oDAMBgNVHRMBAf8EAjAAMIGTBggrBgEFBQcBAQSBhjCBgzBGBggrBgEFBQcwAoY6aHR0cDovL3Nl Y3VyZS5nbG9iYWxzaWduLmNvbS9jYWNlcnQvZ3NnY2NyNnNtaW1lY2EyMDIzLmNydDA5BggrBgEF BQcwAYYtaHR0cDovL29jc3AuZ2xvYmFsc2lnbi5jb20vZ3NnY2NyNnNtaW1lY2EyMDIzMGUGA1Ud IAReMFwwCQYHZ4EMAQUDAzALBgkrBgEEAaAyASgwQgYKKwYBBAGgMgoDAjA0MDIGCCsGAQUFBwIB FiZodHRwczovL3d3dy5nbG9iYWxzaWduLmNvbS9yZXBvc2l0b3J5LzBBBgNVHR8EOjA4MDagNKAy hjBodHRwOi8vY3JsLmdsb2JhbHNpZ24uY29tL2dzZ2NjcjZzbWltZWNhMjAyMy5jcmwwJAYDVR0R BB0wG4EZc3VtaXQuc2F4ZW5hQGJyb2FkY29tLmNvbTATBgNVHSUEDDAKBggrBgEFBQcDBDAfBgNV HSMEGDAWgBQAKTaeXHq6D68tUC3boCOFGLCgkjAdBgNVHQ4EFgQURSmmYGaiq6dg3CEvXQGHEXJF 8xwwDQYJKoZIhvcNAQELBQADggIBAAl0pcCjujKdwmgtiGl2naEY5wB4G601Kuu3032tR7wmgZLg k+lg9fhAA0boPsi1FE1Pwb93YDBGr/naS/oQ9JglSMeEVzeRvCqjFS4FpouBAFHB77c8w3ZwJ3+t FSRJW9SbW0DADBn5t8GAjv2aSm5vDorqFe9MKOYEe50yYDQEUAsEt5QkrLTcEx9ntvVb25MxI8vM bdfqna+/TyCmFmnGAz58jiw5DxLn++6wMmAk0SeUEuMrAlRIyhte6BBSBQ5cL1P+DWSqQbm/pwCq NhySSLNtTi2dKJvvg6Ax9au913KiJj6uZfPlh6/0kaVKM5GhIABUcm3c6g2qD7ITJxB/p1kjYKLa hVrtrjK7000lHKTPFr6MWB4Ggx7yKQ9yIlPMKKF/Lj8FabYCqeM5ovG7kaK8FYXug5vjNjN0nedR X3P8o+8aL6WFIAAAKm2DqZh3252Gcken8v5c+f0SXWSJFvemfFNgrJiQFnFVrOE5v7qwvM/KvVCA dYm4Ph9QYI0sm+Xitx8MkdOJtq5mcPWowGi8UiCgkOidv4ki1SA0wptfquUhbfS9b2M3XUHCEIUX 4ECvIjR3f+E0NbBIfPccWfYUaDLvo2qhLYS3KQbhKdXcJ83ha17mbVNZbDDo9upNcLO/oPyDbCNF J6UpXZmis1wnCynhK4kQfwFhW7H+MYICVzCCAlMCAQEwYjBSMQswCQYDVQQGEwJCRTEZMBcGA1UE ChMQR2xvYmFsU2lnbiBudi1zYTEoMCYGA1UEAxMfR2xvYmFsU2lnbiBHQ0MgUjYgU01JTUUgQ0Eg MjAyMwIMdI2Nfq/Vk8dzZMUnMA0GCWCGSAFlAwQCAQUAoIHHMC8GCSqGSIb3DQEJBDEiBCCNReq3 NLbXc/8V8fD63kfKVpnICvoroyNSmf3RtwINdjAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwG CSqGSIb3DQEJBTEPFw0yNTEyMjExNTE1MzRaMFwGCSqGSIb3DQEJDzFPME0wCwYJYIZIAWUDBAEq MAsGCWCGSAFlAwQBFjALBglghkgBZQMEAQIwCgYIKoZIhvcNAwcwCwYJKoZIhvcNAQEHMAsGCWCG SAFlAwQCATANBgkqhkiG9w0BAQEFAASCAQCD4jv1hVc9MEktcxjayJKwSpcvhWWTVPkhgHK5s5G3 nWrSg1fdGKvom4vBdI4J3MoE1e3tTIqM0g1fHVNmWoeBWElx7jSfID+ore7R9C2ioKngZYQDPOSQ VRhgt7KTw+VnGSREye5cTR06lkz/csN1OlVc3Fjr0C9ZmsEsIUoqX9yL2TVNqKhvCameW7AA0dzA zvM6DyKnzoLikj/7iyucFdFAvYzHxgbSCP9S79UHuBriDcTO9jtFwmI1CsrUe2MFJrLxZhF2MC++ zDjnMbIpOMpSn6XLHN9KAQjHU5IgKO+KwCepHqLA9WStEds4WXTVxVmym+oIo7LWuH+JLJAB --0000000000003c5deb064677c8e6-- From nobody Sun Dec 21 17:33:37 2025 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 4dZ7fV32RRz6LBmK for ; Sun, 21 Dec 2025 17:33: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dZ7fT3KGHz3LGl for ; Sun, 21 Dec 2025 17:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766338417; 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=s9WF2EgZmzEn8pfSNIYc0l3SvC+3tAgalHXXpUYJadU=; b=JppyuTzBl/dldZyIJ2/vzp7IM1yfy5+Bbd8aha+LQ7IWTMC8mV2ZTMk9nxC0TOpsP+XlII 8eUrNobqms4u4iN4ruQtbzEEv9m6vHa8riTeGjhCdsrpdqih6LguKfU5Z7mP7Idyqjztea XKV2z4VVU/shsewTCIaOtuQK0M/3maldfA5IUN7bgn7pyDEjegZttXB2be0aCNKQ6TozD8 2oj/gcBV/OWYr7d6sTFZxiW4fts/gVSYUObiL7dc8oSJwp36UpxBQWA2PAULy7sKXzxqTf EFTqsY2AfRszZQPHz8UnswLBhtPB5kkixg5de8CP2rzLq88VwF7LqpIbGf1KeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766338417; 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=s9WF2EgZmzEn8pfSNIYc0l3SvC+3tAgalHXXpUYJadU=; b=fntcPXd1sJ6Yf9JO5q/cXXPff+fAFBYZ6vqwK82u1jf7bCtBslLbT3Y38KpHk3WxD2gveN AN+M6VBkN1aA/cVtsLM2iG+0n4Vp1IUOoP+V3Nq40fzJSkljSgyLyDI5l1FwfdedzFPlHl 90c3DOMNMtJJDYL2mnFl5EvYW7X1jWFfDiDraMFEwzvM9vkMOM4qzXMqBxUdFBqx4ki2WL kiG8Zi0rfeiVdcxoawrT2oALv3GFwV1jiyzARsJugvCLeJdmRs7F3WcINj8DRjAS/ZFRen n66AVIrrJeS4vedz5kBoYsFmdSzpZTW3abViv4kP8bY2N9w4ilJ+lJQHz5yzCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766338417; a=rsa-sha256; cv=none; b=pi+Pw8YKruFNAr/4sLYoStx4XbbWIf33khuNmfn3yFFbX2VOUUcEP4T7bK5cObE+OKdm/j w6jQp/fiTa64SMtEEDeO/iuiTO9Npsa5uRRiFjqPR9Mq3pYetukWirRNPPRFLhOW/UR1qf 9S/WE6lOHEckZ5EzHynF2P6a5I8bE3DzbdiF9Sk5wDHuGo3WIrTnWRCtfdp5kmGUZo05eN b2Aa25R/KGHiEDVNUv6+JiUiSHI33nuRuF+GhCxxdXVwrZ37f/VRmJXrJhVOBVnGzNAC/w tAku7ZmnkjVJnvbx8DLPw/OA5NWS8lGla9tlsEBvHaoRQfMxR+xYRi13RzqEQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dZ7fT1dSMzqbs for ; Sun, 21 Dec 2025 17:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24980 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 21 Dec 2025 17:33:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 823ebd7c4f89 - main - libpfctl: export a get states variant that takes a pfctl_handle 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: 823ebd7c4f897b1c620b6f21a68221da1cef7449 Auto-Submitted: auto-generated Date: Sun, 21 Dec 2025 17:33:37 +0000 Message-Id: <69482f71.24980.389b2a8e@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=823ebd7c4f897b1c620b6f21a68221da1cef7449 commit 823ebd7c4f897b1c620b6f21a68221da1cef7449 Author: Kristof Provost AuthorDate: 2025-12-21 11:12:17 +0000 Commit: Kristof Provost CommitDate: 2025-12-21 17:33:06 +0000 libpfctl: export a get states variant that takes a pfctl_handle Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 22 +++++++++++----------- lib/libpfctl/libpfctl.h | 1 + sbin/pfctl/pfctl.c | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 1959f7bebc39..7e5a07ccd55a 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1961,11 +1961,11 @@ static const struct snl_hdr_parser *all_parsers[] = { &creator_parser, &getrules_parser }; -static int -pfctl_get_states_nl(struct pfctl_state_filter *filter, struct snl_state *ss, pfctl_get_state_fn f, void *arg) +int +pfctl_get_states_h(struct pfctl_handle *h, struct pfctl_state_filter *filter, pfctl_get_state_fn f, void *arg) { SNL_VERIFY_PARSERS(all_parsers); - int family_id = snl_get_genl_family(ss, PFNL_FAMILY_NAME); + int family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); int ret; struct nlmsghdr *hdr; @@ -1974,7 +1974,7 @@ pfctl_get_states_nl(struct pfctl_state_filter *filter, struct snl_state *ss, pfc if (family_id == 0) return (ENOTSUP); - snl_init_writer(ss, &nw); + snl_init_writer(&h->ss, &nw); hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_GETSTATES); hdr->nlmsg_flags |= NLM_F_DUMP; snl_add_msg_attr_string(&nw, PF_ST_IFNAME, filter->ifname); @@ -1989,13 +1989,13 @@ pfctl_get_states_nl(struct pfctl_state_filter *filter, struct snl_state *ss, pfc uint32_t seq_id = hdr->nlmsg_seq; - snl_send_message(ss, hdr); + snl_send_message(&h->ss, hdr); struct snl_errmsg_data e = {}; - while ((hdr = snl_read_reply_multi(ss, seq_id, &e)) != NULL) { + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { struct pfctl_state s; bzero(&s, sizeof(s)); - if (!snl_parse_nlmsg(ss, hdr, &state_parser, &s)) + if (!snl_parse_nlmsg(&h->ss, hdr, &state_parser, &s)) continue; ret = f(&s, arg); @@ -2016,12 +2016,12 @@ pfctl_get_states_iter(pfctl_get_state_fn f, void *arg) int pfctl_get_filtered_states_iter(struct pfctl_state_filter *filter, pfctl_get_state_fn f, void *arg) { - struct snl_state ss = {}; + struct pfctl_handle h = {}; int error; - snl_init(&ss, NETLINK_GENERIC); - error = pfctl_get_states_nl(filter, &ss, f, arg); - snl_free(&ss); + snl_init(&h.ss, NETLINK_GENERIC); + error = pfctl_get_states_h(&h, filter, f, arg); + snl_free(&h.ss); return (error); } diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 9cb596c1b280..9576118fe146 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -499,6 +499,7 @@ struct pfctl_state_filter { }; typedef int (*pfctl_get_state_fn)(struct pfctl_state *, void *); int pfctl_get_states_iter(pfctl_get_state_fn f, void *arg); +int pfctl_get_states_h(struct pfctl_handle *h, struct pfctl_state_filter *filter, pfctl_get_state_fn f, void *arg); int pfctl_get_filtered_states_iter(struct pfctl_state_filter *filter, pfctl_get_state_fn f, void *arg); int pfctl_get_states(int dev, struct pfctl_states *states); void pfctl_free_states(struct pfctl_states *states); diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 5ab4687dd35f..da27afb0a179 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1700,7 +1700,7 @@ pfctl_show_states(int dev, const char *iface, int opts) arg.dotitle = opts & PF_OPT_SHOWALL; arg.iface = iface; - if (pfctl_get_filtered_states_iter(&filter, pfctl_show_state, &arg)) + if (pfctl_get_states_h(pfh, &filter, pfctl_show_state, &arg)) return (-1); return (0); From nobody Sun Dec 21 22:05:45 2025 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 4dZFhZ4Fnqz6LRjG for ; Sun, 21 Dec 2025 22: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dZFhZ3gKWz3sZG for ; Sun, 21 Dec 2025 22: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=1766354750; 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=0ZnO/5/tHjigSbK2HtE1A4+PgFkJX+9LF/YZw/pDc6A=; b=ZeRhMWQMBtK7JULAQJZ5QTI44K6LpgdxTIA//YBE4gG78CmI4ZVXbM9My/hY0lFCmG0+t7 rt0sxWN59hA27JRs22ZmMZ7kkcmT9Ya/T3oIvmcQ4MWQP0SQzVD/pEr5VLaTEyPlOPt1kb Sc8nsPOIMFRXzxIjCR4+ucf05iqbBNn7Qz/okecIZ8RlGcCt3xVuJEn6feHO/QVk1txQ10 GBNVIdbk5IKU5MTLZtkPrDOQLSWm4K2liWzGbUFsWjNb+kcUXeTohw+jiBborgmwyLmm4i FjzppUDkn9JnS9ZuRLURAAmvN2TkSIfzLHiOKkOWNe0V842EkQ+Vs4+K5P4dmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766354750; 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=0ZnO/5/tHjigSbK2HtE1A4+PgFkJX+9LF/YZw/pDc6A=; b=FYtwfLeNFXN2+f7Fj1Nef6cK59dzp69O9QQGn4cZkNaOvJvpC8lhdNiLtGd9rViOnuxcK5 lBSesXaQoUqRWtEnCLVNOGySAGLpdWFeSZo8kS8R2gqdR/9zTVC2cYBWpEehMCUjBojSm8 pUbNuwjXOlfSMokjWbn6DkSqInfU7YdGT5ro56wrESyRJ2pFMqWxjA79GWWrz32AqWGXrc T7kUrRMOhHQ6xQG2MSjvb+Pm+DtAJSLeY4cPEtxs1cXcyaATRDCuzIc2FQOU8iBYGSayMt N3SRn21mZv+CBrSN0tSvVI66kbL1CQxkbqvwuhggmYqXKxi4FlkQ4xWyW17cDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766354750; a=rsa-sha256; cv=none; b=fmGUDfS33UJtju003kpl0WVtbm8qLy9CCeFfu3BgK8bG2RY/RZlk5t297sCZamWad2HExD jriZ31AP4cKvBgCYCbKbXdALsK6953kCPiGoH5FvM1vsJs1t7EsihH2jmnLykOavSA7/4R 2zM7xTuEV6uB1nHOAu5K+1YoDtoiCyWZn90T9mxoZp3nEgcj9u3G2YMo0X930DjWRtP9yb prODxtDskdDYo5DWi5obYkubsg4PcT2pEjr0ZXH07eWjFY0BitgFwX48swE4vs0x3ehYfn 72Lcp6D6YvMf2SDmj2d7tmoJPfdkj4E1maQEtZUsp5nca/ZZ7Zmoq7mp5bkOGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dZFhZ36Pszy8g for ; Sun, 21 Dec 2025 22:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4533b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 21 Dec 2025 22:05:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 95788a851deb - main - vm_fault_trap(): fix comments grammar 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: 95788a851deb33242c18beb47f8a79eec320dfa5 Auto-Submitted: auto-generated Date: Sun, 21 Dec 2025 22:05:45 +0000 Message-Id: <69486f39.4533b.4f09537@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=95788a851deb33242c18beb47f8a79eec320dfa5 commit 95788a851deb33242c18beb47f8a79eec320dfa5 Author: Konstantin Belousov AuthorDate: 2025-12-21 21:21:03 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-21 22:05:14 +0000 vm_fault_trap(): fix comments grammar Submitted and reviewed by: alc Fixes: 22cce201da76a1916be5c993201f0478f3048292 MFC after: 3 days Differential revision: https://reviews.freebsd.org/D54335 --- sys/vm/vm_fault.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index f7318f96f709..1f13869aebf1 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -714,10 +714,10 @@ _Static_assert(UCODE_PAGEFLT == T_PAGEFLT, "T_PAGEFLT"); /* * vm_fault_trap: * - * Helper for the page fault trap handlers, wrapping vm_fault(). - * Issues ktrace(2) tracepoints for the faults. + * Helper for the machine-dependent page fault trap handlers, wrapping + * vm_fault(). Issues ktrace(2) tracepoints for the faults. * - * If a fault cannot be handled successfully by satisfying the + * If the fault cannot be handled successfully by updating the * required mapping, and the faulted instruction cannot be restarted, * the signal number and si_code values are returned for trapsignal() * to deliver. @@ -1657,10 +1657,10 @@ vm_fault_object(struct faultstate *fs, int *behindp, int *aheadp) * The given address should be truncated to the proper page address. * * KERN_SUCCESS is returned if the page fault is handled; otherwise, a - * Mach error specifying why the fault is fatal is returned. + * Mach error code explaining why the fault is fatal is returned. * - * The map in question must be alive, either being the map for current - * process, or the owner process hold count incremented to prevent + * The map in question must be alive, either being the map for the current + * process, or the owner process hold count has been incremented to prevent * exit(). * * If the thread private TDP_NOFAULTING flag is set, any fault results From nobody Sun Dec 21 22:29:37 2025 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 4dZGD20gSJz6LTJZ for ; Sun, 21 Dec 2025 22:29: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dZGD16pZxz3v7y for ; Sun, 21 Dec 2025 22:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766356178; 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=WHJOIGOVPoYlccKWuAtHaBIUKdrXsxMb3aTwzRFg5z4=; b=HHveoQa//+rxW3zYeTIz9HdZ87AJ2W6IC4FL/aQFDabngaBuxcz6znrw8gkRefjg8dfJ51 F661CxsfevIvr7/PWV+GEdfS5G7X7iBwpfiQjD+jGHD1GhUd1gK0ZGlw9zLq5pNoLAwBYh cdefiaJ0MZ0P/ZarRy7C/45C0uyfG7UNdJx0SaFyFhIJ/GcMpziSDGYquAVAsGek9SDE48 +l65rrzLmM1YWi+B4x6knllOCh4x/dGjjDgxMLkETA5nI1HRU8cWLtimfij1jNQfh7rOWI hiYSwB9wEMj3UFPuWYdcXB11IxgsRPd74VHmr/uvdFASnWk389SP2OHTOVVZFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766356178; 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=WHJOIGOVPoYlccKWuAtHaBIUKdrXsxMb3aTwzRFg5z4=; b=EnHstusj+Ztt1tVNUdmceyVOP/tbXbCQ4dhxRiDRC2crHjX9x4x7q9YIEvyiuJCQe65CAp WYgnRlYXTPWW3l01+HuZNNmc2FryuOxZhkyEkCup05lEfd0Iqhmbxxhz256v7QeYkN23AN 4WjUbpAfLACaXvWZPrWDKQio10Uirqdy8s2YSPFV+myYoTkjnNrmafFC6+JDJN8YX4Ykd0 wpfn88f9kTk/8seFBYIKuZXxjqyQDuRF7ihzGU4PoJSBO/K8l27NgvP5UgqIQKQrPmiiir aGVZQbThCkkqHuHZR62elHdY79XK9hC7uFfpUEzkZtBHYCPEnLaWZkXDGJvL9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766356178; a=rsa-sha256; cv=none; b=B/+Al6TQ0k6yLD/uBHVbaPTzANlTymcsr1zu6XsCKrkxa6Hb9kcRRu7wujxsXaRnAuzupG +64qpmmuU1XYm7MSWm2MYgs4bJLChjoJUhp1GUGdn/8GVl6lBHorgjFzzbHqllaQhtNMHp Tqt1STFG0WIgVizb2oP6R/ukCNQDvPRkFqash/XM+ttOrspu4LA8EKbiwEB29ilAogbK8r 4eZzW0+3awxNvSUytt3KheTxd4lMykdB08q+asvODapBv/fr0yr1d9e3N/A1aw4i5VVTBx M9IHVkeen81kRcsn0Messkyp2FRfqjjCI3Y4EJETfJOK8GXunFO9dRK1NVzlmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dZGD15mfxzyrg for ; Sun, 21 Dec 2025 22:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8704 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 21 Dec 2025 22:29:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: a35bbd5d9f5f - main - nfscommon: Add some support for POSIX draft ACLs 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: a35bbd5d9f5f887a6f3de15cfe61fcc73fe22dc8 Auto-Submitted: auto-generated Date: Sun, 21 Dec 2025 22:29:37 +0000 Message-Id: <694874d1.8704.60f44fbb@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a35bbd5d9f5f887a6f3de15cfe61fcc73fe22dc8 commit a35bbd5d9f5f887a6f3de15cfe61fcc73fe22dc8 Author: Rick Macklem AuthorDate: 2025-12-21 22:28:12 +0000 Commit: Rick Macklem CommitDate: 2025-12-21 22:28:12 +0000 nfscommon: Add some support for POSIX draft ACLs An internet draft (expected to become an RFC someday) https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls describes an extension to NFSv4.2 to handle POSIX draft ACLs. This is the first of several patches that implement the above draft. This patch should not result in a semantics change. --- sys/fs/nfs/nfs.h | 5 +++++ sys/fs/nfs/nfs_commonport.c | 20 ++++++++++++++++++++ sys/fs/nfs/nfs_var.h | 2 ++ sys/fs/nfs/nfsproto.h | 30 +++++++++++++++++++++++++++++- 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h index e6a125b388a8..ecff9b8e6849 100644 --- a/sys/fs/nfs/nfs.h +++ b/sys/fs/nfs/nfs.h @@ -867,6 +867,11 @@ typedef enum { NOTRUNNING=0, STARTSTOP=1, RUNNING=2 } nfsuserd_state; typedef enum { UNKNOWN=0, DELETED=1, NLINK_ZERO=2, VALID=3 } nfsremove_status; +/* Values for supports_nfsv4acls. */ +#define SUPPACL_NONE 0 +#define SUPPACL_NFSV4 1 +#define SUPPACL_POSIX 2 + #endif /* _KERNEL */ #endif /* _NFS_NFS_H */ diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 862780741ee7..44fcbe2d5722 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -820,6 +820,26 @@ nfs_supportsnfsv4acls(struct vnode *vp) return (0); } +/* + * Determine if the file system supports POSIX draft ACLs. + * Return 1 if it does, 0 otherwise. + */ +int +nfs_supportsposixacls(struct vnode *vp) +{ + int error; + long retval; + + ASSERT_VOP_LOCKED(vp, "nfs supports posixacls"); + + if (nfsrv_useacl == 0) + return (0); + error = VOP_PATHCONF(vp, _PC_ACL_EXTENDED, &retval); + if (error == 0 && retval != 0) + return (1); + return (0); +} + /* * These are the first fields of all the context structures passed into * nfs_pnfsio(). diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 7db3952ecf5c..6b14c8486272 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -437,6 +437,7 @@ struct nfsreferral *nfsv4root_getreferral(vnode_t, vnode_t, u_int32_t); int nfsvno_pathconf(vnode_t, int, long *, struct ucred *, NFSPROC_T *); int nfsrv_atroot(vnode_t, uint64_t *); int nfs_supportsnfsv4acls(vnode_t); +int nfs_supportsposixacls(struct vnode *); /* nfs_commonacl.c */ int nfsrv_dissectace(struct nfsrv_descript *, struct acl_entry *, @@ -784,6 +785,7 @@ void nfsm_trimtrailing(struct nfsrv_descript *, struct mbuf *, char *, int, int); bool nfsrv_checkwrongsec(struct nfsrv_descript *, int, __enum_uint8(vtype)); void nfsrv_checknospc(void); +int nfs_supportsacls(struct vnode *); /* nfs_commonkrpc.c */ int newnfs_nmcancelreqs(struct nfsmount *); diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index 13fec8a102a3..41150ef88188 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -1025,6 +1025,10 @@ struct nfsv3_sattr { #define NFSATTRBIT_SECLABEL 80 #define NFSATTRBIT_MODEUMASK 81 #define NFSATTRBIT_XATTRSUPPORT 82 +#define NFSATTRBIT_ACLTRUEFORM 89 +#define NFSATTRBIT_ACLTRUEFORMSCOPE 90 +#define NFSATTRBIT_POSIXDEFAULTACL 91 +#define NFSATTRBIT_POSIXACCESSACL 92 #define NFSATTRBM_SUPPORTEDATTRS 0x00000001 #define NFSATTRBM_TYPE 0x00000002 @@ -1109,8 +1113,12 @@ struct nfsv3_sattr { #define NFSATTRBM_SECLABEL 0x00010000 #define NFSATTRBM_MODEUMASK 0x00020000 #define NFSATTRBM_XATTRSUPPORT 0x00040000 +#define NFSATTRBM_ACLTRUEFORM 0x02000000 +#define NFSATTRBM_ACLTRUEFORMSCOPE 0x04000000 +#define NFSATTRBM_POSIXDEFAULTACL 0x08000000 +#define NFSATTRBM_POSIXACCESSACL 0x10000000 -#define NFSATTRBIT_MAX 83 +#define NFSATTRBIT_MAX 93 /* * Sets of attributes that are supported, by words in the bitmap. @@ -1693,6 +1701,26 @@ typedef struct nfsv4stateid nfsv4stateid_t; #define NFSV4SXATTR_CREATE 1 #define NFSV4SXATTR_REPLACE 2 +/* Definitions for POSIX draft ACLs for NFSv4.2. */ +#define NFSV4_ACL_MODEL_NFS4 1 +#define NFSV4_ACL_MODEL_POSIX_DRAFT 2 +#define NFSV4_ACL_MODEL_NONE 3 + +#define NFSV4_ACL_SCOPE_FILE_OBJECT 1 +#define NFSV4_ACL_SCOPE_FILE_SYSTEM 2 +#define NFSV4_ACL_SCOPE_SERVER 3 + +#define NFSV4_POSIXACL_TAG_USER_OBJ 1 +#define NFSV4_POSIXACL_TAG_USER 2 +#define NFSV4_POSIXACL_TAG_GROUP_OBJ 3 +#define NFSV4_POSIXACL_TAG_GROUP 4 +#define NFSV4_POSIXACL_TAG_MASK 5 +#define NFSV4_POSIXACL_TAG_OTHER 6 + +#define NFSV4_POSIXACL_PERM_PERM_EXECUTE 0x00000001 +#define NFSV4_POSIXACL_PERM_PERM_WRITE 0x00000002 +#define NFSV4_POSIXACL_PERM_PERM_READ 0x00000004 + /* Values for ChangeAttrType (RFC-7862). */ #define NFSV4CHANGETYPE_MONOTONIC_INCR 0 #define NFSV4CHANGETYPE_VERS_COUNTER 1