From nobody Mon May 5 00:12: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 4ZrMRG6HyZz5vWRc; Mon, 05 May 2025 00:12: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrMRF2JMLz3nws; Mon, 05 May 2025 00:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746403945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1O8y5x9Uz2//WVzazih/TOHcxHckXEmAh9+MVzv3Y40=; b=T6ou4cypeCkMQOv7hnIUkcFAm0fRhyACc+sv2eUWxqdxR0qF0urTfDjZZLJt0QTOxn3R3Q HW0Pi4zqtn305kXN9Rws59r4c8DRMrK/OwBvMBFw6S65Eq/Q2Mm0dQrLdITjTnrDPjWimz VbtNWiDiX3GrRYnelpv8Iedx9kDEIwTqge0fA5SlAJFNQxsthPMm3CcOZwc4PKgMcOAnKh vsmTL/R3MmqwHwxEO/3ZXEWsj83e+gqLobt/9vQX6lKEbpFAoyYLAPG3M/Bh2xaJN4PSP3 feib3qC3bxXynam2h558AivtR4J20n+4lpKPLUhtB7hWlgdMXwhk3Ev/5IxLPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746403945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1O8y5x9Uz2//WVzazih/TOHcxHckXEmAh9+MVzv3Y40=; b=Y2HTJ9iiFysQEevT09AD5k6zmm1/fkceCbDa0BKvMX9yRCpm/cqt+e+UjWJmi7NApGJq5H gxfoqrqh6FOR9Emp6L7J8YARtS8KYPM6QXeGxfYhumG2zn6wS0UPrVRunCLnOBk+N2DI1U QXkunlwAIaoBgQJi1PvHv2IYhGAstufnwEthMARAgI9Zu1V30kp+MnUAxRx7VP2CkrFnLz 9ro5vvBzu989c7eMuKSjkDO1LnNRA6VqSyn9MVK7bXd2YwPAjm5tLa2RpzJnXRA3nWIGaA 4vBx80VP/FhVFKFBCfRCa7N0zSzFL+4VctgCljIVcH59RE72lPT3Wu7JSZGLbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746403945; a=rsa-sha256; cv=none; b=gAWTIDjWFptw7wZlPWnB44T3ozhexUSA/3RKTuqE9NootrGqA505MDby+FiY+vsk9z1Voa BZOhOfmUKEKqlqjb76fyhdtyRvow3T1bGWXnKBvDLP7xPt+VKuXkhKF4uDKcrluGU0y3kj kxRF5jw67q9ACCQVx0l33irEtK7QAAOtiStEUnYTIlPfVz2irvGXZw8dRvjEoKgwA9n0ul Y7ukW6pe3U10rYdL2SgHXdnVBMphia/Qlau3GpgIjuliPyf+vtei2FyAZe3e9ZXoaAMR87 d+9KsaTjYxfSozkXZZcQHYdnWnoaWS1WswYkVCZWXuxwFhZV4Xxwjo3pSoYVWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrMRF1nRTzrVg; Mon, 05 May 2025 00:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5450CPx7066665; Mon, 5 May 2025 00:12:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5450CPbC066650; Mon, 5 May 2025 00:12:25 GMT (envelope-from git) Date: Mon, 5 May 2025 00:12:25 GMT Message-Id: <202505050012.5450CPbC066650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 91f53f4e0627 - main - fwget / mt76: update script to extra firmware and update fget(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 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: 91f53f4e062715d869f2cb7e957707255390b704 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=91f53f4e062715d869f2cb7e957707255390b704 commit 91f53f4e062715d869f2cb7e957707255390b704 Author: Bjoern A. Zeeb AuthorDate: 2025-05-05 00:09:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-05 00:09:46 +0000 fwget / mt76: update script to extra firmware and update fget(8) Update the script to support all the sub-drivers we compile now. Some minor polishing as well. Update fwget(8) as more IDs were added. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh | 14 ++++++++------ usr.sbin/fwget/pci/pci_network_mediatek | 6 +++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh b/sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh index 8747daeba35f..fa836b4b500d 100644 --- a/sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh +++ b/sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh @@ -2,7 +2,7 @@ #- # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2024 The FreeBSD Foundation +# Copyright (c) 2024-2025 The FreeBSD Foundation # # This software was developed by Björn Zeeb # under sponsorship from the FreeBSD Foundation. @@ -14,8 +14,8 @@ # USAGE: please check out the correct tag/hash for ports in the # linux-firmware.git repository you point this script to. # -# Valid flavors: mt7915 mt792x {for the drivers with x=[15]} mt7996 -# To add a new one you need to add the mappings in the help functions. +# Valid flavors: mt7615 mt7915 mt792x {for the drivers with x=[15]} mt7996 +# To add a new one you need to add the mappings in the helper functions. # set -e @@ -51,9 +51,10 @@ fi get_device_ids_by_flav() { - for d in mt7915 mt7921 mt7925 mt7996; do + for d in mt7615 mt7915 mt7921 mt7925 mt7996; do case ${d} in + mt7615) flav=${d} ;; mt7915) flav=${d} ;; mt7921) flav=mt792x ;; mt7925) flav=mt792x ;; @@ -79,9 +80,10 @@ get_device_ids_by_flav() get_firmwares_by_flavor() { - for h in mt7915/mt7915.h mt792x.h mt7996/mt7996.h; do + for h in mt7615/mt7615.h mt7915/mt7915.h mt792x.h mt7996/mt7996.h; do case ${h} in + mt7615/mt7615.h) flav=mt7615 ;; mt7915/mt7915.h) flav=mt7915 ;; mt792x.h) flav=mt792x ;; mt7996/mt7996.h) flav=mt7996 ;; @@ -287,6 +289,6 @@ if test ${fn} -gt 0; then done fi -printf "INFO: fwget pci_network_qca %s template at %s\n" ${DRIVER} ${fwgetfile} >&2 +printf "INFO: fwget pci_network_mediatek %s template at %s\n" ${DRIVER} ${fwgetfile} >&2 # end diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 3ed6c8b95b47..653c87c410eb 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -2,7 +2,7 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb -# Copyright (c) 2024 The FreeBSD Foundation +# Copyright (c) 2024-2025 The FreeBSD Foundation # # Portions of this software were developed by Björn Zeeb # under sponsorship from the FreeBSD Foundation. @@ -41,10 +41,14 @@ pci_network_mediatek_mt76() 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7611) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; + 0x7615) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; + 0x7663) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;; 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7920) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; From nobody Mon May 5 00:55: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 4ZrNPV65Kkz5vYnl; Mon, 05 May 2025 00:55: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrNPV5Tr9z3R4G; Mon, 05 May 2025 00:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746406558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6hEvKiAayApRxNTIFhjTIkMQgGgRcAARN2DdnxV0I8=; b=dkNnaLZyNzNFBQmFRDkTVVK4TaFwP55vRZe7ky9l3L9rjlKfKsaZvFcwS8I7bunOX8snNQ HoXAcZu1nyRfsLJi/HyY3cL6ciKMUUdNebFvixxT3viG8wqh3mIRJypGtnMtcUkk5+e0bn Rw75D1ZtROpeAROy59a+xSZyL7pwld5DQW/6f4kHw+ZCRRiM660kO3CHplybdnwOXbbh3y R9AUELtWLwCJ0POhjIf45cbtbWbcud9Wh5C34beCGq2zkWxaZaKyHTF+a9/MTo0eZtY9x0 OxHaEUbAOMjVtoh3w3XNwWYQ3D/AWc/nRxq/aaTU7yGL73xrRqZPf1uM7Zm/ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746406558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6hEvKiAayApRxNTIFhjTIkMQgGgRcAARN2DdnxV0I8=; b=gMzcscUeuz9aNF05pyWjyT8QH3ljD2ggkcfQGHT+vzwmmGo98CHGfQ1InVP58XUq6JvZwr foyzkINRpVn3vFXJZ1xJn/AV5R2QwILQJ/YWLVYwgLWNrP6VPAAVV788vtPzpuZLjEzrjz H39jBn6chZDAAtBNvm5Pu4XJlxX0eY1hPsskaX+igi1b9eRe1k/QHC2HBDYD7WdAoEOaDR z9/aboW5LjGkiWXRxIZC7hiyUYETYO/VXgKRRf2X1zOqXG9CweHqBjE5wng9SlS9l7PvzW CbgqZC30Tv4wY59Dz1dvR53AlNCZQqcdycdGXaPg4GzXquDDj1d75lrrpCICAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746406558; a=rsa-sha256; cv=none; b=A2S7w8Ry7GZv45NjsUkVC/w/zMXBm0NGC3DaYF+0Po0kzBuxJXL6QPOqQe/cgjfNr9LUwp OYz5gp3k4KiJdGs51xxLyU+arajiDu+CAq7USnF1JGlERDEVPXJ9jY/ZthEzrZBORALOTa UHNYizGDM6JUo1pJEvlmV2zLGmD6/uxJr9vwBQSA41Ro0yx/ncRr2pMRl14qltp3navfBf cr671xTm70ZFNfpkibgfHv4NdT9l9UHmTnamASpt2tczKDmEldxd9i64YVe9OJX86hDWWG HeVgdGQtA1GSxsVOl5HdFe8H7O/M3tgmM49IEAv1O9cGgCxFlvNOxRdPvWkGxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrNPV4sqYzs7m; Mon, 05 May 2025 00:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5450twqf043125; Mon, 5 May 2025 00:55:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5450twCX043122; Mon, 5 May 2025 00:55:58 GMT (envelope-from git) Date: Mon, 5 May 2025 00:55:58 GMT Message-Id: <202505050055.5450twCX043122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 9419e086e1a3 - main - nfscommon: Use _PC_HAS_NAMEDATTR to check for named attributes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 9419e086e1a37124d11e428892d60a514e5c579e Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=9419e086e1a37124d11e428892d60a514e5c579e commit 9419e086e1a37124d11e428892d60a514e5c579e Author: Rick Macklem AuthorDate: 2025-05-05 00:52:50 +0000 Commit: Rick Macklem CommitDate: 2025-05-05 00:52:50 +0000 nfscommon: Use _PC_HAS_NAMEDATTR to check for named attributes Commit 0f12c3cd0ddb added the _PC_HAS_NAMEDATTR name for pathconf(2). This commit uses this to determine if named attributes are associated with a file handle for the named_attr NFSv4 attribute. This avoids the need for nfs_test_namedattr() function. --- sys/fs/nfs/nfs_commonsubs.c | 98 ++++++++++++--------------------------------- sys/fs/nfs/nfsproto.h | 2 + 2 files changed, 27 insertions(+), 73 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 3e70eb50a54e..f3305ccdde80 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -223,7 +223,6 @@ static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); -static bool nfs_test_namedattr(struct nfsrv_descript *nd, struct vnode *vp); static void nfsv4_wanted(struct nfsv4lock *lp); static uint32_t nfsv4_filesavail(struct statfs *, struct mount *); static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); @@ -1282,70 +1281,6 @@ nfsmout: return (error); } -/* - * Check to see if a named attribute exists for this file. - */ -static bool -nfs_test_namedattr(struct nfsrv_descript *nd, struct vnode *vp) -{ - struct uio io; - struct iovec iv; - struct componentname cn; - struct vnode *dvp; - struct dirent *dp; - int eofflag, error; - char *buf, *cp, *endcp; - bool ret; - - if (vp == NULL || (vp->v_mount->mnt_flag & MNT_NAMEDATTR) == 0) - return (false); - NFSNAMEICNDSET(&cn, nd->nd_cred, LOOKUP, OPENNAMED | ISLASTCN | - NOFOLLOW | LOCKLEAF); - cn.cn_lkflags = LK_SHARED; - cn.cn_nameptr = "."; - cn.cn_namelen = 1; - error = VOP_LOOKUP(vp, &dvp, &cn); - if (error != 0) - return (false); - - /* Now we have to read the directory, looking for a valid entry. */ - buf = malloc(DIRBLKSIZ, M_TEMP, M_WAITOK); - ret = false; - io.uio_offset = 0; - io.uio_segflg = UIO_SYSSPACE; - io.uio_rw = UIO_READ; - io.uio_td = NULL; - do { - iv.iov_base = buf; - iv.iov_len = DIRBLKSIZ; - io.uio_iov = &iv; - io.uio_iovcnt = 1; - io.uio_resid = DIRBLKSIZ; - error = VOP_READDIR(dvp, &io, nd->nd_cred, &eofflag, NULL, - NULL); - if (error != 0 || io.uio_resid == DIRBLKSIZ) - break; - cp = buf; - endcp = &buf[DIRBLKSIZ - io.uio_resid]; - while (cp < endcp) { - dp = (struct dirent *)cp; - if (dp->d_fileno != 0 && dp->d_type != DT_WHT && - ((dp->d_namlen == 1 && dp->d_name[0] != '.') || - (dp->d_namlen == 2 && (dp->d_name[0] != '.' || - dp->d_name[1] != '.')) || dp->d_namlen > 2)) { - ret = true; - break; - } - cp += dp->d_reclen; - } - if (ret) - break; - } while (eofflag == 0); - vput(dvp); - free(buf, M_TEMP); - return (ret); -} - /* * Get the attributes for V4. * If the compare flag is true, test for any attribute changes, @@ -1442,6 +1377,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, pc->pc_chownrestricted = 0; pc->pc_caseinsensitive = 0; pc->pc_casepreserving = 1; + pc->pc_has_namedattr = false; } if (sfp != NULL) { sfp->sf_ffiles = UINT64_MAX; @@ -1581,13 +1517,25 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, break; case NFSATTRBIT_NAMEDATTR: NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); - if (compare && !(*retcmpp)) { - bool named_attr; - - named_attr = nfs_test_namedattr(nd, vp); - if ((named_attr && *tl != newnfs_true) || - (!named_attr && *tl != newnfs_false)) - *retcmpp = NFSERR_NOTSAME; + if (compare) { + if (!(*retcmpp)) { + long has_named_attr; + + if (vp == NULL || VOP_PATHCONF(vp, + _PC_HAS_NAMEDATTR, &has_named_attr) + != 0) + has_named_attr = 0; + if ((has_named_attr != 0 && + *tl != newnfs_true) || + (has_named_attr == 0 && + *tl != newnfs_false)) + *retcmpp = NFSERR_NOTSAME; + } + } else if (pc != NULL) { + if (*tl == newnfs_true) + pc->pc_has_namedattr = true; + else + pc->pc_has_namedattr = false; } attrsum += NFSX_UNSIGNED; break; @@ -2684,6 +2632,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, size_t atsiz; bool xattrsupp; short irflag; + long has_named_attr; #ifdef QUOTA struct dqblk dqb; uid_t savuid; @@ -2840,7 +2789,10 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, break; case NFSATTRBIT_NAMEDATTR: NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); - if (nfs_test_namedattr(nd, vp)) + if (VOP_PATHCONF(vp, _PC_HAS_NAMEDATTR, &has_named_attr) + != 0) + has_named_attr = 0; + if (has_named_attr != 0) *tl = newnfs_true; else *tl = newnfs_false; diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index d0660cafdedb..0a11e906569d 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -1414,6 +1414,7 @@ struct nfsv3_sattr { * NFSGETATTRBIT_PATHCONF0 - bits 0<->31 */ #define NFSGETATTRBIT_PATHCONF0 (NFSATTRBIT_GETATTR0 | \ + NFSATTRBM_NAMEDATTR | \ NFSATTRBM_CASEINSENSITIVE | \ NFSATTRBM_CASEPRESERVING | \ NFSATTRBM_CHOWNRESTRICTED | \ @@ -1645,6 +1646,7 @@ struct nfsv3_pathconf { u_int32_t pc_chownrestricted; u_int32_t pc_caseinsensitive; u_int32_t pc_casepreserving; + bool pc_has_namedattr; }; /* From nobody Mon May 5 01:04: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 4ZrNbH4Dv1z5vZHN; Mon, 05 May 2025 01:04: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrNbH3M2lz3XDs; Mon, 05 May 2025 01:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746407067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oXevZ+O6NgsvjDDOlTXYjxKdU4yPywg+jcqH4plSPeA=; b=C2BrVIIDPl4bH5jxLQVUhKbasoOITWtwU2Lt1wkE28rys6xML978LIren60M2XZ52gMBhw RA/mYwPO3ODIJjFgOWRARhbcrgIakBjSxPmv4uo9tIVeyJOVzZRxFzNjiTPCcALiQDrNWP kV+HEP5Vj3peE30PSNNIDTfw0B13TkZBeWM5ZUnangqitZlLTK3q3Q3G8xSqegyMEV132p kJo+DNx6T9nDQZ7qDT/0YmfoF3wwg2oHGZYe7wEqVflyIsXFY2260dcT21aOVSX5omefpM 8QibBUStQanS6nrfdZL2lJWKXnePe8mU4K6WJibUdOueW0q5Bl68uA7bSbGRQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746407067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oXevZ+O6NgsvjDDOlTXYjxKdU4yPywg+jcqH4plSPeA=; b=pR/0/peQNmZjEoRx9Io1prcfZcMsHzjzKjfDS2Q5zi6PMDi08YIgWVF4T+pJAilBIxxvED 3KqCjQIQX4o+d0A0OWkYaILgupqTlHwNdFdHenJ5VAsi2Kz4EaQn6nzuUg1XOt7yjffNuV RzPydELPKJ9NeR1c+Kh8zMF3Cl1Da5+lvI59N6fd/xC9pTOcoMELmmORwXgtE43ctQzaP1 GFQYpcJE/VdL93fi1FQdgoR+MEwL0tEs6m2/xO8PgDD1z2hVa0c5NkVRJe8JuFYwr+7Li5 V27K2melSiwm6fDKOHkUj6AVk5JYXNfmDOoD4L2SUT/awkGcAs4p1WhgzLZ67Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746407067; a=rsa-sha256; cv=none; b=OkpTFtesLXjVkvJtcZWfeZ8eBS7uZgBYMd3FSjGC+bxdja4CvCyYhcOIRQCfdtsSvgNSXD O8noyLX8dt8WDK/qb6b1PoqEKGW0W/eM1fXjuQQGdMKxj4eFO2mJnBO1TBbhghi/DsZK8m /HKjxbdUttcwPYrhccclIEWMAu3J1c8vWtzQTQFs8Y8CQA50QWoOeIm/qTgn+3igm1VuYY o8ErkHLMpO7VgFlQ06oTOfmyV1El8SiKAqOrO3mil3fySJX1wuvKuA9+b5TLMa7RKEynuo 9vQuBrTnYop2CiBSrTwpTd/f090O5R2gzKOxdLRuRr+X9X9SwxCsxXPMbUdtEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrNbH2y0Gzsnm; Mon, 05 May 2025 01:04:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54514RFm062617; Mon, 5 May 2025 01:04:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54514RQS062614; Mon, 5 May 2025 01:04:27 GMT (envelope-from git) Date: Mon, 5 May 2025 01:04:27 GMT Message-Id: <202505050104.54514RQS062614@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 22d4fecbcf57 - main - param.h: Bump __FreeBSD_version to 1500040 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 22d4fecbcf576fb799686972e3de7fc78938fe6a Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=22d4fecbcf576fb799686972e3de7fc78938fe6a commit 22d4fecbcf576fb799686972e3de7fc78938fe6a Author: Rick Macklem AuthorDate: 2025-05-05 01:02:00 +0000 Commit: Rick Macklem CommitDate: 2025-05-05 01:02:00 +0000 param.h: Bump __FreeBSD_version to 1500040 Commit 9419e086e1a3 changed the internal API between the nfscommon and nfscl modules. As such, both need to be built from updated sources. --- 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 9fccde2dcc6b..6fdadd3d596c 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500039 +#define __FreeBSD_version 1500040 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Mon May 5 01:09: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 4ZrNjG5wD5z5vZD0; Mon, 05 May 2025 01:09: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrNjG5DJsz3bWF; Mon, 05 May 2025 01:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746407378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pp0ZosoVguS26D48Kc8etFUCou4jnxKOayf1yz4VXms=; b=KfmjNb4c/LNKSuxy6DPiJ9zt53Kwq6KQ8RzGM0EwM1GCyDsunLLZUWGTPB6SB6yw1IvNHu OF21V8a9BWwwkmv6dNjASjx73Pvn6OLssDd4Fsr6ibODjGdwj9te3XZtuEMF8OHx8rKJBx glTgU+7r/S+jfVAS6yyFvppHSkAcD//VgnIXWcS4cNXmENKuYMYyPdLoO1n0iU/tuGnu1w zCpybVDqdVsZXb+fPmx4DAxze3jo7X7gfG7xx+QkdX/Wqp/QqPzK+E2TGnI/zVujwBLPvU P+IwBZae+4AL7vTR3O4Bwm6DN9vp5N8qXoOlJoijiODHDPGnjkTPIxXchQ5yAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746407378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pp0ZosoVguS26D48Kc8etFUCou4jnxKOayf1yz4VXms=; b=kyleOCUBIkriNw/KsmOTLnhHW6fIV+2PTY6aTGU3cBOcGUxl0Wl8e+LteNSbLuLaMx7DWr hEEE/YvfeiMCFX0e9fUeazntnqZHlYoCygLvvFoo9DR2+37CkJwMcvRte2Vi+nWOzdLGy+ NTwUDJIo9xQB+uofRNH1Vd7WKUnuArevvpJcJtEJijwyjvNEUXG8j30xdoK+HeGI7Dj7pa vsauG9abHColVtoz4HqLP4yYDcibbvw+Z10RyGYsOiRevO2x6AGKlQ0cMDQDNJG0nU6bC7 IzrLvth/KTbiGphDerYAGT+h/s0XmTrhctyptm8uoy/HI9Y3jXXuRNfUNBNs5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746407378; a=rsa-sha256; cv=none; b=Hrr2DHyOC79+BeriMCEda3WrdrT7nQ8h9/o6OYSnypxhnHlp4BUKOga5ChXTaKj3/wXwli nTCEm2di/Y8881RzvMtjit4ibxp3xSOwGsKdj4e8ASzxU32B8ZmKp57V4C532avVw+iIMS XHB++1UN2e+iOvo88Ih9UWfSlV+O+xqDYoDFbld29wqhq4HOH0QtfRm77yDoeXaxd4/rGl oMtHaDUIT2dqfolGsJ6QjeWfyfiHiXLiqjbE8jOG9KRInns/exDsnqlHfRpIXkKDNaogwG /9IMVuxt1Yqvgb80nu2k6HGMSgqvSG4Zq9TzRYmiDwB7d61Oy8ECR7+EELxhhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrNjG4RGCzsTj; Mon, 05 May 2025 01:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54519cDj064134; Mon, 5 May 2025 01:09:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54519cCK064131; Mon, 5 May 2025 01:09:38 GMT (envelope-from git) Date: Mon, 5 May 2025 01:09:38 GMT Message-Id: <202505050109.54519cCK064131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 4a795fb913fe - main - UPDATING: Add an entry for commit 9419e086e1a3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 4a795fb913feee9ece768cc63715fa745bcc827e Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4a795fb913feee9ece768cc63715fa745bcc827e commit 4a795fb913feee9ece768cc63715fa745bcc827e Author: Rick Macklem AuthorDate: 2025-05-05 01:06:45 +0000 Commit: Rick Macklem CommitDate: 2025-05-05 01:06:45 +0000 UPDATING: Add an entry for commit 9419e086e1a3 --- UPDATING | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UPDATING b/UPDATING index 3fef48b52636..2a81fe2c27a8 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250504: + Commit 9419e086e1a3 changed the internal API between the nfscommon + and nfscl modules. Both need to be built from updated sources. + 20250504: newsyslog(8) will no longer compress rotated log files by default. The J, X, Y, and Z flags in newsyslog.conf(5) now indicate that a From nobody Mon May 5 02:41: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 4ZrQlJ2BPLz5tj0P; Mon, 05 May 2025 02:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrQlJ16mSz3vtr; Mon, 05 May 2025 02:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746412892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MtPozajsyQGLW5Ud1Hyg6XJk4ysfOxY36lS/UU5z9qQ=; b=THl6PI2o/mnqueLe8PiNqIpvuzQnx0k/CGUzFxRytpL81lXSahx+tUOVrT2OZLpqChmE3o S9porvPbMFcLKAEoHcO5r3UPker4YQWZkQeYi/uMMOzSWRY0vm1GUQmaj6hdsUHjJF8t9p 7rUIkJa5QJHJY3vCuqPNAyKnxnAIPdeZJtovC+XDIF9NiUOo1tOZPZZx85OFU9tys8iCKa Ogea4fDLlxekucBjZXDC+fE1pUJMRZxkuJB5ZsSE8rqT3LuwxDEtn9zs4SI1pXN2ivuLMV 3WDfNSJIsBeDJ9bX2XOhYR2CeZoykIdREiAt4vCgJVLfwgO3XrebXW/7B7VHjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746412892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MtPozajsyQGLW5Ud1Hyg6XJk4ysfOxY36lS/UU5z9qQ=; b=kI7zKZg/y/iGZfTNCNTGyGrOdWrvegJuRza+1NFCfYgX0opuYHoWQ7r/O83Ly16bPrJpd+ 6LlaSdDYgWrWV8SmCagFTytt5420ywKxS6gQ7dxfk+chJ3oIJ8boX+eWJmde1SRlzuIJ5R ohbj0zEx8Gb1LQndGn91SDxVKDqNwsB7XD4PGaJWP6EsJPT/TfPTTvnmXe82CQK8RkDNG3 qyDuTI3HmPMFvP9hV6daYtb+RpGF8wneuWKnxCGXNaAZkES0Vs6Ahk6xD5dG+DJ/824d2N t25fASFI0n1b1DAVTK3dbLvG73OD9uHm83evErsZXqSg0G6ZRZIJFPCnoe07zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746412892; a=rsa-sha256; cv=none; b=lZlxgV0CrcsKdZplz26AMGwFRN4UbhMczyO4vtK6dboLWvnOnXbw5Chottk6VQtfvWmm80 ua86tvmPMUyO6J1xOItT7fj+WviHNuK/gJR5jAHHL93+lFo82LWObfWnl5/xXQSWWQQcj6 F0htLLz8c+d4BrUBP+u2p/30DKKujozXPE6fzscXIMYuNHroNDZLY07fzaRKyCdguDsdut aRGnue9Z8uZGrHBiFGqsBeLYj2TwOVilfAQBpfA0APJ9C08Mp6t1eWOJMLJ4LUYvw+CLwx jskXl8uzyYPDPomi37br8xwQDDKQ1AsoxnyogRyiVFiBqW2NsEtoDKJxRy4V5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrQlJ0fGlzw01; Mon, 05 May 2025 02:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5452fWPe042058; Mon, 5 May 2025 02:41:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5452fWoP042055; Mon, 5 May 2025 02:41:32 GMT (envelope-from git) Date: Mon, 5 May 2025 02:41:32 GMT Message-Id: <202505050241.5452fWoP042055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 2c0e6f53171c - main - Revert "nfscommon: Use _PC_HAS_NAMEDATTR to check for named attributes" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 2c0e6f53171c4c8100235811912444bba08185f4 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=2c0e6f53171c4c8100235811912444bba08185f4 commit 2c0e6f53171c4c8100235811912444bba08185f4 Author: Rick Macklem AuthorDate: 2025-05-05 02:38:44 +0000 Commit: Rick Macklem CommitDate: 2025-05-05 02:38:44 +0000 Revert "nfscommon: Use _PC_HAS_NAMEDATTR to check for named attributes" This reverts commit 9419e086e1a37124d11e428892d60a514e5c579e. --- sys/fs/nfs/nfs_commonsubs.c | 98 +++++++++++++++++++++++++++++++++------------ sys/fs/nfs/nfsproto.h | 2 - 2 files changed, 73 insertions(+), 27 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index f3305ccdde80..3e70eb50a54e 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -223,6 +223,7 @@ static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); +static bool nfs_test_namedattr(struct nfsrv_descript *nd, struct vnode *vp); static void nfsv4_wanted(struct nfsv4lock *lp); static uint32_t nfsv4_filesavail(struct statfs *, struct mount *); static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); @@ -1281,6 +1282,70 @@ nfsmout: return (error); } +/* + * Check to see if a named attribute exists for this file. + */ +static bool +nfs_test_namedattr(struct nfsrv_descript *nd, struct vnode *vp) +{ + struct uio io; + struct iovec iv; + struct componentname cn; + struct vnode *dvp; + struct dirent *dp; + int eofflag, error; + char *buf, *cp, *endcp; + bool ret; + + if (vp == NULL || (vp->v_mount->mnt_flag & MNT_NAMEDATTR) == 0) + return (false); + NFSNAMEICNDSET(&cn, nd->nd_cred, LOOKUP, OPENNAMED | ISLASTCN | + NOFOLLOW | LOCKLEAF); + cn.cn_lkflags = LK_SHARED; + cn.cn_nameptr = "."; + cn.cn_namelen = 1; + error = VOP_LOOKUP(vp, &dvp, &cn); + if (error != 0) + return (false); + + /* Now we have to read the directory, looking for a valid entry. */ + buf = malloc(DIRBLKSIZ, M_TEMP, M_WAITOK); + ret = false; + io.uio_offset = 0; + io.uio_segflg = UIO_SYSSPACE; + io.uio_rw = UIO_READ; + io.uio_td = NULL; + do { + iv.iov_base = buf; + iv.iov_len = DIRBLKSIZ; + io.uio_iov = &iv; + io.uio_iovcnt = 1; + io.uio_resid = DIRBLKSIZ; + error = VOP_READDIR(dvp, &io, nd->nd_cred, &eofflag, NULL, + NULL); + if (error != 0 || io.uio_resid == DIRBLKSIZ) + break; + cp = buf; + endcp = &buf[DIRBLKSIZ - io.uio_resid]; + while (cp < endcp) { + dp = (struct dirent *)cp; + if (dp->d_fileno != 0 && dp->d_type != DT_WHT && + ((dp->d_namlen == 1 && dp->d_name[0] != '.') || + (dp->d_namlen == 2 && (dp->d_name[0] != '.' || + dp->d_name[1] != '.')) || dp->d_namlen > 2)) { + ret = true; + break; + } + cp += dp->d_reclen; + } + if (ret) + break; + } while (eofflag == 0); + vput(dvp); + free(buf, M_TEMP); + return (ret); +} + /* * Get the attributes for V4. * If the compare flag is true, test for any attribute changes, @@ -1377,7 +1442,6 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, pc->pc_chownrestricted = 0; pc->pc_caseinsensitive = 0; pc->pc_casepreserving = 1; - pc->pc_has_namedattr = false; } if (sfp != NULL) { sfp->sf_ffiles = UINT64_MAX; @@ -1517,25 +1581,13 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, break; case NFSATTRBIT_NAMEDATTR: NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); - if (compare) { - if (!(*retcmpp)) { - long has_named_attr; - - if (vp == NULL || VOP_PATHCONF(vp, - _PC_HAS_NAMEDATTR, &has_named_attr) - != 0) - has_named_attr = 0; - if ((has_named_attr != 0 && - *tl != newnfs_true) || - (has_named_attr == 0 && - *tl != newnfs_false)) - *retcmpp = NFSERR_NOTSAME; - } - } else if (pc != NULL) { - if (*tl == newnfs_true) - pc->pc_has_namedattr = true; - else - pc->pc_has_namedattr = false; + if (compare && !(*retcmpp)) { + bool named_attr; + + named_attr = nfs_test_namedattr(nd, vp); + if ((named_attr && *tl != newnfs_true) || + (!named_attr && *tl != newnfs_false)) + *retcmpp = NFSERR_NOTSAME; } attrsum += NFSX_UNSIGNED; break; @@ -2632,7 +2684,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, size_t atsiz; bool xattrsupp; short irflag; - long has_named_attr; #ifdef QUOTA struct dqblk dqb; uid_t savuid; @@ -2789,10 +2840,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, break; case NFSATTRBIT_NAMEDATTR: NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); - if (VOP_PATHCONF(vp, _PC_HAS_NAMEDATTR, &has_named_attr) - != 0) - has_named_attr = 0; - if (has_named_attr != 0) + if (nfs_test_namedattr(nd, vp)) *tl = newnfs_true; else *tl = newnfs_false; diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index 0a11e906569d..d0660cafdedb 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -1414,7 +1414,6 @@ struct nfsv3_sattr { * NFSGETATTRBIT_PATHCONF0 - bits 0<->31 */ #define NFSGETATTRBIT_PATHCONF0 (NFSATTRBIT_GETATTR0 | \ - NFSATTRBM_NAMEDATTR | \ NFSATTRBM_CASEINSENSITIVE | \ NFSATTRBM_CASEPRESERVING | \ NFSATTRBM_CHOWNRESTRICTED | \ @@ -1646,7 +1645,6 @@ struct nfsv3_pathconf { u_int32_t pc_chownrestricted; u_int32_t pc_caseinsensitive; u_int32_t pc_casepreserving; - bool pc_has_namedattr; }; /* From nobody Mon May 5 04:33: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 4ZrTDC3Sbhz5tqyh for ; Mon, 05 May 2025 04:33:15 +0000 (UTC) (envelope-from 010001969eb83342-9a3530dd-e4f4-4f06-9c63-e858de9b4175-000000@amazonses.com) Received: from a8-13.smtp-out.amazonses.com (a8-13.smtp-out.amazonses.com [54.240.8.13]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrTDB5kkSz40Dn for ; Mon, 05 May 2025 04:33:14 +0000 (UTC) (envelope-from 010001969eb83342-9a3530dd-e4f4-4f06-9c63-e858de9b4175-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1746419594; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=PWF3kYWNfAWV/dawCOEdtGkxzau+ou0AIdbVo2YCBkk=; b=kWakoVh4p0Q8opykTzNVPXUEtBqitNakiK2SekxsskyRcZ42Y5EhhdGngTKTN3lJ YPCOQba6XnZzN5J+MuhK0MTbIOR5rQvh5xy3jZF9P4XX5IU/HlJcUSaqaOhY2ZASg3y k2v3ToOIaIie/p6uvUOBatgO3nqTL50ykrpDpunI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1746419594; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=PWF3kYWNfAWV/dawCOEdtGkxzau+ou0AIdbVo2YCBkk=; b=EmY2Z+cw3/gZkZ/S4mfYJvSdlDvD4Od3ouwVqfuqfFDyTxHwzpp2fFKoav59kdQm SQU3cGa+kN7xwXIy71PJFzoAAWdurNpaMq9nntMCgy43MpzhPAD6bVUaqKZfEWqbicn nnoiD463FkTzTpxQV5OWVKNLKtlRXGOXVEiNoshI= Message-ID: <010001969eb83342-9a3530dd-e4f4-4f06-9c63-e858de9b4175-000000@email.amazonses.com> Date: Mon, 5 May 2025 04:33:14 +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 User-Agent: Mozilla Thunderbird Subject: Re: git: 071ab5a1f3cb - main - zfs: merge openzfs/zfs@246e5883b To: Martin Matuska , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Warner Losh References: <202505042208.544M87gP024481@gitrepo.freebsd.org> <010001969d620e6b-dc680bf3-8f87-475f-8297-5f03515a1bf2-000000@email.amazonses.com> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Feedback-ID: ::1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2025.05.05-54.240.8.13 X-Rspamd-Queue-Id: 4ZrTDB5kkSz40Dn X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US] X-Spamd-Bar: ---- That's totally fine, I just like to double-check when I see vendor imports landing during a release cycle. Colni Percival On 5/4/25 15:42, Martin Matuska wrote: > I am sorry but FreeBSD 14 tracks OpenZFS 2.2 which may roll out a 2.2.8 at > some point, but definitely not in time for 14.3 > FreeBSD-CURRENT tracks OpenZFS-master. > > In the meantime there was a OpenZFS 2.3 release, that is not tracked by any of > our branches. > Users can install OpenZFS 2.3.2 from ports, which I maintain. > > Cheers, > mm > > P.S: I should rather look into updating libarchive with all its fixed CVEs not > yet backported to FreeBSD ... > > On 5. 5. 2025 0:19, Colin Percival wrote: >> Is there anything in here which wants to land in 14.3? >> >> Colin Percival >> >> On 5/4/25 15:08, Martin Matuska wrote: >>> The branch main has been updated by mm: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/? >>> id=071ab5a1f3cbfd29c8fbec27f7e619418adaf074 >>> >>> commit 071ab5a1f3cbfd29c8fbec27f7e619418adaf074 >>> Merge: f61844833ee8 246e5883bb5b >>> Author:     Martin Matuska >>> AuthorDate: 2025-05-04 22:05:28 +0000 >>> Commit:     Martin Matuska >>> CommitDate: 2025-05-04 22:05:28 +0000 >>> >>>      zfs: merge openzfs/zfs@246e5883b >>>           Notable upstream pull request merges: >>>       #17111 246e5883b Implement allocation size ranges and use for gang >>> leaves >>>       #17123 5f5321eff Handle interaction between gang blocks, copies, and FDT >>>       #17130 -multiple Implement default user/group/project quotas >>>       #17164 301da593a Fix lock reversal on device removal cancel >>>       #17183 367d34b3a Fix dspace underflow bug >>>       #17187 30cc2331f zed: Ensure spare activation after kernel-initiated >>> device >>>                        removal >>>       #17191 11ca12dbd simd_powerpc.h: enable FPU on FreeBSD >>>       #17192 5b29e70ae Remove mg_allocators >>>       #17204 a497c5fc8 Improve L2 caching control for prefetched indirects >>>       #17205 b14b3e398 Fix FDT rollback to not overwrite unnecessary fields >>>       #17206 7be9fa259 Fix nonrot property being incorrectly unset >>>       #17208 09fc7bb47 Fix memory leaks in pool properties handling >>>            #17213 78a7c78bd Added fix for zpool get state segfaults with >>> two or more >>>                        vdevs >>>       #17228 131df3bbf vdev_to_nvlist_iter: ignore draid parameters when >>> matching >>>                        names >>>       #17231 f40ab9e39 Fix double spares for failed vdev >>>       #17264 27f3d9494 Sort the blocking snapshots lis >>>       #17269 f86d9af16 Fix race between resilver wait and offline/detach >>>       #17273 c8fa39b46 cred: properly pass and test creds on other threads >>>       #17284 a7de203c8 txg: generalise txg_wait_synced_sig() to >>>                        txg_wait_synced_flags() >>>           Obtained from:  OpenZFS >>>      OpenZFS commit: 246e5883bb5b8e09b1a4213f7b1704b5a9ed5568 >>> >>>   .../.github/workflows/scripts/generate-ci-type.py  |   1 + >>>   .../.github/workflows/scripts/qemu-1-setup.sh      |  44 +--- >>>   .../.github/workflows/scripts/qemu-2-start.sh      |  51 ++++- >>>   .../.github/workflows/scripts/qemu-3-deps-vm.sh    |   4 + >>>   .../.github/workflows/scripts/qemu-5-setup.sh      |  34 ++- >>>   .../.github/workflows/scripts/qemu-6-tests.sh      |  15 +- >>>   .../.github/workflows/scripts/qemu-7-prepare.sh    |   4 +- >>>   .../.github/workflows/scripts/qemu-8-summary.sh    |   2 +- >>>   .../.github/workflows/zfs-qemu-packages.yml        |   2 +- >>>   sys/contrib/openzfs/.github/workflows/zfs-qemu.yml |   4 +- >>>   sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c    |  19 +- >>>   sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh |   5 + >>>   sys/contrib/openzfs/cmd/zfs/zfs_main.c             |  13 +- >>>   sys/contrib/openzfs/cmd/zinject/zinject.c          |  20 +- >>>   .../openzfs/cmd/zpool/os/linux/zpool_vdev_os.c     |   3 +- >>>   sys/contrib/openzfs/cmd/zpool/zpool_main.c         |   8 +- >>>   .../openzfs/config/kernel-vfs-migratepage.m4       |  27 +++ >>>   sys/contrib/openzfs/config/kernel.m4               |  65 ++++-- >>>   sys/contrib/openzfs/config/user-libunwind.m4       |  16 ++ >>>   sys/contrib/openzfs/contrib/debian/control         |   1 + >>>   .../contrib/initramfs/scripts/local-top/zfs        |   4 +- >>>   sys/contrib/openzfs/include/libzfs.h               |   2 +- >>>   .../openzfs/include/os/freebsd/spl/sys/debug.h     |  71 +++---- >>>   .../openzfs/include/os/freebsd/spl/sys/policy.h    |   1 - >>>   .../include/os/freebsd/spl/sys/simd_powerpc.h      |   4 +- >>>   .../include/os/freebsd/zfs/sys/zfs_vfsops_os.h     |   8 + >>>   .../openzfs/include/os/linux/spl/sys/debug.h       |  67 +++--- >>>   .../openzfs/include/os/linux/zfs/sys/policy.h      |   1 - >>>   .../include/os/linux/zfs/sys/zfs_vfsops_os.h       |   8 + >>>   sys/contrib/openzfs/include/sys/ddt.h              |   4 + >>>   sys/contrib/openzfs/include/sys/dmu_recv.h         |   1 - >>>   sys/contrib/openzfs/include/sys/dsl_dataset.h      |   4 +- >>>   sys/contrib/openzfs/include/sys/dsl_dir.h          |   4 +- >>>   sys/contrib/openzfs/include/sys/fs/zfs.h           |   6 + >>>   sys/contrib/openzfs/include/sys/metaslab.h         |  10 +- >>>   sys/contrib/openzfs/include/sys/metaslab_impl.h    |   1 - >>>   sys/contrib/openzfs/include/sys/nvpair.h           |   2 + >>>   sys/contrib/openzfs/include/sys/spa.h              |   3 +- >>>   sys/contrib/openzfs/include/sys/txg.h              |  23 +- >>>   sys/contrib/openzfs/include/sys/vdev.h             |   3 + >>>   sys/contrib/openzfs/include/sys/vdev_draid.h       |   2 +- >>>   sys/contrib/openzfs/include/sys/vdev_impl.h        |   4 +- >>>   sys/contrib/openzfs/include/sys/zcp.h              |   1 - >>>   sys/contrib/openzfs/include/sys/zfs_context.h      |   4 +- >>>   sys/contrib/openzfs/include/sys/zfs_debug.h        |  20 ++ >>>   sys/contrib/openzfs/include/sys/zfs_quota.h        |   2 +- >>>   sys/contrib/openzfs/include/sys/zio.h              |   1 + >>>   sys/contrib/openzfs/lib/libnvpair/libnvpair.abi    |  40 ++-- >>>   sys/contrib/openzfs/lib/libnvpair/libnvpair.c      | 181 +++------------- >>>   sys/contrib/openzfs/lib/libspl/backtrace.c         |  66 ++++-- >>>   sys/contrib/openzfs/lib/libspl/include/assert.h    |  65 +++--- >>>   sys/contrib/openzfs/lib/libuutil/libuutil.abi      |  45 +--- >>>   sys/contrib/openzfs/lib/libzfs/libzfs.abi          | 133 ++++++------ >>>   sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c    |  60 ++++-- >>>   sys/contrib/openzfs/lib/libzfs/libzfs_iter.c       |   2 +- >>>   sys/contrib/openzfs/lib/libzfs/libzfs_pool.c       |  15 +- >>>   .../openzfs/lib/libzfs_core/libzfs_core.abi        |  77 +++---- >>>   .../openzfs/lib/libzfsbootenv/libzfsbootenv.abi    |   2 +- >>>   sys/contrib/openzfs/lib/libzpool/Makefile.am       |   1 + >>>   sys/contrib/openzfs/lib/libzpool/kernel.c          |   7 - >>>   sys/contrib/openzfs/man/man7/zfsprops.7            |  36 ++++ >>>   sys/contrib/openzfs/man/man8/zfs-rollback.8        |   4 +- >>>   sys/contrib/openzfs/module/Kbuild.in               |   1 + >>>   sys/contrib/openzfs/module/Makefile.bsd            |  16 +- >>>   sys/contrib/openzfs/module/nvpair/nvpair.c         | 236 ++++++++++++++++ >>> +++++ >>>   .../openzfs/module/os/freebsd/spl/spl_policy.c     |   7 - >>>   .../openzfs/module/os/freebsd/zfs/vdev_geom.c      |   3 +- >>>   .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c     | 122 +++++++++-- >>>   .../openzfs/module/os/linux/spl/spl-kstat.c        |   5 +- >>>   sys/contrib/openzfs/module/os/linux/zfs/abd_os.c   |   2 + >>>   sys/contrib/openzfs/module/os/linux/zfs/policy.c   |  44 ++-- >>>   .../openzfs/module/os/linux/zfs/vdev_disk.c        |   3 +- >>>   .../openzfs/module/os/linux/zfs/zfs_vfsops.c       | 131 ++++++++++-- >>>   sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c |   2 +- >>>   sys/contrib/openzfs/module/zcommon/zfs_prop.c      |  22 ++ >>>   sys/contrib/openzfs/module/zcommon/zfs_valstr.c    |   4 +- >>>   sys/contrib/openzfs/module/zfs/abd.c               |   2 + >>>   sys/contrib/openzfs/module/zfs/dbuf.c              |  25 ++- >>>   sys/contrib/openzfs/module/zfs/ddt.c               |  32 +++ >>>   sys/contrib/openzfs/module/zfs/dmu_direct.c        |   4 +- >>>   sys/contrib/openzfs/module/zfs/dmu_objset.c        |  25 ++- >>>   sys/contrib/openzfs/module/zfs/dmu_recv.c          |  48 +++-- >>>   sys/contrib/openzfs/module/zfs/dsl_dataset.c       |  29 ++- >>>   sys/contrib/openzfs/module/zfs/dsl_dir.c           |  42 ++-- >>>   sys/contrib/openzfs/module/zfs/dsl_scan.c          |  13 +- >>>   sys/contrib/openzfs/module/zfs/dsl_synctask.c      |  19 +- >>>   sys/contrib/openzfs/module/zfs/metaslab.c          | 225 ++++++++++++++ >>> +----- >>>   sys/contrib/openzfs/module/zfs/refcount.c          |   3 +- >>>   sys/contrib/openzfs/module/zfs/spa.c               | 101 ++++++++- >>>   sys/contrib/openzfs/module/zfs/txg.c               |  34 +-- >>>   sys/contrib/openzfs/module/zfs/vdev.c              |  60 +++++- >>>   sys/contrib/openzfs/module/zfs/vdev_draid.c        |  21 +- >>>   sys/contrib/openzfs/module/zfs/vdev_file.c         |   5 +- >>>   sys/contrib/openzfs/module/zfs/vdev_indirect.c     |   3 +- >>>   sys/contrib/openzfs/module/zfs/vdev_mirror.c       |   9 +- >>>   sys/contrib/openzfs/module/zfs/vdev_missing.c      |   6 +- >>>   sys/contrib/openzfs/module/zfs/vdev_raidz.c        |  34 ++- >>>   sys/contrib/openzfs/module/zfs/vdev_rebuild.c      |   2 +- >>>   sys/contrib/openzfs/module/zfs/vdev_removal.c      |  67 +++--- >>>   sys/contrib/openzfs/module/zfs/vdev_root.c         |   3 +- >>>   sys/contrib/openzfs/module/zfs/zcp.c               |  12 +- >>>   sys/contrib/openzfs/module/zfs/zcp_synctask.c      |   2 - >>>   sys/contrib/openzfs/module/zfs/zfs_debug_common.c  |  97 +++++++++ >>>   sys/contrib/openzfs/module/zfs/zfs_fm.c            |  18 +- >>>   sys/contrib/openzfs/module/zfs/zfs_ioctl.c         |  98 ++++++++- >>>   sys/contrib/openzfs/module/zfs/zfs_quota.c         |  64 +++++- >>>   sys/contrib/openzfs/module/zfs/zfs_znode.c         |   8 + >>>   sys/contrib/openzfs/module/zfs/zio.c               | 144 ++++++++++--- >>>   sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in   |   6 + >>>   sys/contrib/openzfs/tests/runfiles/common.run      |  18 +- >>>   sys/contrib/openzfs/tests/runfiles/linux.run       |  18 +- >>>   sys/contrib/openzfs/tests/runfiles/sanity.run      |   4 + >>>   .../openzfs/tests/zfs-tests/cmd/clonefile.c        |  11 +- >>>   .../tests/zfs-tests/cmd/file/largest_file.c        |   2 +- >>>   sys/contrib/openzfs/tests/zfs-tests/cmd/statx.c    |   3 + >>>   .../openzfs/tests/zfs-tests/tests/Makefile.am      |  27 +++ >>>   .../cli_root/zpool_add/zpool_add_dryrun_output.ksh |  22 +- >>>   .../zpool_create/zpool_create_dryrun_output.ksh    |  15 +- >>>   .../functional/cli_root/zpool_get/vdev_get_all.ksh |  92 ++++++++ >>>   .../zpool_split/zpool_split_dryrun_output.ksh      |  14 +- >>>   .../cli_root/zpool_status/zpool_status_003_pos.ksh |   2 +- >>>   .../cli_root/zpool_status/zpool_status_004_pos.ksh |   2 +- >>>   .../tests/functional/dedup/dedup_quota.ksh         |  21 +- >>>   .../tests/functional/events/zed_cksum_reported.ksh |   2 +- >>>   .../tests/functional/fault/auto_spare_double.ksh   | 122 +++++++++++ >>>   .../functional/gang_blocks/gang_blocks_001_pos.ksh |  59 ++++++ >>>   .../gang_blocks/gang_blocks_ddt_copies.ksh         |  79 +++++++ >>>   .../online_offline/online_offline_001_pos.ksh      |  11 +- >>>   .../online_offline/online_offline_002_neg.ksh      |   7 +- >>>   .../online_offline/online_offline_003_neg.ksh      |   9 +- >>>   .../pool_checkpoint/checkpoint_capacity.ksh        |   5 +- >>>   .../pool_checkpoint/pool_checkpoint.kshlib         |   3 +- >>>   .../projectquota/defaultprojectquota_001_pos.ksh   |  89 ++++++++ >>>   .../projectquota/defaultprojectquota_002_pos.ksh   |  87 ++++++++ >>>   .../projectquota/defaultprojectquota_003_neg.ksh   |  77 +++++++ >>>   .../projectquota/defaultprojectquota_004_pos.ksh   |  67 ++++++ >>>   .../projectquota/defaultprojectquota_005_pos.ksh   |  76 +++++++ >>>   .../projectquota/defaultprojectquota_006_pos.ksh   |  90 ++++++++ >>>   .../projectquota/defaultprojectquota_007_pos.ksh   | 130 ++++++++++++ >>>   .../projectquota/projectquota_007_pos.ksh          |   4 +- >>>   .../projectquota/projectquota_common.kshlib        |   2 + >>>   .../projectquota/projectspace_005_pos.ksh          |  84 ++++++++ >>>   .../replacement/resilver_restart_001.ksh           |   2 +- >>>   .../tests/functional/slog/slog_006_pos.ksh         |   3 +- >>>   .../userquota/defaultuserquota_001_pos.ksh         |  75 +++++++ >>>   .../userquota/defaultuserquota_002_pos.ksh         |  96 +++++++++ >>>   .../userquota/defaultuserquota_003_pos.ksh         |  62 ++++++ >>>   .../userquota/defaultuserquota_004_neg.ksh         |  72 +++++++ >>>   .../userquota/defaultuserquota_005_pos.ksh         |  76 +++++++ >>>   .../userquota/defaultuserquota_006_pos.ksh         |  61 ++++++ >>>   .../userquota/defaultuserquota_007_pos.ksh         |  90 ++++++++ >>>   .../userquota/defaultuserquota_008_pos.ksh         |  78 +++++++ >>>   .../userquota/defaultuserquota_009_pos.ksh         | 133 ++++++++++++ >>>   .../userquota/defaultuserquota_010_neg.ksh         |  65 ++++++ >>>   .../userquota/defaultuserquota_011_neg.ksh         |  79 +++++++ >>>   .../userquota/defaultuserquota_012_neg.ksh         |  88 ++++++++ >>>   .../userquota/defaultuserquota_013_neg.ksh         |  71 +++++++ >>>   .../functional/userquota/groupspace_004_pos.ksh    |  78 +++++++ >>>   .../tests/functional/userquota/userquota.cfg       |   2 + >>>   .../functional/userquota/userquota_common.kshlib   |   6 + >>>   .../functional/userquota/userspace_004_pos.ksh     |  80 +++++++ >>>   .../tests/functional/vdev_disk/page_alignment.c    |   8 +- >>>   .../functional/zvol/zvol_stress/zvol_stress.ksh    |   3 +- >>>   .../openzfs/tests/zfs-tests/tests/perf/perf.shlib  | 136 ++++++------ >>>   sys/modules/zfs/zfs_config.h                       |  12 +- >>>   sys/modules/zfs/zfs_gitrev.h                       |   2 +- >>>   166 files changed, 4680 insertions(+), 1144 deletions(-) >>> >>> diff --cc sys/contrib/openzfs/config/kernel-vfs-migratepage.m4 >>> index 000000000000,05db3af511eb..05db3af511eb >>> mode 000000,100644..100644 >>> --- a/sys/contrib/openzfs/config/kernel-vfs-migratepage.m4 >>> +++ b/sys/contrib/openzfs/config/kernel-vfs-migratepage.m4 >>> diff --cc sys/contrib/openzfs/module/zfs/zfs_debug_common.c >>> index 000000000000,cff0dc01c39c..cff0dc01c39c >>> mode 000000,100644..100644 >>> --- a/sys/contrib/openzfs/module/zfs/zfs_debug_common.c >>> +++ b/sys/contrib/openzfs/module/zfs/zfs_debug_common.c >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/ >>> zpool_get/vdev_get_all.ksh >>> index 000000000000,0a63b6059410..0a63b6059410 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/ >>> zpool_get/vdev_get_all.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/ >>> zpool_get/vdev_get_all.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/ >>> auto_spare_double.ksh >>> index 000000000000,6a905c867952..6a905c867952 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/ >>> auto_spare_double.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/ >>> auto_spare_double.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/ >>> gang_blocks_001_pos.ksh >>> index 000000000000,3601f5422250..3601f5422250 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/ >>> gang_blocks_001_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/ >>> gang_blocks_001_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/ >>> gang_blocks_ddt_copies.ksh >>> index 000000000000,12ebcec3af37..12ebcec3af37 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/ >>> gang_blocks_ddt_copies.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/gang_blocks/ >>> gang_blocks_ddt_copies.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/defaultprojectquota_001_pos.ksh >>> index 000000000000,7d0bf5cf0fe1..7d0bf5cf0fe1 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_001_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_001_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/defaultprojectquota_002_pos.ksh >>> index 000000000000,eabf4fecfcb4..eabf4fecfcb4 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_002_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_002_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/defaultprojectquota_003_neg.ksh >>> index 000000000000,53ae9b213c1c..53ae9b213c1c >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_003_neg.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_003_neg.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/defaultprojectquota_004_pos.ksh >>> index 000000000000,784077e62501..784077e62501 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_004_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_004_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/defaultprojectquota_005_pos.ksh >>> index 000000000000,2adf2a9340f7..2adf2a9340f7 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_005_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_005_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/defaultprojectquota_006_pos.ksh >>> index 000000000000,88af37c60549..88af37c60549 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_006_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_006_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/defaultprojectquota_007_pos.ksh >>> index 000000000000,fecb7670dfc6..fecb7670dfc6 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_007_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> defaultprojectquota_007_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/ >>> projectquota/projectspace_005_pos.ksh >>> index 000000000000,92d6e2e81656..92d6e2e81656 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> projectspace_005_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/projectquota/ >>> projectspace_005_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_001_pos.ksh >>> index 000000000000,c57352595662..c57352595662 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_001_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_001_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_002_pos.ksh >>> index 000000000000,325873f90af2..325873f90af2 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_002_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_002_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_003_pos.ksh >>> index 000000000000,f43f5bd5e57e..f43f5bd5e57e >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_003_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_003_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_004_neg.ksh >>> index 000000000000,42be33cac12c..42be33cac12c >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_004_neg.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_004_neg.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_005_pos.ksh >>> index 000000000000,c3302d10dae9..c3302d10dae9 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_005_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_005_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_006_pos.ksh >>> index 000000000000,37e6e66c8119..37e6e66c8119 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_006_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_006_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_007_pos.ksh >>> index 000000000000,91e27cf460fc..91e27cf460fc >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_007_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_007_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_008_pos.ksh >>> index 000000000000,b8efb74d0f12..b8efb74d0f12 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_008_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_008_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_009_pos.ksh >>> index 000000000000,30aa93e2b0ba..30aa93e2b0ba >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_009_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_009_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_010_neg.ksh >>> index 000000000000,ec964236a115..ec964236a115 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_010_neg.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_010_neg.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_011_neg.ksh >>> index 000000000000,e822052ff3dd..e822052ff3dd >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_011_neg.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_011_neg.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_012_neg.ksh >>> index 000000000000,046273ebd869..046273ebd869 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_012_neg.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_012_neg.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_013_neg.ksh >>> index 000000000000,7877bee5f48d..7877bee5f48d >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_013_neg.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> defaultuserquota_013_neg.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> groupspace_004_pos.ksh >>> index 000000000000,f7dc33591ca9..f7dc33591ca9 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> groupspace_004_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> groupspace_004_pos.ksh >>> diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> userspace_004_pos.ksh >>> index 000000000000,795c65101878..795c65101878 >>> mode 000000,100755..100755 >>> --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> userspace_004_pos.ksh >>> +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/ >>> userspace_004_pos.ksh >>> diff --cc sys/modules/zfs/zfs_config.h >>> index 2650db0a389b,000000000000..86ccdbee2d5b >>> mode 100644,000000..100644 >>> --- a/sys/modules/zfs/zfs_config.h >>> +++ b/sys/modules/zfs/zfs_config.h >>> @@@ -1,833 -1,0 +1,839 @@@ >>>   +/* >>>   + */ >>>   + >>>   +/* 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 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 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_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() 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 */ >>>   + >>>   +/* 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 >>>   + >>>   +/* folio_wait_bit() exists */ >>>   +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ >>>   + >>>   +/* 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. */ >>>   +#define HAVE_PYTHON "3.7" >>>   + >>>   +/* 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 */ >>>   + >>>   +/* shrinker_register exists */ >>>   +/* #undef HAVE_SHRINKER_REGISTER */ >>>   + >>>   +/* kernel_siginfo_t exists */ >>>   +/* #undef HAVE_SIGINFO */ >>>   + >>>   +#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 */ >>>   + >>>   +/* standalone exists */ >>>   +/* #undef HAVE_STANDALONE_LINUX_STDARG */ >>>   + >>>   +/* 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. */ >>> *** 224 LINES SKIPPED *** >>> >> > -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Mon May 5 05:06: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 4ZrTy16lkrz5tsx0; Mon, 05 May 2025 05:06:01 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrTy167tKz3FpX; Mon, 05 May 2025 05:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3rQ4I5GDw3foaWDlMbVJIO9x3PIeC19oeIurJMEGKz8=; b=Gc7tfP4zDCvs9rVXBV3XUWvW7bVXSCnDrDJZKSfmsSIEFzxRJXc3o7hGrN85ec/TvC8Q+J 7PiAqWG89/aMIjgVZHziVMMi6D0ZABV4f5dO70PuKrAARX5zl6FvOI57qs9ieIoe+JjoKN PCE8guXh5MXvRs6gFRUdcYPiflMsNL4dy3ULWK4U9S2BSvsuyHaW+qrHicbA3vm5Dgqz8J 4ZH9k3RZ9UAdesv8ysNTKAZQ/OJ26m6gndklQXf7kXXhns7AeICPm9ITlKJjplyaMqKRTD CctPrzFTwZPUIM6dMSB+GFjkdwD7f2K7rrMImlM8/ynZZMmILeDu7J2fNFEJYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3rQ4I5GDw3foaWDlMbVJIO9x3PIeC19oeIurJMEGKz8=; b=F9LAaVvB//6hQE/bBnz1vhpFQYQThqUmsYGs3VGGZMN7WQManG7vLCm8Sm0tNI8MHNCr7c rR3yt18WMhgsEl0sJuYr5j45uL/WvVPT7RJqez502nM1HsQ6NsMXqMDjBrznWD35nS972J aqMwt0G6CGK+DV6+ZKbFuIooxwjwPmJbXNwf4iqGa8oh71XuRWc9DHhsOGUDtsvxtWMrba garxbRXydPc9RtPXkBy2Wa9eTK9qfMZwRuQy+oWD12ExZ2rMlbcsXO0InWbWXdN0UafYLf LYq5QIVBQjcV0XYM5mgiGXNqj/lDc52j5GesR/tm8ySxptSsroVsNsBdLyvwSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746421561; a=rsa-sha256; cv=none; b=aZnc1dk+7XCkSCbGkiORQKCr+cMsbRKKMneFcVPQLBAGsc1gwFTuEfV96ux1WNmkBmmJRV xNvrwtlCiAxiGu+ruDm724EnxP2tdtGIs6R/1diKpoSXmvuRO51BeZLZSWuC5QMrnq8kEk FEJNVlF798E6NeeSow40MWevRJnhH7y8dEncW6aK6ubVi22sKjYPreG88TmM5RKt+vQS9W wXEKyKoaofOAo725rTwqZSlgGFD4rzh/EnZgxVrjAWEB4S9hI31yUc65LMSqUHJiL4h/35 i7vVAXlH/agMOQe0dxbH5BEd1mwmv08Evk68Re1KXXvZiLclyVnxUwVG3FIsQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrTy15P1Jz10CL; Mon, 05 May 2025 05:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545561tV013555; Mon, 5 May 2025 05:06:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545561pG013552; Mon, 5 May 2025 05:06:01 GMT (envelope-from git) Date: Mon, 5 May 2025 05:06:01 GMT Message-Id: <202505050506.545561pG013552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5b9660caff69 - main - Fix incorrect version introduced in manual 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b9660caff69c70c9b6d9df5e04a3f21f8cf7996 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5b9660caff69c70c9b6d9df5e04a3f21f8cf7996 commit 5b9660caff69c70c9b6d9df5e04a3f21f8cf7996 Author: Tom Hukins AuthorDate: 2025-05-02 11:00:20 +0000 Commit: Warner Losh CommitDate: 2025-05-05 04:44:43 +0000 Fix incorrect version introduced in manual pages Several manual pages for releng/14.3 incorrectly claim that features were first introduced in FreeBSD 15.0. I discovered these by running: git checkout origin/releng/14.3 git grep -F '.Fx 15.0' MFC After: 3 days Reviewed by: imp, ziaee Pull Request: https://github.com/freebsd/freebsd-src/pull/1685 --- lib/libc/gen/psignal.3 | 2 +- lib/libc/gen/rtld_get_var.3 | 2 +- lib/libsys/getsockopt.2 | 2 +- lib/libsys/setcred.2 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3 index 605c3cf2d8fe..0af5a6706296 100644 --- a/lib/libc/gen/psignal.3 +++ b/lib/libc/gen/psignal.3 @@ -120,7 +120,7 @@ function appeared in The .Fn psiginfo function appeared in -.Fx 15.0 , +.Fx 14.3 , .Nx 6.0 , and .Dx 4.1 . diff --git a/lib/libc/gen/rtld_get_var.3 b/lib/libc/gen/rtld_get_var.3 index e211d78345e3..092114e86d78 100644 --- a/lib/libc/gen/rtld_get_var.3 +++ b/lib/libc/gen/rtld_get_var.3 @@ -103,4 +103,4 @@ is unknown. The .Nm function first appeared in -.Fx 15.0 . +.Fx 14.3 . diff --git a/lib/libsys/getsockopt.2 b/lib/libsys/getsockopt.2 index 619540b53fae..8839b61597a2 100644 --- a/lib/libsys/getsockopt.2 +++ b/lib/libsys/getsockopt.2 @@ -679,7 +679,7 @@ The option originated in .Ox 4.9 and first appeared in -.Fx 15.0 . +.Fx 14.3 . The .Fx implementation aims to be source-compatible. diff --git a/lib/libsys/setcred.2 b/lib/libsys/setcred.2 index a1b819d24c52..86f61ddfdb30 100644 --- a/lib/libsys/setcred.2 +++ b/lib/libsys/setcred.2 @@ -248,7 +248,7 @@ does not. The .Fn setcred system call appeared in -.Fx 15.0 . +.Fx 14.3 . .Pp Traditionally in UNIX, all credential changes beyond shuffles of effective, real and saved IDs have been done by setuid binaries that successively call multiple From nobody Mon May 5 05:06: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 4ZrTy31N0Gz5tsZR; Mon, 05 May 2025 05:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrTy25ryWz3Frx; Mon, 05 May 2025 05:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0VURfU0QQESbjTJ0OhUUh9pjiXzobIvu9vmg0S5J4I=; b=eHDJaKxiZmYz9YrMfu95EGXhcvLUlMLhFOoXZZ1YJCBjGLLI2lTpKRTNBerv+J2oBxRgk0 WLUGtloD/N1blKb2nkdxFv4i8vczUIP7zoTm4sITLMJG7KXpfa+sErDgDjtcl8U8Ezh8u1 CxkVjDK+u1AaSQ9cvAjo8xsyJ1d5VUb5dSohWqVXnlPYwSZblzmVpwNNbgp9enoA2Lbiwd XPvR97UBNUrPdLAOCN6vZUhZ/KeHqP4l96SkUdjElGAgQvcdtgsMInV+U7tQrDauyEswxk QGu/8RR2NfYFJH+oS4gRNxMTJTxbeDrrVQv37qxbkAFYyu0LxrI+eHdgKYbNoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0VURfU0QQESbjTJ0OhUUh9pjiXzobIvu9vmg0S5J4I=; b=Tu17n+PIACxtwyYnLsE95oynb61t7rBEEYh4vLvHrWd9ocnJMKYDY2T45d6MWTqfoWsCvP hcabKUJzRq9B1OtEQYx322B4dIx5qvkc7E1lUu+JrzAbngdEXK4cevsbWU1fjupTPQDsXR ZGyoPa0P5RvEHmNgcailPgGSfk6EQ//rdFnfO4MTd0D/BIaXZ6cq6dI3iZbkS8oJxKjKrz rlx7y66LVSlscj7COk46uMpTA53RDUdY9VL7EmV70fL2klCibE/1iaACGkt1XIbns3g1Qx ZLQgDfyJohiGvf6EJSJf/u+4eKbbghIznqTVhu+wvfnYLpiUE5rAE0siWP4EHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746421562; a=rsa-sha256; cv=none; b=XxUOs5qaua6gIFo/uvaLxYqoc3DI2+TW43t2vNU4krXGVDH4KZ/YmzXhQ+o7TAnyx71I/4 pGUNRiYvba4c+xPt8OXFAY8b3jBvT5Ozz9j56Whr7VOtNgY7AKnvRNfSTTHMeaUrLKcQjh XVZXTZFeVd0zN4nYmuiJvMYA+uCpWQ+ZBiieqxXmjn4pSf1EoLa4Hnpx1RH9fkBEpqQsFl aeNAl0p5eUhxfkIyXwsz0rGggX7SEMRUx0wfDW+0nOCfh8OKTB6tU05pokx36WTmqBH2IC 5n81BC+siq3VKsYYvr7DF4y7SHHrx/EVpGwmIR5l4xSJLVKEAZOpfou58Y+uFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrTy25RlKz10Kt; Mon, 05 May 2025 05:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5455628W013589; Mon, 5 May 2025 05:06:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545562LH013587; Mon, 5 May 2025 05:06:02 GMT (envelope-from git) Date: Mon, 5 May 2025 05:06:02 GMT Message-Id: <202505050506.545562LH013587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f887d0215fb4 - main - msun: fix cbrt iterations from Newton to Halley 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f887d0215fb48e682acccf4cb95f3794974e1a9d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f887d0215fb48e682acccf4cb95f3794974e1a9d commit f887d0215fb48e682acccf4cb95f3794974e1a9d Author: Clément Bœsch AuthorDate: 2025-05-01 17:19:36 +0000 Commit: Warner Losh CommitDate: 2025-05-05 04:52:49 +0000 msun: fix cbrt iterations from Newton to Halley method Since we're inverting a cube, we have: f(Tₙ)=Tₙ³-x (1) Its first and second derivatives are: f'(Tₙ)=3Tₙ² (2) f"(Tₙ)=6Tₙ (3) Halley iteration[1] uses: Tₙ₊₁=Tₙ-2f(Tₙ)f'(Tₙ)/(2f'(Tₙ)²-f(Tₙ)f"(Tₙ)) (4) Replacing the terms of (4) using (1), (2) and (3): Tₙ₊₁ = Tₙ-2f(Tₙ)f'(Tₙ)/(2f'(Tₙ)²-f(Tₙ)f"(Tₙ)) = Tₙ-2(Tₙ³-x)3Tₙ²/(2(3Tₙ²)²-(Tₙ³-x)6Tₙ) = = Tₙ(2x+Tₙ³)/(x+2Tₙ³) This formula corresponds to the exact expression used in the code. Newton formula is Tₙ-f(Tₙ)/f'(Tₙ) which would have simplified to (2Tₙ³+x)/(3Tₙ²) instead. [1] https://en.wikipedia.org/wiki/Halley's_method [2] https://www.wolframalpha.com/input?i=T-2%28T%5E3-x%293T%5E2%2F%282%283T%5E2%29%5E2-%28T%5E3-x%296T%29 Note: UTF8 in commit message due to the heavy math being hard to recreate w/o it. -- imp Signed-off-by: Clément Bœsch Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1684 --- lib/msun/src/s_cbrt.c | 4 ++-- lib/msun/src/s_cbrtf.c | 4 ++-- lib/msun/src/s_cbrtl.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/msun/src/s_cbrt.c b/lib/msun/src/s_cbrt.c index 6bf84243adcd..568a36545216 100644 --- a/lib/msun/src/s_cbrt.c +++ b/lib/msun/src/s_cbrt.c @@ -90,7 +90,7 @@ cbrt(double x) * the result is larger in magnitude than cbrt(x) but not much more than * 2 23-bit ulps larger). With rounding towards zero, the error bound * would be ~5/6 instead of ~4/6. With a maximum error of 2 23-bit ulps - * in the rounded t, the infinite-precision error in the Newton + * in the rounded t, the infinite-precision error in the Halley * approximation barely affects third digit in the final error * 0.667; the error in the rounded t can be up to about 3 23-bit ulps * before the final error is larger than 0.667 ulps. @@ -99,7 +99,7 @@ cbrt(double x) u.bits=(u.bits+0x80000000)&0xffffffffc0000000ULL; t=u.value; - /* one step Newton iteration to 53 bits with error < 0.667 ulps */ + /* one step Halley iteration to 53 bits with error < 0.667 ulps */ s=t*t; /* t*t is exact */ r=x/s; /* error <= 0.5 ulps; |r| < |t| */ w=t+t; /* t+t is exact */ diff --git a/lib/msun/src/s_cbrtf.c b/lib/msun/src/s_cbrtf.c index a225d3edb982..c69e0fa5be12 100644 --- a/lib/msun/src/s_cbrtf.c +++ b/lib/msun/src/s_cbrtf.c @@ -50,7 +50,7 @@ cbrtf(float x) SET_FLOAT_WORD(t,sign|(hx/3+B1)); /* - * First step Newton iteration (solving t*t-x/t == 0) to 16 bits. In + * First step Halley iteration (solving t*t-x/t == 0) to 16 bits. In * double precision so that its terms can be arranged for efficiency * without causing overflow or underflow. */ @@ -59,7 +59,7 @@ cbrtf(float x) T=T*((double)x+x+r)/(x+r+r); /* - * Second step Newton iteration to 47 bits. In double precision for + * Second step Halley iteration to 47 bits. In double precision for * efficiency and accuracy. */ r=T*T*T; diff --git a/lib/msun/src/s_cbrtl.c b/lib/msun/src/s_cbrtl.c index f1950e2d4cef..ff527cc5e5e7 100644 --- a/lib/msun/src/s_cbrtl.c +++ b/lib/msun/src/s_cbrtl.c @@ -126,7 +126,7 @@ cbrtl(long double x) #endif /* - * Final step Newton iteration to 64 or 113 bits with + * Final step Halley iteration to 64 or 113 bits with * error < 0.667 ulps */ s=t*t; /* t*t is exact */ From nobody Mon May 5 05:06: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 4ZrTy42x6dz5tscK; Mon, 05 May 2025 05:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrTy402znz3FZ5; Mon, 05 May 2025 05:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sp21fIKVwfxcTqs5yWn69IuL9Qqjt/Q3zzErImZvss0=; b=Rml+U+j7WSG35U+2aMTMl+QnyA8nVjQzVvnXO4o+SXSUISb1tylkSKPcSPUPsOZJyErZ8S DYWi2fxKoNiC+cjW779Rhf1IgoBQLl08Sx+KOgrGrpmflavulvmY5NKlBAJzF5dpiEwl6e aFFf35FHGRvX9WIBXuJ9UQqOBn+kyk/ITBXOabB9XHVaS3CqsLQZM6Vn+KeVj8Lz7lrww6 JpD3jAmRVJBCi0ZPA1mUytngGokHFscgEpgyXf1c50VKb6LFYL3iYJDe3n+hwZwXy5Qdwi AWiomMoJdROAVNYhOsk26Yrh7jtzHh6+Z+MWAANPi2GEpULaH4A6ESc9asq2Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sp21fIKVwfxcTqs5yWn69IuL9Qqjt/Q3zzErImZvss0=; b=NYhGF+E+lwcwCLvGnzLbIgjbT1T0FzraRVQJQpEZhPsqH2BzCoS068NIyx3M7T6MkXdA5y ezvMCTBi9qudQ7Ao07SO4+IO0aXH7zT1/Eqtznvk3xQErAuG6Jfa9HhQo3wdYumH60lO5v D98xI5eZd2F3v/YVQBq/GmIHY6fWAkoyfnRIWSulS1xKdZrVIkkvYC7DGW5FwSd32lMydB qxwVWngyLVvGOx2hKJkMpoq8rXsbHGUrRuLyfuctrxbiqjiOzmTS8sWS6dqM3QXU83/uyT N+s2c1dxZ2py78qvjPmHqwG+LpwnhQBNHp4gpALJ8pYKpp9m+DWk80BkzLIEEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746421564; a=rsa-sha256; cv=none; b=AhqG0E99La57AhcpZAf8bGjCnkb+xRr9VdzWqXKlCyzrsbtUJpReNd0NM5uR766UUj0M6/ jCsIVTW3JFA3Holt5gxMn3aBckNP8vO4RoQ2UY20IBg++InAqp4naZGTolmK2PpnbjKQ7D cHVbXaPHp+sYJrP+aoT7eTUa8Zse1A38CdF5uMcjVfmfQ85D4p7SkMAjtCDZJmc/vPLze3 A/h+gK3uZUd7FpfWlvmlVGEWO+7Bwy8F56RcUys/bbQOXIw40TQTy8zXjeZNiAJd0MScqm my0C7QP7vlANXkgtgCI8OuMwccdfEpd8jjpJVR0XHiq0g3Jm1Synp581/0L3nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrTy36MGTz10NC; Mon, 05 May 2025 05:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5455638b013624; Mon, 5 May 2025 05:06:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545563gV013621; Mon, 5 May 2025 05:06:03 GMT (envelope-from git) Date: Mon, 5 May 2025 05:06:03 GMT Message-Id: <202505050506.545563gV013621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6af3517a086e - main - added alias to tilde on french layouts for 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6af3517a086ed09bf378e7b5f5e485fbb8a9e299 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6af3517a086ed09bf378e7b5f5e485fbb8a9e299 commit 6af3517a086ed09bf378e7b5f5e485fbb8a9e299 Author: Céleste Ornato AuthorDate: 2025-05-02 19:59:51 +0000 Commit: Warner Losh CommitDate: 2025-05-05 04:57:40 +0000 added alias to tilde on french layouts for consistency Linux TTY layer, and X11, have this key shifted produce tilde (~). This change takes us from doing nothing to producing this in our TTY layer (vt only, but sc is only special use today). imp notes: Verified the above as best I could, and extracted the longer commit message from the pull request messages. Signed-off-by: Céleste Ornato Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1688 --- share/vt/keymaps/fr.acc.kbd | 2 +- share/vt/keymaps/fr.kbd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/vt/keymaps/fr.acc.kbd b/share/vt/keymaps/fr.acc.kbd index d4efc0d12860..98f866270c3d 100644 --- a/share/vt/keymaps/fr.acc.kbd +++ b/share/vt/keymaps/fr.acc.kbd @@ -43,7 +43,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 'm' 'M' cr cr 'm' 'M' cr cr C 040 0xf9 '%' nul nul ''' '@' nul nul O - 041 0xb2 nop nop nop '|' '|' nop nop O + 041 0xb2 '~' nop nop '|' '|' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 '*' 0xb5 nop nop '#' '~' nop nop O 044 'w' 'W' etb etb 'w' 'W' sub sub C diff --git a/share/vt/keymaps/fr.kbd b/share/vt/keymaps/fr.kbd index 2c63bd8e773f..446053886007 100644 --- a/share/vt/keymaps/fr.kbd +++ b/share/vt/keymaps/fr.kbd @@ -43,7 +43,7 @@ 038 'l' 'L' ff ff 'l' 'L' ff ff C 039 'm' 'M' cr cr 'm' 'M' cr cr C 040 0xf9 '%' nul nul ''' '@' nul nul O - 041 0xb2 nop nop nop '|' '|' nop nop O + 041 0xb2 '~' nop nop '|' '|' nop nop O 042 lshift lshift lshift lshift lshift lshift lshift lshift O 043 '*' 0xb5 nop nop '#' '~' nop nop O 044 'w' 'W' etb etb 'w' 'W' sub sub C From nobody Mon May 5 05:06: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 4ZrTy70qzCz5tsZW; Mon, 05 May 2025 05:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrTy547Q6z3FsQ; Mon, 05 May 2025 05:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3zCtBK/pfw/ypVacH+f0/3CYVuN6LzO4olmHRVA9bY=; b=dOKUyhtBs5FAtFoPEyNi8HPHyVo3XTrYmbsC5dfohsmMh/mfv/AxA4UovFEUALnRxH+sTb Ia+ar03ZOWIwfc9Wn5tY0sAPJaen/mkYmEh9Gl6Vy40Ac6BHxwRM51gziuf6lhZg6DBPKT 5HyKZi9fi4RRnGnp13c02rkuLn4dgK+wgaYlZL03jicHxjcndfPUkO51fA4v9/Z86UTzfi og/W6gwE44kwSWVp6+zSRpu7819xJZ3g9E6jAGTxMkBKrQBKycE7R+r4F5A2yAflL4TFzA 0zUbs2HqflBXqw1+AECadD/j1JvQIjRUrf3FKWec2wK8/L0SskQB49dogjjAHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746421565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3zCtBK/pfw/ypVacH+f0/3CYVuN6LzO4olmHRVA9bY=; b=Z13L0/QOC3L46keooJDzwhEOCEHoMlygqzvNc14GU1fmeyDrfzuWJvv8K6NrZA9HPv3CnP ArdTYsRFJguYGREKH1l/ZNhJ+32VHr4oQbmOJMrLmUeIqSBIFxNiau9HqziZgCng/oBUbA ltNhxtkYDMCD9GhuP2XrRmnSX8+/DEmRGGgj5MeyNcBVJpYoVD1p6IY3qa239SriMN9qnU 59WhQpr/r3rrxj8fVBQlipX+NlOdn93eaSmoDdi5lTyrl48XDmGiVOeZNoCmb/IiE+sM5U ftIK15Vf64g+6ylsBMTKAy5TazRM2AE/Dzukqq+Vtyoke1p5GYdYhj4x+4Byuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746421565; a=rsa-sha256; cv=none; b=BSDpc6R8DYo5qHyBdQvftZ4aPxzUzrh+koeJeiH5XCQfo6VEaj1OgRu1dgBk90GRAalmKh 2S9kCq6RAomphNhJpTNBrgkUN53WttIAbdCvHuKfnic4LRtTgE6SwToCA4xZnPLP0XKGe8 DaaenrHglLdbvrzhPF7Ngh047JPgR0LaXV8VW8S6DP69NrQiyJypRymrP8E4GFaVkPWNid 3DIkhwjUKUQWzjW0MXxiYW5QrZPJxt7qbi77MPP6XeTLEpwbGaDnHZrPvBhWBnqgTxgoSz flokpxrpqwC8DzfEG1beIjVZcBbu6ffvCn2jSMjsLkFDQB/FmCArMFjpjoL0iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrTy50HQfz10nH; Mon, 05 May 2025 05:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545564Ep013664; Mon, 5 May 2025 05:06:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5455644W013662; Mon, 5 May 2025 05:06:04 GMT (envelope-from git) Date: Mon, 5 May 2025 05:06:04 GMT Message-Id: <202505050506.5455644W013662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 794ee43e7506 - main - puc.4: Add a HARDWARE section based off device data from pucdata.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 794ee43e75066bfcbc00545b5bf600b9cda2d5f1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=794ee43e75066bfcbc00545b5bf600b9cda2d5f1 commit 794ee43e75066bfcbc00545b5bf600b9cda2d5f1 Author: Kenneth Raplee AuthorDate: 2025-04-14 05:14:48 +0000 Commit: Warner Losh CommitDate: 2025-05-05 05:04:51 +0000 puc.4: Add a HARDWARE section based off device data from pucdata.c While here, change applicable uses of "ports" to "adapters" to be more precise and improve searchability. This is a 14.3 candate since it affects (positively) the release notes generated from the hardware secionts. MFC After: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1663 --- share/man/man4/puc.4 | 551 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 549 insertions(+), 2 deletions(-) diff --git a/share/man/man4/puc.4 b/share/man/man4/puc.4 index 076fd2ad2d0e..00517c13751d 100644 --- a/share/man/man4/puc.4 +++ b/share/man/man4/puc.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 24, 2008 +.Dd May 4, 2025 .Dt PUC 4 .Os .Sh NAME @@ -36,7 +36,10 @@ Communications driver .Cd "device uart" .Cd "device ppc" .Sh DESCRIPTION -This driver acts as a shim to connect PCI serial and parallel ports to the +The +.Nm +driver acts as a shim to connect +PCI multi-port serial and parallel adapters to the .Xr uart 4 and .Xr ppc 4 @@ -45,6 +48,550 @@ driver. The list of supported devices is in .Pa sys/dev/puc/pucdata.c . Support for new cards should be added there. +.Sh HARDWARE +The +.Nm +driver supports the following +PCI multi-port serial and parallel adapters: +.Pp +.Bl -bullet -compact +.It +Sunix SUN1889 +.It +HP Diva Serial [GSP] Multiport UART: +.Bl -dash -compact +.It +Tosca Console +.It +Tosca Secondary +.It +Maestro SP2 +.It +Superdome Console +.It +Keystone SP2 +.It +Everest SP2 +.El +.It +VScom: +.Bl -dash -compact +.It +PCI-800 +.It +PCI-400 +.It +PCI-200 +.El +.It +Boca Research Turbo Serial: +.Bl -dash -compact +.It +658 +.It +654 +.El +.It +Dolphin Peripherals: +.Bl -dash -compact +.It +4035 +.It +4014 +.El +.It +Applied Micro Circuits 8 Port UART +.It +Digi Neo: +.Bl -dash -compact +.It +PCI 4 Port +.It +PCI 8 Port +.It +PCIe 8 Port +.It +PCIe 4 Port +.It +PCIe 4 Port RJ45 +.It +PCIe 8 Port RJ45 +.El +.It +Comtrol RocketPort: +.Bl -dash -compact +.It +550/8 RJ11 part A +.It +550/8 RJ11 part B +.It +550/8 Octa part A +.It +550/8 Octa part B +.It +550/4 RJ45 +.It +550/Quad +.It +550/16 part A +.It +550/16 part B +.It +550/8 part A +.It +550/8 part B +.El +.It +IBM SurePOS 300 Series (481033H) serial ports +.It +SIIG Cyber I/O PCI (10x family and 20x family): +.Bl -dash -compact +.It +16C550 +.It +16C650 +.It +16C850 +.El +.It +SIIG Cyber Parallel Dual PCI (10x family and 20x family): +.It +SIIG Cyber Serial Dual PCI (10x family and 20x family): +.Bl -dash -compact +.It +16C550 +.It +16C650 +.It +16C850 +.El +.It +SIIG Cyber 2S1P PCI (10x family and 20x family): +.Bl -dash -compact +.It +16C550 +.It +16C650 +.It +16C850 +.El +.It +SIIG Cyber 4S PCI (10x family and 20x family): +.Bl -dash -compact +.It +16C550 +.It +16C650 +.It +16C850 +.El +.It +SIIG PS8000 8S PCI 16C650 (20x family) +.It +Brainboxes: +.Bl -dash -compact +.It +PX-101 +.It +PX-246 +.It +PX-257 +.It +PX-260 +.It +PX-279 +.It +PX-310 +.It +PX-313 +.It +PX-320 +.It +PX-346 +.It +PX-368 +.It +PX-420 +.It +PX-431 +.It +PX-475 +.It +PX-803 +.It +PX-820 +.It +PX-831 +.It +PX-846 +.It +PX-857 +.It +UC-101 +.It +UC-203 +.It +UC-253 +.It +UC-257 +.It +UC-260 +.It +UC-268 +.It +UC-279 +.It +UC-302 +.It +UC-310 +.It +UC-313 +.It +UC-346 +.It +UC-357 +.It +UC-368 +.It +UC-414 +.It +UC-420 +.It +UC-431 +.It +UC-475 +.It +UC-607 +.It +UC-836 +.It +UP-189 +.It +UP-200 +.It +UP-869 +.It +UP-880 +.El +.It +Intashield: +.Bl -dash -compact +.It +IS-200 +.It +IS-400 +.It +IX-100 +.It +IX-200 +.It +IX-400 +.El +.It +Quatech: +.Bl -dash -compact +.It +QSC-100 +.It +DSC-100 +.It +DSC-200/300 +.It +QSC-200/300 +.It +ESC-100D +.It +ESC-100M +.It +QSCLP-100 +.It +DSCLP-100 +.It +DSCLP-200/300 +.It +ESCLP-100 +.El +.It +Moxa Technologies: +.Bl -dash -compact +.It +Smartio CP-102E/PCIe +.It +Smartio CP-102EL/PCIe +.It +Smartio C104H/PCI +.It +Smartio CP-104UL/PCI +.It +Smartio CP-104JU/PCI +.It +Smartio CP-104EL/PCIe +.It +Smartio CP-104EL-A/PCIe +.It +CP-112UL +.It +Industio CP-114 +.It +Smartio CP-114EL/PCIe +.It +Smartio CP-118EL-A/PCIe +.It +C168H/PCI +.It +C168U/PCI +.It +CP-168EL/PCIe +.It +Smartio CP-168EL-A/PCIe +.El +.It +Exar: +.Bl -dash -compact +.It +XR17C/D152 +.It +XR17C154 +.It +XR17C158 +.It +XR17V258IV +.It +XR17V352 +.It +XR17V354 +.It +XR17V358 +.El +.It +Advantech +.Bl -dash -compact +.It +PCI-1602 Rev A +.It +2-port PCI (PCI-1602 Rev B1/PCI-1603) +.El +.It +Lava Computers: +.Bl -dash -compact +.It +Dual Serial +.It +Quatro A +.It +Quatro B +.It +Quattro-PCI A +.It +Quattro-PCI B +.It +Octo A +.It +Octo B +.El +.It +Sunix SUN1888 +.It +I-O DATA RSA-PCI2/R +.It +SIIG Cyber 4 PCI 16550 +.It +SIIG Cyber 4S PCI 16C650 (20x family) +.It +SIIG Quartet Serial 850 +.It +Kuroutoshikou SERIAL4P-LPPCI2 +.It +Oxford Semiconductor OX16PCI954 UARTs +.It +SIIG Cyber: +.Bl -dash -compact +.It +2S PCIe +.It +Serial Dual PCI 16C850 +.It +2SP1 PCIe +.El +.It +Oxford Semiconductor: +.Bl -dash -compact +.It +OX16PCI954 UARTs +.It +OX9160/OX16PCI954 UARTs (function 1) +.It +OX16PCI952 UARTs +.It +OX16PCI958 UARTs +.El +.It +Perle: +.Bl -dash -compact +.It +Ultraport4 Express +.It +Speed2 LE +.It +Speed4 LE +.It +Speed8 LE +.El +.It +Oxford Semiconductor OXPCIe952: +.Bl -dash -compact +.It +1S1P +.It +UARTs +.It +UARTs (function 1) +.El +.It +Oxford Semiconductor OXPCIe954: +.Bl -dash -compact +.It +UARTs +.It +UARTs (function 1) +.El +.It +Oxford Semiconductor OXPCIe958: +.Bl -dash -compact +.It +UARTs +.It +UARTs (function 1) +.El +.It +VScom: +.Bl -dash -compact +.It +PCI-100L +.It +PCI-200L +.It +200Li +.El +.It +Titan: +.Bl -dash -compact +.It +PCI-800H +.It +PCI-800H +.It +PCI-200H +.El +.It +Titan VScom: +.Bl -dash -compact +.It +PCI-800L +.It +PCI-200HV2 +.It +PCIex-800H +.It +PCIex-800H +.El +.It +Avlab Technology PCI IO 2S +.It +Avlab Low Profile PCI 4 Serial +.It +Syba Tech Ltd PCI-4S2P-550-ECP +.It +Sunix SER5xxxx +.Bl -dash -compact +.It +2-port serial +.It +4-port serial +.It +8-port serial +.El +.It +Sunix MIO5xxxx (1284 Printer port): +.Bl -dash -compact +.It +1-port serial +.It +2-port serial +.It +4-port serial +.El +.It +Feasso PCI FPP-02 2S1P +.It +Sun 1040 PCI Quad Serial +.It +Decision Computer Inc PCCOM: +.Bl -dash -compact +.It +4-port serial +.It +8-port serial +.El +.It +PCCOM dual port RS232/422/485 +.It +NetMos NM9815 Dual 1284 Printer port +.It +NetMos NM9835: +.Bl -dash -compact +.It +based 1-port serial +.It +based 2-port serial +.It +Dual UART and 1284 Printer port +.El +.It +NetMos NM9845: +.Bl -dash -compact +.It +6 Port UART +.It +Quad UART and 1284 Printer port +.El +.It +NetMos NM9865: +.Bl -dash -compact +.It +Dual UART +.It +Triple UART +.It +Quad UART +.It +Single UART and 1284 Printer port +.It +Dual UART and 1284 Printer port +.It +Dual 1284 Printer port +.El +.It +IC Book Labs: +.Bl -dash -compact +.It +Gunboat x4 Lite +.It +Gunboat x4 Pro +.It +Ironclad x8 Lite +.It +Ironclad x8 Pro +.It +Dreadnought x16 Pro +.It +Dreadnought x16 Lite +.It +Gunboat x2 Low Profile +.It +Gunboat x4 Low Profile +.El +.El .Sh SEE ALSO .Xr ppc 4 , .Xr uart 4 From nobody Mon May 5 08:47:46 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 4ZrZst5SyBz5v9dR; Mon, 05 May 2025 08:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrZst4mLkz4169; Mon, 05 May 2025 08:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746434866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=97PYhyw44hpFfXn9MyGuFHoi06sn9K3+TlnxE4Zfbe0=; b=bdCrn0FgyDHfELfLSfqlBLDsUmn4/YZnvoXMmn4lDmffxV3HXeruibZP5NrYDRG7Iq2keI lzq2oMyobdkmseD7BKn/9tWXlLJLEUNSJNZyhUAZaGHtseY8d0rFeNE/DeB22S55dPNJ5k 16IlSubVlzjNSy1B7CJqsze4oVMZpBGfnqBIpDKMqA9FsbzRVOHRnEVtjOgohe8f0XGSuo LozNWJAOw1O3Wr53Fs9k8sJU2Pdg6bYbOsY8ySwroglPHTFuqXwn7WOAwWqoSlmZeHLcx6 H2wq9wUhGUT9pW3u0zF1raaGe73+V7YlRPONrXNqI/yc2quBdXsMrscpkntOUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746434866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=97PYhyw44hpFfXn9MyGuFHoi06sn9K3+TlnxE4Zfbe0=; b=l+m7F4uaIx3bw9FdGDAVTINaQoWOnjheAb815mf1tyZV2QPfs5CRU6/jvSPajJILuMuCll rNePV/Ogsg4bctKnsSAYM8R6cJv8Ew6qUpH22LoypIOJ/bePUcPNxCYo+YfW4s75yj29NH YkNObrWC6kl38HovGUg+Oxnw24IWavVaJN8Pyz+mT+MQR6wBSWUlrZqKtEUEqR4gAn+eXl z8rs+6Lca1gQb6ehJm+LT6J5ZlgVNgHpF8w2eEwqQsk43wKrlvRoHjG3UnECg5PCiIbKPz nU49CRCs1Q54PAlR1Md6F5nv9wEUQ2HDIG1ndXVgdsp6oJH7clhsbFT/zfo8yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746434866; a=rsa-sha256; cv=none; b=oJ61VBdYJ+zQ3ImXhw9LSWBpIQT9PaPQMvokVgI34JrW3mUqoygDyHm6VnO9AA0VmzJkrz N5aMMZs/RGSPn4RWxmGrEHa+exHd2WMjMwwRLgWB7WErr7cp1hZ8kLW+5H4cYfDpEMCs32 oi64hw1lNkkiawpLjH5zWTJ3IA0OqxZWY9482YH7HVJwJjpiGjka08eM3ExOH1sveOQbOB Te/Xn5s2IjlrE4DZA6xUikT7ZMU0cHRZ8XMSEGid0BqpKXOXZaBv5NMxLWiCeU9g0V8Vax kk7elH55lBHnPc7mRoXYzsB8d3xUFrRg5Hywe0jp33/OfIgC0VOaqBt8ed4png== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrZst3lqvz169y; Mon, 05 May 2025 08:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5458lkj0026785; Mon, 5 May 2025 08:47:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5458lkmQ026782; Mon, 5 May 2025 08:47:46 GMT (envelope-from git) Date: Mon, 5 May 2025 08:47:46 GMT Message-Id: <202505050847.5458lkmQ026782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: f6674f74fb29 - main - udf: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6674f74fb299821d0f159b9f11cf7dd9b3e70ad Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=f6674f74fb299821d0f159b9f11cf7dd9b3e70ad commit f6674f74fb299821d0f159b9f11cf7dd9b3e70ad Author: Gordon Bergling AuthorDate: 2025-05-05 08:47:23 +0000 Commit: Gordon Bergling CommitDate: 2025-05-05 08:47:23 +0000 udf: Fix a typo in a source code comment - s/demostrates/demonstrates/ MFC after: 3 days --- sys/fs/udf/udf_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 866d0172f745..c7438147c0a0 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -32,7 +32,7 @@ /* * Ok, here's how it goes. The UDF specs are pretty clear on how each data * structure is made up, but not very clear on how they relate to each other. - * Here is the skinny... This demostrates a filesystem with one file in the + * Here is the skinny... This demonstrates a filesystem with one file in the * root directory. Subdirectories are treated just as normal files, but they * have File Id Descriptors of their children as their file data. As for the * Anchor Volume Descriptor Pointer, it can exist in two of the following three From nobody Mon May 5 10:45: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 4ZrdTg3FPxz5vKL2; Mon, 05 May 2025 10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrdTg13mmz3bpw; Mon, 05 May 2025 10: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=1746441927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSDHZcpn+DmzqOmkZPVkSfy7icrg0NGnX6irbOG5UJM=; b=cRTuexNwZKizVjZVovmvGvxXWHSSoZt8cZ6N0XSbNpSVOnuauC0Qw39xtOHrGYKE/oYkar +rHz1BRsO5NZlV6cJ3bk7SRuwUqlHP2FGGXPWYtbGx9Ais44MTU6R84KzmgCo9vh0cYPRv BjoQu309w5to9sSyZq+mw2Ri88Z7880AKwbtWxh4r6GAHRUvEI2nMKgBMeYdB08PVZQseJ bPpWbDC+lhhKJHgI22LX1M0VuLPItQQw/ZmDfUU4nOZwtdc//QUHxnhEKhfBeNZvlcWNFX DBfoOFAgqLhuzLDAaXziP9TWy2iKSFnoyU9G8UmsDdFSQbOhjC2dZNCOQpdUnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746441927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSDHZcpn+DmzqOmkZPVkSfy7icrg0NGnX6irbOG5UJM=; b=Jas3VGF/SwW5uHz279YY6xQ+pE3e9j6KF36REQJVE4bJkLAiNcaGa99QOztTDagqLed4O9 w0z1fTMqbqCf3k2MLPZRz6xXiQWv9EWY8nE+alV34rG0Zh9sRoPAf62oG5gE1HW4/Gwu7h 4Oz/tAGUquTrMLmUKn1VenAXEr76lbEsvEVLCaqVfQ/iEU5pTszk9WCWn3BlpJym/snfKp 6dqHgWYXhgOlewIdCQN1Ol8zkFo0valKpLY+RaQpfjaxqBFHYuVJHRO5HdxFM6Y8Ebk+Gi 5KPIuhTMb+N9qith4eDz87pcdB+6jYH/xZmwQpj1LQr9oxuLuVr6xFFdGBRvDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746441927; a=rsa-sha256; cv=none; b=yF4+Z1HMS+oZYtY/sTCAG4uT6bqgatqg37fBgk1LIhNN21JNwf3ezENMnOZx9jHMjIpCwy JFJZ2ltR1X4NLFM9rwNUHXPfSBKK8hWxIcnwLYB30t5EtmNRnPyxLlf7Ew1oRIczfWwuW7 uwmONj6yWaqKMwSGeoANCZ8MC7aOM55T1ZO85Xa6cLcHj36YpGKWuSTR/QjlibgOtMz4Ao hMy10SDgxCYp+1agrrYtI0wJ1BHh7tcAhqSWoo9Zsu6npTfrYZc74f+HWa0wARpzJareP5 jAwFzKgHGFCxG+waLj/9CvJ61IQSAuWGjyh5zzZL5dEq2TKg6FJrpDdBExPF8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrdTg0VZTz19HL; Mon, 05 May 2025 10:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545AjQsj050172; Mon, 5 May 2025 10:45:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545AjQEl050169; Mon, 5 May 2025 10:45:26 GMT (envelope-from git) Date: Mon, 5 May 2025 10:45:26 GMT Message-Id: <202505051045.545AjQEl050169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e8e2ed66f097 - main - LinuxKPI: dummy: add more dummy hreader files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: e8e2ed66f0978c439c7e93ff3d30a86ffad5bf56 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e8e2ed66f0978c439c7e93ff3d30a86ffad5bf56 commit e8e2ed66f0978c439c7e93ff3d30a86ffad5bf56 Author: Bjoern A. Zeeb AuthorDate: 2025-05-02 20:08:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-05 10:44:21 +0000 LinuxKPI: dummy: add more dummy hreader files These are needed for mt76. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/dummy/include/linux/regmap.h | 0 sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/regmap.h b/sys/compat/linuxkpi/dummy/include/linux/regmap.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h b/sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Mon May 5 10: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 4ZrdTh3RSbz5vK9N; Mon, 05 May 2025 10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrdTh1lMxz3bhy; Mon, 05 May 2025 10: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=1746441928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cwI3Q9bVjJ0LjcHl6QOFqaGh0QAIiDQE8/C6qNbLfpA=; b=Uoo4Is0HuNVLO88VeMaQp3E2W2VdxleQhFqv2owOuzLSaHbjkgSqp7nygsWcnRc+5GHw55 Qebjl/HjzzuEMz8ebC/wh87HclN9OXEqYXhAvZ+8PT/N9utg4SPNVSAUvft60BGPuVy0hu E8G/zv6XF5VcannbzpTcigjpTcAGkW73qUuyjis5DjI3waDrqsbpv8ZtDfs0J4xTsOLCh0 SBMxsL7JmkceUmoBZqa9/RcHbud0VR63wukWxbZJ0pxbrbAqR14210qpJcpoiRVwM11cUQ 5Ss+Mw9FlyKlx5LtxMIquc/ojHszgk9ojhLjuOJvaeBKxwZJKVxFjFKV5cVHkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746441928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cwI3Q9bVjJ0LjcHl6QOFqaGh0QAIiDQE8/C6qNbLfpA=; b=uFV3SqERnMhsb4nKIps+gAB7rhhSjV32e4hFfk8fFWmagxyF4RnX8guPWIbO/WOjzV4xaA LQMJ88bxxWqA1Nog5TwEjiS0FCmJkAQj4ryulRXtFiFLq2MAm56wHfwX9G9q4iKxq9MODy S3m3BjJUrsKiUxDFjD5hkScTXvvw9QqRrptJTgjRhhj7FjUKHzCbSYdZG595rBEcIXsHEi ygPDxiz1+hZsuGxrQDpY6i2xHUiEfZCYHiBl+wblcywAPzEjoFIp+vcl8iMay6hv7DhMzR 9REl+iuXbIx6CPtAb0predD+6qK8c4acfg7TkYbFuv3Wc3iAcxj15vcFDJK/IQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746441928; a=rsa-sha256; cv=none; b=XCGZq/VOCkFxeG7nY/15YZ4jU5eR5+rXjdVgN0sDpJf+MA47boJtFvoDNv9V6Jxe0RC0zH LjPcT7ASciwAwpeadcWHFvghk6QiREb0kXd8q83am0gkRnW7F1xloDGqgnpxCsjBpqu+JO r4qbndnN/V6f1Cq0Xyl3cCUEVsnuk3pC6FzJNVQSW9zruEQMloG5pP14l8QyrewHrA9Aoz ULD4E7E4dtXtJmLkhliEvvhNg0jNvp4SGbuF7EaDozYqAplUTULDV36Rmf5de5iFL73qcm c3O9BEZR1QK2pLLOoVqRyt/LIJFqZ30dhsiO2ZzCjaqR5fAjNfdEfWCHVyOezQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrdTh1318z19Bt; Mon, 05 May 2025 10:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545AjSlS050213; Mon, 5 May 2025 10:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545AjS1Z050210; Mon, 5 May 2025 10:45:28 GMT (envelope-from git) Date: Mon, 5 May 2025 10:45:28 GMT Message-Id: <202505051045.545AjS1Z050210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 675e6b1c68ba - main - LinuxKPI: 802.11: header updates for mt76 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 675e6b1c68ba71af1853952f7df4d84399340009 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=675e6b1c68ba71af1853952f7df4d84399340009 commit 675e6b1c68ba71af1853952f7df4d84399340009 Author: Bjoern A. Zeeb AuthorDate: 2025-05-02 20:13:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-05 10:44:22 +0000 LinuxKPI: 802.11: header updates for mt76 Add more structs, fields, flags, defines. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- .../linuxkpi/common/include/linux/ieee80211.h | 6 ++ sys/compat/linuxkpi/common/include/net/cfg80211.h | 96 +++++++++++++++------- sys/compat/linuxkpi/common/include/net/mac80211.h | 36 ++++++-- 3 files changed, 100 insertions(+), 38 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 8a33ad002e09..396204c3c484 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -295,6 +295,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_MCS_MASK_LEN 10 #define IEEE80211_MLD_MAX_NUM_LINKS 15 +#define IEEE80211_MLD_CAP_OP_MAX_SIMUL_LINKS 0xf #define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP 0x0060 #define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME 1 @@ -427,6 +428,7 @@ enum ieee80211_tx_control_flags { IEEE80211_TX_CTRL_PORT_CTRL_PROTO = BIT(0), IEEE80211_TX_CTRL_PS_RESPONSE = BIT(1), IEEE80211_TX_CTRL_RATE_INJECT = BIT(2), + IEEE80211_TX_CTRL_DONT_USE_RATE_MASK = BIT(3), IEEE80211_TX_CTRL_MLO_LINK = 0xF0000000, /* This is IEEE80211_LINK_UNSPECIFIED on the high bits. */ }; @@ -493,6 +495,10 @@ enum ieee80211_category { WLAN_CATEGORY_SA_QUERY = 8, /* net80211::IEEE80211_ACTION_CAT_SA_QUERY */ }; +struct ieee80211_he_6ghz_capa { + uint16_t capa; +}; + /* 80211-2020 9.3.3.2 Format of Management frames */ struct ieee80211_mgmt { __le16 frame_control; diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index aae60983f5f6..1e4f917a2796 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -744,6 +744,8 @@ struct linuxkpi_ieee80211_regdomain { #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 0x20 #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_MASK 0x40 #define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_MASK 0x80 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_5 0x80 +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_5 0x80 #define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x1 #define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 0x2 @@ -931,11 +933,6 @@ struct ieee80211_he_obss_pd { uint8_t partial_bssid_bitmap[8]; }; -struct ieee80211_sta_he_6ghz_capa { - /* TODO FIXME */ - int capa; -}; - struct ieee80211_eht_mcs_nss_supp_20mhz_only { union { struct { @@ -989,7 +986,7 @@ struct ieee80211_sband_iftype_data { /* TODO FIXME */ enum nl80211_iftype types_mask; struct ieee80211_sta_he_cap he_cap; - struct ieee80211_sta_he_6ghz_capa he_6ghz_capa; + struct ieee80211_he_6ghz_capa he_6ghz_capa; struct ieee80211_sta_eht_cap eht_cap; struct { const uint8_t *data; @@ -1182,6 +1179,18 @@ enum cfg80211_regulatory { REGULATORY_COUNTRY_IE_FOLLOW_POWER = BIT(6), }; +struct wiphy_radio_freq_range { + uint32_t start_freq; + uint32_t end_freq; +}; + +struct wiphy_radio { + int n_freq_range; + int n_iface_combinations; + const struct wiphy_radio_freq_range *freq_range; + const struct ieee80211_iface_combination *iface_combinations; +}; + enum wiphy_flags { WIPHY_FLAG_AP_UAPSD = BIT(0), WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(1), @@ -1246,6 +1255,9 @@ struct wiphy { uint8_t available_antennas_rx; uint8_t available_antennas_tx; + int n_radio; + const struct wiphy_radio *radio; + int features, hw_version; int interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids; int num_iftype_ext_capab; @@ -1259,6 +1271,7 @@ struct wiphy { unsigned long ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)]; struct dentry *debugfsdir; + const struct wiphy_wowlan_support *wowlan; struct cfg80211_wowlan *wowlan_config; /* Lower layer (driver/mac80211) specific data. */ @@ -1271,8 +1284,9 @@ struct wiphy { struct wireless_dev { /* XXX TODO, like ic? */ - int iftype; - int address; + enum nl80211_iftype iftype; + uint32_t radio_mask; + uint8_t address[ETH_ALEN]; struct net_device *netdev; struct wiphy *wiphy; }; @@ -1542,6 +1556,43 @@ cfg80211_chandef_create(struct cfg80211_chan_def *chandef, }; } +static __inline bool +cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) +{ + TODO(); + return (false); +} + +static __inline bool +cfg80211_chandef_dfs_usable(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) +{ + TODO(); + return (false); +} + +static __inline unsigned int +cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) +{ + TODO(); + return (0); +} + +static __inline bool +cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef_1, + const struct cfg80211_chan_def *chandef_2) +{ + TODO(); + return (false); +} + +static __inline bool +cfg80211_chandef_usable(struct wiphy *wiphy, + const struct cfg80211_chan_def *chandef, uint32_t flags) +{ + TODO(); + return (false); +} + static __inline void cfg80211_bss_iter(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, void (*iterfunc)(struct wiphy *, struct cfg80211_bss *, void *), void *data) @@ -2077,27 +2128,6 @@ cfg80211_find_ext_ie(uint8_t eid, const uint8_t *p, size_t len) return (NULL); } -static __inline bool -cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef) -{ - TODO(); - return (false); -} - -static __inline bool -cfg80211_chandef_dfs_usable(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) -{ - TODO(); - return (false); -} - -static __inline unsigned int -cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef) -{ - TODO(); - return (0); -} - static inline void _ieee80211_set_sband_iftype_data(struct ieee80211_supported_band *band, struct ieee80211_sband_iftype_data *iftype_data, size_t nitems) @@ -2189,6 +2219,14 @@ cfg80211_get_iftype_ext_capa(struct wiphy *wiphy, enum nl80211_iftype iftype) return (NULL); } +static inline uint16_t +ieee80211_get_he_6ghz_capa(const struct ieee80211_supported_band *sband, + enum nl80211_iftype iftype) +{ + TODO(); + return (0); +} + static inline int nl80211_chan_width_to_mhz(enum nl80211_chan_width width) { diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index c6cdcbc43269..f8eb180d63a1 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -473,6 +473,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_DISALLOW_PUNCTURING_5GHZ, IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN, IEEE80211_HW_HANDLES_QUIET_CSA, + IEEE80211_HW_NO_VIRTUAL_MONITOR, /* Keep last. */ NUM_IEEE80211_HW_FLAGS @@ -708,9 +709,10 @@ struct ieee80211_sta_rates { /* XXX TODO */ /* XXX some _rcu thing */ struct { - int idx; - int flags; - } rate[1]; /* XXX what is the real number? */ + uint8_t idx; + uint8_t count; + uint16_t flags; + } rate[4]; /* XXX what is the real number? */ }; struct ieee80211_sta_txpwr { @@ -734,7 +736,7 @@ struct ieee80211_link_sta { struct ieee80211_sta_ht_cap ht_cap; struct ieee80211_sta_vht_cap vht_cap; struct ieee80211_sta_he_cap he_cap; - struct ieee80211_sta_he_6ghz_capa he_6ghz_capa; + struct ieee80211_he_6ghz_capa he_6ghz_capa; struct ieee80211_sta_eht_cap eht_cap; uint8_t rx_nss; enum ieee80211_sta_rx_bw bandwidth; @@ -1093,7 +1095,7 @@ struct ieee80211_ops { void (*update_vif_offload)(struct ieee80211_hw *, struct ieee80211_vif *); - int (*get_txpower)(struct ieee80211_hw *, struct ieee80211_vif *, int *); + int (*get_txpower)(struct ieee80211_hw *, struct ieee80211_vif *, unsigned int, int *); int (*get_stats)(struct ieee80211_hw *, struct ieee80211_low_level_stats *); int (*set_radar_background)(struct ieee80211_hw *, struct cfg80211_chan_def *); @@ -1870,13 +1872,13 @@ ieee80211_rate_set_vht(struct ieee80211_tx_rate *r, uint8_t mcs, uint8_t nss) } static inline uint8_t -ieee80211_rate_get_vht_nss(struct ieee80211_tx_rate *r) +ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *r) { return (((r->idx >> 4) & 0x07) + 1); } static inline uint8_t -ieee80211_rate_get_vht_mcs(struct ieee80211_tx_rate *r) +ieee80211_rate_get_vht_mcs(const struct ieee80211_tx_rate *r) { return (r->idx & 0x0f); } @@ -2180,12 +2182,27 @@ ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *w) linuxkpi_ieee80211_queue_work(hw, w); } +static __inline bool +ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct sk_buff *skb, enum nl80211_band band, struct ieee80211_sta **sta) +{ + TODO(); + return (false); +} + static __inline void ieee80211_tx_status_skb(struct ieee80211_hw *hw, struct sk_buff *skb) { linuxkpi_ieee80211_tx_status(hw, skb); } +static inline void +ieee80211_tx_status_noskb(struct ieee80211_hw *hw, struct ieee80211_sta *sta, + struct ieee80211_tx_info *info) +{ + TODO(); +} + static __inline void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb) { @@ -2267,7 +2284,8 @@ ieee80211_txq_may_transmit(struct ieee80211_hw *hw, struct ieee80211_txq *txq) } static __inline void -ieee80211_radar_detected(struct ieee80211_hw *hw) +ieee80211_radar_detected(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *chanctx_conf) { TODO(); } @@ -2327,7 +2345,7 @@ ieee80211_get_tx_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta, } static __inline void -ieee80211_color_change_finish(struct ieee80211_vif *vif) +ieee80211_color_change_finish(struct ieee80211_vif *vif, uint8_t link_id) { TODO(); } From nobody Mon May 5 10:45: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 4ZrdTj4V15z5vKCg; Mon, 05 May 2025 10:45: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrdTj2XlVz3bYs; Mon, 05 May 2025 10:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746441929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=604rZm3wsPf7UcGHJu7Du8YoRts6Lbv3BbVoc9fkQQY=; b=NGj5F0X53+ebS3G8I5u1dFxjoQL7pAMvNdRneY9KoLwvDset93BYgIttrUBwn+xGQ7oGKB ToL3oVAP5w5gtUH75CA7cOALaEVPdGmiCfbCDWE4hS6ilCAfhfaDjA8zfQzr+2yMxUv+Ig M9a9x4ZzNpQ0Ou+lC26/8NweqCt/4k41Aqctxnm76/oRKx8lizYkMoqbFY6eOVxhFrZARp 475SS5LyoOyGGjuamgF2Y11Q9xjQPWqv91C4qVOMelCSDT76lhiy2nFtAzRUasT/fcXnnB AJLGzIsjFKJyC/Fi8UgaD/Pitr2Y5uMBFyNH/RoMtAhDK4rKMrH3sXKiFiTlmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746441929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=604rZm3wsPf7UcGHJu7Du8YoRts6Lbv3BbVoc9fkQQY=; b=qZmTD02TyO1KaSJX9dCsb3oJAuhHPk9FikI4Ec/BEwcAlJo2CmxhbCxd5htpnGYCJreIva D0faAnpHgZwTf91L2g2movYFODbyOiL+IcCAVmJGRE/Bp768B4odIa+qTbgQ0aNtt3OyTT bYrUzTyZzgfj9Ndr+W2SE7eY4lGMdh1xF1WUd/zqpX39uV+z5+vE2EViP0A62fatBN0D3Y ghY7Z+T1c8e0VBHGKUwXyiGA9+Ll31a7txcc6dKUHTO9xHxKql/vzBwMEtix3v5rdXVLWM 1vk82uINe91iPpfqkN92Vc6bDcBKpQgF8KpLqdWyjbZLMTVXsxGkq6ay8CTdzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746441929; a=rsa-sha256; cv=none; b=MZq1nExwywOcKx5WncPbnVG+OAbd8yYrSew2caQeVNYyACCRqMT5Z1dvrawy8Z5RRNTJOx iTf36wwEXxYt0Rdni23wyh9RH4yozBsyj7ESzieOQtLqzTvrqTSM6saBObnfxed4zqeCEg UqAXjaCt4MoWqwb1o1pXm2BrrTkYub5DpLPgE2iKkBlLBNKgc35pR5Buu5ytkB+ysSw3XZ N5T8ppObTBybPBPdVdt/tZO0xMg8RYWTbNEIqTN58z+nmXCoIl+lW01KgEKPyqrSSwVQFx 53rzV73AKR2gnJgz/v7clGLFl8xy8kYjPp0CPxT7WHz71T3evTRDJEAkOpWLUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrdTj1yTnz193l; Mon, 05 May 2025 10:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545AjTwd050253; Mon, 5 May 2025 10:45:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545AjTwc050250; Mon, 5 May 2025 10:45:29 GMT (envelope-from git) Date: Mon, 5 May 2025 10:45:29 GMT Message-Id: <202505051045.545AjTwc050250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a4618caa43c1 - main - LinuxKPI: add is_unicast_ether_addr() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a4618caa43c16e6e672c27dac1943fd833f8bd8f Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a4618caa43c16e6e672c27dac1943fd833f8bd8f commit a4618caa43c16e6e672c27dac1943fd833f8bd8f Author: Bjoern A. Zeeb AuthorDate: 2025-05-03 23:44:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-05 10:44:22 +0000 LinuxKPI: add is_unicast_ether_addr() Needed by mediatek/mt76 wireless driver. While here adjust the way is_multicast_ether_addr() is implemented to not look weird. [1] Sponsored by: The FreeBSD Foundation Suggested by: emaste [1] MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D50152 --- sys/compat/linuxkpi/common/include/linux/etherdevice.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/etherdevice.h b/sys/compat/linuxkpi/common/include/linux/etherdevice.h index 5d3df744ae0e..1f2d6cf22d7e 100644 --- a/sys/compat/linuxkpi/common/include/linux/etherdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/etherdevice.h @@ -57,10 +57,16 @@ is_zero_ether_addr(const u8 * addr) 0x00); } +static inline bool +is_unicast_ether_addr(const u8 * addr) +{ + return ((addr[0] & 0x01) == 0x00); +} + static inline bool is_multicast_ether_addr(const u8 * addr) { - return (0x01 & addr[0]); + return ((addr[0] & 0x01) == 0x01); } static inline bool From nobody Mon May 5 10: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 4ZrdTk5Kczz5vJyN; Mon, 05 May 2025 10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrdTk36Zbz3bkt; Mon, 05 May 2025 10: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=1746441930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBP7tNy76esrAyAnH6VZsl1GdNgWSugylZcri0JGel4=; b=ddhX26KNrsxJMIR0kFW8nGFxli40gkPoq6RGXLa6zYdhSyh66zB+Sq+qvRXydj6uHF6JrL 7HI3xDRJAbmjkiA2bOmkL8lkLv1Tt29jN3zthqb9cf7D2u1oHceXzF9IpLzlHOBa5Bd4c9 tm2rxjbeUpSRiVZ9tM1yb7KMvUkMUH2i+egslSpHrfqSZMkxHANUCUru04bZxmiL6r5hqJ Dje2WQ1UclwNcOPj8H5x1dybqhd6XQgNQ1t/WNViQrCJSA0WMidXH5572BJUGeyUPc9484 WrFBRYh48KmVXfPr1OddGU0UzJSu27GAKc8vSDZzSCXar2tjhmNvYTQKVrG71w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746441930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBP7tNy76esrAyAnH6VZsl1GdNgWSugylZcri0JGel4=; b=GDIHpTSuem2dmCB35vp1JCshzPUSDZ8DJmchOIB8HSIHn65v0Oy5zGRjM066oV4GdOb+uA bZ2a7M/Mb8Jio2eXSoFtJZzl/sb8amx7uFD+CJaJUBrxGSUr2voGxz1rICi8Z28pEAkk/H ED2BC/c2ndVnerZdz3cD2bO0e7PazdK7Q4RNw16kTm7I3RnNTSPwBbtAiwXZy1nFFgBj6l bL5RmQWbl8FmYeZZFBg5fMWMN8lbJwD8bN3m1GiErYvQve4TsNAX9WzKt4xJehIfu86KZn noEKWxaDJazA/yeZwY18EWaFzLhCUQCkZJQ5rz4KJyxvj+XCWaVR4JER0df7SA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746441930; a=rsa-sha256; cv=none; b=K9nz8Bd7//krfc0uqcCyTIzo02dCD8ZYqkocg2w3wm2YwkasDzIbyMQ7mZzezCtEgwQISV UFehLNMxZF1gHQCg4Ts79V8fJOX9nhn4IiQTUAR90aTY0oazgR64yVZ8+Zmr2GJ36Bp4UF O1+EPqJc9g0jKr3eDUXeHf6HPvBEKiUEnpzgZ0JjE1UMzIKXucAjdg5AkRsKLJFzXCmODF hz5OSzJQyUPGuN96+1dK5vPKkmfr3G0baiq8Ckok76c+yUQ31Lh9OO6QLAISCcBA5qrV4f LNe2XFnHGvSnGqzizux+6MENRkBY+01k7KBwREErj+MlEZNSmiikiXdy2QHKRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrdTk2dPkz195Z; Mon, 05 May 2025 10:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545AjUhP050289; Mon, 5 May 2025 10:45:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545AjUgh050286; Mon, 5 May 2025 10:45:30 GMT (envelope-from git) Date: Mon, 5 May 2025 10:45:30 GMT Message-Id: <202505051045.545AjUgh050286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 76b66ac45ea8 - main - LinuxKPI: 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76b66ac45ea804f23ffb35712b0ceaa98864c06f Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=76b66ac45ea804f23ffb35712b0ceaa98864c06f commit 76b66ac45ea804f23ffb35712b0ceaa98864c06f Author: Bjoern A. Zeeb AuthorDate: 2025-05-04 19:52:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-05 10:44:22 +0000 LinuxKPI: style Check results of non-bool to be != 0. No functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D50158 --- sys/compat/linuxkpi/common/src/linux_kobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_kobject.c b/sys/compat/linuxkpi/common/src/linux_kobject.c index 02f8b8d5b709..2b9d3dcffa4b 100644 --- a/sys/compat/linuxkpi/common/src/linux_kobject.c +++ b/sys/compat/linuxkpi/common/src/linux_kobject.c @@ -122,10 +122,10 @@ kobject_add_complete(struct kobject *kobj) for (attr = t->default_attrs; *attr != NULL; attr++) { error = sysfs_create_file(kobj, *attr); - if (error) + if (error != 0) break; } - if (error) + if (error != 0) sysfs_remove_dir(kobj); } From nobody Mon May 5 10: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 4ZrdTm7311z5vKGZ; Mon, 05 May 2025 10:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrdTl5BhHz3bZ9; Mon, 05 May 2025 10: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=1746441931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tUeNpgBRURJMVnKbH75dgkUvrwWl/s/E1pXNYNnl4E=; b=eObPe28DPnIRs6ep1gBGRxLBlZ/H+YS1hJ+z/OLnFPHOcnwhrPo3GBX5U3Cf+LOH45BwtR a/palQtiIXIl7SEjZE9rNHcHrMOe1MjIDgBwTCCc42eu2xjb2cbP7Rpy3PuWHuMZQSjCkj chpZdM4E4v4xYykWy17sYyMLSddAAXJWuez9/jTqC/KnXt43vrk1zZjq0J/CIDPKOkbejA MTQDPzSWJgSCtKGyzwZpC5jIS71nJDKCT9EFqIWBlRiT8Bh8NE/7LiFstBV8gy5DNKyxDS 31LEl2mHRUvbYgl4pBhAXC6jfhP3MH/57Ucdp8t3uK8dmpgXJuFdNgKWstZW4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746441931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tUeNpgBRURJMVnKbH75dgkUvrwWl/s/E1pXNYNnl4E=; b=GBiTmGxyHI1pU83bVeL75kvlYcRU+/VirpgNRYaqO03j4xBs8MRKJff8sVZBSWurtK4mdF b1DegJwYL7r67y555YXQDbKzFX10HeRGCuWnrVaStJ8QBHPUF6yLwNoPxIGtrpjoQ+kJdV P++k/l58TyxVk3LZf3BYNuYvLiNltdqLLWfjOF48imvKww+3jsksIELHzRW1zApWHOyEg0 N/RzWpJYPbshEHeez5JCYYorxFUYbygUDUrVsSZWzRlLGuB6VfO1/e4qnrO2lDugnD06Tl prOtbfzFHLhci/zFwMr5a3ZvcBdTF7eWFn0kLFlgsQq+tyRJWLY/9xbeajcjBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746441931; a=rsa-sha256; cv=none; b=W2BTlLZ+kqQAaryKo78fyaY3WqTZUkcFEaWD5YtFVO4+sCbsRbXdpE8NA1qGrErL08XhyC fenVJz3BqtQKGOA51iDrzCvkE2QwdGNLq4Xb8YVC5H4NwkZRO0jiEeD8bHzqUYTkOoteOa kWSoQztbvDw1TxfGDyeHtniQXV4MfIJzWY6c7uatA2sO1YJ6eIkyCEVFi00jKhFuOL6mZH PvuJCrW253852DyKY+O+Ch0ZcXYL+Mb4TCATaN3vvj6dw4rwDeSLQhyRofvyVhHFeBU5Yk X3PMgXyA0fln4lUJqq9hQEHwxcodQMnp/sLckofoYVeZHx0W1Hpj3vKFhln+aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrdTl3szsz19QK; Mon, 05 May 2025 10:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545AjVIk050329; Mon, 5 May 2025 10:45:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545AjV7D050326; Mon, 5 May 2025 10:45:31 GMT (envelope-from git) Date: Mon, 5 May 2025 10:45:31 GMT Message-Id: <202505051045.545AjV7D050326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 152e61976155 - main - bnxt: add guards around struct_group 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 152e6197615570e7a2f5f1c6c2ed00ecee9dd10c Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=152e6197615570e7a2f5f1c6c2ed00ecee9dd10c commit 152e6197615570e7a2f5f1c6c2ed00ecee9dd10c Author: Bjoern A. Zeeb AuthorDate: 2025-05-03 20:22:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-05 10:44:22 +0000 bnxt: add guards around struct_group macros The header file might be included after linux/stddef.h or others are included and the macros would be re-defined. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D50156 --- sys/dev/bnxt/bnxt_en/bnxt_dcb.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_dcb.h b/sys/dev/bnxt/bnxt_en/bnxt_dcb.h index 293f1b85dad5..fa68401583ca 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_dcb.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_dcb.h @@ -40,13 +40,17 @@ #define BNXT_DCB_CAP_DCBX_VER_IEEE 0x08 #define BNXT_DCB_CAP_DCBX_STATIC 0x10 +#ifndef __struct_group #define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \ union { \ struct { MEMBERS } ATTRS; \ struct TAG { MEMBERS } ATTRS NAME; \ } +#endif +#ifndef struct_group_attr #define struct_group_attr(NAME, ATTRS, MEMBERS...) \ __struct_group(/* no tag */, NAME, ATTRS, MEMBERS) +#endif struct bnxt_cos2bw_cfg { uint8_t pad[3]; From nobody Mon May 5 11:39: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 4ZrfhJ4jJKz5vNMD; Mon, 05 May 2025 11:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrfhJ4Msrz40Fx; Mon, 05 May 2025 11:39:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746445184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvUf+QfEmd5/nwlvMG0Ei8+R2QGvfHYcUY5qu8P20G8=; b=V0YnBltq9oVUqOK+NlAY4/CrN6lnFGjWOLTxL8Pr8Jl+or64kwXBI3XusWd2XWRs2jstd/ ioUjajLWyq3FCqSy28CWsX9R9XYEmKq/GWO39ODdcxHbZ2bXtd5YaXPa9dbaGm+8EILBRZ VJeBSw0BiFD/E46HO9intGVSvglWHrhBa+krQT+0tUTOSiTDlagL80+oj8aUOjG6kWGWyj HNaeUhiKkzyeL3frPcov/fRo7SmSD7gbUqr7zhDUDCRAWA+DpxrYgfpsNvyrV+436+CT4k v5edOzt4VwIoTRyNekWkNz2kZ9BtT2In+hRe+Oy/v7i2EJ/vsvaQ6ECcyMHVwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746445184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gvUf+QfEmd5/nwlvMG0Ei8+R2QGvfHYcUY5qu8P20G8=; b=XFHAGpz/HZLAGMXaMs4L9LqFjZmpf3ETJ1LkE5TZ/D2RzsL2ZrOtADXNrLEzKcDaQfBV9v 1SBGH4Z4IG61Wwes/qQv04Qiru+RGfBQObcyQfafok1sx/SMBjvYSEgJHzqyaKl2h3P0sN jiF2RzmQzNKTP7MAD20uJClm4qCQqtJPDj6YJc7DMA4HYKfnu0FTZ0O4rmt7fO0DbNXOEx xeelQ1CRXBiwJX3RXjSjqrZUQVvTK+jW91/3L9YjxaTg3ksZQP8v/6mQBlIc33cPtwn8/y fxcIrMcjWPgfCclC3mEWluAYh1j6VtRfeg3oSg+5JQOinaVaC9z+boxvpY/vcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746445184; a=rsa-sha256; cv=none; b=oZbSFK0db1aGpOTAJ2QG6zv0h2P9N2I+r3VMYjZCNLTN7Hb7Rtc7fXbAe83Dgt1PuqJG1q CUcV4+ntRat3lk7zrvBthNL04nC/ii1Z5vogSpM6lVrSEwL3jIf6j/76XZnQkP3yzGZRGi lxU4cCDstjer7IUmFehU41bkixvqtrqDlz+Vg1jUj72X8HSZzl/6KMyjjdIbsut35+q1cQ ujYD5L/lt3E/d4Jj+LwxJ/gJzBmmJ6ZBKnd/oPziSRZ/ybkKpb5Zrlhg5GTV4dubCm6Hg/ gvL74zNAS6oqSsEfAkQz7376OpYh9g5n6tkm1hXsYuw5EZrt7PBF0Tgf0Nn7fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrfhJ3YkFz1BVx; Mon, 05 May 2025 11:39:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545BdiC4045377; Mon, 5 May 2025 11:39:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545Bdi3s045374; Mon, 5 May 2025 11:39:44 GMT (envelope-from git) Date: Mon, 5 May 2025 11:39:44 GMT Message-Id: <202505051139.545Bdi3s045374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 44e5a0150835 - main - audio(8): Initial revision List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44e5a01508353cfa52e185a531cfb5a6b39b28f6 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=44e5a01508353cfa52e185a531cfb5a6b39b28f6 commit 44e5a01508353cfa52e185a531cfb5a6b39b28f6 Author: Christos Margiolis AuthorDate: 2025-05-05 11:38:59 +0000 Commit: Christos Margiolis CommitDate: 2025-05-05 11:39:35 +0000 audio(8): Initial revision audio(8) is a new program that lists and modifies audio device properties, using a control-driven interface, in similar fashion to mixer(8). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D46227 --- usr.sbin/Makefile | 1 + usr.sbin/audio/Makefile | 8 + usr.sbin/audio/audio.8 | 187 +++++++++ usr.sbin/audio/audio.c | 987 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1183 insertions(+) diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index a35c34ee23fc..a891e290bafe 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -2,6 +2,7 @@ SUBDIR= adduser \ arp \ + audio \ binmiscctl \ boottrace \ bsdconfig \ diff --git a/usr.sbin/audio/Makefile b/usr.sbin/audio/Makefile new file mode 100644 index 000000000000..6a5d45f4b898 --- /dev/null +++ b/usr.sbin/audio/Makefile @@ -0,0 +1,8 @@ +.include + +PROG= audio +SRCS= ${PROG}.c +MAN= ${PROG}.8 +LDFLAGS+= -lnv -lmixer + +.include diff --git a/usr.sbin/audio/audio.8 b/usr.sbin/audio/audio.8 new file mode 100644 index 000000000000..82bc170cef82 --- /dev/null +++ b/usr.sbin/audio/audio.8 @@ -0,0 +1,187 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024-2025 The FreeBSD Foundation +.\" +.\" Portions of this software were developed by Christos Margiolis +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd May 5, 2025 +.Dt AUDIO 8 +.Os +.Sh NAME +.Nm audio +.Nd list and modify soundcard properties +.Sh SYNOPSIS +.Nm +.Op Fl f Ar device +.Op Fl hov +.Op Ar control Ns Oo = Ns Ar value Oc Ar ... +.Sh DESCRIPTION +The +.Nm +utility is used to set and display sound card properties, using a +control-driven interface, in order to filter and/or set specific properties. +.Pp +The options are as follows: +.Bl -tag -width "-f device" +.It Fl f Ar device +Choose a specific audio device +.Pq see Sx FILES . +Userland devices (e.g those registered by +.Xr virtual_oss 8 +can also be selected. +.It Fl h +Print a help message. +.It Fl o +Print values in a format suitable for use inside scripts. +.It Fl v +Run in verbose mode. +This option will print all of the device's channel properties. +.El +.Pp +The device controls are as follows: +.Bl -column xxxxxxxxxxxxxxx xxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxx -offset indent +.It Sy Name Ta Sy Type Ta Sy Read/Write Ta Sy Action +.It name Ta String Ta Read Ta Device name +.It desc Ta String Ta Read Ta Device description +.It status Ta String Ta Read Ta Device status +.It devnode Ta String Ta Read Ta Device node +.It from_user Ta Boolean Ta Read Ta Userland device +.It unit Ta Number Ta Read Ta Device unit +.It caps Ta String Ta Read Ta Device OSS capabitilies +.It bitperfect Ta Boolean Ta Read/Write Ta Bit-perfect mode enabled +.It autoconv Ta Boolean Ta Read/Write Ta Auto-conversions enabled +.It realtime Ta Boolean Ta Read/Write Ta Real-time mode enabled +.It play Ta Group Ta Read Ta Playback properties +.It play.format Ta String Ta Read/Write Ta Playback format +.It play.rate Ta Number Ta Read/Write Ta Playback sample rate +.It play.vchans Ta Boolean Ta Read/Write Ta Playback VCHANs (virtual channels) enabled +.It play.min_rate Ta Number Ta Read Ta Minimum playback sample rate +.It play.max_rate Ta Number Ta Read Ta Maximum playback sample rate +.It play.min_chans Ta Number Ta Read Ta Natively supported minimum playback sample channels +.It play.max_chans Ta Number Ta Read Ta Natively supported maximum playback sample channels +.It play.formats Ta String Ta Read Ta Natively supported playback formats +.It rec Ta Group Ta Read Ta Recording properties +.It rec.format Ta String Ta Read/Write Ta Recording format +.It rec.rate Ta Number Ta Read/Write Ta Recording sample rate +.It rec.vchans Ta Boolean Ta Read/Write Ta Recording VCHANs (virtual channels) enabled +.It rec.min_rate Ta Number Ta Read Ta Minimum recording sample rate +.It rec.max_rate Ta Number Ta Read Ta Maximum recording sample rate +.It rec.min_chans Ta Number Ta Read Ta Natively supported minimum recording sample channels +.It rec.max_chans Ta Number Ta Read Ta Natively supported maximum recording sample channels +.It rec.formats Ta String Ta Read Ta Natively supported recording formats +.El +.Pp +The +.Pa play.format , +.Pa play.rate , +.Pa rec.format and +.Pa rec.rate +controls will be read-only if VCHANs are disabled. +.Pp +The device channel controls are as follows: +.Bl -column xxxxxxxxxxxxxxx xxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxx -offset indent +.It Sy Name Ta Sy Type Ta Sy Read/Write Ta Sy Action +.It name Ta String Ta Read Ta Channel name +.It parentchan Ta String Ta Read Ta Parent (primary) channel name +.It unit Ta Number Ta Read Ta Channel unit +.It caps Ta String Ta Read Ta Channel OSS capabilities +.It latency Ta Number Ta Read Ta Channel latency +.It format Ta String Ta Read Ta Channel format +.It rate Ta Number Ta Read Ta Channel sample rate +.It pid Ta Number Ta Read Ta PID of process consuming channel +.It proc Ta String Ta Read Ta Name of process consuming channel +.It interrupts Ta Number Ta Read Ta Number of interrupts since channel was opened +.It xruns Ta Number Ta Read Ta Number of playback underruns/recoring overruns +.It feedcount Ta Number Ta Read Ta Number of bytes fed to channel +.It volume Ta Volume Ta Read Ta Channel left-right volume in normalized form (0.00 to 1.00). +.It hwbuf Ta Group Ta Read Ta Hardware buffer properties +.It hwbuf.format Ta String Ta Read Ta Hardware buffer format +.It hwbuf.rate Ta String Ta Read Ta Hardware buffer sample rate +.It hwbuf.size_bytes Ta Number Ta Read Ta Hardware buffer size in bytes +.It hwbuf.size_frames Ta Number Ta Read Ta Hardware buffer size in frames +.It hwbuf.blksz Ta Number Ta Read Ta Hardware buffer block size +.It hwbuf.blkcnt Ta Number Ta Read Ta Hardware buffer block count +.It hwbuf.free Ta Number Ta Read Ta Hardware buffer free space in bytes +.It hwbuf.ready Ta Number Ta Read Ta Hardware buffer ready space in bytes +.It swbuf Ta Group Ta Read Ta Software buffer properties +.It swbuf.format Ta String Ta Read Ta Software buffer format +.It swbuf.rate Ta String Ta Read Ta Software buffer sample rate +.It swbuf.size_bytes Ta Number Ta Read Ta Software buffer size in bytes +.It swbuf.size_frames Ta Number Ta Read Ta Software buffer size in frames +.It swbuf.blksz Ta Number Ta Read Ta Software buffer block size +.It swbuf.blkcnt Ta Number Ta Read Ta Software buffer block count +.It swbuf.free Ta Number Ta Read Ta Software buffer free space in bytes +.It swbuf.ready Ta Number Ta Read Ta Software buffer ready space in bytes +.It feederchain Ta String Ta Read Ta Channel feeder chain +.El +.Sh FILES +.Bl -tag -width /dev/dspX -compact +.It Pa /dev/dsp +The default audio device. +.It Pa /dev/dspX +The audio device file, where X is the unit of the device, for example +.Ar /dev/dsp0 . +.El +.Sh EXAMPLES +Disable auto-conversions and enable realtime mode to get as low latencies as +possible: +.Bd -literal -offset indent +$ audio autoconv=0 realtime=1 +.Ed +.Pp +Set the playback sample format to 2-channel signed 24-bit low endian, and sample +rate to 48000 Hz: +.Bd -literal -offset indent +$ audio play.format=s24le:2.0 play.rate=48000 +.Ed +.Pp +List the PIDs and process names of all channels for +.Pa /dev/dsp1 : +.Bd -literal -offset indent +$ audio -f /dev/dsp1 pid proc +.Ed +.Pp +Dump +.Pa /dev/dsp0 +information to a file and retrieve back later: +.Bd -literal -offset indent +$ audio -f /dev/dsp0 -o > info +\&... +$ audio -f /dev/dsp0 `cat info` +.Ed +.Sh SEE ALSO +.Xr sndstat 4 , +.Xr sound 4 , +.Xr mixer 8 , +.Xr sysctl 8 +.Sh AUTHORS +The +.Nm +utility was implemented by +.An Christos Margiolis Aq Mt christos@FreeBSD.org +under sponsorship from the +.Fx +Foundation. diff --git a/usr.sbin/audio/audio.c b/usr.sbin/audio/audio.c new file mode 100644 index 000000000000..f7c4aa5a7f04 --- /dev/null +++ b/usr.sbin/audio/audio.c @@ -0,0 +1,987 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024-2025 The FreeBSD Foundation + * + * This software was developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Taken from sys/dev/sound/pcm/ */ +#define STATUS_LEN 64 +#define FMTSTR_LEN 16 + +struct audio_chan { + char name[NAME_MAX]; + char parentchan[NAME_MAX]; + int unit; +#define INPUT 0 +#define OUTPUT 1 + int direction; + char caps[BUFSIZ]; + int latency; + int rate; + char format[FMTSTR_LEN]; + int pid; + char proc[NAME_MAX]; + int interrupts; + int xruns; + int feedcount; + int volume; + struct { + char format[FMTSTR_LEN]; + int rate; + int size_bytes; + int size_frames; + int blksz; + int blkcnt; + int free; + int ready; + } hwbuf, swbuf; + char feederchain[BUFSIZ]; + struct audio_dev *dev; + TAILQ_ENTRY(audio_chan) next; +}; + +struct audio_dev { + char name[NAME_MAX]; + char desc[NAME_MAX]; + char status[BUFSIZ]; + char devnode[NAME_MAX]; + int from_user; + int unit; + char caps[BUFSIZ]; + int bitperfect; + int realtime; + int autoconv; + struct { + char format[FMTSTR_LEN]; + int rate; + int pchans; + int vchans; + int min_rate; + int max_rate; + int min_chans; + int max_chans; + char formats[BUFSIZ]; + } play, rec; + TAILQ_HEAD(, audio_chan) chans; +}; + +struct audio_ctl { + const char *name; + size_t off; +#define STR 0 +#define NUM 1 +#define VOL 2 +#define GRP 3 + int type; + int (*mod)(struct audio_dev *, void *); +}; + +struct map { + int val; + const char *str; +}; + +static int mod_bitperfect(struct audio_dev *, void *); +static int mod_autoconv(struct audio_dev *, void *); +static int mod_realtime(struct audio_dev *, void *); +static int mod_play_vchans(struct audio_dev *, void *); +static int mod_play_rate(struct audio_dev *, void *); +static int mod_play_format(struct audio_dev *, void *); +static int mod_rec_vchans(struct audio_dev *, void *); +static int mod_rec_rate(struct audio_dev *, void *); +static int mod_rec_format(struct audio_dev *, void *); + +static struct audio_ctl dev_ctls[] = { +#define F(member) offsetof(struct audio_dev, member) + { "name", F(name), STR, NULL }, + { "desc", F(desc), STR, NULL }, + { "status", F(status), STR, NULL }, + { "devnode", F(devnode), STR, NULL }, + { "from_user", F(from_user), NUM, NULL }, + { "unit", F(unit), NUM, NULL }, + { "caps", F(caps), STR, NULL }, + { "bitperfect", F(bitperfect), NUM, mod_bitperfect }, + { "autoconv", F(autoconv), NUM, mod_autoconv }, + { "realtime", F(realtime), NUM, mod_realtime }, + { "play", F(play), GRP, NULL }, + { "play.format", F(play.format), STR, mod_play_format }, + { "play.rate", F(play.rate), NUM, mod_play_rate }, + /*{ "play.pchans", F(play.pchans), NUM, NULL },*/ + { "play.vchans", F(play.vchans), NUM, mod_play_vchans }, + { "play.min_rate", F(play.min_rate), NUM, NULL }, + { "play.max_rate", F(play.max_rate), NUM, NULL }, + { "play.min_chans", F(play.min_chans), NUM, NULL }, + { "play.max_chans", F(play.max_chans), NUM, NULL }, + { "play.formats", F(play.formats), STR, NULL }, + { "rec", F(rec), GRP, NULL }, + { "rec.rate", F(rec.rate), NUM, mod_rec_rate }, + { "rec.format", F(rec.format), STR, mod_rec_format }, + /*{ "rec.pchans", F(rec.pchans), NUM, NULL },*/ + { "rec.vchans", F(rec.vchans), NUM, mod_rec_vchans }, + { "rec.min_rate", F(rec.min_rate), NUM, NULL }, + { "rec.max_rate", F(rec.max_rate), NUM, NULL }, + { "rec.min_chans", F(rec.min_chans), NUM, NULL }, + { "rec.max_chans", F(rec.max_chans), NUM, NULL }, + { "rec.formats", F(rec.formats), STR, NULL }, + { NULL, 0, 0, NULL } +#undef F +}; + +static struct audio_ctl chan_ctls[] = { +#define F(member) offsetof(struct audio_chan, member) + /*{ "name", F(name), STR, NULL },*/ + { "parentchan", F(parentchan), STR, NULL }, + { "unit", F(unit), NUM, NULL }, + { "caps", F(caps), STR, NULL }, + { "latency", F(latency), NUM, NULL }, + { "rate", F(rate), NUM, NULL }, + { "format", F(format), STR, NULL }, + { "pid", F(pid), NUM, NULL }, + { "proc", F(proc), STR, NULL }, + { "interrupts", F(interrupts), NUM, NULL }, + { "xruns", F(xruns), NUM, NULL }, + { "feedcount", F(feedcount), NUM, NULL }, + { "volume", F(volume), VOL, NULL }, + { "hwbuf", F(hwbuf), GRP, NULL }, + { "hwbuf.format", F(hwbuf.format), STR, NULL }, + { "hwbuf.rate", F(hwbuf.rate), NUM, NULL }, + { "hwbuf.size_bytes", F(hwbuf.size_bytes), NUM, NULL }, + { "hwbuf.size_frames", F(hwbuf.size_frames), NUM, NULL }, + { "hwbuf.blksz", F(hwbuf.blksz), NUM, NULL }, + { "hwbuf.blkcnt", F(hwbuf.blkcnt), NUM, NULL }, + { "hwbuf.free", F(hwbuf.free), NUM, NULL }, + { "hwbuf.ready", F(hwbuf.ready), NUM, NULL }, + { "swbuf", F(swbuf), GRP, NULL }, + { "swbuf.format", F(swbuf.format), STR, NULL }, + { "swbuf.rate", F(swbuf.rate), NUM, NULL }, + { "swbuf.size_bytes", F(swbuf.size_bytes), NUM, NULL }, + { "swbuf.size_frames", F(swbuf.size_frames), NUM, NULL }, + { "swbuf.blksz", F(swbuf.blksz), NUM, NULL }, + { "swbuf.blkcnt", F(swbuf.blkcnt), NUM, NULL }, + { "swbuf.free", F(swbuf.free), NUM, NULL }, + { "swbuf.ready", F(swbuf.ready), NUM, NULL }, + { "feederchain", F(feederchain), STR, NULL }, + { NULL, 0, 0, NULL } +#undef F +}; + +/* + * Taken from the OSSv4 manual. Not all of them are supported on FreeBSD + * however, and some of them are obsolete. + */ +static struct map capmap[] = { + { PCM_CAP_ANALOGIN, "ANALOGIN" }, + { PCM_CAP_ANALOGOUT, "ANALOGOUT" }, + { PCM_CAP_BATCH, "BATCH" }, + { PCM_CAP_BIND, "BIND" }, + { PCM_CAP_COPROC, "COPROC" }, + { PCM_CAP_DEFAULT, "DEFAULT" }, + { PCM_CAP_DIGITALIN, "DIGITALIN" }, + { PCM_CAP_DIGITALOUT, "DIGITALOUT" }, + { PCM_CAP_DUPLEX, "DUPLEX" }, + { PCM_CAP_FREERATE, "FREERATE" }, + { PCM_CAP_HIDDEN, "HIDDEN" }, + { PCM_CAP_INPUT, "INPUT" }, + { PCM_CAP_MMAP, "MMAP" }, + { PCM_CAP_MODEM, "MODEM" }, + { PCM_CAP_MULTI, "MULTI" }, + { PCM_CAP_OUTPUT, "OUTPUT" }, + { PCM_CAP_REALTIME, "REALTIME" }, + { PCM_CAP_REVISION, "REVISION" }, + { PCM_CAP_SHADOW, "SHADOW" }, + { PCM_CAP_SPECIAL, "SPECIAL" }, + { PCM_CAP_TRIGGER, "TRIGGER" }, + { PCM_CAP_VIRTUAL, "VIRTUAL" }, + { 0, NULL } +}; + +static struct map fmtmap[] = { + { AFMT_A_LAW, "alaw" }, + { AFMT_MU_LAW, "mulaw" }, + { AFMT_S8, "s8" }, + { AFMT_U8, "u8" }, + { AFMT_AC3, "ac3" }, + { AFMT_S16_LE, "s16le" }, + { AFMT_S16_BE, "s16be" }, + { AFMT_U16_LE, "u16le" }, + { AFMT_U16_BE, "u16be" }, + { AFMT_S24_LE, "s24le" }, + { AFMT_S24_BE, "s24be" }, + { AFMT_U24_LE, "u24le" }, + { AFMT_U24_BE, "u24be" }, + { AFMT_S32_LE, "s32le" }, + { AFMT_S32_BE, "s32be" }, + { AFMT_U32_LE, "u32le" }, + { AFMT_U32_BE, "u32be" }, + { AFMT_F32_LE, "f32le" }, + { AFMT_F32_BE, "f32be" }, + { 0, NULL } +}; + +static bool oflag = false; +static bool vflag = false; + +static void +cap2str(char *buf, size_t size, int caps) +{ + struct map *p; + + for (p = capmap; p->str != NULL; p++) { + if ((p->val & caps) == 0) + continue; + strlcat(buf, p->str, size); + strlcat(buf, ",", size); + } + if (*buf == '\0') + strlcpy(buf, "UNKNOWN", size); + else + buf[strlen(buf) - 1] = '\0'; +} + +static void +fmt2str(char *buf, size_t size, int fmt) +{ + struct map *p; + int enc, ch, ext; + + enc = fmt & 0xf00fffff; + ch = (fmt & 0x07f00000) >> 20; + ext = (fmt & 0x08000000) >> 27; + + for (p = fmtmap; p->str != NULL; p++) { + if ((p->val & enc) == 0) + continue; + strlcat(buf, p->str, size); + if (ch) { + snprintf(buf + strlen(buf), size, + ":%d.%d", ch - ext, ext); + } + strlcat(buf, ",", size); + } + if (*buf == '\0') + strlcpy(buf, "UNKNOWN", size); + else + buf[strlen(buf) - 1] = '\0'; +} + +static int +bytes2frames(int bytes, int fmt) +{ + int enc, ch, samplesz; + + enc = fmt & 0xf00fffff; + ch = (fmt & 0x07f00000) >> 20; + /* Add the channel extension if present (e.g 2.1). */ + ch += (fmt & 0x08000000) >> 27; + + if (enc & (AFMT_S8 | AFMT_U8 | AFMT_MU_LAW | AFMT_A_LAW)) + samplesz = 1; + else if (enc & (AFMT_S16_NE | AFMT_U16_NE)) + samplesz = 2; + else if (enc & (AFMT_S24_NE | AFMT_U24_NE)) + samplesz = 3; + else if (enc & (AFMT_S32_NE | AFMT_U32_NE | AFMT_F32_NE)) + samplesz = 4; + else + samplesz = 0; + + if (!samplesz || !ch) + return (-1); + + return (bytes / (samplesz * ch)); +} + +static struct audio_dev * +read_dev(char *path) +{ + nvlist_t *nvl; + const nvlist_t * const *di; + const nvlist_t * const *cdi; + struct sndstioc_nv_arg arg; + struct audio_dev *dp = NULL; + struct audio_chan *ch; + size_t nitems, nchans, i, j; + int fd, caps, unit; + + if ((fd = open("/dev/sndstat", O_RDONLY)) < 0) + err(1, "open(/dev/sndstat)"); + + if (ioctl(fd, SNDSTIOC_REFRESH_DEVS, NULL) < 0) + err(1, "ioctl(SNDSTIOC_REFRESH_DEVS)"); + + arg.nbytes = 0; + arg.buf = NULL; + if (ioctl(fd, SNDSTIOC_GET_DEVS, &arg) < 0) + err(1, "ioctl(SNDSTIOC_GET_DEVS#1)"); + + if ((arg.buf = malloc(arg.nbytes)) == NULL) + err(1, "malloc"); + + if (ioctl(fd, SNDSTIOC_GET_DEVS, &arg) < 0) + err(1, "ioctl(SNDSTIOC_GET_DEVS#2)"); + + if ((nvl = nvlist_unpack(arg.buf, arg.nbytes, 0)) == NULL) + err(1, "nvlist_unpack"); + + if (nvlist_empty(nvl) || !nvlist_exists(nvl, SNDST_DSPS)) + errx(1, "no soundcards attached"); + + if (path == NULL || (path != NULL && strcmp(basename(path), "dsp") == 0)) + unit = mixer_get_dunit(); + else + unit = -1; + + /* Find whether the requested device exists */ + di = nvlist_get_nvlist_array(nvl, SNDST_DSPS, &nitems); + for (i = 0; i < nitems; i++) { + if (unit == -1 && strcmp(basename(path), + nvlist_get_string(di[i], SNDST_DSPS_DEVNODE)) == 0) + break; + else if (nvlist_exists(di[i], SNDST_DSPS_PROVIDER_INFO) && + (int)nvlist_get_number(nvlist_get_nvlist(di[i], + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_UNIT) == unit) + break;; + } + if (i == nitems) + errx(1, "device not found"); + +#define NV(type, item) \ + nvlist_get_ ## type (di[i], SNDST_DSPS_ ## item) + if ((dp = calloc(1, sizeof(struct audio_dev))) == NULL) + err(1, "calloc"); + + dp->unit = -1; + strlcpy(dp->name, NV(string, NAMEUNIT), sizeof(dp->name)); + strlcpy(dp->desc, NV(string, DESC), sizeof(dp->desc)); + strlcpy(dp->devnode, NV(string, DEVNODE), sizeof(dp->devnode)); + dp->from_user = NV(bool, FROM_USER); + dp->play.pchans = NV(number, PCHAN); + dp->rec.pchans = NV(number, RCHAN); +#undef NV + + if (dp->play.pchans && !nvlist_exists(di[i], SNDST_DSPS_INFO_PLAY)) + errx(1, "%s: playback channel list empty", dp->name); + if (dp->rec.pchans && !nvlist_exists(di[i], SNDST_DSPS_INFO_REC)) + errx(1, "%s: recording channel list empty", dp->name); + +#define NV(type, mode, item) \ + nvlist_get_ ## type (nvlist_get_nvlist(di[i], \ + SNDST_DSPS_INFO_ ## mode), SNDST_DSPS_INFO_ ## item) + if (dp->play.pchans) { + dp->play.min_rate = NV(number, PLAY, MIN_RATE); + dp->play.max_rate = NV(number, PLAY, MAX_RATE); + dp->play.min_chans = NV(number, PLAY, MIN_CHN); + dp->play.max_chans = NV(number, PLAY, MAX_CHN); + fmt2str(dp->play.formats, sizeof(dp->play.formats), + NV(number, PLAY, FORMATS)); + } + if (dp->rec.pchans) { + dp->rec.min_rate = NV(number, REC, MIN_RATE); + dp->rec.max_rate = NV(number, REC, MAX_RATE); + dp->rec.min_chans = NV(number, REC, MIN_CHN); + dp->rec.max_chans = NV(number, REC, MAX_CHN); + fmt2str(dp->rec.formats, sizeof(dp->rec.formats), + NV(number, REC, FORMATS)); + } +#undef NV + + /* + * Skip further parsing if the provider is not sound(4), as the + * following code is sound(4)-specific. + */ + if (strcmp(nvlist_get_string(di[i], SNDST_DSPS_PROVIDER), + SNDST_DSPS_SOUND4_PROVIDER) != 0) + goto done; + + if (!nvlist_exists(di[i], SNDST_DSPS_PROVIDER_INFO)) + errx(1, "%s: provider_info list empty", dp->name); + +#define NV(type, item) \ + nvlist_get_ ## type (nvlist_get_nvlist(di[i], \ + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_ ## item) + strlcpy(dp->status, NV(string, STATUS), sizeof(dp->status)); + dp->unit = NV(number, UNIT); + dp->bitperfect = NV(bool, BITPERFECT); + dp->play.vchans = NV(bool, PVCHAN); + dp->play.rate = NV(number, PVCHANRATE); + fmt2str(dp->play.format, sizeof(dp->play.format), + NV(number, PVCHANFORMAT)); + dp->rec.vchans = NV(bool, RVCHAN); + dp->rec.rate = NV(number, RVCHANRATE); + fmt2str(dp->rec.format, sizeof(dp->rec.format), + NV(number, RVCHANFORMAT)); +#undef NV + + dp->autoconv = (dp->play.vchans || dp->rec.vchans) && !dp->bitperfect; + + if (!nvlist_exists(nvlist_get_nvlist(di[i], + SNDST_DSPS_PROVIDER_INFO), SNDST_DSPS_SOUND4_CHAN_INFO)) + errx(1, "%s: channel info list empty", dp->name); + + cdi = nvlist_get_nvlist_array( + nvlist_get_nvlist(di[i], SNDST_DSPS_PROVIDER_INFO), + SNDST_DSPS_SOUND4_CHAN_INFO, &nchans); + + TAILQ_INIT(&dp->chans); + caps = 0; + for (j = 0; j < nchans; j++) { +#define NV(type, item) \ + nvlist_get_ ## type (cdi[j], SNDST_DSPS_SOUND4_CHAN_ ## item) + if ((ch = calloc(1, sizeof(struct audio_chan))) == NULL) + err(1, "calloc"); + + strlcpy(ch->name, NV(string, NAME), sizeof(ch->name)); + strlcpy(ch->parentchan, NV(string, PARENTCHAN), + sizeof(ch->parentchan)); + ch->unit = NV(number, UNIT); + ch->direction = (NV(number, CAPS) & PCM_CAP_INPUT) ? + INPUT : OUTPUT; + cap2str(ch->caps, sizeof(ch->caps), NV(number, CAPS)); + ch->latency = NV(number, LATENCY); + ch->rate = NV(number, RATE); + fmt2str(ch->format, sizeof(ch->format), NV(number, FORMAT)); + ch->pid = NV(number, PID); + strlcpy(ch->proc, NV(string, COMM), sizeof(ch->proc)); + ch->interrupts = NV(number, INTR); + ch->xruns = NV(number, XRUNS); + ch->feedcount = NV(number, FEEDCNT); + ch->volume = NV(number, LEFTVOL) | + NV(number, RIGHTVOL) << 8; + fmt2str(ch->hwbuf.format, sizeof(ch->hwbuf.format), + NV(number, HWBUF_FORMAT)); + ch->hwbuf.rate = NV(number, HWBUF_RATE); + ch->hwbuf.size_bytes = NV(number, HWBUF_SIZE); + ch->hwbuf.size_frames = + bytes2frames(ch->hwbuf.size_bytes, NV(number, HWBUF_FORMAT)); + ch->hwbuf.blksz = NV(number, HWBUF_BLKSZ); + ch->hwbuf.blkcnt = NV(number, HWBUF_BLKCNT); + ch->hwbuf.free = NV(number, HWBUF_FREE); + ch->hwbuf.ready = NV(number, HWBUF_READY); + fmt2str(ch->swbuf.format, sizeof(ch->swbuf.format), + NV(number, SWBUF_FORMAT)); + ch->swbuf.rate = NV(number, SWBUF_RATE); + ch->swbuf.size_bytes = NV(number, SWBUF_SIZE); + ch->swbuf.size_frames = + bytes2frames(ch->swbuf.size_bytes, NV(number, SWBUF_FORMAT)); + ch->swbuf.blksz = NV(number, SWBUF_BLKSZ); + ch->swbuf.blkcnt = NV(number, SWBUF_BLKCNT); + ch->swbuf.free = NV(number, SWBUF_FREE); + ch->swbuf.ready = NV(number, SWBUF_READY); + strlcpy(ch->feederchain, NV(string, FEEDERCHAIN), + sizeof(ch->feederchain)); + ch->dev = dp; + + caps |= NV(number, CAPS); + TAILQ_INSERT_TAIL(&dp->chans, ch, next); + + if (!dp->rec.vchans && ch->direction == INPUT) { + strlcpy(dp->rec.format, ch->hwbuf.format, + sizeof(dp->rec.format)); + dp->rec.rate = ch->hwbuf.rate; + } else if (!dp->play.vchans && ch->direction == OUTPUT) { + strlcpy(dp->play.format, ch->hwbuf.format, + sizeof(dp->play.format)); + dp->play.rate = ch->hwbuf.rate; + } +#undef NV + } + cap2str(dp->caps, sizeof(dp->caps), caps); + +done: + free(arg.buf); + nvlist_destroy(nvl); + close(fd); + + return (dp); +} + +static void +free_dev(struct audio_dev *dp) +{ + struct audio_chan *ch; + + while (!TAILQ_EMPTY(&dp->chans)) { + ch = TAILQ_FIRST(&dp->chans); + TAILQ_REMOVE(&dp->chans, ch, next); + free(ch); + } + free(dp); +} + +static void +print_dev_ctl(struct audio_dev *dp, struct audio_ctl *ctl, bool simple, + bool showgrp) +{ + struct audio_ctl *cp; + size_t len; + + if (ctl->type != GRP) { + if (simple) + printf("%s=", ctl->name); + else + printf(" %-20s= ", ctl->name); + } + + switch (ctl->type) { + case STR: + printf("%s\n", (char *)dp + ctl->off); + break; + case NUM: + printf("%d\n", *(int *)((intptr_t)dp + ctl->off)); + break; + case VOL: + break; + case GRP: + if (!simple || !showgrp) + break; + for (cp = dev_ctls; cp->name != NULL; cp++) { + len = strlen(ctl->name); + if (strncmp(ctl->name, cp->name, len) == 0 && + cp->name[len] == '.' && cp->type != GRP) + print_dev_ctl(dp, cp, simple, showgrp); + } + break; + } +} + +static void +print_chan_ctl(struct audio_chan *ch, struct audio_ctl *ctl, bool simple, + bool showgrp) +{ + struct audio_ctl *cp; + size_t len; + int v; + + if (ctl->type != GRP) { + if (simple) + printf("%s.%s=", ch->name, ctl->name); + else + printf(" %-20s= ", ctl->name); + } + + switch (ctl->type) { + case STR: + printf("%s\n", (char *)ch + ctl->off); + break; + case NUM: + printf("%d\n", *(int *)((intptr_t)ch + ctl->off)); + break; + case VOL: + v = *(int *)((intptr_t)ch + ctl->off); + printf("%.2f:%.2f\n", + MIX_VOLNORM(v & 0x00ff), MIX_VOLNORM((v >> 8) & 0x00ff)); + break; + case GRP: + if (!simple || !showgrp) + break; + for (cp = chan_ctls; cp->name != NULL; cp++) { + len = strlen(ctl->name); + if (strncmp(ctl->name, cp->name, len) == 0 && + cp->name[len] == '.' && cp->type != GRP) + print_chan_ctl(ch, cp, simple, showgrp); + } + break; + } +} + +static void +print_dev(struct audio_dev *dp) +{ + struct audio_chan *ch; + struct audio_ctl *ctl; + + if (!oflag) { + printf("%s: <%s> %s", dp->name, dp->desc, dp->status); + + printf(" ("); + if (dp->play.pchans) + printf("play"); + if (dp->play.pchans && dp->rec.pchans) + printf("/"); + if (dp->rec.pchans) + printf("rec"); + printf(")\n"); + } + + for (ctl = dev_ctls; ctl->name != NULL; ctl++) + print_dev_ctl(dp, ctl, oflag, false); + + if (vflag) { + TAILQ_FOREACH(ch, &dp->chans, next) { + if (!oflag) + printf(" %s\n", ch->name); + for (ctl = chan_ctls; ctl->name != NULL; ctl++) + print_chan_ctl(ch, ctl, oflag, false); + } + } +} + +static int +sysctl_int(const char *buf, const char *arg, int *var) +{ + size_t size; + const char *val = arg; + int n, prev; + + n = strtol(val, NULL, 10); + if (errno == EINVAL || errno == ERANGE) { + warn("strtol(%s)", val); + return (-1); + } + + size = sizeof(int); + /* Read current value. */ + if (sysctlbyname(buf, &prev, &size, NULL, 0) < 0) { + warn("sysctlbyname(%s)", buf); + return (-1); + } + /* Apply new value. */ + if (sysctlbyname(buf, NULL, 0, &n, size) < 0) { + warn("sysctlbyname(%s, %d)", buf, n); + return (-1); + } + /* Read back applied value for good measure. */ + if (sysctlbyname(buf, &n, &size, NULL, 0) < 0) { + warn("sysctlbyname(%s)", buf); + return (-1); + } + + printf("%s: %d -> %d\n", buf, prev, n); + if (var != NULL) + *var = n; + + return (0); +} + +static int +sysctl_str(const char *buf, const char *arg, char *var, size_t varsz) +{ + size_t size; + const char *val = arg; + char prev[BUFSIZ]; + char *tmp; + + /* Read current value. */ + size = sizeof(prev); + if (sysctlbyname(buf, prev, &size, NULL, 0) < 0) { + warn("sysctlbyname(%s)", buf); + return (-1); + } + + size = strlen(val); + /* Apply new value. */ + if (sysctlbyname(buf, NULL, 0, val, size) < 0) { + warn("sysctlbyname(%s, %s)", buf, val); + return (-1); + } + /* Get size of new string. */ + if (sysctlbyname(buf, NULL, &size, NULL, 0) < 0) { + warn("sysctlbyname(%s)", buf); + return (-1); + } + if ((tmp = calloc(1, size)) == NULL) + err(1, "calloc"); + /* Read back applied value for good measure. */ + if (sysctlbyname(buf, tmp, &size, NULL, 0) < 0) { + warn("sysctlbyname(%s)", buf); + free(tmp); + return (-1); + } + + printf("%s: %s -> %s\n", buf, prev, tmp); + if (var != NULL) + strlcpy(var, tmp, varsz); *** 252 LINES SKIPPED *** From nobody Mon May 5 12:50: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 4ZrhFZ1bgRz5vSKB; Mon, 05 May 2025 12:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrhFZ03MPz3Z53; Mon, 05 May 2025 12:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746449410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TrPZJvpB5dgbFkGBVodQbEqNlZOKXJ5wrKKcdcV9KRk=; b=nI8r1v6hg0gwff/x8fpfs4nB66KP9Jztot3SZ06MCDLCfIqhSsSeS4papYUx/4C/+mPLc0 NtL5HhlkjjZ/npNb+B1u8KWkFiTJPW1cBikwtRFO8e961+CALDxVVlK0bIm9rd/RmaM/Ad xhT1JEgZnx+HTUj38SFWTdu0up1XSEHvqNdAwxeNVjrLBbKqGqZKsFY8r9aC748aGFWNzI 271bTwws4xtXEZ7E0G2Hip2W2qoehddct5eBl9EROfSy8KPn2e2OIPtSj06P4M449jLrJ3 sv2eRW8920R3+M6QezscymBe4tNtWQ/VlzbcKKoYvApqPyB4ZUlkVI6WaxKjGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746449410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TrPZJvpB5dgbFkGBVodQbEqNlZOKXJ5wrKKcdcV9KRk=; b=cjnRGmYw3Yh2tLJNTrZ2I5ge8zMIBOelgeDdZ5Vj2wIarYGgdhIc1TbYC4nrJdF5XFKvia 0NMHAgJWDj3uNIWKhZP14DKwRVP4oGLmUE2Oby0sKLIN+hdzcKz4A+OA5t2NwDDIA+bNp7 gdTW0tovGDkrGHs+P3aCLjRQfN4VIVCRPEKrXooTguvtPEVK+RVlZydM9gFYInYxSmiAYB AughEx19dy6zma5rqEIvLVfC4cXjFzQFi9TwwxrBlXrkxm05C2pQezmtgulHzhqsRI/00w oXY+b/O6hFvDp4ORMWki248HxXwAGEZU7Ss2nZEBjwL6/coC2FRJ0nMq8ulXXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746449410; a=rsa-sha256; cv=none; b=yGo+lMnZNQe54Wb6iEsybSBXw7pUr0VckZqyTYx9jQ2VW4yFPeNrY9rzqP77ZbqeTRLdVm YoUwX8+t++dW3iVFcHGSKznVZNO+4hX6T0xYg74uhF/SVanmSLJWyhOmjreLQoks4pLiu6 CwegF5QxLsH+o2/Xd2dknMRuveRGF1Ytw1y5Meqlrzt+TUKEAjrAQ+U7r45oQLV44CMuZV 8PaDHPK6pgXw3Tw/AglXJ1fviR7a/RKsSMQmdyP4fzSVsLl5Hr2z24AOyEKfdXijTQzA4a S9RJCKrduPIO6GE1tbYETL3b4LSm6W/kI1VATkp5PXxNtxGi+vZ8Sffohxxc+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrhFY6WMQz1CpM; Mon, 05 May 2025 12:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545Co9vd080736; Mon, 5 May 2025 12:50:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545Co9Si080731; Mon, 5 May 2025 12:50:09 GMT (envelope-from git) Date: Mon, 5 May 2025 12:50:09 GMT Message-Id: <202505051250.545Co9Si080731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a9425aeb1b8f - main - release: Always create METALOG for pkg installation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a9425aeb1b8fdc4888e89123edbe8c341c7ba489 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a9425aeb1b8fdc4888e89123edbe8c341c7ba489 commit a9425aeb1b8fdc4888e89123edbe8c341c7ba489 Author: Ed Maste AuthorDate: 2025-05-04 22:33:49 +0000 Commit: Ed Maste CommitDate: 2025-05-05 12:46:37 +0000 release: Always create METALOG for pkg installation We always use METALOG / non-root mode for bootonly.iso, even if not specifically requested by the user (via setting NO_ROOT ). Thus, add `-o METALOG=METALOG` to PKG_ARGS unconditionally so that the METALOG will be available when building bootonly.iso. This might result in a spurious METALOG temporarily appearing on some other release artifacts. This will be addressed once all release targets migrate to non-root mode (currently blocked on PR 283387). PR: 286528 Reviewed by: bz, cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50159 --- release/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile b/release/Makefile index 65a39d500f0b..38590e364401 100644 --- a/release/Makefile +++ b/release/Makefile @@ -74,9 +74,9 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} # For installing packages into the release media. .if defined(NO_ROOT) PKG_ENV+= INSTALL_AS_USER=yes -PKG_ARGS+= -o METALOG=METALOG .endif PKG_ENV+= ASSUME_ALWAYS_YES=yes +PKG_ARGS+= -o METALOG=METALOG PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install PKG_CLEAN= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} clean -a From nobody Mon May 5 14:48: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 4Zrksf1gphz5vbqy; Mon, 05 May 2025 14:48:06 +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 4Zrksd1bMgz3dV1; Mon, 05 May 2025 14:48:05 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; 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; dmarc=permerror reason="p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com" header.from=cschubert.com (policy=permerror) Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id Bvzqu3ySf9JM2Bx6yuNJTk; Mon, 05 May 2025 14:48:04 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id Bx6wutsFVQwcXBx6xuhLz4; Mon, 05 May 2025 14:48:04 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=DaW0qetW c=1 sm=1 tr=0 ts=6818cfa4 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=IP17e_1XAAAA:8 a=YxBL1-UpAAAA:8 a=DvCXEiIYZSf0Gy-XlbUA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=pIDkZDmBs-rV6VORH8mB:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 8373DD8; Mon, 05 May 2025 07:48:02 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 7CC0D304; Mon, 05 May 2025 07:48:02 -0700 (PDT) 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: Ed Maste cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: be61deae0aa2 - main - pkg: clarify argument parsing In-reply-to: <202504300101.53U112aW053506@gitrepo.freebsd.org> References: <202504300101.53U112aW053506@gitrepo.freebsd.org> Comments: In-reply-to Ed Maste message dated "Wed, 30 Apr 2025 01:01:02 +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: Mon, 05 May 2025 07:48:02 -0700 Message-Id: <20250505144802.7CC0D304@slippy.cwsent.com> X-CMAE-Envelope: MS4xfH+3noQE9Ja7LebOg/9bJ7SgTheaVAT2BERYKkbSp9SMcy/k5ZJPrjpgFgvCZOKGOkOYPZwx+nMPddYNvy39StJj4eFc6uXs4X87nfhq5yKjSDijofkJ 3GHgxGm7tq9dPEbPZoWxqveyALM/DyLOAakA1RzZXq9qov5RtGUi7+hxYNawVO0AT0dCm38+kAgZdgpM2/FxjX1xQl7sXAXHyUThtm83+/vhBxHWwd/bKU1G vCfdRjZcqu0fRhTffMtZW3Y/afOHnwFalIPHxoZqmq8QK0ROJhVNZKL+B6+RvOHBSj2aInSnx9QFLSrGe3CsOMHV2l3SbBiQA7gDq96vt4o= X-Rspamd-Queue-Id: 4Zrksd1bMgz3dV1 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.82 / 15.00]; NEURAL_SPAM_LONG(0.98)[0.983]; NEURAL_HAM_SHORT(-0.98)[-0.977]; NEURAL_HAM_MEDIUM(-0.93)[-0.927]; 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] In message <202504300101.53U112aW053506@gitrepo.freebsd.org>, Ed Maste writes: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=be61deae0aa2923bb9908fc5b37b3571 > 2603e622 > > commit be61deae0aa2923bb9908fc5b37b35712603e622 > Author: Isaac Freund > AuthorDate: 2025-04-23 10:27:35 +0000 > Commit: Ed Maste > CommitDate: 2025-04-30 01:00:17 +0000 > > pkg: clarify argument parsing > > Currently pkg parses all arguments and subcommands in a single > getopt_long() loop. This results in quite a bit of accidental > complexity, especially around the -r option for the bootstrap and add > subcommands. > > This also results in the undocumented behavior of all options understood > by pkg(7) being accepted anywhere in the argument list regardless of > their position. This contradicts the behavior of pkg(8) and I find it > quite unexpected. > > This patch splits the argument parsing done by pkg(7) into two phases > for global options and subcommand options. This gives behavior that > matches pkg(8), accepting the subset of pkg(8) options supported by > pkg(7) in the exact same positions that pkg(8) accepts them. > > This is however a somewhat breaking change, as options are no longer > accepted by pkg(7) in places they are rejected by pkg(8). For example, > `pkg -f bootstrap` no longer works, only `pkg bootstrap -f`. > > The original motivation for writing this patch was investigating support > for --rootdir in pkg(7). Since pkg(8) uses -r as the short form for > both --rootdir and --repository depending on the position, I decided > that pkg(7) needed to be brought inline with pkg(8)'s argument parsing > behavior to avoid confusion. > > This patch also gets rid of args_add_message (unused since 40b9f924b1) > > Relnotes: yes > Reviewed by: bapt > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D49977 > --- > usr.sbin/pkg/pkg.7 | 5 +- > usr.sbin/pkg/pkg.c | 174 ++++++++++++++++++++++++++------------------------- > -- > 2 files changed, 87 insertions(+), 92 deletions(-) > Hi Ed, This commit is causing option parsing errors. Please see the discussion about it on -current. I've reverted it locally. Problem fixed. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Mon May 5 14:59: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 4Zrl6Q2jX6z5vcWw; Mon, 05 May 2025 14:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrl6Q1Tjwz3kWZ; Mon, 05 May 2025 14:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746457150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQf7c5e+SIpRNLWOuqF+M5Qbh+mLqTZZN8/imE97oAI=; b=Njeg0hWaCui4zxtTY9wbERaUOMZ7InpeeTo8WwAXK+4u9byGe50jGXeL+TDrBSKw/w1MLA tYnHyDHivlamETHzn7Ji9BvSxGR+rJxbDQTY/RIMn3bZDc1fu8u44wB51J8YrvUrvqaKJe SmJ4E+AT3o4DQETRYvoGdwJfLtI8c+KN9EKo7h2DPHybrzEZHWG5o5S+j9BtkJCdE2TAhB YI7Xz+BsIdkTFUqhSc6mqz1AC0prs+bZ5eo4ctvx7fY6bbtsYprf3NXB9AYTtOJwxFABMf vyWshr3Que+b6+h1KuWUQ2QBe7dwsQc0posEd+SXUc4x3+tWuWAC9B2SjPa1GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746457150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQf7c5e+SIpRNLWOuqF+M5Qbh+mLqTZZN8/imE97oAI=; b=p4qA4B91PbDRIuEwr6z1QkyG3YJx+3JpgFiJupCQy1s7QaFFOByO7h17WI4+MfHGzRAyae DaFMXddhKgxba7AginbSRkbwr3unCdVn0W7PgNrIfXsgZ1dHb/tQZdNBWvVbZ+qOVgejyq S7ca0OX3svPhZJC754e0KQA815hLl70yHnOlHfWMfWQ7K3d9RBRhgOv+BX1LFZ1IxkSzBq hUzKEGGT78VvfLj8fxbf+pLN/anFhH8O4JBhgb4M984T017ynTGyH6zmp9fkuJCEI7RKvX i84QzOFZuXJ3tT7hkNP2p3BQgohLuEW9pYxWxL+A2fJFkbFVwkUh1BEdP71+YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746457150; a=rsa-sha256; cv=none; b=xMQdItX5G6RJ2Q/fFX+182UzVnztaxIZpmCp4AZguNgW8gd29iTmk7m66z9JNDIkKTt+dk ZOZUdSjgQ6bhA+HoU/ZpxkCebwNTJS0ANK0K4GrskmQahMteK7p5VfuTVO8eNTjT25RQFX IoOvWP1hk9i9VNrhQfo9trPbC7TuXXjyjUjQlZI+Su6sqGPYtvpNutCYubMz/SYW82HZjY rJ4BG2YfpCiej5OvSjrqZ2G8AC5s7ESZUubaILy7+EvoYaLzkPosOd9ODmP/PRaj9gDJbT aMkJ8UdZeo5zh+zfHzbzgux1+xLlA8Og+S9J+RnzuEJHON6mOaPQbqeNsNXqZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrl6Q12Qqz3Ys; Mon, 05 May 2025 14:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545ExASG021091; Mon, 5 May 2025 14:59:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545ExAeW021088; Mon, 5 May 2025 14:59:10 GMT (envelope-from git) Date: Mon, 5 May 2025 14:59:10 GMT Message-Id: <202505051459.545ExAeW021088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: aff56b4f0b25 - main - net80211: fix a race between ieee80211_sta_join and scan entries List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: aff56b4f0b25c44c9c2cae9a3f816c4277057a71 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=aff56b4f0b25c44c9c2cae9a3f816c4277057a71 commit aff56b4f0b25c44c9c2cae9a3f816c4277057a71 Author: Bjoern A. Zeeb AuthorDate: 2025-04-16 19:10:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-05 14:58:59 +0000 net80211: fix a race between ieee80211_sta_join and scan entries We were seeing panics during ieee80211_sta_join() which seemed that the ni->ni_chan was not valid anymore, which was true. We also saw errors indicating data put into ni_ies became inalid. The problem was that the ieee80211_scan_entry passed into ieee80211_sta_join() (in the observed case from setmlme_assoc_sta()) became invalid during ieee80211_alloc_node(). As a result for the ni_chan case the the rateset and len in rates[1] became invalid. Similarly for the IEs. Make a (deep)copy of the scan entry in setmlme_assoc_sta() and return the copy as once we leave ieee80211_scan_iterate() we can no longer rely on the scan entry to be valid. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reported by: rm, ziaee, bz Tested by: rm, ziaee, bz PR: 286063 Reviewed by: adrian (,emaste) Differential Revision: https://reviews.freebsd.org/D49865 --- sys/net80211/ieee80211_ioctl.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index caa0c77e2897..6c30325e5e32 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1530,7 +1530,8 @@ struct scanlookup { const uint8_t *mac; int esslen; const uint8_t *essid; - const struct ieee80211_scan_entry *se; + bool found; + struct ieee80211_scan_entry se; }; /* @@ -1540,6 +1541,10 @@ static void mlmelookup(void *arg, const struct ieee80211_scan_entry *se) { struct scanlookup *look = arg; + int rv; + + if (look->found) + return; if (!IEEE80211_ADDR_EQ(look->mac, se->se_macaddr)) return; @@ -1549,7 +1554,14 @@ mlmelookup(void *arg, const struct ieee80211_scan_entry *se) if (memcmp(look->essid, se->se_ssid+2, look->esslen)) return; } - look->se = se; + /* + * First copy everything and then ensure we get our own copy of se_ies. */ + look->se = *se; + look->se.se_ies.data = 0; + look->se.se_ies.len = 0; + rv = ieee80211_ies_init(&look->se.se_ies, se->se_ies.data, se->se_ies.len); + if (rv != 0) /* No error */ + look->found = true; } static int @@ -1558,21 +1570,25 @@ setmlme_assoc_sta(struct ieee80211vap *vap, const uint8_t ssid[IEEE80211_NWID_LEN]) { struct scanlookup lookup; + int rv; KASSERT(vap->iv_opmode == IEEE80211_M_STA, ("expected opmode STA not %s", ieee80211_opmode_name[vap->iv_opmode])); /* NB: this is racey if roaming is !manual */ - lookup.se = NULL; lookup.mac = mac; lookup.esslen = ssid_len; lookup.essid = ssid; + memset(&lookup.se, 0, sizeof(lookup.se)); + lookup.found = false; ieee80211_scan_iterate(vap, mlmelookup, &lookup); - if (lookup.se == NULL) + if (!lookup.found) return ENOENT; mlmedebug(vap, mac, IEEE80211_MLME_ASSOC, 0); - if (!ieee80211_sta_join(vap, lookup.se->se_chan, lookup.se)) + rv = ieee80211_sta_join(vap, lookup.se.se_chan, &lookup.se); + ieee80211_ies_cleanup(&lookup.se.se_ies); + if (rv == 0) return EIO; /* XXX unique but could be better */ return 0; } From nobody Mon May 5 15:39: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 4Zrm1D22pKz5vgFl; Mon, 05 May 2025 15:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrm1D1PBFz43DS; Mon, 05 May 2025 15:39:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFIyMtTIxTPIn1g2os2O/N1MOQV8wMRYEHhvZCozSEI=; b=DawccuZvTo4FzxwSuLux7T8H7DFEHyhv8GTWkYO4XmTMS1FLIJP58qABraPlgvPiCG1y7r P1WDczmP9okbdnf4EQ3/apQyt+tfq2QupyqG0/6luJB+17q/u8W1Lt2QmJZfLhK77DyDMC 2G5bLWBzQi7zNEHjxNF4C3/SMMf0KhoXfQRKJzheMQTJwF6bGRKLQhaiLh1ccJsn3ZuX6a cigQOyaBc16cR+/9b+yLIoI9AZMd7vy+zBHMBf+YsYHqBiPL8Ev0erw8ngnaVxAtVJdRqS QSxGp4Q4+PX8W8ZxZAaqmkQxAcLH5o0NL1X/gxk2iAiNwg+zdaTYTp4foJRizg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IFIyMtTIxTPIn1g2os2O/N1MOQV8wMRYEHhvZCozSEI=; b=hdmYgrkFcZdIxEUJAOXPqPjacPGi8hb52noAcBvOm3OYK8Dafojznu5Uc4PsVhG4vgsH7A GCT2MpX6+nVx2hjdD0pKie5BCXZiII5Rh0inh6qqBRiuulfAHdTyQCCH2SMWEOSC/3JlNT DiTg/dqUDEsMnVOqyuQ/f9xG66+u6bCQbh8DqQyzeJI81oG3Ak+xBe6xUnIpccDwJuH+ZX 4AEtN04pxj7y/I0iBmE09YUYeWEsjJm+4jyrQCV42vaywK/ItVqV+5Dl6PXqA5A1Gx5lcA uGNLL58KBpX2/hiifHNMuZM0pjMPCrHNyZTi1bHjx5UdTaadqsC9UZr+p5rGlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746459584; a=rsa-sha256; cv=none; b=vhLd5z76ebUq7bfnpLyVzEF8YFkuZL59ivpNdXvs0ZobSUA6MkaU7++3fajia5xbUlqqdW i8jP5a9qgRhMfUNC20zwDRP4fxcoBOJui54a7c1gwmQMZH2gQ8nl2L96O/uxgfHifYUbpl ck87bH7xbMg9ESZoXfIZS0B/wQHVAHPdQVk4egRgbHIyVsEQ5SBEZpu1ATGNt0A7emEIid CJtm29lTPTBoi/52S+N5FJovKxJ2GSdpD5RqsbTVEZ3nkEBKqFppt3TqhAQx0Rb4qQhUh1 sHKmpmTHvieLVCJyNgomzm88PSorN/e6fl9x6NhMly/bgQ9kTSesYtVRSc8xvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrm1D0rM4z4Kn; Mon, 05 May 2025 15:39:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545Fdijo097296; Mon, 5 May 2025 15:39:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545FdivF097293; Mon, 5 May 2025 15:39:44 GMT (envelope-from git) Date: Mon, 5 May 2025 15:39:44 GMT Message-Id: <202505051539.545FdivF097293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: f91d251b399a - main - rc.d: move some rc scripts to their packages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f91d251b399af2d468585668c6cf7938e80ab1b5 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f91d251b399af2d468585668c6cf7938e80ab1b5 commit f91d251b399af2d468585668c6cf7938e80ab1b5 Author: Lexi Winter AuthorDate: 2025-05-05 15:17:27 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 15:39:25 +0000 rc.d: move some rc scripts to their packages several rc.d scripts are installed by the FreeBSD-rc package, but they don't work without their respective packages installed. move these rc scripts into the appropriate packages so they're installed along with the services they start. this should be undisruptive to users since the scripts don't work without those packages installed anyway. (for this reason, do not move the Kerberos scripts, because the MIT Kerberos port uses the base rc.d scripts.) PR: 282324 Reviewed by: manu, des, bapt Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50137 --- libexec/rc/rc.d/Makefile | 159 ++++++++++++++++++++++++++++++----------------- 1 file changed, 103 insertions(+), 56 deletions(-) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 122c52be3da8..a51ad9161482 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -11,21 +11,16 @@ CONFS= DAEMON \ SERVERS \ adjkerntz \ bgfsck \ - ${_blacklistd} \ bridge \ cfumass \ cleanvar \ cleartmp \ - ctld \ ddb \ defaultroute \ devfs \ dmesg \ dumpon \ fsck \ - geli \ - geli2 \ - gptboot \ growfs \ growfs_fstab \ hostid \ @@ -44,7 +39,6 @@ CONFS= DAEMON \ linux \ local \ localpkg \ - lockd \ mixer \ motd \ mountcritlocal \ @@ -54,24 +48,13 @@ CONFS= DAEMON \ mdconfig2 \ mountd \ msgs \ - natd \ netif \ netoptions \ netwait \ - newsyslog \ - nfsclient \ - nfscbd \ - nfsd \ - nfsuserd \ - nisdomain \ ${_nscd} \ ${_opensm} \ os-release \ - pf \ - pflog \ - pfsync \ powerd \ - ppp \ pppoed \ pwcheck \ quota \ @@ -84,7 +67,6 @@ CONFS= DAEMON \ rpcbind \ rtadvd \ rtsold \ - rwho \ savecore \ securelevel \ serial \ @@ -96,11 +78,9 @@ CONFS= DAEMON \ swaplate \ sysctl \ sysctl_lastload \ - syslogd \ sysvipc \ tmp \ ugidfw \ - ${_utx} \ var \ var_run \ watchdogd @@ -117,6 +97,12 @@ CONFGROUPS+= DHCLIENT DHCLIENT= dhclient DHCLIENTPACKAGE= dhclient +CONFGROUPS+= GEOM +GEOM= geli \ + geli2 \ + gptboot +GEOMPACKAGE= geom + CONFGROUPS+= GGATED GGATED= ggated GGATEDPACKAGE= ggate @@ -129,20 +115,35 @@ CONFGROUPS+= CRON CRON+= cron CRONPACKAGE= cron -.if ${MK_NIS} != "no" -CONFS+= ypbind \ - ypldap \ - yppasswdd \ - ypserv \ - ypset \ - ypupdated \ - ypxfrd -.endif +CONFGROUPS+= NFS +NFS= nfsclient \ + nfsd \ + nfsuserd \ + nfscbd \ + lockd +NFSPACKAGE= nfs -.if ${MK_ACCT} != "no" +CONFGROUPS+= NEWSYSLOG +NEWSYSLOG= newsyslog +NEWSYSLOGPACKAGE= newsyslog + +CONFGROUPS+= SYSLOGD +SYSLOGD= syslogd +SYSLOGDPACKAGE= syslogd + +CONFGROUPS+= RCMDS +RCMDS= rwho +RCMDSPACKAGE= rcmds + +.if ${MK_ACCT} != "no" || ${MK_UTMPX} != "no" CONFGROUPS+= ACCT -ACCT+= accounting ACCTPACKAGE= acct +.if ${MK_ACCT} != "no" +ACCT+= accounting +.endif +.if ${MK_UTMPX} != "no" +ACCT+= utx +.endif .endif .if ${MK_ACPI} != "no" @@ -168,13 +169,17 @@ AUDITPACKAGE= audit .endif .if ${MK_AUTOFS} != "no" -CONFS+= automount -CONFS+= automountd -CONFS+= autounmountd +CONFGROUPS+= AUTOFS +AUTOFS= automount \ + automountd \ + autounmountd +AUTOFSPACKAGE= autofs .endif .if ${MK_BLACKLIST} != "no" -_blacklistd+= blacklistd +CONFGROUPS+= BLOCKLIST +BLOCKLIST= blacklistd +BLOCKLISTPACKAGE=blocklist .endif .if ${MK_BLUETOOTH} != "no" @@ -199,11 +204,15 @@ BSNMPPACKAGE= bsnmp .endif .if ${MK_CCD} != "no" -CONFS+= ccd +CONFGROUPS+= CCD +CCD= ccd +CCDPACKAGE= ccdconfig .endif .if ${MK_FTP} != "no" -CONFS+= ftpd +CONFGROUPS+= FTPD +FTPD= ftpd +FTPDPACKAGE= ftpd .endif .if ${MK_GSSAPI} != "no" @@ -219,28 +228,41 @@ HASTPACKAGE= hast .endif .if ${MK_INETD} != "no" -CONFS+= inetd +CONFGROUPS+= INETD +INETD= inetd +INETDPACKAGE= inetd .endif .if ${MK_IPFILTER} != "no" -CONFS+= ipfilter \ - ipfs \ - ipmon \ - ipnat \ - ippool +CONFGROUPS+= IPF +IPF= ipfilter \ + ipfs \ + ipmon \ + ipnat \ + ippool +IPFPACKAGE= ipf .endif .if ${MK_IPFW} != "no" -CONFS+= ipfw \ - dnctl +CONFGROUPS+= IPFW +IPFW= ipfw dnctl .if ${MK_NETGRAPH} != "no" -CONFS+= ipfw_netflow +IPFW+= ipfw_netflow .endif +IPFWPACKAGE= ipfw + +# natd is only built when ipfw is built +CONFGROUPS+= NATD +NATD+= natd +NATDPACKAGE= natd .endif .if ${MK_ISCSI} != "no" -CONFS+= iscsictl -CONFS+= iscsid +CONFGROUPS+= ISCSI +ISCSI= iscsictl \ + iscsid \ + ctld +ISCSIPACKAGE= iscsi .endif .if ${MK_JAIL} != "no" @@ -275,6 +297,19 @@ VAR_HEMIDAL= /var/heimdal VAR_HEMIDAL_MODE= 700 .endif +.if ${MK_NIS} != "no" +CONFGROUPS+= YP +YP= ypbind \ + ypldap \ + yppasswdd \ + ypserv \ + ypset \ + ypupdated \ + ypxfrd \ + nisdomain +YPPACKAGE= yp +.endif + .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif @@ -302,7 +337,18 @@ SSHPACKAGE= ssh .endif .if ${MK_PF} != "no" -CONFS+= ftp-proxy +CONFGROUPS+= PF +PF= pf \ + pflog \ + pfsync \ + ftp-proxy +PFPACKAGE= pf +.endif + +.if ${MK_PPP} != "no" +CONFGROUPS+= PPP +PPP= ppp +PPPPACKAGE= ppp .endif .if ${MK_ROUTED} != "no" @@ -327,10 +373,6 @@ UNBOUND+= local_unbound UNBOUNDPACKAGE= unbound .endif -.if ${MK_UTMPX} != "no" -_utx= utx -.endif - .if ${MK_VI} != "no" CONFGROUPS+= VI VI+= virecover @@ -338,8 +380,13 @@ VIPACKAGE= vi .endif .if ${MK_WIRELESS} != "no" -CONFS+= hostapd -CONFS+= wpa_supplicant +CONFGROUPS+= HOSTAPD +HOSTAPD= hostapd +HOSTAPDPACKAGE= hostapd + +CONFGROUPS+= WPA +WPA= wpa_supplicant +WPAPACKAGE= wpa .endif .if ${MK_ZFS} != "no" @@ -352,7 +399,7 @@ ZFS+= zpool ZFS+= zpoolreguid ZFS+= zpoolupgrade ZFS+= zvol -ZFSPACKAGE= rc +ZFSPACKAGE= zfs .endif .for fg in ${CONFGROUPS} From nobody Mon May 5 15:39: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 4Zrm1G53hfz5vgJ6; Mon, 05 May 2025 15:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrm1G0ZHVz43H9; Mon, 05 May 2025 15:39:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H20E0qz0YUQGw7hLcWHMZx21JXJ8Vo0YeQFckQ5hNQE=; b=DSXj822jmlQ11U4BcUub+usuf5g1TJKlJr/JWptGvPDfy9e0aKrjmtPKR5FCNjOpZGTfJT IyVa0wkg83MHtRu4IRR7DBgZPLRKnr52dmJxbGnrGVuO7xw2Q3d2AXRc0D1zx7BPQrjHFA WYWjnRZtFyxX2ba1A7uaaDSuwiVVzyT0jBIYqAjGZe8Ko+Vfx4iaL8IM3ylK+RqUJhcYeD r/h2FN1nAONPIwVJs1Sja6SEIes2ePVy2T5+zQ2x9eoNF4IZ7rT1EaLA+eTyoRKpVhyuJS 8z5WorwoSR1/RxScNLDhULjphxDz558TaNgR7g15k4A5EnnPRpRNiB6Gj2x0Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H20E0qz0YUQGw7hLcWHMZx21JXJ8Vo0YeQFckQ5hNQE=; b=v2lukTqGqFgiQ2N20V1p12bwVUT1Y7iew/q7amdRmS+XNeGvzGXK75YnOrCN2oScw1DNww lE6EfcV+FDjMLeVE1WtS1f8Uh4btZvqz+4MTzNo06TyaUcGp1ITbKSUeFgmxbdzB/qarDI G3rGSGGlh61UDD7fqjr3hu2cHgk16nM3nAZrNYlxBsH3q94brabtwcXenyEu5G4F8p3M1w otb86v8ckUblW6VaihD/IEJ6OftjTCQ1GCp1GLMUqnThkiPVGpSNkcjgtw5gN625tBfWsZ Y9l45hy24Sn+S4j3PudeAloJBOrMiq7RNk56HdRe+XCq2/zWE2QYc3y91UkJYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746459586; a=rsa-sha256; cv=none; b=uolTuUoLFsxJdRBrkV8i+GHPxEm+77ctrUFPih+wxbfsii585fqQYSIPXB28LI47Dih5BD Wcnm9ihA9X9pODlBE6/XQQTsI0Gw4mIZAPmZN7cwndaMyzPdt5c1fQ2ttsC7vn9L52T8DD 8YFNdbk3kVpUTfqlsyrkHybhUkzble1r4iwgOZzsviDbEasFkr12vt1vxyazbvULYC1mjW f4XlE7akulfsn0e7CJQDB6ibcqnV9grJFTGe20Sr0XbvcJCXovQaXVRcDWym4HdusefAD3 L58N76eDg88W2ef2mDHaHXgES70Xhdb0/Ezn6OtYujumeAbeF445s0DrH9OW6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrm1F1PLSz4cb; Mon, 05 May 2025 15:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545Fdjce097329; Mon, 5 May 2025 15:39:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545FdjVx097326; Mon, 5 May 2025 15:39:45 GMT (envelope-from git) Date: Mon, 5 May 2025 15:39:45 GMT Message-Id: <202505051539.545FdjVx097326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 47cf7c780a3e - main - move the SunOS r-commands into the rcmds package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47cf7c780a3ebdd4b2daf2060fbd1598d384e798 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=47cf7c780a3ebdd4b2daf2060fbd1598d384e798 commit 47cf7c780a3ebdd4b2daf2060fbd1598d384e798 Author: Lexi Winter AuthorDate: 2025-05-05 15:20:46 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 15:39:25 +0000 move the SunOS r-commands into the rcmds package rup, rusers and rwall implement the SunOS remote status utilities based on RPC. these are not widely used nowadays and most users won't have them enabled, so there's no reason to ship them in the utilities packages. move the command-line utilities and their respective daemons into the rcmds package, which already contains the related utilities rwho and ruptime. improve the comment/description of the rcmds package to be more informative and mention its new contents. while here, standardise formatting in the affected Makefiles. Reviewed by: manu, imp, des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50143 --- libexec/rpc.rstatd/Makefile | 7 ++++--- libexec/rpc.rusersd/Makefile | 7 ++++--- libexec/rpc.rwalld/Makefile | 7 ++++--- release/packages/Makefile.package | 8 ++++++-- release/packages/generate-ucl.sh | 4 ++++ usr.bin/rup/Makefile | 1 + usr.bin/rusers/Makefile | 3 ++- usr.bin/rwall/Makefile | 3 ++- 8 files changed, 27 insertions(+), 13 deletions(-) diff --git a/libexec/rpc.rstatd/Makefile b/libexec/rpc.rstatd/Makefile index 1be4bd27c2c0..5572748ddf26 100644 --- a/libexec/rpc.rstatd/Makefile +++ b/libexec/rpc.rstatd/Makefile @@ -1,6 +1,7 @@ -PROG = rpc.rstatd -SRCS = rstatd.c rstat_proc.c -MAN = rpc.rstatd.8 +PACKAGE= rcmds +PROG= rpc.rstatd +SRCS= rstatd.c rstat_proc.c +MAN= rpc.rstatd.8 LIBADD= rpcsvc devstat diff --git a/libexec/rpc.rusersd/Makefile b/libexec/rpc.rusersd/Makefile index 49d155c969b5..f59002e4b5fd 100644 --- a/libexec/rpc.rusersd/Makefile +++ b/libexec/rpc.rusersd/Makefile @@ -1,6 +1,7 @@ -PROG = rpc.rusersd -SRCS = rusersd.c rusers_proc.c extern.h -MAN = rpc.rusersd.8 +PACKAGE= rcmds +PROG= rpc.rusersd +SRCS= rusersd.c rusers_proc.c extern.h +MAN= rpc.rusersd.8 LIBADD= rpcsvc diff --git a/libexec/rpc.rwalld/Makefile b/libexec/rpc.rwalld/Makefile index 38a9646166d0..8d10a91fffd0 100644 --- a/libexec/rpc.rwalld/Makefile +++ b/libexec/rpc.rwalld/Makefile @@ -1,6 +1,7 @@ -PROG = rpc.rwalld -SRCS = rwalld.c -MAN = rpc.rwalld.8 +PACKAGE= rcmds +PROG= rpc.rwalld +SRCS= rwalld.c +MAN= rpc.rwalld.8 LIBADD= util diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index b8b200d0966e..4a1e1920b64e 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -136,8 +136,12 @@ periodic_COMMENT= Periodic Utility periodic_DESC= Periodic Utility rc_COMMENT= RC Scripts rc_DESC= RC Scripts -rcmds_COMMENT= Remote Command Utilities -rcmds_DESC= Remote Command Utilities +rcmds_COMMENT= BSD/SunOS remote status commands +rcmds_DESC=\ +The BSD/SunOS remote status commands, which can be used to query or interact\ +with remote hosts over the network. This includes the command-line utilities\ +rwho, ruptime, rup, rusers and rwall and the daemons rwhod, rpc.rstatd,\ +rpc.rusersd, and rpc.rwalld. rdma_COMMENT= RDMA Utilities rdma_DESC= RDMA Utilities rescue_COMMENT= Rescue Utilities diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index b7d6875b3eb1..b7d7bad35023 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -43,6 +43,10 @@ main() { periodic) pkgdeps="cron" ;; + rcmds) + # the RPC daemons require rpcbind + pkgdeps="utilities" + ;; # -dev packages that have no corresponding non-dev package # as a dependency. diff --git a/usr.bin/rup/Makefile b/usr.bin/rup/Makefile index 8cc5dc0f1af0..28558d052be4 100644 --- a/usr.bin/rup/Makefile +++ b/usr.bin/rup/Makefile @@ -1,3 +1,4 @@ +PACKAGE= rcmds PROG= rup LIBADD= rpcsvc diff --git a/usr.bin/rusers/Makefile b/usr.bin/rusers/Makefile index f3b3a8bd7db0..d3f3158d7be1 100644 --- a/usr.bin/rusers/Makefile +++ b/usr.bin/rusers/Makefile @@ -1,4 +1,5 @@ -PROG = rusers +PACKAGE= rcmds +PROG= rusers LIBADD= rpcsvc diff --git a/usr.bin/rwall/Makefile b/usr.bin/rwall/Makefile index 88459adb760f..b0902be9cec8 100644 --- a/usr.bin/rwall/Makefile +++ b/usr.bin/rwall/Makefile @@ -1,3 +1,4 @@ -PROG = rwall +PACKAGE= rcmds +PROG= rwall .include From nobody Mon May 5 15:39:46 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 4Zrm1H1FN4z5vg97; Mon, 05 May 2025 15:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrm1G4TB8z43QT; Mon, 05 May 2025 15:39:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOuEPp32TqeUG5inp+O8T4k8oejw7XdAB6ihlHvtaKo=; b=BYzSqW6dnsoVodPYOoYXXXiUFaSpJtmH3MQnmmev6ogtRZoshWZ0y6SQcYM3y4Y9uvC8OT UFatuq9I8Di4rhvrk4a4I1GJkHwsB8572PRmYHAs/IUrG3X37AtL04J+jYvB0XAGFRgGs1 HTpRaoSsuylIWlBoH+SD6A1gujvycanqUUg5VmlsXPY3ApGQLQ3SvbmpOCafxO9B7ab2+b EYSst6rl1p5V91ZmfkxCdJt0zQSZ8Mv6r57G88tvxMNpp9c2b74rkEn/kGXU6q0+zbIPlf RB+X/LWYRnvWAS7gCt2wMnjIOHD0sTdVTX0BZ8qakU/EXV8qWcQjJid5d3UCDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOuEPp32TqeUG5inp+O8T4k8oejw7XdAB6ihlHvtaKo=; b=yTwrVgFe3OENVUfflEpBba1bWEY1+vh8lXg5geTkWhC62DhZwYg7lcYkVnFGaRTQOFKm6x uFWc7+IME5EHJFsIBuA7Dm/rH2wuWZ98rK8AJqhnDB5/1nsiaXzVFgRN+tZ0VSyGBlD5gD vX7ESXEp5iGNH1BBr1rlEPpimXxPXzCvJZB/p3LGBz1uH7F4iykdOA2mLbf2Xf5wbZNhZm ydwHlsKyVxlUWitxm2OlWpbsI76nYFJwtMFD9L5pZKnr5EAFMP13sXqkRyNQ2aTy5dCGTV aO/xuy9sgfeM99lMosXqdJFXdiK4id6guKYw5Yb5mBKv0JhEK/ZKPT1bE6TdaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746459586; a=rsa-sha256; cv=none; b=OqZK7QS80tkXLlwJxO6xLwYhfC/DXoGeI09Q2l+EH5zE6NVkmzLfY2W19yPoIQV1OmPWhz uhKRt6WYeXRGvDlNPh5+3mkC1N6702ahQOBY/uFXo1nsKQAEnIBSKAfdWzyxN6JxGjvt+B D9LvLaLZuLbE5XHXF7QS43BRHMk0lHbemfkoXcbClO/UbHuePmCcftxvSeQqvotUZndARv P/7BbfF1/GUGUbZNW/u8UAjOBBpNtTSxmJb8vGJ3XPm90/btWQfrYtODgb2+gcIM6PLweT +jBG13cXVyFZKebp98oO0Ab+8AKhCucrDr0o8S5G72fqvZIbFJBT8fVUnmqv4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrm1G2KVVz4Nb; Mon, 05 May 2025 15:39:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545Fdkku097370; Mon, 5 May 2025 15:39:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545Fdkbf097367; Mon, 5 May 2025 15:39:46 GMT (envelope-from git) Date: Mon, 5 May 2025 15:39:46 GMT Message-Id: <202505051539.545Fdkbf097367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: b7ddf9fe9966 - main - tftp-proxy: move to the pf package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7ddf9fe9966a092999c7d94bd05aab957e726c6 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=b7ddf9fe9966a092999c7d94bd05aab957e726c6 commit b7ddf9fe9966a092999c7d94bd05aab957e726c6 Author: Lexi Winter AuthorDate: 2025-05-05 15:21:56 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 15:39:25 +0000 tftp-proxy: move to the pf package tftp-proxy is part of pf and isn't useful without it, so move it to the pf package (where its friend ftp-proxy already lives). Reviewed by: manu, kp, des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50145 --- libexec/tftp-proxy/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/tftp-proxy/Makefile b/libexec/tftp-proxy/Makefile index 9b28b2d8aa4b..98b3b3e6ab78 100644 --- a/libexec/tftp-proxy/Makefile +++ b/libexec/tftp-proxy/Makefile @@ -1,5 +1,6 @@ .PATH: ${SRCTOP}/contrib/pf/tftp-proxy +PACKAGE= pf PROG= tftp-proxy SRCS= tftp-proxy.c filter.c MAN= tftp-proxy.8 From nobody Mon May 5 15:39: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 4Zrm1J0Nlhz5vg5Z; Mon, 05 May 2025 15:39:48 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrm1H3bM8z43YS; Mon, 05 May 2025 15:39:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kc/0ato13oyhbSR3DriWsKq8hHfFbcn27HjMOVO7izg=; b=i7rzlvb0mP2LHSipqSqmfQBiWrKowGW6ApLsg9qGbsadKA/Z6xu4s9DXRmLnpSR4A+zjQ2 OxvBFdw5zh/bY1bkIUbPhgLqMaLsFzdneUCEbIIFVoSQaOaID3TiB/bbTINd0J3+Ib7h80 7jQrc/tBRsymL/vGE9MoAp61c7VXrftpnbBxMqy0vg4Oju1lmHlVswYrSlEePwA47Gpces x38j/z/f+OBz7N4AhF22jjkUV9c7Uwa0/Aw16MvAiPwV1JSL79DqXnRwcyrUyMX6xmkIHa ljaIa++E3LxnY+dp0WKbBNiLb3/qYFxEw4a++PQ4a0+wL4wcAMJh62qZuhRkuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kc/0ato13oyhbSR3DriWsKq8hHfFbcn27HjMOVO7izg=; b=P0Vv5Blm7/X8PKgHbHIGrI0CpW0Js9rmwXeGqEfzgp4ELswCHynIaZsDW8u4DNGwaf7ZvQ ivlRvSKFWYJwahecy6NoVGCjnaMNXDMdkZD4MUk9vrWVowd+IL3RiukDeV5INy0IPpO43W fhbpcLiO56n6YI+1Lki01IEqLSpGWKK5inx3DwuoXrBG5Jc1rtW77qB8bzD0eO1wJ2qVh8 UUvGKu+60NmMu99LzNvaHf7YEunnSehNqyyqyfCo7k8df+Y5Y91/pjQTPymypcateWnslI 3E8fPe74lBqzLezxmGVDIQa5LsBbsKaF8Sj1dXTQkkiNBmyd0tVoVdDe4lUZBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746459587; a=rsa-sha256; cv=none; b=thhzcWn52A3Q2hxR7uIxA47PWJVTgbSWTjn5fWy6JYeW5VYGHjscyBxOqU4yTtZWi90Ppb 11Kmr8yqCLoElAPF7FA+qlnRfJ5q5h2hDStmMxy5Vu9Jz8UH9xFAuCBlxRljgoOWPtaVjv v1kLsUp9v5NFKqbPlD4XAKHimqBlawj5yw74MBZHWSzSlcRwT7tn7WgOq+Gycxx6BmmLJV F589FCb2VpN2te6LUvyHDosi0FsvvJsIzEYJLJRfrevG3yqPqJ30SC+iR/jBErsDZn2swm CM9r4MF6LXJfYtrm+s6sopTAm2cDei5FUxs0/ROhshJcO3cOyZZ/poA+kzuFrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrm1H38mLz4Zp; Mon, 05 May 2025 15:39:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545Fdlwu097406; Mon, 5 May 2025 15:39:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545FdlFk097403; Mon, 5 May 2025 15:39:47 GMT (envelope-from git) Date: Mon, 5 May 2025 15:39:47 GMT Message-Id: <202505051539.545FdlFk097403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: e4cacb6623c4 - main - tests: move some files to the tests package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4cacb6623c457bba19e60d44a51aee7eae2e4d8 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=e4cacb6623c457bba19e60d44a51aee7eae2e4d8 commit e4cacb6623c457bba19e60d44a51aee7eae2e4d8 Author: Lexi Winter AuthorDate: 2025-05-05 15:22:51 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 15:39:25 +0000 tests: move some files to the tests package some test support libraries had escaped confinement and were found wandering around the utilities package: /usr/tests/lib/csu/dynamiclib/libh_csu.so /usr/tests/lib/libthr/dlopen/h_pthread_dlopen.so /usr/tests/lib/libthr/dlopen/h_pthread_dlopen.so.1 /usr/tests/sys/vm/stack/libsoxstack.so these aren't built using bsd.test.mk, so they don't get the default PACKAGE=tests option; set this by hand in their Makefiles to put them back where they belong. Reviewed by: manu, des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50147 --- lib/csu/tests/dso/Makefile | 2 ++ lib/libthr/tests/dlopen/dso/Makefile | 1 + tests/sys/vm/soxstack/Makefile | 1 + 3 files changed, 4 insertions(+) diff --git a/lib/csu/tests/dso/Makefile b/lib/csu/tests/dso/Makefile index 6c1d00e9fb58..431168de0328 100644 --- a/lib/csu/tests/dso/Makefile +++ b/lib/csu/tests/dso/Makefile @@ -1,4 +1,6 @@ .PATH: ${.CURDIR:H} + +PACKAGE= tests SHLIB= h_csu SHLIB_NAME= libh_csu.so SHLIB_MAJOR= 1 diff --git a/lib/libthr/tests/dlopen/dso/Makefile b/lib/libthr/tests/dlopen/dso/Makefile index 0dac101f7186..74d8ada35ff1 100644 --- a/lib/libthr/tests/dlopen/dso/Makefile +++ b/lib/libthr/tests/dlopen/dso/Makefile @@ -1,6 +1,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso WARNS?= 3 +PACKAGE= tests SHLIB= h_pthread_dlopen SHLIB_MAJOR= 1 SHLIB_NAME= h_pthread_dlopen.so.${SHLIB_MAJOR} diff --git a/tests/sys/vm/soxstack/Makefile b/tests/sys/vm/soxstack/Makefile index bd159c2fde75..f9f3bd55b50a 100644 --- a/tests/sys/vm/soxstack/Makefile +++ b/tests/sys/vm/soxstack/Makefile @@ -1,3 +1,4 @@ +PACKAGE= tests SHLIB= soxstack SHLIB_NAME= libsoxstack.so SHLIB_MAJOR= 1 From nobody Mon May 5 15:39: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 4Zrm1L1NZlz5vfnc; Mon, 05 May 2025 15:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrm1K5p5Dz43Hn; Mon, 05 May 2025 15:39:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a5Q7PVZW+D1mvFu/BKJFHgGREhDntyqDlHcYkI14Umk=; b=sYWyyhMSMy+E65IxqvDk+2a/qoNsj7AikOCihe4j8INERooYC8HxWeNmZrC9n0/cQNqHUj RyZHYHX6Nv0KtepVxDvBBMMGY2jDVMXhF1oUEDxzAOTqrxNh1ONs+PluOt1BtMY85yVdwU Fp/d2R6JNrp9X7+o7KwJ7tmSOglFxrezylEwJRDZBJcOkGjz2afavIMxt6LjBw1uNiNOUN wlDVPphTlj28Zq7PqOGjz2gMdArdRG8govHOjlWy0H5uRSPOX91kXS4VS7aoyFNbHBhkOY RvcddCGDhy0iYCIzdYR5sWINP7tVkowVGUVoaMUeeU396iIFs9AqowWGlUP9vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a5Q7PVZW+D1mvFu/BKJFHgGREhDntyqDlHcYkI14Umk=; b=ZC7v8Y0t2ap/ZaUyzY+mo9bE3H3e00RKhDqf+6KqBN+mLvsgx+o2fokUWlpay1SGsMjtRx y4xyle2P7HvjDAB9NKO9a8xSqnHOxjDBqbofv0k3pQ4TM0T9M55z5kESYCXYemOkmjpjLw Q7uux1dQiiCgLCOxD/dK52weA+R6U9zVdpJCH95foTqXevUPRTRiRnOmgrMa44C00rhTly HJDPSuJNK0U2O8A4KDRkkwc9nyGajutulAK8y3fYI24LTi+9SEF7Ul3ByK4UntA9S/wE2T /rB4yQzZ6/Sxn3am7bUO8eLUk1bDm6UNO8H8Zv1M2PiTD5ptViXQVqawHxDqjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746459589; a=rsa-sha256; cv=none; b=KpRwQRhjwrR439pqHC2wSmHWfEZhTIN9ByL8ZXOLKllz4YkvwNHtbgY2VpbN+RE7i4Qfrm lrhOi5oTeBAiyd7rgAAzIzKmI09PtBvpBeze/Z1Exbv1IBzh89X3ecEO9oSuAQ2V7xCtKA e5+6dxkk3XDMgOd/kSnfFI05LruqSBhDz524ulpBDzvrMjhJHne4ZMUBLxXfjFmxe4PvA8 7Fa1iivUwKq/j3tpiuzpI1gGM51VMXd0GIAObVpBLY/tx7AayKzSU4E3fuHE6h9jC1eGYg E/HZj8QHnFGM99V5imd0l9uHzSTFU3+eV1soMdd2CFfjXb80UdlGPhOL7S9LOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrm1K4g6kz4Kq; Mon, 05 May 2025 15:39:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545FdnL5097473; Mon, 5 May 2025 15:39:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545FdnFl097470; Mon, 5 May 2025 15:39:49 GMT (envelope-from git) Date: Mon, 5 May 2025 15:39:49 GMT Message-Id: <202505051539.545FdnFl097470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 89aa99816ef8 - main - rpc.statd: move to nfs package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89aa99816ef8564c4d650c45fe9091fd60a05bb1 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=89aa99816ef8564c4d650c45fe9091fd60a05bb1 commit 89aa99816ef8564c4d650c45fe9091fd60a05bb1 Author: Lexi Winter AuthorDate: 2025-05-05 15:24:55 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 15:39:25 +0000 rpc.statd: move to nfs package rpc.statd is not technically specific to NFS, but NFS is the only thing which has ever actually used it, so this is the most appropriate place to put it. Reviewed by: rmacklem, des, bapt, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50162 --- libexec/rc/rc.d/Makefile | 4 ++-- usr.sbin/rpc.statd/Makefile | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index a51ad9161482..52b48a53c196 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -70,7 +70,6 @@ CONFS= DAEMON \ savecore \ securelevel \ serial \ - statd \ static_arp \ static_ndp \ stf \ @@ -120,7 +119,8 @@ NFS= nfsclient \ nfsd \ nfsuserd \ nfscbd \ - lockd + lockd \ + statd NFSPACKAGE= nfs CONFGROUPS+= NEWSYSLOG diff --git a/usr.sbin/rpc.statd/Makefile b/usr.sbin/rpc.statd/Makefile index 044ad3602a2a..e958b2ab5aeb 100644 --- a/usr.sbin/rpc.statd/Makefile +++ b/usr.sbin/rpc.statd/Makefile @@ -1,3 +1,4 @@ +PACKAGE= nfs PROG= rpc.statd MAN= rpc.statd.8 SRCS= file.c sm_inter_svc.c sm_inter.h statd.c procs.c From nobody Mon May 5 15:39: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 4Zrm1K4bpWz5vgFp; Mon, 05 May 2025 15:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrm1J6Fwkz43FC; Mon, 05 May 2025 15:39:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eK9PftXLZRB+45kQGd+Utk8ksc8ip/IsmbvSJPSM6a8=; b=GQ4DowI3Y3TPNYAv5LV5luCQd14a0t6TEUX2DNrf7sQfYA1smh2L4OA09iA+ZU/AHRrBfM EX10UCZKDyb4w/PbNwOSBPQfieGVHCZjWJw6AL63rWpp7wqV2aMfa1Bkurq64+6WBJJvlk N3V6sbqCZsg9QJW91B1epOkuw+c/tXWO5jBHq5nq5w9CqV1bm7KFGrXKtH4386cWx3UMij 3AtTu1SYECu+uiUZU0/5bJysr7TMniEoJMIbcUDGX5t1NE5BcmTZl2m/08PPOFC6ma2vMn Qlo90QLEmdcRRPjufILwNFY+JCe4uD9LmiQxEOernHPakssyhV1mo80pSz6Aow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eK9PftXLZRB+45kQGd+Utk8ksc8ip/IsmbvSJPSM6a8=; b=Fmfk+Z5M/+WXKblh0vT9Bk4yvHqnw+bgnTWQQQ+b4m9T3bMKrAinWIri+JbDgA9TXgmbEb 5RnMZLs8e++Ccyv0xahpGHnM4mPb2SET5UsLmzEOuKQ1091jpVXf3x1AW2WarKvI8nVYiX oreWEE5Z5075nin3xFkvMBy8c8ZfYCDfv/c03unuww0nxggPg1CKRVH7+kQHpfQw/oXhd/ KMketrsSxV2MbXILpy3pm+cIHVswRYpunHMfxvqNsI1J6jWV7MmM2jxzcFUKKvzZzO6TLq HkzQWYx/aiOeDoqJK+ZoYBp+XieN5swJ7j/vjhOg/GzqMPRw2B8xruLtNFPjLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746459588; a=rsa-sha256; cv=none; b=LkPamHmOSwpwAU+iNW++7MNuU0aGp+ess3X4ZuEM3Q9uQWISiRQmaew4wgckoeNRqfEzYT bj5F2DVA1N8TM01PuxG9ZO5QsM6mh4Bi0sqKkuKOSspJ+DfjQ6OiZhi6jIEfArpIb5CHBW LuYFdzzwCoQ2DZ3BTUmth1v2QmJnbd/kJtKq9/sTAOrX/+HHh04TrZDZinJ2ixPZulTm76 GRd8IKkhrY+2G8jVKe4cfD3h16aRv2pTTU7zlqmMJKWFSL1hgJumRWnXl5i6F+4ftqyBOs 4polxU5MSxF2NiolT2I7btShccyJcRxwyBDOeFcKB6i0KGr/PL9gscrlx5x5ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrm1J4Fg5z4Kp; Mon, 05 May 2025 15:39:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545FdmZc097439; Mon, 5 May 2025 15:39:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545FdmxC097437; Mon, 5 May 2025 15:39:48 GMT (envelope-from git) Date: Mon, 5 May 2025 15:39:48 GMT Message-Id: <202505051539.545FdmxC097437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: f9513c334ff7 - main - add packages for libufs, libzfs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9513c334ff7d3ccdebfcb90f015890963768e0d Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f9513c334ff7d3ccdebfcb90f015890963768e0d commit f9513c334ff7d3ccdebfcb90f015890963768e0d Author: Lexi Winter AuthorDate: 2025-05-05 15:23:54 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 15:39:25 +0000 add packages for libufs, libzfs currently FreeBSD-utilities depends on both FreeBSD-ufs and FreeBSD-zfs. this is not desirable, because those are both relatively large packages and the user may want to remove one or the other – or perhaps both, e.g. in a jail or embedded system. the reason for this dependency is that fstyp(8), which is in FreeBSD-utilities, links both libufs and libzfs. FreeBSD-utilities is the correct place for fstyp, so we don't want to move that. instead, add two new packages: libufs contains libufs, and libzfs contains libzfs plus the ZFS libraries it depends on: libavl, libnvpair, libspl, libtpool, libumem, libuutil, libzfs_core and libzutil. with this change, it is possible to remove FreeBSD-ufs and/or FreeBSD-zfs while leaving FreeBSD-libufs, FreeBSD-libzfs and FreeBSD-utilities installed. Reviewed by: manu, des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50148 --- cddl/lib/libavl/Makefile | 2 +- cddl/lib/libnvpair/Makefile | 2 +- cddl/lib/libspl/Makefile | 2 +- cddl/lib/libtpool/Makefile | 2 +- cddl/lib/libumem/Makefile | 2 +- cddl/lib/libuutil/Makefile | 2 +- cddl/lib/libzfs/Makefile | 2 +- cddl/lib/libzfs_core/Makefile | 2 +- cddl/lib/libzutil/Makefile | 2 +- lib/libufs/Makefile | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile index c816f07df223..ce77012def9f 100644 --- a/cddl/lib/libavl/Makefile +++ b/cddl/lib/libavl/Makefile @@ -1,6 +1,6 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/module/avl -PACKAGE= zfs +PACKAGE= libzfs LIB= avl LIBADD= spl SRCS= avl.c diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile index 9ae081b7a96e..2d9ef1c7af1e 100644 --- a/cddl/lib/libnvpair/Makefile +++ b/cddl/lib/libnvpair/Makefile @@ -5,7 +5,7 @@ LIB= nvpair LIBADD= spl -PACKAGE= zfs +PACKAGE= libzfs # user INCS= libnvpair.h SRCS= libnvpair.c \ diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index efeba68e4f03..d44e5cb19ab4 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -6,7 +6,7 @@ LIB= spl LIBADD= -PACKAGE= zfs +PACKAGE= libzfs SRCS = \ assert.c \ diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile index 94b29c9ae72d..2afaf0c417e9 100644 --- a/cddl/lib/libtpool/Makefile +++ b/cddl/lib/libtpool/Makefile @@ -4,7 +4,7 @@ LIB= tpool LIBADD= spl -PACKAGE= zfs +PACKAGE= libzfs INCS= thread_pool_impl.h SRCS= thread_pool.c diff --git a/cddl/lib/libumem/Makefile b/cddl/lib/libumem/Makefile index f955e306c62c..9164ba771fe6 100644 --- a/cddl/lib/libumem/Makefile +++ b/cddl/lib/libumem/Makefile @@ -1,6 +1,6 @@ .PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem -PACKAGE= zfs +PACKAGE= libzfs LIB= umem SRCS= umem.c WARNS?= 3 diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile index 547078504103..8c8a786ee039 100644 --- a/cddl/lib/libuutil/Makefile +++ b/cddl/lib/libuutil/Makefile @@ -1,6 +1,6 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil -PACKAGE= zfs +PACKAGE= libzfs LIB= uutil SRCS=\ uu_alloc.c \ diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index bb0127a9108a..40553aa68719 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -7,7 +7,7 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib -PACKAGE= zfs +PACKAGE= libzfs LIB= zfs LIBADD= \ avl \ diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile index d986c45725b3..8ce0a152852f 100644 --- a/cddl/lib/libzfs_core/Makefile +++ b/cddl/lib/libzfs_core/Makefile @@ -6,7 +6,7 @@ LIB= zfs_core LIBADD= nvpair spl zutil -PACKAGE= zfs +PACKAGE= libzfs INCS= libzfs_core.h SRCS= libzfs_core.c \ diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile index d1a943b25005..07ca3b9bc156 100644 --- a/cddl/lib/libzutil/Makefile +++ b/cddl/lib/libzutil/Makefile @@ -4,7 +4,7 @@ LIB= zutil LIBADD= avl geom m tpool -PACKAGE= zfs +PACKAGE= libzfs INCS = zutil_import.h diff --git a/lib/libufs/Makefile b/lib/libufs/Makefile index 12c742e6b871..ab913f834bb3 100644 --- a/lib/libufs/Makefile +++ b/lib/libufs/Makefile @@ -1,4 +1,4 @@ -PACKAGE= ufs +PACKAGE= libufs LIB= ufs SHLIBDIR?= /lib SHLIB_MAJOR= 8 From nobody Mon May 5 15:41: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 4Zrm3J5Hj4z5vgLp; Mon, 05 May 2025 15:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrm3J4P7fz45pr; Mon, 05 May 2025 15:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rm/xlX9/cSh8UxcpA7Wtot1h39jKKz08ZniTXSPm1Hg=; b=vx2SGLCEfWomVJDDIznNPLZygYGxLql+7LBGqoPCwOwdBstjd7ljOiPH/A49Bfyi8GM/m8 NDAUgxHZgxzOMNN5fMhHp/rzpJdW2HLWShJkKwH0P36BoPEDxZ2cgaXexOyAcxS/dQCGmS IokAhFTxyzRwmEIk0NY/v4k5K2CYdouz9kIgRpNxQ6YYQ395ouCx4Y9aY/1xhx1X5cmdpj Iiy3tMr/DrLLO7viy5EJ1LDrEXDD/RGzI9uq+M0o8n/9DufJ5PvFTzQEbL+/URwZ6eIbPt +cmvJ0Kg7aJtsyDvB9RulVPeeVIOc0osV6FZPiP99OhMiqpmhpxj/5H7KIC5tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746459692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rm/xlX9/cSh8UxcpA7Wtot1h39jKKz08ZniTXSPm1Hg=; b=S1sRLxFWEX3LX3HlszIq1BB74gKiAb8qvbEiwZ7CkBsC0Zp9GPOJ6iswLT+/xkY7lA8J2O uEykbNv4bQ61T4sZhQQhOI3nMASZKq3sXnuDAxXM6Y9ea5I0QT0IRVIRVsZdJN9HcmL3bg FqqU8EkbN98UMRmLxbtDokaswvE7h8bq1p0uM4V3Oyc341mRTC0VsSI72YjsqkHyprCmFs v3x5muoPKmuWy91Kb2peAtAJYRgzvNUpFbMVQfFgFKUhyxUqARy2FuNdhaZHaNFLmU+DD3 rFJITcuw7zapOdmQEFrF/0rza2mqR5boGcN2uFL+pChuEI8Im9AyPWnd5ZtlFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746459692; a=rsa-sha256; cv=none; b=ffBa45tGhuq0TUjrgDHtKgwb0HDzTi3c89C5yZFvtQjpCiKcDQPj6SgxsLPUX8uBOHtrI9 HN9F/7OBL57VGzKxL2kv3xevqp4pOfuxwpgTo0yCo0l4RdMtygnE6hixx7lT2wXwv0lh88 vFOm7uGtiNfpCv5MLyVP86dXCi0+gq/meqazjNjHIGPg+fHSoVOQP6ewe711/VAsp5iewm qJGMICHKc+wQaBcSqiKEashXGA4QP75W+dX35oQRIAeWL6n8vXQanJfNvtcDAfKDwwynq+ jfzK2a4lR4H3B2AbZ6/v7BENZ6cqCAqtMSgA36AJAloEiL+xTSwMKvCv64ZP/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrm3J3XJBz4r0; Mon, 05 May 2025 15:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545FfW7e010293; Mon, 5 May 2025 15:41:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545FfWtC010290; Mon, 5 May 2025 15:41:32 GMT (envelope-from git) Date: Mon, 5 May 2025 15:41:32 GMT Message-Id: <202505051541.545FfWtC010290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f5fb3d441e15 - main - puc(4): Tighten expression of supported modules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5fb3d441e15aff0f6622c103d306ab186b96f08 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f5fb3d441e15aff0f6622c103d306ab186b96f08 commit f5fb3d441e15aff0f6622c103d306ab186b96f08 Author: Warner Losh AuthorDate: 2025-05-05 15:34:53 +0000 Commit: Warner Losh CommitDate: 2025-05-05 15:41:30 +0000 puc(4): Tighten expression of supported modules Since we have a huge number of supported device here, try to consolodate entries that make sense and do other formatting tweaks to reduce the raw number of lines needed to express the supported models. Also, the oxford semi blur the line between chip support and board support, so simplify that entry. Simplify the SIIG stuff somewhat (while the pucdata has per-chip entries, we don't need that here since we support virtually all SIIG cards). Place several entries on the same line where (I think) it makes sense. This could likely stand to be put into alphabetical order. Sponsored by: Netflix --- share/man/man4/puc.4 | 272 ++++++++++----------------------------------------- 1 file changed, 50 insertions(+), 222 deletions(-) diff --git a/share/man/man4/puc.4 b/share/man/man4/puc.4 index 00517c13751d..6fde07548e18 100644 --- a/share/man/man4/puc.4 +++ b/share/man/man4/puc.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 4, 2025 +.Dd May 5, 2025 .Dt PUC 4 .Os .Sh NAME @@ -77,27 +77,19 @@ Everest SP2 VScom: .Bl -dash -compact .It -PCI-800 -.It -PCI-400 -.It -PCI-200 +PCI-200, PCI-400, and PCI-800 .El .It Boca Research Turbo Serial: .Bl -dash -compact .It -658 -.It -654 +654 and 658 .El .It Dolphin Peripherals: .Bl -dash -compact .It -4035 -.It -4014 +4014 and 4035 .El .It Applied Micro Circuits 8 Port UART @@ -105,161 +97,66 @@ Applied Micro Circuits 8 Port UART Digi Neo: .Bl -dash -compact .It -PCI 4 Port -.It -PCI 8 Port -.It -PCIe 8 Port -.It -PCIe 4 Port -.It -PCIe 4 Port RJ45 +PCI 4 and 8 Port .It -PCIe 8 Port RJ45 +PCIe 4 and 8 Port (with and without RJ45) .El .It Comtrol RocketPort: .Bl -dash -compact +550/4 Normal and RJ45 .It -550/8 RJ11 part A -.It -550/8 RJ11 part B -.It -550/8 Octa part A -.It -550/8 Octa part B -.It -550/4 RJ45 -.It -550/Quad -.It -550/16 part A -.It -550/16 part B +550/8 Normal, RJ11 and Octa .It -550/8 part A -.It -550/8 part B +550/16 .El .It IBM SurePOS 300 Series (481033H) serial ports .It -SIIG Cyber I/O PCI (10x family and 20x family): -.Bl -dash -compact -.It -16C550 -.It -16C650 -.It -16C850 -.El -.It -SIIG Cyber Parallel Dual PCI (10x family and 20x family): -.It -SIIG Cyber Serial Dual PCI (10x family and 20x family): +SIIG Cyber Series of UART and parallel port boars: .Bl -dash -compact .It -16C550 +Cyber 2S and 2SP1 PCI 16550 .It -16C650 +Cyber 4 PCI 16550 .It -16C850 -.El +Cyber 4S PCI 16C650 (20x family) .It -SIIG Cyber 2S1P PCI (10x family and 20x family): -.Bl -dash -compact +Cyber I/O PCI (10x family and 20x family): .It -16C550 +Cyber Parallel Dual PCI (10x family and 20x family): .It -16C650 +Cyber Serial Dual PCI (10x family and 20x family): .It -16C850 -.El +Cyber 2S1P PCI (10x family and 20x family): .It -SIIG Cyber 4S PCI (10x family and 20x family): -.Bl -dash -compact -.It -16C550 +Cyber 4S PCI (10x family and 20x family): .It -16C650 +PS8000 8S PCI 16C650 (20x family) .It -16C850 +Quartet Serial 850 .El .It -SIIG PS8000 8S PCI 16C650 (20x family) -.It Brainboxes: .Bl -dash -compact .It PX-101 .It -PX-246 +PX-246, PX-257, PX-260, PX-279 .It -PX-257 +PX-310, PX-313, PX-320, PX-346, PX-368 .It -PX-260 +PX-420, PX-431, PX-475 .It -PX-279 -.It -PX-310 -.It -PX-313 -.It -PX-320 -.It -PX-346 -.It -PX-368 -.It -PX-420 -.It -PX-431 -.It -PX-475 -.It -PX-803 -.It -PX-820 -.It -PX-831 -.It -PX-846 -.It -PX-857 +PX-803, PX-820, PX-831, PX-846, PX-857 .It UC-101 .It -UC-203 -.It -UC-253 +UC-203, UC-253, UC-257, UC-260, UC-268, UC-279 .It -UC-257 +UC-302, UC-310, UC-313, UC-346, UC-357, UC-368 .It -UC-260 -.It -UC-268 -.It -UC-279 -.It -UC-302 -.It -UC-310 -.It -UC-313 -.It -UC-346 -.It -UC-357 -.It -UC-368 -.It -UC-414 -.It -UC-420 -.It -UC-431 -.It -UC-475 +UC-414, UC-420, UC-431, UC-475 .It UC-607 .It @@ -269,47 +166,37 @@ UP-189 .It UP-200 .It -UP-869 -.It -UP-880 +UP-869, UP-880 .El .It Intashield: .Bl -dash -compact .It -IS-200 -.It -IS-400 +IS-200, IS-400 .It -IX-100 -.It -IX-200 -.It -IX-400 +IX-100, IX-200, IX-400 .El .It Quatech: .Bl -dash -compact .It -QSC-100 -.It DSC-100 .It DSC-200/300 .It -QSC-200/300 +DSCLP-100 +.It +DSCLP-200/300 .It ESC-100D .It ESC-100M .It -QSCLP-100 -.It -DSCLP-100 +QSC-100 .It -DSCLP-200/300 +QSC-200/300 .It -ESCLP-100 +QSCLP-100 .El .It Moxa Technologies: @@ -377,53 +264,27 @@ Lava Computers: .It Dual Serial .It -Quatro A -.It -Quatro B -.It -Quattro-PCI A -.It -Quattro-PCI B +Quattro .It -Octo A +Quattro-PCI .It -Octo B +Octopus-550 .El .It -Sunix SUN1888 -.It I-O DATA RSA-PCI2/R .It -SIIG Cyber 4 PCI 16550 -.It -SIIG Cyber 4S PCI 16C650 (20x family) -.It -SIIG Quartet Serial 850 -.It Kuroutoshikou SERIAL4P-LPPCI2 .It -Oxford Semiconductor OX16PCI954 UARTs -.It -SIIG Cyber: -.Bl -dash -compact -.It -2S PCIe -.It -Serial Dual PCI 16C850 -.It -2SP1 PCIe -.El -.It -Oxford Semiconductor: +Oxford Semiconductor based boards: .Bl -dash -compact .It -OX16PCI954 UARTs +OX16PCI952 UART (with and without Parallel port) .It -OX9160/OX16PCI954 UARTs (function 1) +OX16PCI954 UART .It -OX16PCI952 UARTs +OX9160/OX16PCI954 UARTs .It -OX16PCI958 UARTs +OX16PCI958 UART .El .It Perle: @@ -438,32 +299,6 @@ Speed4 LE Speed8 LE .El .It -Oxford Semiconductor OXPCIe952: -.Bl -dash -compact -.It -1S1P -.It -UARTs -.It -UARTs (function 1) -.El -.It -Oxford Semiconductor OXPCIe954: -.Bl -dash -compact -.It -UARTs -.It -UARTs (function 1) -.El -.It -Oxford Semiconductor OXPCIe958: -.Bl -dash -compact -.It -UARTs -.It -UARTs (function 1) -.El -.It VScom: .Bl -dash -compact .It @@ -502,24 +337,18 @@ Avlab Low Profile PCI 4 Serial .It Syba Tech Ltd PCI-4S2P-550-ECP .It +Sunix SUN1888 +.It Sunix SER5xxxx .Bl -dash -compact .It -2-port serial -.It -4-port serial -.It -8-port serial +2, 4 and 8 port serial .El .It Sunix MIO5xxxx (1284 Printer port): .Bl -dash -compact .It -1-port serial -.It -2-port serial -.It -4-port serial +1, 2 and 4 port serial .El .It Feasso PCI FPP-02 2S1P @@ -541,9 +370,7 @@ NetMos NM9815 Dual 1284 Printer port NetMos NM9835: .Bl -dash -compact .It -based 1-port serial -.It -based 2-port serial +based 1 and 2 port serial .It Dual UART and 1284 Printer port .El @@ -600,3 +427,4 @@ This driver took the idea from the .Nx .Nm driver. +It uses a substantial amount of the same data. From nobody Mon May 5 15:52: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 4ZrmHv4V7hz5vh8G; Mon, 05 May 2025 15:52: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrmHr2Vlrz3DVX; Mon, 05 May 2025 15:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746460344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbHiP7LG7I5Y1bi8fEP0uWPPC9wbAAP0RLZAL2pmpz8=; b=UIdZi5S9K2SU2NhfAQkofqx3mLfMHS9HCFjgBpIGRKg8vSDgyoIQj+D5c3gVW4wKiEZ7b4 3LSh5w4RN/2L2B4vJ7dyZRLVJtZqPRexwVYHmlsg+wqD+rHHFnl3OsN6C7I8o+D5YddmzI F2H6H600NN5OYbSVBySAiCvKlDg3G3d1/QcVJZ2896lEtqc/ixvhLe1p1v+Sxol9xijWMX 2XGsvl6o4yoRZjd9juve52fsLvND9+YBcTEtKjpKfK7b/vyFeeXnT301cKJCibTrdzJu4N 64AG3ov1mG8UBfeeywTHzkZhvJaX1EsDNtWFvEUu1LV09N5+xh3QwYPHVZiPXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746460344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbHiP7LG7I5Y1bi8fEP0uWPPC9wbAAP0RLZAL2pmpz8=; b=aoOQskEWLel63Els4XB/LNu+xDdk1LLGtPFB1b4h/gaGf0nk4NUgkSPqLZhVvjnG99jbLM 8wD0ucS7hrRUzO9+UHGacGu5lrNnTaU2M/suoHDswfAiLSmpptkgI2V9eDe5vKwbPCS23X L6Gbb0PovifMrk64Ols8CrWtaF2+jAk9QupsQcx6NBj2cZ23428iKSawZ3AfV8ppWpRrRi 0u4OVazf/2KckRCHODsmya3y5Cf5pkKAYO/bGy7RomdWVbye8QmjHHmO4121IFDJGn5DkK 8ZO9zy1izBIX3ZRQGIM2nis/1OwYLQJ2ZGJhHWGtIP25SlqsGSiEt4C1R5sSdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746460344; a=rsa-sha256; cv=none; b=Kw617jjftg9GWOB0RXtgZcv+/bUmmZICjYfnuwCNGEJpiWGvOvnj2CLhzY5CLni3XsKms7 k1ZaS4gjQ3lSlfcitw5LOkpVDRmfo6Bq8IBTC/yPPgehMU7XCrlNhmoQKI0noas5nSUJKE 19muYxxIS0j1fg2eT1t8XaIBinlFhP2BofLKvOLZRi8R8UDT4hbBBzU2AD2mNhe3lBGcjn K25Z7KMvTysu5og4MwJfFUBDX+XgAPfCexnSewSba4VUBDghYEoUWn85ZEEnt1v8xw6VOc qNFh3EuVkiK6aXixNYSn23hZlPppp+0XoGPRzNUt8p7J4NqTcWtHw83dDk5bOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrmHr1kDNz5S9; Mon, 05 May 2025 15:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545FqO9L032601; Mon, 5 May 2025 15:52:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545FqOXU032598; Mon, 5 May 2025 15:52:24 GMT (envelope-from git) Date: Mon, 5 May 2025 15:52:24 GMT Message-Id: <202505051552.545FqOXU032598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 73ba568b1c35 - main - pkg: suppress error on unknown options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 73ba568b1c35aabc1682540b5b4d5d77220c5468 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=73ba568b1c35aabc1682540b5b4d5d77220c5468 commit 73ba568b1c35aabc1682540b5b4d5d77220c5468 Author: Isaac Freund AuthorDate: 2025-05-05 08:03:08 +0000 Commit: Ed Maste CommitDate: 2025-05-05 15:52:08 +0000 pkg: suppress error on unknown options pkg(7) does not understand all the options that pkg(8) understands and should never log errors about unknown options that it will pass on to pkg(8) without touching. PR: 286510 Reviewed by: bapt Fixes: be61deae0aa2 ("pkg: clarify argument parsing") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50163 --- usr.sbin/pkg/pkg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index b62eecfc6dce..7899fbaeaf09 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -1164,7 +1164,7 @@ main(int argc, char *argv[]) { "yes", no_argument, NULL, 'y' }, { NULL, 0, NULL, 0 }, }; - while ((ch = getopt_long(argc, argv, "+y", + while ((ch = getopt_long(argc, argv, "+:y", sub_longopts, NULL)) != -1) { switch (ch) { case 'y': From nobody Mon May 5 16:05: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 4ZrmZr5mwqz5vhPm; Mon, 05 May 2025 16:05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrmZr4ynSz3JfV; Mon, 05 May 2025 16:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746461124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5LYayChq/QmDj+0x14+jZar669lcvsh3O2lrIX/4sWs=; b=hNe8FkREVNLHKUCb6F1lFA5HLRw2sAPraD00Zsr3bVZNcht7Y0y6cZVefsumwG3TicgtbH BF/ioTEp6H3YRnYz/ufScxboZ3YVIVFO3qEV3cN+xwInis0qFSPoU4J4VwxWNfZZFWUG5C QmPGMw5gGlgSdVOpUwV+xJ3Tlrx3/nT/g0RbLbh9aueh95rabxHBVWjYKlZLb06tzss8m4 MQF9aHGbDywsOkSoqu8qDQdryDrLSzsxP4n0nyyiFRIkMtAL9cTybtm4eaEdkya+wWrB8x rWOmbT0BzLoaoluNEfXAvhGoO9PU7cVehzGkXhURsM3znJfgVxzJg/YGglOoJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746461124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5LYayChq/QmDj+0x14+jZar669lcvsh3O2lrIX/4sWs=; b=kZklskEY+7T25KvCrpW2sDaMf6VGagzVjPAVBeAQYB/WfQeQck44ksSut86BQmddlb3wqe AG6QolQ+BXziKxPOF42t4lNSS96GEc4qIE2TZ1erWNgCqhLnzCd4mfwqb/1BXDL7EFK83m g9i30GaVPUW1cLsgykX8C06t4mwBWT8Wmnt/m4cL32aPeb4DMZ7v+CfHeCoHRCxhfqzCQM 3wTXdqHf/Fg0iicpuJVroDNFwwxoTr5lHnbU4pAC6kO9BlAnmOGL2JqnFh5E8jLf3plH8C xrm9jOgjf4ALy37Lq/Mmb088qGl7pRzKkAOQiMzJwg/MCgSzThmoP6nRaODGFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746461124; a=rsa-sha256; cv=none; b=tSiDoJL+EcCHozF7l6mZjqg7pTJQBriRZNsiXMYjS2+70WmXZye0E2uOqwuusYb8Wzcf5E XWrU+Es/RfpwfvS98YobrKtjvmZqHm+yNG6/YW9q4QX1lO4ErvFVxbRx3N0KcpJBR2eMcT CuGAzVEcJp4H1ugzoUYk5MlSUUf49VL27bOwBeoBo6gSN2VIMcfeI7ZrkeZNvoNLNH0Rg0 DLibpa91PXioJGms0ZP9FOAZWJld7g7uwRVCbiWlIQI0iPT6NZ6mpf/oo63mKNiVBipTNJ bkitUOGRzB3hXE5zjlxn+yYWZ1tdeqzECpW0qX+yUQT/Y+yAGkUVI/Uedc8l9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrmZr4WwRz5QV; Mon, 05 May 2025 16:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545G5OeK053090; Mon, 5 May 2025 16:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545G5OXB053087; Mon, 5 May 2025 16:05:24 GMT (envelope-from git) Date: Mon, 5 May 2025 16:05:24 GMT Message-Id: <202505051605.545G5OXB053087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5ab906195b35 - main - include/paths.h: add _PATH_NOSHUTDOWN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 5ab906195b35609c60e05080f7b82cf64437306e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5ab906195b35609c60e05080f7b82cf64437306e commit 5ab906195b35609c60e05080f7b82cf64437306e Author: Konstantin Belousov AuthorDate: 2025-05-04 13:38:53 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-05 16:04:22 +0000 include/paths.h: add _PATH_NOSHUTDOWN Reviewed by: bapt, kevans, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50166 --- include/paths.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/paths.h b/include/paths.h index f8861ea4e5a8..26924bcdba91 100644 --- a/include/paths.h +++ b/include/paths.h @@ -81,6 +81,7 @@ #define _PATH_MOUNT "/sbin/mount" #define _PATH_NEWFS "/sbin/newfs" #define _PATH_NOLOGIN "/var/run/nologin" +#define _PATH_NOSHUTDOWN "/var/run/noshutdown" #define _PATH_RCP "/bin/rcp" #define _PATH_REBOOT "/sbin/reboot" #define _PATH_RLOGIN "/usr/bin/rlogin" From nobody Mon May 5 16:05: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 4ZrmZs69C6z5vhS1; Mon, 05 May 2025 16:05:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrmZs5g9nz3Jpn; Mon, 05 May 2025 16:05:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746461125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LttUG2sPGnI69RG8sy9+J3p8DGoYrCqpJB/X+rTOUy4=; b=NmBNxaIrNujBIxJRIHyE0H7qTZCq4YA2mzUTvlfhBl9OOBKGb9iY9Fe5TnbArAAhe11gem xg0uxsWGogdYZxzR+KX8fLLGFsKzDd4QD6QbzrMQzRCI77LABGLqTwSc/RANHN00SR116T 78jzFmDgE/25tcaSpp5A2ReNdupS6e27kurjh6lWXURW+woM0agHMObrCxGDqL8QSSiMxc iHrSyQotWVkq7BZqH9XWvad1vZflFnRONsgJESfq7R6ytsr6qCGw/vHDP6ClvgZnOXR0W3 fN/RgwFefZwxl/IF8Cxz4FOBYLf04D1SXDVDmwPcSyEP0tbNmkKvITkWjGKV/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746461125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LttUG2sPGnI69RG8sy9+J3p8DGoYrCqpJB/X+rTOUy4=; b=uzgoZLsbCTyeC4P2sRGi7uLFdpxEKVBA7fU7CQ/m9slSeuUMxxDwJDq/npyhdrEWBZwyx2 RJDHEuE5/J8XbktH5gemEzKpAZU1reH7cFmbAaIuZyVxXBuLZ6OJR2Am1u4zmAsaDE5rHA bioP7Bo4UiuSVXd00JjaURF/u1Wkcm0G+wR4OFktd16GB1vcpms9aOk23IpTtW2aQ6srx5 FZmD3Ad7zZAW9JzGz/BMcZ/72dO5x9kPj1kNRV1WEFAQO2E7wnxPClgTWNiu8p5RtJaSHR s1oMYuVzCzfAWQNbLxgGQig0OPAZL5EM9iKqFO+hNL2cSDD6H6BGRVhr7DNZQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746461125; a=rsa-sha256; cv=none; b=t4SSdyKfM8GgmCUCqbpzo23oqWmczo4SOyAV6T9FCNcRD+VD8vAduZ9SeOLSuQeIXq74EP 4YC19utBjTn++bfebITH1AjOINrCuR3UQRhP4q2i2WCHpnPNpwQdoyNCe4H7ejJQNkktpR xwm31Ju0nQb3uwhDWVjmA2UbtotLK+Uz+0OdRMUv4qpXhaxbdKLSWrHZoubcKATJbrhLlK vCpRCVNNfsba32dExcSjOtYaEP7tHHxvMOkxdyHlFteFFbkSv8ULzEDlTsBq/M5wDFJAdK D7NYJAHfs8XQ952usYxf3TF9CnZ/vUWK9TIix3CpMFEUYkNr3AzMx8tvg+GKiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrmZs5D6Xz5Y5; Mon, 05 May 2025 16:05:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545G5P4g053123; Mon, 5 May 2025 16:05:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545G5PHt053120; Mon, 5 May 2025 16:05:25 GMT (envelope-from git) Date: Mon, 5 May 2025 16:05:25 GMT Message-Id: <202505051605.545G5PHt053120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7fb88c20eccc - main - shutdown(8): refuse to run if /var/run/noshutdown is present List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 7fb88c20eccc3fd2118fda2ba58d7afe2b87f7e3 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7fb88c20eccc3fd2118fda2ba58d7afe2b87f7e3 commit 7fb88c20eccc3fd2118fda2ba58d7afe2b87f7e3 Author: Konstantin Belousov AuthorDate: 2025-05-04 13:39:32 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-05 16:04:22 +0000 shutdown(8): refuse to run if /var/run/noshutdown is present Reviewed by: bapt, kevans, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50166 --- sbin/shutdown/shutdown.8 | 23 +++++++++++++++++++++-- sbin/shutdown/shutdown.c | 18 +++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/sbin/shutdown/shutdown.8 b/sbin/shutdown/shutdown.8 index ab90af6244e9..ed44ac36aef6 100644 --- a/sbin/shutdown/shutdown.8 +++ b/sbin/shutdown/shutdown.8 @@ -36,7 +36,7 @@ .Nm .Op Fl .Oo -.Fl c | Fl h | Fl p | +.Fl c | Fl f | Fl h | Fl p | .Fl r | Fl k .Oc .Oo @@ -71,6 +71,12 @@ At the present time, only systems with BMC supported by the driver that implement this functionality support this flag. The amount of time the system is off is dependent on the device that implements this feature. +.It Fl f +The +.Nm +command ignores the presence of the +.Pa /var/run/noshutdown +file. .It Fl h The system is halted at the specified .Ar time . @@ -206,6 +212,12 @@ file that .Nm created will be removed automatically. .Pp +If the +.Pa /var/run/noshutdown +file is present, +.Nm +exits without executing any action on the system. +.Pp When run without options, the .Nm utility will place the system into single user mode at the @@ -219,11 +231,18 @@ is equivalent to running: shutdown -p now .Ed .Sh FILES -.Bl -tag -width /var/run/nologin -compact +.Bl -tag -width /var/run/noshutdown -compact .It Pa /var/run/nologin tells .Xr login 1 not to let anyone log in +.It Pa /var/run/noshutdown +prevents +.Nm +from initiating an action on the system. +Can be overridden with the +.Fl f +option. .El .Sh EXAMPLES Reboot the system in 30 minutes and display a warning message on the terminals diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index e92d41220a20..762b23ab6bd9 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -79,7 +80,8 @@ static struct interval { #undef S static time_t offset, shuttime; -static int docycle, dohalt, dopower, doreboot, killflg, mbuflen, oflag; +static int docycle, dohalt, dopower, doreboot, ign_noshutdown, + killflg, mbuflen, oflag; static char mbuf[BUFSIZ]; static const char *nosync, *whom; @@ -100,6 +102,7 @@ main(int argc, char **argv) { char *p, *endp; struct passwd *pw; + struct stat st; int arglen, ch, len, readstdin; bool dowarn; @@ -133,7 +136,7 @@ main(int argc, char **argv) goto poweroff; } - while ((ch = getopt(argc, argv, "-chknopqr")) != -1) + while ((ch = getopt(argc, argv, "-cfhknopqr")) != -1) switch (ch) { case '-': readstdin = 1; @@ -141,6 +144,9 @@ main(int argc, char **argv) case 'c': docycle = 1; break; + case 'f': + ign_noshutdown = 1; + break; case 'h': dohalt = 1; break; @@ -216,6 +222,12 @@ poweroff: } mbuflen = strlen(mbuf); + if (!ign_noshutdown && stat(_PATH_NOSHUTDOWN, &st) == 0) { + (void)printf("Shutdown cannot be done, " _PATH_NOSHUTDOWN + " is present\n"); + exit(2); + } + if (offset) { BOOTTRACE("Shutdown at %s", ctime(&shuttime)); (void)printf("Shutdown at %.24s.\n", ctime(&shuttime)); @@ -593,7 +605,7 @@ usage(const char *cp) if (cp != NULL) warnx("%s", cp); (void)fprintf(stderr, - "usage: shutdown [-] [-c | -h | -p | -r | -k] [-o [-n]] [-q] time [warning-message ...]\n" + "usage: shutdown [-] [-c | -f | -h | -p | -r | -k] [-o [-n]] [-q] time [warning-message ...]\n" " poweroff\n"); exit(1); } From nobody Mon May 5 16:05: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 4ZrmZv0ytJz5vh4t; Mon, 05 May 2025 16:05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrmZt6YN5z3K1Q; Mon, 05 May 2025 16:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746461126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJHMFL8hE0fEUGriiQDlr6dCwBPo/87q6W22Ipodt/4=; b=pI6pECTXG2cw/l2b/SiuU2w6JGq6q8ROTcy5FmXLiT/KH1jZKMYjEW2N/y3GT2rRWeXY5d H8xGcg5DlLNiC2udUpBlwXvzwLN6B42Ylj0Qt9ZB6wHhqD1Gp/smApnu2e6LnQddpiXSgq ai5qwbhoEegsG3MUwrKpRZiQ3ZP//CVptHFfOZwma7QY/qy/2WG7ZVvGjoLf/GmOJbhJh1 1uq81+HPlzs5LhCddLLE2bjidw4n4M8cWUtvV1840v4aoq/W5IEBbsjHoQxjHczuMEFTLm 60t4pKhYlAXvRV9x/EOGdhhK1M4qUynD/rv0cVPuTni+B95SbsGT7ST/mo841w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746461126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJHMFL8hE0fEUGriiQDlr6dCwBPo/87q6W22Ipodt/4=; b=xQ+EQe1l7Jzpc5doger5D23pALm3E549gTDx+v4RGwsssk6AVHNn1kSYUXix3lflYEP0gi iij0sReuVTPiuNQZnJOK1cKjvS0b1dwE2I3W2YKenankTmFhod3VoOvW/Q0hiIm092MV3+ sq2ck/dvzl5M2eRN90z/lm6mribIc0RqDy9t/I1kw1ABNLBQaMUwleHdi0bwlJpSOx0OK6 YRZkA5T7cGeEuXwfqjJd18jWU9GQX2xRo7Ep/cNn/Hj3uv5Vj8Z5vq6UHGtr1OF6tTPylK eRROcPTsdBMtzLajk3Ym7LOCI5Oj56Kl8y5QZKhLLjOqsIL1j0vmIXx9sSj7vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746461126; a=rsa-sha256; cv=none; b=gTUeagim4r9Upc7cHnbMJ4Qhz77AxlK74qi/GpyOUZS+BHmV9DxByfyAzx5ZN9pqFQMi2p OjSViKN977oGzCCUwO1ds/xxIWACUU1ghesqcpKHtIg6pAnSPz0gBoRhs2VtXk45UJer9P MPK04TJq/2V8fAmZIbZIyDxdcIrnyyp07oO0Ln6oALTj9/xf7WpUMYUi1zoofmUiWaPL3+ kIWHS/VqtRWiMqwJnH13S2VQMiyz2PdxtVc8Y8Og82FDaEM5BqzXeTX5xIGEQCCOZcfQm4 +197a2w08cIjMiedaLR2n6HNVJvA+SwlM7cXcDckdrduJSKnWovLgiaJo3qVvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrmZt692Hz4tW; Mon, 05 May 2025 16:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545G5QhP053156; Mon, 5 May 2025 16:05:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545G5QaO053153; Mon, 5 May 2025 16:05:26 GMT (envelope-from git) Date: Mon, 5 May 2025 16:05:26 GMT Message-Id: <202505051605.545G5QaO053153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 384d976725a5 - main - rc.d: Add precious_machine rc.conf knob to create /var/run/noshutdown List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 384d976725a5c29734a9227fcdb6ef0807485c91 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=384d976725a5c29734a9227fcdb6ef0807485c91 commit 384d976725a5c29734a9227fcdb6ef0807485c91 Author: Konstantin Belousov AuthorDate: 2025-05-04 13:51:26 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-05 16:05:03 +0000 rc.d: Add precious_machine rc.conf knob to create /var/run/noshutdown Reviewed by: bapt, kevans, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50166 --- libexec/rc/rc.conf | 2 ++ libexec/rc/rc.d/Makefile | 1 + libexec/rc/rc.d/noshutdown | 31 +++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 9540cca6c2f1..cfb4fa09b1c1 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -29,6 +29,8 @@ rc_info="NO" # Enables display of informational messages at boot. rc_startmsgs="YES" # Show "Starting foo:" messages at boot rcshutdown_timeout="90" # Seconds to wait before terminating rc.shutdown +precious_machine="NO" # Set to YES to get some guards against mis-directed + # shutdown(8) commands early_late_divider="FILESYSTEMS" # Script that separates early/late # stages of the boot process. Make sure you know # the ramifications if you change this. diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 52b48a53c196..89eeea8f587a 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -51,6 +51,7 @@ CONFS= DAEMON \ netif \ netoptions \ netwait \ + noshutdown \ ${_nscd} \ ${_opensm} \ os-release \ diff --git a/libexec/rc/rc.d/noshutdown b/libexec/rc/rc.d/noshutdown new file mode 100755 index 000000000000..54924310a6c7 --- /dev/null +++ b/libexec/rc/rc.d/noshutdown @@ -0,0 +1,31 @@ +#!/bin/sh +# +# + +# PROVIDE: noshutdown +# REQUIRE: var +# BEFORE: LOGIN + +. /etc/rc.subr + +name="noshutdown" +desc="Disable shutdown(8) for precious machines" +rcvar="precious_machine" +start_cmd="noshutdown_start" +stop_cmd="noshutdown_stop" + +: ${noshutdown_file:="/var/run/noshutdown"} + +noshutdown_start() +{ + touch $noshutdown_file +} + +noshutdown_stop() +{ + rm -f $noshutdown_file +} + +load_rc_config $name + +run_rc_command "$1" From nobody Mon May 5 16:38: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 4ZrnJw0PLYz5vk3B; Mon, 05 May 2025 16:38: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrnJv5zLFz3cMg; Mon, 05 May 2025 16:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746463103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=na8jKhCaqtsuM8WLOiaUJ5LDvSs6qSW245AdeuRBkJU=; b=UvVxE3O1cpcWmVIIuZCsFYxuKyqcYYlURXxZvCsVNKi/nrgo9Y57KONYocM6rklhUj2h1c RbxgZ+gYG5KG4XKmQ451cejQI2+gyLJf857CETldUtUB9AT/V5VrofAENJJ+eV0/IkmiXE iJmphfGxBwJFi46HG9kjCjA3bBlaldLynulHvFtMQE5GUh3GLPcHnc4emxUQFH+DNEew4E ijy2I7OxOLv3qD2YZq43BHWQbzH1aM+x8fvhA4ltiXsROym1yp6+VysMboi7fi9vfzntvk o/ycNBTWIGeURIKuV2MZ/97h8Pl7NI7NByrmAslQacM7eIPa3EGNPoJyN7YTMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746463103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=na8jKhCaqtsuM8WLOiaUJ5LDvSs6qSW245AdeuRBkJU=; b=j83zftdjweVE6924X/BCJnGe0hgT8sEFRRSNBxsDAHwpwTfNmJiVVVjZ7jiQ5ab6jCvgPv TZ/uI+nFTkXa4xgSyzACiKFaRLUdv0lxzfN6U63OYeVEjkM18YqzmnnPxds6MQtVi9rJkN XbhZElzW+9eJtaJtxvbOZcCS79bRQP1M6K352q1IMAVAaAWRRm/qsNR+6tanSpUjIxY8sA WzG/TI4o+PnrKr0Et41Nt7RGU+pwp6UAEqv0rOX/jL8pX4Fr191dkEABvROdpZFxxdBYmC aotyhGGqBkUP736RIISnd133DCY1z89d5eFys8UfQLARaYhhrrT+p6S46xOD+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746463103; a=rsa-sha256; cv=none; b=S9WJh9XLRnj5NEciCLoXU3AgZd/h0RsDUVXJi/eYgBJW1nk0KlDR9Y9BQr0g9LV1fOylul M20l9AqzB8kYQ7VGzIXoB9muK0gJ6xlhom/leWfWGYT8otKLwImILRVonEDhnmuA/S30eH 5tNqgn7oHbhQtVMu58MPZGm8Ne5x8uIzpuExVim6wbe90kwGpXKUZR5T22PDk2TV2oxROg dx2n9yovz4MRatBQlHH0aFNEQPqxNMRSTeg1wHQhYBIp1ziBgvx2y7Dy8JP5l2zKibRM31 q10+40HfCEfq7WNNdpcg06UiSpHdukXRMxkF1zRzaAfM64hdHVOe3SeUh6Vt3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrnJv5MQRz5mc; Mon, 05 May 2025 16:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545GcNqX009656; Mon, 5 May 2025 16:38:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545GcNbT009653; Mon, 5 May 2025 16:38:23 GMT (envelope-from git) Date: Mon, 5 May 2025 16:38:23 GMT Message-Id: <202505051638.545GcNbT009653@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: ca9131b72975 - main - UPDATING: Strengthen recommendations List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: ca9131b729757959cb0fd4721603466284cfc6fe Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=ca9131b729757959cb0fd4721603466284cfc6fe commit ca9131b729757959cb0fd4721603466284cfc6fe Author: Alexander Ziaee AuthorDate: 2025-05-03 22:43:10 +0000 Commit: Alexander Ziaee CommitDate: 2025-05-05 16:37:23 +0000 UPDATING: Strengthen recommendations Strengthen recommendations for ports_modules by adding a separate note. Use the unused [2] to add a note about creating backups. MFC after: 3 days Reviewed by: brooks, mhorne Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D50126 --- UPDATING | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/UPDATING b/UPDATING index 2a81fe2c27a8..7678c65b3761 100644 --- a/UPDATING +++ b/UPDATING @@ -2154,10 +2154,11 @@ COMMON ITEMS: # Note: sometimes if you are running current you gotta do more than # is listed here if you are upgrading from a really old current. - + [2] make buildworld + [1] make buildkernel KERNCONF=YOUR_KERNEL_HERE - make installkernel KERNCONF=YOUR_KERNEL_HERE [1] + make installkernel KERNCONF=YOUR_KERNEL_HERE [3] etcupdate -p [5] make installworld @@ -2191,10 +2192,11 @@ COMMON ITEMS: To upgrade in-place from stable to current ---------------------------------------------- - + [2] make buildworld [9] + [1] make buildkernel KERNCONF=YOUR_KERNEL_HERE [8] - make installkernel KERNCONF=YOUR_KERNEL_HERE [1] + make installkernel KERNCONF=YOUR_KERNEL_HERE [3] etcupdate -p [5] make installworld @@ -2227,6 +2229,11 @@ FOOTNOTES: and effective, eg: PORTS_MODULES+=graphics/drm-kmod graphics/nvidia-drm-kmod + [2] To make complete dumps on zfs(4), use bectl(8), which + creates bootable snapshots of configurable depth that are + selectable via the bootloader. For ufs(4), use dump(8) and + restore(8). + [3] From the bootblocks, boot -s, and then do fsck -p mount -u / From nobody Mon May 5 17:18: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 4ZrpBz18G2z5vmjJ; Mon, 05 May 2025 17:18: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrpBz0ZBQz45kM; Mon, 05 May 2025 17:18:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746465499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABp9eku+QRAPFJ/6K1F6TamepgB2mqNw3q6FFOMh6vI=; b=KaXss4Nj4JVYdBZenByTDIom2i3lMSWMnDQg+zwsrs2eiuTdFlNXgZyMSNAvdJ9ZXeZcnY hopCseFkGgolVOWFYLAasyInQPDPCLrjGb37A74wrnM20HaN8936rfA4/gxTB0VU01uVhD css8uFuN+bGJrwsTYvOIshXZGGrYOxVDQZ72i2sWS7vkYRc8yg+/LJNqi0OWFiPkHrLF9n 6FDub/vHEUGQt/KTRVCjwDPZKbEjVIdz7oMgZsil1IpsaM6wJKTZ9Hfn5i40Uu7gGn9cG8 1r4eNz7W1vflK8rI1a7zflFOOCbuKvxRZ/DH2arCmpwoATmymmyPSOHXl8+blw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746465499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABp9eku+QRAPFJ/6K1F6TamepgB2mqNw3q6FFOMh6vI=; b=dcRYeK29YUPX1Z6gvZuwntmvalqrLCpJj3sO403ICAUYCYDfv7KMxJnd8LT4LHKzCbIFVM AMjoTCKbQUP1g2dW/Licqq0jEAlmcgshQtmSV7gPbTXCU5AHSxcCUSorhvRB8pBRM9TLoz 0GGfN0CmVn+x1YJLiidi5/Cu+DTlRHMT4M67Oyzk9R9AgRgMy+NBjLCu+/rI3R8tbnK3PZ neP8gL/2i+pFHLNCTwcpAspXH3uFbAtD8aqZBesnqqSgigABYOiOTzFYncFm2P6+fwu+Lq FAPAOuR8Jbsfz4HbPt7spWCThdUF6HB2uuK8tFy/TdImQ6k7lxVyUKdT4HicXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746465499; a=rsa-sha256; cv=none; b=JsITWznm5F4dN0YOoA0iaOoCVu5MJ/WYI54hr3Zwy42JH6xKUetOyTfDkMaN2XGsmhEd8X snEsSn9krcGS1CF0wS0z3rtdRCtZHil9+VSTi8JFtfStZqDV1Gi5XyMkDFWwuDgMigK14z 3/SHXWRSUJ9+x8SZl3w11cH/pV27gWOH47xRDlFQ+iH2GT++AWpNQZ18egfejAlZizgJbZ JwVHGyhy9MNv4B9Ay00KRya/3muIiyU2IAP1UJPoanvVZnM/UbZbx/f+b88skZeZ4LiP3c 7WaNQQ/Jj4FjmpwZJ9YpZqnUzXzfd71YRBVPR+z3tAwITXGAP84XOoPGJnG6Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrpBz08kvz6vS; Mon, 05 May 2025 17:18:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545HIIoJ085104; Mon, 5 May 2025 17:18:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545HIIO3085101; Mon, 5 May 2025 17:18:18 GMT (envelope-from git) Date: Mon, 5 May 2025 17:18:18 GMT Message-Id: <202505051718.545HIIO3085101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9a37f1024ceb - main - Rename audio(8) to sndctl(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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a37f1024cebfb89dcfa15c23bb287a5d09a9ae7 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9a37f1024cebfb89dcfa15c23bb287a5d09a9ae7 commit 9a37f1024cebfb89dcfa15c23bb287a5d09a9ae7 Author: Christos Margiolis AuthorDate: 2025-05-05 17:18:08 +0000 Commit: Christos Margiolis CommitDate: 2025-05-05 17:18:08 +0000 Rename audio(8) to sndctl(8) Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50167 --- usr.sbin/Makefile | 2 +- usr.sbin/{audio => sndctl}/Makefile | 2 +- usr.sbin/{audio/audio.8 => sndctl/sndctl.8} | 14 ++--- usr.sbin/{audio/audio.c => sndctl/sndctl.c} | 94 ++++++++++++++--------------- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index a891e290bafe..4b3223df9f1d 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -2,7 +2,6 @@ SUBDIR= adduser \ arp \ - audio \ binmiscctl \ boottrace \ bsdconfig \ @@ -84,6 +83,7 @@ SUBDIR= adduser \ setpmac \ smbmsg \ snapinfo \ + sndctl \ spi \ spray \ syslogd \ diff --git a/usr.sbin/audio/Makefile b/usr.sbin/sndctl/Makefile similarity index 88% rename from usr.sbin/audio/Makefile rename to usr.sbin/sndctl/Makefile index 6a5d45f4b898..c1830413f931 100644 --- a/usr.sbin/audio/Makefile +++ b/usr.sbin/sndctl/Makefile @@ -1,6 +1,6 @@ .include -PROG= audio +PROG= sndctl SRCS= ${PROG}.c MAN= ${PROG}.8 LDFLAGS+= -lnv -lmixer diff --git a/usr.sbin/audio/audio.8 b/usr.sbin/sndctl/sndctl.8 similarity index 97% rename from usr.sbin/audio/audio.8 rename to usr.sbin/sndctl/sndctl.8 index 82bc170cef82..4c3810f3c16b 100644 --- a/usr.sbin/audio/audio.8 +++ b/usr.sbin/sndctl/sndctl.8 @@ -28,10 +28,10 @@ .\" SUCH DAMAGE. .\" .Dd May 5, 2025 -.Dt AUDIO 8 +.Dt SNDCTL 8 .Os .Sh NAME -.Nm audio +.Nm sndctl .Nd list and modify soundcard properties .Sh SYNOPSIS .Nm @@ -149,28 +149,28 @@ The audio device file, where X is the unit of the device, for example Disable auto-conversions and enable realtime mode to get as low latencies as possible: .Bd -literal -offset indent -$ audio autoconv=0 realtime=1 +$ sndctl autoconv=0 realtime=1 .Ed .Pp Set the playback sample format to 2-channel signed 24-bit low endian, and sample rate to 48000 Hz: .Bd -literal -offset indent -$ audio play.format=s24le:2.0 play.rate=48000 +$ sndctl play.format=s24le:2.0 play.rate=48000 .Ed .Pp List the PIDs and process names of all channels for .Pa /dev/dsp1 : .Bd -literal -offset indent -$ audio -f /dev/dsp1 pid proc +$ sndctl -f /dev/dsp1 pid proc .Ed .Pp Dump .Pa /dev/dsp0 information to a file and retrieve back later: .Bd -literal -offset indent -$ audio -f /dev/dsp0 -o > info +$ sndctl -f /dev/dsp0 -o > info \&... -$ audio -f /dev/dsp0 `cat info` +$ sndctl -f /dev/dsp0 `cat info` .Ed .Sh SEE ALSO .Xr sndstat 4 , diff --git a/usr.sbin/audio/audio.c b/usr.sbin/sndctl/sndctl.c similarity index 92% rename from usr.sbin/audio/audio.c rename to usr.sbin/sndctl/sndctl.c index f7c4aa5a7f04..f362ce840cf7 100644 --- a/usr.sbin/audio/audio.c +++ b/usr.sbin/sndctl/sndctl.c @@ -50,7 +50,7 @@ #define STATUS_LEN 64 #define FMTSTR_LEN 16 -struct audio_chan { +struct snd_chan { char name[NAME_MAX]; char parentchan[NAME_MAX]; int unit; @@ -78,11 +78,11 @@ struct audio_chan { int ready; } hwbuf, swbuf; char feederchain[BUFSIZ]; - struct audio_dev *dev; - TAILQ_ENTRY(audio_chan) next; + struct snd_dev *dev; + TAILQ_ENTRY(snd_chan) next; }; -struct audio_dev { +struct snd_dev { char name[NAME_MAX]; char desc[NAME_MAX]; char status[BUFSIZ]; @@ -104,10 +104,10 @@ struct audio_dev { int max_chans; char formats[BUFSIZ]; } play, rec; - TAILQ_HEAD(, audio_chan) chans; + TAILQ_HEAD(, snd_chan) chans; }; -struct audio_ctl { +struct snd_ctl { const char *name; size_t off; #define STR 0 @@ -115,7 +115,7 @@ struct audio_ctl { #define VOL 2 #define GRP 3 int type; - int (*mod)(struct audio_dev *, void *); + int (*mod)(struct snd_dev *, void *); }; struct map { @@ -123,18 +123,18 @@ struct map { const char *str; }; -static int mod_bitperfect(struct audio_dev *, void *); -static int mod_autoconv(struct audio_dev *, void *); -static int mod_realtime(struct audio_dev *, void *); -static int mod_play_vchans(struct audio_dev *, void *); -static int mod_play_rate(struct audio_dev *, void *); -static int mod_play_format(struct audio_dev *, void *); -static int mod_rec_vchans(struct audio_dev *, void *); -static int mod_rec_rate(struct audio_dev *, void *); -static int mod_rec_format(struct audio_dev *, void *); - -static struct audio_ctl dev_ctls[] = { -#define F(member) offsetof(struct audio_dev, member) +static int mod_bitperfect(struct snd_dev *, void *); +static int mod_autoconv(struct snd_dev *, void *); +static int mod_realtime(struct snd_dev *, void *); +static int mod_play_vchans(struct snd_dev *, void *); +static int mod_play_rate(struct snd_dev *, void *); +static int mod_play_format(struct snd_dev *, void *); +static int mod_rec_vchans(struct snd_dev *, void *); +static int mod_rec_rate(struct snd_dev *, void *); +static int mod_rec_format(struct snd_dev *, void *); + +static struct snd_ctl dev_ctls[] = { +#define F(member) offsetof(struct snd_dev, member) { "name", F(name), STR, NULL }, { "desc", F(desc), STR, NULL }, { "status", F(status), STR, NULL }, @@ -169,8 +169,8 @@ static struct audio_ctl dev_ctls[] = { #undef F }; -static struct audio_ctl chan_ctls[] = { -#define F(member) offsetof(struct audio_chan, member) +static struct snd_ctl chan_ctls[] = { +#define F(member) offsetof(struct snd_chan, member) /*{ "name", F(name), STR, NULL },*/ { "parentchan", F(parentchan), STR, NULL }, { "unit", F(unit), NUM, NULL }, @@ -333,15 +333,15 @@ bytes2frames(int bytes, int fmt) return (bytes / (samplesz * ch)); } -static struct audio_dev * +static struct snd_dev * read_dev(char *path) { nvlist_t *nvl; const nvlist_t * const *di; const nvlist_t * const *cdi; struct sndstioc_nv_arg arg; - struct audio_dev *dp = NULL; - struct audio_chan *ch; + struct snd_dev *dp = NULL; + struct snd_chan *ch; size_t nitems, nchans, i, j; int fd, caps, unit; @@ -389,7 +389,7 @@ read_dev(char *path) #define NV(type, item) \ nvlist_get_ ## type (di[i], SNDST_DSPS_ ## item) - if ((dp = calloc(1, sizeof(struct audio_dev))) == NULL) + if ((dp = calloc(1, sizeof(struct snd_dev))) == NULL) err(1, "calloc"); dp->unit = -1; @@ -469,7 +469,7 @@ read_dev(char *path) for (j = 0; j < nchans; j++) { #define NV(type, item) \ nvlist_get_ ## type (cdi[j], SNDST_DSPS_SOUND4_CHAN_ ## item) - if ((ch = calloc(1, sizeof(struct audio_chan))) == NULL) + if ((ch = calloc(1, sizeof(struct snd_chan))) == NULL) err(1, "calloc"); strlcpy(ch->name, NV(string, NAME), sizeof(ch->name)); @@ -538,9 +538,9 @@ done: } static void -free_dev(struct audio_dev *dp) +free_dev(struct snd_dev *dp) { - struct audio_chan *ch; + struct snd_chan *ch; while (!TAILQ_EMPTY(&dp->chans)) { ch = TAILQ_FIRST(&dp->chans); @@ -551,10 +551,10 @@ free_dev(struct audio_dev *dp) } static void -print_dev_ctl(struct audio_dev *dp, struct audio_ctl *ctl, bool simple, +print_dev_ctl(struct snd_dev *dp, struct snd_ctl *ctl, bool simple, bool showgrp) { - struct audio_ctl *cp; + struct snd_ctl *cp; size_t len; if (ctl->type != GRP) { @@ -587,10 +587,10 @@ print_dev_ctl(struct audio_dev *dp, struct audio_ctl *ctl, bool simple, } static void -print_chan_ctl(struct audio_chan *ch, struct audio_ctl *ctl, bool simple, +print_chan_ctl(struct snd_chan *ch, struct snd_ctl *ctl, bool simple, bool showgrp) { - struct audio_ctl *cp; + struct snd_ctl *cp; size_t len; int v; @@ -627,10 +627,10 @@ print_chan_ctl(struct audio_chan *ch, struct audio_ctl *ctl, bool simple, } static void -print_dev(struct audio_dev *dp) +print_dev(struct snd_dev *dp) { - struct audio_chan *ch; - struct audio_ctl *ctl; + struct snd_chan *ch; + struct snd_ctl *ctl; if (!oflag) { printf("%s: <%s> %s", dp->name, dp->desc, dp->status); @@ -739,7 +739,7 @@ sysctl_str(const char *buf, const char *arg, char *var, size_t varsz) } static int -mod_bitperfect(struct audio_dev *dp, void *arg) +mod_bitperfect(struct snd_dev *dp, void *arg) { char buf[64]; @@ -752,7 +752,7 @@ mod_bitperfect(struct audio_dev *dp, void *arg) } static int -mod_autoconv(struct audio_dev *dp, void *arg) +mod_autoconv(struct snd_dev *dp, void *arg) { const char *val = arg; const char *zero = "0"; @@ -780,7 +780,7 @@ mod_autoconv(struct audio_dev *dp, void *arg) } static int -mod_realtime(struct audio_dev *dp, void *arg) +mod_realtime(struct snd_dev *dp, void *arg) { const char *val = arg; int rc = -1; @@ -807,7 +807,7 @@ mod_realtime(struct audio_dev *dp, void *arg) } static int -mod_play_vchans(struct audio_dev *dp, void *arg) +mod_play_vchans(struct snd_dev *dp, void *arg) { char buf[64]; @@ -820,7 +820,7 @@ mod_play_vchans(struct audio_dev *dp, void *arg) } static int -mod_play_rate(struct audio_dev *dp, void *arg) +mod_play_rate(struct snd_dev *dp, void *arg) { char buf[64]; @@ -835,7 +835,7 @@ mod_play_rate(struct audio_dev *dp, void *arg) } static int -mod_play_format(struct audio_dev *dp, void *arg) +mod_play_format(struct snd_dev *dp, void *arg) { char buf[64]; @@ -850,7 +850,7 @@ mod_play_format(struct audio_dev *dp, void *arg) } static int -mod_rec_vchans(struct audio_dev *dp, void *arg) +mod_rec_vchans(struct snd_dev *dp, void *arg) { char buf[64]; @@ -863,7 +863,7 @@ mod_rec_vchans(struct audio_dev *dp, void *arg) } static int -mod_rec_rate(struct audio_dev *dp, void *arg) +mod_rec_rate(struct snd_dev *dp, void *arg) { char buf[64]; @@ -878,7 +878,7 @@ mod_rec_rate(struct audio_dev *dp, void *arg) } static int -mod_rec_format(struct audio_dev *dp, void *arg) +mod_rec_format(struct snd_dev *dp, void *arg) { char buf[64]; @@ -903,9 +903,9 @@ usage(void) int main(int argc, char *argv[]) { - struct audio_dev *dp; - struct audio_chan *ch; - struct audio_ctl *ctl; + struct snd_dev *dp; + struct snd_chan *ch; + struct snd_ctl *ctl; char *path = NULL; char *s, *propstr; bool show = true, found; From nobody Mon May 5 17:57: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 4Zrq4G1mWTz5vqD6; Mon, 05 May 2025 17:57: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrq4G0ygRz3HQn; Mon, 05 May 2025 17:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746467854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jJV8X1VdeZXutXu3oduK/b9raHe3KuvEeR1VArJpQ7E=; b=AWr/98C6F09I6QiwIZXmFCQL3Dj3GokuIbiFBzGpX0lYW1hqD1gWhNXTJRFYMqXZ4IKIlv Pf2j2IfgWHwbY6Wa7nlWZVe0EhWYa7+Np5aXr33mR6iW84zbkY8hVXHE2GMRxMw/nmSZ+q M93qwvTkJHxEaDMt+Icxvm/E/6t30Puug1l3siI5wACszOIQp9n/FG91TaLncNr78rlgQ+ nAo2knFzVerNlLTetscLI1OLB4tTmqWkDnLbul1CQw/x5Z53SjDYAVShPk5t5oBztDPgMI uYJRAfSKfhzOVvRXRxTmOw/CBMohg6QKUSKAA1ltYdQlhc4a7q6rKQwppCSxoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746467854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jJV8X1VdeZXutXu3oduK/b9raHe3KuvEeR1VArJpQ7E=; b=CIfF9FUYFSE4kd5J8hOjMGSBLywB5QdG3fImo5JqTvsuXt+1h+7qXShUutz3hi4iffPPVW CthcamC+H1GjitdZ2vevth8EzojmHWx7uQIrwwq38FAeWDaM9b6jcjGzISEb85ZaLDfC/T 3Zk+Cj6iADXVjwBYBQ82zv0t3oYaijrU7RwStV9QrKLFdTsVBXEJNAPJC2okwvvvqizAro f+oqGC92D0dQp3U6Sbv+3GmrHq0cFKFHmzbcgB3Qu/aiSR3vpCM0qqwH3otxmo0Ahd6qay BJAOwU4p6bSYB+Mb6Ud63BWE0FOqdEKYykLbpqy1wdbmq7gUnSbRmmRSJo/G5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746467854; a=rsa-sha256; cv=none; b=r+TNHmxn5EcARQO6bG+XiuZb6140ekAkKmm9+mf0dQRGve9y3VUfbgmGxhv9Pkdxo+RKZe btVT2FFMO08ugXERg+oXoMxgKs03wIyO/ByIigw+VmlDGbyEvuoqq5mlBLlNSqikut9JoM qBk21DnO0dbzUi6Oi8jfczY1c3Er/uO0DtNOArt6saZfiA3DSunEDBziCsPB68JLvtlesZ WRbr6gk2QmuERzjdE9EYraghRNBPRbwxOlqLSXmLq8Zlg6Fw37tzdXGjMAXtd3kxzMCUlh 4TGcvfaExlKw6j9ze20WC1o99ts1RaX/OIt6ocsSplmTN3iD7mAPkUew2ymldw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrq4G0WNqz7Xl; Mon, 05 May 2025 17:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545HvX5d058586; Mon, 5 May 2025 17:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545HvXUA058583; Mon, 5 May 2025 17:57:33 GMT (envelope-from git) Date: Mon, 5 May 2025 17:57:33 GMT Message-Id: <202505051757.545HvXUA058583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ab34225af39fde42be17b6306cc70610cdcec96 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3ab34225af39fde42be17b6306cc70610cdcec96 commit 3ab34225af39fde42be17b6306cc70610cdcec96 Author: Christos Margiolis AuthorDate: 2025-05-05 17:57:07 +0000 Commit: Christos Margiolis CommitDate: 2025-05-05 17:57:07 +0000 RELNOTES: Mention sndctl(8) Sponsored by: The FreeBSD Foundation --- RELNOTES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELNOTES b/RELNOTES index 4e0b0a0b3cdb..515facdc7859 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +44e5a0150835, 9a37f1024ceb: + A new utility sndctl(8) has been added to concertrate the various + interfaces for viewing and manipulating audio device settings (sysctls, + /dev/sndstat), into a single utility with a similar control-driven + interface to that of mixer(8). 995b690d1398: ps(1)'s '-U' option has been changed to select processes by their real user IDs instead of their effective one, in accordance with POSIX and From nobody Mon May 5 18:20: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 4ZrqbH5534z5tcYK; Mon, 05 May 2025 18:20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrqbH12JPz3Xsb; Mon, 05 May 2025 18:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746469259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B2/6zWaZYuXUpVXz5pNIW8hGb0XEKtTzabWFtjjtZgo=; b=YgegoVi+Hz9vBCuJ6LNFfj8n6ikHiilrDIHZeps2sSi31PLl3qEJDv+WFT0B8JOt3aupQH 1aII9F1VYREc6VXxpwVeSTebkRTzi1jJlPIaI4xHP6QPH/fpFPphQNIg09+/y+uuUDF1K+ wqqUxnR4XS1Gn4dbUbxQv2GVqEwdpwUiYE9TRvIXm5KduKVeHCujG4U7VLg37K9jl5qIVj 3kn+5OLOEOO0vqpad5YE0dQbywEaGdXgw6hcH9gCr3Rwmpou0/7kHR50Tr8UMwH0MAChLd NE/BuFc0j1nJ/oXG5/cunaC3zCn0+sv/zDnf4FoiGnnWrL3dtz0gHOOdaZf2XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746469259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B2/6zWaZYuXUpVXz5pNIW8hGb0XEKtTzabWFtjjtZgo=; b=tvBsdbfTcy8DBVLrNxAqDM0IqmrWta1AzgT97Tkxwd1cszRYS7PccCwkG4CyS7jsv3RurJ j3wYQ/g27TswGAa6MOvtdUKAfdffxJyS8vTr/FyuPPtfWq+hikcfwhtG99GIaXlQPoEWgv PaxwjxhI2huUA8LyWr/se+bJ8pMWyViH4Q+naj9vYvyqUaRzsL1yxhXide1C4Ibl2PDcwW efqBga6nG9gHb/i3LPXWiBJUwjxJpY3GLWYgGYIbsagwA40zb8RWtlI+pFWq/FKIo03MUD I7nq6BeRByKxmJa96bm2KmD4sN9nqR1oyXhJeQ0iR+qAyC02pCBCTgcHT9aolw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746469259; a=rsa-sha256; cv=none; b=v6URSGfb4MxVHHn1RbIKYo6z/RKNGo1k824z0BM7LvzVJvunE4veI6/6proMFQzXmWsgEP VSGqQAo/MCzMDloCg+2wAIStRILtezpDq4Cv7XrMgd6d/CFAVb+Dl1IOU32jWZ6PjoQvFn Jr2aAEhUCz0+RHjs9XKrahQ+246RJDQd7/3Yroweh65hoRUJAjX3tTG+QcOaFEqXBUGdOp bhOjTk7KYvZeuj2wdhDZUr8QQcUIA7i6k/ix5Kpj+ZnF6UZY+INFRqgSwY48y0LpKFP5QI kLEbT95dYKfamMkh+woGTu9WTBlhDgZ8GC585o2yZebRdDbBu+nL9Kx1ZfglSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrqbH0X31z8vT; Mon, 05 May 2025 18:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545IKwVA008219; Mon, 5 May 2025 18:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545IKw2J008216; Mon, 5 May 2025 18:20:58 GMT (envelope-from git) Date: Mon, 5 May 2025 18:20:58 GMT Message-Id: <202505051820.545IKw2J008216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 757e973fb211 - main - libc tests: add tests for link_addr(3) and link_ntoa(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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 757e973fb2112ea442aa8990d991f406d407b6f7 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=757e973fb2112ea442aa8990d991f406d407b6f7 commit 757e973fb2112ea442aa8990d991f406d407b6f7 Author: Lexi Winter AuthorDate: 2025-05-05 17:25:03 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 18:20:02 +0000 libc tests: add tests for link_addr(3) and link_ntoa(3) for now, since link_addr() has no way to indicate an error, these are only positive tests which check the outcome of valid inputs. Reviewed by: ngie, des, adrian Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50062 --- lib/libc/tests/net/Makefile | 3 + lib/libc/tests/net/link_addr_test.cc | 269 +++++++++++++++++++++++++++++++++++ 2 files changed, 272 insertions(+) diff --git a/lib/libc/tests/net/Makefile b/lib/libc/tests/net/Makefile index 016f0cd82ceb..24cff61e8d24 100644 --- a/lib/libc/tests/net/Makefile +++ b/lib/libc/tests/net/Makefile @@ -3,6 +3,9 @@ PACKAGE= tests ATF_TESTS_C+= ether_test ATF_TESTS_C+= eui64_aton_test ATF_TESTS_C+= eui64_ntoa_test +ATF_TESTS_CXX+= link_addr_test + +CXXSTD.link_addr_test= c++20 CFLAGS+= -I${.CURDIR} diff --git a/lib/libc/tests/net/link_addr_test.cc b/lib/libc/tests/net/link_addr_test.cc new file mode 100644 index 000000000000..009493e7e5aa --- /dev/null +++ b/lib/libc/tests/net/link_addr_test.cc @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2025 Lexi Winter + * + * SPDX-License-Identifier: ISC + */ + +/* + * Tests for link_addr() and link_ntoa(). + * + * link_addr converts a string representing an (optionally null) interface name + * followed by an Ethernet address into a sockaddr_dl. The expected format is + * "[ifname]:lladdr". This means if ifname is not specified, the leading colon + * is still required. + * + * link_ntoa does the inverse of link_addr, returning a string representation + * of the address. + * + * Note that the output format of link_ntoa is not valid input for link_addr + * since the leading colon may be omitted. This is by design. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +using namespace std::literals; + +/* + * Define operator== and operator<< for ether_addr so we can use them in + * ATF_EXPECT_EQ expressions. + */ + +bool +operator==(ether_addr a, ether_addr b) +{ + return (std::ranges::equal(a.octet, b.octet)); +} + +std::ostream & +operator<<(std::ostream &s, ether_addr a) +{ + for (unsigned i = 0; i < ETHER_ADDR_LEN; ++i) { + if (i > 0) + s << ":"; + + s << std::format("{:02x}", static_cast(a.octet[i])); + } + + return (s); +} + +/* + * Create a sockaddr_dl from a string using link_addr(), and ensure the + * returned struct looks valid. + */ +sockaddr_dl +make_linkaddr(const std::string &addr) +{ + auto sdl = sockaddr_dl{}; + + sdl.sdl_len = sizeof(sdl); + ::link_addr(addr.c_str(), &sdl); + + ATF_REQUIRE_EQ(AF_LINK, static_cast(sdl.sdl_family)); + ATF_REQUIRE_EQ(true, sdl.sdl_len > 0); + ATF_REQUIRE_EQ(true, sdl.sdl_nlen >= 0); + + return (sdl); +} + +/* + * Return the data stored in a sockaddr_dl as a span. + */ +std::span +data(const sockaddr_dl &sdl) +{ + // sdl_len is the entire structure, but we only want the length of the + // data area. + auto dlen = sdl.sdl_len - offsetof(sockaddr_dl, sdl_data); + return {&sdl.sdl_data[0], dlen}; +} + +/* + * Return the interface name stored in a sockaddr_dl as a string. + */ +std::string_view +ifname(const sockaddr_dl &sdl) +{ + auto name = data(sdl).subspan(0, sdl.sdl_nlen); + return {name.begin(), name.end()}; +} + +/* + * Return the Ethernet address stored in a sockaddr_dl as an ether_addr. + */ +ether_addr +addr(const sockaddr_dl &sdl) +{ + ether_addr ret{}; + ATF_REQUIRE_EQ(ETHER_ADDR_LEN, sdl.sdl_alen); + std::ranges::copy(data(sdl).subspan(sdl.sdl_nlen, ETHER_ADDR_LEN), + &ret.octet[0]); + return (ret); +} + +/* + * Return the link address stored in a sockaddr_dl as a span of octets. + */ +std::span +lladdr(const sockaddr_dl &sdl) +{ + auto data = reinterpret_cast(LLADDR(&sdl)); + return {data, data + sdl.sdl_alen}; +} + + +/* + * Some sample addresses we use for testing. Include at least one address for + * each format we want to support. + */ + +struct test_address { + std::string input; /* value passed to link_addr */ + std::string ntoa; /* expected return from link_ntoa */ + ether_addr addr{}; /* expected return from link_addr */ +}; + +std::vector test_addresses{ + // No delimiter + {"001122334455"s, "0.11.22.33.44.55", + ether_addr{0x00, 0x11, 0x22, 0x33, 0x44, 0x55}}, + + // Colon delimiter + {"00:11:22:33:44:55"s, "0.11.22.33.44.55", + ether_addr{0x00, 0x11, 0x22, 0x33, 0x44, 0x55}}, + + // Dash delimiter + {"00-11-22-33-44-55"s, "0.11.22.33.44.55", + ether_addr{0x00, 0x11, 0x22, 0x33, 0x44, 0x55}}, + + // Period delimiter (link_ntoa format) + {"00.11.22.33.44.55"s, "0.11.22.33.44.55", + ether_addr{0x00, 0x11, 0x22, 0x33, 0x44, 0x55}}, + + // Period delimiter (Cisco format) + {"0011.2233.4455"s, "0.11.22.33.44.55", + ether_addr{0x00, 0x11, 0x22, 0x33, 0x44, 0x55}}, + + // An addresses without leading zeroes. + {"0:1:02:30:4:55"s, "0.1.2.30.4.55", + ether_addr{0x00, 0x01, 0x02, 0x30, 0x04, 0x55}}, + + // An address with some uppercase letters. + {"AA:B:cC:Dd:e0:1f"s, "aa.b.cc.dd.e0.1f", + ether_addr{0xaa, 0x0b, 0xcc, 0xdd, 0xe0, 0x1f}}, + + // Addresses composed only of letters, to make sure they're not + // confused with an interface name. + + {"aabbccddeeff"s, "aa.bb.cc.dd.ee.ff", + ether_addr{0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}}, + + {"aa:bb:cc:dd:ee:ff"s, "aa.bb.cc.dd.ee.ff", + ether_addr{0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}}, +}; + +/* + * Test without an interface name. + */ +ATF_TEST_CASE_WITHOUT_HEAD(basic) +ATF_TEST_CASE_BODY(basic) +{ + for (const auto &ta : test_addresses) { + // This does basic tests on the returned value. + auto sdl = make_linkaddr(":" + ta.input); + + // Check the ifname and address. + ATF_REQUIRE_EQ(""s, ifname(sdl)); + ATF_REQUIRE_EQ(ETHER_ADDR_LEN, static_cast(sdl.sdl_alen)); + ATF_REQUIRE_EQ(ta.addr, addr(sdl)); + + // Check link_ntoa returns the expected value. + auto ntoa = std::string(::link_ntoa(&sdl)); + ATF_REQUIRE_EQ(ta.ntoa, ntoa); + } + +} + +/* + * Test with an interface name. + */ +ATF_TEST_CASE_WITHOUT_HEAD(ifname) +ATF_TEST_CASE_BODY(ifname) +{ + for (const auto &ta : test_addresses) { + auto sdl = make_linkaddr("ix0:" + ta.input); + + ATF_REQUIRE_EQ("ix0", ifname(sdl)); + ATF_REQUIRE_EQ(ETHER_ADDR_LEN, static_cast(sdl.sdl_alen)); + ATF_REQUIRE_EQ(ta.addr, addr(sdl)); + + auto ntoa = std::string(::link_ntoa(&sdl)); + ATF_REQUIRE_EQ("ix0:" + ta.ntoa, ntoa); + } + +} + +/* + * Test some non-Ethernet addresses. + */ +ATF_TEST_CASE_WITHOUT_HEAD(nonether) +ATF_TEST_CASE_BODY(nonether) +{ + sockaddr_dl sdl; + + /* A short address */ + sdl = make_linkaddr(":1:23:cc"); + ATF_REQUIRE_EQ("", ifname(sdl)); + ATF_REQUIRE_EQ("1.23.cc"s, ::link_ntoa(&sdl)); + ATF_REQUIRE_EQ(3, sdl.sdl_alen); + ATF_REQUIRE_EQ(true, + std::ranges::equal(std::vector{0x01u, 0x23u, 0xccu}, lladdr(sdl))); + + /* A long address */ + sdl = make_linkaddr(":1:23:cc:a:b:c:d:e:f"); + ATF_REQUIRE_EQ("", ifname(sdl)); + ATF_REQUIRE_EQ("1.23.cc.a.b.c.d.e.f"s, ::link_ntoa(&sdl)); + ATF_REQUIRE_EQ(9, sdl.sdl_alen); + ATF_REQUIRE_EQ(true, std::ranges::equal( + std::vector{0x01u, 0x23u, 0xccu, 0xau, 0xbu, 0xcu, 0xdu, 0xeu, 0xfu}, + lladdr(sdl))); +} + +/* + * Test an extremely long address which would overflow link_ntoa's internal + * buffer. It should handle this by truncating the output. + * (Test for SA-16:37.libc / CVE-2016-6559.) + */ +ATF_TEST_CASE_WITHOUT_HEAD(overlong) +ATF_TEST_CASE_BODY(overlong) +{ + auto sdl = make_linkaddr( + ":01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f." + "11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f." + "22.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f"); + + ATF_REQUIRE_EQ( + "1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.11.12.13.14.15.16.17.18.19.1a.1b."s, + ::link_ntoa(&sdl)); +} + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, basic); + ATF_ADD_TEST_CASE(tcs, ifname); + ATF_ADD_TEST_CASE(tcs, nonether); + ATF_ADD_TEST_CASE(tcs, overlong); +} From nobody Mon May 5 18:23: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 4Zrqfj6KRtz5tcxw; Mon, 05 May 2025 18:23: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrqfj2nkDz3bgt; Mon, 05 May 2025 18:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746469437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RpOPqPB0D5agt6ds0VMGXphZ+xqUugvlu8vPz/egrzM=; b=ux8ObExC9+v6C3DniMvAm9Wcfmzw+o5AAq3Xz2DpmkOQwnW7RrINh/K6QpOXIlKZDlT2Yk SfIk1RU9yqH4budPNsXmXDq2TaQuRqpMlJDXqcFQ+7U2ErAk2FQeqVmcRQQmUQTNl1nj5L 3sGMOvgstzV9czZDOdhsT4f2JZwZpFs3L+z6yxXI5GkCM54uuH3uv+/6IYZ5Ief2xZGxnQ 3NZXScD9R35ZdXZVkI4tm8hHrpwjgVQo+hlBEar+XU8R1CXhFnfuGQf7EXG6Xa/fRPWjAQ w8XwMQtEWEdE1uC5rh+tJzhLsJpuHB3xZrBpWCDMAI1a81UHylnDfoovTD2EGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746469437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RpOPqPB0D5agt6ds0VMGXphZ+xqUugvlu8vPz/egrzM=; b=ojdlIPnWaKanL5/6KwH+XC9F9eJJgSSIo3u//ff+L2FE0CKrQOA5JV5Pobw8yRNpnj35mk CWWr+QTn9cK7QrupzCqKiuZtgxyHqktFXew5X2CwWdfL2Gg5t4CS4zQdHRbL7+zg+ovAsj Gdcz9ZZu42T+6JqeYmMP8ujGfNnxQ8nmBk12CXUNjxF4y4r+ObVDTQrP01JOoIGHZFt3sV 3vH9xCCOkbb0/XDhXMvqMbmRFuz6kBaHrIZcguZQku7uW5Ie/EIRN1XBWDpXwNUG60QzRr 1P0YR741ZwZla+o0RuZhB/eYiSOFmyNSvEjyrXTzrnJRnafMKK6Mw0Q4z2cH5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746469437; a=rsa-sha256; cv=none; b=lEXqoKt1m5RUDsEeFRhqJRLOP9umlGth4SX4WMavKg2f5cnfibuqpg2Ljl9RuGq7/cinLT D8j4SXVmwLu340RuMBj1AD5f99f90zxB4xzmv1/NYCmPMD+i000Kucv/C1HzHVAJmpxFye Ai8/J9DltWTChKJZaoDmE7JTZ75bCPL8eCJamE1J31ZOJZtzQ6sDE1ufm3FiXwTymhqBt5 wY+RMXFjq05ZU5IPT47fDUZy1sMtK7MQMLVE9KJIbBv1CjjU9Fvsm4Ou8fEgaUdFedQKim d+smlYZPqEc2Ltxx7zlnvwDCUQrhhu5guKqXBlia9JQwr8sDUzWFbz06kPcbPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrqfj1r8tz9Pq; Mon, 05 May 2025 18:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545INvMI015632; Mon, 5 May 2025 18:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545INvRt015629; Mon, 5 May 2025 18:23:57 GMT (envelope-from git) Date: Mon, 5 May 2025 18:23:57 GMT Message-Id: <202505051823.545INvRt015629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 23de29bb5a84 - main - ghpr-push: Better auotmated closing message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23de29bb5a84bda70e3efbed61f82fce7afe143f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=23de29bb5a84bda70e3efbed61f82fce7afe143f commit 23de29bb5a84bda70e3efbed61f82fce7afe143f Author: Warner Losh AuthorDate: 2025-05-05 18:21:10 +0000 Commit: Warner Losh CommitDate: 2025-05-05 18:23:56 +0000 ghpr-push: Better auotmated closing message Make it clear this is an automated message and that the change isn't on the mirror yet, but will be soon. Also, be polite and thank the contributor for this submission, because the project really does appreciate it. Reviewed by: emaste Sponsored by: Netflix --- tools/tools/git/ghpr/ghpr-push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/ghpr/ghpr-push.sh b/tools/tools/git/ghpr/ghpr-push.sh index 1b7f61c95a9a..1d11f31cc52a 100644 --- a/tools/tools/git/ghpr/ghpr-push.sh +++ b/tools/tools/git/ghpr/ghpr-push.sh @@ -42,7 +42,7 @@ git pull --rebase for pr in $(git config --get-all branch.${staging}.opabinia.prs); do if ! $do_pr_branch_push; then gh pr edit $pr --add-label merged - gh pr close $pr --comment "ghpr helper script closed this after push to source of truth." + gh pr close $pr --comment "Automated message from ghpr: Thank you for your submission. This PR has been merged to FreeBSD's `main` branch. These changes will appear shortly on our GitHub mirror." fi git branch -D PR-${pr} git config --remove-section branch.${staging}.opabinia.${pr} From nobody Mon May 5 18:34: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 4ZrqtY4tKPz5tcY2; Mon, 05 May 2025 18:34:13 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrqtY47PSz3k3H; Mon, 05 May 2025 18:34:13 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SuOY824u16lCn2Hv6gVWWVMPXZyl32EseJTLZ/OKccg=; b=rAqkVecbwySrCiGiXeUsSJt0a+FhHjnpdqeWsJYCEs/rDoiQ7SutR5kxr5lZYqvwJyQgEG U/TlpRVro+kDaSeQjPdZrjLvf2xUjv5PP2iKwd7gbgUVzZObiz6j7SSY9G1ceisnZweRC/ qPyFWqy3WVVkWhu8jBno6Rkxkwm9hLjqckPJsVERJFuo8i5XZjdd1N12Meb+ihuhRgbF8K Z2BBehUKS7n/yoWCjYnogRDxb76BhZ6LjfhWtKDJKQT9FGwHQ6OcxX0KVUN/9CmcTPTTcI kPSfmt4MWATjCfx9Lk+do2y5shcCXMUGl95F8sRwBWhLbj052cGj/Z8W4tTgtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SuOY824u16lCn2Hv6gVWWVMPXZyl32EseJTLZ/OKccg=; b=RPVk20fcgaC47P0s2wy5JqVE5+bodwSOmC7O5hx4RxL0QKdMQ/NxoSFWQgQ+sh60XKGyAn mXUcJghyQVhTnjewxKgi0IBiJv0tfKm6pu1thp/RMczn5kQqWX9Ka6UXZVsNy3/BQ9JJab jfoKIJhgPFLE6eq0U90yCaVaQywNRuEZRyFAqLhexffzfmRHq483W7LhmOOfgYhBPI4rrZ bN32bTxX5EoVPWrxXDm9vrndqDlxJS9nhfi56O8GkAYKuvUgEbDsYSxPTiB3wXmWee+Oue PVINSjhggEH7lrZFHHz0XNtF62pvA7wOZfQHtMcA9MbgWxJpBq9klEGYVQI54w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746470053; a=rsa-sha256; cv=none; b=c7xhsrtrWnbe57xhQjeEqR+Xa+xoIhNG0KiMTkQK9w89b0xCuhEw0WShv0tnNmLTs38Lc0 ugalUOmrElItkEg3Edyoy55N+lmvWZU6Qbx2309rrb1l6JPqigpqOeoQNJbZBFhO5tUuAZ OJWQalHfi8KOgJ9cXMSI3/eFgoajJB/tCbbOx4gByxIIfV5o53L4O6yFaVs00XzIE5ulMD TVQdvrKcXteJUCDuzgAPAXnijoe8FTXA7mKe8eh3wM5thSCK/fRh9DJgc4Ba1hKCHGk9gL CoVuIT6b54jBoiKRdkx4x4vSePbfddboVqIUuodi8uOOHkGqLiFhZ6GWu/sX2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.1.10] (c-73-231-46-254.hsd1.ca.comcast.net [73.231.46.254]) (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 4ZrqtX6Vtzz969; Mon, 05 May 2025 18:34:12 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.96.25042730 Date: Mon, 05 May 2025 11:34:07 -0700 Subject: Re: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) From: Ravi Pokala To: Christos Margiolis , , , Message-ID: <27A08C28-B494-4B45-B593-2F8630592BDF@panasas.com> Thread-Topic: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> In-Reply-To: <202505051757.545HvXUA058583@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 > + A new utility sndctl(8) has been added to concertrate the various I think you want "consolidate"? -Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: > on behalf of Christos Margiolis > Date: Monday, May 5, 2025 at 10:57 To: >, >, > Subject: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3D3ab34225af39fde42be17b6306cc70= 610cdcec96 commit 3ab34225af39fde42be17b6306cc70610cdcec96 Author: Christos Margiolis > AuthorDate: 2025-05-05 17:57:07 +0000 Commit: Christos Margiolis > CommitDate: 2025-05-05 17:57:07 +0000 RELNOTES: Mention sndctl(8) Sponsored by: The FreeBSD Foundation --- RELNOTES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELNOTES b/RELNOTES index 4e0b0a0b3cdb..515facdc7859 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +44e5a0150835, 9a37f1024ceb: + A new utility sndctl(8) has been added to concertrate the various + interfaces for viewing and manipulating audio device settings (sysctls, + /dev/sndstat), into a single utility with a similar control-driven + interface to that of mixer(8). 995b690d1398: ps(1)'s '-U' option has been changed to select processes by their real user IDs instead of their effective one, in accordance with POSIX and From nobody Mon May 5 18:35: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 4Zrqvl4hGgz5td9v; Mon, 05 May 2025 18:35:15 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrqvk1MBqz3l9q; Mon, 05 May 2025 18:35:14 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=PNqfWyFucX34 h3gFMTHtWe+VYk0wjsiyBQvGzKiYRq0=; h=in-reply-to:references:subject:cc: to:from:date; d=margiolis.net; b=jp6OK0WDhnBgjYL9ynk8BgeB4Pf2KyeDhCTNT gMtDHuYwGZpGxAbHSkymU0d+z4A/GCx/i5AVGw4yQuMBCqf7zVQPVaE+flOwYdmRGAUWy6 ytqwiZEbHnB1RfHopthlTnB+08EZ2VN9W+pRmDgNuFkRDYpCDNoO10I4pbQbVn/s= Received: from pleb (public-gprs243542.centertel.pl [31.60.98.151]) by margiolis.net (OpenSMTPD) with ESMTPSA id db0b3fcf (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 12:35:11 -0600 (MDT) Date: Mon, 5 May 2025 20:35:09 +0200 From: Christos Margiolis To: Ravi Pokala Cc: Christos Margiolis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) Message-ID: References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> <27A08C28-B494-4B45-B593-2F8630592BDF@panasas.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=us-ascii Content-Disposition: inline In-Reply-To: <27A08C28-B494-4B45-B593-2F8630592BDF@panasas.com> X-Rspamd-Queue-Id: 4Zrqvk1MBqz3l9q X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Spamd-Bar: ---- Ravi Pokala wrote: > > + A new utility sndctl(8) has been added to concertrate the various > > I think you want "consolidate"? Not really, although "consolidate" also makes sense. Christos From nobody Mon May 5 18:38: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 4Zrqzj4gLZz5tdnd; Mon, 05 May 2025 18:38:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrqzj4Bghz3pKP; Mon, 05 May 2025 18:38:41 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470321; 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=Ev/niFhMvbjL2kTU0DhXrqP4q7nPbBkJ/GfzzXJ5Sc8=; b=wOa9rfAlY3TNVfYOOiCx6pn4tWVQlnrlPc/edsGxRUAszaQhxhxyOGMvgAl6/yz9JBLywi j4jUAUe+Gz/ZdZ5TaKbKBc8jBjKyjjCY4tv4DP7Nep3IyIp59nhtAFARXHIUrYba1gedIf avhop+GhnI9FJrIwks8x8tYwgGfleq8qFb8sNWTyXl65AFzzVQDcVjTvL6GZNrPMhtxBa3 HN7Q5VrcjXMNT9HmaBL8Ce9XncY+Kg8W7as2FzwM77EW5koV9N8GwNvBKToDyRkPF39NrL z85/jFVRkP4BzA8s6suVrPRw2Nvh4AXSl8mqyrxxg74BRXeqMfUcGDL/BtglCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470321; 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=Ev/niFhMvbjL2kTU0DhXrqP4q7nPbBkJ/GfzzXJ5Sc8=; b=X2YpHyrRvxvXzLVIKXTUH2EVEHmxOIZ2CnYRFoZC8A+z8+V2dgQ9ek2R3r+uNoUajYZFXV weoFPvB1c0ZXGDKXspZW1vDsX1RB3FbFaXRqCkW1MtNG/3oET5TCJssB5vJVDbRp92sIXO B9rQabpN4JFqKbQvjUyOKFj0OO3wpnMmxH0x9n3YE3qhJlcx8hbiwN+DM/7M0lC5F0ZAoj pOWQEB4PobjVbsUzgltvZZpor+fl+jq+gAdwe1EkMdEmcImTOfMhdO54wIyK9MaKvYV5mt 9e3XOs9FDVPfJ9Dp8RKknYvI3Re8yb8E/Nl3c//0vxd1QtjUrk3K5I6CkBNjCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746470321; a=rsa-sha256; cv=none; b=v5X28AgDDxMbsteW/PI/eTm7hGoJl7nW759RrtAIlZit9CKMapARp/O32IzNTkpEPG6vGh +NwHxaNxbUwcnXj3fruYVIykdoqykxKBRDI55WDii4JZtzrr9I5S6fTlquwDlXbzovp1sC gCSw6QqmeA2rC9fDzRprci5CTsEhjExxJS7uipretDTZzxdS2bcCmHFD32JkTuIFbzVu3r 3P2okgD8iRnRTuSKCk5PS77SxGYmVfjZd8/qSMnUuSXZ60GELJZifGXElfLhYKxye7AnW7 8Gkqt9YaBT9oHmNIW4jgU6tUlecWPAoBxrlsmlZSG8RzH1Kl7E7vX+3XckFxjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.1.10] (c-73-231-46-254.hsd1.ca.comcast.net [73.231.46.254]) (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 4Zrqzh5ythz8gr; Mon, 05 May 2025 18:38:40 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.96.25042730 Date: Mon, 05 May 2025 11:38:37 -0700 Subject: Re: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) From: Ravi Pokala To: Christos Margiolis , Ravi Pokala CC: , , Message-ID: Thread-Topic: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> <27A08C28-B494-4B45-B593-2F8630592BDF@panasas.com> In-Reply-To: List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 7bit -----Original Message----- From: > on behalf of Christos Margiolis > Date: Monday, May 5, 2025 at 11:35 To: Ravi Pokala > Cc: Christos Margiolis >, >, >, > Subject: Re: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) >Ravi Pokala wrote: >> + A new utility sndctl(8) has been added to concertrate the various >> >> I think you want "consolidate"? > > Not really, although "consolidate" also makes sense. > > Christos In that case, you want "concentrate", because "concertrate" is not a word in English. :-) -Ravi (rpokala@) From nobody Mon May 5 18:42: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 4Zrr4W1qfJz5tfV4; Mon, 05 May 2025 18:42:51 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrr4V1kpQz3skZ; Mon, 05 May 2025 18:42:50 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=J9KUYqLdt3xB Y9TesfrFyc6oaTR9ADhrPMaTNCMfCXY=; h=in-reply-to:references:subject:cc: to:from:date; d=margiolis.net; b=iollTaDZEk17w6SL+rLVssfbRe2nRtSwXs66Z 3lanELf2DEjFxOaZtu0kzSQxvgagMjvi3lAgrAgsZuxmc/7jrDgEHSjOYZk+1/+HTpuj6B CifVgDu3HlTPlfFtp9CBYs1Le4xMFm74c1BZL3Y01MSKWAMZBNUXTa2Me0yVnolQ= Received: from pleb (public-gprs243542.centertel.pl [31.60.98.151]) by margiolis.net (OpenSMTPD) with ESMTPSA id f2405344 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 12:42:45 -0600 (MDT) Date: Mon, 5 May 2025 20:42:43 +0200 From: Christos Margiolis To: Ravi Pokala Cc: Christos Margiolis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) Message-ID: References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> <27A08C28-B494-4B45-B593-2F8630592BDF@panasas.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=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Zrr4V1kpQz3skZ X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Spamd-Bar: ---- Ravi Pokala wrote: > -----Original Message----- > From: > on behalf of Christos Margiolis > > Date: Monday, May 5, 2025 at 11:35 > To: Ravi Pokala > > Cc: Christos Margiolis >, >, >, > > Subject: Re: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) > > >Ravi Pokala wrote: > >> + A new utility sndctl(8) has been added to concertrate the various > >> > >> I think you want "consolidate"? > > > > Not really, although "consolidate" also makes sense. > > > > Christos > > In that case, you want "concentrate", because "concertrate" is not a word in English. :-) Oops, typo. Thanks for spotting this. :-D Christos From nobody Mon May 5 18:43: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 4Zrr6303wfz5tfYQ; Mon, 05 May 2025 18:44:11 +0000 (UTC) (envelope-from eduardo@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrr624Flbz3v5Z; Mon, 05 May 2025 18:44:10 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470650; 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=L/90eGJdf/UJ7CbylIiiOa24n2Ahmm5PhA+f/TSyL+I=; b=j3qdyzenN33oYZmTG3Gzxt4PXOjL9o2y4+0DNJX22SXKFVrhWYdLdMVbe6nGvtnKaEOhF+ yI5nlVrhwnF7ogSex48s7O99XauhlzTkUnGDUvT3JEgiUFlgn8ToouiayA+L7/EAF7I3jH CHm23kWqZviCjNyA7KkZVXVEUFwUA8EFbYEQKsJzmoSP28y0SGtPi+T5Mb98HDRca0SEQO +aSdY2mhE3zki6ak5DG+djXZMcwWax2JMuOhoVTbSzqcYwPBnJ+v1zqlJnTMsYmpDiBgSn JxGU6tpRkJw3mTLjg/9pMsrsL/miNKK0Um+Mtn/906j0cgu0rYjvRYtMhbxhfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470650; 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=L/90eGJdf/UJ7CbylIiiOa24n2Ahmm5PhA+f/TSyL+I=; b=JwvOPDPFEO5TChkYNj0M2C39Ypkdc5Fd4zC/6uh4Er7cK3tpvDgxkuVj9/tManJWs5FnMF J5+B+G/27zUpapGJHrU5+BbTY260jAd4Qqc1O/wT2euefG+cUD2TJBCF8ZCyUngRobUdSM 9dyRhYidc7XNNlbI1CCNQp7yrzRIg9tcCgStNBHmtsSLajhHzRISTnuZI4ox8ziRhVHhsJ SHOSeuxis/3XWhU+NJTnDX6z/rEOevrUR9n7K6qHtoHnC4s/rF4vW5AM1+xz+65R4Sd37n KjvWsvAuPyMyWb5hjzy+aTl7qvvbDVtfMQQONTNUfxddKT6nr8rT01gzCS1NKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746470650; a=rsa-sha256; cv=none; b=SlL2kw+KQBpmZl17/5W2Kgz6xdq9OwTFHN9WrtNgy/KoE36l/OBKwnFbgXDtb58ZZbe1bd 6I9CwPzZw16ziiYZBo6vFfowCs3eQtxsa1cVHlHg/ayhZEZfOLk3CmT5JGDH5ey8Sby402 WNi5abgj+rPDArw0EYkQ0ItVVHq7gHuZQyq/lZ2zwCalyafTR88EzmKWLF2UiK/jlQG6fO 5TSMoauCcNL01uqa77hyYpt8EyKEf2vYbe9wvzj3SejF6ZZN20pavd9E1ySHZWlfS4tDKY JhYZkOfBgOcg3al3Mr6yf0dO2jK9uOXToAXeUj8xym3UUPXsgYkRqXRz3dFn8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Zrr623R3tz8L1; Mon, 05 May 2025 18:44:10 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-7c553948ab4so23773385a.2; Mon, 05 May 2025 11:44:10 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU4liQYOavvtWrQ4dRTO/PWbEMUslED6igPzFI9kPgHDGh3VuRp44GOsOeq/JTaxzBi4ouGa0ej1hPnHHvuXNExtHZUgk8=@freebsd.org, AJvYcCWql/taqaEEmzFXQ1hgFT3h8xwSAw1FFLYo0f43bGRHYUFpZOHyKnPcSgvdLv/+fhKDf8fvOHHV7WCaK5Wf4/7Semrv@freebsd.org X-Gm-Message-State: AOJu0Yxd9TmU/PWI4Buq0Em0H4nja+TBRCGQBWSJP3fud34rltm6sGcb /ksIgZp2FkOGqoO76Ffk5UX3GqdrEtIjKlagV5FFjd6YtAznn7CRu+ItDnjXl4UwNWnLYwQcW0Q meokUADOVXMwplf/xB4vlXK8qqzY= X-Google-Smtp-Source: AGHT+IHeeFZW5ffPVrIgEouwYnBDITa1ygu0v9LFjyqd7VgddRdOQwOwO0onEs9FNWxcYZvOXwJ1K2bLVU1QbF7xrGg= X-Received: by 2002:ac8:7f14:0:b0:472:17b5:dc3b with SMTP id d75a77b69052e-48c333b6e78mr91438931cf.15.1746470649913; Mon, 05 May 2025 11:44:09 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> In-Reply-To: <202505051757.545HvXUA058583@gitrepo.freebsd.org> From: Nuno Teixeira Date: Mon, 5 May 2025 19:43:58 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: ATxdqUH6-YxFkdWvb5qUnCwutA3UWP17YQ9WTl51jjrdZzuOt592ClNCJcxkLwI Message-ID: Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b2e94b063467e22a" --000000000000b2e94b063467e22a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, Should ObsoleteFiles.inc include "sound" files for deletion since it changed to "sndctl"? Asking this because build I'm using from today includes "sound". Thanks, Christos Margiolis escreveu (segunda, 5/05/2025 =C3= =A0(s) 18:58): > The branch main has been updated by christos: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D3ab34225af39fde42be17b6306cc706= 10cdcec96 > > commit 3ab34225af39fde42be17b6306cc70610cdcec96 > Author: Christos Margiolis > AuthorDate: 2025-05-05 17:57:07 +0000 > Commit: Christos Margiolis > CommitDate: 2025-05-05 17:57:07 +0000 > > RELNOTES: Mention sndctl(8) > > Sponsored by: The FreeBSD Foundation > --- > RELNOTES | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/RELNOTES b/RELNOTES > index 4e0b0a0b3cdb..515facdc7859 100644 > --- a/RELNOTES > +++ b/RELNOTES > @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. > > Changes to this file should not be MFCed. > > +44e5a0150835, 9a37f1024ceb: > + A new utility sndctl(8) has been added to concertrate the various > + interfaces for viewing and manipulating audio device settings > (sysctls, > + /dev/sndstat), into a single utility with a similar control-drive= n > + interface to that of mixer(8). > 995b690d1398: > ps(1)'s '-U' option has been changed to select processes by their > real > user IDs instead of their effective one, in accordance with POSIX > and > > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --000000000000b2e94b063467e22a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

Should ObsoleteFiles.in= c include "sound" files for deletion since it changed to "sn= dctl"?
Asking this because build I'm using from today inc= ludes "sound".

Thanks,

Christos= Margiolis <christos@freebsd.org= > escreveu (segunda, 5/05/2025 =C3=A0(s) 18:58):
The branch main has been updated by= christos:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D3ab34225af39fde42be17b6306cc70610cdcec96
commit 3ab34225af39fde42be17b6306cc70610cdcec96
Author:=C2=A0 =C2=A0 =C2=A0Christos Margiolis <christos@FreeBSD.org><= br> AuthorDate: 2025-05-05 17:57:07 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Christos Margiolis <christos@FreeBSD.org><= br> CommitDate: 2025-05-05 17:57:07 +0000

=C2=A0 =C2=A0 RELNOTES: Mention sndctl(8)

=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0The FreeBSD Foundation
---
=C2=A0RELNOTES | 5 +++++
=C2=A01 file changed, 5 insertions(+)

diff --git a/RELNOTES b/RELNOTES
index 4e0b0a0b3cdb..515facdc7859 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -10,6 +10,11 @@ newline.=C2=A0 Entries should be separated by a newline.=

=C2=A0Changes to this file should not be MFCed.

+44e5a0150835, 9a37f1024ceb:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0A new utility sndctl(8) has been added to conce= rtrate the various
+=C2=A0 =C2=A0 =C2=A0 =C2=A0interfaces for viewing and manipulating audio d= evice settings (sysctls,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0/dev/sndstat), into a single utility with a sim= ilar control-driven
+=C2=A0 =C2=A0 =C2=A0 =C2=A0interface to that of mixer(8).
=C2=A0995b690d1398:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ps(1)'s '-U' option has been change= d to select processes by their real
=C2=A0 =C2=A0 =C2=A0 =C2=A0 user IDs instead of their effective one, in acc= ordance with POSIX and



--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--000000000000b2e94b063467e22a-- From nobody Mon May 5 18:44: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 4Zrr6S5294z5tfYd; Mon, 05 May 2025 18:44:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrr6S1SDTz3vXM; Mon, 05 May 2025 18:44:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5/JaQIJ01cJu6yt7TkQ2FrfOGNgOzTZVQty2boi4quI=; b=d5W13CkRBXZ96IJyKZHqBWRhJpdlkcEIoRKUkM6cx7RTeHGDxI2CkZELz1QhvLNx0AqBKD sI8IuoXRNhx59A/2gZGjMI9BGJNu6Tw7k5Hb1IA08i+qC62Bts9C/6vsostmC2qTZdGFnd SUD9NtIT0lLYwfc0an+349A/wPu45NdcsRNRuCNaOaSAdqeKTMiTlgH90PizW8mVWOAxxb FOdyMB8uNUeVHvdTM3BGreMtyJGn8vqb7p6PrnbIXdCvVvFtFF+Xlr4oGby0KU4tLDdaa+ p7HjWd4+v3YlV8Hp/o4yZEcF6PswIHyrcXgB8ZDxBTG/MZH+cc6Lj9C5fvgD9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5/JaQIJ01cJu6yt7TkQ2FrfOGNgOzTZVQty2boi4quI=; b=HwQT1UeCQiTGFZoCRNk92tg07ByGfh8pkamu7oVC12IaDjJl1kWQnaXQZmTX+EycTJ9I9X CAhkbSVsi9Uy7DuNQs76KrAvNz4lacGfgP+sGxIqtUCM77tZdun5oyevvmB52lqFIosENS g8k/Wd09h5pPSg3u7vsMoViaNqIQPeCGFDPhx6ER+shJV5RSq+UInlEU0b7pVYdw/9Z2xC K8uziRTX/bwq/IaBo7mihR3GeEf/p/BLlWafdoi/DzVdq1C03Kqxl/TktPAGDLCw0quBl7 FgRKZ2KoZ1AmxsnWMFmUxR+WeoTIbZVrRrKuJKdpAxSzWD5b4VlHIPMgxs30tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746470672; a=rsa-sha256; cv=none; b=KztBvA7ifhNL2sTDTct1QvWW1CSJXgd0ikcTR0nbzodTzjkiOJkQn/1nl9cV7vRtMwEj40 5+ToaYhEY6T5i1D4xW/tb/rgEyfgja65NVLPsQ3CrxHKRASAMTckmkXRjtDLJ8a6Pw1cu8 SGxAfl5hMixk03lb5Q9k0Sb+iXpL6qD9KJEX7GodXoZpFD/feET1LFDGWDO8BHLr34qaAr TP8Sm5W9QqEbe1M1g13nH07Jme4+lhAQMvmVCNzeyOsBKxU+ua4qQO9HFJgvqoU/Ku2vEV Znu0x3msmIIFv1Q+6oDMOIQTEKw16zJUEIjdpRCrKZZ8eBnNzk0ALctRaw0/Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrr6R4h44z9Dn; Mon, 05 May 2025 18:44:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545IiVSA053821; Mon, 5 May 2025 18:44:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545IiVV0053818; Mon, 5 May 2025 18:44:31 GMT (envelope-from git) Date: Mon, 5 May 2025 18:44:31 GMT Message-Id: <202505051844.545IiVV0053818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: eb60bf2c3130 - main - RELNOTES: Fix typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb60bf2c3130f9e332602a14136160f5d5edeeee Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=eb60bf2c3130f9e332602a14136160f5d5edeeee commit eb60bf2c3130f9e332602a14136160f5d5edeeee Author: Christos Margiolis AuthorDate: 2025-05-05 18:43:16 +0000 Commit: Christos Margiolis CommitDate: 2025-05-05 18:43:16 +0000 RELNOTES: Fix typo Reported by: rpokala Fixes: 3ab34225af39 ("RELNOTES: Mention sndctl(8)") Sponsored by: The FreeBSD Foundation --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 515facdc7859..369ce0d9c504 100644 --- a/RELNOTES +++ b/RELNOTES @@ -11,7 +11,7 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. 44e5a0150835, 9a37f1024ceb: - A new utility sndctl(8) has been added to concertrate the various + A new utility sndctl(8) has been added to concentrate the various interfaces for viewing and manipulating audio device settings (sysctls, /dev/sndstat), into a single utility with a similar control-driven interface to that of mixer(8). From nobody Mon May 5 18:46: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 4Zrr8P2yvmz5tff2; Mon, 05 May 2025 18:46:13 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrr8N07kyz3x20; Mon, 05 May 2025 18:46:11 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=ehPOPcFVBG1L LeQeftZWhfdl42VC17TzainD3S/RZKg=; h=in-reply-to:references:subject:cc: to:from:date; d=margiolis.net; b=Z5aZZ+gtNgfnQ56FADmeUpX7YHAsEWSM/KB/Q E/KDwUc3RErg1BrqzqBP4a9skEzut3sms9vztyzxocjJ1FgQ7JpX1BYDlDzV3nL4f89Yzk iSqlCCVseg9zFHmmFRQCQCtfRUn4fSix5BKtaKqRPdxpcNpgnCuTHgZWxGkirMY0= Received: from pleb (public-gprs243542.centertel.pl [31.60.98.151]) by margiolis.net (OpenSMTPD) with ESMTPSA id 40e1fde7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 12:46:09 -0600 (MDT) Date: Mon, 5 May 2025 20:46:08 +0200 From: Christos Margiolis To: Nuno Teixeira Cc: Christos Margiolis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) Message-ID: References: <202505051757.545HvXUA058583@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-Rspamd-Queue-Id: 4Zrr8N07kyz3x20 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Spamd-Bar: ---- Nuno Teixeira wrote: > Hello, > > Should ObsoleteFiles.inc include "sound" files for deletion since it > changed to "sndctl"? > Asking this because build I'm using from today includes "sound". The rename happened for audio(8) (which was committed a few hours ago) not sound(4), if that's what you mean. Christos From nobody Mon May 5 18:49: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 4ZrrDK0Rryz5tfq1; Mon, 05 May 2025 18:49:37 +0000 (UTC) (envelope-from eduardo@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrrDJ3c30z41Lg; Mon, 05 May 2025 18:49:36 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470976; 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=8ae3XkkBqs2hpyjipOw+hcDWu5ZFPPG7iEJsUin2Tmc=; b=tpRrCXbYIpWOIv9e2YrSi//hWig0tJdNjhUgmxplVPM4NHDgqjoUiukohHyUU+/Hab65LL AhL7B04v6wF9yi2UfsVBklEVwcReyX9IF47LobpqtYvg0WbbMQs8X9FgGYCjlsx0J36suh FqpMvo8EIi1DHakBxDR/ewjHtqW/vNFv8e80kx1mO7OkZOuDce5c+GVEd3Ez2x2TMOFUGd UZUAgRUAptVhJyU8dccg3q8kHcu4h+fOjg5sLs7XbJcccSnMAd8adPkqNW2cU/dFAukv3l S9QkbudFtnKaO3sOVhjZb0M47hGr435j8Y2WRSm4Tu2LjDlwBnm5pdHy28tZIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746470976; 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=8ae3XkkBqs2hpyjipOw+hcDWu5ZFPPG7iEJsUin2Tmc=; b=bl9j/xD7HTtSUebjoPgJXAuvKo6aHA9F8idv8AUmC7gvM/hD8gNOnxy/PM4XQzhYYtd0st x74DeRJz3QgeH5xFhTZL3RJJ8h7tshaC1yl8YOITQIIXRoG6WWxK7AN6JHNTQN+6j18KkU etU6zrNdogzGo1CCDL7qzMq4FMKvXe5Kv1aCEcgzX0NRGgiDs6+9h1mrAPYiYCwU+PfGtS fXopbtW9kAAiofKEQ7UMpp93ybJwUoPThVvErkvdWGtdRSG4i5OpZztFbM8PtmG2UQlznF uOdF87e+0n+ph0f3G/b3DPdst5JwgwmUJEk+/KqWTKifisEqMFnvR9pe8yy6qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746470976; a=rsa-sha256; cv=none; b=ccmUacgMdwIxEpIBamklvhgjJKcqGYAGw1OJKyyPG5xK6ftHZ06ieTDUaVB/8Yp0oUGQYf 9QpoYGRJwEjBUCnLS/e3pWQqGOahmjFIwj8pLGoxGrztLVqSg1yguw1JF2D6l8Gln5B/8a EaDPtLreGhQOPGDEOD5CS1t5ERemzGdiUu2fEvsvOY/GubpxzwvD2Xj8RFdQ/bjbBJlumq 3q5To17jno76g/YIjdl2Iw0VToTb0FFWycvtxr7hJBHuWG/GaEOEQ9xphJfh1slAGNe+s2 S1ejm1u7K76LHdZPafUqnzOhTVCGfZiRIzS76ZPBPRbIUzCqc/xQU91EcdMGzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZrrDJ2v4Nz8cw; Mon, 05 May 2025 18:49:36 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7c549d9ecc6so73627385a.1; Mon, 05 May 2025 11:49:36 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVUf09TAeZV7czYEl3gDjEAPe5oXqM8ay/1JZ3fr4uVqmINptmXiJmjXokZPAJCrYYF0BNs0MUNsJkubuhcfjxmsSNa0XM=@freebsd.org, AJvYcCWMjUIQbwiJgsgAkPikx0noGSa3pd/5TVq8F7Kx9Fe3VnlCT9erzg7av4tBbOQjoP5xt6PBRKHB3PrDrwmoN0LNdyF3@freebsd.org X-Gm-Message-State: AOJu0Yzu73SoO/uzlnB4s9hb9XN5NSlpcAeHnMd3J4DwFyzAaR3KxYYP TTlWRG2fXi8WIQFLPKNn4I2X1n9ASITvgsQApXpX4vllzvRcH1o8rr0xDxkK7kyl1PkNf/DvKt5 1vkjyzgqt2uPW+gTfRvV+5W/eFhE= X-Google-Smtp-Source: AGHT+IHlmZwW5OHMT3hIcgJDvUocWjZMb7N6b3MzSsuX/gZzk4YhfIC/dI3puAnsL+i75bep2DkmrR/8xypGGVFdGt0= X-Received: by 2002:a05:622a:14d4:b0:475:820:9f6f with SMTP id d75a77b69052e-48c3192cea7mr79787191cf.9.1746470975878; Mon, 05 May 2025 11:49:35 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> In-Reply-To: From: Nuno Teixeira Date: Mon, 5 May 2025 19:49:23 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: ATxdqUHXYfNQtyps-Ke-DitIQyngX_LrKHXZKCGLVgJbB7XoMNo3sHW_R8KUH_k Message-ID: Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000020bdcf063467f6b5" --00000000000020bdcf063467f6b5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry, typo. I mean audio->sndctl change. I'm using main-n277015-a9425aeb1b8f that includes audio version. Christos Margiolis escreveu (segunda, 5/05/2025 =C3= =A0(s) 19:46): > Nuno Teixeira wrote: > > Hello, > > > > Should ObsoleteFiles.inc include "sound" files for deletion since it > > changed to "sndctl"? > > Asking this because build I'm using from today includes "sound". > > The rename happened for audio(8) (which was committed a few hours ago) > not sound(4), if that's what you mean. > > Christos > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --00000000000020bdcf063467f6b5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry, typo.

I mean audio->= sndctl change.

I'm using main-n277015-a9425aeb1b8f that in= cludes audio version.

Christos Margiolis <= ;christos@freebsd.org> escre= veu (segunda, 5/05/2025 =C3=A0(s) 19:46):
Nuno Teixeira wrote:
> Hello,
>
> Should ObsoleteFiles.inc include "sound" files for deletion = since it
> changed to "sndctl"?
> Asking this because build I'm using from today includes "soun= d".

The rename happened for audio(8) (which was committed a few hours ago)
not sound(4), if that's what you mean.

Christos


--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--00000000000020bdcf063467f6b5-- From nobody Mon May 5 18:50: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 4ZrrFH6SC9z5tfnm; Mon, 05 May 2025 18:50:27 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrrFH2Mm2z41sn; Mon, 05 May 2025 18:50:27 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=8lajd4Pc419X vi2hCTke5mLESUes2KbpcDwZrIix8Kk=; h=in-reply-to:references:subject:cc: to:from:date; d=margiolis.net; b=PVcbJH14LsXtgRXGUQ/ZmYmPYh4dpiOQk46iS 2iSIzQipoBslbQl7cUN8b3KD1upukhoobrvbdgOQ0dw6ccb/a83MS1YkksojthA7ggc6OO j7BiY4C8JxR9/bo74lJqjcvci+MXSaQoju4xU3y5mMXXtO5kX5xcpptwQXiwnHBU= Received: from pleb (public-gprs243542.centertel.pl [31.60.98.151]) by margiolis.net (OpenSMTPD) with ESMTPSA id 4bfcc96b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 12:50:25 -0600 (MDT) Date: Mon, 5 May 2025 20:50:23 +0200 From: Christos Margiolis To: Nuno Teixeira Cc: Christos Margiolis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) Message-ID: References: <202505051757.545HvXUA058583@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-Rspamd-Queue-Id: 4ZrrFH2Mm2z41sn X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Spamd-Bar: ---- Nuno Teixeira wrote: > Sorry, typo. > > I mean audio->sndctl change. > > I'm using main-n277015-a9425aeb1b8f that includes audio version. Right, I'm not sure to be honest. Christos From nobody Mon May 5 18:54: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 4ZrrLP4061z5tgKF; Mon, 05 May 2025 18:54: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrrLN75pQz45N9; Mon, 05 May 2025 18:54:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746471293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0ak7WtWFoHyu2PfZFjoTd5sFPHciLQ36WQ66P0V6kg=; b=ZL8b/PBGwFKksxa7WDD/UZSJtST+Ncbo3WJWiP3/6R/WJTcyY75VSmw0lVqV714xKa1vzX 2r8pb3YXJdQEaBCh0QzeDs0LLcMdjMWJCF2tKup/2jDIM2L6QxtUG8YkQ77pV8oPR4BKGx SPOp4LxK0x6AT6L5vr6xW2Ds8d8id+jOjfGV0ndOTLWMMHeBjfWHBYSVNBw9ZmJJAWm42Z 3LyIhbm2iJmhBW84EGWFB6hYqvg58DYWZfgTVSnMorQU52v5/6rsvYUcvdj/RI5s33YIhf 79gUd4NDvyskH7WxpE+/zpzGn6mGurpwl8hbYtRapgAFF/zgj3UQE9XfAsqO/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746471293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C0ak7WtWFoHyu2PfZFjoTd5sFPHciLQ36WQ66P0V6kg=; b=bM8/hpUTCftpE6Bt2lpUUzVN3V3PO3uR8Cr8WgDUQBxmcbn4m+0Kj+btdf3sVdO/8rIuAx ziYZxXNg7uMKDHmWhuZGVnJie9jki3Uj5EjOqFarKFMz3BuWbV/hCAmEedEmSAutbSiGy+ mJZkOGcrXhl44/LBlQZTDa2xwBwfXz9WpKsZnHZEviobpONQob2rUVjYQ3c6Urx+7fo8du /u9BTZgdpMMhqJZUPt4ZQjXBFKthZ55vcj+/nrbrnKQSYnf8z14eClrDkh7/AzfDXzrBQW MC/in9QLZwTmtiCgIMCIZXXnWEjNmqNw4s/y00iG40RF8lJWhq4SotSI+eDPEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746471293; a=rsa-sha256; cv=none; b=o2pi0Q99R10UyOaz2ivwXoFFatStAhUySgCgZhW0YwU/63ZU3Ou34gPl0JwkSDaSMV8n5L VV0ARsN/IzA4X99592wekx0bKmOXY7Dqzr5vLQPCG+LKtSw9he9HMzjlmnhEQcO20H+FAt h7YZBpJQWOQMAq+gqSVRV7Gjuu9pRcDAmKaPBCrdliuHRYkqSHfK+P6jJjO2hB+6ugxIzR E8BKdZHYp274Cf5HTgcyL2Pf6a6akg/qB6ijaXAmHmv0KlNx9KXxKlSec3iZdrh92BrJqB 9QalQpzPYYrmQuBs8uIm5P7RxdCNMPDpojePfgPP4iwss1hV6CklDBHHtMORcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrrLN6PL0zBBM; Mon, 05 May 2025 18:54:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545Isq28072233; Mon, 5 May 2025 18:54:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545IsqEK072230; Mon, 5 May 2025 18:54:52 GMT (envelope-from git) Date: Mon, 5 May 2025 18:54:52 GMT Message-Id: <202505051854.545IsqEK072230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 01a5f3137ecc - main - Remove leftover blank line from pkg key 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01a5f3137ecc77c8143f6448054ed16b267c31a4 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=01a5f3137ecc77c8143f6448054ed16b267c31a4 commit 01a5f3137ecc77c8143f6448054ed16b267c31a4 Author: Ed Maste AuthorDate: 2025-05-05 18:51:13 +0000 Commit: Ed Maste CommitDate: 2025-05-05 18:54:41 +0000 Remove leftover blank line from pkg key file $FreeBSD$ removal (commit d0b2dbfa0ecf) left a blank line at the beginning of this file. Remove it now. Sponsored by: The FreeBSD Foundation --- share/keys/pkg/trusted/pkg.freebsd.org.2013102301 | 1 - 1 file changed, 1 deletion(-) diff --git a/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 b/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 index b83b9afef526..6ad9b3f67557 100644 --- a/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 +++ b/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 @@ -1,3 +1,2 @@ - function: "sha256" fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438" From nobody Mon May 5 19:03: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 4ZrrXH4Z47z5tgc5; Mon, 05 May 2025 19:03:27 +0000 (UTC) (envelope-from eduardo@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrrXH1QfPz3GR4; Mon, 05 May 2025 19:03:27 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746471807; 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=yixk5XNUjZpJ/WOTQYxRxF9XrJIHG8m38MNpxrW9cMI=; b=WSzr3o1twrm65K/ifoEvvjxAn4sT9upWtahaO6S4nHmP/YnhqUf6S6LdqbpmQ7B+5+5BDy tE4NKsEg5Dk15yFfYYVrh52xthFrod946PPWkKi3UnCtU2u2ZiX2LlJ8ytbYHUjtPuDVM1 59B7TYc7zKHfexLT74+Gtm1u477YyFQMXdLEq2MFWz9btsytCbWiLwjPTOjUXHln69dsaX szey/xGAR0jUwy868RFCAGZN18k+K0/PMfGeDf7u6paHAHxVWtMy/xTbrlUQKYepvlV1mt klNleA8oTbM2BcekfKbUQs7r0eWoH3fmVsGa1eq/K+IrBAafSWA51r3L5jymMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746471807; 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=yixk5XNUjZpJ/WOTQYxRxF9XrJIHG8m38MNpxrW9cMI=; b=ymN5d4vk7bXHgcHb1+DEIvYGmrIT76QUPSFQYtL6a+M/piopokK2c9FnmLEjOEkz8SVIl+ EUe/5zn18Q2OXJyAZcJB/i+Ez5ztjPeAQp5uh2UkfEyqxCHvVqTivhWOjmxGGqLnl1ZSlw 8CgPt/+K4WE8aZmXGEqzGEvyimqn1NqywlGLIrGDm80qR1Hrt98gUbMLnzztGE8zI9N39S DZ5pw8khlmPm+bzr71A3kkGlwBna3h6/f5/UJL0wrMdqbU14DP8c/qXXK0zfgsVwk3Bt9g bCXAR9oggEBzlLtrpQJteEr6KKyjtSfltjNb6EiUcVOYMBAkyIffw58U6+hZKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746471807; a=rsa-sha256; cv=none; b=p7/ZTDUUo+v/s5laRToeLVewfwgy9zhVyhVliOl+M4UNfg3ZOlTRYK9Nuz0441Vm/OeC5R aE4jg4rP2XjcASZqhVnXTjvU5KRvcVN7BGaUqWYtm51Qn3qJWX9Y4Z/ZLmD/7rycbZ/rXi sxytrMNaHuAh8Qe0BThgjin89pnnFFNrVjmGPNfyzQ5OQb3SrxvUpm6NBwBl0Cq5Mna9F9 K9AzU33eI2KmBxGY79lLAny431lEfiuyLOP5ZkOXg5CyQbMBsyCTmy1kfxK0at+GOz2BCD tQdHKj6bqlkIATAUuJgSNajFEbzeIDz77DO0ZNQK18W8eImCmM1lskWhN+9Xlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZrrXH0Qw6z9Nq; Mon, 05 May 2025 19:03:27 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-476a2b5dffcso10147621cf.3; Mon, 05 May 2025 12:03:27 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUoJj9mNVACFXsQJKE47U+vMN3wB1yxK7cEJXNWT2cQUsxQnJgCZJQvgem+urpKcXkcFB0n1dthQktSn5k9ZPgW5ZCLiso=@freebsd.org, AJvYcCXfDX9Gi+pyQHqbXu2yAmHazUMPwd0kV80f3c/Vpp9or80Mf6c9ophrX9Kb0ygl4qyB9EA7CRxgI2m1uHv1RyhLgcqD@freebsd.org X-Gm-Message-State: AOJu0YxGWV9SvA26jDIPl7tz3/3ymhIGsKv9N4azewieETVWy2nbg3gN AM6cpSeqtFNcRGlLoimjvG5ZLop4xcR88d/eH/uLjJy3JpIg7IU00ZrIh6fRqUp7ie4mL0g8Xy6 Xper7li/4HmTl7AJGdcbBC3JMyK4= X-Google-Smtp-Source: AGHT+IFskrL4yrOuxE4mKlpe2xYXkz/ZDEBQQ3CYPIp1tXBJIL5z9Loi/EEEPVmauqxeJ8Rl6/qfB8MJCZejpKLelSI= X-Received: by 2002:ac8:5ad5:0:b0:476:66fb:4df4 with SMTP id d75a77b69052e-48c2e091732mr74776441cf.0.1746471806222; Mon, 05 May 2025 12:03:26 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> In-Reply-To: From: Nuno Teixeira Date: Mon, 5 May 2025 20:03:13 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: ATxdqUEnA2DWFRD__PVCTkd-ZiIDC0KU1QeE7XGTUinUNt8sT-F3tvcZWB_IS3Y Message-ID: Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009ec8020634682770" --0000000000009ec8020634682770 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ok, I installed commit with audio. Next build it will be sdnctl. I will have both installed. Let's wait since I'm upgrading again and do that check. I will run `make delete-old delete-old-libs` to make sure. Christos Margiolis escreveu (segunda, 5/05/2025 =C3= =A0(s) 19:53): > Nuno Teixeira wrote: > > Sorry, typo. > > > > I mean audio->sndctl change. > > > > I'm using main-n277015-a9425aeb1b8f that includes audio version. > > Right, I'm not sure to be honest. > > Christos > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --0000000000009ec8020634682770 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ok, I installed commit with audio. Next build it will be s= dnctl. I will have both installed.

Let's wait si= nce I'm upgrading again and do that check.
I will run `ma= ke delete-old delete-old-libs` to make sure.

Chr= istos Margiolis <christos@freebs= d.org> escreveu (segunda, 5/05/2025 =C3=A0(s) 19:53):
Nuno Teixeira wrote:
> Sorry, typo.
>
> I mean audio->sndctl change.
>
> I'm using main-n277015-a9425aeb1b8f that includes audio version.
Right, I'm not sure to be honest.

Christos


--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--0000000000009ec8020634682770-- From nobody Mon May 5 19:04: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 4ZrrZ626F4z5tgdT; Mon, 05 May 2025 19:05:02 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrrZ55Gckz3Hbk; Mon, 05 May 2025 19:05:01 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=gtB6vKaMPx3m OwiCs5h5muRVDoyaIqhCrXWwuA6ZkHc=; h=in-reply-to:references:subject:cc: to:from:date; d=margiolis.net; b=n/XslRBUi+8wphJGmBkysN92gtHA22mHJXxn0 f+WWp1vrGwcL4NldZg3chrIhpwo/y2PUW6Vh5LAdKJd/kh/KK8yFVQR/tDteHcj2Ulsp8b jJGq4wsA7WEaIsG1iFh336NLJKsEKmOU6WKyL3heo3XetH/8t/++DYJ1c3jo7fSo= Received: from pleb (public-gprs243542.centertel.pl [31.60.98.151]) by margiolis.net (OpenSMTPD) with ESMTPSA id 4fdcbf86 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 13:04:59 -0600 (MDT) Date: Mon, 5 May 2025 21:04:57 +0200 From: Christos Margiolis To: Nuno Teixeira Cc: Christos Margiolis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) Message-ID: References: <202505051757.545HvXUA058583@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-Rspamd-Queue-Id: 4ZrrZ55Gckz3Hbk X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Spamd-Bar: ---- Nuno Teixeira wrote: > Ok, I installed commit with audio. Next build it will be sdnctl. I will > have both installed. > > Let's wait since I'm upgrading again and do that check. > I will run `make delete-old delete-old-libs` to make sure. Let me know, thanks. Christos From nobody Mon May 5 19:27: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 4Zrs4W0Mg3z5tj2L; Mon, 05 May 2025 19:27: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrs4V6PHXz3cjF; Mon, 05 May 2025 19:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746473274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yl5TDhIJi21qOgdkni8ZQk2sowkneLCoxJOWXPUie2Y=; b=RpTIgMDacuoKmuhQ805QLT7yU/C376O1rm5VcdOtaHTmLxjcqYO3flX2+26OL1EBq1eOS9 I8tIfSIqz2iz/FPUOxyAxo8RmiFXEWge1xX0afirUpGo1mQg0uBa18fU3uLZ7YsPjTYeru EpiVEEluIhl8/QLnv17hZhKAfAf66l69jt317nG3crWKbTh0G/Ct6TesdzbeGXaX2x7Xv5 2RtX7UTAvunuLJ9fcrB1RxxwwWUh6X06HafU6IGEePetxTM2m5KglX0yocq+HD9hT3Yx/i /TbBmZ4S2W4RW5aeQqnR6uiThotrRuE9cmDfjp3NLWtUEW0I0HSIQBu12VNQ2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746473274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yl5TDhIJi21qOgdkni8ZQk2sowkneLCoxJOWXPUie2Y=; b=K+l6tp7/FcL3aYwDGnanjob/0JcCgzSw29nbvcenWTlucVmIjR6lCB815wapUmxBVpIdUv UveCoWBn212md+5NPXrpKMimIsaQHjzR7zf/bA9OXta1MIQVZowrLsPXb7xUdj7mNMg8v7 D2SQdAVpWB8G/Jpf5PumiaFDPT+td8aPpIDJDaWrmxciwpWATIsuK9IutOS1nr/Di8Les/ iIRODd1aUALI2ngmEEUd9KowllzmmWwE04ZlEXJiRAckKUUYktnht9l4gzSlonVOJnaoVP GN6GF/CEWLh/euM3G7l1RrslvcM+UxGfi4lp5TMDx8dik2T/C8lL4y7Wq471+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746473274; a=rsa-sha256; cv=none; b=nc4km976aBmQI40/YzXrgJzKzPEVCEV66f9aMu+1fvjxVbitH9SqIQLexCYlOsHHTDY/UL GslzDWRGpPKZhdWQCyFXokmvMgIHy+b7uwHjPLShRVk67Tg28PAgvnSxjEWssW5VsLKO7v ainyOoZkqNkzQj//87LHGLEVXE1KFVxGbFHDDedNmrcdg3DcP7oHJoIWeeToc9y7pQATu9 lCPIRFVCGK7mes3Io8GAa47pxkdmCFP9WtWlvEJmgbn2WwZeLw5mroZeJGvVwuFME0w/HQ dYA9lu07CTfSh95zRarjspBzU8jRJSe8Bj4ADnpTH+nll6BXkaYYScRH34xZ8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrs4V5d6dzByH; Mon, 05 May 2025 19:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545JRsqW030361; Mon, 5 May 2025 19:27:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545JRs4C030357; Mon, 5 May 2025 19:27:54 GMT (envelope-from git) Date: Mon, 5 May 2025 19:27:54 GMT Message-Id: <202505051927.545JRs4C030357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 330787ce3acd - main - ObsoleteFiles.inc: Remove audio(8) files after rename to sndctl(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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 330787ce3acdef628dd6d1df481321a9276afe67 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=330787ce3acdef628dd6d1df481321a9276afe67 commit 330787ce3acdef628dd6d1df481321a9276afe67 Author: Christos Margiolis AuthorDate: 2025-05-05 19:18:23 +0000 Commit: Christos Margiolis CommitDate: 2025-05-05 19:27:45 +0000 ObsoleteFiles.inc: Remove audio(8) files after rename to sndctl(8) Reported by: eduardo Reviewed by: kevans Fixes: 9a37f1024ceb ("Rename audio(8) to sndctl(8)") Sponsored by: The FreeBSD Foundation --- ObsoleteFiles.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 52cb219c6e89..1793eb4ba582 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20250505: Remove audio(8) files after rename to sndctl(8) +OLD_FILES+=usr/sbin/audio +OLD_FILES+=usr/share/man/man8/audio.8.gz + # 20250409: removal of iwlwifi firmware files OLD_FILES+=usr/share/doc/legal/intel_iwlwifi_firmware.LICENCE From nobody Mon May 5 19:29: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 4Zrs5v2xBNz5tjHs; Mon, 05 May 2025 19:29:07 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrs5t3VQgz3dMy; Mon, 05 May 2025 19:29:06 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=KZc0pXBg54gL kMhgcObLPfHD8l3qnd/+t2YNvXy6qUY=; h=in-reply-to:references:subject:cc: to:from:date; d=margiolis.net; b=PYKHe19+cqOOT264WD3Z36s8CSbunuEHoHPsJ GqucfS84mis6eRPArQ2cy+IFgXv28RDbX04Ng+5oJO9XIHO0pgAFVNCMf129pONtGT10sv PwUsxnK90qY3gnC/ApXD/0MJROja+nQJriq1RKtUs2cCKxuGyHgdUvvGNh5lwdCg= Received: from pleb (public-gprs243542.centertel.pl [31.60.98.151]) by margiolis.net (OpenSMTPD) with ESMTPSA id ebc0d5ee (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 5 May 2025 13:29:03 -0600 (MDT) Date: Mon, 5 May 2025 21:29:02 +0200 From: Christos Margiolis To: Nuno Teixeira Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) Message-ID: <7zpdseoc2avm3tpdv3wp6rs4lbezuirhgysizslppiowqbtqju@sy5p5hnrqd7u> References: <202505051757.545HvXUA058583@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-Rspamd-Queue-Id: 4Zrs5t3VQgz3dMy X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Spamd-Bar: ---- Nuno Teixeira wrote: > Ok, I installed commit with audio. Next build it will be sdnctl. I will > have both installed. > > Let's wait since I'm upgrading again and do that check. > I will run `make delete-old delete-old-libs` to make sure. kevans@ advised that we do add an ObsoleteFiles.inc entry, so here you go: https://cgit.freebsd.org/src/commit/?id=330787ce3acdef628dd6d1df481321a9276afe67 Christos From nobody Mon May 5 19:32: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 4Zrs9b4kZmz5tjgS; Mon, 05 May 2025 19:32:19 +0000 (UTC) (envelope-from eduardo@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrs9b2r8Nz3gB4; Mon, 05 May 2025 19:32:19 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746473539; 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=wi+CZD8mUPLc5ye7OkN4CcV18sg2HRSRWFQMl4cmxkA=; b=oFqQJHcZA/Ntk0rSm3QmBdKCO1b9rAIP1RALEGmWQxKHM+V/5nrcn8NObqpUnfdm0AGFhb +IOMRgR1wLXsFlizPCxrBnEFSc8jb+O4eAzUEtCXKYim7zJQXHED+/fT9XsXn9PtcvIq+R xYmCU/RJElQQ8fFqSX5KJMlyZLCKiUSgBInybmD5n9vCSDKoRWiwMC8MuWWPY7k3CDkN/t VUgZR6X9GpfqWZxbWOTz4BP2yiwrFZVzTr0Cwtr9Tv/3RQ0fiOxSuc1PgaNkzal8dxroR4 PD9yyZ/iJ/oYa9nB3ijHQ/xASm8YGqilVVg2o9sOEMiycpQ39YPbIv2AOroPmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746473539; 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=wi+CZD8mUPLc5ye7OkN4CcV18sg2HRSRWFQMl4cmxkA=; b=O9Ehtc/rygjYJQJP59PeTGYQbpJSBdHwrqYeuE7L56I/sOanCJgcuEwAS+DpmRmcaYO29z hW/F4TAYd50ZyThDfw2l6FXO2f5oQ65vaNCx9HR904tZbxK/UsqQfVG4uaSRgFhZbWq10V B1SSSHI7AzVdRU+Z7arsevLFRgw7PNGDIw7eWOnk3GepnSD0sXcLlpyfmcCA0EzjKlsqno NvYVdirzj0EBShTZGYuN3/cfwHUKAPBddJXzVg6MTl3RncdaK1QzCj5wXEaQ2EZmuHnWPv gdmJ0MUJhBhQo7uCVnl5uZjq6aqbn3HuuHQWD9lT/E3MDwdKVfRrEpD4cB8zkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746473539; a=rsa-sha256; cv=none; b=te4zROuJ52UJpFpNbTUGtPcr2ZuJTEWmSXhAiqwmwiGGOQwyExY7DEFcRI+mdurS7cdjxb TLT2FUiVIGBKlnCFbWnmEvOJLfk+KN75rRk6FF5GWWD0mJ8rBu5FAfAtC+I/55eMHKfXgA mVFWhfel7ktuE20QWkWRIzGTieNUx9zJq34MZq1Z8hDS3W1b3SdtbltpYclporzzIBNz3R 6HCrsV4HQSWO6gjNngdtaQTpJPi1e2Qjr78/J9qpvUWLW+OqJhxzLkoMOd52fKIRmmNlin yMX3CJKA1OXk14wBs1i2hwwKWUFTUHc/ycjAsdt1UXH7CdFg9G6tP1tGU9UbLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Zrs9b2HGWz96r; Mon, 05 May 2025 19:32:19 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-47680c117fdso9331561cf.2; Mon, 05 May 2025 12:32:19 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWhYhb3HunK81h7aDffVvTqyTKFSaOgIsEnUsOsWVPd903Apg6nky6G89vnv52tsbbFOSce+q3orWYmWJ69YvzlFmIa@freebsd.org, AJvYcCX7s+xyA+IaNI/Si+Dg8uJHOgPF6ESs39o74Pqrqmesg1LYiVzOSiBcPYzod5dT2xgFib09AgtwcpzjiVwb16+x7IBVSfE=@freebsd.org X-Gm-Message-State: AOJu0YxFuTMuNeZGROEgCTtpLeTUWyOD5WIRYMaTXElZ1u5ReQZLTBKs S9/JBWRa44H8OZiL5SSIp1HZQGxkCsIrjY2yPyBMP/0vYRNcVBFbc/tE0l7Y6UXVpnBEhfSmLjT kaDXZavg22mwo7mhs43Cynr2voOY= X-Google-Smtp-Source: AGHT+IGHwAaTPt3tvQEu4HdQo51C/v1a+PikyrIb9C2ICBBYnefwNI2UbV4Ldu8T8uboEu40jlNlscNUeBhkSBWsdc4= X-Received: by 2002:ac8:5ad5:0:b0:476:66fb:4df4 with SMTP id d75a77b69052e-48c2e091732mr75340001cf.0.1746473538859; Mon, 05 May 2025 12:32:18 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202505051757.545HvXUA058583@gitrepo.freebsd.org> <7zpdseoc2avm3tpdv3wp6rs4lbezuirhgysizslppiowqbtqju@sy5p5hnrqd7u> In-Reply-To: <7zpdseoc2avm3tpdv3wp6rs4lbezuirhgysizslppiowqbtqju@sy5p5hnrqd7u> From: Nuno Teixeira Date: Mon, 5 May 2025 20:32:06 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: ATxdqUFI6Dh-3yMQQkS8Bykkbl-1xjTCJ8y4C48Mf0BQAF0vbTSKEVqhRqSMIPk Message-ID: Subject: Re: git: 3ab34225af39 - main - RELNOTES: Mention sndctl(8) To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e4b9900634688e56" --000000000000e4b9900634688e56 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks and sorry for the noise :) Cheers, Christos Margiolis escreveu (segunda, 5/05/2025 =C3= =A0(s) 20:29): > Nuno Teixeira wrote: > > Ok, I installed commit with audio. Next build it will be sdnctl. I will > > have both installed. > > > > Let's wait since I'm upgrading again and do that check. > > I will run `make delete-old delete-old-libs` to make sure. > > kevans@ advised that we do add an ObsoleteFiles.inc entry, so here you > go: > > > https://cgit.freebsd.org/src/commit/?id=3D330787ce3acdef628dd6d1df481321a= 9276afe67 > > Christos > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --000000000000e4b9900634688e56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks and sorry for the noise :)

Cheers,

Christos Margiolis <christos@freebsd.org> escreveu (segunda= , 5/05/2025 =C3=A0(s) 20:29):
Nuno Teixeira wrote:
> Ok, I installed commit with audio. Next build it will be sdnctl. I wil= l
> have both installed.
>
> Let's wait since I'm upgrading again and do that check.
> I will run `make delete-old delete-old-libs` to make sure.

kevans@ advised that we do add an ObsoleteFiles.inc entry, so here you
go:

https://cgit.freeb= sd.org/src/commit/?id=3D330787ce3acdef628dd6d1df481321a9276afe67

Christos


--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--000000000000e4b9900634688e56-- From nobody Mon May 5 19:38: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 4ZrsJb3GM1z5tjx1; Mon, 05 May 2025 19:38: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrsJb1YnMz3kK6; Mon, 05 May 2025 19:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746473903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RrWoYATLdf8eWTFmih3KjHziFzC4B8nGLFoMiI9VXn4=; b=GnNAzMkNjC7RiDZZ+iK5afpbCQF2qgUQEo/Zzb6DRtiw84Cvf+Em3ubf4Acvz3cdItKALC 3zoh2vwdI9VGE8AgnH7otyEewRezJ8b1a2oqdSugck9mBDqmChuOlRtUy+euC3s92C7XC+ 27dHa6/wV6KNI5OQRIG1qtFtqqZQKhTsJcVkoS3tLi9VGT8/yBtNgKE8UuTWrR81Pv0+Qt AVkie8idA/H3nRJwSsQesq02iH5ecLlFpR3oAhjiinaxAS81fNzHV3aVnFeD80Cc0IH7ZK O1Y6H2MkdHQ2E6PF14hdAiig95Wl9V44l/q+AIrh3Y0KTVLYnMxwAH0jP2Jxeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746473903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RrWoYATLdf8eWTFmih3KjHziFzC4B8nGLFoMiI9VXn4=; b=x7J3ujUwGnSoSH0AfCx8lgpen9ITIf4gAHHyzu7+VfBUHIWtgp/DE2G+6hSSb0dmPYHzcs Uriw9NNwJbOboej9WB5Es0B6678Eb8zn0dAoyttsBuYTymqJqPJqhZI8dnRAK7XgYl4jQH aFDznySlkdrKr0TXGSac2oi6ZmACL9eEZ2lqcebbWSOiUvNMhgFoYEFzwLpldJWsvUcrh6 /iwEyM+R2fXYAmP7myYwx4ZWNq7bPYNxWZU2Up0hd/rNKjsdANTEUd2T7bqG+c7NKqc3W7 hyRkhj6OnBTk0UimU79AqGNAcRfbq8UIu24RvpD7ByW03p4N0RCKsUthBxdy0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746473903; a=rsa-sha256; cv=none; b=mWpmI2kSDGyCFo5RMaCB69SNhvXsZJvNDfQv5gyYJl2L8TDAfAfKow8fCNzULrwnHsimMq 8703VD3TR/9c1LL9HRTvF0O45di6r7Nk5D9S0YFE6aZwZ/Xot8PaYrUzndrw3/ugfy8i5a kB89DwNUofR+CpNjKXYQHH0U5Q7ZHBTjfajuZ7dbtcqQFZKme8OIUYBs75TVhOBmcD/1Sv euYxKFCF34VQqW/mrmkBVu/fu6VNpq5HcJJxDSNMpTKGIC1v0tnfJa3sq2O4wynLhvvJUt BxFzTUsDhljRC/CIAgygqS3tLfLOLzovf662Gk1cmVuVvIQ0vzcYSjh7kmP17Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrsJb0mBXzC1h; Mon, 05 May 2025 19:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545JcM5t048531; Mon, 5 May 2025 19:38:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545JcMF0048528; Mon, 5 May 2025 19:38:22 GMT (envelope-from git) Date: Mon, 5 May 2025 19:38:22 GMT Message-Id: <202505051938.545JcMF0048528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fbd7087b0be2 - main - strings: Unconditionally install ELF Tool Chain's strings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: fbd7087b0be2f327f806a85b92789a719138df8c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fbd7087b0be2f327f806a85b92789a719138df8c commit fbd7087b0be2f327f806a85b92789a719138df8c Author: Ed Maste AuthorDate: 2025-04-30 13:35:54 +0000 Commit: Ed Maste CommitDate: 2025-05-05 19:38:06 +0000 strings: Unconditionally install ELF Tool Chain's strings llvm-strings may consume a large amount of memory while reading the input file before producing any output. ELF Tool Chain's strings is small and lightweight, and we always install strings regardless of WITH_/WITHOUT_TOOLCHAIN settings (as it is useful in many contexts). Return to always installing ELF Tool Chain's version of strings. This reverts commit 81fa5c4a828bec9f1ead280c59c31bd423e6eeea. This reverts commit 7ca3db1999cd967f9d6d7b259aa7af54aae14a5f. PR: 286605 Reported by: olivier Reviewed by: olivier, brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50084 --- share/man/man5/src.conf.5 | 4 +++- tools/build/options/WITHOUT_LLVM_BINUTILS | 2 ++ tools/build/options/WITH_LLVM_BINUTILS | 2 ++ usr.bin/Makefile | 8 +------- usr.bin/clang/llvm-strings/Makefile | 7 ------- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 2a052ad41d26..b3a327069393 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd April 30, 2025 +.Dd May 5, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -949,6 +949,8 @@ Regardless of this setting, LLVM tools are used for .Xr c++filt 1 and .Xr objdump 1 . +.Xr strings 1 +is always provided by ELF Tool Chain. .It Va WITHOUT_LLVM_COV Do not build the .Xr llvm-cov 1 diff --git a/tools/build/options/WITHOUT_LLVM_BINUTILS b/tools/build/options/WITHOUT_LLVM_BINUTILS index 244bec49e695..35cc0c0e034f 100644 --- a/tools/build/options/WITHOUT_LLVM_BINUTILS +++ b/tools/build/options/WITHOUT_LLVM_BINUTILS @@ -13,3 +13,5 @@ Regardless of this setting, LLVM tools are used for .Xr c++filt 1 and .Xr objdump 1 . +.Xr strings 1 +is always provided by ELF Tool Chain. diff --git a/tools/build/options/WITH_LLVM_BINUTILS b/tools/build/options/WITH_LLVM_BINUTILS index 130997b7e9bf..164e6e8ffabd 100644 --- a/tools/build/options/WITH_LLVM_BINUTILS +++ b/tools/build/options/WITH_LLVM_BINUTILS @@ -14,3 +14,5 @@ Regardless of this setting, LLVM tools are used for .Xr c++filt 1 and .Xr objdump 1 . +.Xr strings 1 +is always provided by ELF Tool Chain. diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 87896a2c0781..7f35a87b0d93 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -140,6 +140,7 @@ SUBDIR= alias \ split \ stat \ stdbuf \ + strings \ su \ systat \ tail \ @@ -250,13 +251,6 @@ SUBDIR.${MK_TOOLCHAIN}+= nm SUBDIR.${MK_TOOLCHAIN}+= readelf SUBDIR.${MK_TOOLCHAIN}+= size .endif -# Include elftoolchain's strings in build targets even if using LLVM_BINUTILS, -# as we may later install with different options. In particular, the release -# artifact builds use default options for buildworld but install with -# MK_TOOLCHAIN=no which implies MK_LLVM_BINUTILS=no. -.if ${MK_LLVM_BINUTILS} == "no" || !make(install) -SUBDIR+= strings -.endif SUBDIR.${MK_TOOLCHAIN}+= c89 SUBDIR.${MK_TOOLCHAIN}+= c99 SUBDIR.${MK_TOOLCHAIN}+= ctags diff --git a/usr.bin/clang/llvm-strings/Makefile b/usr.bin/clang/llvm-strings/Makefile index f01a012b0cb9..dc0d77004fd8 100644 --- a/usr.bin/clang/llvm-strings/Makefile +++ b/usr.bin/clang/llvm-strings/Makefile @@ -1,5 +1,3 @@ -.include - PROG_CXX= llvm-strings SRCDIR= llvm/tools/llvm-strings @@ -21,9 +19,4 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} -.if ${MK_LLVM_BINUTILS} != "no" -LINKS+= ${BINDIR}/llvm-strings ${BINDIR}/strings -MLINKS+= llvm-strings.1 strings.1 -.endif - .include "../llvm.prog.mk" From nobody Mon May 5 19:56: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 4ZrsjN20Hgz5tkXY; Mon, 05 May 2025 19:56: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrsjN1bXBz3w6M; Mon, 05 May 2025 19:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746474984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sMhccBrLwlV8WZPsoWv0yxjKXbHcgbucg5ONmbv4h5w=; b=RY6V89sMsdqEsm5YYEB7gDst9l8eM8LmHqnmNMJdAGb9XUzpOrhzG/g2OdYr8q0E8TNoRS hS7eFhrMjtz+Dk6rwt3UCFo4ikIX446Mi2w7GM9xEaw/xvQLlINXqdaqgsyzUH+EwhOe4d Piw/oX1qya8d4uoMqe7g8YFi7NddBCZACXPb092h8Ez7hqfy6Eb5L/EwuEs7aHeclck+CS PEOwnXg6kQK6I5wTfutC1Bnqr/l9VFz8S4BfUpPNpIR/czeTIpKiWKyDhInAfO59Vet2Gg y2shCwYTf9I3GL95HrLvzoJ/Oe1tk2hpbvs94VoEXpZsK0y6bTfivqNWdXEg3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746474984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sMhccBrLwlV8WZPsoWv0yxjKXbHcgbucg5ONmbv4h5w=; b=o0pIzvMGyB5HjpQJofSREv6VgO19hV/FxIG5V12o2pNEH/rGg+1ii5lpMzvWKanlLhnb28 2AP0tecB9F54HPOT5mCvu5kWhad6i1gj63tC3djEy+v95+HKCOcIPCxjrIpPi8IhOYOALD VYyMTgFWzC4UE2XvzCm5KPBOh8t3nrFcy56gAwIhuMKYhVd4v+8sfU4fDLIqVBOHteUFHE Okvquf+gpj6W9c305QEkUeZ5mxhxNcNBrjnSBuUHFGRVqDNj/ayxtmI81WO0kIFQsi4ImM hUrh7zf8Y8KGXR+/lYotMtBTPy2FBa1Y0UbwKP/EhwyNbQrkJh6as1+jvN44gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746474984; a=rsa-sha256; cv=none; b=v1wVRM6mDLHSrJMEDYtjiPHm7kcjbrmQfSNRe7PL64/bFhDp77PA6HKCe1TORLz1b9nvh7 R2/dBzMt1jTNJoXquISCJj/cIKZmv3pmIreEgFCy7Ayq3krXleUKimrO+GhYbqg5AG4EnQ KZheeq5EpStERbQ83o+m10RTSxWMZKsgymcZA59VkFHzxN5yBPo8BylzQxMeqEFH2q0LMb D3XgKI9bKn2niQ+n8Wnqd0HTNypD8MIkTmhbhVpffhJmprDgCEODvNzWoNkgtxaCZGNmDG KWFvcRFO/oEDcfQmWkDxcJuD4EYNq7zxtZrlvH9CZCv5x2O9dB1W5KPEqLl2dA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrsjN0q8MzCf6; Mon, 05 May 2025 19:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545JuOWq085711; Mon, 5 May 2025 19:56:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545JuOPR085707; Mon, 5 May 2025 19:56:24 GMT (envelope-from git) Date: Mon, 5 May 2025 19:56:24 GMT Message-Id: <202505051956.545JuOPR085707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: d15792780760ef94647af9b377b5f0a80e1826bc Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d15792780760ef94647af9b377b5f0a80e1826bc commit d15792780760ef94647af9b377b5f0a80e1826bc Author: Gleb Smirnoff AuthorDate: 2025-05-05 19:56:04 +0000 Commit: Gleb Smirnoff CommitDate: 2025-05-05 19:56:04 +0000 unix: new implementation of unix/stream & unix/seqpacket [this is an updated version of d80a97def9a1, that had been reverted] Provide protocol specific pr_sosend and pr_soreceive for PF_UNIX SOCK_STREAM sockets and implement SOCK_SEQPACKET sockets as an extension of SOCK_STREAM. The change meets three goals: get rid of unix(4) specific stuff in the generic socket code, provide a faster and robust unix/stream sockets and bring unix/seqpacket much closer to specification. Highlights follow: - The send buffer now is truly bypassed. Previously it was always empty, but the send(2) still needed to acquire its lock and do a variety of tricks to be woken up in the right time while sleeping on it. Now the only two things we care about in the send buffer is the I/O sx(9) lock that serializes operations and value of so_snd.sb_hiwat, which we can read without obtaining a lock. The sleep of a send(2) happens on the mutex of the receive buffer of the peer. A bulk send/recv of data with large socket buffers will make both syscalls just bounce between owning the receive buffer lock and copyin(9)/copyout(9), no other locks would be involved. Since event notification mechanisms, such as select(2), poll(2) and kevent(2) use state of the send buffer to monitor writability, the new implementation provides protocol specific pr_sopoll and pr_kqfilter. The sendfile(2) over unix/stream is preserved, providing protocol specific pr_send and pr_sendfile_wait methods. - The implementation uses new mchain structure to manipulate mbuf chains. Note that this required converting to mchain two functions that are shared with unix/dgram: unp_internalize() and unp_addsockcred() as well as adding a new shared one uipc_process_kernel_mbuf(). This induces some non- functional changes in the unix/dgram code as well. There is a space for improvement here, as right now it is a mix of mchain and manually managed mbuf chains. - unix/seqpacket previously marked as PR_ADDR & PR_ATOMIC and thus treated as a datagram socket by the generic socket code, now becomes a true stream socket with record markers. - Note on aio(4). First problem with socket aio(4) is that it uses socket buffer locks for queueing and piggybacking on this locking it calls soreadable() and sowriteable() directly. Ideally it should use pr_sopoll() method. Second problem is that unlike a syscall, aio(4) wants a consistent uio structure upon return. This is incompatible with our speculative read optimization, so in case of aio(4) write we need to restore consistency of uio. At this point we workaround those problems on the side of unix(4), but ideally those workarounds should be socket aio(4) problem (not a first class citizen) rather than problem of unix(4), definitely a primary facility. --- sys/kern/uipc_usrreq.c | 1722 +++++++++++++++++++++++++++++++++++++----------- sys/sys/sockbuf.h | 12 + 2 files changed, 1343 insertions(+), 391 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 79e4da5c8698..06b3317dc775 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -5,7 +5,7 @@ * The Regents of the University of California. All Rights Reserved. * Copyright (c) 2004-2009 Robert N. M. Watson All Rights Reserved. * Copyright (c) 2018 Matthew Macy - * Copyright (c) 2022 Gleb Smirnoff + * Copyright (c) 2022-2025 Gleb Smirnoff * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -73,6 +73,7 @@ #include #include #include +#include #include #include #include @@ -142,11 +143,14 @@ static struct timeout_task unp_gc_task; static struct task unp_defer_task; /* - * Both send and receive buffers are allocated PIPSIZ bytes of buffering for - * stream sockets, although the total for sender and receiver is actually - * only PIPSIZ. + * SOCK_STREAM and SOCK_SEQPACKET unix(4) sockets fully bypass the send buffer, + * however the notion of send buffer still makes sense with them. Its size is + * the amount of space that a send(2) syscall may copyin(9) before checking + * with the receive buffer of a peer. Although not linked anywhere yet, + * pointed to by a stack variable, effectively it is a buffer that needs to be + * sized. * - * Datagram sockets really use the sendspace as the maximum datagram size, + * SOCK_DGRAM sockets really use the sendspace as the maximum datagram size, * and don't really want to reserve the sendspace. Their recvspace should be * large enough for at least one max-size datagram plus address. */ @@ -157,7 +161,7 @@ static u_long unpst_sendspace = PIPSIZ; static u_long unpst_recvspace = PIPSIZ; static u_long unpdg_maxdgram = 8*1024; /* support 8KB syslog msgs */ static u_long unpdg_recvspace = 16*1024; -static u_long unpsp_sendspace = PIPSIZ; /* really max datagram size */ +static u_long unpsp_sendspace = PIPSIZ; static u_long unpsp_recvspace = PIPSIZ; static SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, @@ -292,7 +296,7 @@ static int unp_connect(struct socket *, struct sockaddr *, struct thread *); static int unp_connectat(int, struct socket *, struct sockaddr *, struct thread *, bool); -static void unp_connect2(struct socket *so, struct socket *so2); +static void unp_connect2(struct socket *, struct socket *, bool); static void unp_disconnect(struct unpcb *unp, struct unpcb *unp2); static void unp_dispose(struct socket *so); static void unp_shutdown(struct unpcb *); @@ -301,15 +305,18 @@ static void unp_gc(__unused void *, int); static void unp_scan(struct mbuf *, void (*)(struct filedescent **, int)); static void unp_discard(struct file *); static void unp_freerights(struct filedescent **, int); -static int unp_internalize(struct mbuf **, struct thread *, - struct mbuf **, u_int *, u_int *); +static int unp_internalize(struct mbuf *, struct mchain *, + struct thread *); static void unp_internalize_fp(struct file *); static int unp_externalize(struct mbuf *, struct mbuf **, int); static int unp_externalize_fp(struct file *); -static struct mbuf *unp_addsockcred(struct thread *, struct mbuf *, - int, struct mbuf **, u_int *, u_int *); +static void unp_addsockcred(struct thread *, struct mchain *, int); static void unp_process_defers(void * __unused, int); +static void uipc_wrknl_lock(void *); +static void uipc_wrknl_unlock(void *); +static void uipc_wrknl_assert_lock(void *, int); + static void unp_pcb_hold(struct unpcb *unp) { @@ -417,6 +424,41 @@ unp_pcb_lock_peer(struct unpcb *unp) return (unp2); } +/* + * Try to lock peer of our socket for purposes of sending data to it. + */ +static int +uipc_lock_peer(struct socket *so, struct unpcb **unp2) +{ + struct unpcb *unp; + int error; + + unp = sotounpcb(so); + UNP_PCB_LOCK(unp); + *unp2 = unp_pcb_lock_peer(unp); + if (__predict_false(so->so_error != 0)) { + error = so->so_error; + so->so_error = 0; + UNP_PCB_UNLOCK(unp); + if (*unp2 != NULL) + UNP_PCB_UNLOCK(*unp2); + return (error); + } + if (__predict_false(*unp2 == NULL)) { + /* + * Different error code for a previously connected socket and + * a never connected one. The SS_ISDISCONNECTED is set in the + * unp_soisdisconnected() and is synchronized by the pcb lock. + */ + error = so->so_state & SS_ISDISCONNECTED ? EPIPE : ENOTCONN; + UNP_PCB_UNLOCK(unp); + return (error); + } + UNP_PCB_UNLOCK(unp); + + return (0); +} + static void uipc_abort(struct socket *so) { @@ -446,11 +488,6 @@ uipc_attach(struct socket *so, int proto, struct thread *td) KASSERT(so->so_pcb == NULL, ("uipc_attach: so_pcb != NULL")); switch (so->so_type) { - case SOCK_STREAM: - sendspace = unpst_sendspace; - recvspace = unpst_recvspace; - break; - case SOCK_DGRAM: STAILQ_INIT(&so->so_rcv.uxdg_mb); STAILQ_INIT(&so->so_snd.uxdg_mb); @@ -463,11 +500,27 @@ uipc_attach(struct socket *so, int proto, struct thread *td) sendspace = recvspace = unpdg_recvspace; break; + case SOCK_STREAM: + sendspace = unpst_sendspace; + recvspace = unpst_recvspace; + goto common; + case SOCK_SEQPACKET: sendspace = unpsp_sendspace; recvspace = unpsp_recvspace; +common: + /* + * XXXGL: we need to initialize the mutex with MTX_DUPOK. + * Ideally, protocols that have PR_SOCKBUF should be + * responsible for mutex initialization officially, and then + * this uglyness with mtx_destroy(); mtx_init(); would go away. + */ + mtx_destroy(&so->so_rcv_mtx); + mtx_init(&so->so_rcv_mtx, "so_rcv", NULL, MTX_DEF | MTX_DUPOK); + knlist_init(&so->so_wrsel.si_note, so, uipc_wrknl_lock, + uipc_wrknl_unlock, uipc_wrknl_assert_lock); + STAILQ_INIT(&so->so_rcv.uxst_mbq); break; - default: panic("uipc_attach"); } @@ -737,7 +790,7 @@ uipc_connect2(struct socket *so1, struct socket *so2) unp2 = so2->so_pcb; KASSERT(unp2 != NULL, ("uipc_connect2: unp2 == NULL")); unp_pcb_lock_pair(unp, unp2); - unp_connect2(so1, so2); + unp_connect2(so1, so2, false); unp_pcb_unlock_pair(unp, unp2); return (0); @@ -820,6 +873,11 @@ uipc_detach(struct socket *so) taskqueue_enqueue_timeout(taskqueue_thread, &unp_gc_task, -1); switch (so->so_type) { + case SOCK_STREAM: + case SOCK_SEQPACKET: + MPASS(SOLISTENING(so) || (STAILQ_EMPTY(&so->so_rcv.uxst_mbq) && + so->so_rcv.uxst_peer == NULL)); + break; case SOCK_DGRAM: /* * Everything should have been unlinked/freed by unp_dispose() @@ -875,6 +933,12 @@ uipc_listen(struct socket *so, int backlog, struct thread *td) error = solisten_proto_check(so); if (error == 0) { cru2xt(td, &unp->unp_peercred); + if (!SOLISTENING(so)) { + (void)chgsbsize(so->so_cred->cr_uidinfo, + &so->so_snd.sb_hiwat, 0, RLIM_INFINITY); + (void)chgsbsize(so->so_cred->cr_uidinfo, + &so->so_rcv.sb_hiwat, 0, RLIM_INFINITY); + } solisten_proto(so, backlog); } SOCK_UNLOCK(so); @@ -908,187 +972,880 @@ uipc_peeraddr(struct socket *so, struct sockaddr *ret) return (0); } +/* + * pr_sosend() called with mbuf instead of uio is a kernel thread. NFS, + * netgraph(4) and other subsystems can call into socket code. The + * function will condition the mbuf so that it can be safely put onto socket + * buffer and calculate its char count and mbuf count. + * + * Note: we don't support receiving control data from a kernel thread. Our + * pr_sosend methods have MPASS() to check that. This may change. + */ +static void +uipc_reset_kernel_mbuf(struct mbuf *m, struct mchain *mc) +{ + + M_ASSERTPKTHDR(m); + + m_clrprotoflags(m); + m_tag_delete_chain(m, NULL); + m->m_pkthdr.rcvif = NULL; + m->m_pkthdr.flowid = 0; + m->m_pkthdr.csum_flags = 0; + m->m_pkthdr.fibnum = 0; + m->m_pkthdr.rsstype = 0; + + mc_init_m(mc, m); + MPASS(m->m_pkthdr.len == mc->mc_len); +} + +#ifdef SOCKBUF_DEBUG +static inline void +uipc_stream_sbcheck(struct sockbuf *sb) +{ + struct mbuf *d; + u_int dacc, dccc, dctl, dmbcnt; + bool notready = false; + + dacc = dccc = dctl = dmbcnt = 0; + STAILQ_FOREACH(d, &sb->uxst_mbq, m_stailq) { + if (d == sb->uxst_fnrdy) + notready = true; + if (notready) + MPASS(d->m_flags & M_NOTREADY); + if (d->m_type == MT_CONTROL) + dctl += d->m_len; + else if (d->m_type == MT_DATA) { + dccc += d->m_len; + if (!notready) + dacc += d->m_len; + } else + MPASS(0); + dmbcnt += MSIZE; + if (d->m_flags & M_EXT) + dmbcnt += d->m_ext.ext_size; + if (d->m_stailq.stqe_next == NULL) + MPASS(sb->uxst_mbq.stqh_last == &d->m_stailq.stqe_next); + } + MPASS(sb->uxst_fnrdy == NULL || notready); + MPASS(dacc == sb->sb_acc); + MPASS(dccc == sb->sb_ccc); + MPASS(dctl == sb->sb_ctl); + MPASS(dmbcnt == sb->sb_mbcnt); + (void)STAILQ_EMPTY(&sb->uxst_mbq); +} +#define UIPC_STREAM_SBCHECK(sb) uipc_stream_sbcheck(sb) +#else +#define UIPC_STREAM_SBCHECK(sb) do {} while (0) +#endif + +/* + * uipc_stream_sbspace() returns how much a writer can send, limited by char + * count or mbuf memory use, whatever ends first. + * + * An obvious and legitimate reason for a socket having more data than allowed, + * is lowering the limit with setsockopt(SO_RCVBUF) on already full buffer. + * Also, sb_mbcnt may overcommit sb_mbmax in case if previous write observed + * 'space < mbspace', but mchain allocated to hold 'space' bytes of data ended + * up with 'mc_mlen > mbspace'. A typical scenario would be a full buffer with + * writer trying to push in a large write, and a slow reader, that reads just + * a few bytes at a time. In that case writer will keep creating new mbufs + * with mc_split(). These mbufs will carry little chars, but will all point at + * the same cluster, thus each adding cluster size to sb_mbcnt. This means we + * will count same cluster many times potentially underutilizing socket buffer. + * We aren't optimizing towards ineffective readers. Classic socket buffer had + * the same "feature". + */ +static inline u_int +uipc_stream_sbspace(struct sockbuf *sb) +{ + u_int space, mbspace; + + if (__predict_true(sb->sb_hiwat >= sb->sb_ccc + sb->sb_ctl)) + space = sb->sb_hiwat - sb->sb_ccc - sb->sb_ctl; + else + return (0); + if (__predict_true(sb->sb_mbmax >= sb->sb_mbcnt)) + mbspace = sb->sb_mbmax - sb->sb_mbcnt; + else + return (0); + + return (min(space, mbspace)); +} + static int -uipc_rcvd(struct socket *so, int flags) +uipc_sosend_stream_or_seqpacket(struct socket *so, struct sockaddr *addr, + struct uio *uio0, struct mbuf *m, struct mbuf *c, int flags, + struct thread *td) { - struct unpcb *unp, *unp2; + struct unpcb *unp2; struct socket *so2; - u_int mbcnt, sbcc; + struct sockbuf *sb; + struct uio *uio; + struct mchain mc, cmc; + size_t resid, sent; + bool nonblock, eor, aio; + int error; - unp = sotounpcb(so); - KASSERT(unp != NULL, ("%s: unp == NULL", __func__)); - KASSERT(so->so_type == SOCK_STREAM || so->so_type == SOCK_SEQPACKET, - ("%s: socktype %d", __func__, so->so_type)); + MPASS((uio0 != NULL && m == NULL) || (m != NULL && uio0 == NULL)); + MPASS(m == NULL || c == NULL); + + if (__predict_false(flags & MSG_OOB)) + return (EOPNOTSUPP); + + nonblock = (so->so_state & SS_NBIO) || + (flags & (MSG_DONTWAIT | MSG_NBIO)); + eor = flags & MSG_EOR; + + mc = MCHAIN_INITIALIZER(&mc); + cmc = MCHAIN_INITIALIZER(&cmc); + sent = 0; + aio = false; + + if (m == NULL) { + if (c != NULL && (error = unp_internalize(c, &cmc, td))) + goto out; + /* + * This function may read more data from the uio than it would + * then place on socket. That would leave uio inconsistent + * upon return. Normally uio is allocated on the stack of the + * syscall thread and we don't care about leaving it consistent. + * However, aio(9) will allocate a uio as part of job and will + * use it to track progress. We detect aio(9) checking the + * SB_AIO_RUNNING flag. It is safe to check it without lock + * cause it is set and cleared in the same taskqueue thread. + * + * This check can also produce a false positive: there is + * aio(9) job and also there is a syscall we are serving now. + * No sane software does that, it would leave to a mess in + * the socket buffer, as aio(9) doesn't grab the I/O sx(9). + * But syzkaller can create this mess. For such false positive + * our goal is just don't panic or leak memory. + */ + if (__predict_false(so->so_snd.sb_flags & SB_AIO_RUNNING)) { + uio = cloneuio(uio0); + aio = true; + } else { + uio = uio0; + resid = uio->uio_resid; + } + /* + * Optimization for a case when our send fits into the receive + * buffer - do the copyin before taking any locks, sized to our + * send buffer. Later copyins will also take into account + * space in the peer's receive buffer. + */ + error = mc_uiotomc(&mc, uio, so->so_snd.sb_hiwat, 0, M_WAITOK, + eor ? M_EOR : 0); + if (__predict_false(error)) + goto out2; + } else + uipc_reset_kernel_mbuf(m, &mc); + + error = SOCK_IO_SEND_LOCK(so, SBLOCKWAIT(flags)); + if (error) + goto out2; + + if (__predict_false((error = uipc_lock_peer(so, &unp2)) != 0)) + goto out3; + + if (unp2->unp_flags & UNP_WANTCRED_MASK) { + /* + * Credentials are passed only once on SOCK_STREAM and + * SOCK_SEQPACKET (LOCAL_CREDS => WANTCRED_ONESHOT), or + * forever (LOCAL_CREDS_PERSISTENT => WANTCRED_ALWAYS). + */ + unp_addsockcred(td, &cmc, unp2->unp_flags); + unp2->unp_flags &= ~UNP_WANTCRED_ONESHOT; + } /* - * Adjust backpressure on sender and wakeup any waiting to write. - * - * The unp lock is acquired to maintain the validity of the unp_conn - * pointer; no lock on unp2 is required as unp2->unp_socket will be - * static as long as we don't permit unp2 to disconnect from unp, - * which is prevented by the lock on unp. We cache values from - * so_rcv to avoid holding the so_rcv lock over the entire - * transaction on the remote so_snd. + * Cycle through the data to send and available space in the peer's + * receive buffer. Put a reference on the peer socket, so that it + * doesn't get freed while we sbwait(). If peer goes away, we will + * observe the SBS_CANTRCVMORE and our sorele() will finalize peer's + * socket destruction. */ - SOCKBUF_LOCK(&so->so_rcv); - mbcnt = so->so_rcv.sb_mbcnt; - sbcc = sbavail(&so->so_rcv); - SOCKBUF_UNLOCK(&so->so_rcv); + so2 = unp2->unp_socket; + soref(so2); + UNP_PCB_UNLOCK(unp2); + sb = &so2->so_rcv; + while (mc.mc_len + cmc.mc_len > 0) { + struct mchain mcnext = MCHAIN_INITIALIZER(&mcnext); + u_int space; + + SOCK_RECVBUF_LOCK(so2); +restart: + UIPC_STREAM_SBCHECK(sb); + if (__predict_false(cmc.mc_len > sb->sb_hiwat)) { + SOCK_RECVBUF_UNLOCK(so2); + error = EMSGSIZE; + goto out4; + } + if (__predict_false(sb->sb_state & SBS_CANTRCVMORE)) { + SOCK_RECVBUF_UNLOCK(so2); + error = EPIPE; + goto out4; + } + /* + * Wait on the peer socket receive buffer until we have enough + * space to put at least control. The data is a stream and can + * be put partially, but control is really a datagram. + */ + space = uipc_stream_sbspace(sb); + if (space < sb->sb_lowat || space < cmc.mc_len) { + if (nonblock) { + if (aio) + sb->uxst_flags |= UXST_PEER_AIO; + SOCK_RECVBUF_UNLOCK(so2); + if (aio) { + SOCK_SENDBUF_LOCK(so); + so->so_snd.sb_ccc = + so->so_snd.sb_hiwat - space; + SOCK_SENDBUF_UNLOCK(so); + } + error = EWOULDBLOCK; + goto out4; + } + if ((error = sbwait(so2, SO_RCV)) != 0) { + SOCK_RECVBUF_UNLOCK(so2); + goto out4; + } else + goto restart; + } + MPASS(space >= cmc.mc_len); + space -= cmc.mc_len; + if (space == 0) { + /* There is space only to send control. */ + MPASS(!STAILQ_EMPTY(&cmc.mc_q)); + mcnext = mc; + mc = MCHAIN_INITIALIZER(&mc); + } else if (space < mc.mc_len) { + /* Not enough space. */ + if (__predict_false(mc_split(&mc, &mcnext, space, + M_NOWAIT) == ENOMEM)) { + /* + * If allocation failed use M_WAITOK and merge + * the chain back. Next time mc_split() will + * easily split at the same place. Only if we + * race with setsockopt(SO_RCVBUF) shrinking + * sb_hiwat can this happen more than once. + */ + SOCK_RECVBUF_UNLOCK(so2); + (void)mc_split(&mc, &mcnext, space, M_WAITOK); + mc_concat(&mc, &mcnext); + SOCK_RECVBUF_LOCK(so2); + goto restart; + } + MPASS(mc.mc_len == space); + } + if (!STAILQ_EMPTY(&cmc.mc_q)) { + STAILQ_CONCAT(&sb->uxst_mbq, &cmc.mc_q); + sb->sb_ctl += cmc.mc_len; + sb->sb_mbcnt += cmc.mc_mlen; + cmc.mc_len = 0; + } + sent += mc.mc_len; + sb->sb_acc += mc.mc_len; + sb->sb_ccc += mc.mc_len; + sb->sb_mbcnt += mc.mc_mlen; + STAILQ_CONCAT(&sb->uxst_mbq, &mc.mc_q); + UIPC_STREAM_SBCHECK(sb); + space = uipc_stream_sbspace(sb); + sorwakeup_locked(so2); + if (!STAILQ_EMPTY(&mcnext.mc_q)) { + /* + * Such assignment is unsafe in general, but it is + * safe with !STAILQ_EMPTY(&mcnext.mc_q). In C++ we + * could reload = for STAILQs :) + */ + mc = mcnext; + } else if (uio != NULL && uio->uio_resid > 0) { + /* + * Copyin sum of peer's receive buffer space and our + * sb_hiwat, which is our virtual send buffer size. + * See comment above unpst_sendspace declaration. + * We are reading sb_hiwat locklessly, cause a) we + * don't care about an application that does send(2) + * and setsockopt(2) racing internally, and for an + * application that does this in sequence we will see + * the correct value cause sbsetopt() uses buffer lock + * and we also have already acquired it at least once. + */ + error = mc_uiotomc(&mc, uio, space + + atomic_load_int(&so->so_snd.sb_hiwat), 0, M_WAITOK, + eor ? M_EOR : 0); + if (__predict_false(error)) + goto out4; + } else + mc = MCHAIN_INITIALIZER(&mc); + } + + MPASS(STAILQ_EMPTY(&mc.mc_q)); + + td->td_ru.ru_msgsnd++; +out4: + sorele(so2); +out3: + SOCK_IO_SEND_UNLOCK(so); +out2: + if (aio) { + freeuio(uio); + uioadvance(uio0, sent); + } else if (uio != NULL) + uio->uio_resid = resid - sent; + if (!mc_empty(&cmc)) + unp_scan(mc_first(&cmc), unp_freerights); +out: + mc_freem(&mc); + mc_freem(&cmc); + + return (error); +} + +static int +uipc_soreceive_stream_or_seqpacket(struct socket *so, struct sockaddr **psa, + struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp) +{ + struct sockbuf *sb = &so->so_rcv; + struct mbuf *control, *m, *first, *last, *next; + u_int ctl, space, datalen, mbcnt, lastlen; + int error, flags; + bool nonblock, waitall, peek; + + MPASS(mp0 == NULL); + + if (psa != NULL) + *psa = NULL; + if (controlp != NULL) + *controlp = NULL; + + flags = flagsp != NULL ? *flagsp : 0; + nonblock = (so->so_state & SS_NBIO) || + (flags & (MSG_DONTWAIT | MSG_NBIO)); + peek = flags & MSG_PEEK; + waitall = (flags & MSG_WAITALL) && !peek; + /* - * There is a benign race condition at this point. If we're planning to - * clear SB_STOP, but uipc_send is called on the connected socket at - * this instant, it might add data to the sockbuf and set SB_STOP. Then - * we would erroneously clear SB_STOP below, even though the sockbuf is - * full. The race is benign because the only ill effect is to allow the - * sockbuf to exceed its size limit, and the size limits are not - * strictly guaranteed anyway. + * This check may fail only on a socket that never went through + * connect(2). We can check this locklessly, cause: a) for a new born + * socket we don't care about applications that may race internally + * between connect(2) and recv(2), and b) for a dying socket if we + * miss update by unp_sosidisconnected(), we would still get the check + * correct. For dying socket we would observe SBS_CANTRCVMORE later. */ + if (__predict_false((atomic_load_short(&so->so_state) & + (SS_ISCONNECTED|SS_ISDISCONNECTED)) == 0)) + return (ENOTCONN); + + error = SOCK_IO_RECV_LOCK(so, SBLOCKWAIT(flags)); + if (__predict_false(error)) + return (error); + +restart: + SOCK_RECVBUF_LOCK(so); + UIPC_STREAM_SBCHECK(sb); + while (sb->sb_acc < sb->sb_lowat && + (sb->sb_ctl == 0 || controlp == NULL)) { + if (so->so_error) { + error = so->so_error; + if (!peek) + so->so_error = 0; + SOCK_RECVBUF_UNLOCK(so); + SOCK_IO_RECV_UNLOCK(so); + return (error); + } + if (sb->sb_state & SBS_CANTRCVMORE) { + SOCK_RECVBUF_UNLOCK(so); + SOCK_IO_RECV_UNLOCK(so); + return (0); + } + if (nonblock) { + SOCK_RECVBUF_UNLOCK(so); + SOCK_IO_RECV_UNLOCK(so); + return (EWOULDBLOCK); + } + error = sbwait(so, SO_RCV); + if (error) { + SOCK_RECVBUF_UNLOCK(so); + SOCK_IO_RECV_UNLOCK(so); + return (error); + } + } + + MPASS(STAILQ_FIRST(&sb->uxst_mbq)); + MPASS(sb->sb_acc > 0 || sb->sb_ctl > 0); + + mbcnt = 0; + ctl = 0; + first = STAILQ_FIRST(&sb->uxst_mbq); + if (first->m_type == MT_CONTROL) { + control = first; + STAILQ_FOREACH_FROM(first, &sb->uxst_mbq, m_stailq) { + if (first->m_type != MT_CONTROL) + break; + ctl += first->m_len; + mbcnt += MSIZE; + if (first->m_flags & M_EXT) + mbcnt += first->m_ext.ext_size; + } + } else + control = NULL; + + /* + * Find split point for the next copyout. On exit from the loop: + * last == NULL - socket to be flushed + * last != NULL + * lastlen > last->m_len - uio to be filled, last to be adjusted + * lastlen == 0 - MT_CONTROL or M_EOR encountered + */ + space = uio->uio_resid; + datalen = 0; + for (m = first, last = NULL; m != NULL; m = STAILQ_NEXT(m, m_stailq)) { + if (m->m_type != MT_DATA) { + last = m; + lastlen = 0; + break; + } + if (space >= m->m_len) { + space -= m->m_len; + datalen += m->m_len; + mbcnt += MSIZE; + if (m->m_flags & M_EXT) + mbcnt += m->m_ext.ext_size; + if (m->m_flags & M_EOR) { + last = STAILQ_NEXT(m, m_stailq); + lastlen = 0; + flags |= MSG_EOR; + break; + } + } else { + datalen += space; + last = m; + lastlen = space; + break; + } + } + + UIPC_STREAM_SBCHECK(sb); + if (!peek) { + if (last == NULL) + STAILQ_INIT(&sb->uxst_mbq); + else { + STAILQ_FIRST(&sb->uxst_mbq) = last; + MPASS(last->m_len > lastlen); + last->m_len -= lastlen; + last->m_data += lastlen; + } + MPASS(sb->sb_acc >= datalen); + sb->sb_acc -= datalen; + sb->sb_ccc -= datalen; + MPASS(sb->sb_ctl >= ctl); + sb->sb_ctl -= ctl; + MPASS(sb->sb_mbcnt >= mbcnt); + sb->sb_mbcnt -= mbcnt; + UIPC_STREAM_SBCHECK(sb); + /* + * In a blocking mode peer is sleeping on our receive buffer, + * and we need just wakeup(9) on it. But to wake up various + * event engines, we need to reach over to peer's selinfo. + * This can be safely done as the socket buffer receive lock + * is protecting us from the peer going away. + */ + if (__predict_true(sb->uxst_peer != NULL)) { + struct selinfo *sel = &sb->uxst_peer->so_wrsel; + struct unpcb *unp2; + bool aio; + + if ((aio = sb->uxst_flags & UXST_PEER_AIO)) + sb->uxst_flags &= ~UXST_PEER_AIO; + if (sb->uxst_flags & UXST_PEER_SEL) { + selwakeuppri(sel, PSOCK); + /* + * XXXGL: sowakeup() does SEL_WAITING() without + * locks. + */ + if (!SEL_WAITING(sel)) + sb->uxst_flags &= ~UXST_PEER_SEL; + } + if (sb->sb_flags & SB_WAIT) { + sb->sb_flags &= ~SB_WAIT; + wakeup(&sb->sb_acc); + } + KNOTE_LOCKED(&sel->si_note, 0); + SOCK_RECVBUF_UNLOCK(so); + /* + * XXXGL: need to go through uipc_lock_peer() after + * the receive buffer lock dropped, it was protecting + * us from unp_soisdisconnected(). The aio workarounds + * should be refactored to the aio(4) side. + */ + if (aio && uipc_lock_peer(so, &unp2) == 0) { + struct socket *so2 = unp2->unp_socket; + + SOCK_SENDBUF_LOCK(so2); + so2->so_snd.sb_ccc -= datalen; + sowakeup_aio(so2, SO_SND); + SOCK_SENDBUF_UNLOCK(so2); + UNP_PCB_UNLOCK(unp2); + } + } else + SOCK_RECVBUF_UNLOCK(so); + } else + SOCK_RECVBUF_UNLOCK(so); + + while (control != NULL && control->m_type == MT_CONTROL) { + if (!peek) { + struct mbuf *c; + + /* + * unp_externalize() failure must abort entire read(2). + * Such failure should also free the problematic + * control, but link back the remaining data to the head + * of the buffer, so that socket is not left in a state + * where it can't progress forward with reading. + * Probability of such a failure is really low, so it + * is fine that we need to perform pretty complex + * operation here to reconstruct the buffer. + * XXXGL: unp_externalize() used to be + * dom_externalize() KBI and it frees whole chain, so + * we need to feed it with mbufs one by one. + */ + c = control; + control = STAILQ_NEXT(c, m_stailq); + STAILQ_NEXT(c, m_stailq) = NULL; + error = unp_externalize(c, controlp, flags); + if (__predict_false(error && control != NULL)) { + struct mchain cmc; + + mc_init_m(&cmc, control); + + SOCK_RECVBUF_LOCK(so); + MPASS(!(sb->sb_state & SBS_CANTRCVMORE)); + + if (__predict_false(cmc.mc_len + sb->sb_ccc + + sb->sb_ctl > sb->sb_hiwat)) { + /* + * Too bad, while unp_externalize() was + * failing, the other side had filled + * the buffer and we can't prepend data + * back. Losing data! + */ + SOCK_RECVBUF_UNLOCK(so); + SOCK_IO_RECV_UNLOCK(so); + unp_scan(mc_first(&cmc), + unp_freerights); + mc_freem(&cmc); + return (error); + } + + UIPC_STREAM_SBCHECK(sb); + /* XXXGL: STAILQ_PREPEND */ + STAILQ_CONCAT(&cmc.mc_q, &sb->uxst_mbq); + STAILQ_SWAP(&cmc.mc_q, &sb->uxst_mbq, mbuf); + + sb->sb_ctl = sb->sb_acc = sb->sb_ccc = + sb->sb_mbcnt = 0; + STAILQ_FOREACH(m, &sb->uxst_mbq, m_stailq) { + if (m->m_type == MT_DATA) { + sb->sb_acc += m->m_len; + sb->sb_ccc += m->m_len; + } else { + sb->sb_ctl += m->m_len; + } + sb->sb_mbcnt += MSIZE; + if (m->m_flags & M_EXT) + sb->sb_mbcnt += + m->m_ext.ext_size; + } + UIPC_STREAM_SBCHECK(sb); + SOCK_RECVBUF_UNLOCK(so); + SOCK_IO_RECV_UNLOCK(so); + return (error); + } + if (controlp != NULL) { + while (*controlp != NULL) + controlp = &(*controlp)->m_next; + } + } else { + /* + * XXXGL + * + * In MSG_PEEK case control is not externalized. This + * means we are leaking some kernel pointers to the + * userland. They are useless to a law-abiding + * application, but may be useful to a malware. This + * is what the historical implementation in the + * soreceive_generic() did. To be improved? + */ + if (controlp != NULL) { + *controlp = m_copym(control, 0, control->m_len, + M_WAITOK); + controlp = &(*controlp)->m_next; + } + control = STAILQ_NEXT(control, m_stailq); + } + } + + for (m = first; m != last; m = next) { + next = STAILQ_NEXT(m, m_stailq); + error = uiomove(mtod(m, char *), m->m_len, uio); + if (__predict_false(error)) { + SOCK_IO_RECV_UNLOCK(so); + if (!peek) + for (; m != last; m = next) { + next = STAILQ_NEXT(m, m_stailq); + m_free(m); + } + return (error); + } + if (!peek) + m_free(m); + } + if (last != NULL && lastlen > 0) { + if (!peek) { + MPASS(!(m->m_flags & M_PKTHDR)); + MPASS(last->m_data - M_START(last) >= lastlen); + error = uiomove(mtod(last, char *) - lastlen, + lastlen, uio); + } else + error = uiomove(mtod(last, char *), lastlen, uio); + if (__predict_false(error)) { + SOCK_IO_RECV_UNLOCK(so); + return (error); + } + } + if (waitall && !(flags & MSG_EOR) && uio->uio_resid > 0) + goto restart; + SOCK_IO_RECV_UNLOCK(so); + + if (flagsp != NULL) + *flagsp |= flags; + + uio->uio_td->td_ru.ru_msgrcv++; + + return (0); +} + +static int +uipc_sopoll_stream_or_seqpacket(struct socket *so, int events, + struct thread *td) +{ + struct unpcb *unp = sotounpcb(so); + int revents; + UNP_PCB_LOCK(unp); - unp2 = unp->unp_conn; - if (unp2 == NULL) { + if (SOLISTENING(so)) { + /* The above check is safe, since conversion to listening uses + * both protocol and socket lock. + */ + SOCK_LOCK(so); + if (!(events & (POLLIN | POLLRDNORM))) + revents = 0; + else if (!TAILQ_EMPTY(&so->sol_comp)) + revents = events & (POLLIN | POLLRDNORM); + else if (so->so_error) + revents = (events & (POLLIN | POLLRDNORM)) | POLLHUP; + else { + selrecord(td, &so->so_rdsel); + revents = 0; + } + SOCK_UNLOCK(so); + } else { + if (so->so_state & SS_ISDISCONNECTED) + revents = POLLHUP; + else + revents = 0; + if (events & (POLLIN | POLLRDNORM | POLLRDHUP)) { + SOCK_RECVBUF_LOCK(so); + if (sbavail(&so->so_rcv) >= so->so_rcv.sb_lowat || + so->so_error || so->so_rerror) + revents |= events & (POLLIN | POLLRDNORM); + if (so->so_rcv.sb_state & SBS_CANTRCVMORE) + revents |= events & POLLRDHUP; + if (!(revents & (POLLIN | POLLRDNORM | POLLRDHUP))) { + selrecord(td, &so->so_rdsel); *** 1285 LINES SKIPPED *** From nobody Mon May 5 19:56: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 4ZrsjP48Pdz5tlMq; Mon, 05 May 2025 19:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrsjP2806z3w93; Mon, 05 May 2025 19:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746474985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZUECD5ORM0u3qEm+vX+1cW/79I7MbDVb5gVWIqW5hDY=; b=uk8vcON6pdl+Qhxly3B7QIIQ5BCKcjO+j6+KmOU7sPE53yrpTiYUxQ+wwSlpCbQot4sDSC 5YmScjxKAVIhcVwFbARfP9Aj1K9hRHWk5bKHT1SiN0s8fhwsGFuEimf1+He0DH4ADoyJwP Wk3evdjqlWrfi+5KelrJJwVRN7F50R7zNDxB41yt8jIZj+7HbNS/6Wcd7hNGzK2kwjHnoL l298oU3ARrJAHCpps/9HEfJDmvSqz1ZilRNInV11bJr4yrULMGmHsAFjh12h2ovA/lkyaX vzd3wSknkNJHO032FQcuxD5DOWr5gFdnMOO8SqX27VnYO2xpOgjtfqF9NNztOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746474985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZUECD5ORM0u3qEm+vX+1cW/79I7MbDVb5gVWIqW5hDY=; b=iBJHpWuZeJRYmtVFL8k17MNpLNjh+xooS7P02Ed9+e7RDBfklGjgR67c2pY6U3Kw226Tbe vJJLPr7WK1XT0dZFmr/dUDRjUKZfl6mI5bbj9qFpnzmaOeIfXUSAEEATgcMlcdAKuN8IGB J+FiW9QpZC0s0nLsuEYIQJBBNz5O6Mh2C8mLqrrbIqpIae68X/5Ng5PAZChIQXBcLmt6+a KVDEb5jZkHCONSsNoZnDufR1E4ZI9zzLHy7AVI5rUgl6uZ2ryEWd+XgaJNQ+8rCCN8LUC5 FhztgYiBx81rmroPPlUvOo/4JxUzJFvhepeoMScbZEPlUCzHXELlnZhBYWwYMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746474985; a=rsa-sha256; cv=none; b=BU27PzlMQ4kxkplRawgufDb4tPltbihydbdthYHnfkA6JUJUhS8zV9MuaFFzYP77LvtDwv Y0zkw6Sw+/GRi9798hoUYgUtSTz2sguODYMRDSLxQ9FyDA8XoTfRUjntOaCoih8Yr1mX4W 3Krt/OfVWNpvnZSmBh/CU3M+TzIkD16mpqiE2Zw+Gj6ScDKaALsMUKaFDGgdfEu5eSWCif R3EQmuDBz7eh61Tp0/d8hJq5wzmR0E46iQMqGekpKNsyrKKTy1Ck24cG2shKGCv8I5ojBz aiBMyPLCixnAJeztVNAYHfko+I5UX+MXd1x75ZrfoP9+SWwGdo1ksDIJ6PTWSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrsjP1jSPzCHv; Mon, 05 May 2025 19:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545JuP9R085750; Mon, 5 May 2025 19:56:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545JuPI9085747; Mon, 5 May 2025 19:56:25 GMT (envelope-from git) Date: Mon, 5 May 2025 19:56:25 GMT Message-Id: <202505051956.545JuPI9085747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 9ab96b38215e - main - tests/unix_seqpacket: re-enable stress test for unix/seqpacket List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 9ab96b38215e06e03624c991d0312e740130d382 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9ab96b38215e06e03624c991d0312e740130d382 commit 9ab96b38215e06e03624c991d0312e740130d382 Author: Gleb Smirnoff AuthorDate: 2025-05-05 19:56:04 +0000 Commit: Gleb Smirnoff CommitDate: 2025-05-05 19:56:04 +0000 tests/unix_seqpacket: re-enable stress test for unix/seqpacket --- tests/sys/kern/unix_seqpacket_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index d142e228b036..058c931163a1 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -1197,8 +1197,6 @@ ATF_TC_BODY(random_eor_and_waitall, tc) size_t off; int fd[2], eor; - atf_tc_skip("https://bugs.freebsd.org/279354"); - arc4random_buf(params.seed, sizeof(params.seed)); printf("Using seed:"); for (u_int i = 0; i < (u_int)sizeof(params.seed)/sizeof(u_short); i++) From nobody Mon May 5 20:50: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 4Zrtvl5FP0z5tplT; Mon, 05 May 2025 20:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrtvl4M1rz3jVg; Mon, 05 May 2025 20:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746478227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrSajc4z2BJn5MoJcyLFN2HE5oDgjzVRbwfXPBncMnc=; b=YWEmlL/HE5AQ0tJJpqmUzXSwctUiSSElomjDPyljy7fB+CJg/mlYNKtauR50qezqppJZid s9Mqqooy1FMcafRKSbbG+3v1Mm/6rHt9DKpzhUTOFeg1cuLk5Q6gFPJZJPrFy5ISJszrWo MUtODNPqf2sFr+J1dICLN5mEr1nwObBaJcUlhx1k5YB2jTVX3rK/ge0wRnZfFi7/oK/hmF TF6bY/BetidoqKkkcl1TGzj2pDoxZ3rKTA/gpOo7y9c12Se2pNvzOUxlcz7+N8MgliIIXI kTpKlMDJ+H1/Vm4qnPnEvw9AV9FbcPF5l0lD93KO9WunENr5j+g6T9PBiyZlqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746478227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrSajc4z2BJn5MoJcyLFN2HE5oDgjzVRbwfXPBncMnc=; b=wG8D4dZBgI1m47nhdXa3uci3Tpq/Xk0XKMi29YjqjPRjfo4wYW39O/HquOy7F0VkNyfUj+ HgDIwrC1A6szUxghvemXdwJKqhmorqOPxPEshaTrrBJGoaTtChe/cpcpNXD6mrqYG7ABBa TClStFaMAPCI2fuDvIqpOjCu8f/n/E/meUUvlBJs5xNF1PsyRdstFCBeju1uNh1MlJxvcy 9FbkISgQqGLtKXf2Lpu0OZQWbbKxJeblzjQMMxdxwYSydP/7JEY9MGq1DuAj1v/BUeiwzr M0ZZwRAl2TzQgipOPIgeQfhwD7np9RkvLK3kzIGIhrVGaNgnCWfU5NKrdtD78g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746478227; a=rsa-sha256; cv=none; b=PBYS0VsTACm1qOQXxJnxT91JPjlQkxuw3/SJMMDTfojphUM6TRDiO6nstYMLjme9piilqq lhkV2BZ5Y9VfmZOq8/b6TdULZElgzGG+7+3xd5QbilCxesYX3QF7p5SIOfquRLHmY+MJqb glYiXVTh43/wDjkuuUm1M/6fAGHa0g68SVH5Asl6ywALBTFnaGVTlr2UtW3N9gmQdrgrEn i7EO59sVpz+jHlA5+euiIql6b0yluI0c/w6qljjz9Ifb2gvxDrwplYW5+I2ccvZ4vThBEP 1lGKB48+cTS/QN/i1QPJv4WR1D6hWTU21mPb6vV8KrE/WoSYQT1+mBLUFG5Zmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrtvl3m2TzTkc; Mon, 05 May 2025 20:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545KoRbb089136; Mon, 5 May 2025 20:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545KoR9R089133; Mon, 5 May 2025 20:50:27 GMT (envelope-from git) Date: Mon, 5 May 2025 20:50:27 GMT Message-Id: <202505052050.545KoR9R089133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 99c58ad021b2 - main - sctp: compute address flags only for IPv6 addresses List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99c58ad021b2f7dc0496e16d313c5e28a552f0d0 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=99c58ad021b2f7dc0496e16d313c5e28a552f0d0 commit 99c58ad021b2f7dc0496e16d313c5e28a552f0d0 Author: Michael Tuexen AuthorDate: 2025-05-05 20:43:50 +0000 Commit: Michael Tuexen CommitDate: 2025-05-05 20:43:50 +0000 sctp: compute address flags only for IPv6 addresses Only call sctp_gather_internal_ifa_flags() for IPv6 addresses and also compile this code only, when IPv6 is supported. This fixes the compilation of IPv4 only kernels. Reported by: bz@ Fixes: 6ab4b0c0df57 ("sctp: initilize local address flags correctly") MFC after: 3 days --- sys/netinet/sctp_pcb.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 224f9c72d9ae..2092f20e3c22 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -453,7 +453,11 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, SCTPDBG(SCTP_DEBUG_PCB4, "Clearing deleted ifa flag\n"); sctp_ifap->localifa_flags = SCTP_ADDR_VALID; - sctp_gather_internal_ifa_flags(sctp_ifap); +#ifdef INET6 + if (sctp_ifap->address.sa.sa_family == AF_INET6) { + sctp_gather_internal_ifa_flags(sctp_ifap); + } +#endif sctp_ifap->ifn_p = sctp_ifnp; atomic_add_int(&sctp_ifap->ifn_p->refcount, 1); } @@ -476,7 +480,11 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, } else { /* Repair ifn_p, which was NULL... */ sctp_ifap->localifa_flags = SCTP_ADDR_VALID; - sctp_gather_internal_ifa_flags(sctp_ifap); +#ifdef INET6 + if (sctp_ifap->address.sa.sa_family == AF_INET6) { + sctp_gather_internal_ifa_flags(sctp_ifap); + } +#endif SCTPDBG(SCTP_DEBUG_PCB4, "Repairing ifn %p for ifa %p\n", (void *)sctp_ifnp, (void *)sctp_ifap); @@ -501,7 +509,12 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, sctp_ifap->ifa = ifa; memcpy(&sctp_ifap->address, addr, addr->sa_len); sctp_ifap->localifa_flags = SCTP_ADDR_VALID | SCTP_ADDR_DEFER_USE; - sctp_gather_internal_ifa_flags(sctp_ifap); + sctp_ifap->flags = ifa_flags; +#ifdef INET6 + if (addr->sa_family == AF_INET6) { + sctp_gather_internal_ifa_flags(sctp_ifap); + } +#endif /* Set scope */ switch (sctp_ifap->address.sa.sa_family) { #ifdef INET From nobody Mon May 5 20:52: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 4Zrtxc30Bbz5tpcw; Mon, 05 May 2025 20:52: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zrtxc23NGz3k4R; Mon, 05 May 2025 20:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746478324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDw9CK++dznJEC2lwor7qBo9gb2oa998Rb5g090DsAQ=; b=yVmstdXE3yeQP9GkU8D3EFfmJZa+yQ8RTE9BPnekxIqM/07x2XH46VxiaE11G621WHCKmE JXmfo/sG4VYAyk9OC/bUGQhj7q6QksL6v7wAaJjuXIukStS4eU9FRnhf5f/OYPvTQ994fb GHKA8sgys4++gOQQrRiGi4oswbz3tcSxi6CzWWfoKlmGCH2cXGI2qGtHRuzTr4k16SJBix DjWCSaP88/+l/4/vRsPUFfPP1lkBF4J+yVAGZYpIIst5rBn8fCU18xtOcBCTHiCtwq5/iE QDBxFDCGqmFrScJtDO5eBq+KecbT+wUPrrqqac1OZKtXvVYxrBpepUvOUutYDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746478324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bDw9CK++dznJEC2lwor7qBo9gb2oa998Rb5g090DsAQ=; b=fAnTGZplnrAxeLrQ5RF/nSgMhOpJu00Aknh2Sf35Uf9pG/0foRkvvH/cHUoB2M1Jnd7FCj EqLVvZ9Q2HPGt7DLlDOqYDCvuYUr+zYgllG4Xiw3TmUZ1z/2vIv5N4Be4sLZlOinMNEA3R TyVxZHJZakKmZtu7NufOsa7syBmD7zKnovDNRLnbAWZk7k1cfp00R8hmOIwwJ1oiTdWQTm VOtO2K9tFCUi/MR1Tv36VJdPrzSXvmopMNSEcDrIzRYlbx5m5Y4ZPaop1ZGpsUsBlLmRme Al/A3D0oJfwIQW0aNKqHugCIKfFd14YMHxeHUS4JeRgjJZo0ZiD8pU6lzFkGSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746478324; a=rsa-sha256; cv=none; b=Xnx6pCn8bI0DMaCrWxu9FVrjg3RnQvQkLPY5YFJWdJ8UDgpx3T9p0VI2Li+fuSGDNVvGQn +vj6VfylZyKqRr+MFtMyRQMr7NsBKG7Qx9lZmL5kjTxT/3RDYcsHPjWgpQd8usBLME97aR yky8KYxHy5pq0+ODj6AGxeBFaR9OwA+cgkGCKXx9GgCRFEADNvYCS87N4AugNqVjSXMEQs in+PlMsOeN8/ictWi3fDXsJ6U9ViepCxCh5QBT0JL2M5tQH0b2TmfxM2PpwIgL5WhlorqW 05Runno95YM9/+/WOvCqRbLuD/O0s3kKZ6BRfNq5thEsB+SNRzvqclWlR5hKRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zrtxc1R51zTbd; Mon, 05 May 2025 20:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545Kq4Ye094981; Mon, 5 May 2025 20:52:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545Kq4lR094978; Mon, 5 May 2025 20:52:04 GMT (envelope-from git) Date: Mon, 5 May 2025 20:52:04 GMT Message-Id: <202505052052.545Kq4lR094978@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 4ca1395c5a31 - main - sctp: ensure correct sctp_gather_internal_ifa_flags 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ca1395c5a311989fc02ceb7a2d44aa5eb1a7426 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=4ca1395c5a311989fc02ceb7a2d44aa5eb1a7426 commit 4ca1395c5a311989fc02ceb7a2d44aa5eb1a7426 Author: Michael Tuexen AuthorDate: 2025-05-05 20:50:42 +0000 Commit: Michael Tuexen CommitDate: 2025-05-05 20:50:42 +0000 sctp: ensure correct sctp_gather_internal_ifa_flags usage sctp_gather_internal_ifa_flags() expects an IPv6 address. MFC after: 3 days --- sys/netinet/sctp_bsd_addr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c index 65b271afd84d..ac715d8298ec 100644 --- a/sys/netinet/sctp_bsd_addr.c +++ b/sys/netinet/sctp_bsd_addr.c @@ -117,6 +117,9 @@ sctp_gather_internal_ifa_flags(struct sctp_ifa *ifa) { struct in6_ifaddr *ifa6; + KASSERT(ifa->address.sa.sa_family == AF_INET6, + ("sctp_gather_internal_ifa_flags() called with address family %u", + ifa->address.sa.sa_family)); ifa6 = (struct in6_ifaddr *)ifa->ifa; ifa->flags = ifa6->ia6_flags; if (MODULE_GLOBAL(ip6_use_deprecated)) { From nobody Mon May 5 22:16: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 4ZrwqN00Ndz5twZy; Mon, 05 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrwqM4ymSz3sFF; Mon, 05 May 2025 22:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=StDoCI604urcx6u52VXwK4U7TjZ0G6kzkTrzxbO7rwQ=; b=MEqI+k333Wo5jcSw85664BcIZRglUTgUMBq4nbbwbQX6rtBCL+M3bbwJ8emPVHNGjoyN+Q zL2zq6KmZjSgz4X+K57oRfughZGne0diblcf2xuI9Mhm8zAf5ONoa6HjOM5dbbMdytq21P fvvCGQc/vXFRvuoz2etSirC1SpSELP54G12LvbafFM5i0fgUlT7maOK7ZgPEbkInBk2Lei KoYTgj50DD34aU6eLgg4yHnKYnc13P7tdI0F2ZNrE2DtWOUDcAamdoR7PWkOhoBkrA4ouU ZwwRh/gYQMo2kzuxa4Xsr7A6/EpPiOb8biskouOTrO3mdHp5okAdeE5bCZmpVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=StDoCI604urcx6u52VXwK4U7TjZ0G6kzkTrzxbO7rwQ=; b=WyvrY/vfQ4Go5+1gR9eyBL6mBKyVKgurBTuNy7cr5uqfW9StHXejxUTeiHwr0F0rM7tz2c no0GIjTSxxISbDQUXYx7ER1OVnsqE1PA+hQKGvtvPS8Q3EIOcabp8U6fijU72pYDosFq0u bUkx74VaLUgz/zTkJgkbsRg6zrDF6sTsfXJRvhpu1Lu1KmUeBRK//AI9Qru4M9EwbGFFBG dQa7CNDEfSEgnWQpyMcRBq/+Cd8atdfjGqoFBUU5ZGqG8aiVDCaP5OzB7s/dXXMtbYD0w3 6vA1jP9bunW2eDcyHJ087M/cNqRSZoPkX8ipX3eP9v167fpBs0h4ZLnSt6deSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746483407; a=rsa-sha256; cv=none; b=OwuxjeAQzvUIRIXMnT+tK/AzWpt8DvfDgW8wn0IT359Ck/Nw9rWJNwJCwdwFa2/HEdtCtJ 5Lgsx0zRWqgT7mCwEiVVijOm88ATTrsg0e6syuOWTd3vrIw5oLJrbaNHsj2DgLVMRDFIQB vkUMRgMi/zgQTREVr0qKgQMCja3tniaa5gd2J+ZfJ8kqDDUUf8HMsT0mEy8lkl2ZkN5vpH MHxzoQHRSjypQUWc3NB+LJJjXbpsbXwp2t/tbSIqHk1lSORONdylMeB++cErR7ubIKTJ3c pg9wA57B7LV9YPk2mRoAtUZhDshDUqMmP2WMPmf6NFlUWfc+/8+H9xCUC04ang== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrwqM4X6yzZ67; Mon, 05 May 2025 22:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545MGlT8049260; Mon, 5 May 2025 22:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545MGljO049256; Mon, 5 May 2025 22:16:47 GMT (envelope-from git) Date: Mon, 5 May 2025 22:16:47 GMT Message-Id: <202505052216.545MGljO049256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 0a1294f6c610 - main - bridge: allow IP addresses on members to be disabled List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a1294f6c610948d7447ae276df74a6d5269b62e Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=0a1294f6c610948d7447ae276df74a6d5269b62e commit 0a1294f6c610948d7447ae276df74a6d5269b62e Author: Lexi Winter AuthorDate: 2025-05-05 21:44:44 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 21:47:36 +0000 bridge: allow IP addresses on members to be disabled add a new sysctl, net.link.bridge.member_ifaddrs, which defaults to 1. if it is set to 1, bridge behaviour is unchanged. if it is set to 0: - an interface which has AF_INET6 or AF_INET addresses assigned cannot be added to a bridge. - an interface in a bridge cannot have an AF_INET6 or AF_INET address assigned to it. - the bridge will no longer consider the lladdrs on bridge members to be local addresses, i.e. frames sent to member lladdrs will not be processed by the host. update bridge.4 to document this behaviour, as well as the existing recommendation that IP addresses should not be configured on bridge members anyway, even if it currently partially works. in testing, setting this to 0 on a bridge with 50 member interfaces improved throughput by 22% (4.61Gb/s -> 5.67Gb/s) across two member epairs due to eliding the bridge member list walk in GRAB_OUR_PACKETS. Reviewed by: kp, des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D49995 --- share/man/man4/bridge.4 | 15 +++++++- sys/net/if_bridge.c | 61 +++++++++++++++++++++++++++----- sys/net/if_bridgevar.h | 1 + sys/net/if_ethersubr.c | 1 + sys/netinet/in.c | 8 +++++ sys/netinet6/in6.c | 8 +++++ tests/sys/net/if_bridge_test.sh | 78 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 162 insertions(+), 10 deletions(-) diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index b741ec0b73c8..2c3bfd6aedfa 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -36,7 +36,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 10, 2024 +.Dd May 5, 2025 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -158,6 +158,19 @@ This can be used to multiplex the input of two or more interfaces into a single stream. This is useful for reconstructing the traffic for network taps that transmit the RX/TX signals out through two separate interfaces. +.Pp +To allow the host to communicate with bridge members, IP addresses +should be assigned to the +.Nm +interface itself, not to the bridge's member interfaces. +Assigning IP addresses to bridge member interfaces is unsupported, but +for backward compatibility, it is permitted if the +.Xr sysctl 8 +variable +.Va net.link.bridge.member_ifaddrs +is set to 1, which is the default. +In a future release, this sysctl may be set to 0 by default, or may be +removed entirely. .Sh IPV6 SUPPORT .Nm supports the diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index c587f0d0f70a..199418c4aa99 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -336,6 +336,7 @@ static void bridge_rtdelete(struct bridge_softc *, struct ifnet *ifp, int); static void bridge_forward(struct bridge_softc *, struct bridge_iflist *, struct mbuf *m); +static bool bridge_member_ifaddrs(void); static void bridge_timer(void *); @@ -502,6 +503,19 @@ SYSCTL_BOOL(_net_link_bridge, OID_AUTO, log_mac_flap, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(log_mac_flap), true, "Log MAC address port flapping"); +/* allow IP addresses on bridge members */ +VNET_DEFINE_STATIC(bool, member_ifaddrs) = true; +#define V_member_ifaddrs VNET(member_ifaddrs) +SYSCTL_BOOL(_net_link_bridge, OID_AUTO, member_ifaddrs, + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(member_ifaddrs), true, + "Allow layer 3 addresses on bridge members"); + +static bool +bridge_member_ifaddrs(void) +{ + return (V_member_ifaddrs); +} + VNET_DEFINE_STATIC(int, log_interval) = 5; VNET_DEFINE_STATIC(int, log_count) = 0; VNET_DEFINE_STATIC(struct timeval, log_last) = { 0 }; @@ -665,6 +679,7 @@ bridge_modevent(module_t mod, int type, void *data) bridge_dn_p = bridge_dummynet; bridge_same_p = bridge_same; bridge_get_softc_p = bridge_get_softc; + bridge_member_ifaddrs_p = bridge_member_ifaddrs; bridge_detach_cookie = EVENTHANDLER_REGISTER( ifnet_departure_event, bridge_ifdetach, NULL, EVENTHANDLER_PRI_ANY); @@ -675,6 +690,7 @@ bridge_modevent(module_t mod, int type, void *data) bridge_dn_p = NULL; bridge_same_p = NULL; bridge_get_softc_p = NULL; + bridge_member_ifaddrs_p = NULL; break; default: return (EOPNOTSUPP); @@ -1313,6 +1329,25 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) return (EINVAL); } + /* + * If member_ifaddrs is disabled, do not allow an interface with + * assigned IP addresses to be added to a bridge. + */ + if (!V_member_ifaddrs) { + struct ifaddr *ifa; + + CK_STAILQ_FOREACH(ifa, &ifs->if_addrhead, ifa_link) { +#ifdef INET + if (ifa->ifa_addr->sa_family == AF_INET) + return (EINVAL); +#endif +#ifdef INET6 + if (ifa->ifa_addr->sa_family == AF_INET6) + return (EINVAL); +#endif + } + } + #ifdef INET6 /* * Two valid inet6 addresses with link-local scope must not be @@ -2742,17 +2777,25 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) do { GRAB_OUR_PACKETS(bifp) } while (0); /* - * Give a chance for ifp at first priority. This will help when the - * packet comes through the interface like VLAN's with the same MACs - * on several interfaces from the same bridge. This also will save - * some CPU cycles in case the destination interface and the input - * interface (eq ifp) are the same. + * We only need to check members interfaces if member_ifaddrs is + * enabled; otherwise we should have never traffic destined for a + * member's lladdr. */ - do { GRAB_OUR_PACKETS(ifp) } while (0); - /* Now check the all bridge members. */ - CK_LIST_FOREACH(bif2, &sc->sc_iflist, bif_next) { - GRAB_OUR_PACKETS(bif2->bif_ifp) + if (V_member_ifaddrs) { + /* + * Give a chance for ifp at first priority. This will help when + * the packet comes through the interface like VLAN's with the + * same MACs on several interfaces from the same bridge. This + * also will save some CPU cycles in case the destination + * interface and the input interface (eq ifp) are the same. + */ + do { GRAB_OUR_PACKETS(ifp) } while (0); + + /* Now check the all bridge members. */ + CK_LIST_FOREACH(bif2, &sc->sc_iflist, bif_next) { + GRAB_OUR_PACKETS(bif2->bif_ifp) + } } #undef CARP_CHECK_WE_ARE_DST diff --git a/sys/net/if_bridgevar.h b/sys/net/if_bridgevar.h index a77ac21c5d1d..90beb6c96d82 100644 --- a/sys/net/if_bridgevar.h +++ b/sys/net/if_bridgevar.h @@ -325,6 +325,7 @@ struct ifbpstpconf { extern void (*bridge_dn_p)(struct mbuf *, struct ifnet *); extern bool (*bridge_same_p)(const void *, const void *); extern void *(*bridge_get_softc_p)(struct ifnet *); +extern bool (*bridge_member_ifaddrs_p)(void); #endif /* _KERNEL */ diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 2397b5ff2090..cb858f20f3b6 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -112,6 +112,7 @@ void (*vlan_input_p)(struct ifnet *, struct mbuf *); void (*bridge_dn_p)(struct mbuf *, struct ifnet *); bool (*bridge_same_p)(const void *, const void *); void *(*bridge_get_softc_p)(struct ifnet *); +bool (*bridge_member_ifaddrs_p)(void); /* if_lagg(4) support */ struct mbuf *(*lagg_input_ethernet_p)(struct ifnet *, struct mbuf *); diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 2fcbff8611ff..963449d4b4b1 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -518,6 +519,13 @@ in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct ucred *cred return (error); #endif + /* + * Check if bridge wants to allow adding addrs to member interfaces. + */ + if (ifp->if_bridge && bridge_member_ifaddrs_p && + !bridge_member_ifaddrs_p()) + return (EINVAL); + /* * See whether address already exist. */ diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 00a0b40154d2..62d00196e56b 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -86,6 +86,7 @@ #include #include #include +#include #include #include #include @@ -1234,6 +1235,13 @@ in6_addifaddr(struct ifnet *ifp, struct in6_aliasreq *ifra, struct in6_ifaddr *i int carp_attached = 0; int error; + /* Check if this interface is a bridge member */ + if (ifp->if_bridge && bridge_member_ifaddrs_p && + !bridge_member_ifaddrs_p()) { + error = EINVAL; + goto out; + } + /* * first, make or update the interface address structure, * and link it to the list. diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 46ebb17edbdc..f9a36126fe59 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -703,6 +703,82 @@ many_bridge_members_cleanup() vnet_cleanup } +atf_test_case "member_ifaddrs_enabled" "cleanup" +member_ifaddrs_enabled_head() +{ + atf_set descr 'bridge with member_ifaddrs=1' + atf_set require.user root +} + +member_ifaddrs_enabled_body() +{ + vnet_init + vnet_init_bridge + + ep=$(vnet_mkepair) + ifconfig ${ep}a inet 192.0.2.1/24 up + + vnet_mkjail one ${ep}b + jexec one sysctl net.link.bridge.member_ifaddrs=1 + jexec one ifconfig ${ep}b inet 192.0.2.2/24 up + jexec one ifconfig bridge0 create addm ${ep}b + + atf_check -s exit:0 -o ignore ping -c3 -t1 192.0.2.2 +} + +member_ifaddrs_enabled_cleanup() +{ + vnet_cleanup +} + +atf_test_case "member_ifaddrs_disabled" "cleanup" +member_ifaddrs_disabled_head() +{ + atf_set descr 'bridge with member_ifaddrs=0' + atf_set require.user root +} + +member_ifaddrs_disabled_body() +{ + vnet_init + vnet_init_bridge + + vnet_mkjail one + jexec one sysctl net.link.bridge.member_ifaddrs=0 + + bridge=$(jexec one ifconfig bridge create) + + # adding an interface with an IPv4 address + ep=$(jexec one ifconfig epair create) + jexec one ifconfig ${ep} 192.0.2.1/32 + atf_check -s exit:1 -e ignore jexec one ifconfig ${bridge} addm ${ep} + + # adding an interface with an IPv6 address + ep=$(jexec one ifconfig epair create) + jexec one ifconfig ${ep} inet6 2001:db8::1/128 + atf_check -s exit:1 -e ignore jexec one ifconfig ${bridge} addm ${ep} + + # adding an interface with an IPv6 link-local address + ep=$(jexec one ifconfig epair create) + jexec one ifconfig ${ep} inet6 -ifdisabled auto_linklocal up + atf_check -s exit:1 -e ignore jexec one ifconfig ${bridge} addm ${ep} + + # adding an IPv4 address to a member + ep=$(jexec one ifconfig epair create) + jexec one ifconfig ${bridge} addm ${ep} + atf_check -s exit:1 -e ignore jexec one ifconfig ${ep} inet 192.0.2.2/32 + + # adding an IPv6 address to a member + ep=$(jexec one ifconfig epair create) + jexec one ifconfig ${bridge} addm ${ep} + atf_check -s exit:1 -e ignore jexec one ifconfig ${ep} inet6 2001:db8::1/128 +} + +member_ifaddrs_disabled_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "bridge_transmit_ipv4_unicast" @@ -718,4 +794,6 @@ atf_init_test_cases() atf_add_test_case "mtu" atf_add_test_case "vlan" atf_add_test_case "many_bridge_members" + atf_add_test_case "member_ifaddrs_enabled" + atf_add_test_case "member_ifaddrs_disabled" } From nobody Mon May 5 22:16: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 4ZrwqP0PHmz5twb0; Mon, 05 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrwqN5Bx0z3sMg; Mon, 05 May 2025 22:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ko5j10c6Cg/cDHQTqpGOjHAMNVmbyOiKToVDZSepgM=; b=iMm7Q5/mj0ejV6544TbO1rYCDKjDLfzikxcmLi94q4NANiGFUiQ+QLyHlulZmjh7jmoXXY 1c2Bs+5SIeo5DrEx4t/r9kw6uGmyQFL7JwVT6Q6q7ShKnCv30f/DgeSmJbOPtOVHTWGuHg K/gRmPZNWtCan2/YBQcwynCyfg100z7c31p5rGi+lRxrUmA1faOIE4MZp81ijbeGUTxAVt Ec3fL53kS/eARtw1yLo+rpIIEITGha7t2F0zAWABhBs7GXr9GOK82d+F1fhmQwtwXPHiSW oSZDqC2OWauMlMcCFGV2tGIehU581PWW/42dJwXIJANgbvy3dKRwx7H0rBwSjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ko5j10c6Cg/cDHQTqpGOjHAMNVmbyOiKToVDZSepgM=; b=MMHjGBZ71hl5u7bkwCX5BG3Pn53/nZD1HzEWAN5dnPUlWgTfL60jnf9rvfpYHJDoT+CGig RiT6+XGHLvwjC4KNezoDQ1/lgAbC8jsp5h6WZGShrLb6lb/k1km2mSJZHkKOuxmgoiUvyU I6rOwh+57CBUcH2yg/NvDy7bTqxzz8XTBuh1cx9PkARoV+2TMellrBBoIZG+KsuLSzXnUJ v9pPwRNPjAo1BV4QbEA+cqlzAJ9kCBOpwm/Gh47v1ZLtwBU5glByyrUe+XGoWY5BpfWcUe V48eb52PrSu7Sc4X+kwBv9riAJiXI8Hk51aP1ZB/DJ/JK8zEEwnld7Gl1Pycbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746483408; a=rsa-sha256; cv=none; b=mqJFjXwc/YWRoIno3pJKRWN+pFXOq/0sDioh9c+tIOnwvlcKr4emz0IjxlsUIqlsZEY+pE yx8McLzD8UMms2jNQQ6EjvpppVKV8UTTbXTf67yIvKXiwSbhvefIORdDpnG8HiEf0DKE++ 6ZuSyh4593B0gZTz9ANZcp/sa1h5/clTxNtbGaEq87eSTGlmDDUgGcn/QxAemWL94CRFjA HPLr1YkrHZAqEeiVKug5OnP0e2wT+H7WMgYbZfkoV0fryLV2Ubx0mozrCO6o+j4Ay0cQjc 4zI1SEU+JzLuGrnbogph0SjT3TOmYPa38NDcgKwGkIg/PXQaYHcC3WC1ea/QYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrwqN4m3HzYsB; Mon, 05 May 2025 22:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545MGmt4049295; Mon, 5 May 2025 22:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545MGmbK049292; Mon, 5 May 2025 22:16:48 GMT (envelope-from git) Date: Mon, 5 May 2025 22:16:48 GMT Message-Id: <202505052216.545MGmbK049292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ff8200f9b8d4 - main - traceroute: add tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff8200f9b8d464d6b4cbdeaaacdc2b78d339111b Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ff8200f9b8d464d6b4cbdeaaacdc2b78d339111b commit ff8200f9b8d464d6b4cbdeaaacdc2b78d339111b Author: Lexi Winter AuthorDate: 2025-05-05 21:47:58 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 21:47:58 +0000 traceroute: add tests add some basic tests for traceroute. this covers most of the flags we can easily test; in some cases we use tcpdump to ensure the correct packets are actually being sent. to run the tests, we create three jails: one for the source host, one for the destination host, and one to route packets betweem them. this ensures we're actually testing traceroute across a routed network and not just sending probe packets to a directly connected host. no tests for traceroute6 are in this commit since the traceroute6 merge into traceroute is in progress elsewhere. Reviewed by: des, adrian Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D49838 --- etc/mtree/BSD.tests.dist | 2 + usr.sbin/traceroute/Makefile | 3 + usr.sbin/traceroute/tests/Makefile | 7 + usr.sbin/traceroute/tests/traceroute_test.sh | 880 +++++++++++++++++++++++++++ 4 files changed, 892 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 22b9686fb761..bb62c44403d2 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1279,6 +1279,8 @@ .. sysrc .. + traceroute + .. .. .. diff --git a/usr.sbin/traceroute/Makefile b/usr.sbin/traceroute/Makefile index 62d82a47d953..c52bd52abb1d 100644 --- a/usr.sbin/traceroute/Makefile +++ b/usr.sbin/traceroute/Makefile @@ -7,6 +7,9 @@ SRCS= as.c traceroute.c ifaddrlist.c findsaddr-udp.c BINOWN= root BINMODE=4555 +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .if !defined(TRACEROUTE_NO_IPSEC) CFLAGS+= -DIPSEC .endif diff --git a/usr.sbin/traceroute/tests/Makefile b/usr.sbin/traceroute/tests/Makefile new file mode 100644 index 000000000000..7c3d6f777582 --- /dev/null +++ b/usr.sbin/traceroute/tests/Makefile @@ -0,0 +1,7 @@ +ATF_TESTS_SH+= traceroute_test + +# Allow tests to run in parallel in their own jails +TEST_METADATA+= execenv="jail" +TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" + +.include diff --git a/usr.sbin/traceroute/tests/traceroute_test.sh b/usr.sbin/traceroute/tests/traceroute_test.sh new file mode 100755 index 000000000000..6243db14bc8e --- /dev/null +++ b/usr.sbin/traceroute/tests/traceroute_test.sh @@ -0,0 +1,880 @@ +# SPDX-License-Identifier: ISC +# +# Copyright (c) 2025 Lexi Winter +# +# 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. + +# We are missing tests for the following flags: +# +# -a (turn on ASN lookups) +# -A (specify ASN lookup server) +# -d (enable SO_DEBUG) +# -D (print the diff between our packet and the quote in the ICMP error) +# -E (detect ECN bleaching) +# -n (or rather, we enable -n by default and don't test without it) +# -S (print per-hop packet loss) +# -v (verbose output) +# -w (how long to wait for an error response) +# -x (toggle IP checksums) +# -z (how long to wait between each probe) + +. $(atf_get_srcdir)/../../sys/common/vnet.subr + +# These are the default flags we use for most test cases: +# - only send a single probe packet to reduce the risk of kernel ICMP +# rate-limiting breaking the test. +# - only trace up to 5 hops and only wait 1 second for a response so the test +# fails quicker if something goes wrong. +# - disable DNS resolution as we don't usually care about this. +TR_FLAGS="-w 1 -q 1 -m 5 -n" + +# The prefix our test networks are in. +TEST_PREFIX="192.0.2.0/24" + +# The IPv4 addresses of the first link net between trsrc and trrtr. +LINK_TRSRC_TRSRC="192.0.2.5" +LINK_TRSRC_TRRTR="192.0.2.6" +LINK_TRSRC_PREFIXLEN="30" + +# The IPv4 addresses of the second link net between trsrc and trrtr. +LINK_TRSRC2_TRSRC="192.0.2.13" +LINK_TRSRC2_TRRTR="192.0.2.14" +LINK_TRSRC2_PREFIXLEN="30" + +# The IPv4 addresses of the link net between trdst and trrtr. +LINK_TRDST_TRDST="192.0.2.9" +LINK_TRDST_TRRTR="192.0.2.10" +LINK_TRDST_PREFIXLEN="30" + +# This is an address inside $TEST_PREFIX which is not routed anywhere. +UNREACHABLE_ADDR="192.0.2.255" + +setup_network() +{ + # Create 3 jails: one to be the source host, one to be the router, + # and one to be the destination host. + + vnet_init + + # src jail + epsrc=$(vnet_mkepair) + epsrc2=$(vnet_mkepair) + vnet_mkjail trsrc ${epsrc}a ${epsrc2}a + + # dst jail + epdst=$(vnet_mkepair) + vnet_mkjail trdst ${epdst}a + + # router jail + vnet_mkjail trrtr ${epsrc}b ${epsrc2}b ${epdst}b + + # Configure IPv4 addresses and routes on each jail. + + # trsrc + jexec trsrc ifconfig ${epsrc}a inet \ + ${LINK_TRSRC_TRSRC}/${LINK_TRSRC_PREFIXLEN} + jexec trrtr ifconfig ${epsrc}b inet \ + ${LINK_TRSRC_TRRTR}/${LINK_TRSRC_PREFIXLEN} + jexec trsrc route add -inet ${TEST_PREFIX} ${LINK_TRSRC_TRRTR} + + # trsrc2 + jexec trsrc ifconfig ${epsrc2}a inet \ + ${LINK_TRSRC2_TRSRC}/${LINK_TRSRC2_PREFIXLEN} + jexec trrtr ifconfig ${epsrc2}b inet \ + ${LINK_TRSRC2_TRRTR}/${LINK_TRSRC2_PREFIXLEN} + + # trdst + jexec trdst ifconfig ${epdst}a inet \ + ${LINK_TRDST_TRDST}/${LINK_TRDST_PREFIXLEN} + jexec trrtr ifconfig ${epdst}b inet \ + ${LINK_TRDST_TRRTR}/${LINK_TRDST_PREFIXLEN} + jexec trdst route add -inet ${TEST_PREFIX} ${LINK_TRDST_TRRTR} + + # The router jail (only) needs IP forwarding enabled. + jexec trrtr sysctl net.inet.ip.forwarding=1 +} + +## +# +# start_tcpdump, stop_tcpdump: used to capture packets during the test so we +# can verify we actually sent the expected packets. + +start_tcpdump() +{ + # Run tcpdump on trrtr, either on the given interface or on + # ${epsrc}b, which is trsrc's default route interface. + + interface="$1" + if [ -z "$interface" ]; then + interface="${epsrc}b" + fi + + rm -f "${PWD}/traceroute.pcap" + + jexec trrtr daemon -p "${PWD}/tcpdump.pid" \ + tcpdump --immediate-mode -w "${PWD}/traceroute.pcap" -nv \ + -i $interface + + # Give tcpdump time to start + sleep 1 +} + +stop_tcpdump() +{ + # Sleep to give tcpdump a chance to finish flushing + jexec trrtr kill -USR2 $(cat "${PWD}/tcpdump.pid") + sleep 1 + jexec trrtr kill $(cat "${PWD}/tcpdump.pid") + + # Format the packet capture and merge continued lines (starting with + # whitespace) into a single line; this makes it easier to match in + # atf_check. Append a blank line since the N command exits on EOF. + (tcpdump -nv -r "${PWD}/traceroute.pcap"; echo) | \ + sed -E -e :a -e N -e 's/\n +/ /' -e ta -e P -e D \ + > tcpdump.output +} + +## +# test: ipv4_basic +# + +atf_test_case "ipv4_basic" "cleanup" +ipv4_basic_head() +{ + atf_set descr "Basic IPv4 traceroute across a router" + atf_set require.user root +} + +ipv4_basic_body() +{ + setup_network + + # Use a more detailed set of regexp here than the rest of the tests to + # make sure the basic output format is correct. + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST} \\(${LINK_TRDST_TRDST}\\), 5 hops max, 40 byte packets$" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR} [0-9.]+ ms$" \ + -o match:"^ 2 ${LINK_TRDST_TRDST} [0-9.]+ ms$" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS ${LINK_TRDST_TRDST} +} + +ipv4_basic_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_icmp +# + +atf_test_case "ipv4_icmp" "cleanup" +ipv4_icmp_head() +{ + atf_set descr "Basic IPv4 ICMP traceroute across a router" + atf_set require.user root +} + +ipv4_icmp_body() +{ + setup_network + + # -I and -Picmp should mean the same thing, so test both. + + for icmp_flag in -Picmp -I; do + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS $icmp_flag \ + ${LINK_TRDST_TRDST} + + stop_tcpdump + + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto ICMP.*\\).* ${LINK_TRSRC_TRSRC} > ${LINK_TRDST_TRDST}: ICMP echo request" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto ICMP.*\\).* ${LINK_TRSRC_TRSRC} > ${LINK_TRDST_TRDST}: ICMP echo request" \ + cat tcpdump.output + done +} + +ipv4_icmp_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_udp +# + +atf_test_case "ipv4_udp" "cleanup" +ipv4_udp_head() +{ + atf_set descr "IPv4 UDP traceroute" + atf_set require.user root +} + +ipv4_udp_body() +{ + setup_network + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -Pudp ${LINK_TRDST_TRDST} + + stop_tcpdump + + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto UDP .*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: UDP" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto UDP .*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33436: UDP" \ + cat tcpdump.output + + # Test with -e, the destination port should not increment. + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -Pudp -e -p 40000 ${LINK_TRDST_TRDST} + + stop_tcpdump + + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto UDP .*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40000: UDP" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto UDP .*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40000: UDP" \ + cat tcpdump.output +} + +ipv4_udp_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_sctp +# + +atf_test_case "ipv4_sctp" "cleanup" +ipv4_sctp_head() +{ + atf_set descr "IPv4 SCTP traceroute" + atf_set require.user root +} + +ipv4_sctp_body() +{ + setup_network + + # For the default packet size, we should sent a SHUTDOWN ACK packet. + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST} .* !P" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -Psctp ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto SCTP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: sctp \(1\) \[SHUTDOWN ACK\]" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto SCTP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33436: sctp \(1\) \[SHUTDOWN ACK\]" \ + cat tcpdump.output + + # For a larger packet size we should send INIT packets. + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST} .* !P" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -Psctp ${LINK_TRDST_TRDST} 128 + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto SCTP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: sctp \(1\) \[INIT\]" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto SCTP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33436: sctp \(1\) \[INIT\]" \ + cat tcpdump.output + + # Test with -e, the destination port should not increment. + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST} .* !P" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -Psctp -e -p 40000 ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto SCTP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40000: sctp \(1\) \[SHUTDOWN ACK\]" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto SCTP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40000: sctp \(1\) \[SHUTDOWN ACK\]" \ + cat tcpdump.output +} + +ipv4_sctp_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_tcp +# + +atf_test_case "ipv4_tcp" "cleanup" +ipv4_tcp_head() +{ + atf_set descr "IPv4 TCP traceroute" + atf_set require.user root +} + +ipv4_tcp_body() +{ + setup_network + + start_tcpdump + + # We expect the second hop to be a failure since traceroute doesn't + # know how to capture the RST packet. + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 \\*" \ + jexec trsrc traceroute $TR_FLAGS -Ptcp ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto TCP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: Flags \[S\]" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto TCP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33436: Flags \[S\]" \ + cat tcpdump.output + + # Test with -e, the destination port should not increment. + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 \\*" \ + jexec trsrc traceroute $TR_FLAGS -Ptcp -e -p 40000 ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto TCP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40000: Flags \[S\]" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto TCP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40000: Flags \[S\]" \ + cat tcpdump.output +} + +ipv4_tcp_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_srcaddr +# + +atf_test_case "ipv4_srcaddr" "cleanup" +ipv4_srcaddr_head() +{ + atf_set descr "IPv4 traceroute with explicit source address" + atf_set require.user root +} + +ipv4_srcaddr_body() +{ + setup_network + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST} \\($LINK_TRDST_TRDST\\) from ${LINK_TRSRC2_TRSRC}" \ + -o match:"^ 1 ${LINK_TRSRC2_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS \ + -s ${LINK_TRSRC2_TRSRC} ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto UDP.*\\).* ${LINK_TRSRC2_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: UDP" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto UDP.*\\).* ${LINK_TRSRC2_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33436: UDP" \ + cat tcpdump.output +} + +ipv4_srcaddr_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_srcinterface +# + +atf_test_case "ipv4_srcinterface" "cleanup" +ipv4_srcinterface_head() +{ + atf_set descr "IPv4 traceroute with explicit source interface" + atf_set require.user root +} + +ipv4_srcinterface_body() +{ + setup_network + + start_tcpdump + + # Unlike -s, traceroute doesn't print 'from ...' when using -i. + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC2_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS \ + -i ${epsrc2}a ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto UDP.*\\).* ${LINK_TRSRC2_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: UDP" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto UDP.*\\).* ${LINK_TRSRC2_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33436: UDP" \ + cat tcpdump.output +} + +ipv4_srcinterface_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_maxhops +# + +atf_test_case "ipv4_maxhops" "cleanup" +ipv4_maxhops_head() +{ + atf_set descr "IPv4 traceroute with -m" + atf_set require.user root +} + +ipv4_maxhops_body() +{ + setup_network + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o not-match:"^ 2" \ + jexec trsrc traceroute -w1 -q1 -m1 ${LINK_TRDST_TRDST} +} + +ipv4_maxhops_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_unreachable +# + +atf_test_case "ipv4_unreachable" "cleanup" +ipv4_unreachable_head() +{ + atf_set descr "IPv4 traceroute to an unreachable destination" + atf_set require.user root +} + +ipv4_unreachable_body() +{ + setup_network + + atf_check -s exit:0 \ + -e match:"^traceroute to ${UNREACHABLE_ADDR}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRSRC_TRRTR} [0-9.]+ ms !H" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS $UNREACHABLE_ADDR +} + +ipv4_unreachable_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_hugepacket +# + +atf_test_case "ipv4_hugepacket" "cleanup" +ipv4_hugepacket_head() +{ + atf_set descr "IPv4 traceroute with a huge packet" + atf_set require.user root +} + +ipv4_hugepacket_body() +{ + setup_network + + # We expect this to fail since we specified -F (don't fragment) and the + # 2000-byte packet is too large to fit through our tiny epair. Make + # sure traceroute reports the error. + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST} \\(${LINK_TRDST_TRDST}\\), 5 hops max, 2000 byte packets$" \ + -o match:"^ 1 traceroute: wrote ${LINK_TRDST_TRDST} 2000 chars, ret=-1" \ + -e match:"^traceroute: sendto: Message too long" \ + jexec trsrc traceroute -F $TR_FLAGS ${LINK_TRDST_TRDST} 2000 +} + +ipv4_hugepacket_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_firsthop +# + +atf_test_case "ipv4_firsthop" "cleanup" +ipv4_firsthop_head() +{ + atf_set descr "IPv4 traceroute with one hop skipped" + atf_set require.user root +} + +ipv4_firsthop_body() +{ + setup_network + + # -f 2 means we skip the first hop. For backward compatibility, -M is + # the same as -f, so test that too. + + for flag in -f2 -M2; do + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 1" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $flag $TR_FLAGS ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o not-match:"^..:..:..\....... IP \\(tos 0x0, ttl 1, .*, proto UDP.*\\)" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto UDP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: UDP" \ + cat tcpdump.output + done +} + +ipv4_firsthop_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_nprobes +# + +atf_test_case "ipv4_nprobes" "cleanup" +ipv4_nprobes_head() +{ + atf_set descr "IPv4 traceroute with varying number of probes" + atf_set require.user root +} + +ipv4_nprobes_body() +{ + setup_network + + # By default we should send 3 probes. + atf_check -s exit:0 -e ignore \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR} \(${LINK_TRSRC_TRRTR}\)( [0-9.]+ ms){3}$" \ + jexec trsrc traceroute -w1 -m1 ${LINK_TRDST_TRDST} + + # Also test 1 and 2 (below the default) and 5 (above the default) + for nprobes in 1 2 5; do + atf_check -s exit:0 -e ignore \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR} \(${LINK_TRSRC_TRRTR}\)( [0-9.]+ ms){$nprobes}$" \ + jexec trsrc traceroute -q$nprobes -w1 -m1 ${LINK_TRDST_TRDST} + done +} + +ipv4_nprobes_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_baseport +# + +atf_test_case "ipv4_baseport" "cleanup" +ipv4_baseport_head() +{ + atf_set descr "IPv4 traceroute with non-default base port" + atf_set require.user root +} + +ipv4_baseport_body() +{ + setup_network + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -p 40000 \ + ${LINK_TRDST_TRDST} + + stop_tcpdump + + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto UDP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40001: UDP" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto UDP.*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.40002: UDP" \ + cat tcpdump.output +} + +ipv4_baseport_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_gre +# + +atf_test_case "ipv4_gre" "cleanup" +ipv4_gre_head() +{ + atf_set descr "IPv4 GRE traceroute" + atf_set require.user root +} + +ipv4_gre_body() +{ + setup_network + + start_tcpdump + + # We expect the second hop to be a failure since the remote host will + # ignore the GRE packet. + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 \\*" \ + jexec trsrc traceroute $TR_FLAGS -Pgre ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto GRE .*\\).* ${LINK_TRSRC_TRSRC} > ${LINK_TRDST_TRDST}: GREv1" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto GRE .*\\).* ${LINK_TRSRC_TRSRC} > ${LINK_TRDST_TRDST}: GREv1" \ + cat tcpdump.output +} + +ipv4_gre_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_udplite +# + +atf_test_case "ipv4_udplite" "cleanup" +ipv4_udplite_head() +{ + atf_set descr "IPv4 UDP-Lite traceroute" + atf_set require.user root +} + +ipv4_udplite_body() +{ + setup_network + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -Pudplite ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto unknown \(136\), .*\\).* ${LINK_TRSRC_TRSRC} > ${LINK_TRDST_TRDST}: ip-proto-136" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto unknown \(136\), .*\\).* ${LINK_TRSRC_TRSRC} > ${LINK_TRDST_TRDST}: ip-proto-136" \ + cat tcpdump.output +} + +ipv4_udplite_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_iptos +# + +atf_test_case "ipv4_iptos" "cleanup" +ipv4_iptos_head() +{ + atf_set descr "IPv4 traceroute with explicit ToS" + atf_set require.user root +} + +ipv4_iptos_body() +{ + setup_network + + start_tcpdump + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST}" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS -t 4 ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x4, ttl 1, .*, proto UDP .*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33435: UDP" \ + -o match:"IP \\(tos 0x4, ttl 2, .*, proto UDP .*\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRDST_TRDST}.33436: UDP" \ + cat tcpdump.output +} + +ipv4_iptos_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_srcroute +# + +atf_test_case "ipv4_srcroute" "cleanup" +ipv4_srcroute_head() +{ + atf_set descr "IPv4 traceroute with explicit source routing" + atf_set require.user root +} + +ipv4_srcroute_body() +{ + setup_network + jexec trsrc sysctl net.inet.ip.sourceroute=1 + jexec trsrc sysctl net.inet.ip.accept_sourceroute=1 + jexec trrtr sysctl net.inet.ip.sourceroute=1 + + start_tcpdump + + # As we don't enable source routing on trdst, we should get an ICMP + # source routing failed error (!S). + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 2 ${LINK_TRDST_TRDST} [0-9.]+ ms !S" \ + -o not-match:"^ 3" \ + jexec trsrc traceroute $TR_FLAGS \ + -g ${LINK_TRSRC_TRRTR} ${LINK_TRDST_TRDST} + + stop_tcpdump + atf_check -s exit:0 -e ignore \ + -o match:"IP \\(tos 0x0, ttl 1, .*, proto UDP .*, options \\(NOP,LSRR ${LINK_TRDST_TRDST}\\)\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRSRC_TRRTR}.33435: UDP" \ + -o match:"IP \\(tos 0x0, ttl 2, .*, proto UDP .*, options \\(NOP,LSRR ${LINK_TRDST_TRDST}\\)\\).* ${LINK_TRSRC_TRSRC}.[0-9]+ > ${LINK_TRSRC_TRRTR}.33436: UDP" \ + cat tcpdump.output +} + +ipv4_srcroute_cleanup() +{ + vnet_cleanup +} + +## +# test: ipv4_dontroute +# + +atf_test_case "ipv4_dontroute" "cleanup" +ipv4_dontroute_head() +{ + atf_set descr "IPv4 traceroute with -r" + atf_set require.user root +} + +ipv4_dontroute_body() +{ + setup_network + + # This one should work as trrtr is directly connected. + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRSRC_TRRTR}" \ + -o match:"^ 1 ${LINK_TRSRC_TRRTR} [0-9.]+ ms$" \ + -o not-match:"^ 2" \ + jexec trsrc traceroute -r $TR_FLAGS ${LINK_TRSRC_TRRTR} + + # This one should fail. + + atf_check -s exit:0 \ + -e match:"^traceroute to ${LINK_TRDST_TRDST}" \ + -o match:"^ 1 traceroute: wrote ${LINK_TRDST_TRDST} 40 chars, ret=-1" \ + jexec trsrc traceroute -r $TR_FLAGS ${LINK_TRDST_TRDST} +} + +ipv4_dontroute_cleanup() +{ + vnet_cleanup +} + +## +# test case declarations + +atf_init_test_cases() +{ + atf_add_test_case ipv4_basic + atf_add_test_case ipv4_udp + atf_add_test_case ipv4_icmp + atf_add_test_case ipv4_tcp + atf_add_test_case ipv4_sctp + atf_add_test_case ipv4_gre + atf_add_test_case ipv4_udplite + atf_add_test_case ipv4_srcaddr + atf_add_test_case ipv4_srcinterface + atf_add_test_case ipv4_maxhops + atf_add_test_case ipv4_unreachable + atf_add_test_case ipv4_hugepacket + atf_add_test_case ipv4_firsthop + atf_add_test_case ipv4_nprobes + atf_add_test_case ipv4_baseport + atf_add_test_case ipv4_iptos + atf_add_test_case ipv4_srcroute + atf_add_test_case ipv4_dontroute +} From nobody Mon May 5 22:16: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 4ZrwqQ0zjyz5twjK; Mon, 05 May 2025 22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrwqP6Kqpz3sCF; Mon, 05 May 2025 22:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mswy7WywVC8zO+Odpd3pd/ufTUsN7LukD21Pacv6GFc=; b=rcxJm+tOO2CmxxOhBTfc6uo5AxTEqtaRbtJYmU5+hIOrRRR8bNkEV+9LznGFBBzHusupV4 n8dO4GKfrxJHzXt0Ndz8ZQzUZLtisPvvEQbLoBcUdEFj9fuZdk16TvpgVsLO1x9wxPtVdW zB5YC6SoxMoxyTJpu0KD9O5PddFH32VrjmkCm1MoXqVAO7SjjEPKN5Jsj0rXvvaqukoOhj cYgGSJQL8vQrnZ11EsgfmGlVy/CjZHFwSfZL9jLr4zsDbAYpoq9DMUBnnSF6i+iW2/0a8P Q1ACM+r7+rxT8PrRK4SdzSTKqwRCRpUspt85E92FB8X8TXmKy69BhI6QUP+72g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mswy7WywVC8zO+Odpd3pd/ufTUsN7LukD21Pacv6GFc=; b=CXX249qg9KzREaqXEvNVyOv14HuBXNcjs3HMiruGmeCdthrLvawC2adTuQ8/zvlHCpu52o 2uwGltnKWOAUZ6mK3qgADfayZU40c9K4eQTwqq46glC+Ya6YpCcRS840cHDuOn+lg1bk1+ vswvMTQKbAy9ga5+5/NexttnmBSfu9xCBGCgtK6XLugS1PtW/treBo8PaAiribqSbQZhW4 q7vE+6EMK1rl551qSP4iLZ5h1SacNH2CzW3K8kuu0ziN+PGGkUB5MpKPYdCFtyDA2Qtn+D lVQfzD8hFw18KYG8xLsK32+zDX8K7kerxsyP1CdwE8s+PRbah4T1PGRHuqjRRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746483409; a=rsa-sha256; cv=none; b=Dz5VFn56+JJq/Xahs5pQBAwogmvfnr/mqjPDGDTWHu7yy0x6GHXnNRG0QTnYyKhZUSqQLe 8zrw+p7Co7X0awvc/jD5+Cst29FltjI0LA4iqqvA13dByBlBPWHGPba/Cfqn8AuNr7TqYo +dTOh+hsg0pVMFaK+/gsvCnVHcH11q6nXD7/HPIP4bG1vmfoNsVO6OKy97NQ87sX8ibNkA VMmwYgc/Ro0IZh+Aq4pohNKOPZ6lUSMxeA+igGETTJyVKY2TR+SswhYD32sWHdAcu32M6E 0b8308mYs1tvEyOMB58pvmx5blbr/o3Fe7WK1b2C8JUgO0plwlF1zAcssWRx0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrwqP5svpzZ68; Mon, 05 May 2025 22:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545MGn1u049329; Mon, 5 May 2025 22:16:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545MGn4x049326; Mon, 5 May 2025 22:16:49 GMT (envelope-from git) Date: Mon, 5 May 2025 22:16:49 GMT Message-Id: <202505052216.545MGn4x049326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: c853409d69c4 - main - libcrypto: move engines and modules to openssl-lib List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c853409d69c4186b65b0dd63d0a8faf63c1a5cac Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=c853409d69c4186b65b0dd63d0a8faf63c1a5cac commit c853409d69c4186b65b0dd63d0a8faf63c1a5cac Author: Lexi Winter AuthorDate: 2025-05-05 21:49:57 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 21:49:57 +0000 libcrypto: move engines and modules to openssl-lib currently, some OpenSSL-related files end up in the utilities package: /usr/lib/engines-3/capi.so /usr/lib/engines-3/devcrypto.so /usr/lib/engines-3/loader_attic.so /usr/lib/engines-3/padlock.so /usr/lib/ossl-modules/legacy.so since these are part of OpenSSL and are not useful without it, move them to the openssl-lib package. Reviewed by: manu, des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50144 --- secure/lib/libcrypto/engines/Makefile.inc | 2 ++ secure/lib/libcrypto/modules/Makefile.inc | 1 + 2 files changed, 3 insertions(+) diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc index 3da129023c7f..777193ba3f9a 100644 --- a/secure/lib/libcrypto/engines/Makefile.inc +++ b/secure/lib/libcrypto/engines/Makefile.inc @@ -1,3 +1,5 @@ +PACKAGE?= openssl-lib + SHLIBDIR= ${LIBDIR}/engines-3 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc index 92bc102c06e9..79d9a65b44c2 100644 --- a/secure/lib/libcrypto/modules/Makefile.inc +++ b/secure/lib/libcrypto/modules/Makefile.inc @@ -1,3 +1,4 @@ +PACKAGE?= openssl-lib SHLIBDIR= ${LIBDIR}/ossl-modules LCRYPTO_SRC= ${SRCTOP}/crypto/openssl From nobody Mon May 5 22: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 4ZrwqR3W1Wz5twRY; Mon, 05 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZrwqR0QCCz3sHV; Mon, 05 May 2025 22:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6NsIXR34yuTF6dSdLvDmV7LIXrBxrEtGc3x7YMPNKMM=; b=xSHOHkIoAhj2sIe6z9gP91rEK+GRWuBbTx8tvKpepBKUpU3+5fJylJYMR3CjJIPGa8P8Ql yJ1bymPdDzK06GFmjsxnf37LU0XEL8EVpaXFiUHJcS1anCXANiY6W08mwAkgu3NB4w+12G jN3p+hTOJc0Rd8RrxcmU0CpxPX4LkQaSSM14Dz7G/AUGOnk9Nc0+7apgv1AkGIr/z5UFcK 3MjEqGrqgjiNgizbFby1En9t4tgyqZFPtr7NJqIyTgMETpN6In7PfAUgMveWHbO106Eux+ XqEoBc4GRDhvl9DMSSt4XpIfZFg0UUKoqIeXEjGjBcNJnzt0U6YbjUlG7vPwdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746483411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6NsIXR34yuTF6dSdLvDmV7LIXrBxrEtGc3x7YMPNKMM=; b=ofl2kPKAUB8AFGGjBw7poBOl1MewXQkPpMAfzS4+hlG1O64RR10LlG6V+anRP5pfHWwKxE G8q7xj1VI8u80jWwIaU9t8ERIT4gqbLw9ME0PiyKnawf/hxVHVBbG9Eb0PPY9/kQsaeulX 9o5ariuPKsA9Q3AnROQTV4L0s/ws1Y5q4R94uGvLqvYHvIMst0wS4qZLr7dopsRy7m3tpr WmrUTUoQodqEnfgnNZWaAWo4xN3RAZIGBwSrcSlBBqOgtpEDYLMGQyWBAeZQpwxLF2ybN+ MMICmDLbHhRn6zHiQJoZ8f7Yoe0EmyFb+hlGF6gDoYp684x5eiPAhy9OK18O1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746483411; a=rsa-sha256; cv=none; b=ahK2OSfLsG+F6i4yKiiJvFaBHi5irMrri0EC0wo8pTqTl/ZCmyW6wduUPYbDHEgG2wO82L aiVXllGbSrL8bXRN6DradNpaJ7Y+zrkv1pncOW7zmSZS5EAYlFSUydP5SfDUmdpMpspBL3 iu0fAghNfIhEH5ztm5y+liCsMAP349Rb3hAa2J3GiTvHj3g34PapDNz+lI5IcA5GDXKyjE 1uUCDj+9FLNDgFe8TTmXrVbHrAv3o11sU8NfsoRGEOsX1rPIStHyyuY8SGSmlYgdwenu5/ fK0g+NAJbqOEQLU2GM4+UMrAMkXk/oQU64ZLypdEwRobiHbOe1zjsSPPm0kU2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZrwqQ6Q4mzY5H; Mon, 05 May 2025 22:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545MGoAS049368; Mon, 5 May 2025 22:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545MGoeO049365; Mon, 5 May 2025 22:16:50 GMT (envelope-from git) Date: Mon, 5 May 2025 22:16:50 GMT Message-Id: <202505052216.545MGoeO049365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: fd03d573cb80 - main - mountd, showmount: move to the nfs package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd03d573cb800d1833fe2c416177361e6cd103fb Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=fd03d573cb800d1833fe2c416177361e6cd103fb commit fd03d573cb800d1833fe2c416177361e6cd103fb Author: Lexi Winter AuthorDate: 2025-05-05 21:50:58 +0000 Commit: Lexi Winter CommitDate: 2025-05-05 22:14:47 +0000 mountd, showmount: move to the nfs package while here, alphabetise ${NFS}. Reviewed by: des, emaste, rmacklem Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50169 --- libexec/rc/rc.d/Makefile | 8 ++++---- usr.bin/showmount/Makefile | 1 + usr.sbin/mountd/Makefile | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 89eeea8f587a..67786672351a 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -46,7 +46,6 @@ CONFS= DAEMON \ mountlate \ mdconfig \ mdconfig2 \ - mountd \ msgs \ netif \ netoptions \ @@ -116,11 +115,12 @@ CRON+= cron CRONPACKAGE= cron CONFGROUPS+= NFS -NFS= nfsclient \ +NFS= lockd \ + mountd \ + nfscbd \ + nfsclient \ nfsd \ nfsuserd \ - nfscbd \ - lockd \ statd NFSPACKAGE= nfs diff --git a/usr.bin/showmount/Makefile b/usr.bin/showmount/Makefile index 55f5de995422..c67d7b0446bd 100644 --- a/usr.bin/showmount/Makefile +++ b/usr.bin/showmount/Makefile @@ -1,3 +1,4 @@ +PACKAGE= nfs PROG= showmount MAN= showmount.8 diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile index ebc4d3438cc1..3760f22bff6c 100644 --- a/usr.sbin/mountd/Makefile +++ b/usr.sbin/mountd/Makefile @@ -1,3 +1,4 @@ +PACKAGE= nfs PROG= mountd MAN= exports.5 netgroup.5 mountd.8 From nobody Mon May 5 23:10: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 4Zry0q65WXz5v157; Mon, 05 May 2025 23:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zry0q5NBSz3pNX; Mon, 05 May 2025 23:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746486603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t21iWtIw6Zz0qpqLAc3Gw458viV0S2CQjpVxFPBEyTA=; b=GEtnXGUoG/Tg4eJI7S+R3fpevJ85cigiTEsQqsMy9/6l3OmMN8WAzmaZG0f2cf38XxZjPl 5Rtf10Qtkv84u9dyu0SFchKBgs+dTpfaPNFvTqrCs64qJNrJFV6uhA8a0m2IW3Qz/7XSiz xFbHmVeFxymIULgRobjzbSuZT7VukGaapdYgUBM95unHRZy4JDSpCM2M4wzvKLB1iMkwSw wpCAjOWLlNfXteOuHjj0PWoxj0U0qJtjEcCdp7S0hCa4t5EpD3fIIzTB5hG1UgdAA0Yd05 k6Y7GGWyx0jbVlkeiy6Xrmioi8RVPfmUv/uM5G9zQYwUB6OwE+q2pT+FNOcNlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746486603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t21iWtIw6Zz0qpqLAc3Gw458viV0S2CQjpVxFPBEyTA=; b=w4BTFPrfoDMdzYQnLxyTznA0N4le9i95nie1YsUfrnL/PsLPye+WDiAWJ9bRn4zQFJ9U5c WDXKcldiO6RQZ4BDTtSO6rlkcVM4I7bQgW0j/fUz3qGXIh8C3vQA2tp65uxyIP38S6cWz4 uewBg6cSm/Fa67hv7v7tZJessBXa2RyrlH+dBBspAtX6rSyxNHQK8sO4BFiY6sdAG35gtY 626yDsgw3IFRC6dTrMwE4pmw+hqQ6ZNNWA4fa7nbacYY5W0nvxylGO+kVyt7yWp7kCdwbP zC45anRPkopJsPQi5kTNOGR0sVoQuOQNKlbzTFU5r7AldKpQ0aaPxUCk+zxknQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746486603; a=rsa-sha256; cv=none; b=IgGWd1++S1mv5PXJ1RVgh/zrsoY9im9hpNwqkqw0JM6CEGRpI7Lw8Iq0PnwtyUxZhsTJdp g/uVvOCbR1Uoex8XQgUzCN6zvEdD4LzEJQw35aZWiAiQcklrd6vTUyU9/sGx5o9MIJCXRM NPyafTOaBRVmbUH3d9Y5P+YLfPDuBzwo/v/khMmWI8HvvQ79vMxaEm7lJdbfuC8IOPD1gX l8ETPeQsgorZnB+rmxvcjNvL93cmwT6mPYxfmh+WxiyNxHEkVDVhDVix1VhTzUFwgbi592 bLZoOY6NoD/ezVY0fOuz6WQzZU/vOgJhPybZOax5qj1TsdpBow34ZHzB5wBZKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zry0q4TTdzZmC; Mon, 05 May 2025 23:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 545NA3CE045714; Mon, 5 May 2025 23:10:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 545NA3c0045701; Mon, 5 May 2025 23:10:03 GMT (envelope-from git) Date: Mon, 5 May 2025 23:10:03 GMT Message-Id: <202505052310.545NA3c0045701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: e4c7b2b6053f - main - nfsv4: Add support to NFSv4 for named attributes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: e4c7b2b6053f263acd7a2fb326cd98f7b7193872 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=e4c7b2b6053f263acd7a2fb326cd98f7b7193872 commit e4c7b2b6053f263acd7a2fb326cd98f7b7193872 Author: Rick Macklem AuthorDate: 2025-05-05 23:06:48 +0000 Commit: Rick Macklem CommitDate: 2025-05-05 23:06:48 +0000 nfsv4: Add support to NFSv4 for named attributes NFSv4 supports a feature called named attributes, that are essentially Solaris style extended attributes. Commits starting with 2ec2ba7e232d added Solaris style extended attribute support. This patch uses the Solaris style extended attribute support to provide support for NFSv4. Since nfsv4_loadattr() needed an additional argument, many file are affected, although many in a trivial way. For the NFSv4 server to support named attributes, ZFS must be patched and only ZFS file systems support these Solaris style extended attributes. --- sys/fs/nfs/nfs_commonsubs.c | 102 ++++-------- sys/fs/nfs/nfs_var.h | 7 +- sys/fs/nfs/nfsproto.h | 1 + sys/fs/nfsclient/nfs_clcomsubs.c | 3 +- sys/fs/nfsclient/nfs_clport.c | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 80 +++++++-- sys/fs/nfsclient/nfs_clvfsops.c | 16 +- sys/fs/nfsclient/nfs_clvnops.c | 338 ++++++++++++++++++++++++++++----------- sys/fs/nfsclient/nfsnode.h | 1 + sys/fs/nfsserver/nfs_nfsdport.c | 56 +++++-- sys/fs/nfsserver/nfs_nfsdserv.c | 95 +++++++++-- sys/fs/nfsserver/nfs_nfsdstate.c | 2 +- sys/fs/nfsserver/nfs_nfsdsubs.c | 13 +- 13 files changed, 501 insertions(+), 215 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 3e70eb50a54e..39fa6f091eee 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -223,7 +223,6 @@ static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); -static bool nfs_test_namedattr(struct nfsrv_descript *nd, struct vnode *vp); static void nfsv4_wanted(struct nfsv4lock *lp); static uint32_t nfsv4_filesavail(struct statfs *, struct mount *); static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name); @@ -1282,70 +1281,6 @@ nfsmout: return (error); } -/* - * Check to see if a named attribute exists for this file. - */ -static bool -nfs_test_namedattr(struct nfsrv_descript *nd, struct vnode *vp) -{ - struct uio io; - struct iovec iv; - struct componentname cn; - struct vnode *dvp; - struct dirent *dp; - int eofflag, error; - char *buf, *cp, *endcp; - bool ret; - - if (vp == NULL || (vp->v_mount->mnt_flag & MNT_NAMEDATTR) == 0) - return (false); - NFSNAMEICNDSET(&cn, nd->nd_cred, LOOKUP, OPENNAMED | ISLASTCN | - NOFOLLOW | LOCKLEAF); - cn.cn_lkflags = LK_SHARED; - cn.cn_nameptr = "."; - cn.cn_namelen = 1; - error = VOP_LOOKUP(vp, &dvp, &cn); - if (error != 0) - return (false); - - /* Now we have to read the directory, looking for a valid entry. */ - buf = malloc(DIRBLKSIZ, M_TEMP, M_WAITOK); - ret = false; - io.uio_offset = 0; - io.uio_segflg = UIO_SYSSPACE; - io.uio_rw = UIO_READ; - io.uio_td = NULL; - do { - iv.iov_base = buf; - iv.iov_len = DIRBLKSIZ; - io.uio_iov = &iv; - io.uio_iovcnt = 1; - io.uio_resid = DIRBLKSIZ; - error = VOP_READDIR(dvp, &io, nd->nd_cred, &eofflag, NULL, - NULL); - if (error != 0 || io.uio_resid == DIRBLKSIZ) - break; - cp = buf; - endcp = &buf[DIRBLKSIZ - io.uio_resid]; - while (cp < endcp) { - dp = (struct dirent *)cp; - if (dp->d_fileno != 0 && dp->d_type != DT_WHT && - ((dp->d_namlen == 1 && dp->d_name[0] != '.') || - (dp->d_namlen == 2 && (dp->d_name[0] != '.' || - dp->d_name[1] != '.')) || dp->d_namlen > 2)) { - ret = true; - break; - } - cp += dp->d_reclen; - } - if (ret) - break; - } while (eofflag == 0); - vput(dvp); - free(buf, M_TEMP); - return (ret); -} - /* * Get the attributes for V4. * If the compare flag is true, test for any attribute changes, @@ -1361,7 +1296,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nap, struct nfsfh **nfhpp, fhandle_t *fhp, int fhsize, struct nfsv3_pathconf *pc, struct statfs *sbp, struct nfsstatfs *sfp, struct nfsfsinfo *fsp, NFSACL_T *aclp, int compare, int *retcmpp, - u_int32_t *leasep, u_int32_t *rderrp, NFSPROC_T *p, struct ucred *cred) + u_int32_t *leasep, u_int32_t *rderrp, bool *has_namedattrp, + NFSPROC_T *p, struct ucred *cred) { u_int32_t *tl; int i = 0, j, k, l = 0, m, bitpos, attrsum = 0; @@ -1451,6 +1387,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, sfp->sf_tbytes = UINT64_MAX; sfp->sf_abytes = UINT64_MAX; } + if (has_namedattrp != NULL) + *has_namedattrp = false; } /* @@ -1581,13 +1519,25 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, break; case NFSATTRBIT_NAMEDATTR: NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); - if (compare && !(*retcmpp)) { - bool named_attr; - - named_attr = nfs_test_namedattr(nd, vp); - if ((named_attr && *tl != newnfs_true) || - (!named_attr && *tl != newnfs_false)) - *retcmpp = NFSERR_NOTSAME; + if (compare) { + if (!(*retcmpp)) { + long has_named_attr; + + if (vp == NULL || VOP_PATHCONF(vp, + _PC_HAS_NAMEDATTR, &has_named_attr) + != 0) + has_named_attr = 0; + if ((has_named_attr != 0 && + *tl != newnfs_true) || + (has_named_attr == 0 && + *tl != newnfs_false)) + *retcmpp = NFSERR_NOTSAME; + } + } else if (has_namedattrp != NULL) { + if (*tl == newnfs_true) + *has_namedattrp = true; + else + *has_namedattrp = false; } attrsum += NFSX_UNSIGNED; break; @@ -2684,6 +2634,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, size_t atsiz; bool xattrsupp; short irflag; + long has_named_attr; #ifdef QUOTA struct dqblk dqb; uid_t savuid; @@ -2840,7 +2791,10 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, break; case NFSATTRBIT_NAMEDATTR: NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); - if (nfs_test_namedattr(nd, vp)) + if (VOP_PATHCONF(vp, _PC_HAS_NAMEDATTR, &has_named_attr) + != 0) + has_named_attr = 0; + if (has_named_attr != 0) *tl = newnfs_true; else *tl = newnfs_false; diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index a95d9245c098..b41e46d758ed 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -340,7 +340,7 @@ int nfsv4_loadattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, struct nfsfh **, fhandle_t *, int, struct nfsv3_pathconf *, struct statfs *, struct nfsstatfs *, struct nfsfsinfo *, NFSACL_T *, - int, int *, u_int32_t *, u_int32_t *, NFSPROC_T *, struct ucred *); + int, int *, u_int32_t *, u_int32_t *, bool *, NFSPROC_T *, struct ucred *); int nfsv4_lock(struct nfsv4lock *, int, int *, struct mtx *, struct mount *); void nfsv4_unlock(struct nfsv4lock *, int); void nfsv4_relref(struct nfsv4lock *); @@ -515,7 +515,7 @@ int nfsrpc_statfs(vnode_t, struct nfsstatfs *, struct nfsfsinfo *, uint32_t *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *); int nfsrpc_fsinfo(vnode_t, struct nfsfsinfo *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *); -int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *, +int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *, bool *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *); int nfsrpc_renew(struct nfsclclient *, struct nfsclds *, struct ucred *, NFSPROC_T *); @@ -568,6 +568,9 @@ int nfsrpc_listextattr(vnode_t, uint64_t *, struct uio *, size_t *, bool *, int nfsrpc_rmextattr(vnode_t, const char *, struct nfsvattr *, int *, struct ucred *, NFSPROC_T *); void nfsrpc_bindconnsess(CLIENT *, void *, struct ucred *); +int nfsrpc_openattr(struct nfsmount *, struct vnode *, uint8_t *, int, + bool, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsfh **, + int *); /* nfs_clstate.c */ int nfscl_open(vnode_t, u_int8_t *, int, u_int32_t, int, diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index d0660cafdedb..eff53e1a384e 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -1414,6 +1414,7 @@ struct nfsv3_sattr { * NFSGETATTRBIT_PATHCONF0 - bits 0<->31 */ #define NFSGETATTRBIT_PATHCONF0 (NFSATTRBIT_GETATTR0 | \ + NFSATTRBM_NAMEDATTR | \ NFSATTRBM_CASEINSENSITIVE | \ NFSATTRBM_CASEPRESERVING | \ NFSATTRBM_CHOWNRESTRICTED | \ diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index 270f39d03c90..bca0bdcd0df1 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -271,7 +271,8 @@ nfsm_loadattr(struct nfsrv_descript *nd, struct nfsvattr *nap) if (nd->nd_flag & ND_NFSV4) { error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, - NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, + NULL); } else if (nd->nd_flag & ND_NFSV3) { NFSM_DISSECT(fp, struct nfs_fattr *, NFSX_V3FATTR); nap->na_type = nfsv34tov_type(fp->fa_type); diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 4e3a699fb170..ce7221c133cf 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -828,7 +828,7 @@ nfscl_wcc_data(struct nfsrv_descript *nd, struct vnode *vp, == (ND_NFSV4 | ND_V4WCCATTR)) { error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, NULL, NULL); if (error) return (error); /* diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 07f046a82d8b..0fb08df74a54 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -392,7 +392,8 @@ nfsrpc_open(vnode_t vp, int amode, struct ucred *cred, NFSPROC_T *p) mode |= NFSV4OPEN_ACCESSWRITE; if (NFSHASNFSV4N(nmp)) { if (!NFSHASPNFS(nmp) && nfscl_enablecallb != 0 && - nfs_numnfscbd > 0) { + nfs_numnfscbd > 0 && + (vn_irflag_read(vp) & VIRF_NAMEDATTR) == 0) { if ((mode & NFSV4OPEN_ACCESSWRITE) != 0) mode |= NFSV4OPEN_WANTWRITEDELEG; else @@ -695,7 +696,7 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen, ("nfsrpc_openrpc: Getattr repstat")); error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, p, cred); if (error) goto nfsmout; } @@ -1354,7 +1355,7 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred, if ((nd->nd_flag & ND_NFSV4) != 0) error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, leasep, NULL, - NULL, NULL); + NULL, NULL, NULL); else error = nfsm_loadattr(nd, nap); } else @@ -3478,7 +3479,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, p, cred); if (error) { dotdotfileid = dotfileid; } else if (gotmnton) { @@ -3728,7 +3729,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, &rderr, p, cred); + NULL, NULL, &rderr, NULL, p, cred); if (error) goto nfsmout; NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); @@ -3878,13 +3879,16 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, size_t tresid; u_int32_t *tl2 = NULL, rderr; struct timespec dctime, ts; - bool attr_ok, validentry; + bool attr_ok, named_dir, validentry; KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); KASSERT(uiop->uio_segflg == UIO_SYSSPACE, ("nfsrpc_readdirplus: uio userspace")); + named_dir = false; + if ((vp->v_irflag & VIRF_NAMEDDIR) != 0) + named_dir = true; ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(&dctime); *attrflagp = 0; @@ -3950,7 +3954,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, p, cred); if (error) { dotdotfileid = dotfileid; } else if (gotmnton) { @@ -4217,7 +4221,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = 0xffffffff; error = nfsv4_loadattr(nd, NULL, &nfsva, &nfhp, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, &rderr, p, cred); + NULL, NULL, &rderr, NULL, p, cred); if (error) goto nfsmout; } @@ -4322,7 +4326,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, if (cnp->cn_namelen <= NCHNAMLEN && ndp->ni_dvp != ndp->ni_vp && (newvp->v_type != VDIR || - dctime.tv_sec != 0)) { + dctime.tv_sec != 0) && + !named_dir) { cache_enter_time_flags(ndp->ni_dvp, ndp->ni_vp, cnp, &nfsva.na_ctime, @@ -4879,7 +4884,7 @@ nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp, if (nd->nd_repstat == 0) { error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL, sbp, fsp, NULL, 0, NULL, leasep, NULL, - p, cred); + NULL, p, cred); if (!error) { nmp->nm_fsid[0] = nap->na_filesid[0]; nmp->nm_fsid[1] = nap->na_filesid[1]; @@ -4932,7 +4937,7 @@ nfsmout: * nfs pathconf rpc */ int -nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, +nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, bool *has_namedattrp, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp) { struct nfsrv_descript nfsd, *nd = &nfsd; @@ -4942,6 +4947,7 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, int error; struct nfsnode *np; + *has_namedattrp = false; *attrflagp = 0; nmp = VFSTONFS(vp->v_mount); if (NFSHASNFSV4(nmp)) { @@ -4968,8 +4974,8 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, return (error); if (nd->nd_repstat == 0) { error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, - pc, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, p, - cred); + pc, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, + has_namedattrp, p, cred); if (!error) *attrflagp = 1; } else { @@ -5264,7 +5270,7 @@ nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p, struct acl *aclp) return (error); if (!nd->nd_repstat) error = nfsv4_loadattr(nd, vp, NULL, NULL, NULL, 0, NULL, - NULL, NULL, NULL, aclp, 0, NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, aclp, 0, NULL, NULL, NULL, NULL, p, cred); else error = nd->nd_repstat; m_freem(nd->nd_mrep); @@ -8364,7 +8370,7 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, if (*++tl == 0) { error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, p, cred); if (error != 0) goto nfsmout; if (ndp != NULL) { @@ -9529,6 +9535,50 @@ nfsmout: m_freem(nd->nd_mrep); } +/* + * nfs opeattr rpc + */ +int +nfsrpc_openattr(struct nfsmount *nmp, struct vnode *vp, uint8_t *fhp, int fhlen, + bool createit, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, + struct nfsfh **nfhpp, int *attrflagp) +{ + uint32_t *tl; + struct nfsrv_descript nfsd, *nd = &nfsd; + nfsattrbit_t attrbits; + int error = 0; + + *attrflagp = 0; + nfscl_reqstart(nd, NFSPROC_OPENATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0, + cred); + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + if (createit) + *tl = newnfs_true; + else + *tl = newnfs_false; + NFSGETATTR_ATTRBIT(&attrbits); + NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); + *tl++ = txdr_unsigned(NFSV4OP_GETFH); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + (void)nfsrv_putattrbit(nd, &attrbits); + error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, vp, p, cred, + NFS_PROG, NFS_VER4, NULL, 1, NULL, NULL); + if (error != 0) + return (error); + if (nd->nd_repstat == 0) { + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + error = nfsm_getfh(nd, nfhpp); + if (error != 0) + goto nfsmout; + error = nfscl_postop_attr(nd, nap, attrflagp); + } +nfsmout: + m_freem(nd->nd_mrep); + if (error == 0 && nd->nd_repstat != 0) + error = nd->nd_repstat; + return (error); +} + /* * Do roughly what nfs_statfs() does for NFSv4, but when called with a shared * locked vnode. diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 6bc67b342cbe..0bd05c03885b 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -1801,12 +1801,18 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, if (argp->flags & NFSMNT_NFSV3) ncl_fsinfo(nmp, *vpp, cred, td); - /* Mark if the mount point supports NFSv4 ACLs. */ - if ((argp->flags & NFSMNT_NFSV4) != 0 && nfsrv_useacl != 0 && - ret == 0 && - NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL)) { + /* + * Mark if the mount point supports NFSv4 ACLs and + * named attributes. + */ + if ((argp->flags & NFSMNT_NFSV4) != 0) { MNT_ILOCK(mp); - mp->mnt_flag |= MNT_NFS4ACLS; + if (ret == 0 && nfsrv_useacl != 0 && + NFSISSET_ATTRBIT(&nfsva.na_suppattr, + NFSATTRBIT_ACL)) + mp->mnt_flag |= MNT_NFS4ACLS; + if (nmp->nm_minorvers > 0) + mp->mnt_flag |= MNT_NAMEDATTR; MNT_IUNLOCK(mp); } diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index a0bb781e5e5d..20603d376901 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -113,6 +113,8 @@ static vop_write_t nfsfifo_write; static vop_close_t nfsfifo_close; static int nfs_setattrrpc(struct vnode *, struct vattr *, struct ucred *, struct thread *); +static int nfs_get_namedattrdir(struct vnode *, struct componentname *, + struct vnode **); static vop_lookup_t nfs_lookup; static vop_create_t nfs_create; static vop_mknod_t nfs_mknod; @@ -1193,6 +1195,40 @@ nfs_setattrrpc(struct vnode *vp, struct vattr *vap, struct ucred *cred, return (error); } +/* + * Get a named attribute directory for the vnode. + */ +static int +nfs_get_namedattrdir(struct vnode *vp, struct componentname *cnp, + struct vnode **vpp) +{ + struct nfsfh *nfhp; + struct nfsnode *np; + struct vnode *newvp; + struct nfsvattr nfsva; + int attrflag, error; + + attrflag = 0; + *vpp = NULL; + np = VTONFS(vp); + error = nfsrpc_openattr(VFSTONFS(vp->v_mount), vp, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, (cnp->cn_flags & CREATENAMED), + cnp->cn_cred, curthread, &nfsva, &nfhp, &attrflag); + if (error == NFSERR_NOTSUPP) + error = ENOATTR; + if (error == 0) + error = nfscl_nget(vp->v_mount, vp, nfhp, cnp, curthread, &np, + cnp->cn_lkflags); + if (error != 0) + return (error); + newvp = NFSTOV(np); + vn_irflag_set_cond(newvp, VIRF_NAMEDDIR); + if (attrflag != 0) + (void)nfscl_loadattrcache(&newvp, &nfsva, NULL, 0, 1); + *vpp = newvp; + return (0); +} + /* * nfs lookup call, one step at a time... * First look in cache @@ -1205,7 +1241,7 @@ nfs_lookup(struct vop_lookup_args *ap) struct vnode *dvp = ap->a_dvp; struct vnode **vpp = ap->a_vpp; struct mount *mp = dvp->v_mount; - int flags = cnp->cn_flags; + uint64_t flags = cnp->cn_flags; struct vnode *newvp; struct nfsmount *nmp; struct nfsnode *np, *newnp; @@ -1216,15 +1252,57 @@ nfs_lookup(struct vop_lookup_args *ap) struct vattr vattr; struct timespec nctime, ts; uint32_t openmode; + bool is_nameddir, needs_nameddir, opennamed; + dattrflag = 0; *vpp = NULLVP; + nmp = VFSTONFS(mp); + opennamed = (flags & (OPENNAMED | ISLASTCN)) == (OPENNAMED | ISLASTCN); + if (opennamed && (!NFSHASNFSV4(nmp) || !NFSHASNFSV4N(nmp))) + return (ENOATTR); + is_nameddir = (vn_irflag_read(dvp) & VIRF_NAMEDDIR) != 0; + if ((is_nameddir && (flags & ISLASTCN) == 0 && (cnp->cn_namelen > 1 || + *cnp->cn_nameptr != '.')) || + (opennamed && !is_nameddir && (flags & ISDOTDOT) != 0)) + return (ENOATTR); if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); + np = VTONFS(dvp); + + needs_nameddir = false; + if (opennamed || is_nameddir) { + cnp->cn_flags &= ~MAKEENTRY; + if (!is_nameddir) + needs_nameddir = true; + } + + /* + * If the named attribute directory is needed, acquire it now. + */ + newvp = NULLVP; + if (needs_nameddir) { + KASSERT(np->n_v4 == NULL, ("nfs_lookup: O_NAMEDATTR when" + " n_v4 not NULL")); + error = nfs_get_namedattrdir(dvp, cnp, &newvp); + if (error != 0) + goto handle_error; + if (cnp->cn_namelen == 1 && *cnp->cn_nameptr == '.') { + *vpp = newvp; + return (0); + } + dvp = newvp; + np = VTONFS(dvp); + newvp = NULLVP; + } else if (opennamed && cnp->cn_namelen == 1 && + *cnp->cn_nameptr == '.') { + VREF(dvp); + *vpp = dvp; + return (0); + } + if (dvp->v_type != VDIR) return (ENOTDIR); - nmp = VFSTONFS(mp); - np = VTONFS(dvp); /* For NFSv4, wait until any remove is done. */ NFSLOCKNODE(np); @@ -1237,77 +1315,83 @@ nfs_lookup(struct vop_lookup_args *ap) error = vn_dir_check_exec(dvp, cnp); if (error != 0) return (error); - error = cache_lookup(dvp, vpp, cnp, &nctime, &ncticks); - if (error > 0 && error != ENOENT) - return (error); - if (error == -1) { - /* - * Lookups of "." are special and always return the - * current directory. cache_lookup() already handles - * associated locking bookkeeping, etc. - */ - if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { - return (0); - } - /* - * We only accept a positive hit in the cache if the - * change time of the file matches our cached copy. - * Otherwise, we discard the cache entry and fallback - * to doing a lookup RPC. We also only trust cache - * entries for less than nm_nametimeo seconds. - * - * To better handle stale file handles and attributes, - * clear the attribute cache of this node if it is a - * leaf component, part of an open() call, and not - * locally modified before fetching the attributes. - * This should allow stale file handles to be detected - * here where we can fall back to a LOOKUP RPC to - * recover rather than having nfs_open() detect the - * stale file handle and failing open(2) with ESTALE. - */ - newvp = *vpp; - newnp = VTONFS(newvp); - if (!(nmp->nm_flag & NFSMNT_NOCTO) && - (flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && - !(newnp->n_flag & NMODIFIED)) { - NFSLOCKNODE(newnp); - newnp->n_attrstamp = 0; - KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp); - NFSUNLOCKNODE(newnp); - } - if (nfscl_nodeleg(newvp, 0) == 0 || - ((u_int)(ticks - ncticks) < (nmp->nm_nametimeo * hz) && - VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 && - timespeccmp(&vattr.va_ctime, &nctime, ==))) { - NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); - return (0); - } - cache_purge(newvp); - if (dvp != newvp) - vput(newvp); - else - vrele(newvp); - *vpp = NULLVP; - } else if (error == ENOENT) { - if (VN_IS_DOOMED(dvp)) - return (ENOENT); - /* - * We only accept a negative hit in the cache if the - * modification time of the parent directory matches - * the cached copy in the name cache entry. - * Otherwise, we discard all of the negative cache - * entries for this directory. We also only trust - * negative cache entries for up to nm_negnametimeo - * seconds. - */ - if ((u_int)(ticks - ncticks) < (nmp->nm_negnametimeo * hz) && - VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && - timespeccmp(&vattr.va_mtime, &nctime, ==)) { - NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); - return (ENOENT); + if (!opennamed && !is_nameddir) { + error = cache_lookup(dvp, vpp, cnp, &nctime, &ncticks); + if (error > 0 && error != ENOENT) + return (error); + if (error == -1) { + /* + * Lookups of "." are special and always return the + * current directory. cache_lookup() already handles + * associated locking bookkeeping, etc. + */ + if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { + return (0); + } + + /* + * We only accept a positive hit in the cache if the + * change time of the file matches our cached copy. + * Otherwise, we discard the cache entry and fallback + * to doing a lookup RPC. We also only trust cache + * entries for less than nm_nametimeo seconds. + * + * To better handle stale file handles and attributes, + * clear the attribute cache of this node if it is a + * leaf component, part of an open() call, and not + * locally modified before fetching the attributes. + * This should allow stale file handles to be detected + * here where we can fall back to a LOOKUP RPC to + * recover rather than having nfs_open() detect the + * stale file handle and failing open(2) with ESTALE. + */ + newvp = *vpp; + newnp = VTONFS(newvp); + if (!(nmp->nm_flag & NFSMNT_NOCTO) && + (flags & (ISLASTCN | ISOPEN)) == + (ISLASTCN | ISOPEN) && + !(newnp->n_flag & NMODIFIED)) { + NFSLOCKNODE(newnp); + newnp->n_attrstamp = 0; + KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp); + NFSUNLOCKNODE(newnp); + } + if (nfscl_nodeleg(newvp, 0) == 0 || + ((u_int)(ticks - ncticks) < + (nmp->nm_nametimeo * hz) && + VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 && + timespeccmp(&vattr.va_ctime, &nctime, ==))) { + NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); + return (0); + } + cache_purge(newvp); + if (dvp != newvp) + vput(newvp); + else + vrele(newvp); + *vpp = NULLVP; + } else if (error == ENOENT) { + if (VN_IS_DOOMED(dvp)) + return (ENOENT); + /* + * We only accept a negative hit in the cache if the + * modification time of the parent directory matches + * the cached copy in the name cache entry. + * Otherwise, we discard all of the negative cache + * entries for this directory. We also only trust + * negative cache entries for up to nm_negnametimeo + * seconds. + */ + if ((u_int)(ticks - ncticks) < + (nmp->nm_negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && + timespeccmp(&vattr.va_mtime, &nctime, ==)) { + NFSINCRGLOBAL(nfsstatsv1.lookupcache_hits); + return (ENOENT); + } + cache_purge_negative(dvp); } - cache_purge_negative(dvp); } openmode = 0; @@ -1328,7 +1412,7 @@ nfs_lookup(struct vop_lookup_args *ap) if (NFSHASNFSV4N(nmp) && NFSHASONEOPENOWN(nmp) && !NFSHASPNFS(nmp) && (nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0 && (!NFSMNT_RDONLY(mp) || (flags & OPENWRITE) == 0) && - (flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN)) { + (flags & (ISLASTCN | ISOPEN | OPENNAMED))) == (ISLASTCN | ISOPEN)) { if ((flags & OPENREAD) != 0) openmode |= NFSV4OPEN_ACCESSREAD; if ((flags & OPENWRITE) != 0) @@ -1337,7 +1421,6 @@ nfs_lookup(struct vop_lookup_args *ap) NFSUNLOCKMNT(nmp); #endif - newvp = NULLVP; NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); nanouptime(&ts); error = nfsrpc_lookup(dvp, cnp->cn_nameptr, cnp->cn_namelen, @@ -1345,6 +1428,11 @@ nfs_lookup(struct vop_lookup_args *ap) openmode); if (dattrflag) (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, 0, 1); + if (needs_nameddir) { + vput(dvp); + dvp = ap->a_dvp; + } +handle_error: if (error) { if (newvp != NULLVP) { vput(newvp); @@ -1353,13 +1441,14 @@ nfs_lookup(struct vop_lookup_args *ap) if (error != ENOENT) { if (NFS_ISV4(dvp)) - error = nfscl_maperr(td, error, (uid_t)0, - (gid_t)0); + error = nfscl_maperr(td, error, + (uid_t)0, (gid_t)0); return (error); } /* The requested file was not found. */ - if ((cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME) && + if ((cnp->cn_nameiop == CREATE || + cnp->cn_nameiop == RENAME) && (flags & ISLASTCN)) { /* * XXX: UFS does a full VOP_ACCESS(dvp, @@ -1400,7 +1489,8 @@ nfs_lookup(struct vop_lookup_args *ap) free(nfhp, M_NFSFH); return (EISDIR); } - error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, LK_EXCLUSIVE); + error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, + LK_EXCLUSIVE); if (error) return (error); newvp = NFSTOV(np); @@ -1421,7 +1511,8 @@ nfs_lookup(struct vop_lookup_args *ap) } NFSUNLOCKNODE(np); if (attrflag) - (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, 0, 1); + (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, + 0, 1); *vpp = newvp; return (0); } @@ -1462,19 +1553,23 @@ nfs_lookup(struct vop_lookup_args *ap) if (error != 0) return (error); if (attrflag) - (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, 0, 1); + (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, + 0, 1); } else if (NFS_CMPFH(np, nfhp->nfh_fh, nfhp->nfh_len)) { free(nfhp, M_NFSFH); VREF(dvp); newvp = dvp; if (attrflag) - (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, 0, 1); + (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, + 0, 1); } else { error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, cnp->cn_lkflags); if (error) return (error); newvp = NFSTOV(np); + if (opennamed) + vn_irflag_set_cond(newvp, VIRF_NAMEDATTR); /* * If n_localmodtime >= time before RPC, then * a file modification operation, such as @@ -1492,8 +1587,10 @@ nfs_lookup(struct vop_lookup_args *ap) } NFSUNLOCKNODE(np); if (attrflag) - (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, 0, 1); - else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + (void)nfscl_loadattrcache(&newvp, &nfsva, NULL, + 0, 1); + else if ((flags & (ISLASTCN | ISOPEN)) == + (ISLASTCN | ISOPEN) && !(np->n_flag & NMODIFIED)) { /* * Flush the attribute cache when opening a @@ -1754,6 +1851,7 @@ nfs_create(struct vop_create_args *ap) nfsquad_t cverf; int error = 0, attrflag, dattrflag, fmode = 0; struct vattr vattr; + bool is_nameddir, needs_nameddir, opennamed; /* * Oops, not for me.. @@ -1767,6 +1865,32 @@ nfs_create(struct vop_create_args *ap) fmode |= O_EXCL; dnp = VTONFS(dvp); nmp = VFSTONFS(dvp->v_mount); + needs_nameddir = false; + if (NFSHASNFSV4(nmp) && NFSHASNFSV4N(nmp)) { + opennamed = (cnp->cn_flags & (OPENNAMED | ISLASTCN)) == + (OPENNAMED | ISLASTCN); + is_nameddir = (vn_irflag_read(dvp) & VIRF_NAMEDDIR) != 0; + if (opennamed || is_nameddir) { + cnp->cn_flags &= ~MAKEENTRY; + if (!is_nameddir) + needs_nameddir = true; + } + } + + /* + * If the named attribute directory is needed, acquire it now. + */ + if (needs_nameddir) { + KASSERT(dnp->n_v4 == NULL, ("nfs_create: O_NAMEDATTR when" + " n_v4 not NULL")); + error = nfs_get_namedattrdir(dvp, cnp, &newvp); + if (error != 0) + return (error); + dvp = newvp; + dnp = VTONFS(dvp); + newvp = NULL; + } + again: /* For NFSv4, wait until any remove is done. */ NFSLOCKNODE(dnp); @@ -1849,6 +1973,8 @@ again: KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(dvp); } NFSUNLOCKNODE(dnp); + if (needs_nameddir) + vput(dvp); return (error); } @@ -4375,25 +4501,48 @@ nfs_pathconf(struct vop_pathconf_args *ap) struct nfsmount *nmp; struct thread *td = curthread; off_t off; - bool eof; + bool eof, has_namedattr, named_enabled; int attrflag, error; + struct nfsnode *np; + nmp = VFSTONFS(vp->v_mount); + np = VTONFS(vp); + named_enabled = false; + has_namedattr = false; if ((NFS_ISV34(vp) && (ap->a_name == _PC_LINK_MAX || ap->a_name == _PC_NAME_MAX || ap->a_name == _PC_CHOWN_RESTRICTED || ap->a_name == _PC_NO_TRUNC)) || - (NFS_ISV4(vp) && ap->a_name == _PC_ACL_NFS4)) { + (NFS_ISV4(vp) && (ap->a_name == _PC_ACL_NFS4 || + ap->a_name == _PC_HAS_NAMEDATTR))) { /* * Since only the above 4 a_names are returned by the NFSv3 * Pathconf RPC, there is no point in doing it for others. * For NFSv4, the Pathconf RPC (actually a Getattr Op.) can - * be used for _PC_NFS4_ACL as well. + * be used for _PC_ACL_NFS4 and _PC_HAS_NAMEDATTR as well. */ - error = nfsrpc_pathconf(vp, &pc, td->td_ucred, td, &nfsva, - &attrflag); + error = nfsrpc_pathconf(vp, &pc, &has_namedattr, td->td_ucred, + td, &nfsva, &attrflag); if (attrflag != 0) (void) nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1); if (error != 0) return (error); + } else if (NFS_ISV4(vp) && ap->a_name == _PC_NAMEDATTR_ENABLED && + (np->n_flag & NNAMEDNOTSUPP) == 0) { + struct nfsfh *nfhp; + + error = nfsrpc_openattr(nmp, vp, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, false, td->td_ucred, td, &nfsva, &nfhp, + &attrflag); + named_enabled = true; + if (error == 0) { + free(nfhp, M_NFSFH); + } else if (error == NFSERR_NOTSUPP) { + named_enabled = false; + NFSLOCKNODE(np); + np->n_flag |= NNAMEDNOTSUPP; + NFSUNLOCKNODE(np); + } + error = 0; } else { /* * For NFSv2 (or NFSv3 when not one of the above 4 a_names), @@ -4476,7 +4625,6 @@ nfs_pathconf(struct vop_pathconf_args *ap) case _PC_MIN_HOLE_SIZE: /* Only some NFSv4.2 servers support Seek for Holes. */ *** 443 LINES SKIPPED *** From nobody Tue May 6 05:00: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 4Zs5mx52Slz5vSGp; Tue, 06 May 2025 05:00:17 +0000 (UTC) (envelope-from philip@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zs5mx4Sc4z494x; Tue, 06 May 2025 05:00:17 +0000 (UTC) (envelope-from philip@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746507617; 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=5mj9UINz1vMhh4hrdPumotaY/f6e4cgiKqNShP5sjCo=; b=IWhpBOjAbyNZ1fCkBJXQO8WAz2XJWOhCieyYLNB3NkOB9s0m0rllLi3oa1/Ql1q5n2GprA HcWHPOOF3VvyFWXIxwNruNXQUMWy3sna5D9o7NvHIn8nWxyhq0Jr2Gd/jo76u6w0gOfu6s Em/WgA+nSUOwdsl8NVxZwhej3QxrIMWzJtOnp6QYD8d2ikRojhgwxe9dl6R0PEDo3Y+wml GK75yOp+7zQ52B1Tx3VWys9NCfVTF6m7R6ZxVv0Z3ZDMrCVr+GiY9n+uUb5l+s2Y9tp5Z/ iMDOdTNWfZmnMUIe566rhaqVu0b+WUPh+FbUYvqykN0MRq+aX7WF9H97YqlNMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746507617; 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=5mj9UINz1vMhh4hrdPumotaY/f6e4cgiKqNShP5sjCo=; b=lKUHXPY3+MpXlr9CC8N3yJrUiu7nk1fX07ZByWZ0TCPxd6qiN1bjwrtmwhDezsl9Cym9bu z+Atxoqop6EbrUjqIrQLARRCs/GiaM62ABgvX/gEPAFCnKiT83RRpT2LBzikrWM9F6MPXw d6gk1ptq1E119r8rT8+GlgQ+ICAOagBknjMMufGCshtZhDDMlp6hLSDl98mk59xqwJda5T 9xkfdgmklTgaa20YZUwrLNUTNO+lRfP2bMcajhCktssbrBKBUTMZ4IrAQldlinQcmMSn3f +RmXxdjDXBaxqRNTuRPU3KYOuv1wylRSXHgb6PfhwU+GZMBLmGoxUG/ykWDocg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746507617; a=rsa-sha256; cv=none; b=HcK7g1oEGNVCOSxZuq4KXF872Eh0YwISG+HTKrcSv7bLL38gKdUIEjrWx+2DxjeMC5V5rm BEjbVScGzZlrDgeAkR8PIBW32JXBNzh60Ccq6+JXJbbG/lQl7ixEO6a/SgQCo1IJOvsdN3 60X6eGy+SdFHjtw36c16jiUAmHujYCRouF4GpBLh1aHKmRHDjMROWtGDNoIwsdEa39skJO IZbkLNS+fnML9OYEQQDAkCRItgJdKjyyZLJH6RsEEGVICQeUZ1iQrGKclrlgCGWDONmXdp oZjg4cw7TmewTIPZMJEbhOthCY0XwzYItaVSwOE2Qp5wJ4O+SFs/kcsPSBb2Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com [103.168.172.201]) (using TLSv1.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: philip/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Zs5mx3V2fzN26; Tue, 06 May 2025 05:00:17 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfauth.phl.internal (Postfix) with ESMTP id 53CEA1200043; Tue, 6 May 2025 01:00:17 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 06 May 2025 01:00:17 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvkeeftdekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefufffokfgjfhggtgfgsehtqhhmtder tddtnecuhfhrohhmpefrhhhilhhiphcurfgrvghpshcuoehphhhilhhiphesfhhrvggvsg hsugdrohhrgheqnecuggftrfgrthhtvghrnhepjedukeffgfffkeejfffgfefgledthefh ffeggeevgeevhedvheegtdduvdetkeeinecuffhomhgrihhnpehfrhgvvggsshgurdhorh hgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhh ihhlihhpodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiiedviedvge ekqddvfeehudektddtkedqphhhihhlihhppeepfhhrvggvsghsugdrohhrghesthhrohhu sghlvgdrihhspdhnsggprhgtphhtthhopeeipdhmohguvgepshhmthhpohhuthdprhgtph htthhopehjhhgssehfrhgvvggsshgurdhorhhgpdhrtghpthhtohepvghmrghsthgvsehf rhgvvggsshgurdhorhhgpdhrtghpthhtohepughimhesfhhrvggvsghsugdrohhrghdprh gtphhtthhopehsrhgtqdgtohhmmhhithhtvghrshesfhhrvggvsghsugdrohhrghdprhgt phhtthhopeguvghvqdgtohhmmhhithhsqdhsrhgtqdgrlhhlsehfrhgvvggsshgurdhorh hgpdhrtghpthhtohepuggvvhdqtghomhhmihhtshdqshhrtgdqmhgrihhnsehfrhgvvggs shgurdhorhhg X-ME-Proxy: Feedback-ID: ia691475d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 May 2025 01:00:14 -0400 (EDT) From: Philip Paeps To: John Baldwin Cc: Ed Maste , Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 91506dba7f2e - main - zoneinfo: also install tzdata.zi and version Date: Tue, 06 May 2025 13:00:12 +0800 X-Mailer: MailMate (2.0r6251) Message-ID: In-Reply-To: <9c7b78c8-f4f5-4965-a4ec-a28e7d400df6@FreeBSD.org> References: <202504010810.5318A96d073963@gitrepo.freebsd.org> <0720709B-2068-46D3-88EA-398D7C1E8FC9@freebsd.org> <9c7b78c8-f4f5-4965-a4ec-a28e7d400df6@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; format=flowed Content-Transfer-Encoding: quoted-printable On 2025-05-02 21:52:04 (+0800), John Baldwin wrote: > On 4/30/25 20:48, Philip Paeps wrote: >> On 2025-05-01 00:58:04 (+0800), Ed Maste wrote: >>> On Wed, 30 Apr 2025 at 00:58, Philip Paeps = >>> wrote: >>>> On 2025-04-30 02:44:46 (+0800), Ed Maste wrote: >>>>> On Tue, 1 Apr 2025 at 04:10, Philip Paeps >>>>> wrote: >>>>>> The branch main has been updated by philip: >>>>>> >>>>>> URL: >>>>>> https://cgit.FreeBSD.org/src/commit/?id=3D91506dba7f2eb147eeb55ec3= 0640bc11755a1e8e >>>>>> >>>>>> commit 91506dba7f2eb147eeb55ec30640bc11755a1e8e >>>>>> Author: Philip Paeps >>>>>> AuthorDate: 2025-04-01 08:09:37 +0000 >>>>>> Commit: Philip Paeps >>>>>> CommitDate: 2025-04-01 08:09:37 +0000 >>>>>> >>>>>> zoneinfo: also install tzdata.zi and version >>>>>> >>>>>> Build and install the shrunk version of the time zone = >>>>>> database >>>>>> required >>>>>> by libc++ 19 std::chrono::current_zone (etc). While here, = >>>>>> also >>>>>> install >>>>>> the tzdata 'version' file to align more closely with other >>>>>> vendors. >>>>>> >>>>>> PR: 282377 >>>>>> Reviewed by: dim, emaste, imp >>>>>> Differential Revision: https://reviews.freebsd.org/D49577 >>>>> >>>>> Do you plan to MFC this to stable/14 for 14.3 as well? >>>> >>>> I was not planning to MFC this change. >>>> >>>> Does libc++ in stable/14 need this support? >>> >>> I suspect so - std::chrono::tzdb is C++20 and we presumably want it = >>> to >>> exist/work in stable/14. Dimitry? >> >> Thanks. I thought that was a 15+ thing. >> >> If it's expected by the toolchain in stable/14, I'll merge it there = >> too. > > LLVM 19 is in stable/13 as well. Thanks. I've merged this to stable/13 too. Note that I don't think we're doing any more releases on stable/13 and I = don't think this warrants an erratum, so this is a little bit academic. = :) Philip From nobody Tue May 6 07:50: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 4Zs9Xp6yT4z5vfh7; Tue, 06 May 2025 07:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zs9Xp2Km6z3WRX; Tue, 06 May 2025 07:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746517802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAjQz1LDaHtz2DZW3G4BhjW/oG9JpaZ3SanXXF8FuQU=; b=J7zeG7Lzd/Xxfbi/iz2wfqrQFVnK0VP6LNfXr7cwMUBkLilZdAkp+0qL25P5JPh/qtK2Is 1stw2N9R9N1wyXvnkFqax3TIE63XL+hrk4p2nQbXZ0rW7aMKAXDpymSOxqNRQTtJzxXDbz BS6nx69jhdAd0EJYq7X0gm99rxFIYePImdF1ztOYPYyee+VGE8P9qnONazLVUPLkkMrHE4 lbbYFj5N/+d2bmG3H7GFA/J2ZzU9/8dWz63NrjiKLrBr4xRfjTefkNOXvv0AgPwQmMgz/a 2i1sPPj3pwikiHiBb9kNDiA2ZXfkrSm4s22fnT5ADI2k6+RHEDuBWYwYAon2ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746517802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAjQz1LDaHtz2DZW3G4BhjW/oG9JpaZ3SanXXF8FuQU=; b=PtMu0G2HQjviw8zeQFpRrkwXYtoWOrW94rF2PE2z2nupB5VSZqip8ofv+SkFZL0weeYgpQ DkQwBDljT2B4MwW0HNUBEVYMbbOmd4jvYXsenQrNIZc1AfNXJpVbXtbMXGi7OKhuWEDJM9 iQueVw1lqu+nXoMGZkZRvIbaTuC4i9ejYdYCUUAg8x8vWvOT6y3JTN5mJPQZiPHhVTJFVd SXNOzkkaFPj44ygop1Y/gTO0sCTrzxGiSySJoeXt0UPZHOUgBBoJOyVwg2o/KSIQLgkwJC ware685g5Jt+FdjLuek/bJU9RoReJoPjFUsb5rYtGiRG5K3LAWg2cqU0Tqb5bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746517802; a=rsa-sha256; cv=none; b=xsIQ13logVA7JeO0JUr2ycvmY42FRJfDWduqzJ3lRo1s7/pXz5ikT+K4MNdpc9iSntDXlZ ohC1GZcTDzDSXHnUBSsDXQ6B0c1TL+H93HO7aae20vxShp/mkpVkEoCptg1C0G0sxWgJZZ YeyjnzcsViABnFntwv6+0Rlx8VJKJPXKGhCgbvw7cmtKvljluJ3kynjcKYk3tRJ4tJXzWP 2mMv2emx6qzPJk26VCGbT+hKegXT/2pJ4XbtcAVKJqGCX8/fWm2xSk0yp1C/f2Ww6MP5eL 5E8HboyLk+NXC071TbysHakP6ui9FPP7nJzUGrbqNd5m0lLWPruT3eyI+ODhbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zs9Xp1t7FzrLh; Tue, 06 May 2025 07:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5467o2Ol020872; Tue, 6 May 2025 07:50:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5467o268020867; Tue, 6 May 2025 07:50:02 GMT (envelope-from git) Date: Tue, 6 May 2025 07:50:02 GMT Message-Id: <202505060750.5467o268020867@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 42fd47ef8113 - main - mail: Further refine the SIGINT test. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 42fd47ef81138ae53ba77add5a400f67af8e6263 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=42fd47ef81138ae53ba77add5a400f67af8e6263 commit 42fd47ef81138ae53ba77add5a400f67af8e6263 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-06 07:49:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-06 07:49:45 +0000 mail: Further refine the SIGINT test. * Wait at least 1-2 s before sending the second SIGINT. * If the child is still running after 15 s, send a SIGKILL. * Improve the exit status checks. Fixes: 59597032c948 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50092 --- usr.bin/mail/tests/mail_sigint_test.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/usr.bin/mail/tests/mail_sigint_test.c b/usr.bin/mail/tests/mail_sigint_test.c index e2889493f3cd..ace5f714c459 100644 --- a/usr.bin/mail/tests/mail_sigint_test.c +++ b/usr.bin/mail/tests/mail_sigint_test.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -32,6 +33,7 @@ mailx_sigint(bool interactive) char ebuf[1024] = ""; struct pollfd fds[2]; int ipd[2], opd[2], epd[2], spd[2]; + time_t start, now; size_t olen = 0, elen = 0; ssize_t rlen; pid_t pid; @@ -86,25 +88,28 @@ mailx_sigint(bool interactive) fds[0].events = POLLIN; fds[1].fd = epd[0]; fds[1].events = POLLIN; + time(&start); for (;;) { - if (poll(fds, 2, 1000) < 0) - atf_tc_fail("failed to poll"); + ATF_REQUIRE(poll(fds, 2, 1000) >= 0); if (fds[0].revents == POLLIN && olen < sizeof(obuf)) { rlen = read(opd[0], obuf + olen, sizeof(obuf) - olen - 1); - if (rlen < 0) - atf_tc_fail("failed to read"); + ATF_REQUIRE(rlen >= 0); olen += rlen; } if (fds[1].revents == POLLIN && elen < sizeof(ebuf)) { rlen = read(epd[0], ebuf + elen, sizeof(ebuf) - elen - 1); - if (rlen < 0) - atf_tc_fail("failed to read"); + ATF_REQUIRE(rlen >= 0); elen += rlen; } - if (elen > 0 && kc == 1) { - kill(pid, SIGINT); + time(&now); + if (now - start > 1 && elen > 0 && kc == 1) { + ATF_CHECK_INTEQ(0, kill(pid, SIGINT)); kc++; } + if (now - start > 15 && kc > 0) { + (void)kill(pid, SIGKILL); + kc = -1; + } if (waitpid(pid, &status, WNOHANG) == pid) break; } @@ -114,14 +119,16 @@ mailx_sigint(bool interactive) close(spd[0]); if (interactive) { ATF_CHECK(WIFEXITED(status)); - ATF_CHECK_INTEQ(1, WEXITSTATUS(status)); + if (WIFEXITED(status)) + ATF_CHECK_INTEQ(1, WEXITSTATUS(status)); ATF_CHECK_INTEQ(2, kc); ATF_CHECK_STREQ("", obuf); ATF_CHECK_MATCH("Interrupt -- one more to kill letter", ebuf); atf_utils_compare_file("dead.letter", BODY); } else { ATF_CHECK(WIFSIGNALED(status)); - ATF_CHECK_INTEQ(SIGINT, WTERMSIG(status)); + if (WIFSIGNALED(status)) + ATF_CHECK_INTEQ(SIGINT, WTERMSIG(status)); ATF_CHECK_INTEQ(1, kc); ATF_CHECK_STREQ("", obuf); ATF_CHECK_STREQ("", ebuf); From nobody Tue May 6 08:48: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 4ZsBqz5cjRz5vjXv; Tue, 06 May 2025 08:48: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsBqz4vh3z3vYp; Tue, 06 May 2025 08:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746521295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fn7+StHYr2NQ4yM569SnLB7VUdxIcKIxzMtEnWyaHwc=; b=KWE5Wuuus0NLLh5+RlZmx7FNvoxZ+wP3rv92SkEX5MQ4NtDVNmLXEyXm4XINKy1o8aPkZc yEiBqEJ5HB/4k6xf+6gLZPwCB8StBHYKzOUsE0bWdgFFzGA02E3uVDh+5JxZdPbaGEKx/I d6jpqjGu+WP+uqDCJM8ITActPaEufFzD0fWxMzZpIfwRapkcmM/Z5k8iXvGANHZ0XnHzDn RIcPRVG2td6H6vwdIXgAoeIHY527NeAALAo31EpRbIRh+4uzVsoAcRuqE/PpLUKppy8h9E v2KdtV/XWMkq9oxzVR5W1TPF6Z/yLwi5UTkmr/23Z/U8fLvT2yIAzRR06z1JFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746521295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fn7+StHYr2NQ4yM569SnLB7VUdxIcKIxzMtEnWyaHwc=; b=etSn+G3nApjR4SyzaDDAKkvIdFh5+UdMqf0IK/QTF2h47cUDFpB8GW988BF93Pn0acQHtC dGULe5tuwkJASxQ/eqFFmtmcAZ+Zj06xxAQCEvoqVcVyh7BkR5+3qPaivEwLXBy0jJLbIh ZfbmukKE0vHc9RMUeALJ/ihfFduKf233FF73jyEIXRrLXVZ5YqVuorjmpllxNHlR5Hg0lJ 5iE9fTKyBj6Ehdw4ZJQtVLAx2w2HMhcXmEsEH1rzLoy6KTx+TnUm5sxVwF0msT6mcA+HI0 diIKTZz0cch/8/LLoVm+ShPfmHJnd1IhPal2JhZxMc8yg0n9iYuNmSl+wrWrFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746521295; a=rsa-sha256; cv=none; b=IfrxRXf4f0MJ9YkFhPZQ/XVQ7pcD5GTddy2+lYxloqFS/i86uBLDxGlDjKmHMa19q8ICNx znAvSQqBjEojOeutgUUDcK/v1hav49Lv2IENkUOOycaFalRYOlpnFCduoiGAhx5+ibuNSA o+xeTXX+rFOUv1u7BOeF4IXWv5FiR8tGF+LnONT+EPRgjoM3hrbcbLxO95qit5GnoZGV+L mdNw+V8H7ruEnUHFcoTVdfj86L0PdPx+6m88zUGGp7tVu1ne0Zr5U+FaTPvXvBnJ6V6Czf BGz7sUla8xSWtVjih1LM9pJyv3JyxFWryq9izkHHJJQP0FBJcZkDO9NAehmafg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsBqz49RXzsd5; Tue, 06 May 2025 08:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5468mFm3031090; Tue, 6 May 2025 08:48:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5468mFFA031087; Tue, 6 May 2025 08:48:15 GMT (envelope-from git) Date: Tue, 6 May 2025 08:48:15 GMT Message-Id: <202505060848.5468mFFA031087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: dd2d27092388 - main - rc.conf.5: add a missing word in the description of $ipv6_enable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd2d270923884f0bb272da71cf76397ec5e8539c Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=dd2d270923884f0bb272da71cf76397ec5e8539c commit dd2d270923884f0bb272da71cf76397ec5e8539c Author: Lexi Winter AuthorDate: 2025-05-06 08:46:20 +0000 Commit: Lexi Winter CommitDate: 2025-05-06 08:46:47 +0000 rc.conf.5: add a missing word in the description of $ipv6_enable Reviewed by: ziaee, kevans Approved by: kevans (mentor) Differential Revision: https://reviews.freebsd.org/D50113 --- share/man/man5/rc.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index e58a1f5001b5..9681542bff41 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 20, 2025 +.Dd May 6, 2025 .Dt RC.CONF 5 .Os .Sh NAME @@ -1751,7 +1751,7 @@ is added to all of .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 and the .Va ipv6_activate_all_interfaces -is defined as +variable is defined as .Dq Li YES . .It Va ipv6_prefer .Pq Vt bool From nobody Tue May 6 11:10: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 4ZsG0J0dNWz5tdln; Tue, 06 May 2025 11:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsG0H72F4z3qHp; Tue, 06 May 2025 11:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746529840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ELZBbYam0P0nNkjkjJrOPQ/wa0YQkFRwnNqemPPGQgI=; b=OATL2WXJ+LD25hXt6+qJJxX2c3UTnap9h8tp1wl6Y9GC5ZhL4sHIQ/6WftfWtpaWnSErhx SJWKa1liwbENo5bIQqcMRUjCw7Z9jRt2n36AOeo8K0pxDrX8dJ+8HGRqP1pI3YPpeV9w7w 06Hgzutx1WZrUmebjhD5nXBJ5Sl2hgNDaqtQIQtzjsAor9VqfsqAMLZ7xCYr7BXwAHvpZO ogB6CHxrb/P4YrQTGV0IXBTb4I/g/FHABgVzdHlMf8/IEnEjk4uFiThOL/3anhciP2UppF IoJPz6ZqofcP1KQUY+PI7cJephWCIbLujtzgfW0ojexPIaDtoQPxr/ALo/whnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746529840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ELZBbYam0P0nNkjkjJrOPQ/wa0YQkFRwnNqemPPGQgI=; b=ym1DQwC3K5cLoWNHGNy+q3Av/Ql3I91JU4gM//4qRpz5Cf7URKGzcgVVUtZvnvRE8HGTgQ Yp9PIqWWBG3AOyJHKWUWWy6m0ABi24hsG6QF6yfFwvinqp0yT11vDDk0MwzMTpUg2yIN8G wi+NpjytyyAuG4I2yvWMycyYeQxA9KFqqvW889vtNdjqlOXadWJ/zAolztxcVsbkIZ/1Lt ylijfldCCmpVDrno6lbCTMC23bP4LbCHLFxDftOh2BZgUAhiU9bXAJl9ilLtlMQgPRrrp3 n1Pkg170eewUjHS5ysoK4HdOcaXJoqW1E5kDY2gzy6Y4PYwl59vsDYNJYOHjVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746529840; a=rsa-sha256; cv=none; b=qKEqwbGsahy4mGwRWT2jrcVBXVCBW3aUCPO62yTK24riouE3NZYgDOhdv86rqzh5beDAJ1 nqlvqu0MbINcHC7qYYKeMoiW/yXrn+Eev3NSQX0A6BK7oHW70EBJ1lF/RMnZgjRn5NYDh2 1c9f6/xZYa6/D3ElpzNID5hZ+aDJfVvcrgahdnv+ytUQY7d5QZoM9xK6z4aimhf7p5zF3j qa09G2/AfKZlrrTL/HLKr4LTlWbRA/7PWS8Z0cn7zF7felAdKUxUBtoqFZXgSkz/umcvF8 sXSrqsjnyGHVbabNeDxoXNzJdMgjNjjtW5rHfG1M17Zm66l5uu0Ic6Da5oezlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsG0H6dynzxLk; Tue, 06 May 2025 11:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546BAdbX003621; Tue, 6 May 2025 11:10:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546BAdNZ003618; Tue, 6 May 2025 11:10:39 GMT (envelope-from git) Date: Tue, 6 May 2025 11:10:39 GMT Message-Id: <202505061110.546BAdNZ003618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: a5ba03f6e4f0 - main - net/if_dl.h: put kernel decls behind _KERNEL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5ba03f6e4f003022968b50161abac24c7ec1d38 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=a5ba03f6e4f003022968b50161abac24c7ec1d38 commit a5ba03f6e4f003022968b50161abac24c7ec1d38 Author: Lexi Winter AuthorDate: 2025-05-06 10:18:43 +0000 Commit: Lexi Winter CommitDate: 2025-05-06 10:19:32 +0000 net/if_dl.h: put kernel decls behind _KERNEL Reviewed by: des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50063 --- sys/net/if_dl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h index 77663c2a20d7..e57cdade9e59 100644 --- a/sys/net/if_dl.h +++ b/sys/net/if_dl.h @@ -68,12 +68,14 @@ struct sockaddr_dl { #define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen)) #define LLINDEX(s) ((s)->sdl_index) +#ifdef _KERNEL + struct ifnet; struct sockaddr_dl *link_alloc_sdl(size_t, int); void link_free_sdl(struct sockaddr *sa); struct sockaddr_dl *link_init_sdl(struct ifnet *, struct sockaddr *, u_char); -#ifndef _KERNEL +#else /* !_KERNEL */ #include From nobody Tue May 6 11:10: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 4ZsG0K1n83z5tdly; Tue, 06 May 2025 11:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsG0K0nbDz3qC1; Tue, 06 May 2025 11:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746529841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUXyEmfXeq7KxYx67bKI/VAIBX7o0UrO/9XiTZlbNKQ=; b=N3j1iMz7Kdr9eAV7QE8der6zYmluYxVwFPghYYr2ly6e7mWoSh/Zv9EJjEaONVUfFFG5LP cHgWhF9YBgZXCAcJuRvhP3KUD89y/C06NZcbQ9QmdceafSEdw4XQOKjhoiqJgj9XD4dPwt evN3CaAQnTScH1WOJZ4ou3HRXXLZrhNzunQrOBxMfr9VP44X6BD56O/v5ThdHxF79ickPp 4CFTjQxSNPCNoxPizjHiLuKc0UdjMhLXHV/CbXZaP6nw8eb/G7jEM1ps7sTyumHTlqa/aZ UadDL2885iAk4SaBqNUGO1wSO0s3Rk10Vr3Stqy/vFwxOevb0LbXDcBeGY5bFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746529841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUXyEmfXeq7KxYx67bKI/VAIBX7o0UrO/9XiTZlbNKQ=; b=yLhadhL1TI/3CfRWDg1GWuA99uvmY/cMvGBYW6VVn1bEF3XNN6xRK4mhPOmlPutfa43lOn HeCpGA8qPglytjRW4PaJHOz8x9ZX45O9fzXmYfV9Olh+uoBM064K+9jyW91wCrwUllT0bU QmfFIvdCo9iP+WHrHZKwZty/4oaxZ0NQrGx0gsiMBZDsCjFAbDI0Dv6HL/ab/BFmz97W1V fLecz0vBpGwz4QWcYAWc2jH3kUziUREpYrJzhXEWds0ktp5Mvyi53GNLAuhMpNPF6z5EqE hQpilem3MLZ6dx5paHCyAL392jQG39UEWs498Mg74aI0KImYyPnYWdvI9QV/uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746529841; a=rsa-sha256; cv=none; b=GvPCM57cpUuGjvwkE1oOMIP6IcdhBP1dnBc29K0i4GZwgWo5waG7ENuLEoUacDII2K6YWg 9GEhpApDR/4NLwbRlOZBerPUJbGg89c40Ze5nyHqRdp+2JDW0LJlXQ9ru8rz/wCHQtqfwT +dbbllvPCrdTQJTSTS+tTrJ9Kvcl5obcghI+bF/IUkwP7TqBfYecJj25xkbFuVbCR0VP3f L7hlJZbENxFz0roZF6vzDKA0VkgjcVM1S8otYhZL+VKs9oFUI4vGKmZ7nrIVrjw99jnOrt xf7rKQqcBXJFjR1EOtZaupaG1g4siuI3tdEKcoTPE/jvnEOAIfWm07YqDGKEcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsG0K0NRJzxdQ; Tue, 06 May 2025 11:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546BAeaZ003655; Tue, 6 May 2025 11:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546BAe2Z003652; Tue, 6 May 2025 11:10:40 GMT (envelope-from git) Date: Tue, 6 May 2025 11:10:40 GMT Message-Id: <202505061110.546BAe2Z003652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 70b5c918571b - main - net/if_dl.h: make self-contained List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70b5c918571b6c79459ee6de66ceb4c83974d542 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=70b5c918571b6c79459ee6de66ceb4c83974d542 commit 70b5c918571b6c79459ee6de66ceb4c83974d542 Author: Lexi Winter AuthorDate: 2025-05-06 10:20:44 +0000 Commit: Lexi Winter CommitDate: 2025-05-06 10:20:44 +0000 net/if_dl.h: make self-contained include for u_char and u_short. to avoid including , remove the caddr_t cast from LLADDR. we are trying to get rid of caddr_t anyway, and since sdl_data is already an array of char, the cast is unnecessary. this also makes LLADDR const-correct, i.e. passing a const sockaddr_dl will return a const pointer. Reviewed by: des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50065 --- sys/net/if_dl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h index e57cdade9e59..f8c7c2f75956 100644 --- a/sys/net/if_dl.h +++ b/sys/net/if_dl.h @@ -32,6 +32,8 @@ #ifndef _NET_IF_DL_H_ #define _NET_IF_DL_H_ +#include + /* * A Link-Level Sockaddr may specify the interface in one of two * ways: either by means of a system-provided index number (computed @@ -65,7 +67,7 @@ struct sockaddr_dl { contains both if name and ll address */ }; -#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen)) +#define LLADDR(s) (&(s)->sdl_data[(s)->sdl_nlen]) #define LLINDEX(s) ((s)->sdl_index) #ifdef _KERNEL From nobody Tue May 6 11:55: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 4ZsGzy735pz5thlL; Tue, 06 May 2025 11:55: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsGzy6Mm0z4Gyr; Tue, 06 May 2025 11:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746532526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWlaxWXeb4Re6BnzUP7ujD+zEotaF75EFhJfJW04DoA=; b=LXdXU6z/Jm94Vgrlw7KvMADe+RQwcBBtv7JlM+QiIeAqp7ilGN+IiJoe1Hl9AJfpBObkOy v0eTwcplpN0UbfB1/cwu7ozbPVOe6ewHN34Km30yIpJEUDWNYeAu1lxBiwk1NIOwReaxKv ZhiZj9OaFFN3SFWr7lfqxrw5/gzHQ+e322T5PzI450TzBDiPcnCTpP+idvOLGgmD3EQGrg p9bspFcTCf0e5+S5zPvmD7Ug2Ckp3aPpcCJbGGJ5CxxrW4HukCnqevp0y6lH3bF14uJedR 1aGfJoi5DC3NfNHKxXLaxpnk3hTwTOMdDPgObfF8zzI1CDsYGH/zus1wFfgupQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746532526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWlaxWXeb4Re6BnzUP7ujD+zEotaF75EFhJfJW04DoA=; b=gDQAd92f9ic2rCkBTrbnRAMn2O+0qwkG94uS6zxtX75N17BB0bn5pyj0OGw7sU5tYzNyH3 xPsQ7BeY5BANj1zd6//56SvMPvNPbmYA0CxwdxstB9Biwwnlfv71+CU4LpRc4o7/JgcBQI /0ycO7QcuXyV6zGQEoyOj/+0BTA0ORpRiZArK+F7isHXiabr72fhWMC8uBnNhTgisjz92A kW6Z9fGKubdPGUlwgb/iRR+nI0+DEf6c6Rmm4jZZzjTfAGM8fsY8raT490uqLHaLQd2PSV O3dX7hVowRGAh5HdRhg7vkTvvzmPW+AJbum1zDestF9fuizWUkHlNiZrw3M11g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746532526; a=rsa-sha256; cv=none; b=l8qH+klBYdEz/32uUZWtc8najjnP3UIEHgWkWuCz/ASwM4DFMqBN6V9YvTIaB9XmG4lIVm Ymz+Hei9EJN7DBz2BYb2BoJt2/ZbqeIY93iM82p+IUQFF6Fn7fk+MuWoTc4Ag/7JIewO3r MygZ6i/5Iq0ZyJTssyXU5SbuQNWmDZIDEIbDhhtq5fPolXClqmX6Fdu9cYA6TH86KieG61 REhChluB9UDbDp9oqQfaWuUsCEMmxeczrJDFzUt1CYNVPL7mzkD3wrNB2YFdMMqh/ScpZd K63o6eXs8kMo281MJREm/q3rfSzh59SsPtOdZvz8ioL4LUlBKevGh7goQWK+Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsGzy5NvYzyLq; Tue, 06 May 2025 11:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546BtQb2087233; Tue, 6 May 2025 11:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546BtQtr087230; Tue, 6 May 2025 11:55:26 GMT (envelope-from git) Date: Tue, 6 May 2025 11:55:26 GMT Message-Id: <202505061155.546BtQtr087230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 691833ad3776 - main - sys/intpm: fix SMBus Read Block List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 691833ad3776c17ba3267049ac36bc3461c66799 Auto-Submitted: auto-generated The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=691833ad3776c17ba3267049ac36bc3461c66799 commit 691833ad3776c17ba3267049ac36bc3461c66799 Author: Corvin Köhne AuthorDate: 2025-05-05 09:23:18 +0000 Commit: Corvin Köhne CommitDate: 2025-05-06 11:54:18 +0000 sys/intpm: fix SMBus Read Block The Read Block function missed saving the data into the preallocated buffer. This causes it to return some garbage when called. Reviewed by: avg MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Pull Request: https://github.com/freebsd/freebsd-src/pull/1691 --- sys/dev/intpm/intpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/intpm/intpm.c b/sys/dev/intpm/intpm.c index 2f12e0dcf49b..fd3838bbcc14 100644 --- a/sys/dev/intpm/intpm.c +++ b/sys/dev/intpm/intpm.c @@ -879,7 +879,7 @@ intsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) if (nread != 0 && nread <= SMBBLOCKTRANS_MAX) { *count = nread; for (i = 0; i < nread; i++) - bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); + buf[i] = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); } else error = SMB_EBUSERR; } From nobody Tue May 6 12:11: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 4ZsHLm2xvxz5tjrx; Tue, 06 May 2025 12:11: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsHLm1TLxz4McR; Tue, 06 May 2025 12:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746533504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aFfCupORjMwNumfe2tJN8cBLGASnbfVufMzy/fWwcpk=; b=nZ4wkjcbkylVRF8FrB3Jfys3cik2frdZnfWggLFv1EqHKcR40Qmzr/ezjD6SRTfUkgALCk ikFlkKAY6KHlRm7GZnN6k22HZ9tsVZWOja3Xt2OWFr3O+/Rxl1wm98jDvOWVhFwCpExVtr +Ki58wFZnQ8SKPJ9/v1ty2vGW1kQ+L9tiF+vyd6wb+av8TwGx9IU7Ysvi/BuGRejhYoT7o JE/3QarghNQVEDhokP8zyOqW9egqEEz2J9z0HH/wo+o6Il9QT5PrsCycUxY7hga53ExzIa 31vGeKoZFC1+gfx+5kd8QDJozf0Czn1rBcO+F/m/MmYNXRwO81CfPXqEsxT/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746533504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aFfCupORjMwNumfe2tJN8cBLGASnbfVufMzy/fWwcpk=; b=J5ikedOcdVqDb4mo0aAWXsLGNn5ydkoo3Z23eqCiZZHimnnNlUr28oSoLifGuyDgQQu84q uuA3ocfw7Y2KevmiVDmTI9pSNqgflHoH4LLWhFm39g3T1GOlXfqSeUQ6SwyDYAH5g3Ggcm aaaooGT3+vIyCr/fp2bSx3N6IUK3+APSXO+x7CzX3l1R78ufh+juPmD3VUT9zxm69OXkH8 7iH7eQdjlTB7dVyU6fEqFixUKcdlz3ejtM7mMp3KhGgt+IId3/pa5/K+KCZKhVo534UCCD 6SDxhkNfC8QebYE1F2nXLlZcXrsoeqVwvllM87h95X7Kbey5wpjx/NgjssHujQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746533504; a=rsa-sha256; cv=none; b=t5OuTl7wshbR263IaCA+ttw/fQ2daAJbyL9jsKzVXYtqhs31foR+R2+0f4al4Ntw9nOidE iQbTwT5gYM6L3Ig2NLcfsl+owTQfbyzIql5jVZulP9/nSgic1+oceJzdLUuS0pZjRQRrDx aM/WoYSZl1NYDEgM2zRiJBLkj3O68J7k9CDdT57qBLTZhfJfNqynFbMlgbzNCfpuLMEi6R QNbDWuWbJGT9aN6QfK+toc/Iig0mwH3zQjlEGv3oPoHEDAFeVVDMBsKp4wmHGiy+fGXjP4 pR3s/fZRZKCcyPBRaafflL6uz7jxB4dgDS8/oyniyeT/OvrnDubc0NtBIDoOTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsHLm14kmz1070; Tue, 06 May 2025 12:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546CBilY021807; Tue, 6 May 2025 12:11:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546CBiDV021804; Tue, 6 May 2025 12:11:44 GMT (envelope-from git) Date: Tue, 6 May 2025 12:11:44 GMT Message-Id: <202505061211.546CBiDV021804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a2aabd2493a7 - main - release/pkg-stage: Stop creating pkg.txz symlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a2aabd2493a790200b6ce34345fbaa53fe01e377 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a2aabd2493a790200b6ce34345fbaa53fe01e377 commit a2aabd2493a790200b6ce34345fbaa53fe01e377 Author: Ed Maste AuthorDate: 2025-05-05 18:06:11 +0000 Commit: Ed Maste CommitDate: 2025-05-06 12:04:42 +0000 release/pkg-stage: Stop creating pkg.txz symlink Contemporary pkg never uses any file other than pkg.pkg now. Reviewed by: Isaac Freund Fixes: 0cd9513a5ba5 ("pkg: retire backwards compatibility bootstrap support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50171 --- release/scripts/pkg-stage.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 9f121e5ab011..821f15e01bd8 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -81,12 +81,11 @@ ${PKGCMD} -vv ${PKGCMD} update -f ${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES} -# Create the 'Latest/pkg.txz' symlink so 'pkg bootstrap' works +# Create the 'Latest/pkg.pkg' symlink so 'pkg bootstrap' works # using the on-disc packages. export LATEST_DIR="${ROOTDIR}/${PKG_REPODIR}/Latest" mkdir -p ${LATEST_DIR} ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).pkg ${LATEST_DIR}/pkg.pkg -ln -sf pkg.pkg ${LATEST_DIR}/pkg.txz ${PKGCMD} repo ${PKG_REPODIR} From nobody Tue May 6 13:01: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 4ZsJRy3NRyz5tmGK; Tue, 06 May 2025 13:01: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsJRy1hybz3ZJd; Tue, 06 May 2025 13:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746536478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ngCo5Bwv2MPoQI5DcbFPfF+vs2I+t1T2pSnulxUzSbg=; b=EvnOYsRZZdkvh4wOwD47kcEYBQ8Tz9xFeSCd4iFNrRsTTJ+hiRmKzjAJqYBWV/DZk5Lu9b sLcmwpMxNFH+qMmVLNRBfWLvkKoJoV9y6vp92qYeGnw7vm1gIZDBSFhA28WCl3QWHHjC2l MgjX9nNa5wg2cmL1AeubNkAOC+0WZq/TptRuqC+Q5H7Hm7m/sShkcNIkJhFphEcpenDy5v UvnfmS1PjeCTb7RkDfuovm6RGMbel4GovmEFdQb3ZUSLgDz+U2t4ygM8ttS+qgWbynZxly nhFSr0hQdrqA1y5sLoCnlBhqfbuHnBK1Zrrrm6Mv2en1u7+u24I45tijaZe1OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746536478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ngCo5Bwv2MPoQI5DcbFPfF+vs2I+t1T2pSnulxUzSbg=; b=soIU+E5g2IUF8DfnHmHvWwoAvJ2oVBwV3yzS56C8Vbn+XA+PxfUaK174CxnWDi5trxehzd 8qF+tt8itXRatrmb6w629NJ/HWrA5v2jn0M7Ti3sFz/Xn15k/a1xLVI81mnb2UDKE7SuU+ kjQJjlNszBoiw/FlgjH0GMBVL+OBO6TUlktjOAPEvb6aBEpZJxSeNKmL4oN32TynISfro+ k/mZsI4EV0M0dlGN/e0g9K2rJtjV1t/6PJdndknLEa7gqFl17cfPEXnfkWLT5eaN47xnwO 2vaUjK8Y8O/L+Sty2nVJ0+UL1J0SBMKWVCPvvtcRR+Fk5yBFOAffVzAyDSRtmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746536478; a=rsa-sha256; cv=none; b=r6tnhQYopSaut0cJW308f3wJSbqsq8RmYaE9vuIPnttdtGEjYy3OlUCHksxexyfdcBszbV mdfhtHto2QtnZC1VuAT5nsdk67ByOky69r7aNE+kDcmgmLOvc+IVTkLybQtZPhR9ARNyaz RI0XuVjjbGpew0dugOGA2v5tK8mSLKL4A9HbxpGxCVFO3TAPkZXpmBKVyFz/3QjdgMbLTQ PTmzk2Z4D6JacTHXaApL/hbR95xPQxdSfET8kAXP479dOcNBrAE7PxRxlyapwcfvmZVDOk 4B1HEmnWwHfVZgRIpsrLQ3ka2vu0wCpU1EswwUQNFXxwt5aH4x9XSEse6Hnopg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsJRy1JCFz10vy; Tue, 06 May 2025 13:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546D1ICE011660; Tue, 6 May 2025 13:01:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546D1Ivw011657; Tue, 6 May 2025 13:01:18 GMT (envelope-from git) Date: Tue, 6 May 2025 13:01:18 GMT Message-Id: <202505061301.546D1Ivw011657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 811f6a0ae023 - main - VFS cache: Fix initial sizing for non-default 'ncsizefactor' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 811f6a0ae0230fb09b666276cbe93a8be4fe7c73 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=811f6a0ae0230fb09b666276cbe93a8be4fe7c73 commit 811f6a0ae0230fb09b666276cbe93a8be4fe7c73 Author: Olivier Certner AuthorDate: 2025-05-01 10:30:49 +0000 Commit: Olivier Certner CommitDate: 2025-05-06 13:00:00 +0000 VFS cache: Fix initial sizing for non-default 'ncsizefactor' Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50120 --- sys/kern/vfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c949363de003..9089c0fd78b4 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -2772,7 +2772,7 @@ nchinit(void *dummy __unused) ncsize = desiredvnodes * ncsizefactor; cache_recalc_neg_min(); - nchashtbl = nchinittbl(desiredvnodes * 2, &nchash); + nchashtbl = nchinittbl(ncsize, &nchash); ncbuckethash = cache_roundup_2(mp_ncpus * mp_ncpus) - 1; if (ncbuckethash < 7) /* arbitrarily chosen to avoid having one lock */ ncbuckethash = 7; From nobody Tue May 6 13:50: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 4ZsKXp2M7jz5tr3d; Tue, 06 May 2025 13:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsKXp1rrCz4019; Tue, 06 May 2025 13:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746539434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FDX7jBFs+S6nvUMUDgtMyBMhxzu1vTGG9eFQfeTymk=; b=sSMUU5fUkjv2h2Pv0hKj91HbIE8aMzdzfEnNmVEWzhTdpTcvM9dP+IfW7c9Lj1c6n29lAH 3l3BuL+19SzFuSeU5s5a9DD4iGofdfD7KS73TvNhHSaGYBXfh+lLULmPgfAIm5lP5MJC3h eOJflb2SP5gzHQBtrqPIHWIQQHWy6OHbxDu9BCe9yStw4DQz6Qn217HL+FZinB7+HgcbYM BrInviJYRmLvzY7Q7QkmOqDt0hpaehXEViflCqVX7cLhdR/8GrBi5OPf7YjYA4ujninmEi Mbkaolu6gEUPNuXujvKNNbMVYBEFb54CzCDp57OywY17IS+WGWnZXw2SpamwXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746539434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FDX7jBFs+S6nvUMUDgtMyBMhxzu1vTGG9eFQfeTymk=; b=yVADzOvrTBxpkjRN0Lex6CSZ5VhGg2dpwfEUmVusvr35zgNgPI/cDL0l/0H297Mk2drxXA Z0s9rOmJSmjdcBc7uNtq6Q5bo5bjaoTUDSV5GIP2Tcui7XUUj6bSbg59jgvG4wHytodtTC Zy/9vHWYmE40ndaIbV9RAOCHxfYqNA5P4RiP4ueIQ7G2y8Luqx9Gcz055tECzQEa9J9QAi hPgZeFyWniTL+BwG5F1YvGwOk7ylgIfPmvnq/dddy53sBDXwl6bvoduXHdgkc2QDmvrDlN 19/QWOLleLBdhpbVBh8v45PjWSFxnUwp//R+LoVixMmDIoVSlinXeX/p/5XnvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746539434; a=rsa-sha256; cv=none; b=qAiykeGAuzaGPUuGSRrFGsdB4/q6yOfYDoA4q3suNntV2TwJ54ff+bwz7Ih/slFewzLZdw cH0Gms9slUEMnvxTLIbkMC8vZ4hSwgMEPjJhjXicjt7BaRkbcSuOqmV33X9u775QDFVKII n1x2fhebumCcSEQh+/6BSWQ9gX7o0gwdjLaFTqBMkzJ0YnKjdGaDONOCohLNLDIBoEPmNz 6zWy0u6BG/Y3weHXogak0hjSKANo5nEHZDTw50KuBt2tJj+rSrx20AgBYiOiUdgJc1WTgO w7X7j+nKcyZNIILXZ2Qg4acnXdYJ2TF5nKpHvyZAPL+mACq9+9dVMeQ8SpW4lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsKXp0fdMz12fk; Tue, 06 May 2025 13:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546DoX4s004050; Tue, 6 May 2025 13:50:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546DoXH0004047; Tue, 6 May 2025 13:50:33 GMT (envelope-from git) Date: Tue, 6 May 2025 13:50:33 GMT Message-Id: <202505061350.546DoXH0004047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 26aec3f3b4fc - main - getenv_r tests: Fix getenv_r_erange List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 26aec3f3b4fcdd23411cda6797d18117d9f965d6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=26aec3f3b4fcdd23411cda6797d18117d9f965d6 commit 26aec3f3b4fcdd23411cda6797d18117d9f965d6 Author: Mark Johnston AuthorDate: 2025-05-05 18:30:56 +0000 Commit: Mark Johnston CommitDate: 2025-05-06 13:49:17 +0000 getenv_r tests: Fix getenv_r_erange Fixes: 873420ca1e6e ("libc: Add getenv_r() function.") Reviewed by: des Differential Revision: https://reviews.freebsd.org/D50172 --- lib/libc/tests/stdlib/getenv_r_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/tests/stdlib/getenv_r_test.c b/lib/libc/tests/stdlib/getenv_r_test.c index 7935ead6c495..8085b92b1064 100644 --- a/lib/libc/tests/stdlib/getenv_r_test.c +++ b/lib/libc/tests/stdlib/getenv_r_test.c @@ -55,7 +55,7 @@ ATF_TC_BODY(getenv_r_erange, tc) ATF_REQUIRE_EQ(0, setenv("ATF_TC_IDENT", ident, 1)); errno = 0; - ATF_REQUIRE_EQ(-1, getenv_r(NULL, buf, strlen(ident))); + ATF_REQUIRE_EQ(-1, getenv_r("ATF_TC_IDENT", buf, strlen(ident))); ATF_REQUIRE_EQ(ERANGE, errno); } From nobody Tue May 6 14:50: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 4ZsLsd1hFrz5twGL; Tue, 06 May 2025 14:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsLsc5Pkqz3TK8; Tue, 06 May 2025 14:50:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746543012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PdhMcuicGB1NZV3tioPOXsT7bULWc80wh+QgCN1aAyU=; b=i3X06bLtXmPxBBxH5ckB3Hfh8gofqWZ7wmQdBJ75wK4tE7nHhgOLe9L2RE3MMkxImQaLgJ eqVY9cHZS3AOOOYMP/gccvIHIOt/HvANgm9vLnxN2VOabz+Usho3Ilni/RY6wWORljAnqC ZdCVmNTfiS9klyQ7IV+QLSNsL6mP89ibefhqi0t6XT70wxRXPzcH+wjbYizAcM58SHlmhm b8E05h7CX92ssTz28eQgLTBwa5gnHXAIEd/9DyJyeVsjJnxvC3qzLaZvNT1Ewm3e0SXV2n wJ8RLBBc/A1qOGfW4Mj6vYe3NQvd+2CEo/A3vYAMndE0Pi+3DXhxcFnca/za8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746543012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PdhMcuicGB1NZV3tioPOXsT7bULWc80wh+QgCN1aAyU=; b=m7klUaVRCmCneXjEDjD3Lo0foRUSBdFROvI9wP2Rfhql7VhB8JpE1HYmtnwd0f+a9aUGB/ qT/VoAwK23KlPvkNzMF5CzXJUNgdC5yzu/awKyEC2qQZFm6rTbOhtepkKAmPlWB21SXakk RhUhfMURITrNyibRCWb2CVruyZCXA/hT78Ky9lRosFxYI6Le3ad0fE6biokgSHVUFH5oEE gdiK4s+jmCXXJLFHAUorX4sGtowelpwDkj5es09M3nV/jMHIpSQswyozF0xI0o1ARa5oVi 4JwOtXs/VgGYGwEYBG8Pas/LPuNQD97BYjZSKDvLVncjF+bXySDHvKteNemLZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746543012; a=rsa-sha256; cv=none; b=wvgaJLB/3qt4+rtF70zArd+QgHpU5Xrv0MVleLlczNODzgt7sWoWrRrJqOX7SfPSOMyiql bSYw+b05kdmGH8oPYzMLnUBwp3sRuAKNe0R9m/Z//jAlpbpQ9kg+tqLW1DYFxzx6kEgc6l EL0/MgkTq5y9a03jXWkwF7CpXnA4bsIhL00gIvKP+lRJlaf5YUCctab0RtSI/KjNbsjjLu tvPLh5rvUOFibS3vpRXb185I8IIiRkPW4oYa9cZgQM7UXZ0L2GIXTdoRhUMGvGL4/1O8Di NPa6DkM8/DteD57tkrWFxlz60FT1059k9QKoHBwWo1qC/J5Bqj2aIzhUaZCz+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsLsc4yZ4z13kv; Tue, 06 May 2025 14:50:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546EoCfR013786; Tue, 6 May 2025 14:50:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546EoCL6013780; Tue, 6 May 2025 14:50:12 GMT (envelope-from git) Date: Tue, 6 May 2025 14:50:12 GMT Message-Id: <202505061450.546EoCL6013780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: bbffdfef3bf0 - main - link_addr_test: use , not List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbffdfef3bf04b2f89027cb20e2019fdc74c4b1b Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=bbffdfef3bf04b2f89027cb20e2019fdc74c4b1b commit bbffdfef3bf04b2f89027cb20e2019fdc74c4b1b Author: Lexi Winter AuthorDate: 2025-05-06 14:48:17 +0000 Commit: Lexi Winter CommitDate: 2025-05-06 14:49:11 +0000 link_addr_test: use , not is the correct header; this fixes the GCC build. while here, sort the headers. Fixes: 757e973fb211 ("libc tests: add tests for link_addr(3) and link_ntoa(3)") Reviewed by: des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50189 --- lib/libc/tests/net/link_addr_test.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/libc/tests/net/link_addr_test.cc b/lib/libc/tests/net/link_addr_test.cc index 009493e7e5aa..6b9f5a841ef7 100644 --- a/lib/libc/tests/net/link_addr_test.cc +++ b/lib/libc/tests/net/link_addr_test.cc @@ -21,15 +21,17 @@ #include #include -#include + #include #include -#include -#include #include -#include #include +#include +#include +#include + +#include #include #include From nobody Tue May 6 15:06: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 4ZsMDz3BNcz5txNg; Tue, 06 May 2025 15:06:59 +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 4ZsMDz0zJcz3bVd; Tue, 06 May 2025 15:06:59 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id CJ8uu53099JM2CJsnuoJ5F; Tue, 06 May 2025 15:06:57 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id CJsluxta0JhBPCJsmudUwI; Tue, 06 May 2025 15:06:57 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=681a2591 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=GljwOeMomgjytIAQ7p8A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id E79E68FB; Tue, 06 May 2025 08:06:54 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id DEAF8300; Tue, 06 May 2025 08:06:54 -0700 (PDT) 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: Gleb Smirnoff cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket In-reply-to: <202505051956.545JuOPR085707@gitrepo.freebsd.org> References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> Comments: In-reply-to Gleb Smirnoff message dated "Mon, 05 May 2025 19:56:24 +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, 06 May 2025 08:06:54 -0700 Message-Id: <20250506150654.DEAF8300@slippy.cwsent.com> X-CMAE-Envelope: MS4xfHHO0xAqtcp0T65wQV6HiwOaecZuoGYLTy1xrow0fAdHYBijk0sC9Dh1sQq/LM/kYHOVBG1ffEtFnLOjr64gFOM0CS6k1u40h25fC0vO0PBsGYfUPdbi TOlDQu0yAIERX3tuCMtZa+t8LM/8DP0KrZDDFn8iicGF8KgcgVgijFIiHnZggqPQXgfyY8QbOSrdhy9fgw/r8PNo+yHWvsJ2XzRqcsUWMBwuhsb4iVn3U4KD yEGJIhexjNXB7qskiFLL0g8Ue/Iv6oaz17OoosRqwOtIO5AjV0MNe2u+M3SUpvwom5tjtFQKjoVPlbtkZFrl9GAYVr1H4Tr4baHFIpQqOv0= X-Rspamd-Queue-Id: 4ZsMDz0zJcz3bVd X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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-Spamd-Bar: ---- In message <202505051956.545JuOPR085707@gitrepo.freebsd.org>, Gleb Smirnoff wri tes: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d15792780760ef94647af9b377b5f0a8 > 0e1826bc > > commit d15792780760ef94647af9b377b5f0a80e1826bc > Author: Gleb Smirnoff > AuthorDate: 2025-05-05 19:56:04 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-05-05 19:56:04 +0000 > > unix: new implementation of unix/stream & unix/seqpacket > > [this is an updated version of d80a97def9a1, that had been reverted] > > Provide protocol specific pr_sosend and pr_soreceive for PF_UNIX > SOCK_STREAM sockets and implement SOCK_SEQPACKET sockets as an extension > of SOCK_STREAM. The change meets three goals: get rid of unix(4) specifi > c > stuff in the generic socket code, provide a faster and robust unix/stream > sockets and bring unix/seqpacket much closer to specification. Highlight > s > follow: > > - The send buffer now is truly bypassed. Previously it was always empty, > but the send(2) still needed to acquire its lock and do a variety of > tricks to be woken up in the right time while sleeping on it. Now the > only two things we care about in the send buffer is the I/O sx(9) lock > that serializes operations and value of so_snd.sb_hiwat, which we can rea > d > without obtaining a lock. The sleep of a send(2) happens on the mutex of > the receive buffer of the peer. A bulk send/recv of data with large > socket buffers will make both syscalls just bounce between owning the > receive buffer lock and copyin(9)/copyout(9), no other locks would be > involved. Since event notification mechanisms, such as select(2), poll(2 > ) > and kevent(2) use state of the send buffer to monitor writability, the ne > w > implementation provides protocol specific pr_sopoll and pr_kqfilter. The > sendfile(2) over unix/stream is preserved, providing protocol specific > pr_send and pr_sendfile_wait methods. > > - The implementation uses new mchain structure to manipulate mbuf chains. > Note that this required converting to mchain two functions that are share > d > with unix/dgram: unp_internalize() and unp_addsockcred() as well as addin > g > a new shared one uipc_process_kernel_mbuf(). This induces some non- > functional changes in the unix/dgram code as well. There is a space for > improvement here, as right now it is a mix of mchain and manually managed > mbuf chains. > > - unix/seqpacket previously marked as PR_ADDR & PR_ATOMIC and thus treate > d > as a datagram socket by the generic socket code, now becomes a true strea > m > socket with record markers. > > - Note on aio(4). First problem with socket aio(4) is that it uses socke > t > buffer locks for queueing and piggybacking on this locking it calls > soreadable() and sowriteable() directly. Ideally it should use > pr_sopoll() method. Second problem is that unlike a syscall, aio(4) want > s > a consistent uio structure upon return. This is incompatible with our > speculative read optimization, so in case of aio(4) write we need to > restore consistency of uio. At this point we workaround those problems > on the side of unix(4), but ideally those workarounds should be socket > aio(4) problem (not a first class citizen) rather than problem of unix(4) > , > definitely a primary facility. > --- > sys/kern/uipc_usrreq.c | 1722 +++++++++++++++++++++++++++++++++++++--------- > -- > sys/sys/sockbuf.h | 12 + > 2 files changed, 1343 insertions(+), 391 deletions(-) > Is anyone else experiencing rsync hangs with this? I'm noticing rsync hangs with large files, like those in /usr/obj or a poudriere package repo. I haven't reverted this locally yet, just guessing ATM. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue May 6 15:24: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 4ZsMdp1vRPz5txyX; Tue, 06 May 2025 15:25:02 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsMdp1FJZz3pXd; Tue, 06 May 2025 15:25:02 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746545102; 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=Z4/I+flNYkiU2jZD1I/YXb47KhlbLgxvZIOlw9mUWgU=; b=ywYkV7cBYM1fz+i08w9xmv+4pFjPWvLe3CO3hxsOMAV8oa0mh3H8Qt/KLtLKkldXdae95I rNOuJhxERNNPG3TlPWlqjRU3oYSWOYIQCux8ACEyySRQe8DDFBJjfJzUIaZqXMvTnCd0O7 82GYwuaMPqCUwfmAEpLuof+5pRop84JDWK0Yh7cOpcQ/xtl0fiAz0vOBYLoyoIwacKz9B/ hf0AruadWHCKI7z49nWdNbd1Y92nwz5+0RSUq6h1UiPULnXl8wiRcEhScb9HhvHcYtUHws UjUgp+f87Jpz2Qm6RI+0R+O8tW4f3WrkjQgbdjF8XuF5NLZtosC6KgVTh2NHoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746545102; 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=Z4/I+flNYkiU2jZD1I/YXb47KhlbLgxvZIOlw9mUWgU=; b=fEyUDcZ7SFK48pztlxIFb691mfjxBMmarD5mosc6ETGPwJ+MfmPVcxHciBSVSrkRDmzWfw sZz3IFJT6xdA1pUKIuzl+3gFwod62w5lR58BzALA56Stugdg3FdfHRbG3IncCGmeDyCJ9l tvyadH3e1BwBPGJEuwv0BZ47FGYptl2MKF4sKazV04c14RzphlBHHSE/oCSB5EnmckL98X ydQd8GcOVLCmYmeV3p5EO+ML9bbPqaTbu2ypDGrQiZIOpwT3Uhzlyz4HatrVeAFLGLc6V3 J/g/aqUXAXZdx9NgJWkfr0prrLU3DAtKhjw3Lz3q8gnDlOvRgH37B2TCXzzqqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746545102; a=rsa-sha256; cv=none; b=mO+fzWYYt4NtqY71rPDDpcIB0ow09TklQ0ntV7tp8Z2GqeHh0eHlfVVgNJOPqjfTfCoLv6 guSMyZhpxj8khezfVbPh+vFwSx3DLhyV5/pLmmkAXlyxPLayrSpSv1dKGyoB+xS87gybxb dcjkBlAm+wJ4xFukgtUtDZn74Zo6GASkAgfp5gpEJkT51cAfVAs4Yg6zho49gyNguADyvd pLyGu+Ew6zRzOjrgqLtbiyk/YIPkLQA8GwZPNoy2aSzQywUhrR1i6QEoVx3BoIwv+FkQls S09eCSGuptD8FgGuQ3GzTM1gn0P/T9y7DjKYpYH/prxaX5Li+TzH6LpPwGLQcQ== 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 4ZsMdn3yXCzrSB; Tue, 06 May 2025 15:25:01 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 6 May 2025 08:24:59 -0700 From: Gleb Smirnoff To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket Message-ID: References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> <20250506150654.DEAF8300@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=us-ascii Content-Disposition: inline In-Reply-To: <20250506150654.DEAF8300@slippy.cwsent.com> On Tue, May 06, 2025 at 08:06:54AM -0700, Cy Schubert wrote: C> Is anyone else experiencing rsync hangs with this? I'm noticing rsync hangs C> with large files, like those in /usr/obj or a poudriere package repo. C> C> I haven't reverted this locally yet, just guessing ATM. Does rsync use unix(4) socket? What is the kernel stack of the sleeping process? procstat -k $pid -- Gleb Smirnoff From nobody Tue May 6 15:30: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 4ZsMm34tqbz5ty0m; Tue, 06 May 2025 15:30:27 +0000 (UTC) (envelope-from kevans@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsMm34FXKz3qND; Tue, 06 May 2025 15:30:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746545427; 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=tL7yPgJASdVgnObpcUnsMD6TtlaHyKjVyCs5PvhFBJI=; b=l/nGv8KMPsK+W3QgT2OW1BEwdWwKxaz6xLio7L8hq3/DOZN9T1m55nOc8dRdMBx8wgV7Tq KlKsYiaJ1mQbaSst+EztW2mdVPnSKgweZ0vcpTkCIMVu1IeRziAXItitSJjjAdWqhh26xk J3yC24Eh4XOq5hwgHkJT3rhnHX/owOeVXCs+My2n/wT57XBF0ugbKU1IUFuXgpPRKW8+hF 3OaIQgI8YX2gTRmLulg+SJDLtMdrxf13AQ4CVIAxEQxGKif7XwpD2YiR7YMBzg5AB+adJb HABxlYTRULwwMhERSbIIM8oAe2jDugLemuhgok3To9+SG/o9O6On3L19vfUSsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746545427; 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=tL7yPgJASdVgnObpcUnsMD6TtlaHyKjVyCs5PvhFBJI=; b=Np+59wE6SZRrtBskkZGXZhtIOJFOnaZ4mRp8AtX6sm5YyIAmBWiI10lgkM0lHti3pD0ST8 F377a8inbGAd5o4xV8Z5IqWRx/DXaVcQK/jB62O2dfuD4fvw2yIzlxOOHUKIkgYvMMyahC 2m9byvLdrtLBHL70/UDcPleWPAxJzwpPJuo0tjD8Ir3aQOpvRXrtLMb3i+W83BvrzKcP5j cE/WyxxKChacnGUIrkXvjNCmqwqWvvPvdgppJiBJliwrXs65qBb9xjYeT+SonVNCxQGntj ZODM4OYdoObyLG2+/CnTMY51ckweuAirv+aMta88NxYQ8b13JqWrqU9WZXy4nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746545427; a=rsa-sha256; cv=none; b=SHf69R56/iansjq7Es51s9sd/2hdl52Iw2Ywla3GYh4C64d7OyvOcxx0uoBu1ZLH58CmWh FzyC2+tWTCK8ACgM39DbsO3wOzS6WVJT92oS1fhgFTPNCfY10VWhr97AMldjyisHlyZ0TL T8Fae9cfd3LYRPFfUxrSP+jyabp5XUMF7EXp4s3TmXxB0C0W+po8K9JOiJWSdGyEk9P36h loCp3a1ipYLo4VSmynLhopgc6F2tEUYFglfjhiHPz8oeT2mpPUr7fA0KVvOLhitZ1ArJ4l ATku2qVykiUIIsnufzziH4wEX7R974b7vx9gF1iAMevOQlniVeSZSa2bbEx4RA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (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: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZsMm301LjzrBc; Tue, 06 May 2025 15:30:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <99f7c9ac-441b-43bc-b574-3bbb9c265a32@FreeBSD.org> Date: Tue, 6 May 2025 10:30:25 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket To: Gleb Smirnoff , Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> <20250506150654.DEAF8300@slippy.cwsent.com> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/6/25 10:24, Gleb Smirnoff wrote: > On Tue, May 06, 2025 at 08:06:54AM -0700, Cy Schubert wrote: > C> Is anyone else experiencing rsync hangs with this? I'm noticing rsync hangs > C> with large files, like those in /usr/obj or a poudriere package repo. > C> > C> I haven't reverted this locally yet, just guessing ATM. > > Does rsync use unix(4) socket? What is the kernel stack of the sleeping > process? procstat -k $pid > rsync traditionally uses a SOCK_STREAM unix(4) socket constructed via socketpair(2). Thanks, Kyle Evans From nobody Tue May 6 15:44:46 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 4ZsN4g22myz5v0BX; Tue, 06 May 2025 15:44:51 +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 4ZsN4f6Zlsz3tHH; Tue, 06 May 2025 15:44:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id CJvnued995MqyCKTQuYa1k; Tue, 06 May 2025 15:44:48 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id CKTPuy3niJhBPCKTQudZzv; Tue, 06 May 2025 15:44:48 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=681a2e70 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=RRQzfFIVjkzHdlbPMDQA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id D4A959A3; Tue, 06 May 2025 08:44:46 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 917B818D; Tue, 06 May 2025 08:44:46 -0700 (PDT) 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: Gleb Smirnoff cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket In-reply-to: References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> <20250506150654.DEAF8300@slippy.cwsent.com> Comments: In-reply-to Gleb Smirnoff message dated "Tue, 06 May 2025 08:24:59 -0700." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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, 06 May 2025 08:44:46 -0700 Message-Id: <20250506154446.917B818D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfFQN2RS36cjcXGIk6u/gKa6EcXW+j/UeKbJAMwxCFThuIztJ1bvQia3kY0YAU8xGlMNz2Q5dpGdNyKFYbf+xWpN7JT0ADFxSs/jH0CN/J/G58YdpnF1s Xyi6M3G0rjfkENcU2O67UwMuH4L/dUPt8/g81WEghsfSp5KCqEsM15a99NOuQsfIPzcCYauSMXEMo1hDsZ3ORXIpZmKATB6/5XqmHgyB0Go/BpY2YJ+9PNdm 3U1DCwsEnVIscrwG4zcQKWRllz5E0uqOvY8Jlvf7jlKNix4rKm77ZaC8Ry9bBboQuNShFMDvPb4thMzD9FEofbAD5YdpN19wYnNOsWaMcOw= X-Rspamd-Queue-Id: 4ZsN4f6Zlsz3tHH X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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-Spamd-Bar: ---- In message , Gleb Smirnoff writes: > On Tue, May 06, 2025 at 08:06:54AM -0700, Cy Schubert wrote: > C> Is anyone else experiencing rsync hangs with this? I'm noticing rsync hang > s > C> with large files, like those in /usr/obj or a poudriere package repo. > C> > C> I haven't reverted this locally yet, just guessing ATM. > > Does rsync use unix(4) socket? What is the kernel stack of the sleeping > process? procstat -k $pid > > -- > Gleb Smirnoff On the sending machine: bob# procstat -k 50742 PID TID COMM TDNAME KSTACK 50742 103321 rsync - mi_switch sleepq_switch sleepq_catch_signals sleepq_timedwait_sig _cv_timedwait_sig_sbt kern_select sys_select amd64_syscall fast_syscall_common bob# bob# procstat -k 50743 PID TID COMM TDNAME KSTACK 50743 100644 rsh - mi_switch sleepq_switch sleepq_catch_signals sleepq_wait_sig _cv_wait_sig kern_select sys_select amd64_syscall fast_syscall_common bob# On the receiving machine: cwsys# procstat -k 46918 PID TID COMM TDNAME KSTACK 46918 100848 rsync - mi_switch sleepq_catch_signals sleepq_timedwait_sig _cv_timedwait_sig_sbt seltdwait kern_select sys_select amd64_syscall fast_syscall_common cwsys# procstat -k 46919 PID TID COMM TDNAME KSTACK 46919 100999 rsync - mi_switch sleepq_catch_signals sleepq_timedwait_sig _cv_timedwait_sig_sbt seltdwait kern_select sys_select amd64_syscall fast_syscall_common cwsys# It's proceeding but exceptionally slowly. The hangs occur at 0% and at some points during the transfer. Noticed using rsync --progress. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue May 6 15:51: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 4ZsNCr69gHz5v0xW; Tue, 06 May 2025 15:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsNCr5L2gz3vws; Tue, 06 May 2025 15:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746546664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EEA/Zyf1uiiRFR6gQc+O+Om1VcfM6baew84xNldvx1o=; b=Aw2PoLAvJT2Lluu5PhU4K1Urx2xBOElX2vRFlCsY7JTdnTkIpt2mN3O3/Xn105Y+BUdOdC MkELNJAEpmRXElVNsDR9lvAz4eo6XoVoR+FPW9fq48emSAuv5adUNNgHMX2Nmhsb25KrNP 4ckgRMNSGBmhKWv3IFQAvCvhAyXvUaQsKx3/R433z0JDLOQeg1vcnRnzo0k/c5Sl6/u5ks tB8kNjkKhyJ6l1l2+gE15F8sYRAX0Aen2EHY7V8ovfVpB7AkPTlAxLYnOKqlepmJUd2WSL onW9ntqYVyt/Us0sOvIyOmrx4fLxJhbaVXfliyDmUEOhkd/4YN/+qTotmlPtuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746546664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EEA/Zyf1uiiRFR6gQc+O+Om1VcfM6baew84xNldvx1o=; b=P4kiclhrQoS0+kbPO8/YGRf1FM9z8kjL/jrFBRTaP9E8LjilyA6BY5UHLmYoXlV3oVSa/y uR3qt0g0WEqHEw51N/2LFPD7coSDoiaLtSwWwUV+s3mvKVKHRvTaD8mgYwtXYZwdkdLnm0 2VaCQ5esqZSWx/twAYI0B+2ZKbrFBazFj+tuMvIXwaeg1CKjWqn6XhuMfxTUtVbDOB2oe1 g3YK4k0YKQgpg2IKjKphFbv/vjPBWRguIKZT87qpnl8h9IbdeqtN7mSpra3Hq2142AVgON xGWED2heKGY/bozq6lFXQXBSlwBt1oLqLPajeHExF+qgXneMSLYJxkEMIGTCSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746546664; a=rsa-sha256; cv=none; b=s6y50sEJMfAKH634xA8fh6Xd/ZKr6gvEmQ6nkKosxCKMXJ/wlkYVyltv7kmoiDAM0oVDEw J8Yze9XzYvKaMnHe4eDcUCw6alwXdlItas9iZGrLhdiYlUPoWffXYnfsE3bN98lnDFxDqj s5ckXsAgBtZZ076q6srQ3OlHYd8nRPCHsLP1JtO2VKZEXXQtwWY4fSVafOBsFkUoyzxtVZ ES4Srz7k4kQv/EHsPsqm/IXdJMbtj6PAJ+Xk5RRYvRp9UTz9xFZEJmLX6GOSmtORrA/bz/ muGlZ59ax8r1aot44nX8VBOUutyi1u8cDwQt/4ZDyZplA3/gT/9IcXjBtchoqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsNCr4v38z15Sj; Tue, 06 May 2025 15:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546Fp4S9029678; Tue, 6 May 2025 15:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546Fp4gt029675; Tue, 6 May 2025 15:51:04 GMT (envelope-from git) Date: Tue, 6 May 2025 15:51:04 GMT Message-Id: <202505061551.546Fp4gt029675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 1ec2c8b2f364 - main - stand: Enable Spleen 32x64 font in the bootloader List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 1ec2c8b2f364cc8294ba06d64a167bca4b1b6bbb Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=1ec2c8b2f364cc8294ba06d64a167bca4b1b6bbb commit 1ec2c8b2f364cc8294ba06d64a167bca4b1b6bbb Author: Alexander Ziaee AuthorDate: 2025-04-06 10:49:24 +0000 Commit: Alexander Ziaee CommitDate: 2025-05-06 15:50:28 +0000 stand: Enable Spleen 32x64 font in the bootloader Spleen 32x64 provides my 14" 2560x1600 display with the ancestral 80x25, BSD standard console. We already include it in contrib, and it is built for the runtime vt(4) font directory, but was previously unavailable to the bootloader. Enable it in the build, selectable in loader.conf with: screen.font="32x64" MFC after: 3 days Reviewed by: adrian, carlavilla, emaste, imp, mhorne, tsoome Approved by: imp, tsoome (loader) Approved by: mhorne (mentor) Differential Revision: https://reviews.freebsd.org/D49768 --- stand/fonts/INDEX.fonts | 3 +++ stand/fonts/Makefile | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/stand/fonts/INDEX.fonts b/stand/fonts/INDEX.fonts index fc035c6b2e4e..66a6d8a9a3f5 100644 --- a/stand/fonts/INDEX.fonts +++ b/stand/fonts/INDEX.fonts @@ -60,6 +60,9 @@ FONT:en:8x16v.fnt 16x32.fnt:en:Terminus BSD Console, size 32 16x32.fnt:da:Terminus BSD-konsol, størrelse 32 16x32.fnt:de:Terminus BSD Console, Größe 32 +32x64.fnt:en:Spleen BSD Console, size 64 +32x64.fnt:da:Spleen BSD-konsol, størrelse 64 +32x64.fnt:de:Spleen BSD Console, Größe 64 # (fset 'langnew # "\M-}\C-p\C-k\C-y\C-m\C-y\M-}") diff --git a/stand/fonts/Makefile b/stand/fonts/Makefile index 3ac1b0bac951..4840c07201d6 100644 --- a/stand/fonts/Makefile +++ b/stand/fonts/Makefile @@ -1,5 +1,6 @@ .include +.PATH: ${SRCTOP}/contrib/spleen .PATH: ${SRCTOP}/contrib/terminus FONTS= \ @@ -15,6 +16,7 @@ FONTS= \ 12x24.fnt.gz \ 14x28.fnt.gz \ 16x32.fnt.gz \ + 32x64.fnt.gz \ FILES= ${FONTS} INDEX.fonts FILESDIR= /boot/fonts @@ -45,6 +47,8 @@ CLEANFILES+= ${FONTS} ${FONTS:T:S/${COMPRESS_EXT}//g} ${COMPRESS_CMD} ${.ALLSRC} > ${.TARGET} 16x32.fnt.gz: 16x32.fnt ${COMPRESS_CMD} ${.ALLSRC} > ${.TARGET} +32x64.fnt.gz: 32x64.fnt + ${COMPRESS_CMD} ${.ALLSRC} > ${.TARGET} 6x12.fnt: ter-u12n.bdf ter-u12b.bdf vtfontcvt -o ${.TARGET} ${.ALLSRC} @@ -82,4 +86,7 @@ CLEANFILES+= ${FONTS} ${FONTS:T:S/${COMPRESS_EXT}//g} 16x32.fnt: ter-u32n.bdf ter-u32b.bdf vtfontcvt -o ${.TARGET} ${.ALLSRC} +32x64.fnt: spleen-32x64.bdf + vtfontcvt -o ${.TARGET} ${.ALLSRC} + .include From nobody Tue May 6 16:03: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 4ZsNTq2JV5z5v2LB; Tue, 06 May 2025 16:03: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsNTq1kZRz41WX; Tue, 06 May 2025 16:03:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746547391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hDRUOenBqw2MOyF5ho8KPNTgzZFh5yAqEMdaQFw4QwM=; b=QBJjVCfoYAutttURameCUl1Zrm10ufGLuTzTJye0hEpBhmsWAVgRzVrxT+huHx/QdFgtGV yRb1isL+5PMoDX9C5KQ4ewMSvB7NS1UCLj/osSLiL1ZkM4RnVgaF7K6JyD9VxqkKIaPR06 KtE6Knz3fnUCCddtyqWU0FKIae4W+e+wsFkMW0fNeWjh4+ohoqaEbD8N4Z7CG+iFJZgHpp pmFZJf5MIkKaKE49iFZAAkVeOHGmr1qnDme6BxYnRJjPyidlqGlG9xe4valAZ3E+ZxwGQX jM+UOxAAVmmJecVRFGccziGSn3vrOvgDSeG3jR6BHEHvVSQUlG+OGY3Ie/R/Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746547391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hDRUOenBqw2MOyF5ho8KPNTgzZFh5yAqEMdaQFw4QwM=; b=cVR2gH3F3L5RbfETiLWIl4kvhBUgShUkmvm+IRiGkFePesr3TcGaoWZ818xC2vzzJDfhOx Gb+H0IaZE1O/zvemAG5IEJ3m+F9ALseZuqksf8f0fjx/CSuBBZCTiKvedz4aigBjYiNi1u IyzgQAgupIDxOPZAKm5jQeWVoW5TSlby5GJX4Lej9vNgB+6RKKXe1m0Xd1j+ZofjQK7P7c 69R5WGhoqmJ5XjR0CpxFkTflBwYMgkE7X4BdEGI47K9OgrwjClz+OmE747x62l7seeowOS Ljf7FDESxEzENtGNgdXAtsxb4KD6F+9uSvpb9pd/2tyarNFFiPcXUTYPBkUmDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746547391; a=rsa-sha256; cv=none; b=LmgmN9int0R3MkzLvXvc5qyEoBwJdSu0YdVx1SFr9808NEFoLs3uesUW3IVhhA23KyIWPM 7HuBcGEYsTZz8nMgzfDhZq6JOvYJHazt3J7nrcQa39p/46XqdGDKIi8J+ZRIFqenW+avTI x/2zqCNhU/r+gkKh4aaCnQewX5EP7LKkDr4+klMDdCZb0gp1rZvvyR033dqwJ3pxpNHhE1 hfDC3/0MFuVp9cB90sw0Isj0dRP81pN7L2eyx2cmtn/buCepdDUYDA6wsiEn1qlmH9G9vw yqb9KehaSK5jPDgfe46MmfjVGva5NvzziQr08JYA814QAXSA3BM5DljH8nlhRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsNTq1Kxvz160T; Tue, 06 May 2025 16:03:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546G3BBw056108; Tue, 6 May 2025 16:03:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546G3BMo056105; Tue, 6 May 2025 16:03:11 GMT (envelope-from git) Date: Tue, 6 May 2025 16:03:11 GMT Message-Id: <202505061603.546G3BMo056105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: c8d56817b80f - main - vm_object: drop memq field List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8d56817b80f49c30e5bfe2cbff1dc2aed27096b Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=c8d56817b80f49c30e5bfe2cbff1dc2aed27096b commit c8d56817b80f49c30e5bfe2cbff1dc2aed27096b Author: Doug Moore AuthorDate: 2025-05-06 16:01:51 +0000 Commit: Doug Moore CommitDate: 2025-05-06 16:01:51 +0000 vm_object: drop memq field The memq field in vm_object is used to maintain a list of mapped pages, sorted by pindex. Remove that field, and stop maintaining the list. Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D48007 --- sys/vm/vm_object.c | 4 ---- sys/vm/vm_object.h | 1 - sys/vm/vm_page.c | 45 +++++++++------------------------------------ 3 files changed, 9 insertions(+), 41 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5f505f87de67..bf6867d4ffcc 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -181,8 +181,6 @@ vm_object_zdtor(void *mem, int size, void *arg) object = (vm_object_t)mem; KASSERT(object->ref_count == 0, ("object %p ref_count = %d", object, object->ref_count)); - KASSERT(TAILQ_EMPTY(&object->memq), - ("object %p has resident pages in its memq", object)); KASSERT(vm_radix_is_empty(&object->rtree), ("object %p has resident pages in its trie", object)); #if VM_NRESERVLEVEL > 0 @@ -236,7 +234,6 @@ _vm_object_allocate(objtype_t type, vm_pindex_t size, u_short flags, vm_object_t object, void *handle) { - TAILQ_INIT(&object->memq); LIST_INIT(&object->shadow_head); object->type = type; @@ -922,7 +919,6 @@ vm_object_terminate_pages(vm_object_t object) vm_radix_reclaim_callback(&object->rtree, vm_object_terminate_single_page, object); - TAILQ_INIT(&object->memq); object->resident_page_count = 0; if (object->type == OBJT_VNODE) vdrop(object->handle); diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 68cc41731b73..20e9fc1fcdcd 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -98,7 +98,6 @@ struct vm_object { TAILQ_ENTRY(vm_object) object_list; /* list of all objects */ LIST_HEAD(, vm_object) shadow_head; /* objects that this is a shadow for */ LIST_ENTRY(vm_object) shadow_list; /* chain of shadow objects */ - struct pglist memq; /* list of resident pages */ struct vm_radix rtree; /* root of the resident page radix trie*/ vm_pindex_t size; /* Object size */ struct domainset_ref domain; /* NUMA policy. */ diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index d254f08d4801..15d38dd436ae 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -171,8 +171,7 @@ static void vm_page_enqueue(vm_page_t m, uint8_t queue); static bool vm_page_free_prep(vm_page_t m); static void vm_page_free_toq(vm_page_t m); static void vm_page_init(void *dummy); -static void vm_page_insert_radixdone(vm_page_t m, vm_object_t object, - vm_page_t mpred); +static void vm_page_insert_radixdone(vm_page_t m, vm_object_t object); static void vm_page_mvqueue(vm_page_t m, const uint8_t queue, const uint16_t nflag); static int vm_page_reclaim_run(int req_class, int domain, u_long npages, @@ -1470,11 +1469,11 @@ vm_page_dirty_KBI(vm_page_t m) } /* - * Insert the given page into the given object at the given pindex. mpred is - * used for memq linkage. From vm_page_insert, iter is false, mpred is - * initially NULL, and this procedure looks it up. From vm_page_iter_insert, - * iter is true and mpred is known to the caller to be valid, and may be NULL if - * this will be the page with the lowest pindex. + * Insert the given page into the given object at the given pindex. From + * vm_page_insert, iter is false, mpred is initially NULL, and this procedure + * looks it up. From vm_page_iter_insert, iter is true and mpred is known to + * the caller to be valid, and may be NULL if this will be the page with the + * lowest pindex. * * The procedure is marked __always_inline to suggest to the compiler to * eliminate the lookup parameter and the associated alternate branch. @@ -1514,7 +1513,7 @@ vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, /* * Now link into the object's ordered list of backed pages. */ - vm_page_insert_radixdone(m, object, mpred); + vm_page_insert_radixdone(m, object); vm_pager_page_inserted(object, m); return (0); } @@ -1563,7 +1562,7 @@ vm_page_iter_insert(struct pctrie_iter *pages, vm_page_t m, vm_object_t object, * The object must be locked. */ static void -vm_page_insert_radixdone(vm_page_t m, vm_object_t object, vm_page_t mpred) +vm_page_insert_radixdone(vm_page_t m, vm_object_t object) { VM_OBJECT_ASSERT_WLOCKED(object); @@ -1571,24 +1570,6 @@ vm_page_insert_radixdone(vm_page_t m, vm_object_t object, vm_page_t mpred) ("vm_page_insert_radixdone: page %p has inconsistent object", m)); KASSERT((m->ref_count & VPRC_OBJREF) != 0, ("vm_page_insert_radixdone: page %p is missing object ref", m)); - if (mpred != NULL) { - KASSERT(mpred->object == object, - ("vm_page_insert_radixdone: object doesn't contain mpred")); - KASSERT(mpred->pindex < m->pindex, - ("vm_page_insert_radixdone: mpred doesn't precede pindex")); - KASSERT(TAILQ_NEXT(mpred, listq) == NULL || - m->pindex < TAILQ_NEXT(mpred, listq)->pindex, - ("vm_page_insert_radixdone: pindex doesn't precede msucc")); - } else { - KASSERT(TAILQ_EMPTY(&object->memq) || - m->pindex < TAILQ_FIRST(&object->memq)->pindex, - ("vm_page_insert_radixdone: no mpred but not first page")); - } - - if (mpred != NULL) - TAILQ_INSERT_AFTER(&object->memq, mpred, m, listq); - else - TAILQ_INSERT_HEAD(&object->memq, m, listq); /* * Show that the object has one more resident page. @@ -1636,11 +1617,6 @@ vm_page_remove_radixdone(vm_page_t m) vm_pager_page_removed(object, m); m->object = NULL; - /* - * Now remove from the object's list of backed pages. - */ - TAILQ_REMOVE(&object->memq, m, listq); - /* * And show that the object has one fewer resident page. */ @@ -1914,9 +1890,6 @@ vm_page_replace_hold(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex, (mnew->oflags & VPO_UNMANAGED), ("vm_page_replace: mismatched VPO_UNMANAGED")); - /* Keep the resident page list in sorted order. */ - TAILQ_INSERT_AFTER(&object->memq, mold, mnew, listq); - TAILQ_REMOVE(&object->memq, mold, listq); mold->object = NULL; /* @@ -1996,7 +1969,7 @@ vm_page_iter_rename(struct pctrie_iter *old_pages, vm_page_t m, m->pindex = new_pindex; m->object = new_object; - vm_page_insert_radixdone(m, new_object, mpred); + vm_page_insert_radixdone(m, new_object); if (vm_page_any_valid(m)) vm_page_dirty(m); vm_pager_page_inserted(new_object, m); From nobody Tue May 6 16:07: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 4ZsNZc5pphz5v2q0; Tue, 06 May 2025 16:07: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsNZc5Clxz42Q2; Tue, 06 May 2025 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746547640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=znBp1QBXTbeYFgOKIb/SGxf2X9VVTiM5Ao9X0b3valE=; b=JOuwVk7Lss/3OPJtgA90oJsh7DZhlRdaZMN6B8WnvqWqLDMRZBgZlDHECVNERMvITv45ou ITwW++po8YVSfEbX6Yv8REHqphuxmgGFkUjGW9lHQ5OUfQbvoQR+ml3SoNCm/kIdKQD7ty N8mJ/SH2lW0+ZLkbovSE24RrZPl7wJeNATwirJ7KIurRm4TSJWQ7wa/LsfE3O8aEmsng6u nA1R7fCTeMn1RUvClCUkPA/JPaHesLlBMdypBiGD/bJANybNnL/1diDlmbYNtsdG0bArZH 8AGJu2ABLqL5HgUXgn0zM9halYp8BvjeErx8rLqu0BJ7QpU5Y6Cv6GJuQ3HlxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746547640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=znBp1QBXTbeYFgOKIb/SGxf2X9VVTiM5Ao9X0b3valE=; b=PtMF+kZ/5UU+8I2BVhEqj7jKGY89DEuW/u+4S2sInLI+nIRb5Aww1EcarVA6Ecz+Jv7gZt a06oamqtHdmSPPnDPpWTpcbt6JL1+a3eNk1do+c9ra1qqPQVbXYr0r7EygR7BmvFTicoBM Pn9/VZzS6o8CIvGuGH03JNDN0dgM50/2It17qziWXh9HV/2ceOqaj6PSdXNkq8epFfjVx+ N4I5bW0LTc001YwHnlhIUWpk8Y4h7tJJ7jBXjYZaAZ6JstEcmHMEpqSGfvKey1kpRLfnTi GChyVMu3IW99lN2vTE313s690xcI48T/f6yfEnq2TwBcIAB2VmK1GV6cI4f/1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746547640; a=rsa-sha256; cv=none; b=PE1boloUeSBvHC9zE6uQMaYqWt8651NhjWv3z35hQQ11uqxGXPkM9dT1euRkIagn2r11yU FsW/z7hbvMSHk/1hzIQz/SkE4CCokoDyTJJSIgnuTOj3rLleh4bNVNvKbw3iQ/sYO10vfa /YGKaaWT6HNY1ZHXVtKPstPHDmTnzHax+jMlaYMJvoOObCyltPoaWbKrRlYCDApx0kBu/8 KeDij1q9N2xNzTxvt6lFU7XRNLmHnEOUQQty+7E+/WroUVPquqr3E7Ea+YxN6+Rl5ZNsMP 4kEBBapto0c/earTFP0EzGwN9qbzcuPuEZyXo+XZ1H4cQBxXsog90tjYrq77uQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsNZc4pBLz15Wg; Tue, 06 May 2025 16:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546G7Kij057632; Tue, 6 May 2025 16:07:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546G7KeE057629; Tue, 6 May 2025 16:07:20 GMT (envelope-from git) Date: Tue, 6 May 2025 16:07:20 GMT Message-Id: <202505061607.546G7KeE057629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 794e792121ba - main - vm_page: bump __FreeBSD_version for commit c8d56817b80 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 794e792121bab69243836f34d89c05346b859811 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=794e792121bab69243836f34d89c05346b859811 commit 794e792121bab69243836f34d89c05346b859811 Author: Doug Moore AuthorDate: 2025-05-06 16:04:32 +0000 Commit: Doug Moore CommitDate: 2025-05-06 16:04:32 +0000 vm_page: bump __FreeBSD_version for commit c8d56817b80 Commit c8d56817b80 changed the representation of vm_object structs, so modules that depend on it need to be recompiled. --- 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 6fdadd3d596c..f2dd148fcd84 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500040 +#define __FreeBSD_version 1500041 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Tue May 6 16:58: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 4ZsPjj6mcfz5v5sr; Tue, 06 May 2025 16:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsPjj5TF1z3WX3; Tue, 06 May 2025 16:58:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPaI2AjBcj4W7i9teGNKbxaU09cNfqG24VZDtGuksRY=; b=f0ZPw3rX3i7cy3kijvBOusUybYYlS1FWxsmrc7zJa9/pRCIMa26L1PaHDFpWOWt2M/z8Db f5gjZXdyPGo2zLsY9mfOJmP/IYpublbU+41OGqUjpe8hrXKm3B7HZKXxxWJit/fBC1LlxL cbdHRtzlZgpoOEl9tbxMJD2VQjiHH/4/jPddwWc4Q92jOeGe0i8h4x0FjY+s/hd+98+FDP 2IT2aJolYk6vJ4aE3KpDX7o3wHqVNGQ191e+CLkKvWe/2OMUTUj3+f/CyU9w7TDdVpMaHA EBosA1OGPAweMS5cTnVr+uAscBPvKUdKWzPvMtYLwzV8mzsB9v+1YBSrFa7XJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPaI2AjBcj4W7i9teGNKbxaU09cNfqG24VZDtGuksRY=; b=aeRFlKyNx9UnBJS/KDHgjIGXdvxQj/E57k9hJrpLvDt0IVqJsBfJibpT1pVdHN40iz37Vp ZXaaFHjzePRWzyt8g+uNC/SHIQevkBj3yri9Z0SQJowdQAYd4qz7LslCAP2E/JEvTnME40 d+zzWFl8D0UZgzX1+KGdziKm/Ppxq/EEN6A01Nxll0XKokdfDnt3c2wBuHCy8EOUYPot0f XOl6s1IXSXeMC1eslYE7HAeztFEwprBjOMb07/vSZEisZ5kPE7n/WmAm+75GAJejiSQBx7 Tm7XFyNFHclS340gWtsBcex3/xN38bxUY5beYLR7u8U35fGBBGE3hqctztMRMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746550713; a=rsa-sha256; cv=none; b=b+7iDBcXd9BtcovBABUZRZWBPiM5xrwvrN/KQvB8U+m0u00dB2pLrIXrJLKtix/N4BMSc1 PMCySm8c+CsMyHEEJ3N3U7JVCGBkrzU3E6D3qlNwXUTbwFxB7tLs65GmOd4KDK3p7eR5yF vsBvHrSTcXF8aN2xYgkJC72v8pTKpB93w1Cyi2dHN2WENtLEhiqi+7BBCKXA+fOK9ZLnQK lzigItaBiDrnj1pW5t7YdrAKXx0y8zYfBlgIGHxFtjO2Y642regAkAeZWszTBkWFll7ajf USCE6bMWeLHwYU6tJBsFSSS0qljrgndWupCJg8B9z/ZMozlvNpCc/VGdKagT6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsPjj52Bsz17Ry; Tue, 06 May 2025 16:58:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546GwXsS051620; Tue, 6 May 2025 16:58:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546GwXd4051617; Tue, 6 May 2025 16:58:33 GMT (envelope-from git) Date: Tue, 6 May 2025 16:58:33 GMT Message-Id: <202505061658.546GwXd4051617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: fb2e96562aeb - main - makefs: Fix a couple of HAVE_STRUCT_STAT_BIRTHTIME 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb2e96562aeb126b8c3e877a0ae13f61904ac4ec Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=fb2e96562aeb126b8c3e877a0ae13f61904ac4ec commit fb2e96562aeb126b8c3e877a0ae13f61904ac4ec Author: Jessica Clarke AuthorDate: 2025-05-06 16:58:09 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 16:58:09 +0000 makefs: Fix a couple of HAVE_STRUCT_STAT_BIRTHTIME checks These macros are meant to be 0/1 not undefined/1. Currently we don't actually have nbtool_config.h included for these files so these are always false, but that will change in a future commit and break building on Linux where they are defined to 0. Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D50077 --- usr.sbin/makefs/makefs.c | 2 +- usr.sbin/makefs/msdos/msdosfs_vnops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c index dbd8f3a4d39e..7646c1c0f6be 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -470,7 +470,7 @@ get_tstamp(const char *b, struct stat *st) } st->st_ino = 1; -#ifdef HAVE_STRUCT_STAT_BIRTHTIME +#if HAVE_STRUCT_STAT_BIRTHTIME st->st_birthtime = #endif st->st_mtime = st->st_ctime = st->st_atime = when; diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index ae1fa3f7bf75..e07f837187fb 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -97,7 +97,7 @@ msdosfs_times(struct denode *dep, const struct stat *st) if (stampst.st_ino) st = &stampst; -#ifdef HAVE_STRUCT_STAT_BIRTHTIME +#if HAVE_STRUCT_STAT_BIRTHTIME unix2fattime(&st->st_birthtim, &dep->de_CDate, &dep->de_CTime); #else unix2fattime(&st->st_ctim, &dep->de_CDate, &dep->de_CTime); From nobody Tue May 6 16:58: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 4ZsPjl5H45z5v5w2; Tue, 06 May 2025 16:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsPjk6JHRz3WdD; Tue, 06 May 2025 16:58:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juEfLfbRnPLy3QVVvrIsv86z90jTuq7TC7mgMUvsK3U=; b=HQ7BoUj1RTbD8aOhURIclcfyqRuw3FPoK5btIp8aWoVd4Uk/2LUn7vEyX+kyWqd/l+18fz xwqT0dhinP+8fYjTo+76DOiBxYr87nQfufA9LiWYkjDSoJ6+d23i5KRk9tCXxVHe8G2gNV /64X55G7Mg+gZpjBz0Z5782ZHxvK9ir8j0PVew9LVI6ic0zp1AmaPlpighOnjjwHAqhJtn 3Sq6fHyZMIaifK+N90RqUDlGw4qEkuB3HdFYRCqda4gzfcn61GZGcPv6QzoW2RXV1yg79r WXtq1XLjkq5cMuWkP+9Y4APfjCnz+I9OD9SKDbnZFQmR2pWYVSIwu3e9gJK8DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juEfLfbRnPLy3QVVvrIsv86z90jTuq7TC7mgMUvsK3U=; b=B+6XqUfsvxocW7A5CQHHN4QmcQoD8nOIf9TtatT92XDagxn2d/CTByTBM1pkr4znxfg5sT 6CtT0i31m/fmgTi5x65aV6bZH3WohhqCvxiMDNjC4BYqAMot9Ilgi47ZUZloWjem1o+CZV 3Rg2ZIfvY6Gv4ZDEyP7A1bCRhWOVxtqUeE/2i8CfIoJWDS+xDP/7dhTvkklAC3ce5n+H+s dzyqQnPfcv3pM5ZqOamkTnTk6b7xpWSx4kr8AIWqstXoHtXwdpx9MqY4pENKTDrP09rdJV wyyMkDrfaoDmfez+H+BhmJIv0B1FxJ1WlT9Xll5s8VqA925Isc6mpRFFg5StgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746550714; a=rsa-sha256; cv=none; b=XAM3A1Lgz9X/E27usXUXL4h7nz5/33Qa5SNNuh3xPLMQeN/UntRBKdHXp6aOlWC/N72ncy oFETXfiHSwlF+U78RWai3Q/o9KknPVa6e5soSzMIgfkdLuvfXO0T2bcaVq5DZtUGPRmCDE r+T04MNTWY527k2AxjV+kuIfsFVGQYE2ZBqApFfiqCUUkdCdMldoV2CHaPNB9WM4CbMBmU AbB4B7nlSysHvKqE5imUs4BTV5gK5D4OtGcls0bOu2sqJb1wmuTTVM/euWcnHlI3BA21Bg ErISXesO0n6rYMuu4moSHzAsXjmaxr6GDst5iSMhHlLFsqv9sgm9Ip/dmXc+Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsPjk5RQVz17V8; Tue, 06 May 2025 16:58:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546GwYxB051654; Tue, 6 May 2025 16:58:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546GwY4P051651; Tue, 6 May 2025 16:58:34 GMT (envelope-from git) Date: Tue, 6 May 2025 16:58:34 GMT Message-Id: <202505061658.546GwY4P051651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: c49043eacb14 - main - makefs: Support st_flags even on Linux List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c49043eacb14c951b0675eb4d37b81d4b02b949f Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c49043eacb14c951b0675eb4d37b81d4b02b949f commit c49043eacb14c951b0675eb4d37b81d4b02b949f Author: Jessica Clarke AuthorDate: 2025-05-06 16:58:09 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 16:58:09 +0000 makefs: Support st_flags even on Linux Linux's struct stat does not have an st_flags member, but we still want to be able to create FreeBSD disk images with non-zero st_flags. Add a replacement member to struct fsinode to store it on Linux. Note that we add a fallback definition of HAVE_STRUCT_STAT_ST_FLAGS for makefs.h since etdump reaches into makefs and won't have it defined in its CFLAGS like makefs itself does, and on FreeBSD we don't provide an nbtool_config.h. Note also that strtofflags is currently a stub on Linux so this doesn't yet properly mirror the mtree, but that will change in a future commit. Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D50078 --- usr.sbin/makefs/ffs.c | 8 ++------ usr.sbin/makefs/makefs.h | 15 +++++++++++++++ usr.sbin/makefs/mtree.c | 6 ++---- usr.sbin/makefs/walk.c | 6 ++---- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index aa5574c5201f..34a0f8a67497 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -685,9 +685,7 @@ ffs_build_dinode1(struct ufs1_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, dinp->di_mode = cur->inode->st.st_mode; dinp->di_nlink = cur->inode->nlink; dinp->di_size = cur->inode->st.st_size; -#if HAVE_STRUCT_STAT_ST_FLAGS - dinp->di_flags = cur->inode->st.st_flags; -#endif + dinp->di_flags = FSINODE_ST_FLAGS(*cur->inode); dinp->di_gen = random(); dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; @@ -733,9 +731,7 @@ ffs_build_dinode2(struct ufs2_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, dinp->di_mode = cur->inode->st.st_mode; dinp->di_nlink = cur->inode->nlink; dinp->di_size = cur->inode->st.st_size; -#if HAVE_STRUCT_STAT_ST_FLAGS - dinp->di_flags = cur->inode->st.st_flags; -#endif + dinp->di_flags = FSINODE_ST_FLAGS(*cur->inode); dinp->di_gen = random(); dinp->di_uid = cur->inode->st.st_uid; dinp->di_gid = cur->inode->st.st_gid; diff --git a/usr.sbin/makefs/makefs.h b/usr.sbin/makefs/makefs.h index db0addc4bc94..62c7e430a00c 100644 --- a/usr.sbin/makefs/makefs.h +++ b/usr.sbin/makefs/makefs.h @@ -40,6 +40,12 @@ #ifndef _MAKEFS_H #define _MAKEFS_H +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#else +#define HAVE_STRUCT_STAT_ST_FLAGS 1 +#endif + #include #include @@ -85,8 +91,17 @@ typedef struct { enum fi_flags flags; /* flags used by fs specific code */ void *param; /* for use by individual fs impls */ struct stat st; /* stat entry */ +#if !HAVE_STRUCT_STAT_ST_FLAGS + uint32_t st_flags; /* stand-in for st.st_flags */ +#endif } fsinode; +#if HAVE_STRUCT_STAT_ST_FLAGS +#define FSINODE_ST_FLAGS(inode) (inode).st.st_flags +#else +#define FSINODE_ST_FLAGS(inode) (inode).st_flags +#endif + typedef struct _fsnode { struct _fsnode *parent; /* parent (NULL if root) */ struct _fsnode *child; /* child (if type == S_IFDIR) */ diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index fddc32b85322..83e207b07402 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -533,13 +533,11 @@ read_mtree_keywords(FILE *fp, fsnode *node) break; } flset = flclr = 0; -#if HAVE_STRUCT_STAT_ST_FLAGS if (!strtofflags(&value, &flset, &flclr)) { - st->st_flags &= ~flclr; - st->st_flags |= flset; + FSINODE_ST_FLAGS(*node->inode) &= ~flclr; + FSINODE_ST_FLAGS(*node->inode) |= flset; } else error = errno; -#endif } else error = ENOSYS; break; diff --git a/usr.sbin/makefs/walk.c b/usr.sbin/makefs/walk.c index fe1fe8df80db..b2afa9e78094 100644 --- a/usr.sbin/makefs/walk.c +++ b/usr.sbin/makefs/walk.c @@ -530,14 +530,12 @@ apply_specentry(const char *dir, NODE *specnode, fsnode *dirnode) dirnode->inode->st.st_uid, specnode->st_uid); dirnode->inode->st.st_uid = specnode->st_uid; } -#if HAVE_STRUCT_STAT_ST_FLAGS if (specnode->flags & F_FLAGS) { ASEPRINT("flags", "%#lX", - (unsigned long)dirnode->inode->st.st_flags, + (unsigned long)FSINODE_ST_FLAGS(*dirnode->inode), (unsigned long)specnode->st_flags); - dirnode->inode->st.st_flags = specnode->st_flags; + FSINODE_ST_FLAGS(*dirnode->inode) = specnode->st_flags; } -#endif /* if (specnode->flags & F_DEV) { ASEPRINT("rdev", "%#llx", (unsigned long long)dirnode->inode->st.st_rdev, From nobody Tue May 6 16:58: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 4ZsPjm2Wxlz5v5QQ; Tue, 06 May 2025 16:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsPjm06Zhz3Wg5; Tue, 06 May 2025 16:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ute5JsZfEpMBP15Ver/4zghh1AdaouHP881PSPqa1TE=; b=RPIjRc5MY+LzqY6r7UM3mC/Z7f6C6FA/T23qS6TFjf8kXITqNJcTCcyPY/0N/dNkiINT8q Nzgr9vIAEW2ErUZ53ZfRa+Ntwq758urgohjRuX1WPdEeAri5Ah/EmXsJ8srEnb9fG9Xz3q Edr8wEYKPMLS3jpLwmKgdKBx0lj4cnIRYF6J9360ZzAi77I8qDPhSSZXmjivKYyC5ojn6P Sg5HPhZT/gzQrEQ7JOcFgYAiteFcEpAU9syrMKb6yjmGatLQtH76AJxnBFf/QsBQfheBQ3 yMXTHhwOOYbCmG5UIgwY2BYcNB2b7BccKO5zoRqI1KPhO1sc6uOqMlx2SC+R4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ute5JsZfEpMBP15Ver/4zghh1AdaouHP881PSPqa1TE=; b=qbtpZEW6qyayq4VlQIZlU4lA+AphXDSRLE3L+yRXuDGkFSgqnLpnQepK/D82m8pcwIEDdI hNJVphH0ll0ahuLanY+ZN3e/C/uz2daPbPzTSeSoRWDyiKueG5mqvz1kA1kQ3bCeeK/4uq gA7iEDwwCka25KA9zD54efUwN73zMGeEKj0rjPtJ7irDqT6bXotCyYlGHAShXzx2s5r/sH 0hzV7xWz+c1GDWUtiLMV1bgIQl2w5s7Y/jWj4stMajBRYuneoKKbNKFUfWY8PeRJ/UZ25X CSaGdScAUR4QjHQGKuj/pODmv/9oBPO6gaDDrC3rysMbAEwN1YjkNytBjMvjeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746550716; a=rsa-sha256; cv=none; b=K/Xnc0xbuKt+JdE1ILguKXnCWIGV8eSlajJk0LdbJy+70WT33Xac6Ah/GqqPCSmmGbslIM 4hSxoyrcIIutVkIXxeolA8YFGvEEeUkMxwFZT+5nU42nWyPebVd+rKbUg+MopBlCs2Uf2V lBwBzV94uVAdyRKKH9ECeOPNXtQxH8YBAXX+09SrxaS7h/H3wj4k590daC7WYUbOpj2Iam i2bT3fR2jI8p1EAqXqusRRxOKH0XzQyxUeNkpcEpnbENXNncbabNX+j/ob6nuJiSQYhBlO UzI8yTpg2P0reWyH7NPWIGHhpabiyw1PfnDwc8Eemzo1Js3zE4vP6NG0MKM9QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsPjl6fgLz17Pm; Tue, 06 May 2025 16:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546GwZjx051691; Tue, 6 May 2025 16:58:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546GwZSk051688; Tue, 6 May 2025 16:58:35 GMT (envelope-from git) Date: Tue, 6 May 2025 16:58:35 GMT Message-Id: <202505061658.546GwZSk051688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 54072047da3d - main - xinstall: Don't use UF_SETTABLE to infer whether st_flags is present List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54072047da3d0b737e22b107ba1f8f1fec9bb8a6 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=54072047da3d0b737e22b107ba1f8f1fec9bb8a6 commit 54072047da3d0b737e22b107ba1f8f1fec9bb8a6 Author: Jessica Clarke AuthorDate: 2025-05-06 16:58:10 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 16:58:10 +0000 xinstall: Don't use UF_SETTABLE to infer whether st_flags is present A future commit will add definitions of these for use in bootstrap tools on Linux, but struct stat will still be the host's that lacks st_flags. Switch this to just check for Linux instead, matching nbtool_config.h. Reviewed by: emaste, markj, imp Differential Revision: https://reviews.freebsd.org/D50079 --- usr.bin/xinstall/xinstall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 02b3eeccf8a7..28b546bc80c2 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -81,7 +81,7 @@ * non-FreeBSD system. Linux does not have the st_flags and st_birthtime * members in struct stat so we need to omit support for changing those fields. */ -#ifdef UF_SETTABLE +#ifndef __linux__ #define HAVE_STRUCT_STAT_ST_FLAGS 1 #else #define HAVE_STRUCT_STAT_ST_FLAGS 0 From nobody Tue May 6 16:58: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 4ZsPjn56yYz5v5nj; Tue, 06 May 2025 16:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsPjn10kSz3Wg8; Tue, 06 May 2025 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A2a8Kl5OXzqMojcSkb5vHb9w2FShvC/sVmcOsohw4iI=; b=q6sD9pSZ+UUeT4PuSdbgHfrM78OfkJxbC7S3Ryyu48HGwMRV3RKkVE99iVQSidjOaU/NBV ut3OOV6X0bc/SNoCTBvyrKFA6bIfnMGB7qBEftEo5LpSbYzGx5ytxnKwTaWeiFlcermwmU ZgVsOa2YM/+E1ZR15jNtIJ3LsENsbvWJSwGBX252NnuP9rxpa3aPvOh6Gp8B+xjtA+9JBY PkcMe4EMuZq6rmq+p17y5tBJGBxoUAAtfsXsyKvCTDU2iEBu9py0gionXxXDfIJLL1V/db +FlbZk/q8FPLAG2Si4UFaLOf6HWzgURd/HuZ3/crl3JnAH5v6OrZnaO8Z+5clw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746550717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A2a8Kl5OXzqMojcSkb5vHb9w2FShvC/sVmcOsohw4iI=; b=MeLIGr+N4npTm/ND9Adr+tkEEoM9oSXk8N20BYMDGw9nQvShj8jh9afwddc8oS972LbNSf T0w152M/stRGvYO7zNF59tQMwb5v61IFfJZ3+VU5Nhjk8+WYjPNOZkQL4QEVHjaSG37e0i IMjRpe9Z76ZUkm74YHsB2nJ4Rh3dnWc/RZZIPTCcy49h7FpiVKBmU4ks+qBvB2nxnzuXpe UFhpepiSdjq3iFKqxkxGSArRdaiykfFw7YSdaW00W4Eupzw9iBCV2VRmvld8RZZD6R72pn MHiXWhlusCJfVghu9EW2ir2B6S9wcHb7qdoR8IQOdfUvYXpabxub80sbFI10xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746550717; a=rsa-sha256; cv=none; b=WvPYeUt/eEsnaaRrpEOQO/+EJ6g7hc88ApmR9uX0TcYTQKgJPkbTYHqY5KVafDxjxBRHoI K59TsXD3IHpvBa41ENL8Fgs/MW3igqqtjIhXKq4v8+EjFn7NFGq+GfzZi5O6Z9P528nKTA K1qOgYnjSFQUw+W42J5i7TzYXe8oE2QvcmEC3lAVSGBRLieU81e4eWYAlsCk2Rbu3nWrsw vkNerBm247HL06kvA0w+oUGhdaIzQXB8sAZvmPRYnOA//zqLF9eEvg2RbQ2E9IE5OWOanH TFWyGT9JLVFuRvH5ORS2fuwJLzjdOUzcn+NJhVDwJzMqoqhxCejTL0bVqpLIXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsPjn0WHpz17Pn; Tue, 06 May 2025 16:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546GwacY051732; Tue, 6 May 2025 16:58:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546GwawW051729; Tue, 6 May 2025 16:58:36 GMT (envelope-from git) Date: Tue, 6 May 2025 16:58:36 GMT Message-Id: <202505061658.546GwawW051729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 52c8e24cc03b - main - cross-build: Provide real fflagstostr/strtofflags on Linux List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52c8e24cc03b6a109f678a3a72ef5c88cb45cc07 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=52c8e24cc03b6a109f678a3a72ef5c88cb45cc07 commit 52c8e24cc03b6a109f678a3a72ef5c88cb45cc07 Author: Jessica Clarke AuthorDate: 2025-05-06 16:58:10 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 16:58:10 +0000 cross-build: Provide real fflagstostr/strtofflags on Linux These are used by mtree and makefs, so in order to be able to set schg on /var/empty in METALOG and set schg on various files and directories in the resulting disk images we need to have a real implementation rather than always giving no flags. Ideally mtree wouldn't rely on round-tripping the textual flags field via the "native" flags encoding using these functions, and ideally makefs wouldn't rely on the "native" flags encoding matching FreeBSD's, but in practice macOS's schg is the same and we can pretend Linux has the same. This fixes Linux-produced disk images lacking schg on any files or directories, and Linux-produced distribution tarballs lacking schg on /var/empty (note though that they do set schg on files, as install already preserves file flags on Linux). Reviewed by: emaste, markj Differential Revision: https://reviews.freebsd.org/D50080 --- tools/build/Makefile | 7 ++- tools/build/cross-build/fflags.c | 62 ------------------------ tools/build/cross-build/include/linux/sys/stat.h | 20 ++++++++ 3 files changed, 25 insertions(+), 64 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index f4bb383693a8..a9f4a84e6f7c 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -212,8 +212,11 @@ CFLAGS.closefrom.c+= -DSTDC_HEADERS -DHAVE_SYS_DIR_H -DHAVE_DIRENT_H \ -DHAVE_DIRFD -DHAVE_SYSCONF # Provide getprogname/setprograme SRCS+= progname.c -# Stub implementations of fflagstostr/strtofflags -SRCS+= fflags.c +# Provide fflagstostr/strtofflags for mtree and makefs +# On macOS we use the host's so conflate host and target flags, which ideally +# we'd avoid, but in practice these align for many flags, including +# SF_IMMUTABLE, the only flag we currently set during install. +SRCS+= strtofflags.c # macOS has a standalone cross-build implementation, but Linux can use the same # ELF one as FreeBSD diff --git a/tools/build/cross-build/fflags.c b/tools/build/cross-build/fflags.c deleted file mode 100644 index f1d23c3637b6..000000000000 --- a/tools/build/cross-build/fflags.c +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright 2018-2020 Alex Richardson - * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory (Department of Computer Science and - * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the - * DARPA SSITH research programme. - * - * 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. - * - * This work was supported by Innovate UK project 105694, "Digital Security by - * Design (DSbD) Technology Platform Prototype". - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include - -char * -fflagstostr(u_long flags __unused) -{ - return strdup(""); -} - -int -strtofflags(char **stringp __unused, u_long *setp, u_long *clrp) -{ - /* On linux just ignore the file flags for now */ - /* - * XXX: this will prevent makefs from setting noschg on libc, etc. - * so we should really find a way to support flags in disk images. - */ - if (setp) - *setp = 0; - if (clrp) - *clrp = 0; - return (0); /* success */ -} diff --git a/tools/build/cross-build/include/linux/sys/stat.h b/tools/build/cross-build/include/linux/sys/stat.h index 5937920ce461..1a69e127c2e1 100644 --- a/tools/build/cross-build/include/linux/sys/stat.h +++ b/tools/build/cross-build/include/linux/sys/stat.h @@ -66,5 +66,25 @@ #define ALLPERMS (S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG | S_IRWXO) #endif +#define UF_SETTABLE 0x0000ffff +#define UF_NODUMP 0x00000001 +#define UF_IMMUTABLE 0x00000002 +#define UF_APPEND 0x00000004 +#define UF_OPAQUE 0x00000008 +#define UF_NOUNLINK 0x00000010 +#define UF_SYSTEM 0x00000080 +#define UF_SPARSE 0x00000100 +#define UF_OFFLINE 0x00000200 +#define UF_REPARSE 0x00000400 +#define UF_ARCHIVE 0x00000800 +#define UF_READONLY 0x00001000 +#define UF_HIDDEN 0x00008000 +#define SF_SETTABLE 0xffff0000 +#define SF_ARCHIVED 0x00010000 +#define SF_IMMUTABLE 0x00020000 +#define SF_APPEND 0x00040000 +#define SF_NOUNLINK 0x00100000 +#define SF_SNAPSHOT 0x00200000 + /* This include is needed for OpenZFS bootstrap */ #include From nobody Tue May 6 17:08: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 4ZsPwj6Mf8z5v73K; Tue, 06 May 2025 17:08:05 +0000 (UTC) (envelope-from avg@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsPwj5g0fz3cZ4; Tue, 06 May 2025 17:08:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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=hKVpeUR11KbddAoeyjle9hSr3xU1Dl1+D1jrs4pGDKs=; b=ncCQDp8ra90amsKknuys0GMAaNOxGnqnMlouM3oUdRpTGK9emir4LbpyppPHICj+yy6etH 44qcvFC5OUv496UkP2yjw3cbk9DVOKC1+zR6C3qAQms8PHMjy9LwYuEZ3AhVzDaILorw2V PihKD2K5kRV3pk9dqFUaaTib6mkh9s5WrF/cOr4hrJvgLUAOPDQs6mD6bJ9sN7g0A8RBs8 P8aERafbYgN9kpIRhrWb+eHa5qIq7IXW40rio0OaPMEUSN8xv0nqOVo4RCr2g1/1cREHaD IMsDUx1/4VnqixflIFmN2dfXBMWmzba2ipdG+spNiOIXN/ZhLkrv6IQ9JtUf2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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=hKVpeUR11KbddAoeyjle9hSr3xU1Dl1+D1jrs4pGDKs=; b=I9EUj2gP254gwl5ru3ZuM92PwX/zq4+vIJLezVsbqcRrANO97vOqVyumOmPzEaC3crKzmH RmfT3G+mD4wdXtG8FLpEPakWG6OBHoDh9XeWMYi2qbA3vUafNOPlFHPpGeA1Wpj5AfH+my n1IuoarlfuIP+EoklPaRg7xY72yiNIT1VvqPIn1YCtoyTbusoAyc5Ka7Hgn02nRBkglowD oP11O65zv4TkP5CRLClbUhLrTWmHBUzVv3Iu5nx4/0I4j69EtAX+yVgHbbNqjIh+QgUOfg Ss5SN9Q6d56FoaP4bYe79StBPaCyxgZrglkVuXBAauq8FXgdX9Si6W8+Be9zNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551285; a=rsa-sha256; cv=none; b=s46GkgmisU0h8QIIYOF/J8+dF8IYv8ZT9Zwq4K3JqrO0VXXRxdvOk8OtJbQWeM+k9Z2cAT PH4Nml43ouS17HSdHiobib5bDp2fmXyk55n0rMGshJ9eN+CmEPBvsnuQeWT7Awj17FCOLN S3CbAq8H8hE7X+1Iu1G3AJzqkFKtaVvb1maLbfsEXq7xq1RQOSvVuOXps7U7UyrKRewPvA TCMYGpnBsRnKvAUS91J+/ggNuGkEohl0Ru+0aW378bgu13lOc0mZ7Iu1KM9ek3Tdw6bgBY 5iD21xZDypojusIMRrsp73ByaHXX8QTwYAbNN//0WnNOq3yP81rcIzSFP05IUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.0.88] (unknown [93.188.39.137]) (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: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZsPwj0vwfztfn; Tue, 06 May 2025 17:08:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <499cb68d-1052-44a3-bd91-1be3e91af3c2@FreeBSD.org> Date: Tue, 6 May 2025 20:08:01 +0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: c8d56817b80f - main - vm_object: drop memq field To: Doug Moore , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202505061603.546G3BMo056105@gitrepo.freebsd.org> Content-Language: en-US From: Andriy Gapon Autocrypt: addr=avg@FreeBSD.org; keydata= xsDNBGcKrHEBDADRvwQOK0b/yo4ys5cs6bOQMhEh4xtfbaZ/CU00cpPgUip3sOZCdrtMWlRC g25z97prxE9pKueZi+HXDhIPpa9xl14ghqF4oYScuJ1i18HyiOH2y5Q3Vv/TtFiSzicd3EAu QgS3jVidpgDSPDdj2Yz3UxYpZ+PuFl6nOnvCvqOFcjUlzKCyPaiN2b86l1Nscmhnc+zQ/faB erUOEFEDQbWMA5YfXi8HrbeR16hfRfGt7E0aMDlIj9FIPIq71UWMN9CimPgs4+rbNr1MAlLa z4GxSDhVYZEY5rqtCzr+PLXboRQWnaUwXl0/biw9enf17NHdYv1SNAFTX2eC4dZ3qBVI74dS PgNprm+PMfz+6Hhs/dAv+Nan5nVhg3EFIjYTiy0MnjMSq8uI0v0ykpAGAcJJ5xl6d23aLxgN 6f0z6pJRCO0hGPgU7UzvFD0MxJxmbzqdT1R51KDan1oD41b+tjl2LMBuCDCoB0U44Pu0zLdp xMfFTxCXtwIYKIUxwd28jwMAEQEAAc0eQW5kcml5IEdhcG9uIDxhdmdARnJlZUJTRC5vcmc+ wsENBBMBCAA3FiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHEFCQeEzgACGwMECwkIBwUV CAkKCwUWAgMBAAAKCRDMM63k0uPru5tSDACFK15LLbq89RSQ6QMnjiIm1t/wYJyumb519MHu Dhzxx1lbr8oghf0RHtF6kYRLQPaW2VdToi74pRobd3CN4bhZKDLSL6WfTn17RfavDjL6Njwp KBo30CkOeYKWq1mDmo0xEoQj8cc7ybEZnus+YScZOpj8Ti4EFwhRt6SHer7YDb161IHKL8m4 MsCxpFSGEjbKj8Iul3Ri/fTOO8w14ivcuEEQIvJt4/+4YV5Az8G23wKzL/3aJ7SOT3oYGmR9 atBTmVO3DlODjM+rZLegd8SfLSPTcBTHspWE5duemIzZbEX3BP77r3Qx4Fo5Tkit3bG1XVar yPQato+sFGFEGifdE9USBQoAoOaaeZevwAWjDU0TIuCT0CUe0sKtQuNP4LRq0n9EEHOXBu9a CfdMhFUSkAZnuE7miSVwgPvoVNJ1stA37EXLN/sVsWik7wslTQ5vF81VpdGFiwoQPOe2XEKh ogcwGSnXbwv1gD4x+Gz/7Y+kFyr1NY+4/nSaeXVcS2fOwM0EZwqscgEMAMQTe6ypAmQe/TFO HqKD2hfFKdksTptKi6uEh8xIwct8G/0FBldDWXo9eu8CGr/ZrDg0/bAwJxbaLRQCMH19Gq2Y hLvZ1QK5GQJVzZKcqfxbF2LiDUTs6WkdOBIhGpdDy7p1xFrvqCGCtNFYHuGYm067EozibBSF BWAPstKu2FQuVHZNMOfs7p3OIz3Yfqu9woXDeg3/8G2qVQJINe+8EwXKlhgh4CyDbq7nAZoA kIu1SE9z9u3WI5mcNy/0dFmVUsFxBqRC3ewbvzie8tKyZ9yFOlaZPT0Y4nRBXQTI3mLZ8zQ8 mtrWK5OOmrJ02kdeO9RBXe+OMaUUWMf92ZIoBFb4HP6N+B+4N1y1OwULousfl7JRoYxA4MRL ls7E2sSoJvrEBTJB3Pc34xu8rsJ1A5V3NgN6djX8yEZYpTRkcmrBeWy/ofDqZPVqneAx0LRm eldDS9msXDW4KXODyPZ+9unvmHAcoH0xaBYaSH44CDZDQDg4LNcmbOvuu1TEXBJhjQARAQAB wsD8BBgBCAAmFiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHMFCQeEzgACGwwACgkQzDOt 5NLj67sUCAv5AXqgWnYN9EblapMbZjkiqL8pZQ0GNqh+Pg9FwbyULxjtRTO6rD4D0IxizByb ef+neeUNyYlagt5nfKMysEr0SU/gHKCi8vyTF/63ukMrGUNGmJJxrndl5ZYKC6j6eX7twrZF L1Uvlmn6FnQ22red5kHO93fDjG4zaDIZvHfwj7kzjZ4tpC7Byinf88s14mdZeScc0PnU2hj4 UGYju/wg2FF4YxaZYhcmdTiRYY0Wx85XSMZv19pnn78sadEuRvfRd4JTmw++j1xGXeqQGWzz /CTG5/Ex9GAkQ02hZbmi236byDXoet4G8TEyOph9QFVkV9bNd0jQZaFZPGEj4PSPUYGAF7s5 xJaNGgctC3aZ7WjEv1FBoo44XCU4xcjJ1wZQUrHxRhx6TW0Jtcl0U9qfKFW30TSPo6RyiXuj X4ltWKAtjoXB8nUmEJckaz7IRu2b4pXDeazZuz5JBygUs10yJjDxh2vFQZo0KaBAPx9MZlPn gpPTjT15L8xGftEjQXF6 In-Reply-To: <202505061603.546G3BMo056105@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 06/05/2025 19:03, Doug Moore wrote: > The branch main has been updated by dougm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c8d56817b80f49c30e5bfe2cbff1dc2aed27096b > > commit c8d56817b80f49c30e5bfe2cbff1dc2aed27096b > Author: Doug Moore > AuthorDate: 2025-05-06 16:01:51 +0000 > Commit: Doug Moore > CommitDate: 2025-05-06 16:01:51 +0000 > > vm_object: drop memq field > > The memq field in vm_object is used to maintain a list of mapped > pages, sorted by pindex. Remove that field, and stop maintaining the > list. > > Reviewed by: alc, kib, markj It would have been useful to provide a little bit of context / history. Why we needed memq (or why we had it if we didn't need it). And why it has become disused. -- Andriy Gapon From nobody Tue May 6 17:12: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 4ZsQ1d4Rw8z5v6yG; Tue, 06 May 2025 17:12: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ1d4DTPz3fNc; Tue, 06 May 2025 17:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hvAKXnq3aw+iUWVZUf6kl5ICIG++tB7ov5S4uPcekZ4=; b=rnLlYTgTm7VgVJeUlDV8v8O/KwO5V99KixmXRggd0NoY8nEP5W7mB+Xgf697NFe9om4Ubm AIoCSIvyxDw6dIMBcUCyU2PatLjJXbRIop3zFPjD0TI/BfOVxrcgltLjpHZPfZNq6nz3M9 Bz+dLCTn5SaICLTSZNc7e3GufSezzRaS5slwVyMF/aYyN4RSg7J2EIUN9VC7mFoOau0lN1 kOlp0eVDP79zHjlCfVZmh4gZzr0jSAHxondADJHuk6R/2ZPWFgwFn0mUIVzou9Y3VcgBqk VzNDJotEMdIIvkno4bQgYPkCyN3o+g87dIf9kMmr2+C6zuw3Ud37xov9pzAd5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hvAKXnq3aw+iUWVZUf6kl5ICIG++tB7ov5S4uPcekZ4=; b=wiau80XU1e1haGfFbtTZN9Qi+kKs74b1PRVCuTK42VYy69qy0qb9kaP0sn6qUPLYbqhraq 1BUv2tNdXZC99Xk0mj41yns4HKSp/tCErZhe+NGRWknlAHOwSE/nuT9WsRL1jER0bOl+G6 Yr8Tz/QSxoWOeghHWgczlJXlFrHdZ6AC28+gNW6UU10u5/qCunefS2uXdXfhVrDDeEmWt1 yhWSSRivbbg6s2ZB2wmmBmKM/LU5heYWrEnL9om9bXeOOawFGXDejnnEez94KUBpFutkqX gRtfwIGBdugPtBc8j3QJ78mBPBlttSyMOt2r+vBqZwqJR2G1vUADwaB40u6RQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551541; a=rsa-sha256; cv=none; b=fleo/9UdPqoEObBk/N96xOBfbQlmcJr7ncz+BOGHi4tjlPgg9kYqC1BX45XLmzlnN1hVDX VVs8PCj4aQINZdqMdElTsyclAfm33gQGRjleVrAE3wClRugPWP2G67CovQvImgaShHWJZi 9gMfqM9cu/QwypEoG7UQSibNBXoV0rHfiwZLzBF+hC9r6AtI9amcbcqsClmgFu6kGE/fwS lP7abq/BWConvStVMNSFg9orKqYK5rZ/77gZ8crec76st1iG7vkxhsaCCKx1Q0jcgHm0WW M7TZ2XZ9JaGPQ6wlyr4dfquje5B0vDiGb4e4N9S9tHVQ8Y81SNUV0fXJAb7kcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsQ1d3mRGz17lR; Tue, 06 May 2025 17:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546HCLqL088292; Tue, 6 May 2025 17:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546HCLPr088289; Tue, 6 May 2025 17:12:21 GMT (envelope-from git) Date: Tue, 6 May 2025 17:12:21 GMT Message-Id: <202505061712.546HCLPr088289@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 82fc0d09e862 - main - cp: Partly restore symlink folllowing. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 82fc0d09e86255f42ae79fb48fc8cb3820b5ccd9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=82fc0d09e86255f42ae79fb48fc8cb3820b5ccd9 commit 82fc0d09e86255f42ae79fb48fc8cb3820b5ccd9 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-06 17:11:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-06 17:11:44 +0000 cp: Partly restore symlink folllowing. * As a general rule, follow symbolic links in the destination as long as the target is within the destination hierarchy. * As a special case, allow the destination itself to be a symbolic link, and even a dead one (in which case we create the target). * The file-to-file case remains unrestricted. Currently, if a symlink we aren't allowed to follow is encountered, cp will behave just like it would if the file was not writable. We should consider whether it would be better to replace the offending link instead. Fixes: 0729d1e8fd90 MFC after: never Relnotes: yes Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50093 --- bin/cp/cp.c | 391 ++++++++++++++++++++++++++---------------------- bin/cp/extern.h | 31 ++-- bin/cp/tests/cp_test.sh | 169 +++++++++++++++++++++ bin/cp/utils.c | 260 +++++++++++++------------------- 4 files changed, 512 insertions(+), 339 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 2b9c7531e4ca..62cc2abc3654 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -53,9 +53,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -63,15 +65,10 @@ #include "extern.h" -#define STRIP_TRAILING_SLASH(p) { \ - while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ - *--(p).p_end = 0; \ -} - -static char emptystring[] = ""; - -PATH_T to = { to.p_path, emptystring, "" }; +static char dot[] = "."; +#define END(buf) (buf + sizeof(buf)) +PATH_T to = { .dir = -1, .end = to.path }; int Nflag, fflag, iflag, lflag, nflag, pflag, sflag, vflag; static int Hflag, Lflag, Pflag, Rflag, rflag; volatile sig_atomic_t info; @@ -86,8 +83,9 @@ main(int argc, char *argv[]) { struct stat to_stat, tmp_stat; enum op type; - int ch, fts_options, r, have_trailing_slash; - char *target; + int ch, fts_options, r; + char *sep, *target; + bool have_trailing_slash = false; fts_options = FTS_NOCHDIR | FTS_PHYSICAL; while ((ch = getopt(argc, argv, "HLPRafilNnprsvx")) != -1) @@ -177,17 +175,16 @@ main(int argc, char *argv[]) /* Save the target base in "to". */ target = argv[--argc]; - if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path)) - errx(1, "%s: name too long", target); - to.p_end = to.p_path + strlen(to.p_path); - if (to.p_path == to.p_end) { - *to.p_end++ = '.'; - *to.p_end = 0; + if (*target == '\0') { + target = dot; + } else if ((sep = strrchr(target, '/')) != NULL && sep[1] == '\0') { + have_trailing_slash = true; + while (sep > target + 1 && *(sep - 1) == '/') + sep--; + *sep = '\0'; } - have_trailing_slash = (to.p_end[-1] == '/'); - if (have_trailing_slash) - STRIP_TRAILING_SLASH(to); - to.target_end = to.p_end; + if (strlcpy(to.base, target, sizeof(to.base)) >= sizeof(to.base)) + errc(1, ENAMETOOLONG, "%s", target); /* Set end of argument list for fts(3). */ argv[argc] = NULL; @@ -206,15 +203,15 @@ main(int argc, char *argv[]) * * In (2), the real target is not directory, but "directory/source". */ - r = stat(to.p_path, &to_stat); + r = stat(to.base, &to_stat); if (r == -1 && errno != ENOENT) - err(1, "%s", to.p_path); + err(1, "%s", target); if (r == -1 || !S_ISDIR(to_stat.st_mode)) { /* * Case (1). Target is not a directory. */ if (argc > 1) - errc(1, ENOTDIR, "%s", to.p_path); + errc(1, ENOTDIR, "%s", target); /* * Need to detect the case: @@ -238,9 +235,9 @@ main(int argc, char *argv[]) if (have_trailing_slash && type == FILE_TO_FILE) { if (r == -1) - errc(1, ENOENT, "%s", to.p_path); + errc(1, ENOENT, "%s", target); else - errc(1, ENOTDIR, "%s", to.p_path); + errc(1, ENOTDIR, "%s", target); } } else { /* @@ -264,13 +261,14 @@ static int copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) { char rootname[NAME_MAX]; - struct stat created_root_stat, to_stat; + struct stat created_root_stat, to_stat, *curr_stat; FTS *ftsp; FTSENT *curr; - int base = 0, dne, badcp, rval; - size_t nlen; - char *p, *recurse_path, *target_mid; + char *recpath = NULL; + int atflags, dne, badcp, len, rval; mode_t mask, mode; + bool beneath = type != FILE_TO_FILE; + bool skipdp = false; /* * Keep an inverted copy of the umask, for use in correcting @@ -279,10 +277,22 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) mask = ~umask(0777); umask(~mask); - recurse_path = NULL; + if (type == FILE_TO_FILE) { + to.dir = AT_FDCWD; + to.end = to.path + strlcpy(to.path, to.base, sizeof(to.path)); + strcpy(to.base, dot); + } else if (type == FILE_TO_DIR) { + to.dir = open(to.base, O_DIRECTORY | O_SEARCH); + if (to.dir < 0) + err(1, "%s", to.base); + } + if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL) err(1, "fts_open"); - for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { + for (badcp = rval = 0; + (curr = fts_read(ftsp)) != NULL; + badcp = 0, *to.end = '\0') { + curr_stat = curr->fts_statp; switch (curr->fts_info) { case FTS_NS: case FTS_DNR: @@ -294,119 +304,116 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) warnx("%s: directory causes a cycle", curr->fts_path); badcp = rval = 1; continue; - default: - ; - } - - /* - * Stash the root basename off for detecting recursion later. - * - * This will be essential if the root is a symlink and we're - * rolling with -L or -H. The later bits will need this bit in - * particular. - */ - if (curr->fts_level == FTS_ROOTLEVEL) { - strlcpy(rootname, curr->fts_name, sizeof(rootname)); - } - - /* - * If we are in case (2) or (3) above, we need to append the - * source name to the target name. - */ - if (type != FILE_TO_FILE) { + case FTS_D: /* - * Need to remember the roots of traversals to create - * correct pathnames. If there's a directory being - * copied to a non-existent directory, e.g. - * cp -R a/dir noexist - * the resulting path name should be noexist/foo, not - * noexist/dir/foo (where foo is a file in dir), which - * is the case where the target exists. - * - * Also, check for "..". This is for correct path - * concatenation for paths ending in "..", e.g. - * cp -R .. /tmp - * Paths ending in ".." are changed to ".". This is - * tricky, but seems the easiest way to fix the problem. + * Stash the root basename off for detecting + * recursion later. * - * XXX - * Since the first level MUST be FTS_ROOTLEVEL, base - * is always initialized. + * This will be essential if the root is a symlink + * and we're rolling with -L or -H. The later + * bits will need this bit in particular. */ if (curr->fts_level == FTS_ROOTLEVEL) { - if (type != DIR_TO_DNE) { - p = strrchr(curr->fts_path, '/'); - base = (p == NULL) ? 0 : - (int)(p - curr->fts_path + 1); - - if (strcmp(curr->fts_path + base, "..") - == 0) - base += 1; - } else - base = curr->fts_pathlen; - } - - p = &curr->fts_path[base]; - nlen = curr->fts_pathlen - base; - target_mid = to.target_end; - if (*p != '/' && target_mid[-1] != '/') - *target_mid++ = '/'; - *target_mid = 0; - if (target_mid - to.p_path + nlen >= PATH_MAX) { - warnx("%s%s: name too long (not copied)", - to.p_path, p); - badcp = rval = 1; - continue; + strlcpy(rootname, curr->fts_name, + sizeof(rootname)); } - (void)strncat(target_mid, p, nlen); - to.p_end = target_mid + nlen; - *to.p_end = 0; - STRIP_TRAILING_SLASH(to); - /* - * We're on the verge of recursing on ourselves. Either - * we need to stop right here (we knowingly just created - * it), or we will in an immediate descendant. Record - * the path of the immediate descendant to make our - * lives a little less complicated looking. + * If we FTS_SKIP while handling FTS_D, we will + * immediately get FTS_DP for the same directory. + * If this happens before we've appended the name + * to to.path, we need to remember not to perform + * the reverse operation. */ - if (curr->fts_info == FTS_D && root_stat != NULL && - root_stat->st_dev == curr->fts_statp->st_dev && - root_stat->st_ino == curr->fts_statp->st_ino) { - assert(recurse_path == NULL); - - if (root_stat == &created_root_stat) { - /* - * This directory didn't exist when we - * started, we created it as part of - * traversal. Stop right here before we - * do something silly. - */ + skipdp = true; + /* we must have a destination! */ + if (type == DIR_TO_DNE && + curr->fts_level == FTS_ROOTLEVEL) { + assert(to.dir < 0); + assert(root_stat == NULL); + mode = curr_stat->st_mode | S_IRWXU; + if (mkdir(to.base, mode) != 0) { + warn("%s", to.base); + (void)fts_set(ftsp, curr, FTS_SKIP); + badcp = rval = 1; + continue; + } + to.dir = open(to.base, O_DIRECTORY | O_SEARCH); + if (to.dir < 0) { + warn("%s", to.base); + (void)rmdir(to.base); + (void)fts_set(ftsp, curr, FTS_SKIP); + badcp = rval = 1; + continue; + } + if (fstat(to.dir, &created_root_stat) != 0) { + warn("%s", to.base); + (void)close(to.dir); + (void)rmdir(to.base); + (void)fts_set(ftsp, curr, FTS_SKIP); + to.dir = -1; + badcp = rval = 1; + continue; + } + root_stat = &created_root_stat; + } else { + /* entering a directory; append its name to to.path */ + len = snprintf(to.end, END(to.path) - to.end, "%s%s", + to.end > to.path ? "/" : "", curr->fts_name); + if (to.end + len >= END(to.path)) { + *to.end = '\0'; + warnc(ENAMETOOLONG, "%s/%s%s%s", to.base, + to.path, to.end > to.path ? "/" : "", + curr->fts_name); fts_set(ftsp, curr, FTS_SKIP); + badcp = rval = 1; continue; } - - if (asprintf(&recurse_path, "%s/%s", to.p_path, - rootname) == -1) - err(1, "asprintf"); + to.end += len; } - - if (recurse_path != NULL && - strcmp(to.p_path, recurse_path) == 0) { + skipdp = false; + /* + * We're on the verge of recursing on ourselves. + * Either we need to stop right here (we knowingly + * just created it), or we will in an immediate + * descendant. Record the path of the immediate + * descendant to make our lives a little less + * complicated looking. + */ + if (type != FILE_TO_FILE && + root_stat->st_dev == curr_stat->st_dev && + root_stat->st_ino == curr_stat->st_ino) { + assert(recpath == NULL); + if (root_stat == &created_root_stat) { + /* + * This directory didn't exist + * when we started, we created it + * as part of traversal. Stop + * right here before we do + * something silly. + */ + (void)fts_set(ftsp, curr, FTS_SKIP); + continue; + } + if (asprintf(&recpath, "%s/%s", to.path, + rootname) < 0) { + warnc(ENOMEM, NULL); + (void)fts_set(ftsp, curr, FTS_SKIP); + badcp = rval = 1; + continue; + } + } + if (recpath != NULL && + strcmp(recpath, to.path) == 0) { fts_set(ftsp, curr, FTS_SKIP); continue; } - } - - if (curr->fts_info == FTS_DP) { + break; + case FTS_DP: /* * We are nearly finished with this directory. If we * didn't actually copy it, or otherwise don't need to * change its attributes, then we are done. - */ - if (!curr->fts_number) - continue; - /* + * * If -p is in effect, set all the attributes. * Otherwise, set the correct permissions, limited * by the umask. Optimise by avoiding a chmod() @@ -415,41 +422,86 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) * honour setuid, setgid and sticky bits, but we * normally want to preserve them on directories. */ - if (pflag) { - if (setfile(curr->fts_statp, -1)) + if (curr->fts_number && pflag) { + int fd = *to.path ? -1 : to.dir; + if (setfile(curr_stat, fd, true)) + rval = 1; + if (preserve_dir_acls(curr->fts_accpath, + to.path) != 0) rval = 1; - if (preserve_dir_acls(curr->fts_statp, - curr->fts_accpath, to.p_path) != 0) + } else if (curr->fts_number) { + const char *path = *to.path ? to.path : dot; + mode = curr_stat->st_mode; + if (((mode & (S_ISUID | S_ISGID | S_ISTXT)) || + ((mode | S_IRWXU) & mask) != (mode & mask)) && + fchmodat(to.dir, path, mode & mask, 0) != 0) { + warn("chmod: %s/%s", to.base, to.path); rval = 1; + } + } + /* are we leaving a directory we failed to enter? */ + if (skipdp) + continue; + /* leaving a directory; remove its name from to.path */ + if (type == DIR_TO_DNE && + curr->fts_level == FTS_ROOTLEVEL) { + /* this is actually our created root */ } else { - mode = curr->fts_statp->st_mode; - if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) || - ((mode | S_IRWXU) & mask) != (mode & mask)) - if (chmod(to.p_path, mode & mask) != - 0) { - warn("chmod: %s", to.p_path); - rval = 1; - } + while (to.end > to.path && *to.end != '/') + to.end--; + assert(strcmp(to.end + (*to.end == '/'), curr->fts_name) == 0); + *to.end = '\0'; } continue; + default: + /* something else: append its name to to.path */ + if (type == FILE_TO_FILE) + break; + len = snprintf(to.end, END(to.path) - to.end, "%s%s", + to.end > to.path ? "/" : "", curr->fts_name); + if (to.end + len >= END(to.path)) { + *to.end = '\0'; + warnc(ENAMETOOLONG, "%s/%s%s%s", to.base, + to.path, to.end > to.path ? "/" : "", + curr->fts_name); + badcp = rval = 1; + continue; + } + /* intentionally do not update to.end */ + break; + } + + /* Not an error but need to remember it happened. */ + if (to.path[0] == '\0') { + /* + * This can happen in two cases: + * - DIR_TO_DNE; we created the directory and + * populated root_stat earlier. + * - FILE_TO_DIR if a source has a trailing slash; + * the caller populated root_stat. + */ + dne = false; + to_stat = *root_stat; + } else { + atflags = beneath ? AT_RESOLVE_BENEATH : 0; + if (curr->fts_info == FTS_D || curr->fts_info == FTS_SL) + atflags |= AT_SYMLINK_NOFOLLOW; + dne = fstatat(to.dir, to.path, &to_stat, atflags) != 0; } /* Check if source and destination are identical. */ - if (stat(to.p_path, &to_stat) == 0 && - to_stat.st_dev == curr->fts_statp->st_dev && - to_stat.st_ino == curr->fts_statp->st_ino) { - warnx("%s and %s are identical (not copied).", - to.p_path, curr->fts_path); + if (!dne && + to_stat.st_dev == curr_stat->st_dev && + to_stat.st_ino == curr_stat->st_ino) { + warnx("%s/%s and %s are identical (not copied).", + to.base, to.path, curr->fts_path); badcp = rval = 1; - if (S_ISDIR(curr->fts_statp->st_mode)) + if (S_ISDIR(curr_stat->st_mode)) (void)fts_set(ftsp, curr, FTS_SKIP); continue; } - /* Not an error but need to remember it happened. */ - dne = lstat(to.p_path, &to_stat) != 0; - - switch (curr->fts_statp->st_mode & S_IFMT) { + switch (curr_stat->st_mode & S_IFMT) { case S_IFLNK: if ((fts_options & FTS_LOGICAL) || ((fts_options & FTS_COMFOLLOW) && @@ -460,11 +512,11 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) * nonexistent or inaccessible. Let * copy_file() deal with the error. */ - if (copy_file(curr, dne)) + if (copy_file(curr, dne, beneath)) badcp = rval = 1; } else { /* Copy the link. */ - if (copy_link(curr, !dne)) + if (copy_link(curr, dne, beneath)) badcp = rval = 1; } break; @@ -485,31 +537,15 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) * umask blocks owner writes, we fail. */ if (dne) { - mode = curr->fts_statp->st_mode | S_IRWXU; - if (mkdir(to.p_path, mode) != 0) { - warn("%s", to.p_path); - (void)fts_set(ftsp, curr, FTS_SKIP); - badcp = rval = 1; - break; - } - /* - * First DNE with a NULL root_stat is the root - * path, so set root_stat. We can't really - * tell in all cases if the target path is - * within the src path, so we just stat() the - * first directory we created and use that. - */ - if (root_stat == NULL && - stat(to.p_path, &created_root_stat) != 0) { - warn("%s", to.p_path); + mode = curr_stat->st_mode | S_IRWXU; + if (mkdirat(to.dir, to.path, mode) != 0) { + warn("%s/%s", to.base, to.path); (void)fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; break; } - if (root_stat == NULL) - root_stat = &created_root_stat; } else if (!S_ISDIR(to_stat.st_mode)) { - warnc(ENOTDIR, "%s", to.p_path); + warnc(ENOTDIR, "%s/%s", to.base, to.path); (void)fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; break; @@ -524,10 +560,10 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) case S_IFBLK: case S_IFCHR: if (Rflag && !sflag) { - if (copy_special(curr->fts_statp, !dne)) + if (copy_special(curr_stat, dne, beneath)) badcp = rval = 1; } else { - if (copy_file(curr, dne)) + if (copy_file(curr, dne, beneath)) badcp = rval = 1; } break; @@ -537,25 +573,26 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) break; case S_IFIFO: if (Rflag && !sflag) { - if (copy_fifo(curr->fts_statp, !dne)) + if (copy_fifo(curr_stat, dne, beneath)) badcp = rval = 1; } else { - if (copy_file(curr, dne)) + if (copy_file(curr, dne, beneath)) badcp = rval = 1; } break; default: - if (copy_file(curr, dne)) + if (copy_file(curr, dne, beneath)) badcp = rval = 1; break; } if (vflag && !badcp) - (void)printf("%s -> %s\n", curr->fts_path, to.p_path); + (void)printf("%s -> %s/%s\n", curr->fts_path, to.base, to.path); } if (errno) err(1, "fts_read"); fts_close(ftsp); - free(recurse_path); + close(to.dir); + free(recpath); return (rval); } diff --git a/bin/cp/extern.h b/bin/cp/extern.h index 272454bb5871..5a18f91ef13c 100644 --- a/bin/cp/extern.h +++ b/bin/cp/extern.h @@ -30,9 +30,10 @@ */ typedef struct { - char *p_end; /* pointer to NULL at end of path */ - char *target_end; /* pointer to end of target base */ - char p_path[PATH_MAX]; /* pointer to the start of a path */ + int dir; /* base directory handle */ + char *end; /* pointer to NUL at end of path */ + char base[PATH_MAX]; /* base directory path */ + char path[PATH_MAX]; /* target path */ } PATH_T; extern PATH_T to; @@ -40,12 +41,24 @@ extern int Nflag, fflag, iflag, lflag, nflag, pflag, sflag, vflag; extern volatile sig_atomic_t info; __BEGIN_DECLS -int copy_fifo(struct stat *, int); -int copy_file(const FTSENT *, int); -int copy_link(const FTSENT *, int); -int copy_special(struct stat *, int); -int setfile(struct stat *, int); -int preserve_dir_acls(struct stat *, char *, char *); +int copy_fifo(struct stat *, bool, bool); +int copy_file(const FTSENT *, bool, bool); +int copy_link(const FTSENT *, bool, bool); +int copy_special(struct stat *, bool, bool); +int setfile(struct stat *, int, bool); +int preserve_dir_acls(const char *, const char *); int preserve_fd_acls(int, int); void usage(void) __dead2; __END_DECLS + +/* + * The FreeBSD and Darwin kernels return ENOTCAPABLE when a path lookup + * violates a RESOLVE_BENEATH constraint. This results in confusing error + * messages, so translate it to the more widely recognized EACCES. + */ +#ifdef ENOTCAPABLE +#define warn(...) \ + warnc(errno == ENOTCAPABLE ? EACCES : errno, __VA_ARGS__) +#define err(rv, ...) \ + errc(rv, errno == ENOTCAPABLE ? EACCES : errno, __VA_ARGS__) +#endif diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index 5c581e06ab8e..6644588f1ce8 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -179,6 +179,52 @@ matching_srctgt_nonexistent_body() atf_check -e not-empty -s not-exit:0 stat foo/dne/foo } +atf_test_case pflag_acls +pflag_acls_body() +{ + mkdir dir + echo "hello" >dir/file + if ! setfacl -m g:staff:D::allow dir || + ! setfacl -m g:staff:d::allow dir/file ; then + atf_skip "file system does not support ACLs" + fi + atf_check cp -p dir/file dst + atf_check -o match:"group:staff:-+d-+" getfacl dst + rm dst + mkdir dst + atf_check cp -rp dir dst + atf_check -o not-match:"group:staff:-+D-+" getfacl dst + atf_check -o match:"group:staff:-+D-+" getfacl dst/dir + atf_check -o match:"group:staff:-+d-+" getfacl dst/dir/file + rm -rf dst + atf_check cp -rp dir dst + atf_check -o match:"group:staff:-+D-+" getfacl dst/ + atf_check -o match:"group:staff:-+d-+" getfacl dst/file +} + +atf_test_case pflag_flags +pflag_flags_body() +{ + mkdir dir + echo "hello" >dir/file + if ! chflags nodump dir || + ! chflags nodump dir/file ; then + atf_skip "file system does not support flags" + fi + atf_check cp -p dir/file dst + atf_check -o match:"nodump" stat -f%Sf dst + rm dst + mkdir dst + atf_check cp -rp dir dst + atf_check -o not-match:"nodump" stat -f%Sf dst + atf_check -o match:"nodump" stat -f%Sf dst/dir + atf_check -o match:"nodump" stat -f%Sf dst/dir/file + rm -rf dst + atf_check cp -rp dir dst + atf_check -o match:"nodump" stat -f%Sf dst + atf_check -o match:"nodump" stat -f%Sf dst/file +} + recursive_link_setup() { extra_cpflag=$1 @@ -392,6 +438,120 @@ overwrite_directory_body() cp -r bar foo } +atf_test_case to_dir_dne +to_dir_dne_body() +{ + mkdir dir + echo "foo" >dir/foo + atf_check cp -r dir dne + atf_check test -d dne + atf_check test -f dne/foo + atf_check cmp dir/foo dne/foo +} + +atf_test_case to_nondir +to_nondir_body() +{ + echo "foo" >foo + echo "bar" >bar + echo "baz" >baz + # This is described as “case 1” in source code comments + atf_check cp foo bar + atf_check cmp -s foo bar + # This is “case 2”, the target must be a directory + atf_check -s not-exit:0 -e match:"Not a directory" \ + cp foo bar baz +} + +atf_test_case to_deadlink +to_deadlink_body() +{ + echo "foo" >foo + ln -s bar baz + atf_check cp foo baz + atf_check cmp -s foo bar +} + +atf_test_case to_deadlink_append +to_deadlink_append_body() +{ + echo "foo" >foo + mkdir bar + ln -s baz bar/foo + atf_check cp foo bar + atf_check cmp -s foo bar/foo + rm -f bar/foo + atf_check cp foo bar/ + atf_check cmp -s foo bar/foo +} + +atf_test_case to_dirlink +to_dirlink_body() +{ + mkdir src dir + echo "foo" >src/file + ln -s dir dst + atf_check cp -r src dst + atf_check cmp -s src/file dir/src/file + rm -r dir/* + atf_check cp -r src dst/ + atf_check cmp -s src/file dir/src/file + rm -r dir/* + # If the source is a directory and ends in a slash, our cp has + # traditionally copied the contents of the source rather than + # the source itself. It is unclear whether this is intended + # or simply a consequence of how FTS handles the situation. + # Notably, GNU cp does not behave in this manner. + atf_check cp -r src/ dst + atf_check cmp -s src/file dir/file + rm -r dir/* + atf_check cp -r src/ dst/ + atf_check cmp -s src/file dir/file + rm -r dir/* +} + +atf_test_case to_deaddirlink +to_deaddirlink_body() +{ + mkdir src + echo "foo" >src/file + ln -s dir dst + # It is unclear which error we should expect in these cases. + # Our current implementation always reports ENOTDIR, but one + # might be equally justified in expecting EEXIST or ENOENT. + # GNU cp reports EEXIST when the destination is given with a + # trailing slash and “cannot overwrite non-directory with + # directory” otherwise. + atf_check -s not-exit:0 -e ignore \ + cp -r src dst + atf_check -s not-exit:0 -e ignore \ + cp -r src dst/ + atf_check -s not-exit:0 -e ignore \ + cp -r src/ dst + atf_check -s not-exit:0 -e ignore \ + cp -r src/ dst/ + atf_check -s not-exit:0 -e ignore \ + cp -R src dst + atf_check -s not-exit:0 -e ignore \ + cp -R src dst/ + atf_check -s not-exit:0 -e ignore \ + cp -R src/ dst + atf_check -s not-exit:0 -e ignore \ + cp -R src/ dst/ +} + +atf_test_case to_link_outside +to_link_outside_body() +{ + mkdir dir dst dst/dir + echo "foo" >dir/file + ln -s ../../file dst/dir/file + atf_check \ + -s exit:1 \ + -e match:"dst/dir/file: Permission denied" \ + cp -r dir dst +} + atf_init_test_cases() { atf_add_test_case basic @@ -404,6 +564,8 @@ atf_init_test_cases() atf_add_test_case matching_srctgt_contained atf_add_test_case matching_srctgt_link atf_add_test_case matching_srctgt_nonexistent + atf_add_test_case pflag_acls + atf_add_test_case pflag_flags atf_add_test_case recursive_link_dflt atf_add_test_case recursive_link_Hflag atf_add_test_case recursive_link_Lflag @@ -419,4 +581,11 @@ atf_init_test_cases() atf_add_test_case symlink_exists_force atf_add_test_case directory_to_symlink atf_add_test_case overwrite_directory + atf_add_test_case to_dir_dne + atf_add_test_case to_nondir + atf_add_test_case to_deadlink + atf_add_test_case to_deadlink_append + atf_add_test_case to_dirlink + atf_add_test_case to_deaddirlink + atf_add_test_case to_link_outside } diff --git a/bin/cp/utils.c b/bin/cp/utils.c index cfbb2022caaf..a849899af7ee 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -98,7 +99,7 @@ copy_fallback(int from_fd, int to_fd) } int -copy_file(const FTSENT *entp, int dne) +copy_file(const FTSENT *entp, bool dne, bool beneath) { struct stat sb, *fs; ssize_t wcount; @@ -142,12 +143,13 @@ copy_file(const FTSENT *entp, int dne) if (!dne) { if (nflag) { if (vflag) - printf("%s not overwritten\n", to.p_path); + printf("%s/%s not overwritten\n", + to.base, to.path); rval = 1; goto done; } else if (iflag) { - (void)fprintf(stderr, "overwrite %s? %s", - to.p_path, YESNO); + (void)fprintf(stderr, "overwrite %s/%s? %s", + to.base, to.path, YESNO); checkch = ch = getchar(); while (ch != '\n' && ch != EOF) ch = getchar(); @@ -160,7 +162,8 @@ copy_file(const FTSENT *entp, int dne) if (fflag) { /* remove existing destination file */ - (void)unlink(to.p_path); + (void)unlinkat(to.dir, to.path, + beneath ? AT_RESOLVE_BENEATH : 0); dne = 1; } } @@ -168,16 +171,16 @@ copy_file(const FTSENT *entp, int dne) rval = 0; if (lflag) { - if (link(entp->fts_path, to.p_path) != 0) { - warn("%s", to.p_path); + if (linkat(AT_FDCWD, entp->fts_path, to.dir, to.path, 0) != 0) { + warn("%s/%s", to.base, to.path); rval = 1; } goto done; } if (sflag) { - if (symlink(entp->fts_path, to.p_path) != 0) { - warn("%s", to.p_path); + if (symlinkat(entp->fts_path, to.dir, to.path) != 0) { + warn("%s/%s", to.base, to.path); rval = 1; } goto done; @@ -185,14 +188,17 @@ copy_file(const FTSENT *entp, int dne) if (!dne) { /* overwrite existing destination file */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + to_fd = openat(to.dir, to.path, + O_WRONLY | O_TRUNC | (beneath ? O_RESOLVE_BENEATH : 0), 0); } else { /* create new destination file */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + to_fd = openat(to.dir, to.path, + O_WRONLY | O_TRUNC | O_CREAT | + (beneath ? O_RESOLVE_BENEATH : 0), fs->st_mode & ~(S_ISUID | S_ISGID)); } if (to_fd == -1) { - warn("%s", to.p_path); + warn("%s/%s", to.base, to.path); rval = 1; goto done; } @@ -214,8 +220,8 @@ copy_file(const FTSENT *entp, int dne) if (info) { info = 0; (void)fprintf(stderr, - "%s -> %s %3d%%\n", - entp->fts_path, to.p_path, + "%s -> %s/%s %3d%%\n", + entp->fts_path, to.base, to.path, cp_pct(wtotal, fs->st_size)); } } while (wcount > 0); @@ -230,12 +236,12 @@ copy_file(const FTSENT *entp, int dne) * or its contents might be irreplaceable. It would only be safe * to remove it if we created it and its length is 0. */ - if (pflag && setfile(fs, to_fd)) + if (pflag && setfile(fs, to_fd, beneath)) rval = 1; if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) rval = 1; if (close(to_fd)) { - warn("%s", to.p_path); + warn("%s/%s", to.base, to.path); rval = 1; } @@ -246,14 +252,15 @@ done: } int -copy_link(const FTSENT *p, int exists) +copy_link(const FTSENT *p, bool dne, bool beneath) { ssize_t len; + int atflags = beneath ? AT_RESOLVE_BENEATH : 0; char llink[PATH_MAX]; - if (exists && nflag) { + if (!dne && nflag) { if (vflag) - printf("%s not overwritten\n", to.p_path); + printf("%s/%s not overwritten\n", to.base, to.path); return (1); } if ((len = readlink(p->fts_path, llink, sizeof(llink) - 1)) == -1) { @@ -261,81 +268,86 @@ copy_link(const FTSENT *p, int exists) return (1); *** 335 LINES SKIPPED *** From nobody Tue May 6 17:14: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 4ZsQ3b0MB7z5v74Y; Tue, 06 May 2025 17:14:03 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ3Z6HSwz3g15; Tue, 06 May 2025 17:14:02 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551642; 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=1rNKFxBol3Pk2OT4aRPN2TDPh/b4gEjTRHpVNBQUsqw=; b=Qj6Og/SVi2YVVEsFVr4EuDtdGAmKuRzoKy7dGm5t97oHE++BMxcXoibE/oPP86XG4cUviV b2DIVJMJvYg3HnbGD6mxFUer1Z+wyJUJULJTOh7156if/lc0zjnkn8alZPJZamlTqzoF63 J9sP5K3zBLf6tCEA9/O/EVq4Tmri7HyvmkdZV5Qqd4f8yd0krxEC+nqGl5oN39tEN/CYhf 3P7etIssj3pfIIsKZWCPBodt+Z7OkH5+ZYx1CE7f6xRwp+ye4nYjzJz06e41RObDCjaohR W9BVCOYtSgLMTbukX7GfHwISES3g1uf2YZYNzjVTYo0GDrJs2ucqyvBeWKDlpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551642; 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=1rNKFxBol3Pk2OT4aRPN2TDPh/b4gEjTRHpVNBQUsqw=; b=dcZv01qU0DV3W9CdxQdAmMFOVHrs6TjAWbndaj2ulkbVZ67+yHXfNuNadgPraYrLyjBaA+ JFF7fOKpRjMNiVsvO07G5wNVYxMpJsqbl+K4ENPgzeAhfx5HCHPGEJB9HWVXZ/2wuCRHhf magEOjSeH16r5daD8DrlbbLT77k07s7UpMbTjbzDHTIed/OZVC8EaAEsQCMkQ0e3LHLjQw 2lDSHNBTwAP+36HS0QfqmlJNbEeY8PX0VylqeH29pyzE65n4yCqmnh5ERkSLlNIZSlNyHn FgYw+z0YQh7slyfne+pZs34P3ItbFZQdmIyXEz3tYnuQv7O6VmjgyUTyYf0f1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551642; a=rsa-sha256; cv=none; b=NTTv0Zab4Yk2X+3HnTHfdA/OsVsNr8sevF+H5gqVlNqV51aSulyYu/obRX2axs1cSqS3/H c5+BeNMAL28ZXujRPim1YNLVuRK1Lg/4UiGSR+38Bf/9rsE/4mD8jBHULKsOJbXIfS0xCu qtFozC2Jf1Tw700HdjhEc5/kEj8JoOy7LvNvdVKRXQJClqd+yvF4WVU2rVLzhok4KvGRAH SslB6yWgUfes7aS12SocG8No7CGWfStvzKk9IuqdZkPL/JcaBBsbQ1nsqxGkLtANaBoVsd 8v0T9nH6sPlPNeX+/pWlaigPUz9qrhG1mGBnUz63UMNISuOuif6I5qRJD36R9Q== 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 4ZsQ3Z1wZZztjv; Tue, 06 May 2025 17:14:02 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 6 May 2025 10:14:00 -0700 From: Gleb Smirnoff To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket Message-ID: References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> <20250506150654.DEAF8300@slippy.cwsent.com> <20250506154446.917B818D@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=us-ascii Content-Disposition: inline In-Reply-To: <20250506154446.917B818D@slippy.cwsent.com> On Tue, May 06, 2025 at 08:44:46AM -0700, Cy Schubert wrote: C> On the sending machine: C> C> bob# procstat -k 50742 C> PID TID COMM TDNAME KSTACK C> C> 50742 103321 rsync - mi_switch C> sleepq_switch sleepq_catch_signals sleepq_timedwait_sig C> _cv_timedwait_sig_sbt kern_select sys_select amd64_syscall C> fast_syscall_common C> bob# C> bob# procstat -k 50743 C> PID TID COMM TDNAME KSTACK C> C> 50743 100644 rsh - mi_switch C> sleepq_switch sleepq_catch_signals sleepq_wait_sig _cv_wait_sig kern_select C> sys_select amd64_syscall fast_syscall_common C> bob# C> C> On the receiving machine: C> C> cwsys# procstat -k 46918 C> PID TID COMM TDNAME KSTACK C> C> 46918 100848 rsync - mi_switch C> sleepq_catch_signals sleepq_timedwait_sig _cv_timedwait_sig_sbt seltdwait C> kern_select sys_select amd64_syscall fast_syscall_common C> cwsys# procstat -k 46919 C> PID TID COMM TDNAME KSTACK C> C> 46919 100999 rsync - mi_switch C> sleepq_catch_signals sleepq_timedwait_sig _cv_timedwait_sig_sbt seltdwait C> kern_select sys_select amd64_syscall fast_syscall_common C> cwsys# C> C> It's proceeding but exceptionally slowly. The hangs occur at 0% and at some C> points during the transfer. Noticed using rsync --progress. Can you please write down a reproduce recipe for me? Or if it is not so easy, then get some ktrace from the rsync. -- Gleb Smirnoff From nobody Tue May 6 17:15: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 4ZsQ4m2bnjz5v74p; Tue, 06 May 2025 17:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ4m1tDBz3gJQ; Tue, 06 May 2025 17:15:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbxhVCpkBzwilfvX5xkW3MJfj7rIt4Dvp90L7RRMFAQ=; b=GEgDo3fsaSi5cbxFBQ7GvTOJYFs5dUHop3ph7paECje0kqdmjUG1YBBnTzw4OYEGKLGO7L MmVO64ciuZXHeP8DvubPhoRXtPPg5l4gOBEhk/KHV9sgNwvmJuT5JuAq3YuTXteEtEHhkY VzlnrneycVta9O4RhBFtO5mgkLCPhCNLuyuUyhn8vpGp2j8qf7iZDo41wSHTuxVos3O4Mn ixWX5fZwn7TWBd364WQ7N6nm5RW1NNKWg47iLFblYvQDMVrR17i3I3gTq8cYaV8vS4919G 95HvWluZHg+Jk3A3JUhY9IEBoRYva24pkdVhao9YW0NZ5pkJ9mgme/eHjhLsWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbxhVCpkBzwilfvX5xkW3MJfj7rIt4Dvp90L7RRMFAQ=; b=C1bpX/FWdwDgqBSJMq68556fK7VD1MseHf/q+F4aYPs5YQ/rEgvH2eCa8J18CSIIKUai3x C2BaL6ahLyAbqBmwSNTSZ9hRWVTTGfGAWVyaEdujYGvPQaMNDIocZy3yYM8C82Mvm4ZXNQ 7ppMIWN5iHcA90o026RvYGXpidBvCmfdR3gX+4wczJTw5kaa38Fj9I6P7lBSrqBygWVhsl 7MI1Qs11rplnzuntVgGQrxwA8S4Wd110BX+LzHBNmOlFWXtYNC9PNVrtJGasKzCmgx0Wfz MMub9E3d3SzoBtqboiXPTjHmkUOjXXU8xhz+TGFhkkOaeuF3TcSnnw5M23Xeog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551704; a=rsa-sha256; cv=none; b=oHD0LjK0pYvfQuFXxp7VByUq57VE3U7b5/faobPMZXVvCUHLLVy5FJvshS/Ju+iQnIVo+A u746NiV6rTpSjk8ZZczYjRxzLYgCVaYYteaWXxzxEkqzPX/qmRww2cEXUmRIXQnbo0Iq0x uxtP1yV94CqO2cEyhJalbAmoeInvNHzti1cPAhHsS2iSSZEJ6EMdX/ReSr6nl2RogsgOZC IEorbenGUa6jbRyOUHZDjgXCZHz0Vzbr4mcQVOgEr9+WTcQUt9xCzl3nZxngsNR7tfLbJ9 MJfziyAG2gk60b5NUFqZWnp50mASrSMjl3G8faVpjvwYBTUcmVjCvMkdBdiwjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsQ4m1LcNz1712; Tue, 06 May 2025 17:15:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546HF4M9089261; Tue, 6 May 2025 17:15:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546HF4gT089258; Tue, 6 May 2025 17:15:04 GMT (envelope-from git) Date: Tue, 6 May 2025 17:15:04 GMT Message-Id: <202505061715.546HF4gT089258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3d4c3eb6f23f - main - rtld: 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d4c3eb6f23faa9457fe4af4515c9835cb2f43b0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3d4c3eb6f23faa9457fe4af4515c9835cb2f43b0 commit 3d4c3eb6f23faa9457fe4af4515c9835cb2f43b0 Author: Konstantin Belousov AuthorDate: 2025-05-03 07:15:17 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-06 17:14:56 +0000 rtld: style --- libexec/rtld-elf/rtld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 59d29888d93d..0575ce19d476 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2590,7 +2590,7 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list) /* Add the object to the global fini list in the reverse order. */ if ((obj->fini != (Elf_Addr)NULL || - obj->fini_array != (Elf_Addr)NULL) && + obj->fini_array != (Elf_Addr)NULL) && !obj->on_fini_list) { objlist_push_head(&list_fini, obj); obj->on_fini_list = true; @@ -3817,7 +3817,7 @@ dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, if (obj != NULL) { obj->dl_refcount++; - if (mode & RTLD_GLOBAL && + if ((mode & RTLD_GLOBAL) != 0 && objlist_find(&list_global, obj) == NULL) objlist_push_tail(&list_global, obj); From nobody Tue May 6 17:15: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 4ZsQ4n4fx9z5v7GK; Tue, 06 May 2025 17:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ4n2WDBz3gX1; Tue, 06 May 2025 17:15:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nbg/nEensYLkrUoLgbOPJnVS4RtgnZ9/gILE22rIVWc=; b=WI8zWUWZCqcmyUl7L1dIgIOTiy6+DDaCE/vZ19V22HMxaRiMWOyts78SCVknRr9/uJN8I5 nNR01QtbkbqyD0lyYQ18jBd4mMMZGrGPnRwKhyFqaD5kIxBKGqv1UFrsw/Hj2J9v8gramg 4zHv6+qpXxBs7FvUNBy6J5wx4uutaQlxgSmureK/mSLpTpYXonkdwi734nNwLG2PUhEehx uCfZ/7s3YHXZo7WkiNhe9dT+Xi1lRCaMhJjasuSAayEhSsoB8q8XtyN+kYsgSktCAxFsxz GMAdWWp1MQdALUBGP83rigXAEUIBUB/YQeY03Ddcn2B3V7KOnzEG1uatVec7Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nbg/nEensYLkrUoLgbOPJnVS4RtgnZ9/gILE22rIVWc=; b=sYvqemcxNRVn14wGwZiwaZJ96k/DTHizX2R7eWQgOCKPDydwI+LXziun2JZNlxYJnqhXot jG0uBo3C74iJ2zjcqAo134/BaimkBQWGYRnC7oN43JesyPPjV0nMHijhoKATke4z5jx3bq 9i+uewxh6QTboj3mZupmzY2yFnP8YrWP+OKg8qDhwu15shUn+5iStMnDc4CBsGDKw+7lr7 76v8ScADaQPavMvdijA1iFv7m5MkHHuJcQnfVND2NqoMnYVeFDhkr38U682RGl97wM4MrK pIV6/PvY1rcChecB1wsSVCbY8hpRQQz+42qdExnRukUMshws1t5RkbU6GBp91A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551705; a=rsa-sha256; cv=none; b=S+kn7AITiqoGnI9hW8muoP3EiV30DbgLXs7KbliIIvYu9z1EbgFXh+PKmLFZ4eZg3VGVia ZV9wqynWVISQTN2KseNI9stngUal//xI8g0r1qidKL1p/W8OigALAe38snecqPjIOfFIMr YrkDBRMWTAKdRRrBZhETEiMgEaMbTkKaW7sB6OlIcenpm4wF3/DaczTzMza4UEbpb8F6N/ /7quq6qLIYRn+9FZYVGoiF9Bt77behsxGipYW0woDZWAA46cp2eD975def9CZxD1N/MGd2 cyE3H3DOYqrPkZDQiVUmO76v1t5i2Ieb9M0k4tbGCbYRc6QdlwO+78cDJA3UrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsQ4n25gxz17RK; Tue, 06 May 2025 17:15:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546HF5BC089296; Tue, 6 May 2025 17:15:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546HF5QT089292; Tue, 6 May 2025 17:15:05 GMT (envelope-from git) Date: Tue, 6 May 2025 17:15:05 GMT Message-Id: <202505061715.546HF5QT089292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e8286eb29516 - main - sys/queue.h: add STAILQ_REVERSE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: e8286eb295165ea1852abe4ae355f85ad1ec3356 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8286eb295165ea1852abe4ae355f85ad1ec3356 commit e8286eb295165ea1852abe4ae355f85ad1ec3356 Author: Konstantin Belousov AuthorDate: 2025-05-03 08:13:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-06 17:14:56 +0000 sys/queue.h: add STAILQ_REVERSE The implementation of the traditional interview question about in-place reversing of the single-linked list. Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50131 --- sys/sys/queue.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index a29ad6b94f03..b2ba3d63bb0c 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -564,6 +564,21 @@ struct { \ (head2)->stqh_last = &STAILQ_FIRST(head2); \ } while (0) +#define STAILQ_REVERSE(head, type, field) do { \ + if (STAILQ_EMPTY(head)) \ + break; \ + QUEUE_TYPEOF(type) *_Var, *_Varp, *_Varn; \ + for (_Var = STAILQ_FIRST(head), _Varp = NULL; \ + _Var != NULL;) { \ + _Varn = STAILQ_NEXT(_Var, field); \ + STAILQ_NEXT(_Var, field) = _Varp; \ + _Varp = _Var; \ + _Var = _Varn; \ + } \ + (head)->stqh_last = &STAILQ_NEXT(STAILQ_FIRST(head), field); \ + (head)->stqh_first = _Varp; \ +} while (0) + #define STAILQ_END(head) NULL From nobody Tue May 6 17:15: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 4ZsQ4p4Tdbz5v7TP; Tue, 06 May 2025 17:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ4p3RQ0z3gJb; Tue, 06 May 2025 17:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Xlg9IIpzw2rx6vb8v5RWAgPRaHQZEZO1voHbdLyQrQ=; b=N8vFV48gNZXM+SmOpd/1/IDIZkrBRLmsoIk5NdYrQ2bTKtseKZ9X2H2H9uNYT1lqbxUyma 65e+0hWud1K7DAfBcFanKqYfSw22MERdbkuTcZYeXIqIo2OPoCGj8e/pZJf2jaGz8+gBVY 7h7LRFisCmnGSCVlnbT6jAnIcRIQbNJ/llE5hJsi5/ru4YqJfhjSqsh7gGYvKu0ekx2GmV bpRd67hYH0o78YIyiQIrffrXG8PqoBuJHuPfxsSNR3Npvvkll+0VnMjuVwXcFsZfMHhw8B O6+HxHHdCukFpi+TY2ljXcT8UM+zs0cL45x3RREDbT9TY+eBttCmgb5nEu5D9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Xlg9IIpzw2rx6vb8v5RWAgPRaHQZEZO1voHbdLyQrQ=; b=asvUgf8LR+pqjdOm6aATWIQRr5pXJCIdXSymtw9RCapsGLpaLiAzr8MQ3omlqJ82lR+jc9 PmGmKj/PmbakMpBpLSht1GshNo5+H8HWhyOUqi0hMUkIghaceAt56RB8fapIOX8D9R5okZ xomtOXOa2icp9Am78mTYSjyKdI97YJn+NF0IZNn80puezr2ohL4PA29hfgmbDsu93Zhvvh JWmyxtFYaJEaX5ogtI4znzmQyBuu9LdTuKE6ThqoAP+W6CukXWGDwIXd7Te8528cw0WmSZ IGZFU1g8kzxPuPCnilXuWlsoe2ECwPyvTIKLmAQqQtGc9G56MMqTeKmglR6F2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551706; a=rsa-sha256; cv=none; b=LRXpHg/1nxt27/aD+B9Lj9sOOdPAE+y88GIYHUKaE2KhyW+4uZ75QfzLW0NZRgkNQqEoE4 4D8OgERosl7J/bwbClxYtiSQYg1IFG4wRpjyxZb+4lIEQ9n04WX/GDtjMK+u9yiyLJeCHJ 1xRY0CDKNB7LkQNscaLrNMzO1/t/iepDVFes41qCJ88+KzTkq/TgssqS92Q5IzYrPPXm9a HtvqMzkcuLUnfqOeFw03YgKMdbYCHwnf4EcXfqISTUnuDM1ACEp/IF95GiAxG2yYs74TOy cSGQ7W4s9mHxlgemUfdWwkXiSyzXIMIwooopacrzehcQ2IxiYmWEiXTeiauwMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsQ4p32MQz17RL; Tue, 06 May 2025 17:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546HF6TP089334; Tue, 6 May 2025 17:15:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546HF6Qd089331; Tue, 6 May 2025 17:15:06 GMT (envelope-from git) Date: Tue, 6 May 2025 17:15:06 GMT Message-Id: <202505061715.546HF6Qd089331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a5a186baf2c8 - main - queue.3: document STAILQ_REVERSE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a5a186baf2c89ebfd795d74d9223d57acd8c0383 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a5a186baf2c89ebfd795d74d9223d57acd8c0383 commit a5a186baf2c89ebfd795d74d9223d57acd8c0383 Author: Konstantin Belousov AuthorDate: 2025-05-04 16:04:09 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-06 17:14:56 +0000 queue.3: document STAILQ_REVERSE Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50131 --- share/man/man3/Makefile | 1 + share/man/man3/queue.3 | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index c610283173a2..7322954b45ca 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -258,6 +258,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 STAILQ_REMOVE.3 \ queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ + queue.3 STAILQ_REVERSE.3 \ queue.3 STAILQ_SWAP.3 \ queue.3 TAILQ_CLASS_ENTRY.3 \ queue.3 TAILQ_CLASS_HEAD.3 \ diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3 index 8d4492b8be69..79c8d92decbe 100644 --- a/share/man/man3/queue.3 +++ b/share/man/man3/queue.3 @@ -73,6 +73,7 @@ .Nm STAILQ_REMOVE , .Nm STAILQ_REMOVE_AFTER , .Nm STAILQ_REMOVE_HEAD , +.Nm STAILQ_REVERSE , .Nm STAILQ_SPLIT_AFTER , .Nm STAILQ_SWAP , .Nm LIST_CLASS_ENTRY , @@ -177,6 +178,7 @@ lists and tail queues .Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" +.Fn STAILQ_REVERSE "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_SPLIT_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_HEAD *rest" "STAILQ_ENTRY NAME" .Fn STAILQ_SWAP "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" "TYPE" .\" @@ -791,6 +793,10 @@ A doubly-linked tail queue should be used if this macro is needed in high-usage code paths or to operate on long tail queues. .Pp The macro +.Nm STAILQ_REVERSE +reverses the queue in place. +.Pp +The macro .Nm STAILQ_SPLIT_AFTER splits the tail queue referenced by .Fa head , From nobody Tue May 6 17:15: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 4ZsQ4q6HCqz5v7VF; Tue, 06 May 2025 17:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ4q4h7Bz3gft; Tue, 06 May 2025 17:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qSKEA+cr50a4PZP5OSbsGY3VKYSlxvv/K4fD4rW1Y/Y=; b=gCC/rvocozj96yHGKAcfLr0GG1bIn2FCxIHiUYT/YJ/+LOFhPKAusmK8KIN+2lhIDWF6Vj lIbvkDsZ8qtuZgujKV+PUR6xLbyqkQPAV1t2M029KsWIZMxHPIMlYkgwr8dup77v5yH9VY WVQreBTdnwptiEQiDa5pxbF3uWoqhWBVKumAChSuU9CuG+l0NXrVsqx9Dx1Dtuj68pfirI 8D9wp7gTFKMrnLE/hn5spkIyxzcX0zFuyrg3b3tTf73GFZ/XpXxxq7KwfKY8WJzrhji6Sc bgL8uy3j1EofYDGxaWMaDuknqMypQei0WreoeNWgb0UzAQn6BS+V20mRww4H6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qSKEA+cr50a4PZP5OSbsGY3VKYSlxvv/K4fD4rW1Y/Y=; b=ClFUzhZhg2MdQngvImBERKWlKsp9OAtAtNzzgUR204rlgWX4/sqMM41LVxdppmj4WsDlPm TeNgBMsq8wwsmpjpQt7uShMwOCPQNRWHOt7mF/mAQpsQT+QFJqPkZKiEUt+GpmqsJoHFkU RYHPp7IgquJSp58LXS20iw3n67fKEqyC2nVY2jp9Z7LtsuRNBVGxWG/hqGUNX8cy37GWaz lqPK9F+nfc/l7vacjy2aeWJ120t7Xd730fwHioodxrRi0XCAfa7w8+Xt00LvacNlN0qUgU Pc8ZvOAg3LG06MOswECyDC5ioj0eHFlztJZn20H5Za2WWNQbu34+d1iJB5yv/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551707; a=rsa-sha256; cv=none; b=RHSOreVx1Mxxkq9v67jiK/D1k6+WxhSnbz79EhFlV4rMGILqexI1SDaNKJCpBdixgMRT/T a/PWBdpd8RlYmWK0LCsirCx+9+Hpj3WG7krw39KDy7o1zIGhJGV1mCBojyp0wemHuGIxDZ q1oujIEVVXvu6JDImJV6n+bhCSPswH9WqrML/hLxx3a3gzVwdlLaftstM/1RCdh3h9BCdP fPT0BJ6NI7YFZqN1ikTAotUMq/khHJKDmoJwXbtz4FJc9IZZ55QYV6+fdPHEk2TEH2BEeN AUBWGnmvG1ks/GJllt15Txe07xZibp/Ud/jC5+CYp2lFzKSZDV09nEzrtesOTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsQ4q3zl6z17nq; Tue, 06 May 2025 17:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546HF7iL089367; Tue, 6 May 2025 17:15:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546HF7JV089364; Tue, 6 May 2025 17:15:07 GMT (envelope-from git) Date: Tue, 6 May 2025 17:15:07 GMT Message-Id: <202505061715.546HF7JV089364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 31a248318023 - main - sys/elf_common.h: add the DF_1_INITFIRST flag 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31a24831802389f52f3ebb7fdf670ee0e4dd608e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=31a24831802389f52f3ebb7fdf670ee0e4dd608e commit 31a24831802389f52f3ebb7fdf670ee0e4dd608e Author: Konstantin Belousov AuthorDate: 2025-05-03 10:49:45 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-06 17:14:56 +0000 sys/elf_common.h: add the DF_1_INITFIRST flag definition Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50132 --- sys/sys/elf_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 7febfc1fbaf4..1c33b55fc5b6 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -790,6 +790,7 @@ typedef struct { #define DF_1_GLOBAL 0x00000002 /* Set the RTLD_GLOBAL for object */ #define DF_1_NODELETE 0x00000008 /* Set the RTLD_NODELETE for object */ #define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */ +#define DF_1_INITFIRST 0x00000020 /* Initialize DSO first at runtime */ #define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */ #define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */ #define DF_1_INTERPOSE 0x00000400 /* Interpose all objects but main */ From nobody Tue May 6 17:15: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 4ZsQ4s1zGmz5v7DZ; Tue, 06 May 2025 17:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ4r5GwTz3gg4; Tue, 06 May 2025 17:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=asajJLh3rbuRDfOVS84a+d1vu1Bt3cc8ZoeskeVbRnM=; b=kjb4yZh0eQp78lBZI7b0UXyP84RxHu2aK9mt079QyHJB9LEEBom8aY8Dp955QCwJ+CBBUC BF2njze5g32HTw70I2FBqlAmdj5sAnGNlEFCeaSdFReo6dZclFkE6/4HBoAP1Idh5A04bX j78nD9+U5XVOOkEK6csDClN6jOe3+vKci5PJ0U0t74nEyRUkeiwb3fJJ4zOCK1ZFFyuCH9 c2Hv3IgkEP/I15YCHynIHv4hyJcs/d+9NZQXFBv/AtoTRXPE7hspX95EZF/8MZM21TXBhO cTrwmKLCN1gQhjuuDAZzvh/YqGRTQsiSrXcocXgfGnsMX16LbJ8DJDo6w+umUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=asajJLh3rbuRDfOVS84a+d1vu1Bt3cc8ZoeskeVbRnM=; b=MonjAzY2VZN19XwFJ8zLxcKDi+euUM7/t8wA1Yi70ZeI0BFHxBIFdVOIInvdK8Oxc5PjYW O7HapwiyL4cBNZBo2pvCSGc8t8xj0A+O5wE98XXCHQrwQtp3N69YJSpOkDnBWSNWVToGJ0 WmDlL03sVqY8eGqgvbVoU9u+TdrIssUC7IMqH3irs0o011YDVcp+DsmcSUJeoXh1jzK4ea mJ3tmryrQ2J2uIyFmneauC84pB+KFJBTtC9KdYxA1Ui+qYqHVp8PIiX9/7MBtIjX1yfHNH mGcVxIUDHOD/HyV0BD+8iRVORvbYN484HUtyZBz6YC6dYAH9poPDlarEmtq8bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551708; a=rsa-sha256; cv=none; b=ImgjrK6yXS7DowSzuXx9yLdaw/M5oSk0/Is2Z1AT+nfuirNvXKPvPLi1+0sN1umn2qnq4m KeXX7FiQrLkBOdV7/7WPrbkxvOtW/3DS39YPjGkq2YVIYmWMs37/KWyTFx5vMQMlcaUC/3 peIRxZ5psNQioZGLMX4XNffr4VXO10asg34NxLe6h/OemIPc23NdaekuvkX4MKyY//Jt7K /K8DVFnsseXQQHWWjpkCTzuhToXxRJwN+UwuLALQ0IFX8HVtyfMCcHyu4u9a/xzjUultns a4vYcYyb7nadaCtT00uxJNP+QBpLpQcQrLAisvrRgsX+QFwVLdatZUqPa3itpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsQ4r4dkPz17nr; Tue, 06 May 2025 17:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546HF8pZ089401; Tue, 6 May 2025 17:15:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546HF8WB089398; Tue, 6 May 2025 17:15:08 GMT (envelope-from git) Date: Tue, 6 May 2025 17:15:08 GMT Message-Id: <202505061715.546HF8WB089398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 78aaab9f1cf3 - main - rtld: add support for -z initfirst List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 78aaab9f1cf359f3b7325e4369653f6b50593393 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=78aaab9f1cf359f3b7325e4369653f6b50593393 commit 78aaab9f1cf359f3b7325e4369653f6b50593393 Author: Konstantin Belousov AuthorDate: 2025-05-03 08:14:25 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-06 17:14:56 +0000 rtld: add support for -z initfirst Internally, initfirst objects and their needed objects are put on the dedicated initlist, which is prepended to the current regular initlist at the last moment. This results in the move of the needed objects into the beginning of the initlist, which is required for the proper initialization of the dependencies. It seems that glibc moves only the initfirst object, which makes its constructors depend on not yet initialized dsos. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50132 --- libexec/rtld-elf/rtld.c | 127 ++++++++++++++++++++++++++++++++++++------------ libexec/rtld-elf/rtld.h | 1 + 2 files changed, 97 insertions(+), 31 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 0575ce19d476..12aee444fccf 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -112,8 +112,11 @@ static void init_dag(Obj_Entry *); static void init_marker(Obj_Entry *); static void init_pagesizes(Elf_Auxinfo **aux_info); static void init_rtld(caddr_t, Elf_Auxinfo **); -static void initlist_add_neededs(Needed_Entry *, Objlist *); -static void initlist_add_objects(Obj_Entry *, Obj_Entry *, Objlist *); +static void initlist_add_neededs(Needed_Entry *, Objlist *, Objlist *); +static void initlist_add_objects(Obj_Entry *, Obj_Entry *, Objlist *, + Objlist *); +static void initlist_for_loaded_obj(Obj_Entry *obj, Obj_Entry *tail, + Objlist *list); static int initlist_objects_ifunc(Objlist *, bool, int, RtldLockState *); static void linkmap_add(Obj_Entry *); static void linkmap_delete(Obj_Entry *); @@ -952,7 +955,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) /* Make a list of init functions to call. */ objlist_init(&initlist); - initlist_add_objects(globallist_curr(TAILQ_FIRST(&obj_list)), + initlist_for_loaded_obj(globallist_curr(TAILQ_FIRST(&obj_list)), preload_tail, &initlist); r_debug_state(NULL, &obj_main->linkmap); /* say hello to gdb! */ @@ -1564,6 +1567,8 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath, obj->z_nodeflib = true; if (dynp->d_un.d_val & DF_1_PIE) obj->z_pie = true; + if (dynp->d_un.d_val & DF_1_INITFIRST) + obj->z_initfirst = true; break; default: @@ -2543,15 +2548,15 @@ init_pagesizes(Elf_Auxinfo **aux_info) * when this function is called. */ static void -initlist_add_neededs(Needed_Entry *needed, Objlist *list) +initlist_add_neededs(Needed_Entry *needed, Objlist *list, Objlist *iflist) { /* Recursively process the successor needed objects. */ if (needed->next != NULL) - initlist_add_neededs(needed->next, list); + initlist_add_neededs(needed->next, list, iflist); /* Process the current needed object. */ if (needed->obj != NULL) - initlist_add_objects(needed->obj, needed->obj, list); + initlist_add_objects(needed->obj, needed->obj, list, iflist); } /* @@ -2564,36 +2569,96 @@ initlist_add_neededs(Needed_Entry *needed, Objlist *list) * held when this function is called. */ static void -initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list) +initlist_for_loaded_obj(Obj_Entry *obj, Obj_Entry *tail, Objlist *list) { - Obj_Entry *nobj; + Objlist iflist; /* initfirst objs and their needed */ + Objlist_Entry *tmp; - if (obj->init_scanned || obj->init_done) - return; - obj->init_scanned = true; + objlist_init(&iflist); + initlist_add_objects(obj, tail, list, &iflist); - /* Recursively process the successor objects. */ - nobj = globallist_next(obj); - if (nobj != NULL && obj != tail) - initlist_add_objects(nobj, tail, list); + STAILQ_FOREACH(tmp, &iflist, link) { + Obj_Entry *tobj = tmp->obj; - /* Recursively process the needed objects. */ - if (obj->needed != NULL) - initlist_add_neededs(obj->needed, list); - if (obj->needed_filtees != NULL) - initlist_add_neededs(obj->needed_filtees, list); - if (obj->needed_aux_filtees != NULL) - initlist_add_neededs(obj->needed_aux_filtees, list); + if ((tobj->fini != (Elf_Addr)NULL || + tobj->fini_array != (Elf_Addr)NULL) && + !tobj->on_fini_list) { + objlist_push_tail(&list_fini, tobj); + tobj->on_fini_list = true; + } + } - /* Add the object to the init list. */ - objlist_push_tail(list, obj); + /* + * This might result in the same object appearing more + * than once on the init list. objlist_call_init() + * uses obj->init_scanned to avoid dup calls. + */ + STAILQ_REVERSE(&iflist, Struct_Objlist_Entry, link); + STAILQ_FOREACH(tmp, &iflist, link) + objlist_push_head(list, tmp->obj); - /* Add the object to the global fini list in the reverse order. */ - if ((obj->fini != (Elf_Addr)NULL || - obj->fini_array != (Elf_Addr)NULL) && - !obj->on_fini_list) { - objlist_push_head(&list_fini, obj); - obj->on_fini_list = true; + objlist_clear(&iflist); +} + +static void +initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list, + Objlist *iflist) +{ + Obj_Entry *nobj; + + if (obj->init_done) + return; + + if (obj->z_initfirst || list == NULL) { + /* + * Ignore obj->init_scanned. The object might indeed + * already be on the init list, but due to being + * needed by an initfirst object, we must put it at + * the head of the init list. obj->init_done protects + * against double-initialization. + */ + if (obj->needed != NULL) + initlist_add_neededs(obj->needed, NULL, iflist); + if (obj->needed_filtees != NULL) + initlist_add_neededs(obj->needed_filtees, NULL, + iflist); + if (obj->needed_aux_filtees != NULL) + initlist_add_neededs(obj->needed_aux_filtees, + NULL, iflist); + objlist_push_tail(iflist, obj); + } else { + if (obj->init_scanned) + return; + obj->init_scanned = true; + + /* Recursively process the successor objects. */ + nobj = globallist_next(obj); + if (nobj != NULL && obj != tail) + initlist_add_objects(nobj, tail, list, iflist); + + /* Recursively process the needed objects. */ + if (obj->needed != NULL) + initlist_add_neededs(obj->needed, list, iflist); + if (obj->needed_filtees != NULL) + initlist_add_neededs(obj->needed_filtees, list, + iflist); + if (obj->needed_aux_filtees != NULL) + initlist_add_neededs(obj->needed_aux_filtees, list, + iflist); + + /* Add the object to the init list. */ + objlist_push_tail(list, obj); + + /* + * Add the object to the global fini list in the + * reverse order. + */ + if ((obj->fini != (Elf_Addr)NULL || + obj->fini_array != (Elf_Addr)NULL) && + !obj->on_fini_list) { + objlist_push_head(&list_fini, obj); + obj->on_fini_list = true; + } } } @@ -3863,7 +3928,7 @@ dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, */ } else { /* Make list of init functions to call. */ - initlist_add_objects(obj, obj, &initlist); + initlist_for_loaded_obj(obj, obj, &initlist); } /* * Process all no_delete or global objects here, given diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 383b8db2114c..d1ea00b96627 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -246,6 +246,7 @@ typedef struct Struct_Obj_Entry { bool z_nodeflib : 1; /* Don't search default library path */ bool z_global : 1; /* Make the object global */ bool z_pie : 1; /* Object proclaimed itself PIE executable */ + bool z_initfirst : 1; /* Proceed initializers before other objects */ bool static_tls : 1; /* Needs static TLS allocation */ bool static_tls_copied : 1; /* Needs static TLS copying */ bool ref_nodel : 1; /* Refcount increased to prevent dlclose */ From nobody Tue May 6 17:15: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 4ZsQ4t1ZcLz5v7VK; Tue, 06 May 2025 17:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsQ4s60Vvz3gVc; Tue, 06 May 2025 17:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2r52CTSzY3ymUatSQWs6HUKzP9gU35xym2xEWBg4Bts=; b=twIFM7KztjxPkFiNvGU/J0P3wotQo0M36+eK/HlkDVYuZjmHi2Tj0c8V3ai30Oc/iTp0iw 9W7mz6n/+K8M+YEfB7upboodqI6lrG4nVS3cqoMF39ruy2stvx0mJCXtmD229LS1AYegC9 Z/ulblQ4VUdDwRgAV9xGhdqYsdW+LEJTpIG4xiyn1knR2ooCph2YmBiZO4gdbe8sSr5Jwg xrX0FxC75NuCLvp23SCjs2lEEqVSgUOUewVN+VPrtEtPhi/vTcuCXN2QiSIWRhzZPxsWra L5uxYv9rHOBNykRRtzwSry8imZRFPx4KFDZcv5hzVCo2kbM6xnla2c1Z+OCyHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746551709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2r52CTSzY3ymUatSQWs6HUKzP9gU35xym2xEWBg4Bts=; b=EezL0sOrgyn1Yu7CJIA9EYmBBTqb7hba3JZJuJmjJCuink40cpLklathyFGRu4f/fElL+2 /82i4hs51unmU4drJv5yAm5feOC04KbDCZovNBQWh/uNI6zzp3cIAy+xnDV2HMomWbCx8S oETDuPO3eM/JTWkxJDF01MAldIeqIuE3nEkZNtHuAJ3Jr0tZms1T+lTO7iL2WTdVLG2Ndq sb8iZilNIX5u+GICFZog7mx3DdcOEkBsbL7oGjBrxOhUV/K2hWhYxnW1g69AsWnIbGZ+q1 OyTKQs3v1qNgE1KDU9YFdmxQcxIOPc5PbB1oo+a6zG0G9Bm3EtC2GI8vFnVJaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746551709; a=rsa-sha256; cv=none; b=d4BLyAqdvcUa8IBql/8MjKP5GTH/azveDRCW2VHalkSF4/kWKi0OIoEe6aEht9yMHVfdp7 S/MKdlHfw+BnbdfPj0zk823gpsDRFuBfzLXWCvKaVXbF8tSFWbzti8a/a+6HVILL/XDDj6 YFy9WWAdRkDxHzlQturh5IHGMct2JhJwdluDBo8YlHRfVuqbr8+Vxll7lviWZAdLuaVfUy tX/wotrqi8XnISreFacl6duFhNOjMV3DKCiUguHjKq8GkSQ2uJ4vIneEOATcs4Mxn9nVSI Vu/tBwZ7l69NFQ4+SZAiDIPXVP2FphKS2NirNDpbBGQpL4Kbk5xPOVQF2mmfDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsQ4s5F8Bz17lZ; Tue, 06 May 2025 17:15:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546HF9RG089435; Tue, 6 May 2025 17:15:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546HF9je089432; Tue, 6 May 2025 17:15:09 GMT (envelope-from git) Date: Tue, 6 May 2025 17:15:09 GMT Message-Id: <202505061715.546HF9je089432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7c6a5272f1de - main - libthr.so: mark as -z initfirst List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 7c6a5272f1ded20e91b63fe3d1a016243641a37d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7c6a5272f1ded20e91b63fe3d1a016243641a37d commit 7c6a5272f1ded20e91b63fe3d1a016243641a37d Author: Konstantin Belousov AuthorDate: 2025-05-03 08:15:36 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-06 17:14:56 +0000 libthr.so: mark as -z initfirst PR: 286537 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50133 --- lib/libthr/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 19afa93f12be..c87be9475390 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -53,6 +53,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND .endif LDFLAGS+=-Wl,-znodelete +LDFLAGS+=-Wl,-zinitfirst LDFLAGS+=-Wl,--auxiliary,libsys.so.7 VERSION_DEF=${SRCTOP}/lib/libc/Versions.def From nobody Tue May 6 17:29: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 4ZsQNx0xbkz5v8H9; Tue, 06 May 2025 17:29: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 4ZsQNw703wz3pbT; Tue, 06 May 2025 17:29:04 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id CHaLu4yGr9JM2CM6KutPQY; Tue, 06 May 2025 17:29:04 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id CM6IuyW9aJhBPCM6JudpA3; Tue, 06 May 2025 17:29:04 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=681a46e0 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=FVfdvhg8lqN6Qm_3ZQcA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id ECA1891; Tue, 06 May 2025 10:29:01 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id E5DA4305; Tue, 06 May 2025 10:29:01 -0700 (PDT) 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: Gleb Smirnoff cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket In-reply-to: References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> <20250506150654.DEAF8300@slippy.cwsent.com> <20250506154446.917B818D@slippy.cwsent.com> Comments: In-reply-to Gleb Smirnoff message dated "Tue, 06 May 2025 10:14:00 -0700." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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, 06 May 2025 10:29:01 -0700 Message-Id: <20250506172901.E5DA4305@slippy.cwsent.com> X-CMAE-Envelope: MS4xfIXETjjZSg/0g23dpeOIP/pAiePB/otWrUtE6xneRq+MhIx1FXKeg7f7ed4NQ6psJFQPjfwVhNdvklCiLVv2fBrAPdTTZF5GxSfNQv/CuPZlhUvXQBRC 9XbhiRb4ZE+N9e9e98/50vPIVJlD02KlV3bzYf2bQv7D2oUbnPV65t826Ooc/wYes3b4JWYILpGsIkuWG/GTc7892KwqfqZHZumUUdIS4G7t4XpOXamcGlcd onu6iTGgZTwaSxOLIxh4xplazuYa1TZwrAfyLtOcmcfx0F+RSqL4vzktwG6UHwxWZRmi1QUygO0/8aOqB5EDGJ1ux3juXFGkBhrx8LsH0Bo= X-Rspamd-Queue-Id: 4ZsQNw703wz3pbT X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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-Spamd-Bar: ---- In message , Gleb Smirnoff writes: > On Tue, May 06, 2025 at 08:44:46AM -0700, Cy Schubert wrote: > C> On the sending machine: > C> > C> bob# procstat -k 50742 > C> PID TID COMM TDNAME KSTACK > > C> > C> 50742 103321 rsync - mi_switch > C> sleepq_switch sleepq_catch_signals sleepq_timedwait_sig > C> _cv_timedwait_sig_sbt kern_select sys_select amd64_syscall > C> fast_syscall_common > C> bob# > C> bob# procstat -k 50743 > C> PID TID COMM TDNAME KSTACK > > C> > C> 50743 100644 rsh - mi_switch > C> sleepq_switch sleepq_catch_signals sleepq_wait_sig _cv_wait_sig kern_selec > t > C> sys_select amd64_syscall fast_syscall_common > C> bob# > C> > C> On the receiving machine: > C> > C> cwsys# procstat -k 46918 > C> PID TID COMM TDNAME KSTACK > > C> > C> 46918 100848 rsync - mi_switch > C> sleepq_catch_signals sleepq_timedwait_sig _cv_timedwait_sig_sbt seltdwait > C> kern_select sys_select amd64_syscall fast_syscall_common > C> cwsys# procstat -k 46919 > C> PID TID COMM TDNAME KSTACK > > C> > C> 46919 100999 rsync - mi_switch > C> sleepq_catch_signals sleepq_timedwait_sig _cv_timedwait_sig_sbt seltdwait > C> kern_select sys_select amd64_syscall fast_syscall_common > C> cwsys# > C> > C> It's proceeding but exceptionally slowly. The hangs occur at 0% and at som > e > C> points during the transfer. Noticed using rsync --progress. > > Can you please write down a reproduce recipe for me? Or if it is not so easy, > then get some ktrace from the rsync. In the case of /usr/obj I did, rsync -aHv --delete --progress /usr/obj/. other_server:/usr/obj/. For poudriere I did, rsync -aHWv --delete --progress /poudriere/cwsys/data/packages/HEADamd64-pro d/. cwsys:/poudriere/cwsys/data/packages/HEADamd64-prod/. I've confirmed that reverting this patch allowed it to quickly complete: bob# rsync -aHWv --delete --progress -e /usr/local/bin/rsh /poudriere/cwsys/data/packages/HEADamd64-prod/. cwsys:/poudriere/cwsys/data/ packages/HEADamd64-prod/.sending incremental file list .real_1746521498/All/ .real_1746521498/All/qt5-gui-5.15.16p130_2.pkg 3,823,613 100% 23.03MB/s 0:00:00 (xfr#1, to-chk=194/1049) .real_1746521498/All/qt5-linguisttools-5.15.16p3.pkg 403,803 100% 1.92MB/s 0:00:00 (xfr#2, to-chk=193/1049) .real_1746521498/All/qt5-network-5.15.16p130_1.pkg 618,651 100% 2.29MB/s 0:00:00 (xfr#3, to-chk=192/1049) .real_1746521498/All/qt5-opengl-5.15.16p130_1.pkg 156,324 100% 519.25kB/s 0:00:00 (xfr#4, to-chk=191/1049) .real_1746521498/All/qt5-printsupport-5.15.16p130_1.pkg 194,734 100% 546.47kB/s 0:00:00 (xfr#5, to-chk=190/1049) .real_1746521498/All/qt5-qmake-5.15.16p130.pkg 6,081,045 100% 10.58MB/s 0:00:00 (xfr#6, to-chk=189/1049) .real_1746521498/All/qt5-sql-5.15.16p130_1.pkg 107,495 100% 183.20kB/s 0:00:00 (xfr#7, to-chk=188/1049) .real_1746521498/All/qt5-svg-5.15.16p5_1.pkg 149,562 100% 244.65kB/s 0:00:00 (xfr#8, to-chk=187/1049) .real_1746521498/All/qt5-widgets-5.15.16p130_1.pkg 2,669,693 100% 3.77MB/s 0:00:00 (xfr#9, to-chk=186/1049) .real_1746521498/All/qt5-x11extras-5.15.16p0_1.pkg 21,167 100% 30.09kB/s 0:00:00 (xfr#10, to-chk=185/1049) .real_1746521498/All/qt5-xml-5.15.16p130_1.pkg 115,476 100% 159.05kB/s 0:00:00 (xfr#11, to-chk=184/1049) .real_1746521498/All/qt6-5compat-6.8.3.pkg 455,241 100% 575.87kB/s 0:00:00 (xfr#12, to-chk=183/1049) .real_1746521498/All/qt6-base-6.8.3_1.pkg 13,499,682 100% 11.95MB/s 0:00:01 (xfr#13, to-chk=182/1049) .real_1746521498/All/qt6-base_sqldriver-sqlite-6.8.3.pkg 44,965 100% 457.41kB/s 0:00:00 (xfr#14, to-chk=181/1049) .real_1746521498/All/qt6-declarative-6.8.3.pkg 16,009,492 100% 33.26MB/s 0:00:00 (xfr#15, to-chk=180/1049) .real_1746521498/All/qt6-languageserver-6.8.3.pkg 446,176 100% 857.71kB/s 0:00:00 (xfr#16, to-chk=179/1049) .real_1746521498/All/qt6-multimedia-6.8.3.pkg 1,771,654 100% 2.93MB/s 0:00:00 (xfr#17, to-chk=178/1049) .real_1746521498/All/qt6-quick3d-6.8.3.pkg 4,749,876 100% 6.42MB/s 0:00:00 (xfr#18, to-chk=177/1049) .real_1746521498/All/qt6-quicktimeline-6.8.3.pkg 83,021 100% 111.67kB/s 0:00:00 (xfr#19, to-chk=176/1049) .real_1746521498/All/qt6-shadertools-6.8.3.pkg 1,472,427 100% 1.80MB/s 0:00:00 (xfr#20, to-chk=175/1049) .real_1746521498/All/qt6-svg-6.8.3.pkg 228,501 100% 272.13kB/s 0:00:00 (xfr#21, to-chk=174/1049) .real_1746521498/All/qt6-tools-6.8.3.pkg 5,968,738 100% 5.65MB/s 0:00:01 (xfr#22, to-chk=173/1049) .real_1746521498/All/rapidjson-1.1.0.709.pkg 1,286,390 100% 26.67MB/s 0:00:00 (xfr#23, to-chk=172/1049) .real_1746521498/All/raptor2-2.0.16_3.pkg 413,736 100% 3.79MB/s 0:00:00 (xfr#24, to-chk=171/1049) .real_1746521498/All/rasqal-0.9.33_2.pkg 432,256 100% 3.12MB/s 0:00:00 (xfr#25, to-chk=170/1049) .real_1746521498/All/re2-20240702.pkg 296,947 100% 1.66MB/s 0:00:00 (xfr#26, to-chk=169/1049) .real_1746521498/All/re2c-3.0.pkg 436,633 100% 1.95MB/s 0:00:00 (xfr#27, to-chk=168/1049) .real_1746521498/All/readline-8.2.13_2.pkg 417,111 100% 1.19MB/s 0:00:00 (xfr#28, to-chk=167/1049) .real_1746521498/All/redland-1.0.17_6.pkg 312,864 100% 837.07kB/s 0:00:00 (xfr#29, to-chk=166/1049) .real_1746521498/All/rhash-1.4.4_1.pkg 238,851 100% 568.91kB/s 0:00:00 (xfr#30, to-chk=165/1049) .real_1746521498/All/ruby-3.2.6,1.pkg 9,548,446 100% 14.81MB/s 0:00:00 (xfr#31, to-chk=164/1049) .real_1746521498/All/ruby32-gems-3.5.23.pkg 667,960 100% 989.84kB/s 0:00:00 (xfr#32, to-chk=163/1049) .real_1746521498/All/rubygem-asciidoctor-2.0.23.pkg 237,931 100% 337.72kB/s 0:00:00 (xfr#33, to-chk=162/1049) .real_1746521498/All/rubygem-hpricot-0.8.6_1.pkg 254,142 100% 344.22kB/s 0:00:00 (xfr#34, to-chk=161/1049) .real_1746521498/All/rubygem-mustache-1.1.1.pkg 39,194 100% 52.50kB/s 0:00:00 (xfr#35, to-chk=160/1049) .real_1746521498/All/rubygem-rdiscount-2.2.7.3.pkg 69,639 100% 92.40kB/s 0:00:00 (xfr#36, to-chk=159/1049) .real_1746521498/All/rubygem-ronn-0.7.3.pkg 54,423 100% 70.67kB/s 0:00:00 (xfr#37, to-chk=158/1049) .real_1746521498/All/rust-1.86.0.pkg 177,519,601 100% 34.73MB/s 0:00:04 (xfr#38, to-chk=157/1049) .real_1746521498/All/rust-bindgen-cli-0.71.1.pkg 1,566,880 100% 1.53MB/s 0:00:00 (xfr#39, to-chk=156/1049) .real_1746521498/All/rust-cbindgen-0.28.0.pkg 1,223,121 100% 1.14MB/s 0:00:01 (xfr#40, to-chk=155/1049) .real_1746521498/All/sane-backends-1.3.1.pkg 4,006,282 100% 39.80MB/s 0:00:00 (xfr#41, to-chk=154/1049) .real_1746521498/All/sassc-3.6.2.pkg 7,281 100% 59.25kB/s 0:00:00 (xfr#42, to-chk=153/1049) .real_1746521498/All/sdl-1.2.15_17,2.pkg 733,131 100% 4.19MB/s 0:00:00 (xfr#43, to-chk=152/1049) .real_1746521498/All/sdl2-2.30.9_1.pkg 1,326,369 100% 4.29MB/s 0:00:00 (xfr#44, to-chk=151/1049) .real_1746521498/All/sdocbook-xml-1.1_2,2.pkg 16,213 100% 50.58kB/s 0:00:00 (xfr#45, to-chk=150/1049) .real_1746521498/All/serf-1.3.10_1.pkg 96,008 100% 280.71kB/s 0:00:00 (xfr#46, to-chk=149/1049) .real_1746521498/All/sessreg-1.1.2_1.pkg 7,414 100% 20.45kB/s 0:00:00 (xfr#47, to-chk=148/1049) .real_1746521498/All/shaderc-2024.4.pkg 3,157,144 100% 6.87MB/s 0:00:00 (xfr#48, to-chk=147/1049) .real_1746521498/All/shared-mime-info-2.4_1.pkg 644,728 100% 1.23MB/s 0:00:00 (xfr#49, to-chk=146/1049) .real_1746521498/All/snappy-1.2.1_1.pkg 37,023 100% 69.80kB/s 0:00:00 (xfr#50, to-chk=145/1049) .real_1746521498/All/sndio-1.10.0.pkg 124,996 100% 226.05kB/s 0:00:00 (xfr#51, to-chk=144/1049) .real_1746521498/All/socat-1.8.0.2.pkg 218,588 100% 376.48kB/s 0:00:00 (xfr#52, to-chk=143/1049) .real_1746521498/All/spamassassin-devel-2025.04.29_1.pkg 1,117,657 100% 1.74MB/s 0:00:00 (xfr#53, to-chk=142/1049) .real_1746521498/All/spandsp-3.0.0.g20211014_2.pkg 672,677 100% 1018.47kB/s 0:00:00 (xfr#54, to-chk=141/1049) .real_1746521498/All/speech-dispatcher-0.11.5_1.pkg 4,170,488 100% 4.91MB/s 0:00:00 (xfr#55, to-chk=140/1049) .real_1746521498/All/speex-1.2.1_1,1.pkg 120,759 100% 142.94kB/s 0:00:00 (xfr#56, to-chk=139/1049) .real_1746521498/All/speexdsp-1.2.1.pkg 83,589 100% 97.76kB/s 0:00:00 (xfr#57, to-chk=138/1049) .real_1746521498/All/spirv-llvm-translator-llvm19-19.1.2.pkg 949,867 100% 1.01MB/s 0:00:00 (xfr#58, to-chk=137/1049) .real_1746521498/All/spirv-tools-2024.4.r2.pkg 3,988,729 100% 3.83MB/s 0:00:00 (xfr#59, to-chk=136/1049) .real_1746521498/All/sqlite3-3.46.1,1.pkg 1,547,878 100% 1.35MB/s 0:00:01 (xfr#60, to-chk=135/1049) .real_1746521498/All/svt-av1-2.3.0.pkg 2,137,329 100% 18.04MB/s 0:00:00 (xfr#61, to-chk=134/1049) .real_1746521498/All/swig-4.2.1.pkg 6,050,725 100% 23.17MB/s 0:00:00 (xfr#62, to-chk=133/1049) .real_1746521498/All/t1lib-5.1.2_5,1.pkg 806,554 100% 2.58MB/s 0:00:00 (xfr#63, to-chk=132/1049) .real_1746521498/All/taglib-2.0.2.pkg 423,173 100% 1.24MB/s 0:00:00 (xfr#64, to-chk=131/1049) .real_1746521498/All/tcl86-8.6.16_2.pkg 2,664,039 100% 6.37MB/s 0:00:00 (xfr#65, to-chk=130/1049) .real_1746521498/All/tcplog_dumper-0.1.1_2.pkg 17,292 100% 40.11kB/s 0:00:00 (xfr#66, to-chk=129/1049) .real_1746521498/All/teckit-2.5.11_1.pkg 1,368,874 100% 2.75MB/s 0:00:00 (xfr#67, to-chk=128/1049) .real_1746521498/All/tepl6-6.4.0_3.pkg 250,933 100% 484.29kB/s 0:00:00 (xfr#68, to-chk=127/1049) .real_1746521498/All/tex-kpathsea-6.4.0.pkg 185,753 100% 325.09kB/s 0:00:00 (xfr#69, to-chk=126/1049) .real_1746521498/All/tex-ptexenc-1.4.6.pkg 37,067 100% 63.84kB/s 0:00:00 (xfr#70, to-chk=125/1049) .real_1746521498/All/texi2html-5.0_5,1.pkg 523,686 100% 830.21kB/s 0:00:00 (xfr#71, to-chk=124/1049) .real_1746521498/All/texinfo-7.1_6,1.pkg 1,552,530 100% 2.13MB/s 0:00:00 (xfr#72, to-chk=123/1049) .real_1746521498/All/thunderbird-138.0_1.pkg 82,955,722 100% 29.91MB/s 0:00:02 (xfr#73, to-chk=122/1049) .real_1746521498/All/tiff-4.7.0.pkg 1,198,872 100% 1.51MB/s 0:00:00 (xfr#74, to-chk=121/1049) .real_1746521498/All/tradcpp-0.5.3.pkg 30,311 100% 38.49kB/s 0:00:00 (xfr#75, to-chk=120/1049) .real_1746521498/All/tree-sitter-0.24.6.pkg 116,915 100% 146.00kB/s 0:00:00 (xfr#76, to-chk=119/1049) .real_1746521498/All/twemoji-color-font-ttf-15.1.0.pkg 3,836,778 100% 4.14MB/s 0:00:00 (xfr#77, to-chk=118/1049) .real_1746521498/All/twolame-0.4.0_4.pkg 116,356 100% 127.67kB/s 0:00:00 (xfr#78, to-chk=117/1049) .real_1746521498/All/uchardet-0.0.8_1.pkg 126,007 100% 134.34kB/s 0:00:00 (xfr#79, to-chk=116/1049) .real_1746521498/All/ugrep-7.4.2.pkg 491,682 100% 498.09kB/s 0:00:00 (xfr#80, to-chk=115/1049) .real_1746521498/All/unbound-1.23.0.pkg 2,691,673 100% 2.45MB/s 0:00:01 (xfr#81, to-chk=114/1049) .real_1746521498/All/unixODBC-2.3.12_1.pkg 563,914 100% 5.98MB/s 0:00:00 (xfr#82, to-chk=113/1049) .real_1746521498/All/upnp-1.14.20,1.pkg 556,783 100% 4.12MB/s 0:00:00 (xfr#83, to-chk=112/1049) .real_1746521498/All/urw-base35-fonts-20200910.pkg 8,778,946 100% 26.83MB/s 0:00:00 (xfr#84, to-chk=111/1049) .real_1746521498/All/usbids-20241204.pkg 220,556 100% 618.93kB/s 0:00:00 (xfr#85, to-chk=110/1049) .real_1746521498/All/utf8cpp-4.0.6.pkg 9,137 100% 24.79kB/s 0:00:00 (xfr#86, to-chk=109/1049) .real_1746521498/All/v4l_compat-1.23.0_5.pkg 94,595 100% 212.36kB/s 0:00:00 (xfr#87, to-chk=108/1049) .real_1746521498/All/vala-0.56.17,1.pkg 1,948,974 100% 3.71MB/s 0:00:00 (xfr#88, to-chk=107/1049) .real_1746521498/All/vde2-2.3.3_1.pkg 182,293 100% 330.28kB/s 0:00:00 (xfr#89, to-chk=106/1049) .real_1746521498/All/vigra-1.12.1_1.pkg 991,100 100% 1.58MB/s 0:00:00 (xfr#90, to-chk=105/1049) .real_1746521498/All/vim-9.1.1265.pkg 9,787,705 100% 10.57MB/s 0:00:00 (xfr#91, to-chk=104/1049) .real_1746521498/All/vim-gtk2-9.1.1265.pkg 9,919,172 100% 8.49MB/s 0:00:01 (xfr#92, to-chk=103/1049) .real_1746521498/All/vim-gtk3-9.1.1265.pkg 9,874,666 100% 22.21MB/s 0:00:00 (xfr#93, to-chk=102/1049) .real_1746521498/All/vim-motif-9.1.1265.pkg 9,847,723 100% 14.38MB/s 0:00:00 (xfr#94, to-chk=101/1049) .real_1746521498/All/vim-tiny-9.1.1265.pkg 1,617,760 100% 1.94MB/s 0:00:00 (xfr#95, to-chk=100/1049) .real_1746521498/All/virtualbox-ose-70-7.0.26.pkg 48,797,700 100% 23.34MB/s 0:00:01 (xfr#96, to-chk=99/1049) .real_1746521498/All/virtualbox-ose-kmod-70-7.0.26.1500038.pkg 162,723 100% 146.19kB/s 0:00:01 (xfr#97, to-chk=98/1049) .real_1746521498/All/vlc-3.0.21_10,4.pkg 11,188,777 100% 43.03MB/s 0:00:00 (xfr#98, to-chk=97/1049) .real_1746521498/All/vmaf-3.0.0.pkg 335,120 100% 1.16MB/s 0:00:00 (xfr#99, to-chk=96/1049) .real_1746521498/All/vte3-0.70.2_5.pkg 437,320 100% 1.06MB/s 0:00:00 (xfr#100, to-chk=95/1049) .real_1746521498/All/vulkan-headers-1.4.304.pkg 1,373,289 100% 2.89MB/s 0:00:00 (xfr#101, to-chk=94/1049) .real_1746521498/All/vulkan-loader-1.4.304.pkg 141,472 100% 289.03kB/s 0:00:00 (xfr#102, to-chk=93/1049) .real_1746521498/All/w3m-0.5.3.20240916_1.pkg 1,072,651 100% 1.99MB/s 0:00:00 (xfr#103, to-chk=92/1049) .real_1746521498/All/wasi-compiler-rt19-19.1.7.pkg 27,420 100% 50.14kB/s 0:00:00 (xfr#104, to-chk=91/1049) .real_1746521498/All/wasi-libc19-25.14.pkg 481,220 100% 810.24kB/s 0:00:00 (xfr#105, to-chk=90/1049) .real_1746521498/All/wasi-libcxx19-19.1.7.pkg 1,090,910 100% 1.60MB/s 0:00:00 (xfr#106, to-chk=89/1049) .real_1746521498/All/wayland-1.23.1.pkg 142,664 100% 204.28kB/s 0:00:00 (xfr#107, to-chk=88/1049) .real_1746521498/All/wayland-protocols-1.39.pkg 108,145 100% 148.96kB/s 0:00:00 (xfr#108, to-chk=87/1049) .real_1746521498/All/webcamd-5.17.1.2_2.pkg 1,849,758 100% 2.29MB/s 0:00:00 (xfr#109, to-chk=86/1049) .real_1746521498/All/webp-1.4.0_1.pkg 494,562 100% 596.26kB/s 0:00:00 (xfr#110, to-chk=85/1049) .real_1746521498/All/webrtc-audio-processing-1.3.pkg 565,914 100% 639.64kB/s 0:00:00 (xfr#111, to-chk=84/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-20240513.1500036_2.pkg 2,696,667 100% 2.55MB/s 0:00:01 (xfr#112, to-chk=83/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca6174_hw21-20240513.1500036 _2.pkg 321,580 100% 6.67MB/s 0:00:00 (xfr#113, to-chk=82/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca6174_hw30-20240513.1500036 _2.pkg 833,271 100% 7.64MB/s 0:00:00 (xfr#114, to-chk=81/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca9377_hw10-20240513.1500036 _2.pkg 845,272 100% 5.45MB/s 0:00:00 (xfr#115, to-chk=80/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca9887_hw10-20240513.1500036 _2.pkg 211,548 100% 898.22kB/s 0:00:00 (xfr#116, to-chk=79/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca9888_hw20-20240513.1500036 _2.pkg 520,882 100% 1.93MB/s 0:00:00 (xfr#117, to-chk=78/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca988x_hw20-20240513.1500036 _2.pkg 290,864 100% 982.86kB/s 0:00:00 (xfr#118, to-chk=77/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca9984_hw10-20240513.1500036 _2.pkg 514,221 100% 1.50MB/s 0:00:00 (xfr#119, to-chk=76/1049) .real_1746521498/All/wifi-firmware-ath10k-kmod-qca99x0_hw20-20240513.1500036 _2.pkg 371,480 100% 1021.90kB/s 0:00:00 (xfr#120, to-chk=75/1049) .real_1746521498/All/wifi-firmware-ath11k-kmod-20240513.1500036_2.pkg 5,289,104 100% 10.57MB/s 0:00:00 (xfr#121, to-chk=74/1049) .real_1746521498/All/wifi-firmware-ath11k-kmod-qca6390_hw20-20240513.1500036 _2.pkg 1,605,695 100% 2.89MB/s 0:00:00 (xfr#122, to-chk=73/1049) .real_1746521498/All/wifi-firmware-ath11k-kmod-qcn9074_hw10-20240513.1500036 _2.pkg 1,940,078 100% 3.15MB/s 0:00:00 (xfr#123, to-chk=72/1049) .real_1746521498/All/wifi-firmware-ath11k-kmod-wcn6855_hw20-20240513.1500036 _2.pkg 2,104,236 100% 2.96MB/s 0:00:00 (xfr#124, to-chk=71/1049) .real_1746521498/All/wifi-firmware-ath12k-kmod-20240513.1500036_2.pkg 2,996,028 100% 3.62MB/s 0:00:00 (xfr#125, to-chk=70/1049) .real_1746521498/All/wifi-firmware-ath12k-kmod-wcn7850_hw20-20240513.1500036 _2.pkg 2,996,207 100% 3.32MB/s 0:00:00 (xfr#126, to-chk=69/1049) .real_1746521498/All/wifi-firmware-iwlwifi-kmod-20241017.1500036_2.pkg 6,225,071 100% 6.06MB/s 0:00:00 (xfr#127, to-chk=68/1049) .real_1746521498/All/wifi-firmware-iwlwifi-kmod-22000-20241017.1500036_2.pkg 798,047 100% 764.06kB/s 0:00:01 (xfr#128, to-chk=67/1049) .real_1746521498/All/wifi-firmware-iwlwifi-kmod-7000-20241017.1500036_2.pkg 849,217 100% 11.25MB/s 0:00:00 (xfr#129, to-chk=66/1049) .real_1746521498/All/wifi-firmware-iwlwifi-kmod-8000-20241017.1500036_2.pkg 529,654 100% 4.11MB/s 0:00:00 (xfr#130, to-chk=65/1049) .real_1746521498/All/wifi-firmware-iwlwifi-kmod-9000-20241017.1500036_2.pkg 564,578 100% 3.37MB/s 0:00:00 (xfr#131, to-chk=64/1049) .real_1746521498/All/wifi-firmware-iwlwifi-kmod-ax210-20241017.1500036_2.pkg 3,098,065 100% 11.72MB/s 0:00:00 (xfr#132, to-chk=63/1049) .real_1746521498/All/wifi-firmware-iwlwifi-kmod-bz-20241017.1500036_2.pkg 937,347 100% 2.76MB/s 0:00:00 (xfr#133, to-chk=62/1049) .real_1746521498/All/wifi-firmware-kmod-20241017.pkg 1,139 100% 3.33kB/s 0:00:00 (xfr#134, to-chk=61/1049) .real_1746521498/All/wifi-firmware-mt76-kmod-20240513.1500036_2.pkg 7,444,955 100% 14.88MB/s 0:00:00 (xfr#135, to-chk=60/1049) .real_1746521498/All/wifi-firmware-mt76-kmod-mt7915-20240513.1500036_2.pkg 1,484,773 100% 2.66MB/s 0:00:00 (xfr#136, to-chk=59/1049) .real_1746521498/All/wifi-firmware-mt76-kmod-mt792x-20240513.1500036_2.pkg 2,818,640 100% 4.25MB/s 0:00:00 (xfr#137, to-chk=58/1049) .real_1746521498/All/wifi-firmware-mt76-kmod-mt7996-20240513.1500036_2.pkg 3,146,211 100% 4.35MB/s 0:00:00 (xfr#138, to-chk=57/1049) .real_1746521498/All/wifi-firmware-mt7601u-kmod-20241017.1500036_2.pkg 28,190 100% 39.10kB/s 0:00:00 (xfr#139, to-chk=56/1049) .real_1746521498/All/wifi-firmware-rtw88-kmod-20241017.1500036_2.pkg 272,018 100% 359.95kB/s 0:00:00 (xfr#140, to-chk=55/1049) .real_1746521498/All/wifi-firmware-rtw88-kmod-rtw8703b-20241017.1500036_2.pk g 28,000 100% 36.70kB/s 0:00:00 (xfr#141, to-chk=54/1049) .real_1746521498/All/wifi-firmware-rtw88-kmod-rtw8723d-20241017.1500036_2.pk g 21,218 100% 27.26kB/s 0:00:00 (xfr#142, to-chk=53/1049) .real_1746521498/All/wifi-firmware-rtw88-kmod-rtw8821c-20241017.1500036_2.pk g 57,444 100% 72.57kB/s 0:00:00 (xfr#143, to-chk=52/1049) .real_1746521498/All/wifi-firmware-rtw88-kmod-rtw8822b-20241017.1500036_2.pk g 80,942 100% 99.30kB/s 0:00:00 (xfr#144, to-chk=51/1049) .real_1746521498/All/wifi-firmware-rtw88-kmod-rtw8822c-20241017.1500036_2.pk g 128,435 100% 154.85kB/s 0:00:00 (xfr#145, to-chk=50/1049) .real_1746521498/All/wifi-firmware-rtw89-kmod-20241017.1500036_2.pkg 1,557,504 100% 1.70MB/s 0:00:00 (xfr#146, to-chk=49/1049) .real_1746521498/All/wifi-firmware-rtw89-kmod-rtw8851b-20241017.1500036_2.pk g 226,639 100% 242.68kB/s 0:00:00 (xfr#147, to-chk=48/1049) .real_1746521498/All/wifi-firmware-rtw89-kmod-rtw8852a-20241017.1500036_2.pk g 392,246 100% 398.60kB/s 0:00:00 (xfr#148, to-chk=47/1049) .real_1746521498/All/wifi-firmware-rtw89-kmod-rtw8852b-20241017.1500036_2.pk g 246,349 100% 245.23kB/s 0:00:00 (xfr#149, to-chk=46/1049) .real_1746521498/All/wifi-firmware-rtw89-kmod-rtw8852c-20241017.1500036_2.pk g 417,353 100% 405.95kB/s 0:00:01 (xfr#150, to-chk=45/1049) .real_1746521498/All/wifi-firmware-rtw89-kmod-rtw8922a-20241017.1500036_2.pk g 575,173 100% 17.14MB/s 0:00:00 (xfr#151, to-chk=44/1049) .real_1746521498/All/wireshark-4.4.6.pkg 30,251,326 100% 38.99MB/s 0:00:00 (xfr#152, to-chk=43/1049) .real_1746521498/All/wpa_supplicant-devel-2025.04.25_1.pkg 698,535 100% 817.94kB/s 0:00:00 (xfr#153, to-chk=42/1049) .real_1746521498/All/x265-3.6.pkg 2,018,620 100% 2.14MB/s 0:00:00 (xfr#154, to-chk=41/1049) .real_1746521498/All/xbitmaps-1.1.2.pkg 22,597 100% 24.17kB/s 0:00:00 (xfr#155, to-chk=40/1049) .real_1746521498/All/xcb-proto-1.17.0.pkg 130,396 100% 137.66kB/s 0:00:00 (xfr#156, to-chk=39/1049) .real_1746521498/All/xcb-util-0.4.1,1.pkg 14,498 100% 15.19kB/s 0:00:00 (xfr#157, to-chk=38/1049) .real_1746521498/All/xcb-util-cursor-0.1.3.pkg 15,075 100% 15.59kB/s 0:00:00 (xfr#158, to-chk=37/1049) .real_1746521498/All/xcb-util-image-0.4.1.pkg 20,455 100% 20.61kB/s 0:00:00 (xfr#159, to-chk=36/1049) .real_1746521498/All/xcb-util-keysyms-0.4.1.pkg 8,657 100% 8.60kB/s 0:00:00 (xfr#160, to-chk=35/1049) .real_1746521498/All/xcb-util-renderutil-0.3.10.pkg 10,282 100% 10.11kB/s 0:00:00 (xfr#161, to-chk=34/1049) .real_1746521498/All/xcb-util-wm-0.4.2.pkg 45,871 100% 44.53kB/s 0:00:01 (xfr#162, to-chk=33/1049) .real_1746521498/All/xdg-utils-1.1.3_4.pkg 53,822 100% 3.02MB/s 0:00:00 (xfr#163, to-chk=32/1049) .real_1746521498/All/xdu-3.0_6.pkg 12,282 100% 363.46kB/s 0:00:00 (xfr#164, to-chk=31/1049) .real_1746521498/All/xkbcomp-1.4.7.pkg 86,024 100% 1.67MB/s 0:00:00 (xfr#165, to-chk=30/1049) .real_1746521498/All/xkeyboard-config-2.41_4.pkg 889,725 100% 8.84MB/s 0:00:00 (xfr#166, to-chk=29/1049) .real_1746521498/All/xmlcatmgr-2.2_4.pkg 23,056 100% 195.79kB/s 0:00:00 (xfr#167, to-chk=28/1049) .real_1746521498/All/xmlcharent-0.3_2.pkg 13,645 100% 104.92kB/s 0:00:00 (xfr#168, to-chk=27/1049) .real_1746521498/All/xmlsec1-1.3.6.pkg 715,230 100% 3.92MB/s 0:00:00 (xfr#169, to-chk=26/1049) .real_1746521498/All/xmlstarlet-1.6.1_4.pkg 226,144 100% 985.91kB/s 0:00:00 (xfr#170, to-chk=25/1049) .real_1746521498/All/xmlto-0.0.28_3.pkg 47,957 100% 194.33kB/s 0:00:00 (xfr#171, to-chk=24/1049) .real_1746521498/All/xorg-cf-files-1.0.8_1.pkg 171,572 100% 598.40kB/s 0:00:00 (xfr#172, to-chk=23/1049) .real_1746521498/All/xorg-fonts-truetype-7.7_1.pkg 936 100% 3.10kB/s 0:00:00 (xfr#173, to-chk=22/1049) .real_1746521498/All/xorg-macros-1.19.3.pkg 22,648 100% 71.58kB/s 0:00:00 (xfr#174, to-chk=21/1049) .real_1746521498/All/xorg-server-21.1.14,1.pkg 1,614,344 100% 4.28MB/s 0:00:00 (xfr#175, to-chk=20/1049) .real_1746521498/All/xorgproto-2024.1.pkg 239,843 100% 592.97kB/s 0:00:00 (xfr#176, to-chk=19/1049) .real_1746521498/All/xpdf-4.05_3,1.pkg 1,737,142 100% 3.74MB/s 0:00:00 (xfr#177, to-chk=18/1049) .real_1746521498/All/xpdfopen-20240312.pkg 11,583 100% 24.64kB/s 0:00:00 (xfr#178, to-chk=17/1049) .real_1746521498/All/xprop-1.2.7.pkg 25,335 100% 52.09kB/s 0:00:00 (xfr#179, to-chk=16/1049) .real_1746521498/All/xrdb-1.2.1_1.pkg 19,239 100% 37.88kB/s 0:00:00 (xfr#180, to-chk=15/1049) .real_1746521498/All/xset-1.2.5_1.pkg 18,918 100% 36.58kB/s 0:00:00 (xfr#181, to-chk=14/1049) .real_1746521498/All/xterm-398.pkg 432,534 100% 777.89kB/s 0:00:00 (xfr#182, to-chk=13/1049) .real_1746521498/All/xtrans-1.4.0_1.pkg 36,847 100% 63.57kB/s 0:00:00 (xfr#183, to-chk=12/1049) .real_1746521498/All/xxd-9.1.1265.pkg 20,072 100% 33.97kB/s 0:00:00 (xfr#184, to-chk=11/1049) .real_1746521498/All/xxhash-0.8.2_1.pkg 96,144 100% 155.71kB/s 0:00:00 (xfr#185, to-chk=10/1049) .real_1746521498/All/yajl-2.1.0.pkg 67,768 100% 104.88kB/s 0:00:00 (xfr#186, to-chk=9/1049) .real_1746521498/All/yasm-1.3.0_1.pkg 604,821 100% 862.26kB/s 0:00:00 (xfr#187, to-chk=8/1049) .real_1746521498/All/yelp-tools-42.0_1.pkg 28,846 100% 39.90kB/s 0:00:00 (xfr#188, to-chk=7/1049) .real_1746521498/All/yelp-xsl-42.0_1.pkg 198,575 100% 258.22kB/s 0:00:00 (xfr#189, to-chk=6/1049) .real_1746521498/All/zip-3.0_3.pkg 234,293 100% 288.89kB/s 0:00:00 (xfr#190, to-chk=5/1049) .real_1746521498/All/zopfli-1.0.3_1.pkg 237,162 100% 280.05kB/s 0:00:00 (xfr#191, to-chk=4/1049) .real_1746521498/All/zstd-1.5.6.pkg 516,975 100% 585.00kB/s 0:00:00 (xfr#192, to-chk=3/1049) .real_1746521498/All/zxing-cpp-2.2.1.pkg 587,019 100% 626.51kB/s 0:00:00 (xfr#193, to-chk=2/1049) .real_1746521498/All/zziplib-0.13.78.pkg 108,517 100% 112.50kB/s 0:00:00 (xfr#194, to-chk=1/1049) sent 605,361,129 bytes received 3,710 bytes 28,156,504.14 bytes/sec total size is 5,173,404,082 speedup is 8.55 bob# The example above is after a revert of this revision. It completed quicly. > > -- > Gleb Smirnoff -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue May 6 18:42: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 4ZsS1k4s8Nz5vFXh; Tue, 06 May 2025 18:42: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsS1k4F6Dz3P30; Tue, 06 May 2025 18:42:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746556954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jKnq0q6QLwioonjw8Yl/AS8QwaVkyfixAOyz3JIhluA=; b=Zzoa+643U6z5/q3ZXq8Gph0sUCj3NWJnV6XzymW8U/dT5+YxC69kRa589EP7VRHwlahrbE b5lJ1bY7A8EZNC+0HN0O388989Q3zE3TP3o6/8QaRslHjEH55NM2fAE4NvOqOYetGu6+5B uSIWLhO8ww4JbxlqSOheuOFpfW4EcTdsTpQvA/E4cstCKmR96MaWBoMTV6ouOpVOymtQXq NlmNjX5SUVtC8z7OXMId62RT5jkvd4HhbR4YTi+xTw0KUlYBXcW/rOq3YaJxOrGECVDQiy I+avGPqPxiov3Owd7onUIQt7HsKGRKKxh1JzobkeP2nMVt3Xw++yNP1DrPB+0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746556954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jKnq0q6QLwioonjw8Yl/AS8QwaVkyfixAOyz3JIhluA=; b=Pa8FwhQoDaQjajiMJiB69XYzkiGkJYPVmRgJKC4oc3MjZ3+mHpqyQa4lj3OrJEBHAGNgXd ktumIKA6hIRA+k4t7DbNzoksbleUZQTS4IBaR3Alwp+UTbGI2j60bPwTIEr31RyS7zGskE 9q2oYKNyqj4OZECgDzuM09t8ST6an2x++nXRyoCIzPhIXiPmMjsWEOoWz/hcpg6LPJMy16 21yqIXxZRWWdpI/43OfgqJvLoICWLNgoZzRD92K0UFRl+eMat7DeU9kMFN305qNihunQLe bJjhJ4yma5srYXF/23vG5zYGNtw282pnoi9IjY3GUUkUbVi4bnItvQIB86ojjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746556954; a=rsa-sha256; cv=none; b=jbj9G5ifl3yBNol6Lo9bis8hsxtiMEiZwtafpjjfbP6maLaroDaeJNgwKV9wi/ticBhg9m 1B5RKcA6D9tbB+mN+6pa0rYoRe4U4D3tUYwo+g2uLsWgjd897qL3dYzjIOF3mPVR5BP31T qfExv4JyS1DgwOA3CI7wT7wtSQxKpYqh+PWvxChiMpHCLNt6sDCIzEx9nEmF+iBemSdWPe 8SLjvWdd8hVWo8Xtx10XRY2A51sWgFAtTF2Argrolod3cvTD0qagcJT5Xa5NZI1zrY1emr lZpgBTv0rYuvNxe1z1Tj34Jo7dUEFzXYnZDNdyCHrUVIA8QagWhOGJWPuWnrqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsS1k3kvnz1B47; Tue, 06 May 2025 18:42:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546IgYgT057129; Tue, 6 May 2025 18:42:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546IgYVO057126; Tue, 6 May 2025 18:42:34 GMT (envelope-from git) Date: Tue, 6 May 2025 18:42:34 GMT Message-Id: <202505061842.546IgYVO057126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 81449fb2c044 - main - service: Use explicit path for /usr/bin/env List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 81449fb2c044a85ecd9c5a15c6b470cdbcacacfc Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=81449fb2c044a85ecd9c5a15c6b470cdbcacacfc commit 81449fb2c044a85ecd9c5a15c6b470cdbcacacfc Author: Ed Maste AuthorDate: 2025-05-06 15:28:13 +0000 Commit: Ed Maste CommitDate: 2025-05-06 18:42:17 +0000 service: Use explicit path for /usr/bin/env A reddit thread[1] reported an error from env(1) invoked by service(8), wwhen GNU coreutils utilities were installed without `g` prefixes. [1] https://www.reddit.com/r/freebsd/comments/1kfzh78/service_command_changed_between_freebsd11_and/ Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50195 --- usr.sbin/service/service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index 65aa18181101..245430107277 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -174,7 +174,7 @@ cd / for dir in /etc/rc.d $local_startup; do if [ -x "$dir/$script" ]; then [ -n "$VERBOSE" ] && echo "$script is located in $dir" - exec env -i -L -/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ${VARS} "$dir/$script" "$@" + exec /usr/bin/env -i -L -/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ${VARS} "$dir/$script" "$@" fi done From nobody Tue May 6 19:27: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 4ZsT1K216Tz5vJYc; Tue, 06 May 2025 19:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsT1K0XsYz3m6X; Tue, 06 May 2025 19:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746559637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kg9nU1u2eN30wtwWM8owZ4WNzgtdSlR4BLye6kygLLA=; b=bbXLps9+KqR4ZUDlBO9pnnBlLMw/qhXXmMzTbFeSPXJ6yOeA3gm0a3Wwx8mw6ota9WvFa8 aoWpSkOdtT31xzeTXlYLWSy9z8z473wdfXzsSE38vUPoqSWP3+fi9rDws++YmsPFJwBT0k PNhjCCvMJkNQtPTC7Wu5X8UjltYCp7N85boWRjumPNaWplOxfGYkvF31HclD18jHiLpdwS HBRRZd1KG77b3r9AaSDHrUqSexcVh1mSSgHmBWFY/NDe727ipldFhDX4cFURo3LATadFbx CEX4xGcPZEerBSq52zVi3gbIdDEx5+DeayEF6/JUFL99nzBkGlthErIY4SI04Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746559637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kg9nU1u2eN30wtwWM8owZ4WNzgtdSlR4BLye6kygLLA=; b=dqPcYwr9QEOkUW+Wu9ToaaNwrVP0PoD+NuV3xqIX4vkI402IwTOymuu1G8st6GF4gMu3sR 6qAwxm28tpAuClzTaHtHYSXY7zLxUGgP/daX2nV33ZwGBYwSRl9BIGo5Qugb6a7pqon4fN M3eU76um5MmjSp50DWg0T818hnqPbxZVHfck55FchWtQ7HIMNcyd9PfgmGKtHYBo2E9DCV DKyTVf+JZgEy1B7sUJdCfP1kx5sJQDcpbegm0s6i1drHDe5lf9nf5E0gJIWVnE9jBgmdlh Vi0FUYBTBmkmVNMDfwAQrk3EEh1VZDNjYi6Im0i7cLPtwghf+OC8uGOP+uDvMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746559637; a=rsa-sha256; cv=none; b=vdDzOH78f/UXxepXQWIcT6PKrk1nSx9Xo/e0IUnCTB/4CamTMwbwKq7bi88ZLCI23PM+aF j7XjW7muF4URhcQpCMwFcatro9m7SfKNrFI59VlXz8uc9Ii495lA8VOr/zY3px9qHIMISr UHIH81FGw1/+oo9EE7bvmnUwOnsENxelzdUNSYffUXjl2MMD3QFiTmLqt5BY4Uc0UhY4vU TKdIpFfdEHCuUhR9tyrebw8Rf8lh92JRzayP0GVc2jUdUzOgWYUj63F9ptjuYCFVZTkSdl UotBL40DWmq7bHOXCa2HJ2CgilsidUBbTgZW0roJWha2aC31GrsQ19mY2ZDm1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsT1J6xbDz1CDg; Tue, 06 May 2025 19:27:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546JRGQc037841; Tue, 6 May 2025 19:27:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546JRGSA037838; Tue, 6 May 2025 19:27:16 GMT (envelope-from git) Date: Tue, 6 May 2025 19:27:16 GMT Message-Id: <202505061927.546JRGSA037838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2ad32d3a6868 - main - mccomphy: Guard the definition of mcommphy_yt8531_setup_delay() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 2ad32d3a68682a9f0652fba7b1283e87d2a0ca5f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2ad32d3a68682a9f0652fba7b1283e87d2a0ca5f commit 2ad32d3a68682a9f0652fba7b1283e87d2a0ca5f Author: Mark Johnston AuthorDate: 2025-05-06 19:26:31 +0000 Commit: Mark Johnston CommitDate: 2025-05-06 19:26:57 +0000 mccomphy: Guard the definition of mcommphy_yt8531_setup_delay() Otherwise I get an unused function warning during amd64 kernel builds. Fixes: a592b5fd9d9c ("mccomphy: add support for YT8531") Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D50191 --- sys/dev/mii/mcommphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/mii/mcommphy.c b/sys/dev/mii/mcommphy.c index c03e891d3173..407b29fd9938 100644 --- a/sys/dev/mii/mcommphy.c +++ b/sys/dev/mii/mcommphy.c @@ -243,6 +243,7 @@ mcommphy_yt8531_speed_adjustment(struct mii_softc *sc) PHY_WRITE(sc, EXT_REG_ADDR, oldaddr); } +#ifdef FDT static int mcommphy_yt8531_setup_delay(struct mii_softc *sc) { @@ -285,6 +286,7 @@ mcommphy_yt8531_setup_delay(struct mii_softc *sc) return (0); } +#endif static int mcommphy_yt8531_setup(struct mii_softc *sc) From nobody Tue May 6 19:34: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 4ZsT9r6pkBz5vJyW; Tue, 06 May 2025 19:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsT9r5WQgz3rK1; Tue, 06 May 2025 19:34:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746560080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NaH9Fhqrld0ILeYSlu4FR3qRIc81g+7J1D+OQYpMHr4=; b=tqzFo/1A90nLpRmxDHdsR/GjuaaDCdOdqWNmznuEMI/6AzeVuTk9gg1cXor6MCeoGEXY19 ltTy4TLmCVlsa6amKfOs9ULVpoGgvdTXfcF24hAYak8gdc3IELyMvFdzdThaqL+E1NU/HK Mf+dhSCobbkPuHqmPG7nX/WjXxKL8Osr5ikry8WP9yXn4aLM+2N3h9+fJPihHo2TJm3n2s NMpu/g6uPpBZitXHdZRaHPEhe59mjcf87o3tjT5QdNztAs5B2m6tby/X23ue7AR0PKJcn2 V30bcs8Yth6mCS2rSNZOanIhzU2zXZiAoofgxKt1JwkM9hIGE+WsBy/tk1QHWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746560080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NaH9Fhqrld0ILeYSlu4FR3qRIc81g+7J1D+OQYpMHr4=; b=PPwU85sy+VWJr3QecZV5+il24Ablk5y5LcLqBhjP/CRuzqQ0J4H5aedhUWGPoG+J7cFTRW Va7TZlCfwuiZI0EgbNyOGO4khTnkNCMcIEXrCXDFVod+wChrEOCOHq+5c8DtVcYTGqD9A2 AZzhW95R731ALaGCVqLK2BP7n1wi6Lwf3yqjaIFmO90omc7Te8g6cEdc4fp843dGFbrozb t4S67zw8/kOdO1k6j06Veq7uaTdnMsekN8m64Ch/I0g7Reja8HfXf4Jjc6AYC1W0qeab5F alEySA0Ad+8Dom27T2GVlEoC4ZONewW8Fuw+oN5CnZOaOi/zfdGoa0rVFcaEtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746560080; a=rsa-sha256; cv=none; b=BZhhSj3TmUoUqv383oICGrsIhnLznOcXDTfPYSlYijRhY/Y5jGkLSDAVdxBCjjpOikJd0t OSxYLDF1rkd7xVo+rhe0LwnIEadzYEcYeUME206Sh7DJBEbihmq8/nIFCcML66r/xZ29oX vAPLkmV3eEWHmbPXnkJVq3shYJQltuy35m+IjhQ/ugJNa6e03cvSWs1FgRm2WF54RQvw+1 SvyQ1wL8x8Ujq0RZbeWoR4MdlE+4PrFgIuTBzmBo6dn7EkHdwp4F15dKu1M2CJS7E+j0AU nWVwLBFxOsBB0/lR96jfBYMsDw2XnH3KTBplVPCrKDwxyjQTAR7SiTdoKm/O/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsT9r47ppz1CV6; Tue, 06 May 2025 19:34:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546JYeL8056491; Tue, 6 May 2025 19:34:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546JYexL056488; Tue, 6 May 2025 19:34:40 GMT (envelope-from git) Date: Tue, 6 May 2025 19:34:40 GMT Message-Id: <202505061934.546JYexL056488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 9a7d03c7df35 - main - sendfile: cover the entire sendfile operation under CURVNET_SET() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a7d03c7df3536cdb5faf0848c6dab4a5d7bcef8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9a7d03c7df3536cdb5faf0848c6dab4a5d7bcef8 commit 9a7d03c7df3536cdb5faf0848c6dab4a5d7bcef8 Author: Gleb Smirnoff AuthorDate: 2025-05-06 18:15:15 +0000 Commit: Gleb Smirnoff CommitDate: 2025-05-06 19:34:26 +0000 sendfile: cover the entire sendfile operation under CURVNET_SET() There is no reason to set/restore for every single pr_send(), as it never changes. Also, cover call into pr_sendfile_wait with CURVNET_SET() fixing recent regression in unix(4). Now we would enter sendfile_iodone() with curvnet set, when called synchronously. Although, it is easy to tell a syncronous call from I/O completion, unfortunately the vnet(9) macros do not support conditional invocation, so just change CURVNET_SET() to CURVNET_SET_QUIET() and add a comment that we are aware of the recursion. Reported-by: syzbot+7b0b20cf2c672c181d98@syzkaller.appspotmail.com --- sys/kern/kern_sendfile.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 1fd1828c37c7..c428d80e0e1a 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -285,6 +285,11 @@ sendfile_iowait(struct sf_io *sfio, const char *wmesg) /* * I/O completion callback. + * + * When called via I/O path, the curvnet is not set and should be obtained + * from the socket. When called synchronously from vn_sendfile(), usually + * to report error or just release the reference (all pages are valid), then + * curvnet shall be already set. */ static void sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) @@ -365,7 +370,7 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) ("non-ext_pgs mbuf with TLS session")); #endif so = sfio->so; - CURVNET_SET(so->so_vnet); + CURVNET_SET_QUIET(so->so_vnet); if (__predict_false(sfio->error)) { /* * I/O operation failed. The state of data in the socket @@ -782,6 +787,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, error = sendfile_getsock(td, sockfd, &sock_fp, &so); if (error != 0) goto out; + CURVNET_SET(so->so_vnet); pr = so->so_proto; #ifdef MAC @@ -1161,7 +1167,6 @@ prepend_header: ("%s: mlen %u space %d hdrlen %d", __func__, m_length(m, NULL), space, hdrlen)); - CURVNET_SET(so->so_vnet); #ifdef KERN_TLS if (tls != NULL) ktls_frame(m, tls, &tls_enq_cnt, TLS_RLTYPE_APP); @@ -1203,8 +1208,6 @@ prepend_header: tcp_log_sendfile(so, offset, nbytes, flags); } #endif - CURVNET_RESTORE(); - m = NULL; if (error) goto done; @@ -1265,9 +1268,9 @@ out: if (tls != NULL) ktls_free(tls); #endif - if (error == ERESTART) error = EINTR; + CURVNET_RESTORE(); return (error); } From nobody Tue May 6 19:34: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 4ZsT9s65TSz5vKJ3; Tue, 06 May 2025 19:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsT9s4kS0z3rMM; Tue, 06 May 2025 19:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746560081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWfWqM8bHEKVeCLEVN2EwyO6PaPmrX4PeZBJ0LqcVh8=; b=mEwvEDk4AbpXQoVXH6C3kqewYHuifCVaB4LwmiXBMKX+MUj2g3X67T2a9h2SKlqNHeBo94 of2dKl1vExiBf7ochoD5GDIL33/DBStopv7tx2VBg3+/WLQ+8xRaxtOPjJA2PgG+vqLXsy ygWCYVbcLpFHOz38TpEX27xFmkFTJUkgdKrIjcZvXKPl5h3ACy5DTan4Tiz159qNPN6umt /OlBw6Lh3mBqM3ZmekYr4czj9MYTYYUTiL+v4c/9PcquHutHaSfcQiCFh8gc+TW74usVLk 1fnLcnxeSp4/yZ960GNyV+Dxeyhj/kprsTe+zHlQsfvO+085+BcyoCzHjhJK7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746560081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWfWqM8bHEKVeCLEVN2EwyO6PaPmrX4PeZBJ0LqcVh8=; b=W+BxIXORxcxF2qb1qca+5g/VrRbZL58JQIKwkVa+uPyPooA0LysX1Vyw/7fGmUr3NElWDx 9GXhMN5wpkSGzM/dDUvpupkxey54Z4XlYgzXRcEll91jMLKQZix3NFcAsuWxa7qN6cptfT oAvfB25AI5CTRnwtOfTQwFvqiDKiltcbTUq1FhNtIBe9eq6/+dMEsmVw/EDkTT6ZJC4PpK Og3UVh2soZYB1/86tx4Ajr4TGjVTqlj88QM8yqKkrK6swJKsgSymAJNVZjCDt77Z4D3qd0 Cu1NE2qw+wkfC4KZk24w13l3Vj5EBuTFgGOAjaScWV62WF3W+iqWspR1ucNEOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746560081; a=rsa-sha256; cv=none; b=GcWA2mx5GoU4UxrxkvOEruDwpez7CoRRActA61vILuXOoVHds547NgF0qEonhC8TZR5ACs IV17w+FCyXjio5s7atzopCqxKZdLR8iGVC62AczZF/xkq++hhGj9A8mh3A5mKK/4MKqzGN 9DCCVlBpljue0hGdemfYHBlvsdhtTEIOP67uSK9CWHUvT4j5W0my/NlSLPJ0olPUDzZSqX FSkL/QxlN1AZ0IohukMxpLEEDMRcXxgz649dy+Ew/ZzcCnkdAPSXyJoTxIQ0ZuL+Hpx4XP YUlI7/p3nyR3XBazedGEuoaYrataWsrn7P2e/OwYv93L8l6OzauI3W7WcpkTvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsT9s4KRvz1C4J; Tue, 06 May 2025 19:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546JYf8U056529; Tue, 6 May 2025 19:34:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546JYfFo056526; Tue, 6 May 2025 19:34:41 GMT (envelope-from git) Date: Tue, 6 May 2025 19:34:41 GMT Message-Id: <202505061934.546JYfFo056526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 964fe0fd4d52 - main - unix: fix skipping of M_NOTREADY mbufs in unp_dispose() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 964fe0fd4d522c218cb73429e6304ce26ba61b50 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=964fe0fd4d522c218cb73429e6304ce26ba61b50 commit 964fe0fd4d522c218cb73429e6304ce26ba61b50 Author: Gleb Smirnoff AuthorDate: 2025-05-06 19:24:07 +0000 Commit: Gleb Smirnoff CommitDate: 2025-05-06 19:34:26 +0000 unix: fix skipping of M_NOTREADY mbufs in unp_dispose() Of course the loop variable doesn't need to be updated here. Fixes: d15792780760ef94647af9b377b5f0a80e1826bc --- sys/kern/uipc_usrreq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 06b3317dc775..95904d2b9be5 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -4213,10 +4213,9 @@ unp_dispose(struct socket *so) while (m != NULL && m->m_flags & M_NOTREADY) m = m->m_next; for (prev = n = m; n != NULL; n = n->m_next) { - if (n->m_flags & M_NOTREADY) { - n = n->m_next; - prev->m_next = n; - } else + if (n->m_flags & M_NOTREADY) + prev->m_next = n->m_next; + else prev = n; } sb->uxst_fnrdy = NULL; From nobody Tue May 6 19:34: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 4ZsT9v2mCFz5vKG0; Tue, 06 May 2025 19:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsT9t5dhkz3rQd; Tue, 06 May 2025 19:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746560082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RMwK81X764OdD4Jxe8USXlo7zdoqBXKGg7f34PURSZ8=; b=O/c2g+6Sm2kudjkVNg6H5JLN4WIFKZ23KCZRYXUv0qgRq/0puoa7MaHkXRqxBI2whPB2A2 T83L3RX3MEZRPwkgz6vinVIzq69dJWUs196DAVzQmpauy+2xvRHFnzws8JJh3h59OlYuru dFzx+m2CoyZV4/8jUiF8Qy6Osmu86DpzwG/32iT243hUR3MM28Sy1uDB4FE/HAKB7XigFf rQU4redDS7hij2pC6moxD52YY3sGz/U+gfmcNZBceBnPtUz4kXTGnWvFTQ5E4uas4TZVZP yg7nXwi/uABaM28WNhVp0o1cxn5aSuuxPQ9JOVB+1PNwDmlNK3muO1+qLNbRaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746560082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RMwK81X764OdD4Jxe8USXlo7zdoqBXKGg7f34PURSZ8=; b=aDQEA0pBcMiTQuLMn+YtY7pJFOg+5MCL6ot038CTj4YxOhHcdxlNDAMzeE3OzGP7oImaPI LaApHy+buvnAWag8C8PyrU86cYLmtlQZ4trmeZpldh3JOTHOEQ74eaZbxekfcVdhFLiVWb YEdODC7z3pc5U0t45sEdttyK9XhykSdgdIpwfgYzj1U9zik9b/2M/bF2NoXClDU1aGa0+G 89e5q6xJq2xp6AMtN217jW6BLvcKUe/pTXhGXnp8V99aSj8uf2OzIy3Le0yD8rNycr+f6O XvfU4emzOd+xeYddEECnjInaLjXNcWMO5lvLBeQ4oIkiXTq1PJHdAvwMOOjbKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746560082; a=rsa-sha256; cv=none; b=rq67WL8tl5WUYP70D31bxqv3hdJwYRkqJ/4NavENEdT5feiKYEmBlMG3FNLPXDv4/i7HJr TRTb7yb36RdSbcUk4euHZElLg2fk/kFqRK62+0R6KyrLwIJGcpKKYZgPO2Ak5RIyHi9GRJ SvsaBvpt3GJk2ziosw93omAeaKnvKyHmwrDlSvngsHTwP8/1O1g/JIcaGgaTlASJbJNY6g SrGCGNi24K80MjfdMekdJahzYAfblUK5jJ7mB9vfmO2PlrIwj1hUKtCka5ZE+oXP2jDtov vxEtkWSpZzB43ppTkMsN2gdtv2BFnRD1B/6gA/WPcrK3Gl1wRQO9sYpAaSN4Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsT9t5Dsgz1Byw; Tue, 06 May 2025 19:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546JYgFw056563; Tue, 6 May 2025 19:34:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546JYgGE056560; Tue, 6 May 2025 19:34:42 GMT (envelope-from git) Date: Tue, 6 May 2025 19:34:42 GMT Message-Id: <202505061934.546JYgGE056560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 9208c8bf1874 - main - unix: in sendfile method mark bufs as M_BLOCKED if not ready data present List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 9208c8bf187484f5987a3ad68b3787dfe90cb7c5 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9208c8bf187484f5987a3ad68b3787dfe90cb7c5 commit 9208c8bf187484f5987a3ad68b3787dfe90cb7c5 Author: Gleb Smirnoff AuthorDate: 2025-05-06 19:31:27 +0000 Commit: Gleb Smirnoff CommitDate: 2025-05-06 19:34:27 +0000 unix: in sendfile method mark bufs as M_BLOCKED if not ready data present Fixes: d15792780760ef94647af9b377b5f0a80e1826bc --- sys/kern/uipc_usrreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 95904d2b9be5..1722a43a800e 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2436,8 +2436,11 @@ uipc_sendfile(struct socket *so, int flags, struct mbuf *m, sb->sb_acc += mc.mc_len; wakeup = true; } - } else + } else { + STAILQ_FOREACH(m, &mc.mc_q, m_stailq) + m->m_flags |= M_BLOCKED; wakeup = false; + } STAILQ_CONCAT(&sb->uxst_mbq, &mc.mc_q); UIPC_STREAM_SBCHECK(sb); if (wakeup) From nobody Tue May 6 19:40: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 4ZsTJQ6KDmz5vKSD for ; Tue, 06 May 2025 19:40:22 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (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 4ZsTJQ3TFrz3wCK for ; Tue, 06 May 2025 19:40:22 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-6e8f4c50a8fso58583536d6.1 for ; Tue, 06 May 2025 12:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; t=1746560421; x=1747165221; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ns37dE8UmmLQbCjqA/qRrQ/YVh6EklMXppUINJ1b3gY=; b=G7rV4L7s7ALk+WzrVL6512VnJXliNBJGQGFxz4bj/pK5e5XepD7cwzOxyArYULFqE/ w8F0C+lXUK7mf3F98aoL6uXMZZQIwtvv2nGfjCaFYOE/zE1jUq8eYatKFgiyg71lYKYw lXhkOPIO8QeUnrP6F4AXAwOMlIK3xtVCXGo/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746560421; x=1747165221; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ns37dE8UmmLQbCjqA/qRrQ/YVh6EklMXppUINJ1b3gY=; b=HgC0aEGmgBx3pEyilaFbVHLPDQv5LQO0OwskdJRCvjtA+E50IkVMTpBeLpvfjrYSzE WwQnmHsqPX72VPH8R43+rvfPvk47ibD01dHTi9wUTpv/WebVVF9jL99P4dr/6Q+gsB0U C2u6f5E/VsOdyHTZIVm6+bB4O5I4K8kF8JBAN0oNPKklB5HKhnq4U68z3NHINxqZG0UC TdyeUaDlb2LDZjkLfY9Yevxa5Lq5sxU9Cbj31QxBv0uHXmAXhaGlKU28BqmZaOk5i02I yF9dR55qu7vBAk3CQeHRTohLLw9hL0FTEi6YOqeEjndJW6E4FduRiA8w9RBsZtrpkaWu h+3A== X-Forwarded-Encrypted: i=1; AJvYcCU2ST4zSrQfsPbM9WbuPIBYQvs0Xq/547W49jaeT256ojg8MzgbspGGI1Tw1VdX7SbUJsW5IyZVMNgG7lAC/H7USXC5Hw==@freebsd.org X-Gm-Message-State: AOJu0YwjeQg3VZBjbneD8qPOKata4kzU2LRc/BmUiw3iW8Zmobgcmb9Y p/YCUSvoyMo46vFHMnsa3WzVBHV1JCm8Yz1SxOLuWT9IWFAzpj/SB/5vkZqPcmKXJfC9wxD+FCg lh1i9Uk2hb/B1C1obLB9eG1UZYkd6aodrhTha99QoDjF2Nes9gvNI X-Gm-Gg: ASbGncuh10jiXRvEo1QiZdDoUxRo88BQvPEi+gE0uWGjM3xpaWuR+OMRNNDGmlKEWMp kde+JFRs61X8WUfuFX2xVJG4VToWe1FXV7vZRk88LIDKlvhU7/wcpqD17KVAuw7xGUfyOhWBdu0 nLNdKqL3TBRdhWrVh7yPtI5ws= X-Google-Smtp-Source: AGHT+IGnHXUq6o8rypvquzHRef1wqOjfSYcwm8PO/GzbST5xbPOntdRFq/kDyTyTlzqJHB45uSxdum8uXwh6IqHg+mI= X-Received: by 2002:a05:6214:29cd:b0:6d4:1bad:740c with SMTP id 6a1803df08f44-6f5429c052bmr5984566d6.4.1746560421523; Tue, 06 May 2025 12:40:21 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202505061934.546JYexL056488@gitrepo.freebsd.org> In-Reply-To: <202505061934.546JYexL056488@gitrepo.freebsd.org> From: Kevin Bowling Date: Tue, 6 May 2025 12:40:09 -0700 X-Gm-Features: ATxdqUGA8utp5mL908m3bHL_9Mp4OWmLaaLcfbwHiWqvB9ekIJObKEm_MrbP4xU Message-ID: Subject: Re: git: 9a7d03c7df35 - main - sendfile: cover the entire sendfile operation under CURVNET_SET() To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4ZsTJQ3TFrz3wCK X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Spamd-Bar: ---- On Tue, May 6, 2025 at 12:34=E2=80=AFPM Gleb Smirnoff = wrote: > > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D9a7d03c7df3536cdb5faf0848c= 6dab4a5d7bcef8 > > commit 9a7d03c7df3536cdb5faf0848c6dab4a5d7bcef8 > Author: Gleb Smirnoff > AuthorDate: 2025-05-06 18:15:15 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-05-06 19:34:26 +0000 > > sendfile: cover the entire sendfile operation under CURVNET_SET() > > There is no reason to set/restore for every single pr_send(), as it n= ever > changes. Also, cover call into pr_sendfile_wait with CURVNET_SET() f= ixing > recent regression in unix(4). > > Now we would enter sendfile_iodone() with curvnet set, when called > synchronously. Although, it is easy to tell a syncronous call from I= /O > completion, unfortunately the vnet(9) macros do not support condition= al > invocation, so just change CURVNET_SET() to CURVNET_SET_QUIET() and a= dd a > comment that we are aware of the recursion. Seeing a build error on main with this --- kern_sendfile.o --- /usr/src/sys/kern/kern_sendfile.c:788:6: error: variable 'saved_vnet' is used uninitialized whenever 'if' condition is true [ -Werror,-Wsometimes-uninitialized] 788 | if (error !=3D 0) | ^~~~~~~~~~ /usr/src/sys/kern/kern_sendfile.c:1273:2: note: uninitialized use occurs he= re 1273 | CURVNET_RESTORE(); and /usr/src/sys/kern/kern_sendfile.c:788:2: note: remove the 'if' if its condition is always false 788 | if (error !=3D 0) | ^~~~~~~~~~~~~~~ 789 | goto out; | ~~~~~~~~ > Reported-by: syzbot+7b0b20cf2c672c181d98@syzkaller.appspotmail.com > --- > sys/kern/kern_sendfile.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c > index 1fd1828c37c7..c428d80e0e1a 100644 > --- a/sys/kern/kern_sendfile.c > +++ b/sys/kern/kern_sendfile.c > @@ -285,6 +285,11 @@ sendfile_iowait(struct sf_io *sfio, const char *wmes= g) > > /* > * I/O completion callback. > + * > + * When called via I/O path, the curvnet is not set and should be obtain= ed > + * from the socket. When called synchronously from vn_sendfile(), usual= ly > + * to report error or just release the reference (all pages are valid), = then > + * curvnet shall be already set. > */ > static void > sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) > @@ -365,7 +370,7 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, = int error) > ("non-ext_pgs mbuf with TLS session")); > #endif > so =3D sfio->so; > - CURVNET_SET(so->so_vnet); > + CURVNET_SET_QUIET(so->so_vnet); > if (__predict_false(sfio->error)) { > /* > * I/O operation failed. The state of data in the socket > @@ -782,6 +787,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *= hdr_uio, > error =3D sendfile_getsock(td, sockfd, &sock_fp, &so); > if (error !=3D 0) > goto out; > + CURVNET_SET(so->so_vnet); > pr =3D so->so_proto; > > #ifdef MAC > @@ -1161,7 +1167,6 @@ prepend_header: > ("%s: mlen %u space %d hdrlen %d", > __func__, m_length(m, NULL), space, hdrlen)); > > - CURVNET_SET(so->so_vnet); > #ifdef KERN_TLS > if (tls !=3D NULL) > ktls_frame(m, tls, &tls_enq_cnt, TLS_RLTYPE_APP); > @@ -1203,8 +1208,6 @@ prepend_header: > tcp_log_sendfile(so, offset, nbytes, flags); > } > #endif > - CURVNET_RESTORE(); > - > m =3D NULL; > if (error) > goto done; > @@ -1265,9 +1268,9 @@ out: > if (tls !=3D NULL) > ktls_free(tls); > #endif > - > if (error =3D=3D ERESTART) > error =3D EINTR; > + CURVNET_RESTORE(); > > return (error); > } From nobody Tue May 6 20:05: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 4ZsTsg0hj8z5vLLh; Tue, 06 May 2025 20:05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsTsf675Wz4H5s; Tue, 06 May 2025 20:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746561942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWQyB4K0hNBReuVSdjrcLJioxt23MDJePXikIqanREQ=; b=FT9Z8fLxAlbifZvoiVY9h/gVh0DyZ8UihV9kyamngQaKgvVEfvPMU1SmbMBWChBvmBAi+9 yTc6DGOFwkkDGG0YDu/sK0dIK4Uk6BqlFtL1VQC5vzwOGZ3rJeIMwDp1qCyxCcyxyhKSpb ipYsEPkiQcIXKql6KcRm3KhM0CCuxBKGdLvHF/6QjM21SInhPU9vKlRjB/G+mnAuqlEocm kJwssCZI2jsv6ZZgI+ZMmlj5cr6CzdP9DjqxH8r2SybetWqGaIt1HHz+e0nxPgYIj59KbC Wzn+3C+dUNHxz0CemISfFue4O5guGW7frhYKF0eNA3D3Xv3c0A+YG/f5+EZ36w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746561942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWQyB4K0hNBReuVSdjrcLJioxt23MDJePXikIqanREQ=; b=YCyiuGwjMFHZJRJwXqSmjAK3tLruJPPeGfez5jxxiLl/EUDa1J5bBq01Betm6FZqEEax1p pnYXstFtoEzTBI5/tNXegeWcxGocRYElaTCUtTNnqFjf5ZbKZQRpfKO88swcI7W62K26Ep sENfeh1x9GdERUIQPe5jhSUhJUABqtJbSxjlMNTfnTYZCHbVvUqYbooK0BnvcA6ENo6g1k VBU+/tslTG9uZUUItbptyuSVdXkyKUBaw4+DMFKwn5wksuM/Pezpm/ngneV02nGrTad0dB 9he3eq26sgVLCtbWjXbVvVrigoK13ReEiLsuh8r6JLPkEkY8q7N7XJlAuLzzVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746561942; a=rsa-sha256; cv=none; b=TFQgKZTWef+WwH1yQHH7zFNx9rFa/RDARmJ/s+95MowewqpbagYC0Sr5bBz1dG4go9zr9o 7G6/OIc9QkTsS+21fgz+mQrdTtXrZ2gTN9iF4SK3Wi4W3BWgSm6XsGqGNDxzgK0YWk+L2X 2p0fkCFNy7x/k1ivQYA75jLAJnFkYYzNkVfhdWjJ56IiKV6IZIsFrKC+Tjz3CfRlgto5Gf 9gySouZkixxZuXitzY4kY/eJjlTRBKw60Qg/xnb/jG6HwMO/aEfPTMNwiOzQxDE8G93Miu IirQFkyhcEVNiFHot6wBNWDgZLXbVT/MhxvOXs7StwENd4LDF7KG47/ou8Rlcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsTsf5dVBz1D7X; Tue, 06 May 2025 20:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546K5gYP015143; Tue, 6 May 2025 20:05:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546K5g9g015140; Tue, 6 May 2025 20:05:42 GMT (envelope-from git) Date: Tue, 6 May 2025 20:05:42 GMT Message-Id: <202505062005.546K5g9g015140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 56a3db77fdfd - main - sendfile: fix CURVNET_SET()/CURVNET_RESTORE() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 56a3db77fdfde014aab5430e24efe10cffa15fe6 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=56a3db77fdfde014aab5430e24efe10cffa15fe6 commit 56a3db77fdfde014aab5430e24efe10cffa15fe6 Author: Gleb Smirnoff AuthorDate: 2025-05-06 20:00:45 +0000 Commit: Gleb Smirnoff CommitDate: 2025-05-06 20:00:45 +0000 sendfile: fix CURVNET_SET()/CURVNET_RESTORE() Keep it set around the main cycle that works with the socket and restore before the cleanup path, cause there are jumps into cleanup that precede the main cycle. Fixes: 9a7d03c7df3536cdb5faf0848c6dab4a5d7bcef8 --- sys/kern/kern_sendfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index c428d80e0e1a..cfacfe40b832 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -787,7 +787,6 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, error = sendfile_getsock(td, sockfd, &sock_fp, &so); if (error != 0) goto out; - CURVNET_SET(so->so_vnet); pr = so->so_proto; #ifdef MAC @@ -817,6 +816,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, error = SOCK_IO_SEND_LOCK(so, SBL_WAIT | SBL_NOINTR); if (error != 0) goto out; + CURVNET_SET(so->so_vnet); #ifdef KERN_TLS tls = ktls_hold(so->so_snd.sb_tls_info); #endif @@ -1225,6 +1225,7 @@ prepend_header: */ if (trl_uio != NULL) { SOCK_IO_SEND_UNLOCK(so); + CURVNET_RESTORE(); error = kern_writev(td, sockfd, trl_uio); if (error == 0) sbytes += td->td_retval[0]; @@ -1233,6 +1234,7 @@ prepend_header: done: SOCK_IO_SEND_UNLOCK(so); + CURVNET_RESTORE(); out: /* * If there was no error we have to clear td->td_retval[0] @@ -1270,7 +1272,6 @@ out: #endif if (error == ERESTART) error = EINTR; - CURVNET_RESTORE(); return (error); } From nobody Tue May 6 20:38:46 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 4ZsVbp5ZrTz5vQ3x; Tue, 06 May 2025 20:38: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsVbp4PNKz3T1M; Tue, 06 May 2025 20:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746563926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EFc9+ABgSBED42DNBhBFgFAKXZCmoNgARxOW9LrDZ7A=; b=Ngwgw+/6xPTz94o4g0162bkOv+uMfEwm35oc/XkRaH+6QYHFOD1XagdgQJ72wVtoeGcKOu 0DIwrhCNIkLv+XxLtEqpN2p/M67n7R1+bUFlvy5EabK8z1Ra7aTLKpro81GzQNkUnFyFMy iMRQFOf0eXYfunPC5Dwk4BkuRK5rsc+F/84WBZ4gjSxCmEMhcPsLTd7bLB9J+Orz2W+TtN DcMuRuJ2Pijyj65bjZPqSqRrFO2W6E4CVe8xSBWB1QUW8etclHXJvHwmb+/RAl9+Q5rMqj JbL3b3bj/wK7HMR/LSF+4kTZhQltbs8UxLc9j7TbbDdA1MaEFp1ipCn55WgavA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746563926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EFc9+ABgSBED42DNBhBFgFAKXZCmoNgARxOW9LrDZ7A=; b=NlQqfstIw3wr07ZT5vfOUihrXAIOo0JsGl0ha6O1l96itdTznaEQpl4u6L40VPQ+JPZAVT +B8s4oMmBAdKeNg/3epJGzGC+CkWiY5pJwJ/1jyRbkYzsOG5EA/WgU9XszkpUuerxFNdiJ /ua2eqQe6E7IlIqIUlWh70UaeTSvuOtfITFx3j+dqfcjP88cSRDEi38fNFkL7/A4kWpvFb LDU4CPbC0yhOK/+MA957Qn68ov64kIkPSq1hnzj0f+McUKmpqn8TOigp5Biyho8A4P3cnT 0kAcGhwVNKr9KSe/qloz8OHMWogUAejfR/MxL7DdklEWx+wOIbE/SsMo+JBRMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746563926; a=rsa-sha256; cv=none; b=VhEtosIkp9ROqfB0Xr1ZpauyKY/+cdbhAkclSzIC6tZnL+rYFmnybpsrxhJOpA91mfYZQM 0GmCYARbQZS38YepahY6N5xs0n3PiT4JyDCD+7pr5G4v8bVhKxsA3l803+9pXJuYlXnpTJ +IDuSpcEuglETFXPJu+G/QpHM9kpoItDk+vm0TsD3WqlUGv9JCIrHJcuvWD3Vm9Ohbjj1Z SSiEMvmgVSxXwkdOlz+aIaHO/BB13NZNNwCCMV0QPnZgvEdUVU8G4f4iy0/K5jCIXz+c4c SxYLhUU28P/eWZTmXTKvSSM7w1TqiICv34vVSg0GYGrq5+LMqHuWXW70loaCfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsVbp3mFVz1DbB; Tue, 06 May 2025 20:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546KckNO072762; Tue, 6 May 2025 20:38:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546KckHj072759; Tue, 6 May 2025 20:38:46 GMT (envelope-from git) Date: Tue, 6 May 2025 20:38:46 GMT Message-Id: <202505062038.546KckHj072759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 0660de8172cd - main - runat: Add a runat(1) utility similar to the Solaris 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0660de8172cd5a03affb9e87a1007cac5ba30425 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=0660de8172cd5a03affb9e87a1007cac5ba30425 commit 0660de8172cd5a03affb9e87a1007cac5ba30425 Author: Rick Macklem AuthorDate: 2025-05-06 20:36:06 +0000 Commit: Rick Macklem CommitDate: 2025-05-06 20:36:06 +0000 runat: Add a runat(1) utility similar to the Solaris one Solaris has a utility called runat(1) that runs a shell command on a named attribute directory. This utility is modelled after that one. Reviewed by: kib (earlier version) Differential Revision: https://reviews.freebsd.org/D49850 --- usr.bin/Makefile | 1 + usr.bin/runat/Makefile | 3 ++ usr.bin/runat/runat.1 | 63 +++++++++++++++++++++++++++++++++++++++++ usr.bin/runat/runat.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 7f35a87b0d93..e99670ec2d3e 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -123,6 +123,7 @@ SUBDIR= alias \ revoke \ rpcinfo \ rs \ + runat \ rup \ ruptime \ rusers \ diff --git a/usr.bin/runat/Makefile b/usr.bin/runat/Makefile new file mode 100644 index 000000000000..6be86ce4a60b --- /dev/null +++ b/usr.bin/runat/Makefile @@ -0,0 +1,3 @@ +PROG= runat + +.include diff --git a/usr.bin/runat/runat.1 b/usr.bin/runat/runat.1 new file mode 100644 index 000000000000..ceaf70ed1dba --- /dev/null +++ b/usr.bin/runat/runat.1 @@ -0,0 +1,63 @@ +.\" +.\" Copyright (c) 2025 Rick Macklem +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd April 15, 2025 +.Dt RUNAT 1 +.Os +.Sh NAME +.Nm runat +.Nd run a shell command on a named attribute directory +.Sh SYNOPSIS +.Nm +.Op Ar file +.Op Ar shell command +.Sh DESCRIPTION +The +.Nm +utility runs the shell command on the named attribute directory for the +.Ar file +argument. +It does a +.Xr fchdir 2 +system call to change the current working directory into the +named attribute directory for the +.Ar file +argument and then performs the shell command via +.Xr sh 1 . +.Pp +If a named attribute directory does not exist for +.Ar file , +an empty one will be created. +If an application needs to determine if a named attribute +exists for the +.Ar file , +.Xr pathconf 2 +with the name +.Fa _PC_HAS_NAMEDATTR +may be used. +This will not create an empty named attribute directory +if one does not exist for +.Ar file . +.Sh EXAMPLES +For a +.Ar file +called +.Dq myfile : +.Bd -literal +$ runat myfile ls -l # lists the attributes for myfile +$ runat myfile cp /etc/hosts attrhosts # creates attrhosts +$ runat myfile cat attrhosts # displays contents of attrhosts +.Ed +.Sh SEE ALSO +.Xr sh 1 , +.Xr fchdir 2 , +.Xr pathconf 2 , +.Xr open 2 , +.Xr named_attribute 7 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 15.0 . diff --git a/usr.bin/runat/runat.c b/usr.bin/runat/runat.c new file mode 100644 index 000000000000..66f4ebadd180 --- /dev/null +++ b/usr.bin/runat/runat.c @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2025 Rick Macklem + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void +usage(void) +{ + (void)fprintf(stderr, "usage: runat " + "\n"); + exit(1); +} + +int +main(int argc, char *argv[]) +{ + int i, file_fd, nameddir_fd, outsiz; + char *buf; + long named_enabled; + size_t pos, siz; + + if (argc <= 2) + usage(); + argv++; + argc--; + if (argc < 2) + usage(); + + named_enabled = pathconf(argv[0], _PC_NAMEDATTR_ENABLED); + if (named_enabled <= 0) + errx(1, "Named attributes not enabled for %s", argv[0]); + + /* Generate the command string for "sh". */ + siz = 0; + for (i = 1; i < argc; i++) + siz += strlen(argv[i]) + 1; + buf = malloc(siz); + if (buf == NULL) + errx(1, "Cannot malloc"); + pos = 0; + for (i = 1; i < argc; i++) { + outsiz = snprintf(&buf[pos], siz, "%s ", argv[i]); + if ((size_t)outsiz > siz) + errx(1, "Arguments too large"); + pos += outsiz; + siz -= outsiz; + } + buf[pos - 1] = '\0'; + + file_fd = open(argv[0], O_RDONLY | O_CLOEXEC, 0); + if (file_fd < 0) + err(1, "Cannot open %s", argv[0]); + nameddir_fd = openat(file_fd, ".", O_RDONLY | O_CLOEXEC | O_NAMEDATTR, + 0); + if (nameddir_fd < 0) + err(1, "Cannot open named attribute directory " + "for %s", argv[0]); + + if (fchdir(nameddir_fd) < 0) + err(1, "Cannot fchdir to named attribute dir"); + + execl(_PATH_BSHELL, "sh", "-c", buf, NULL); + err(1, "Could not exec %s", _PATH_BSHELL); +} From nobody Tue May 6 21:20: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 4ZsWX327cmz5vS90; Tue, 06 May 2025 21:20:35 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsWX31gKnz3qCg; Tue, 06 May 2025 21:20:35 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746566435; 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=1LjZVWwbtzv/zS8Ci6TkVHqkF1Jl4umR5AX2v/2rako=; b=v7xfqLVxVyfWbebpQm9sON50oc39khLSb8SYJbXWQGkpgUzQygwlwzmAR5dUToJH2Ugm6r BtwuMLpTkOvsxZ+vz+C96nbsG9T9dG93aEDUoL3vgohxZSam8DKIq3tye3aogIpCeDSoIA AQhlSoFy1akwkLlg7w55NFDG1puSi3ICESSnrR+Lhbg8dKhBhFXWb/gt8CBvmuxMUGaDwg HMBNAr3VJsrP7B7SUT9JdlW5u1s4ln7hHGwIR/2xRMPPzM0RGWUXI1Hyx+hsRBtEtm8OJL 7MeyH7zD+PXs2RWkK8253RdtxBZ+0lZPfyJjKR4jYNxS1TUfTtb9CTgh6ZUvDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746566435; 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=1LjZVWwbtzv/zS8Ci6TkVHqkF1Jl4umR5AX2v/2rako=; b=P7/zn8+nCg6omJHT07vWY2j28Zy9ncsBegC0J20xqmQnGn2w3aHsgY2tcp2QtkqGGqI+QN YvCsYgIaV+hECdcf0EiT3Id10d9FsbN3rrBZffkPOlEkSAqBLKw3Jn6Y/4cyr0LTb7c8Pc tLDkb8RN+V839FTgs6Wzq/3svOoazVdk+aj4OXiezzEYkL+NZGtZzN+hDguzkJTzaS7lYi EvYUnZxgOriWQheqLXiOmmQcx1tU9hcoqHVzNvkkDW7sQYsdoZglRyZ5eRnUEEp3ZPGxj9 ctgdIh0fRVzu3GaehBhIGDMtXBtgsI/T0jX/81WDu4pfpmmPmuoO6gIS+Oxw8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746566435; a=rsa-sha256; cv=none; b=VyWKmNTQ1QLLpOUljrbpKqp0vUvqZHZe9Zu70etzWjAAmnE6NCwifGmwng9bks9iyNjosC zrDa6FjcX7t4E7zl0D0jvcpZvmoAdMZ4Ga6pw/BkWK9allgAaKu8zbhbibyM/41XCFZFJ7 wG00qSlK0RyHktB1D7AQStc53zY4NWwxH3n87x9DJSNRJX5zf9tYMXyXLne74Qym5D7VJZ qEAp3MnF6SFZ2R5TzE8JRnFx5SPc1YtaoqXshsoZMc+aIZVjGqVi20IuQ562MePkgjZ1/G 4yf/LmZuAaDQVqglq6MTBM2tjEJu2tGpqiHvB5+dWCQVWdKXVw0Y/6ugOTr33Q== 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 4ZsWX23wGCz10WP; Tue, 06 May 2025 21:20:34 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 6 May 2025 14:20:32 -0700 From: Gleb Smirnoff To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket Message-ID: References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> <20250506150654.DEAF8300@slippy.cwsent.com> <20250506154446.917B818D@slippy.cwsent.com> <20250506172901.E5DA4305@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: multipart/mixed; boundary="llvy8OFwqUtJAMbb" Content-Disposition: inline In-Reply-To: <20250506172901.E5DA4305@slippy.cwsent.com> --llvy8OFwqUtJAMbb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 06, 2025 at 10:29:01AM -0700, Cy Schubert wrote: C> In the case of /usr/obj I did, C> C> rsync -aHv --delete --progress /usr/obj/. other_server:/usr/obj/. I think I was able to reproduce, but not sure. Can you please try the attached patch at your setup? -- Gleb Smirnoff --llvy8OFwqUtJAMbb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename=uipc_sopoll.diff diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 1722a43a800e..0836652b6a24 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1681,11 +1681,12 @@ uipc_sopoll_stream_or_seqpacket(struct socket *so, int events, (POLLOUT | POLLWRNORM); if (sb->sb_state & SBS_CANTRCVMORE) revents |= POLLHUP; - if (!(revents & (POLLOUT | POLLWRNORM))) + if (!(revents & (POLLOUT | POLLWRNORM))) { so2->so_rcv.uxst_flags |= UXST_PEER_SEL; + selrecord(td, &so->so_wrsel); + } SOCK_RECVBUF_UNLOCK(so2); - } - if (!(revents & (POLLOUT | POLLWRNORM))) + } else selrecord(td, &so->so_wrsel); } } --llvy8OFwqUtJAMbb-- From nobody Tue May 6 21:58: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 4ZsXNH5l9Hz5vVy3; Tue, 06 May 2025 21:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXNH46Rvz3LCT; Tue, 06 May 2025 21:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ithVxtodOV/UAQG4Iak9qWgfvgQmqUwsq3V1mrgq3Qg=; b=GtzoldEISWeuhLMyuE2/wyrsTirp1fBFDMA8frSBV1Kp3LCLzpTcDmsqOKVyXKCIV1k6bI uuVOst72tEJuZN7qpPmH+q7YZX7LQfXpeAO1arPmJC8rB/fzTKj+rshLMSD5+lCyEOA6RY 9lm4ehEr5kL71XTULH3fTGGIMs41364dvFPU4Hkz8aDRUa87YEa7Ecdjnh8+3UGvzz3ymp dCuWRLGuiP1YhGNDwKYHM2zQRf7KDKlL4NgLidZY0YsK37m1foBn3Arewa/2r24evOSowz NPnyGQAMsuEJsJB34jhpUCBmqwo7r29+5m4CxMylOYU86gNYWSIWRk2QaeMowg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ithVxtodOV/UAQG4Iak9qWgfvgQmqUwsq3V1mrgq3Qg=; b=nzwo2Ldkc02YoHi9hWRyTCGIYuQQVOQU3pWzCAs8rE/SfdztzVwssGQ4GirPrEwxRp5FSG acX77zj3NUxtwzjrMOZ+Pp/TKBl4eisL2vstLgQBSl/lZmxsU3L1bOGIUajow+DrADR36u KZfPw5P81MVBitzgFctfRfiIKUslf0DsUeoHwZw5VmDm/j5sV2Q0xrAjMczFbNGwX6X+G7 ULSbr8UnlDOMCWhfcsMa/Xg5Duj+/S4EDbTTSoV9ee1dqHXlRZ8Rxyb/If0fvdhtTe2X+E jThZT7sc+AHTCg75s6DTi32hPXD/gGB3oocjpnKAFUlR9aItkGSjVar4B5hIbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568735; a=rsa-sha256; cv=none; b=mI8nrFFk9YKzuyLHuGcApApPvS71pmhZrMlfiI0Ur0491o1YALoS06qU0jdGREMaGu+tDD zyMsqduPijrqfIGHPczFo4C0BMsZZ7GJBHK1Cw0SkNTYId5wFxxrTWFx66qHGhBkD0vVQX 30AYsk9pxGtfpGr0KQ6PIkUznk4CGAMSbpCXmzJMy7wjKZ73yG9BHAWO6mV77ibeF+UroZ bu1qdRhIQCgy1Q2xH6ED1bVX2WEtgagE0NFGbmleP0aRq20XUzd3Xtn7uAl4ZUL6bXEDRQ Egpy5AwACfapqU3y8ibQOl7roFM0SkgmKFaMgNBC9ABIiGS6A1taRjWH6l1V9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXNH3YBlz1GWY; Tue, 06 May 2025 21:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546LwtHa024717; Tue, 6 May 2025 21:58:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546LwtwP024714; Tue, 6 May 2025 21:58:55 GMT (envelope-from git) Date: Tue, 6 May 2025 21:58:55 GMT Message-Id: <202505062158.546LwtwP024714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 16d0fe1f721f - main - release/pkg-stage: Put each package on a separate 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16d0fe1f721f63d15c741ff4c0072390aaa27e73 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=16d0fe1f721f63d15c741ff4c0072390aaa27e73 commit 16d0fe1f721f63d15c741ff4c0072390aaa27e73 Author: Ed Maste AuthorDate: 2025-05-06 19:37:55 +0000 Commit: Ed Maste CommitDate: 2025-05-06 21:51:50 +0000 release/pkg-stage: Put each package on a separate line The list of packages included in dvd1.iso is maintained in pkg-stage.sh itself, and sees regular additions and deletions. Rearrange the beginning and end of the variable so that each package is alone on a line, to make it easier to track changes. Reviewed by: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50221 --- release/scripts/pkg-stage.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 821f15e01bd8..fc74f8e6c0c6 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -12,7 +12,8 @@ export ROOTDIR="$PWD/dvd" export PKGCMD="/usr/sbin/pkg -d --rootdir ${ROOTDIR}" export PORTSDIR="${PORTSDIR:-/usr/ports}" -_DVD_PACKAGES="devel/git@lite +_DVD_PACKAGES=" +devel/git@lite graphics/drm-kmod graphics/drm-510-kmod graphics/drm-515-kmod @@ -33,7 +34,8 @@ x11/gnome x11/kde x11/sddm x11/xorg -x11-wm/sway" +x11-wm/sway +" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f ${PORTSDIR}/Makefile ]; then From nobody Tue May 6 22:02: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 4ZsXS16bKCz5vWQN; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS162g3z3NWJ; Tue, 06 May 2025 22:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4+/huGez+BhLgFJ8CbWEb99qYVONVeipnXrawMqE5So=; b=cfmHlYeKw6qgGdnXBCFQOrGeg7GTAgru0BmO/ZbXcIcltzTQ3OfDE20VzR6FUth3Dz5EJM YBraq1Hqo1+MiYt4LEvQSITYA/YZI4owArMIwG+/S1k0/keuL8pgsEpspFinlI2Rtuajyj BF5ph4Nv+PZo8B0Po8SnqIADQLw3mcgZ4TtywBlR6UaiDkYvnzvQ5z3piW+3wOsNEYfANn K/nOdP0pZTXh2XbH5aBkajSNXBCofpJrlp6auLWQir4qNNAe3EiCbbvWv5HdbVpZ2GXsWW 7q6zILKles3z7GJAhNsH+zajKrVK819oa3J19lzvy3ewd00VrF2iGS2aPn0a5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4+/huGez+BhLgFJ8CbWEb99qYVONVeipnXrawMqE5So=; b=yI07Mnlqh+ftJYGCO9cR4N5rHE7Ukz5rERhmKImjmkUO1ujurJr4F7RY63kJV0GjnnUviE EjoA0WbJ4ArQHxAkkEIMuPRUq8Ryx+YGf+koEegwe/4kPix/DNq4SOkSL1Q1YNfKQKhnhf w/6Hjem39yX2hr0iGyy7m8xs7KH2uPWxLsMQ+eahF0A3IS0Scb7NK3pLJ/2KUshwMekebX K4+0O8Dic/S7RhdVYZZOl8aEbsO/BS03t/MZ1lrs1TozhcrXbsuFCM1j4PDJ89wj9x+pp5 d+SGVXhbp5v/bvZPAjhhVdrPxLiuX4Qq7nDl+0d/SEYFf+InR66PaSvvG138kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568929; a=rsa-sha256; cv=none; b=f+qI2c8ZzvY2fzKgDAINNAqfdoN8qr5BFW7icKkhd/sBcjzqf5TXyHyuAR5IjqwKJsh7Eq oiWAngoN0rMJXHx+ErUsaSLG6LHqdok565qMfhnwWdJ7C2axBAYqdpK1MTg83h9vxpiufO 8pQp//+LpXhs+3rKNkA3smi7pf/TyBXBjjtyoLt6LMt7ap94T4R2OOOxI5i5FpqL8kjPEj wNOuCOt/PtRAZ9TJrxVFnPAnIJ5bS1ykmHYkg3VlwitOmXFD9H0LtCu5DjYoAU2WVIwTp0 GZg7YtZE7E1TLu5BUhFwZ3nMvQMZPdEAbeD5dTHGTy6AyRvTdnC2B2yZDdOzSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS15RDVz1H7b; Tue, 06 May 2025 22:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M29BZ041226; Tue, 6 May 2025 22:02:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M29Zs041223; Tue, 6 May 2025 22:02:09 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:09 GMT Message-Id: <202505062202.546M29Zs041223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f8ef84daf534 - main - devinfo: Add missing 'static' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8ef84daf534b8683e04ee5f5a621bde8f2e3912 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f8ef84daf534b8683e04ee5f5a621bde8f2e3912 commit f8ef84daf534b8683e04ee5f5a621bde8f2e3912 Author: ktullavik AuthorDate: 2024-10-17 21:26:15 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:45 +0000 devinfo: Add missing 'static' Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index e8dd74b71144..fe383edf04b3 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -150,7 +150,7 @@ print_dev(struct devinfo_dev *dev) /* * Print information about a device. */ -int +static int print_device(struct devinfo_dev *dev, void *arg) { struct indent_arg ia; From nobody Tue May 6 22:02: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 4ZsXS327rnz5vWQP; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS26rYcz3NHQ; Tue, 06 May 2025 22:02:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q11a4Clg6n2CxukqBJfHNiSrOYg81c49yW2x/HmL264=; b=kJx1eN89G7bBYVuDDYqmAseCssTD4kW05967zQ7XLyXUqro3zgPV8vJOJPzjCsga5uK/IG N+WLIlFwexfhId+eR8bh1A4De04oGn/M2og8fjcJaJA5df8Qxzc5/hX++gUzrE9O50J0+x gfj3UbN8lzA+6vzEPieehflQgRnEJhkX5uw670LSsoQiib/QrRLFb0Z5WDgQJOTqAIy4IS 8FKwaUXMM8YVjcDt9+NEi59qo9n/nRfsXwjmvzkFmKwq8P4cAtgVapbWgJhA9UQzI3kkq7 YS+wXE0zCP2DDh0z/o3QQtcTUCo2JBoONWD6Y5zrIGKE9ZjvCZGGNpcpSorlhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q11a4Clg6n2CxukqBJfHNiSrOYg81c49yW2x/HmL264=; b=Z58cbcRwb/Kwiz9fCt0Bw4NHrzWt72hm5szymmaT9NvoNDJ8auBRVrPrK+gu/yIiis6nzz CzqW9yZX1Jtb54yO2uGKItQakpb1ydFHs0t0B3gKmo1hK6zaUBh80QwGiEGUTBNyYdbj3M FnZcGCMViwhKsLCv10B2FGUy4df23QfG7SzQI7VobwtDStNciQvCGJpY/WrxWsR+CxFbZ6 xXVsqNbAcNTk6sOjpTylE1klNMWb97kxo23rn1bxmMk50vmHMVbQL6luKhWEVDGSiZTqnp uH4YoXziyKOM4/yWMYXu0mA8TWjGBgS49/xAvFQj9Gx2NcA53nIkU6uUL6mpBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568931; a=rsa-sha256; cv=none; b=O4lsjyan4h//BLYK5c0nbRn52ohoJ9D+3BcVHf1xUykKhy4wqNllLrTKfsAObi3gCKhSDG cTM24xdbEZbLJCCsjiWPPotzrR4g6zialujJTPHKKA9HlLawNA0XEKZiJdantyK5porlAo cufBP7uxwHiJvmt5bokan62t0VBCsFaeSze3QLnIeEcLdSOCnp4yjh2uQRLTeAdybBc2Hf Itg41CxoNlLSVAtIiLill+xns49DWAe4FOnExtMhBaTPiIodb5mtXkQrBOIDP0B1xQBfMv AZBNCoooPtAj5td9yITeHkwYR0IQhiGWXLJLLgAtIW/OdXbR5XlpnrGvSo/Nig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS26K2kz1GcK; Tue, 06 May 2025 22:02:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2AE1041262; Tue, 6 May 2025 22:02:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2Awi041259; Tue, 6 May 2025 22:02:10 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:10 GMT Message-Id: <202505062202.546M2Awi041259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 502977f858d5 - main - devinfo: Use bool instead of int List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 502977f858d5b18e7b5590d3c73ef9ab5bbe043f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=502977f858d5b18e7b5590d3c73ef9ab5bbe043f commit 502977f858d5b18e7b5590d3c73ef9ab5bbe043f Author: ktullavik AuthorDate: 2024-10-17 14:58:25 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:45 +0000 devinfo: Use bool instead of int Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index fe383edf04b3..4ca417368514 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -34,14 +34,15 @@ #include #include #include +#include #include #include #include #include #include "devinfo.h" -static int rflag; -static int vflag; +static bool rflag; +static bool vflag; static void print_resource(struct devinfo_res *); static int print_device_matching_resource(struct devinfo_res *, void *); @@ -63,7 +64,7 @@ void print_resource(struct devinfo_res *res) { struct devinfo_rman *rman; - int hexmode; + bool hexmode; rman = devinfo_handle_to_rman(res->dr_rman); hexmode = (rman->dm_size > 1000) || (rman->dm_size == 0); @@ -250,23 +251,24 @@ int main(int argc, char *argv[]) { struct devinfo_dev *root; - int c, uflag, rv; + int c, rv; + bool uflag; char *path = NULL; - uflag = 0; + uflag = false; while ((c = getopt(argc, argv, "p:ruv")) != -1) { switch(c) { case 'p': path = optarg; break; case 'r': - rflag++; + rflag = true; break; case 'u': - uflag++; + uflag = true; break; case 'v': - vflag++; + vflag = true; break; default: usage(); From nobody Tue May 6 22:02: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 4ZsXS42kdpz5vWQQ; Tue, 06 May 2025 22:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS40Cbcz3NYL; Tue, 06 May 2025 22:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRvhT2kRvsgrHNPsi74vGgzM2Zf4XHP7IODcbRr0EcU=; b=cUfaS4+cNIYBClFKAY96/GoYrPzaO+RkDArlEoRkPFQRagpoB+ZOTJNfYLmicWuz3NBjHR /xYIXmWjSkZxcGLFZltCzzRc+Fsh33ubY3tp9dEtsl0s1spzvyz0M+GyMCxdQMeb/EHIc9 /mVmzT6Yf2TqWZi2Tfqfznp2ta4zLFWfZlh9L/kmjBP+zJp3ZcuJywGpYh/FPIFiz16gPh 4Jt5srkrs0g7ZBH8OBihCvQG9fz7mwuIWrVh+Gvny0lE0gam/QKPw5M4qbuZTBEtyoejUC 7gKSIVwk8ys2obxzQeNG1wmRCLH2EajIv2TcnL8l34GohioKL83+uxSq9CTfUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRvhT2kRvsgrHNPsi74vGgzM2Zf4XHP7IODcbRr0EcU=; b=b5T6pO3BworKqrF4iSFsODEVDtaPVGe0t2LgP2eAiLNS5CzfeoU5rdb1XlmgWAASJyY0e/ 3qayLc7nAmHOu/pHXRfWL2SpRgD3xUb9Ec07MGT+b0oG/SHjr6iizZZ+7mAtmXYDUzVNVP zSVMrQLh2xFd1kfQ/n83Mqk+C54/I5R7nFJHoKIqvNoKFBTzfN9QzFyQf4xO8cpLfegBdN c8i/935vZERDpCpk+Lxb70YPyAlk900c3n7Pvyzlx1/Jfi51/aNGZaex1WQ2IczOi7VUVT owjN6GKv73oX2FmxivdoP9stPwmcVEkrG2odZnvz3QP5u3X8JOYhRXJJMog2VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568932; a=rsa-sha256; cv=none; b=m0KP696KPS29fcAgKU22oSV5RVIZRkq35bXslQJKDAWy1BI/qT2hPL0tLD9zpjUVQI7gER EiYX71n/rrPN6pu7aJgc6xzJ7YFt2R7NkK8ZPdpzksF+AvjrHcZcpV5RwYNPNGa7gF3lZs w63Nw9wvrtomQHEqIEM/zx0gEomNaLUEStgnWI0n9O5CldYd5eAveWRqy7jk3A5zVh+1VX i0l1u/LMLqDBM4nT6b4sqi5nUFkXWXcHpB0VraIRfWAHj5I3zhf7rfCF3tk6Y7+AGFVQST KtGlEtKChmFni6f3NiwHOgsG6LqP7KnMPvjUvAyl0BnQSZ2uLH2It2UQSxSzww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS36kGmz1H7c; Tue, 06 May 2025 22:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2Bk1041771; Tue, 6 May 2025 22:02:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2B5X041754; Tue, 6 May 2025 22:02:11 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:11 GMT Message-Id: <202505062202.546M2B5X041754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f8aa0ee8d017 - main - devinfo: Introduce function for printing indent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8aa0ee8d017a276d22521fa7c809aa0f3349be2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f8aa0ee8d017a276d22521fa7c809aa0f3349be2 commit f8aa0ee8d017a276d22521fa7c809aa0f3349be2 Author: ktullavik AuthorDate: 2024-10-17 15:37:44 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:45 +0000 devinfo: Introduce function for printing indent When libxo is added we want the whole indentation to be printed in a single call. Otherwise the html will be spammed with indentation tags. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 4ca417368514..306d752e884e 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -31,7 +31,8 @@ * Print information about system device configuration. */ -#include +#include + #include #include #include @@ -57,6 +58,20 @@ struct indent_arg void *arg; }; + +static void +print_indent(int n) +{ + static char buffer[1024]; + + if (n < 1) + return; + n = MIN((size_t)n, sizeof(buffer) - 1); + memset(buffer, ' ', n); + buffer[n] = '\0'; + printf("%s", buffer); +} + /* * Print a resource. */ @@ -86,14 +101,12 @@ print_device_matching_resource(struct devinfo_res *res, void *arg) { struct indent_arg *ia = (struct indent_arg *)arg; struct devinfo_dev *dev = (struct devinfo_dev *)ia->arg; - int i; if (devinfo_handle_to_device(res->dr_device) == dev) { /* in 'detect' mode, found a match */ if (ia->indent == 0) return(1); - for (i = 0; i < ia->indent; i++) - printf(" "); + print_indent(ia->indent); print_resource(res); printf("\n"); } @@ -107,7 +120,7 @@ int print_device_rman_resources(struct devinfo_rman *rman, void *arg) { struct indent_arg *ia = (struct indent_arg *)arg; - int indent, i; + int indent; indent = ia->indent; @@ -117,8 +130,7 @@ print_device_rman_resources(struct devinfo_rman *rman, void *arg) print_device_matching_resource, ia) != 0) { /* there are, print header */ - for (i = 0; i < indent; i++) - printf(" "); + print_indent(indent); printf("%s:\n", rman->dm_desc); /* print resources */ @@ -155,12 +167,11 @@ static int print_device(struct devinfo_dev *dev, void *arg) { struct indent_arg ia; - int i, indent; + int indent; if (vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DS_ATTACHED)) { indent = (int)(intptr_t)arg; - for (i = 0; i < indent; i++) - printf(" "); + print_indent(indent); print_dev(dev); printf("\n"); if (rflag) { From nobody Tue May 6 22:02: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 4ZsXS53ktXz5vWg2; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS51Lgxz3NQL; Tue, 06 May 2025 22:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MeoVz8VJ1L8lwd710tzRiq/1e0JRH/X3krBjVJJMcTI=; b=VS/0XEXSE/4NcuAYkFW4VLxV1fhZlS5InjUCKDy5Yw9J0IfbMYLdlzcJSpeBlN4QYEF1BF YyNGwNWFw7Z1ctvyVtZKQsE0qj+1jXgFxnc7BZaR9P9ixgzQyYmugAD+slmszO+BtkTWpI RGfY3FQKPQ8WakMJRI8JSlZay5WThkO1wYMQ6CGASH4O64jkn7o5YO5kBqDClfNCJIr69T 0L7HiIWw7+VemWt9BEAhupPwmy5YJaC3sVg9Ja5UrQJgRbXfbZ+TQ0avk05nbPdxkXLZWX Ht4HaRLBbMpcv3Bg0Ut5Cb1Ql1TP3BVnL8iz4CHg0rSA1ExMP86mxaNsR+Qs9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MeoVz8VJ1L8lwd710tzRiq/1e0JRH/X3krBjVJJMcTI=; b=YMIgsnkRtFu0XqxxcCWubKZqJTBugey+UyZ43o/83eJA9MaBMk95h2Up8JO1X1pGCp+/Vy QDmaU4MBk5Vsi7RE+WSW3jLhFTKbypxN0llD7+3rVq43225rWinTrz5pk11dY6sOUcbXty Y93hUNBwr3TBmje9bcir7trrV0q1YwgSo/oUg0fvHWBBZcsT7Y28Eby/Irx0jsj3y2lTGx 4sw6hlf9HklVpIZXK8RxreYb0xCBuOKIRqOiiR3AoGWif9qHqGw+BnDBXKRQOZFKhnL4ar /325CknGUU8SzvFDRvQEuDTNmmJ6O93ellkNIpmHwKdKyrrzD41ysjubcYUweg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568933; a=rsa-sha256; cv=none; b=MkZgNBV6EEgjz8kfquQRz1PwyCjNnawNOF9UI2A7I94cRSpVrK3RwZBoDGSfLprFEvGjUx nDleE/kvbJs5SOamAveUZROWTLetHtUlC9MQiF38I6zsrWMjfBniprQa+MwD+QHTz3z7Gc fFUPzA08jvNGJ28pzm396x43nHN3xKpI0uC1uLrYwbxf6oWzenPGxfekL0T32PlmVPGOUr 0lOa8h4Xi96L0iTapeK4jJrOS8zV++1JWFGkMfIAvV45Wa8rGjtNJRzVxk0LhgsIiJlr42 vEpRCTONh+LVCCbV8iyjv2jbzU8gqJQbNUkG9nw5FkRBUb59EiveM3alI15pbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS50sWXz1H61; Tue, 06 May 2025 22:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2DmV042204; Tue, 6 May 2025 22:02:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2Dgm042201; Tue, 6 May 2025 22:02:13 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:13 GMT Message-Id: <202505062202.546M2Dgm042201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 171e3706e477 - main - devinfo: Unwind the ternary operator to better fit future libxo structure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 171e3706e477076047f7a9dbe4603d2542bb9e65 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=171e3706e477076047f7a9dbe4603d2542bb9e65 commit 171e3706e477076047f7a9dbe4603d2542bb9e65 Author: ktullavik AuthorDate: 2024-10-17 17:25:57 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:45 +0000 devinfo: Unwind the ternary operator to better fit future libxo structure No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 306d752e884e..4343c7dd3457 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -80,13 +80,21 @@ print_resource(struct devinfo_res *res) { struct devinfo_rman *rman; bool hexmode; + rman_res_t end; rman = devinfo_handle_to_rman(res->dr_rman); hexmode = (rman->dm_size > 1000) || (rman->dm_size == 0); - printf(hexmode ? "0x%jx" : "%ju", res->dr_start); - if (res->dr_size > 1) - printf(hexmode ? "-0x%jx" : "-%ju", - res->dr_start + res->dr_size - 1); + end = res->dr_start + res->dr_size - 1; + + if (hexmode) { + printf("0x%jx", res->dr_start); + if (res->dr_size > 1) + printf("-0x%jx", end); + } else { + printf("%ju", res->dr_start); + if (res->dr_size > 1) + printf("-%ju", end); + } } /* From nobody Tue May 6 22:02: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 4ZsXS82dQBz5vWNM; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS65cvVz3NYy; Tue, 06 May 2025 22:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EP/zXtVU9q75m3p59k1KLAMFwFKOFS3oLKD6U+TDzfQ=; b=A0rKemoEfkHaFKjTFodTkvSxtCZS+ReWWuZYG1YbMVSeeFucz8MoRNpvjNbTlYG3UYkMIe fkvpMvmcp+lm0iS6JFxBg6KfaN5QgbNMtNo5wt+4Qk3I93DqCWZJTYCRy937G7Nhp89llb VgrHaLGP2WltBmsiCmBNh+CThotLhKibfgu6z35QdHnl5LVqDzoovtIZMi5rcGgTTlGOTW zWwhSywqtsrRzrlzu6NV0s08TXO1HID9au6m7HuQWISJYPAvKk+j2z8ptMSbJNIclQ+von ljgnSt3jB6qxqKmJkjg48nZIqlRzr5a88SuEa/7+wsxqZTON3/F11/BDH2QLew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EP/zXtVU9q75m3p59k1KLAMFwFKOFS3oLKD6U+TDzfQ=; b=Z49kDsUQrfxKdRFsmsf2DFH+/cfUvwZ3TluiFwGJxygsXLy2zS/ji+/zIcw5TjY5g4yNhR JAm1x3PmwbMAsGwnHx2Azm9T7daiwAfVNH1T6AQXKeKG5NtBJhNmr0gMjnv5n3FWDX0e1z j6Nm7ivFq7fclPYu1cvBDcHqmnFa7nLI429Q5aKm8kiK2LNm5lp88JPxG/1T5Kjcq0r0CN t8MLwF3evJgfJrotemOsuE8Zpk695VLmzgmyHOPgU71c653qRKsNgT5ceoYoyyiFyWPOio Oph4eq5jHG9aB7MRBFsEi6oNd4d6ROnPhgS9GrzVBBsJm+7ppRqmx4dzEDPP5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568934; a=rsa-sha256; cv=none; b=CG6bMBLkEG3q2mRqNc6aN/+ykXK6SZtKjmbSN/51N5rOKgExxlgA5BR5JnQZDHPT3vcpQk eVW+fWmecUVWputWYmfGLvwPjKjdg+mwvt6zeY/aDP/ldYTAuXjYv1SzumBf6BeF0qBJUr HFKxRtS6TDe1AcHEuWEETQvGzbZHGPjSkVfWNy+VDLLqi42nn2cHOuAuWSwXxzC+tbqU6Y A3bp0vstKZapngFwP71XpF2JGX5bD/LViBuGR/Tvf2MdVdBTYN+V07XjejIU5ORnxRzsOJ pAuSSEjHLjN5ke6xsiVcNr2863lM7hOcSR7Z0wV/Z8fLzQj4grFmKcx6UtPoKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS61Z2Sz1H7g; Tue, 06 May 2025 22:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2EOd042236; Tue, 6 May 2025 22:02:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2Evb042233; Tue, 6 May 2025 22:02:14 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:14 GMT Message-Id: <202505062202.546M2Evb042233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 763ac7a34336 - main - devinfo: Turn '&&' into nested condition in prep 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 763ac7a343363a3edee5b3fc4012d159a4cd2baa Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=763ac7a343363a3edee5b3fc4012d159a4cd2baa commit 763ac7a343363a3edee5b3fc4012d159a4cd2baa Author: ktullavik AuthorDate: 2024-10-17 17:42:20 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Turn '&&' into nested condition in prep for libxo No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 4343c7dd3457..b639dbf89a97 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -155,12 +155,19 @@ print_dev(struct devinfo_dev *dev) { printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); - if (vflag && *dev->dd_desc) - printf(" <%s>", dev->dd_desc); - if (vflag && *dev->dd_pnpinfo) - printf(" pnpinfo %s", dev->dd_pnpinfo); - if (vflag && *dev->dd_location) - printf(" at %s", dev->dd_location); + + if (vflag) { + if (*dev->dd_desc) { + printf(" <%s>", dev->dd_desc); + } + if (*dev->dd_pnpinfo) { + printf(" pnpinfo %s", dev->dd_pnpinfo); + } + if (*dev->dd_location) { + printf(" at %s", dev->dd_location); + } + } + if (!(dev->dd_flags & DF_ENABLED)) printf(" (disabled)"); else if (dev->dd_flags & DF_SUSPENDED) From nobody Tue May 6 22:02: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 4ZsXS86G4Lz5vWNN; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS74mvGz3NZF; Tue, 06 May 2025 22:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cGpqH2WX1ZTpbrE1hapM0l73qBnlOZrH8bSsEMwbJo=; b=BkdlHeo2mJ6vIr/y0uwxgmm1SxsANnnZ+D8LodADjK1UcAE8RI7v9M0/kuoPbFnasIhZbC kgUASQXFhgWqNuPFzBIC8QLNDFsSwOD+vvPoX1yIG6nLDMBbFppDkvU5JWAUDPIwwUkhPf p6UKmC/HIyxHt3ek8g8QzK3AG1WuSGpjaZgSgEgG0zF7t2u60HRuDkl9OoCtacu38Dc9F8 9PnaeWManX/CWbto9ADgNlgDLnpVqI0w2b5Dl0oZcKwPqdNXguPJBi/lK+S8aMRUKjfdxD 8rIH3vryzVxbkSyFJ5d2LEGG80M3SVPDaCH5vsU0hN5QczicQlelwaNSIOHILw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cGpqH2WX1ZTpbrE1hapM0l73qBnlOZrH8bSsEMwbJo=; b=LTVbtVajYdiRk+W9alu2AnCROntEI0tZ0MN3XNY0MBey1oFFIM+8MBWKpwlAyFtNyaZm8J fsWYN37EmybhWEbDPwGAWFf4Jx1Xh/RLfrTRC9NRPg+1hW1iPFIksnTV/3pQfJ49FvMAAd 2QGzlrOsgpjyu7x9YZX/X7IwlfiUiycrXbfhJuciTs0E+hhETstdSB76wVCWf9ynYXcvMa KP55/T7bYXghNNmpcpJ50igUJk3ZR5nIA5SAJfU1R3ueOXc5ZwWaSp9CHCqDs8HUWc3fEQ JhXCW1AzzpP/Ix/8vXkWO3IvKBdDm36FYLXRm8Fgd7n2GStkYpRFfdZYyYq6XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568935; a=rsa-sha256; cv=none; b=jA77XaPK5McBY0qECdELPg+GM/uKCEsiOXPWDn9b+CUF38u9+tKCA0X+1b1DZ/9GP9FlW/ BvDFwFl/nJWGBkvXyZjEMNx0o6ehfoN5lN/8RqMbHt4GlxOXADWtjewEA3o6UGhjrDO03T tbTVA6k3IcBknb/TwTI6lWltuQuMPNTKvAgLXtgcBNIhzb+y58LVUM1uotNToA2O83R39n ccwHMpBhhsKWmvGVCgS9X7Cw4oXOLsRBfBiJ0mpGW1DeCZFo/tD8MPzKXPYDSWtQzRqRuQ wqDF28c4UtcRJ6xRQk/GOMMOPAobFOJGuYKryg5PBximsUT7d6WMy9Gg+09qbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS736Zqz1GcM; Tue, 06 May 2025 22:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2FKR042271; Tue, 6 May 2025 22:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2F0r042268; Tue, 6 May 2025 22:02:15 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:15 GMT Message-Id: <202505062202.546M2F0r042268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 204a9e96741e - main - devinfo: Put expression into variable in prep 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 204a9e96741ef22061cc2c8b0192208b66ab3c80 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=204a9e96741ef22061cc2c8b0192208b66ab3c80 commit 204a9e96741ef22061cc2c8b0192208b66ab3c80 Author: ktullavik AuthorDate: 2024-10-17 17:55:49 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Put expression into variable in prep for libxo We'll need it twice when libxo is added. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index b639dbf89a97..a4fa6892981f 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -183,8 +183,10 @@ print_device(struct devinfo_dev *dev, void *arg) { struct indent_arg ia; int indent; + bool printit = vflag || (dev->dd_name[0] != 0 && + dev->dd_state >= DS_ATTACHED); - if (vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DS_ATTACHED)) { + if (printit) { indent = (int)(intptr_t)arg; print_indent(indent); print_dev(dev); From nobody Tue May 6 22:02: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 4ZsXSB46J2z5vWH7; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS84ZClz3NLL; Tue, 06 May 2025 22:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8nC9SykB4VYUFazsY8O0agkD8biflhCg6NFU6bHA06A=; b=tZE/pTz9cWFVIIQnR6RSWy1Wu4ycA9q8k4Ci/h6/3tdUH+EeNJ03fr3uo3UQ0vJ6sxNsbk h5Gyh9o/VJlE0AA5/n7wsIiheOuJARnadiVZZDSWQoURsxqDKMlUW0lkCanp1tVFEhq2yf CN4YfXzaxY5t5M6N7501LAw9aK0fZqAhgt8a8gLeuA5Rq2LqPLNIRHGLKa30NUiLTCG6wj HmTDOWgQiTYDnGhKrA2mfIGImku3G9+b1TIP227rqOcu7JmS1vRQa9HhgLvTohU/NfQqeD O9ao4gbWisHnnCqlW0h8pG94vcmwzuFo/LdGka4ExDnVtVN7kc9Veziteh0t8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8nC9SykB4VYUFazsY8O0agkD8biflhCg6NFU6bHA06A=; b=HyNlXpl0hvBPon8tgm8bM8CAo10XnEF+LLektiUjMGXUJS1WrzKxji+TnGcK3qJPkyrAPh zLdkwRHaK/r+Da0I5MHu2ayD8K2fKjUZtR12pEWUxomp4T6tRzNA0TviEg147p0aQnFOq9 SkmNo49XihbWVZxzfMmhCtRgOYQ3KaUMWbvwq9MwvB9A+lZXmiV6/QbFSxL2GAQtlQ02Xu i5BEjI29BRw7jvIhgfYaIdRNqE9egvqJd2FrbUbOHhG/SQrmwY3Rm4JcvWknkELxWVOsrk goWU2Rsp6L1OJmhRSit+Nn60y1uLi1AS3iPJX4UwTWVCfGEI2p9SyBfgJexa5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568936; a=rsa-sha256; cv=none; b=s3IIaUsyZjEN56XnGM4MYNpr9oHpwSy1KFFSh08gjhAQjjXGU/15bqS9ncbvaSoKgtHr0A ewZgsl64S7YeywadkBFlURmGoWeQ9FtpJfKZ04PktuUniRZ570V7g5T+ifSc5WWyrorlCY vxGyUYdQeVoQxrJkQKDTrqZFOaBV50wbtn0owpIjsdmehp3poOWO4KGaCCWLE2OfNAPbF+ eyIevcCuTNkTwlyGpqDFhvbqrdGuMrjB7R2OPlC1gHBKUhfGTmGqt36Zpyoy7j0eME8ZIS BJHMo5OllOResvFieoFr1GxFr6Ug4PL0bRC0PB3Srp8Y6N+90DgeOdkTSwcF9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS83jLvz1GwW; Tue, 06 May 2025 22:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2Gtq042308; Tue, 6 May 2025 22:02:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2Gea042305; Tue, 6 May 2025 22:02:16 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:16 GMT Message-Id: <202505062202.546M2Gea042305@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 50d1d4d4bfb0 - main - devinfo: Inline the code from print_resource() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50d1d4d4bfb0292fb9b23ed84cdd333649a69880 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=50d1d4d4bfb0292fb9b23ed84cdd333649a69880 commit 50d1d4d4bfb0292fb9b23ed84cdd333649a69880 Author: ktullavik AuthorDate: 2024-10-17 18:17:40 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Inline the code from print_resource() The code will diverge when libxo is added. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index a4fa6892981f..7fbb34277d47 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -210,9 +210,26 @@ int print_rman_resource(struct devinfo_res *res, void *arg __unused) { struct devinfo_dev *dev; + struct devinfo_rman *rman; + rman_res_t end; + bool hexmode; + 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; + printf(" "); - print_resource(res); + + if (hexmode) { + printf("0x%jx", res->dr_start); + if (res->dr_size > 1) + printf("-0x%jx", end); + } else { + printf("%ju", res->dr_start); + if (res->dr_size > 1) + printf("-%ju", end); + } + dev = devinfo_handle_to_device(res->dr_device); if (dev != NULL) { if (dev->dd_name[0] != 0) { From nobody Tue May 6 22:02: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 4ZsXSC4RcRz5vWNP; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXSB5ggbz3NmH; Tue, 06 May 2025 22:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=czysMMD4zlbTtkED6tdHQqV0oRYFwZZEEO119/iafzY=; b=rwOc0XywuJssGi9ZOarqrrOM8hXaD92AUT5bFynFNOpUCTWUT+1DCv0BFIMHP4AAUsdVhe C7GaukamUA3OR8YZJmHShl5klWMWwwEAnQO48rUWbtyI9jDnR5/TFSUegcIeZ/HW1Rrmed p4d1/YsiQvSZpemRupiDp/mZ0mvL9cpZ3YwjHqyg+nig0NOVnPJnBdc5gzhDjMdP0/tZjc W5PMG2hYQIKatXu+ZIes/5toG09hsDAPw1ybuUW0v2fjhF0l/jVofX8Sb0fJEulLrgMQXf DJ5bOGPwtCGgZ4UEtk26va48E63Dr2r2UltA7hqr5icI8q2rbFtdUj0w+YMsKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=czysMMD4zlbTtkED6tdHQqV0oRYFwZZEEO119/iafzY=; b=xRhbeAIjMJ2KktD3Q4OSVbnoUPQTVidfyItGGQf+YoFiT/PjZ4BYlu0METdFfHgXU+kJZ6 q6oEKfOtQAa95ClYsZlnMuaEkp7foUNFh1LbAGvQGeA6FPqeumSR7lRcJTYyu0opqZ7DPx v5Km9DegYjNo79kH5H3Tfrav1LNIXTkSY1v9+B42GKqrSlsVcVw9QuqTz6HjJlzdiTuPmH CWfsp7zDZ3w/Ka5g12OQuR/KER4dTcFaIicEMg2V0/JiX/HMOEqv/aSubmpiaRqYxmn3ht WK5Wqiv55ZKcAK2KwSE8LbRqvkLEC1vDREy1hjseBNI4nKT0+R+wap4EPBKa9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568938; a=rsa-sha256; cv=none; b=BlnnseITrHB2czi9GWkI8ujKEX+YXD/5mTeLHc0Qwm/CR39e0/jwpmb5vq68aTCZ0KaaHZ bq9QfYR+MJq/xe7398U2SaKGU9Htx85CyvCJWmbAVDKWUge8yryOiaOGfN1lA/r9vhnYI/ TyD99mBdPkbXx0lBSER36ey4VY987TlHkw08nZIWSVkt41yEiv4MyYxnPsZxTTicugkrtE DN77bgBZsm5s4ov89oT83pGZ6NCzTcsDKuPH1yXdVoEKaa7vIBjM2PbK/kcukHw++JW+mU SIcYW4O5oV+Bh340Y1yoNyi03WFQ99AcOKMOzLCcCuPC+XbLlXFiCe7qvJiNaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXSB5GYfz1H68; Tue, 06 May 2025 22:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2IIq042374; Tue, 6 May 2025 22:02:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2IHI042371; Tue, 6 May 2025 22:02:18 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:18 GMT Message-Id: <202505062202.546M2IHI042371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 471cff3eba53 - main - devinfo: Rename function and add declaration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 471cff3eba5318ea5800a22ba0de547fa7da601a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=471cff3eba5318ea5800a22ba0de547fa7da601a commit 471cff3eba5318ea5800a22ba0de547fa7da601a Author: ktullavik AuthorDate: 2024-10-17 18:55:09 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Rename function and add declaration This is prep for libxo. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 686f4a09f73c..d12f9d4ec331 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -51,6 +51,7 @@ static int print_device_rman_resources(struct devinfo_rman *, void *); static int print_device(struct devinfo_dev *, void *); static int print_rman_resource(struct devinfo_res *, void *); static int print_rman(struct devinfo_rman *, void *); +static int print_device_path(struct devinfo_dev *, void *); struct indent_arg { @@ -263,7 +264,7 @@ print_rman(struct devinfo_rman *rman, void *arg __unused) } static int -print_path(struct devinfo_dev *dev, void *xname) +print_device_path(struct devinfo_dev *dev, void *xname) { const char *name = xname; int rv; @@ -275,7 +276,7 @@ print_path(struct devinfo_dev *dev, void *xname) return (1); } - rv = devinfo_foreach_device_child(dev, print_path, xname); + rv = devinfo_foreach_device_child(dev, print_device_path, xname); if (rv == 1) { printf(" "); print_dev(dev); @@ -335,7 +336,7 @@ main(int argc, char *argv[]) errx(1, "can't find root device"); if (path) { - if (devinfo_foreach_device_child(root, print_path, (void *)path) == 0) + if (devinfo_foreach_device_child(root, print_device_path, (void *)path) == 0) errx(1, "%s: Not found", path); if (!vflag) printf("\n"); From nobody Tue May 6 22:02: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 4ZsXSB6f1kz5vWcx; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXS95TZTz3NZh; Tue, 06 May 2025 22:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9gE/hE9BsyNWi4tDBx8VmKF719zAP0eyAHSZonEnDDE=; b=rIqzm/y9srgQMb27EAd/TVcfiVexnjyaPfwjqU8koy/tP4WZGiJ1WZATH04AC5PzTRjrge lHDI2vADgdaxj6Jk+c+1BRdCu4RuBf44a03ATmJe2mgC5x0jZmCyVs4smZcHSP5QuWHsNQ 6FxOOsyJ5mn79ew+PlbTIMiisbN9W9ofoaYrtGHXrUM/qnbyrV/Aifh19Ih3/RXkk2cnwG gxxoQiOmd76uXJlgOTL0BkTUk0i1iGwcELXX1YNVXWG1we3vGikZxir9JkoJxZb2IzsqyJ U+6/0h0IdmaSdWToVvTxwn3s1FvivAK8uaex6XSCBkyRvRJl9l2lGVZLf3ykgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9gE/hE9BsyNWi4tDBx8VmKF719zAP0eyAHSZonEnDDE=; b=iEIffZ1JP10xm6+z6pqYgVUw4M+eCi0L7ClhCaynsxPasCwm+Z4VihLLCmOMUR5ph/7og5 AlxxFmvtcO/qxNp/xfCLZylqtEuMesPyvDd5p6dYKJfwh3rdlEy137lIFtUd9MIk8Kfymj kO8Vr+Xms84VYnHIEmp0HGEP3Si1u7JbiS5cXnwT7neTN4uVdOYlgYrbUFotuMdY3s9tqF cwewGovPGpJKoeKVeRP6nz7qtKI3nSCJo88E9A3m3Hyia6aETnITP4fUrgTtM3DWrhK9cp tmZSeeC4JJwBkHyILzPT9RC7scu7w0JazMqHwXZRvwfVOVjZXZUkz7u5v6UkYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568937; a=rsa-sha256; cv=none; b=CWSDSIoXBbNPJP/S6LMjD6KchT5teKWvkdhv4rQ1TO7FRmjzl5pwfJlEOr291D+XIlEKJx lZbNcP9gu2RR8+GoTws8EgI80JWS5wuitJKWMfaZLibBF/NL68vVMaIkxwavSqkNT6NL3S VLvZCMfea2GCL7OhtCjr1qt896M/TAJ33b2EoIA2opP52N7XU4uQrYv6GGsUpEJgZVJ1+0 0pKu2hYtjYLw8ImzyfcxeI6gKKwAw2b8bC+8c7GZ+/Ri1ZjK8vFtoqZlR16lKrVfmZr4uk iOCZSJTAc9hHr0iC/4KqRJn0OGOfUIpOE1tXGEqxZARBqO9u8km5gzx+HndaNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXS94SDWz1GMF; Tue, 06 May 2025 22:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2HUt042342; Tue, 6 May 2025 22:02:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2Hu9042339; Tue, 6 May 2025 22:02:17 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:17 GMT Message-Id: <202505062202.546M2Hu9042339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9166666cc262 - main - devinfo: Restructure function in prep 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9166666cc26218b4e82f5b390705e1f5f09b1af5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9166666cc26218b4e82f5b390705e1f5f09b1af5 commit 9166666cc26218b4e82f5b390705e1f5f09b1af5 Author: ktullavik AuthorDate: 2024-10-17 18:32:46 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Restructure function in prep for libxo No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 7fbb34277d47..686f4a09f73c 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -213,7 +213,8 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) struct devinfo_rman *rman; rman_res_t end; bool hexmode; - + + dev = devinfo_handle_to_device(res->dr_device); 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; @@ -221,13 +222,15 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) printf(" "); if (hexmode) { - printf("0x%jx", res->dr_start); if (res->dr_size > 1) - printf("-0x%jx", end); + printf("0x%jx-0x%jx", res->dr_start, end); + else + printf("0x%jx", res->dr_start); } else { - printf("%ju", res->dr_start); if (res->dr_size > 1) - printf("-%ju", end); + printf("%ju-%ju", res->dr_start, end); + else + printf("%ju", res->dr_start); } dev = devinfo_handle_to_device(res->dr_device); From nobody Tue May 6 22:02: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 4ZsXSF0ymZz5vWQn; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXSD2qZYz3NLm; Tue, 06 May 2025 22:02:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzOutXgHOAlIATQiLr0Nq0NcHGI08G58f9vUikX19tw=; b=EfEBKp4EHRkssVlqnrxzqGQ/MRSpr8hKDb2ZphVm/AZTEvcWZU3ijwzuFI2ctoPZyIZMwg qrnVpbKWoam4G3FGVrx8YgcAsQq57NsEieby8lDd4ykUOMtLg9gnZqz8LtLPXnlDjJ1X74 IXPqoQpr6SCxw9qB3aoPQO6nc9uuQfVtOTqsFvu/Qg8yKJLav8ik2ZCBfuDR9dCwNs6om7 nfnonRiBerJfvSg5OmB2Q3vWXf1o8bs6iJHjnVIc4SZPVtPvwKOwdcs5kYKzduFeVHqBKp uoZL+4cp7rjj/dy7//ZFjD79HYnRS8VVOZWS0+AWLHva6KouvErk4pc2gsf95w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzOutXgHOAlIATQiLr0Nq0NcHGI08G58f9vUikX19tw=; b=FSM3nS9fBdWEkP+spAUFe76awR2NyRH+n/cc40Kh1RPQ4RxxN+ASM8uSHE9ux2zttqu55A nBQYc7dVkq/wEQYPrCWc5p/oAIlEd0N9uYnSgIBQWQlFdRnwuSng1SGBK2mdhakE8kBXbX X6Tfrm0CBRCx4xYOMiOGZLFBrKVF3/GoQBMSaC1ue8AMJ8cgehev/nWrw4rFFmqfAzhkM4 2i+oQHqw35FwMSM4jKDV6N/WUAd0+e5bHov+KyMJtahguWVrgeCpK4L0anhUj+vfUhGPng Nt+jog1HXjuZ6J7dERXmOZWSYDKn5eVIv3O5i6f+ngQVrdDNW/Tshx7QMZTq8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568940; a=rsa-sha256; cv=none; b=fViu+i3cIB22uH+hLkL49CqHY9YrLugXT3mvNLUiqqELP+btGRSaIRAQ26SmdWADGfsp3T 9mP9xDGfvEfIPcJJO4oyvn5lMNFDvxRjvhrORCZK2CmAVIIOCBvt1+jxUC+k4PDYj2Twgk 3iGDBMxdtvbIW8LAGghe9gh6T3511z99qrHe2dnUc/Z/Z20cvTn3cOXZQyjIA4L76xYYIe yGLlz9o6hFjFTYXNRFhEWS5Onq0rbzhHr1fPaK0Ha+AbIoLsZO306iUB3Cf8PYVA13jqkx kwZIdF8H+GoPs9pDVHZmjW9x6CVLv7AoPfMJuAjzXifryTI8TDXWrHcIBXWQZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXSC69n6z1H6B; Tue, 06 May 2025 22:02:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2JE8042410; Tue, 6 May 2025 22:02:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2Jjo042407; Tue, 6 May 2025 22:02:19 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:19 GMT Message-Id: <202505062202.546M2Jjo042407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c73b33f85a4d - main - devinfo: Add helper 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c73b33f85a4d34d221c125780a059d86a8351f0b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c73b33f85a4d34d221c125780a059d86a8351f0b commit c73b33f85a4d34d221c125780a059d86a8351f0b Author: ktullavik AuthorDate: 2024-10-17 19:01:51 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Add helper function This is prep for libxo. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index d12f9d4ec331..04809323ec70 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -52,6 +52,7 @@ static int print_device(struct devinfo_dev *, void *); static int print_rman_resource(struct devinfo_res *, void *); static int print_rman(struct devinfo_rman *, void *); static int print_device_path(struct devinfo_dev *, void *); +static void print_path(struct devinfo_dev *, char *); struct indent_arg { @@ -286,6 +287,15 @@ print_device_path(struct devinfo_dev *dev, void *xname) return (rv); } +static void +print_path(struct devinfo_dev *root, char *path) +{ + if (devinfo_foreach_device_child(root, print_device_path, (void *)path) == 0) + errx(1, "%s: Not found", path); + if (!vflag) + printf("\n"); +} + static void __dead2 usage(void) { @@ -336,10 +346,7 @@ main(int argc, char *argv[]) errx(1, "can't find root device"); if (path) { - if (devinfo_foreach_device_child(root, print_device_path, (void *)path) == 0) - errx(1, "%s: Not found", path); - if (!vflag) - printf("\n"); + print_path(root, path); } else if (uflag) { /* print resource usage? */ devinfo_foreach_rman(print_rman, NULL); From nobody Tue May 6 22:02: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 4ZsXSG0Pfsz5vWNW; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXSF0lKpz3Nq3; Tue, 06 May 2025 22:02:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RIg5vYAgOvpHo1bn2G9huQpbkgYBuwnJeKa8AQ9UkvA=; b=ASsdVoo8Sd0K3MMt/kxeMSXoP8GabOy4RFixbujGhhrJYpdd31WKe1oniua7W3Q3OQy3ey vPBVRnMBgCAuFyxpT3sMYJO25iKCiQl0FGuNaeLss1OtyXBlD/sB8K6IzzKKorHt1WNtFR yNMIVknNXQyqMjw3Os8taV67da/k/g/jqAsPsZUDuo5mUCPONJwbZzF9orDcKskjiMsaV1 9ceMIslD42ZYNyWM/KS6J4xlptFF/T/0MBzVLGQt25OX1VklbyjZZPNJpMdW4hxfyolMgF ORRwFznpVuYQKLJfDl+kAfPo1sYOI1dzsKVtmcDnvesKliehIL1oAetJoxAJrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RIg5vYAgOvpHo1bn2G9huQpbkgYBuwnJeKa8AQ9UkvA=; b=gqt0YChbyMSfDBEZOJ7b1ZirRRvAeq/TGpLY6zWR7vCRc3YFM64SPmakc3RbZogHVEnFnO x4xMlGFDzY/MExgAifKWA0AF+gP1WEzV0SDkBYJNwcYa7onf7RKVLzYno/lvjEfe2g0H7k xhT7zD67vM+LG2E65Km/Y+v3BSQtB4HnXNUDEhucqyTiwf4A1MrgrCff8zHQyUoGhbuKdX 39OlbwWhSCcarbe0NMRk4Sw2tNW7x4tmBQJXc/gD2hAFxGZp58l+pmesI7ZKzA8cqwIFP4 U8AuYKSgVRE9hs8ixuwY5Dko2r+OOCobxO+UyKT1J+Hyz/vM4pdgx265nosl3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568941; a=rsa-sha256; cv=none; b=TOqZK0gJ8XKi4l3xE72+1L9TUiW106X7b7yBoiEdPRVlWxc0q2DNbnEtkrvuknniqmWrHR 08fHCM1sOZ4xZIM+kQH0hEOSYruqM315Q3lrFji14X3kHfs6atG8LtFfCYUQLo2tNCX0Tl 1HyZWKrPHc5Qvehk7zO9bOIqN1sLLsQSl0QJgO3I7tFLbLNf757H9qyG0IwAjRcqnX4mC8 ZlTWvA0fX47mn+maYa0vcHx/wJtVu+9JEluTRV9Q6eP5FZxYVnspCzm995gI5B6LelY0nv +r3BztwyYyIQGc9NyAW+g4mLce3E2sFiTFupFWIUQX4xBeuo/tBDsYG63Eb84w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXSF0777z1GcP; Tue, 06 May 2025 22:02:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2KhM042443; Tue, 6 May 2025 22:02:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2K4Z042440; Tue, 6 May 2025 22:02:20 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:20 GMT Message-Id: <202505062202.546M2K4Z042440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dcdfffd83465 - main - devinfo: Add missing function declarations List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcdfffd834656e0ac01c3dd64a32e4ee40f248d5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dcdfffd834656e0ac01c3dd64a32e4ee40f248d5 commit dcdfffd834656e0ac01c3dd64a32e4ee40f248d5 Author: ktullavik AuthorDate: 2024-10-17 19:11:17 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Add missing function declarations No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 04809323ec70..f7ddf44aba96 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -45,14 +45,17 @@ static bool rflag; static bool vflag; +static void print_indent(int); 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 *); +static void print_dev(struct devinfo_dev *); static int print_device(struct devinfo_dev *, void *); static int print_rman_resource(struct devinfo_res *, void *); static int print_rman(struct devinfo_rman *, void *); static int print_device_path(struct devinfo_dev *, void *); static void print_path(struct devinfo_dev *, char *); +static void usage(void); struct indent_arg { From nobody Tue May 6 22:02: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 4ZsXSH4Txlz5vWk4; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXSH2V2kz3NvN; Tue, 06 May 2025 22:02:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AYvjxm19kaU81V3eKRcBKUrAm6U2b4UQ3x7Bi0tDdo=; b=czCPdqpW/gha8bJDbsE18JmEeEFEpEYGTC1a3eu1Q4FhtXa4bDivZbQgtgOOXoeHQ9Cxhj PUnRTcJcfQFIMHxZCZ3OATyGlJ4m/1xDMtart9grV9028x7glir11XHN5sneXBw6jqTOZO EH5lDEi213vCLmc7V01H6AUAIlBPSCK8pIFEYe9wQ8mfZRaSACpKBrQknjcpfeKPZYpzCC i6TO28cA2TDBl+7Xdi/uiZCllgTxt0vUv1NS0RgFbnvwOlM9Oxy8HM4BkL5qZf5SvPqs89 2gCOOAp+vsfGlaV32+bDPFHuP+IstuM5udH4B0Odt4So854TM3dIBrN2pw3z2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AYvjxm19kaU81V3eKRcBKUrAm6U2b4UQ3x7Bi0tDdo=; b=VvFSfSvfWVIcLM2R0aZcGirm22rfw81QPUVXrcRWxgLznvEFCykON7Z5t+WDRQuhFQiQpn SlM/21BoMN2UchjhHjc1/m/xqzz2hUKPeISgh+RoA1PzU5PuXEs1Nr7MlbzEVtLgEa4jDK 5ArV1XtxAp4o+Zh8LR6L/PUR8LT+1eHKXoAgFohsqiBpRHCdEWJnPOcl7eRte6xazTq1ZF B8Ob/VddudqhQT6Zm+MQDjx5cOVpmJ3MUV8UBr5AV4vruPXm3xIj6y0qXCapjCkeKS0Scg hnejctdcxzjDChU5wuacAEhw+J/9yKHcRecdI3DXu5o2AXO/3oQmXSGRuL8xeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568943; a=rsa-sha256; cv=none; b=tD6IqGDfMZFcj5C7b/fyy9s8cmi1nV2yEKa/CyIJhlknLCFn3V3+lcjLSW7fQLvxF7qJiD r5ej2UatOH573AXhOCCYZKEQncfbQkaYpHPDoVVeiaT/70kLYK1ILFny/MSllEy5wOgAr6 7pW+H/t8b0DQ70HtQD5WftL2EmlJt/nUefyt93gNZvG0+dvHVG6SjAwkn7LyokTq1tF2OW dwnIP/USBV1D/bRWqA2FDGNgivwsUlwii6d5zUNmhSPneosG9QXnyc/YqUgYqSmg5onGtj EVoTaNyZnvVw53UDQIuMgeV+yS9r0b4a7ST+Ul5AewOk+F2fRYfwZv9WTaVKCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXSH1stVz1Gf5; Tue, 06 May 2025 22:02:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2NYq042515; Tue, 6 May 2025 22:02:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2NwR042512; Tue, 6 May 2025 22:02:23 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:23 GMT Message-Id: <202505062202.546M2NwR042512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e90dd5d67365 - main - devinfo: Factor out helper 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e90dd5d67365c210881f665290b3b39317685c5a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e90dd5d67365c210881f665290b3b39317685c5a commit e90dd5d67365c210881f665290b3b39317685c5a Author: ktullavik AuthorDate: 2024-10-17 20:13:03 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:47 +0000 devinfo: Factor out helper function This is prep for libxo. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 183b13b4201b..43d88481d903 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -264,6 +264,17 @@ print_rman(struct devinfo_rman *rman, void *arg __unused) return(0); } +static void +print_device_path_entry(struct devinfo_dev *dev) +{ + const char *devname = dev->dd_name[0] ? dev->dd_name : "unknown"; + + printf("%s", devname); + print_device_props(dev); + if (vflag) + printf("\n"); +} + static int print_device_path(struct devinfo_dev *dev, void *xname) { @@ -271,20 +282,14 @@ print_device_path(struct devinfo_dev *dev, void *xname) int rv; if (strcmp(dev->dd_name, name) == 0) { - printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); - print_device_props(dev); - if (vflag) - printf("\n"); + print_device_path_entry(dev); return (1); } rv = devinfo_foreach_device_child(dev, print_device_path, xname); if (rv == 1) { printf(" "); - printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); - print_device_props(dev); - if (vflag) - printf("\n"); + print_device_path_entry(dev); } return (rv); } From nobody Tue May 6 22:02: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 4ZsXSH35Gcz5vWk3; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXSG2QJ2z3P13; Tue, 06 May 2025 22:02:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f4xG3tFNhjM0SokicPUyXFb6DokPS4oM7Jy6ZGVIwQM=; b=BhmRvAbE7T+4bhK0xoD4h726tbgUg5FfTD0UO8JpD2sMHzX+rMmmKTESfUy9m40KMb9Q/f pcPA5A0IbDHFVMB19PI49SbXhQLFndzohkfF2qvZDry3Oy7iwVVatkO/qFRmhrPAXb6mRq IuwiHBuZMpZCL/3xVV9KH0GInwYgDjnPuTJRLSKn9VSL2DPezv4AzBOLiV9uKdyR/Lc+EZ asC8bs0wjL11lymvvuIqTz1MQMPSnmttcAy83sXbQKRGtuDErdlYZqcTaS6exmlOtwtDQV 0Xmt0hkxdzEeZgFVde4gBLZraHHQX/Ws6QcOd3xXDLxlVuWyTMZ0PP6lfwZi7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f4xG3tFNhjM0SokicPUyXFb6DokPS4oM7Jy6ZGVIwQM=; b=ZZw3Z//b32DqsG5JHVP9yi5i/SbFVJsl82aYVhSfxtzWuUcVs8NnmSujun4bw8nWtkNubQ J9ammt2zCemElU2/Re7F5HhGSOoc1duSkarnFGATittJygXjcM6GNcpXaj8aCtNtx6o9IU D7kdDDbmGe0z6q8H9UqQ9qWe1HoiMqLTCNeRf91iKU8iX0pmN8BpiqtmZMWkjyyM22WKJo ZfipJ/9NBGUskwZ9RzLeqSY6oNqO6UHizJmJnTADmwG3ynI7OdpgDhtPW4pjhA9WiqgCKt UYrzfQP5rNtDchpEyPdK39FyowaObLViaLA1yld1f/Wv3BR32W7JN1ZeAEHiiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568942; a=rsa-sha256; cv=none; b=L4ywMmCseShVV/oKtIqnIkNrS0rLpZ6si1+EMPIibW5fpdPBWlaP+woqnvb9HF4j0Fc0EP KaDa/2fD7cgbkKx4UR12zTsbsjIcmKFNzp3dAHTBdKCJVaU3Mg5M8j+MiDYWK7/1K4gvNv S3GTF8oa2VLNr8OdB6CNJuQEicWmEJUFHDL3EZY96qPTqcZhH/2FF5Z3w4Jala9kISYmCh ZzmYqXs4m2HuCYXvejRaUcelhL8V/PDPJvm+W/gT5j/y/3mz5kUB0v8kqMXowKeuFh3pBk FAcIuHs8l23PTh3453BJsaslPcZalJHiLYfcFEElZlEcUGAbQPMGYxvgOTtX1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXSG0tC2z1GYK; Tue, 06 May 2025 22:02:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2MHV042482; Tue, 6 May 2025 22:02:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2Mbe042479; Tue, 6 May 2025 22:02:22 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:22 GMT Message-Id: <202505062202.546M2Mbe042479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d43ba99dd067 - main - devinfo: Rename function and move out printf of device name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d43ba99dd0679b6d3efbffca6ad2437482095714 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d43ba99dd0679b6d3efbffca6ad2437482095714 commit d43ba99dd0679b6d3efbffca6ad2437482095714 Author: ktullavik AuthorDate: 2024-10-17 19:46:50 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:46 +0000 devinfo: Rename function and move out printf of device name This is prep for libxo. No functional change intended. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/devinfo.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index f7ddf44aba96..183b13b4201b 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -49,7 +49,7 @@ static void print_indent(int); 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 *); -static void print_dev(struct devinfo_dev *); +static void print_device_props(struct devinfo_dev *); static int print_device(struct devinfo_dev *, void *); static int print_rman_resource(struct devinfo_res *, void *); static int print_rman(struct devinfo_rman *, void *); @@ -156,11 +156,8 @@ print_device_rman_resources(struct devinfo_rman *rman, void *arg) } static void -print_dev(struct devinfo_dev *dev) +print_device_props(struct devinfo_dev *dev) { - - printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); - if (vflag) { if (*dev->dd_desc) { printf(" <%s>", dev->dd_desc); @@ -179,7 +176,6 @@ print_dev(struct devinfo_dev *dev) printf(" (suspended)"); } - /* * Print information about a device. */ @@ -194,7 +190,8 @@ print_device(struct devinfo_dev *dev, void *arg) if (printit) { indent = (int)(intptr_t)arg; print_indent(indent); - print_dev(dev); + printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); + print_device_props(dev); printf("\n"); if (rflag) { ia.indent = indent + 4; @@ -274,7 +271,8 @@ print_device_path(struct devinfo_dev *dev, void *xname) int rv; if (strcmp(dev->dd_name, name) == 0) { - print_dev(dev); + printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); + print_device_props(dev); if (vflag) printf("\n"); return (1); @@ -283,7 +281,8 @@ print_device_path(struct devinfo_dev *dev, void *xname) rv = devinfo_foreach_device_child(dev, print_device_path, xname); if (rv == 1) { printf(" "); - print_dev(dev); + printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); + print_device_props(dev); if (vflag) printf("\n"); } From nobody Tue May 6 22:02: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 4ZsXSJ65G3z5vWdN; Tue, 06 May 2025 22:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXSJ3Wy5z3P1P; Tue, 06 May 2025 22:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5enRxymwZQJ/X/YzA2ljukW9B+ZWTBP+4JRjmiBh4rQ=; b=AYWVoWu1f0Na2LaAp6VktozTMvJgsxGJAVnkYf3/v11Q/vUAmtwTxpcV10Kq8HzRCEoRDg Ddx3JCUzYNzucsqUU02k//kD+Wfuxztr6XLz/S46ppizbhAMaBA5PwUf5aupuh29ZpUVlk bXCjipSj3iT1sqAeijvcyLraP1gCKP6C/t3nXZ63ooxNgnmeUeyG7fWM96YY9dNPK4ooH9 62CtZMhCaynUBI8wM+JcrosPyFAbCuvCUujjsY5EO3W7wXLvjVWGM+DfWMeID/w0IKOgpQ AJsprBEWa2WJPqO7Hh9V2H1Df/qxUxS+pqsn74+dGNcp7N2yHORshzwKhNKGWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746568944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5enRxymwZQJ/X/YzA2ljukW9B+ZWTBP+4JRjmiBh4rQ=; b=X9+QgtezwB8fNMjQ14P2xme0Lmt9wTQCD7UhI722U30hhrCDT5EcuqDgQ++ZCkIo06uODc 2zPPqhjJdZDigX9DXsqhBwofX4eVX8dWMQC1OZsraR1mYw2Cxs6a14LkiY/jjdysDZIVt5 0hD3ivOR7Qz7/Zmma94FT4e4hu5AkTxTL823gMloP5ojgFA/WeM6hShm4MXUJnxoDxrS7A /LiII9RxyeOQ+iiqPM2Ve2AZPBGICPq3beC90gm5FgeQ4i3ViMpzdNITj4YkPKFdgg82J4 76JGQZ3HsbAJ1dKvPw5E4oadpyaTyIVe/7SdwBDwpjqYvluNAy1HIyGKwWKNnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746568944; a=rsa-sha256; cv=none; b=abghQhUzll4aiTIuOTwT9TYoIviOBjEdKWVS9taBt8F168AqqqYHWQNVFrCqPV6XXlptlX 4AH56kah1Ysy3e0U6W9QH0Z4cRfDCnlJmCHtdw/A4cyugBN2dOQ4vAifRTZLRBVumNttmc G23EXdTbJaxkMnQBTkNYU0GUOP2u+fBgvZLvgr1sIJ8+KiBocYC97SK/yogGqDuuGgSRyW uzNLsUwN409CTij2/VvgBSh8N+lU7B3bPyf8sNbOoyH1dxQG4HKxWzbtqjseo7sZS5p1x9 F9efVUKfHo+fhZ+DtDCh6HxCF3SKpWOUwfHsqhqJPwzYycsmRttbpzpWv00D6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXSJ2tK7z1H6C; Tue, 06 May 2025 22:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546M2OWj042548; Tue, 6 May 2025 22:02:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546M2O1b042545; Tue, 6 May 2025 22:02:24 GMT (envelope-from git) Date: Tue, 6 May 2025 22:02:24 GMT Message-Id: <202505062202.546M2O1b042545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c759aca606ce - main - 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c759aca606cee8352c1d739bf7a762c8a2ed2012 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c759aca606cee8352c1d739bf7a762c8a2ed2012 commit c759aca606cee8352c1d739bf7a762c8a2ed2012 Author: ktullavik AuthorDate: 2024-10-17 21:24:27 +0000 Commit: Warner Losh CommitDate: 2025-05-06 22:01:47 +0000 devinfo: Add support for libxo Reviewed by: imp Pull-Request: https://github.com/freebsd/freebsd-src/pull/1480 Closes: https://github.com/freebsd/freebsd-src/pull/1480 --- usr.sbin/devinfo/Makefile | 2 +- usr.sbin/devinfo/devinfo.c | 217 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 181 insertions(+), 38 deletions(-) diff --git a/usr.sbin/devinfo/Makefile b/usr.sbin/devinfo/Makefile index f6506c176c9c..55b234f18363 100644 --- a/usr.sbin/devinfo/Makefile +++ b/usr.sbin/devinfo/Makefile @@ -2,6 +2,6 @@ PACKAGE= devmatch PROG= devinfo MAN= devinfo.8 -LIBADD= devinfo +LIBADD= xo devinfo .include diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 43d88481d903..629a04ba6687 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -4,6 +4,7 @@ * 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 @@ -40,12 +41,18 @@ #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 *); @@ -74,7 +81,46 @@ print_indent(int n) n = MIN((size_t)n, sizeof(buffer) - 1); memset(buffer, ' ', n); buffer[n] = '\0'; - printf("%s", buffer); + 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:%s}={d:%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; } /* @@ -86,20 +132,28 @@ 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) { - printf("0x%jx", res->dr_start); + xo_emit("{:start/0x%jx}", res->dr_start); if (res->dr_size > 1) - printf("-0x%jx", end); + xo_emit("{D:-}{d:end/0x%jx}", end); + xo_emit("{e:end/0x%jx}", end); } else { - printf("%ju", res->dr_start); + xo_emit("{:start/%ju}", res->dr_start); if (res->dr_size > 1) - printf("-%ju", end); + xo_emit("{D:-}{d:end/%ju}", end); + xo_emit("{e:end/%ju}", end); } + xo_close_instance(safe_desc); + free(safe_desc); } /* @@ -121,7 +175,7 @@ print_device_matching_resource(struct devinfo_res *res, void *arg) return(1); print_indent(ia->indent); print_resource(res); - printf("\n"); + xo_emit("\n"); } return(0); } @@ -134,6 +188,7 @@ 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; @@ -143,13 +198,18 @@ 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); - printf("%s:\n", rman->dm_desc); + xo_emit("{d:%s}:\n", rman->dm_desc); + xo_open_list(safe_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); @@ -160,20 +220,40 @@ print_device_props(struct devinfo_dev *dev) { if (vflag) { if (*dev->dd_desc) { - printf(" <%s>", dev->dd_desc); + xo_emit(" <{d:%s}>", dev->dd_desc); + xo_emit("{e:description/%s}", dev->dd_desc); } if (*dev->dd_pnpinfo) { - printf(" pnpinfo %s", 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"); } if (*dev->dd_location) { - printf(" at %s", dev->dd_location); + xo_open_container("location"); + xo_emit("{D: at}"); + print_kvlist(dev->dd_location); + xo_close_container("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)) - printf(" (disabled)"); + xo_emit("{D: (disabled)}"); else if (dev->dd_flags & DF_SUSPENDED) - printf(" (suspended)"); + xo_emit("{D: (suspended)}"); } /* @@ -183,16 +263,20 @@ static int print_device(struct devinfo_dev *dev, void *arg) { struct indent_arg ia; - int indent; + int indent, ret; + const char* devname = dev->dd_name[0] ? dev->dd_name : "unknown"; bool printit = vflag || (dev->dd_name[0] != 0 && dev->dd_state >= DS_ATTACHED); if (printit) { indent = (int)(intptr_t)arg; print_indent(indent); - printf("%s", dev->dd_name[0] ? dev->dd_name : "unknown"); + + xo_open_container(devname); + xo_emit("{d:%s}", devname); + print_device_props(dev); - printf("\n"); + xo_emit("\n"); if (rflag) { ia.indent = indent + 4; ia.arg = dev; @@ -201,8 +285,13 @@ print_device(struct devinfo_dev *dev, void *arg) } } - return(devinfo_foreach_device_child(dev, print_device, + ret = (devinfo_foreach_device_child(dev, print_device, (void *)((char *)arg + 2))); + + if (printit) { + xo_close_container(devname); + } + return(ret); } /* @@ -214,6 +303,7 @@ 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); @@ -221,24 +311,38 @@ 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) - printf("0x%jx-0x%jx", res->dr_start, end); + asprintf(&res_str, "0x%jx-0x%jx", res->dr_start, end); else - printf("0x%jx", res->dr_start); + asprintf(&res_str, "0x%jx", res->dr_start); } else { if (res->dr_size > 1) - printf("%ju-%ju", res->dr_start, end); + asprintf(&res_str, "%ju-%ju", res->dr_start, end); else - printf("%ju", res->dr_start); + 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); } 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) @@ -247,9 +351,11 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) printf(" at %s", dev->dd_location); } } else { - printf(" ----"); + asprintf(&entry, "{el:%s}{D:%s} {D:----}\n", res_str, res_str); + xo_emit(entry, "----"); } - printf("\n"); + free(entry); + last_res = res_str; return(0); } @@ -259,8 +365,16 @@ print_rman_resource(struct devinfo_res *res, void *arg __unused) int print_rman(struct devinfo_rman *rman, void *arg __unused) { - printf("%s:\n", rman->dm_desc); + char* safe_desc = xml_safe_string(rman->dm_desc); + + xo_emit("{d:%s}:\n", rman->dm_desc); + xo_open_container(safe_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); } @@ -269,12 +383,17 @@ print_device_path_entry(struct devinfo_dev *dev) { const char *devname = dev->dd_name[0] ? dev->dd_name : "unknown"; - printf("%s", devname); + xo_open_container(devname); + open_tag_count++; + xo_emit("{d:%s }", devname); print_device_props(dev); if (vflag) - printf("\n"); + xo_emit("\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) { @@ -288,7 +407,7 @@ print_device_path(struct devinfo_dev *dev, void *xname) rv = devinfo_foreach_device_child(dev, print_device_path, xname); if (rv == 1) { - printf(" "); + xo_emit("{P: }"); print_device_path_entry(dev); } return (rv); @@ -297,19 +416,26 @@ print_device_path(struct devinfo_dev *dev, void *xname) static void print_path(struct devinfo_dev *root, char *path) { - if (devinfo_foreach_device_child(root, print_device_path, (void *)path) == 0) - errx(1, "%s: Not found", 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 (!vflag) - printf("\n"); + xo_emit("\n"); + + while (open_tag_count > 0) { + xo_close_container_d(); + open_tag_count--; + } } static void __dead2 usage(void) { - fprintf(stderr, "%s\n%s\n%s\n", - "usage: devinfo [-rv]", - " devinfo -u [-v]", - " devinfo -p dev [-v]"); + xo_error( + "usage: devinfo [-rv]\n", + " devinfo -u [-v]\n", + " devinfo -p dev [-v]\n"); exit(1); } @@ -321,6 +447,11 @@ 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) { @@ -346,20 +477,32 @@ main(int argc, char *argv[]) if ((rv = devinfo_init()) != 0) { errno = rv; - err(1, "devinfo_init"); + xo_err(1, "devinfo_init"); } if ((root = devinfo_handle_to_device(DEVINFO_ROOT_DEVICE)) == NULL) - errx(1, "can't find root device"); + xo_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 Tue May 6 22:15: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 4ZsXlP4cVFz5vXc1; Tue, 06 May 2025 22:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXlP3lyyz3cxs; Tue, 06 May 2025 22:15:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6CVDtcSBxQzZqyE+w0HiM7fvftdnkJ1bvxMZgXdb5OA=; b=a67u98iW+BRQyNcM0EPL9aNyk0x0sW1MFMlfe/VNB3o5iuDE1TbKjI+ABdz6tvyj+M8Yo/ GIqB5FT0nlkMd6zyhzYx2ew15Ohi71tnPI2YeBKotL7vqELvClMG/NJIODPnAsJW2gHBYL dRhHr4p62jWT2ZdqDTR526/LIg17goMwgQXhEXi5xCVQ1rGbwvn6w5nbBCvoD50cxO5ZQZ 9n8+FXb6BpTs/4Oga3DdeuWtfdUWMT1z876u39HRSTt8wUKZlkiS4O9fAlnE6uD3lNl1qL +NfZv8G+WYWlwiOEoIjx24wJ3YRu9JQ6VpUuZCRY6vRz+KEjqkDtRyonrdq5SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6CVDtcSBxQzZqyE+w0HiM7fvftdnkJ1bvxMZgXdb5OA=; b=qaktiNRrZ1CQoYBQQvySb8oei3jKhdGfimnYZc99fQ5Fp5oo2m5oY1tJxycp32/ej8Th88 s0R/rkA9cR5HPLLHu91lsRG8dMyIvAvUz9UKbH4aswZ7XN0zgqQNKP/ksrygUpAy4F4MAn PxdhTWkDuRRHkkNws5c3H+I5SkZv7i+P4LEcs2e+TDZ4GZIZz96PXYbJlePbeEw9qjMfC+ XqScF3qmU2UluY/W3QH4bA+4YNEWti7I6sSmG9xTJg9pZ/l0++P4YK7LRLSjHrQXr/d57Z 4GWp/XcHmywByEYJVB1qeQOHydUJTB7v0a3P56FvbaCL2NsCGEx7gCL4VcBm8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746569729; a=rsa-sha256; cv=none; b=SRkY98+uNjWomTPlPEfoR6sWqflxvj5Wmadn+tVv4pYnPiPCHb9wD8+/fLmLSTXRfuoovi ZDXS7kKKsGoa2v2biG8DeVK+TI0k7T4NFWvormFng/tAIf3s11yAj8UQK3atvQv8P8gF4Q K5+E+icGvnf0kKbaYcPDcb8ROVUZ6BPKxxtZfL7Q+nIQ5pO1luf+xQH0duIA6i/iWu1w0V a9aEhw+hquam3aDVSK2tQJyAK490Um8YtKpz5rFmhxbLLw+nDruFkcshRgWFFuDJbIIVqs oScQgYK89cQfSSjid3p8FH/8F325Mjj2SzDuNv+/9eZmIgA8NfUdrpURl4vhUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXlP3KJdz1GvL; Tue, 06 May 2025 22:15:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MFTZp062898; Tue, 6 May 2025 22:15:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MFTrJ062895; Tue, 6 May 2025 22:15:29 GMT (envelope-from git) Date: Tue, 6 May 2025 22:15:29 GMT Message-Id: <202505062215.546MFTrJ062895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: d04c93a2adcc - main - libc: Don't bias DTV entries by TLS_DTV_OFFSET List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d04c93a2adccb4c3a17f7391126a9246326e3fea Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d04c93a2adccb4c3a17f7391126a9246326e3fea commit d04c93a2adccb4c3a17f7391126a9246326e3fea Author: Jessica Clarke AuthorDate: 2025-05-06 22:14:50 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 22:14:50 +0000 libc: Don't bias DTV entries by TLS_DTV_OFFSET PowerPC and RISC-V have a non-zero TLS_DTV_OFFSET. The intent behind this in the design is that DTV entries are biased by this, as are (in the other direction) the DTPOFF/DTPREL entries in the GOT. However, this is pretty pointless in practice, and both FreeBSD and glibc's run-time linkers don't bother to bias DTV entries, instead just adding the bias back on at the end in __tls_get_addr. In libc we also have a minimal implementation of this for statically-linked binaries, which is only in practice used for code compiled with -fPIC (not -fPIE) that is also linked without TLS relaxation support. PowerPC supports linker relaxation for TLS sequences, so this likely never gets hit there, but RISC-V does not, and so easily does if you compile an executable with -fPIC. In this implementation we add TLS_DTV_OFFSET both to the DTV entries in __libc_allocate_tls and to the result of __tls_get_addr, meaning that any TLS accesses using the General Dynamic model in static binaries on RISC-V end up off by 0x800. Historically this also did not matter as __tls_get_addr was a stub that always returned NULL, so although 6e16d0bc4376 ("Rework alignment handling in __libc_allocate_tls() for Variant I of TLS layout.") added this DTV implementation, nothing actually read the entries. However, now it's a real implementation, and dl_iterate_phdr also now relies on it, it does matter. Fix this by not biasing the DTV entries, just like RTLD. We could instead stop adding TLS_DTV_OFFSET in __tls_get_addr, but being consistent between libc and RTLD seems better. (Note this also applies to MIPS on stable/13) Reviewed by: kib Fixes: ca46b5698e8a ("libc: implement __tls_get_addr() for static binaries") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50181 --- lib/libc/gen/tls.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 30b4fc583c98..8d453eccb801 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -151,7 +151,8 @@ libc_free_aligned(void *ptr) * where TP points (with bias) to TLS and TCB immediately precedes TLS without * any alignment gap[4]. Only TLS should be aligned. The TCB[0] points to DTV * vector and DTV values are biased by constant value (TLS_DTV_OFFSET) from - * real addresses[5]. + * real addresses. However, like RTLD, we don't actually bias the DTV values, + * instead we compensate in __tls_get_addr for ti_offset's bias. * * [1] Ulrich Drepper: ELF Handling for Thread-Local Storage * www.akkadia.org/drepper/tls.pdf @@ -167,8 +168,6 @@ libc_free_aligned(void *ptr) * but we must follow this rule due to suboptimal _tcb_set() * (aka _SET_TP) implementation. This function doesn't expect TP but * TCB as argument. - * - * [5] I'm not able to validate "values are biased" assertions. */ /* @@ -272,7 +271,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) /* Adjust the DTV. */ dtv = tcb[0]; - dtv[2] = (Elf_Addr)(tls + TLS_DTV_OFFSET); + dtv[2] = (Elf_Addr)tls; } else { dtv = __je_bootstrap_malloc(3 * sizeof(Elf_Addr)); if (dtv == NULL) { @@ -283,7 +282,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) tcb[0] = dtv; dtv[0] = 1; /* Generation. */ dtv[1] = 1; /* Segments count. */ - dtv[2] = (Elf_Addr)(tls + TLS_DTV_OFFSET); + dtv[2] = (Elf_Addr)tls; if (libc_tls_init_size > 0) memcpy(tls, libc_tls_init, libc_tls_init_size); From nobody Tue May 6 22:15: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 4ZsXlR11cZz5vXc2; Tue, 06 May 2025 22:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXlQ4FbPz3d3p; Tue, 06 May 2025 22:15:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KcoHJseKh6CSQTkQaG16gnLmhyJ1IuKD0fWpUM6K6Gs=; b=OMBpWycNEkKX37cTRzF4MtBnCGZMAISWKD66HELIyeH+lH/PdOQKOjLWRqbcHHqEy/+MMk qpiwJLxaHEDnN1hbBJuuKAO3arFiGiQhBDI1ShNS+tu/rWRKBbAib8F/8VjmZovT8nO9mU z39qUqWAJgVTdnpttBZjZ9InnVm/Raun1nqcqMjNqaV7XvGs+59Z4YMRAo5bDgUx/cPRj/ CW17NkKSZQbbpAxSbw+cY3PdB+PP88jCWUUZwVxG6u1Jw2bsbPXbpHcyo4GC3wNvNkyGPn UtqqKuRRQ3bSoFNH6FMRwL6MHnkEgtp7PQ8+F6q42bYbGuna0fhD00Jqx4wBVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KcoHJseKh6CSQTkQaG16gnLmhyJ1IuKD0fWpUM6K6Gs=; b=op8IcNlc2Z/zLYRZsxYVwXMpQKJ8l0MH8IJhOEUhure2LoPhCZ9UCt0mzx2Mswc5e/VzFN pLPALfsbfdHllFFIuP6tEByfrkGelmhYa2WAX2H4aFTBhz1tWlmVLVqx4uNsNsDe1chebU cjPdjgShoLB7oSiJUqgo1bXcQxxv+q05ILbJ3TXKDGvZfsgLnqBPSojPUW3qt4PNEXM2lG y/sISwzC6eb+5eT2TalzszXSlLSO1gU26kJXEZuBHaHn087gNNfwUQUAcyE6QLdv4S42k0 qO7aLZNDr0DHVa6oCb2P0UdSKR6jziGkMYndyTOWEtvr9xw6lIWMbDUrncFsPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746569730; a=rsa-sha256; cv=none; b=LvEpaFIdWp/Z9AWrUfpHltWOgtWDlP4vCjR6ZrXXLGJVcwXN0Gh6i3fhEVPj1cgjAoINcJ XNyY/2Jce1XzJ9p58QOq7c/Q/+mOo1UBpKdCo3DZ7X2VzSA+1OELwfCCuN5+NbFptUg39d GS0iFvEqj+qRDtCp6pbMz7c3DhODbR58uW62IyZhFlYNwuzbynm6w16Ptx9poyMWpBm4HJ f4jYjkVUw4uaxKIkUXW68g0yJ96kRIblAeI7u63LN6Ew6AmfyYojq5Gdfix//BsjUxpDG1 xyaSqUQMylN10w2uuGSaBhkinH0z9d12Xf4jFPYpX6k4cCckZZE4OLuOBK+zDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXlQ3bYkz1HKK; Tue, 06 May 2025 22:15:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MFUGs062934; Tue, 6 May 2025 22:15:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MFUWn062931; Tue, 6 May 2025 22:15:30 GMT (envelope-from git) Date: Tue, 6 May 2025 22:15:30 GMT Message-Id: <202505062215.546MFUWn062931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 78b99f369f75 - main - libc: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78b99f369f75f5df49b506ae750659b07ab34362 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=78b99f369f75f5df49b506ae750659b07ab34362 commit 78b99f369f75f5df49b506ae750659b07ab34362 Author: Jessica Clarke AuthorDate: 2025-05-06 22:14:50 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 22:14:50 +0000 libc: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V The implementation of dl_iterate_phdr for statically-linked binaries abuses __tls_get_addr to get to the start of the TLS block. For most architectures, tls_index's ti_offset (relocated by DTPOFF/DTPREL for GOT entries) is just the offset within that module's TLS block. However, for PowerPC and RISC-V, which have a non-zero TLS_DTV_OFFSET and thus are designed assuming DTV entries are biased by that value, ti_offset normally has TLS_DTV_OFFSET pre-subtracted. By using an offset of zero here we end up getting a pointer TLS_DTV_OFFSET past what __tls_get_addr would return for the first TLS variable. Fix this by using -TLS_DTV_OFFSET to mirror what the General Dynamic GOT entry for the first TLS variable would be. (Note this also applies to MIPS on stable/13) Reviewed by: kib Fixes: dbd2053026a6 ("libc dl_iterate_phdr(): dlpi_tls_data is wrong") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50182 --- lib/libc/gen/dlfcn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index bffee3952e0d..ae1c8d83df19 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -229,7 +229,7 @@ _dl_iterate_phdr_locked( return (1); _once(&dl_phdr_info_once, dl_init_phdr_info); ti.ti_module = 1; - ti.ti_offset = 0; + ti.ti_offset = -TLS_DTV_OFFSET; phdr_info.dlpi_tls_data = __tls_get_addr(&ti); ret = callback(&phdr_info, sizeof(phdr_info), data); return (ret); From nobody Tue May 6 22:15: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 4ZsXlS0KZMz5vXc8; Tue, 06 May 2025 22:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXlR59YZz3cnC; Tue, 06 May 2025 22:15:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vY3vRLW1vvcFRwDXSssCwAmg1E+v85L86tnftykcq34=; b=vEI1+5sT910A0kOUKqYTngno/v1M594JicQWKZdOPgTsXjI/ko10SElhXnyZ62O7lvCnaV Wf1ToHTkzu8fUQ+kH49+WLiWa5F2/1/PuKls9qMXHoQ1e05e0v0j3GEITfAcuwxpD36PCM L0w3CAVODYQrUKSGErSdkn0qSvzpDoKaqXRdP20dViT1570O2EIvUobLq8s8ToJX3/kOIF SPy1wREcJpYXp6oGkbTJIcf4+miTry5D8YLYpRT9whYGwKATFpVmFo91EIUWdMJ5jwDJyA //cB3WzhP1UZNs8zRJJ1IIwLah1xXrQq3Oz3d58fv2p74UNFl+S+/mc01hN3BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vY3vRLW1vvcFRwDXSssCwAmg1E+v85L86tnftykcq34=; b=YpVZC+6h22naOCsjOL8mCf5Xe/0JCtsN1p3Z+zDp+xgxTwkJMN7PlDJp6IvJyzhds6+eb3 tx4vJvrSSs40EExQEZMrFQnj9UB/WWEP6CmX5ed0l4uGBh849rNyDcVOq3Bd0jys75q9hF /JrtClKmmgV3jOLuaAN5Y+d5Ndn1LrOtCYbPAOiyiL3dthkfqyIwKgQWjUg/7Y7R+KAKAl zpH0X6VIOU9pmQfafJc6FUUOwg0VUwBOI/1jCe/+3rwirHONAZdjeby69ItFsMoDCm958S 6Dhz2VisbI7RC8ucrMnAGnVBfqN1cOcw4BRxVbM14y+zhjWLYd8S2YJhbk8clw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746569731; a=rsa-sha256; cv=none; b=pkOtRaMjmlGf0X7Ww1CfMBegT13XwkjyNdZ99g+E8wLp7RjbfE1wmME9/eAOsEBfMPpmBC ImNYwmR5nCByaQNS5iXSNEj9gRHVh8pthsv77TrBA1cxQZQI9X4/vCgyKBHBq3s5GaBZ8O xl/nxTot+K47c9l3kuttLWoMh9M/v0hRzZLvK+R3A1XtP24NqD3AyRd+Q/xeAoKU3hmRTh jSIZxmoLS1nBRrd71OI46HXMjUQRF3ZEz9QzNFuxgifOOnN+ljss3C7JVP2ypWjQ0m1Rd8 GdqH9a3zoQXNsYfi9FTBgiHD54+FP5LJwqRPxHqpaPVF1U8V128g+xtp43m+dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXlR4k1Cz1HHj; Tue, 06 May 2025 22:15:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MFViQ062967; Tue, 6 May 2025 22:15:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MFVPr062964; Tue, 6 May 2025 22:15:31 GMT (envelope-from git) Date: Tue, 6 May 2025 22:15:31 GMT Message-Id: <202505062215.546MFVPr062964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 8ad9cec3a2cc - main - rtld-elf: Fix dlsym(3) for TLS symbols on PowerPC and RISC-V List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ad9cec3a2cc643020a286ee68f70eb01225fbdd Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=8ad9cec3a2cc643020a286ee68f70eb01225fbdd commit 8ad9cec3a2cc643020a286ee68f70eb01225fbdd Author: Jessica Clarke AuthorDate: 2025-05-06 22:14:51 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 22:14:51 +0000 rtld-elf: Fix dlsym(3) for TLS symbols on PowerPC and RISC-V The implementation here is meant to mirror what a GOT entry for the given symbol would use for ti_offset. However, on PowerPC and RISC-V, TLS_DTV_OFFSET is non-zero, and so the GOT entries are normally biased by this, but we fail to do so here. As a result we end up getting a pointer TLS_DTV_OFFSET past where the variable actually is. (Note this also applies to MIPS on stable/13) Reviewed by: kib Fixes: 5ceeeba90c6c ("Import DragonFly BSD commit") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50183 --- libexec/rtld-elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 12aee444fccf..29d32e54e690 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -4135,7 +4135,7 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve, sym = rtld_resolve_ifunc(defobj, def); else if (ELF_ST_TYPE(def->st_info) == STT_TLS) { ti.ti_module = defobj->tlsindex; - ti.ti_offset = def->st_value; + ti.ti_offset = def->st_value - TLS_DTV_OFFSET; sym = __tls_get_addr(&ti); } else sym = defobj->relocbase + def->st_value; From nobody Tue May 6 22:15: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 4ZsXlT4YYYz5vXYr; Tue, 06 May 2025 22:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXlT2HM5z3ctb; Tue, 06 May 2025 22:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jy9MwGgFpVEQFXusyZAmUsXkU0tuVYvyfs0knrvgO+8=; b=Xa3S6DLnSg34X2A5KOsEwWxD4oahXrZkMnq3cuLVlzWn/oT2FT9+txwvJGojJg3c4R8JQx vbJWVPmMMoV/+iSj+tcY7yq0mA+gvRKVqLmM6zS9T7ghLvpuvOtEA1yLZaE3Wu+4+h5mOi Hl6OCjRtXI8dfy68pkGxI1eibURPZvTd8twIFY17iRiizmzPfWcKZyI4LnN+nUv4VyYAP1 1eSigYI77mLQK4K0/sKA2ZZa3Vvyk6SShICHf4dVYh1eDxsb4JZAycLzi08wKt7kmAEH/m zJ8UpSVWZcbXFJ1GzVcFZxfJJ2aRNmDDrBxNRavPY2xLvSl3TLFZ31hCd0NIbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jy9MwGgFpVEQFXusyZAmUsXkU0tuVYvyfs0knrvgO+8=; b=MQD0JUdtgI6wK0yMSEEKg5YbL1WiJUZ3X2GydT85RAoYFIf9ae1wxUZgXjLA2oCEr1s0i3 3r8jYuuOOuWOwWKBV6EgivCGs16PGQZ4XI994texwuRNoqBWNOaKJ/tbE0ai964H9fIXAR a9EaywiT5PX6God+2afJOOKsciVb2R6cQtff9GSUVDd3GmX9HKaJP6UvyHC+USd1OU88uJ SabuFafI1LGGY9O5SWFtbQdwik7jvNArPDncKg40/TuqVvQaPoFJZ/+GZijL47yNcEPYpb PmD+AJmB/wvpwvd27Td6cxadKTZ9UpZafPBm3GUFRFv5mlgy0mkWszoIOQT9Yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746569733; a=rsa-sha256; cv=none; b=buznwe9YPTDo4poD9PxnDxlSkkaEOHgOgzNxabtWYBH/IlP/oTZ/Q6K1jqc3oFz8VVA/10 vfZUBKl2v8dcWBse/o4Yn0wybb4lXZlEtpmIbR33yClMQJ+puM4XprDnHGJtk/kYYv/A4S j1mCl+t0qldBqxrbG/aoO3kcYmmAHF/YcZbnTxB+9cSaB9ANYhslFqAwuHuaE4cfrHXFCe HO43iFKGs28dugPcEZ+ts7Xgx260Qoyz/agTHwh5h2W0LfnxFUCT7M83VrwD0c/91h44Uy Fll+x91HMnlOMw6eZA9EpwAPQvG/ASB28OGNEVoPPAoFNL8JEV2ntmGhZ7CW+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXlS5h54z1HHk; Tue, 06 May 2025 22:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MFW8M063003; Tue, 6 May 2025 22:15:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MFWH7063000; Tue, 6 May 2025 22:15:32 GMT (envelope-from git) Date: Tue, 6 May 2025 22:15:32 GMT Message-Id: <202505062215.546MFWH7063000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: c02aaba1b454 - main - rtld-elf: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c02aaba1b4549c1c3b1481f7c935f6cc80b98e8d Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c02aaba1b4549c1c3b1481f7c935f6cc80b98e8d commit c02aaba1b4549c1c3b1481f7c935f6cc80b98e8d Author: Jessica Clarke AuthorDate: 2025-05-06 22:14:51 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 22:14:51 +0000 rtld-elf: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V The implementation of dl_iterate_phdr abuses tls_get_addr_slow to get to the start of the TLS block, inlining the implementation of __tls_get_addr as if the tls_index's ti_offset were 0 (historically it called __tls_get_addr itself but changed due to locking issues). For most architectures, tls_index's ti_offset (relocated by DTPOFF/DTPREL for GOT entries) is just the offset within that module's TLS block. However, for PowerPC and RISC-V, which have a non-zero TLS_DTV_OFFSET and thus are designed assuming DTV entries are biased by that value, ti_offset normally has TLS_DTV_OFFSET pre-subtracted, but it's __tls_get_addr's responsibility to compensate for that. By using an offset of zero here, tls_get_addr_slow will return a pointer to the start of the TLS block itself, so by adding TLS_DTV_OFFSET we will point TLS_DTV_OFFSET past the module's TLS block. Fix this by removing the extra bias (the alternative would be to pass -TLS_DTV_OFFSET and keep the addition, which would more closely follow what __tls_get_addr does, but this is more direct). (Note this also applies to MIPS on stable/13) Reviewed by: kib Fixes: d36d68161517 ("rtld dl_iterate_phdr(): dlpi_tls_data is wrong") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50184 --- libexec/rtld-elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 29d32e54e690..e4e14edbb5c8 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -4316,7 +4316,7 @@ rtld_fill_dl_phdr_info(const Obj_Entry *obj, struct dl_phdr_info *phdr_info) phdr_info->dlpi_tls_modid = obj->tlsindex; dtvp = &_tcb_get()->tcb_dtv; phdr_info->dlpi_tls_data = (char *)tls_get_addr_slow(dtvp, - obj->tlsindex, 0, true) + TLS_DTV_OFFSET; + obj->tlsindex, 0, true); phdr_info->dlpi_adds = obj_loads; phdr_info->dlpi_subs = obj_loads - obj_count; } From nobody Tue May 6 22:15: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 4ZsXlV327pz5vXcC; Tue, 06 May 2025 22:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXlV0MyLz3d6X; Tue, 06 May 2025 22:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Sz7iyIdrKn20wv+Tf/vX3vpgwczsDEveCZo8bic8aQ=; b=uUdLeOKmNp3zcweHwn0xIQFhl8hsVE0iDf7lpmQj6zH720RaW9NOhsbBh+3Q3cI14GmZGF pKXEkkuWwECLq+dPP+c6mjS3TrdCfugvvdVQoRBrYpZSDqLpKwGaARWQjgPYwVPPvHsJup kVxubccqRs9CLZyWSOqOoRqZHkA8An/zZ9ud8N/Y12Mrhee3nRTERKWeMy+3JOyCj3jdEm iFKgDRcdeuejeATV6Mi7ANnDMt5Ew+VyWmxDZChOo+88Se4ULwnnWhW23HIzvDD48jJz8X Zq9s66CbIr5TUcKdvgAHgwV0Zv83qNRouQMS2r4X6p9mvZeZzjrPrIiDnv6nhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Sz7iyIdrKn20wv+Tf/vX3vpgwczsDEveCZo8bic8aQ=; b=u4egH7kkPIy+wp0zz+Z0R8LTRnEce/VR0VyFhMTtpjoDOqt+UE2Uz8m8iXHr3fig8seeIa QXK7nwIWnFXpaKLFbh2kbGWcDwYrqQSlJ2N9854tjADvbVo1P+AFJO3mzFjq20tH8w9T+f zJU/0BKx2ONkVEoXR2DjKU/vYTDXlTRBKuiNcvi2Fm4mux6pnJ0EIFYYx6HvOu9wc9L2g1 jqJt+QzPo23sgEPN+KSvhb4FVR3Wd5LUsRcjAnE2CK5fCXNzsTsBQVEFa6JNZDN03B+HTf 9Dxh314Izib6XUMBNxV/s4TS845zMEDD/80IL2W1pnLgHyOHJfT+FhWVMnh1Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746569734; a=rsa-sha256; cv=none; b=i5lKWEZwFJJ8+Xa2XHSJYUN0wB4X1wxMB/5y+yDXAHKBPt/tQfP3eDud8xpXlUqVOVn2g3 pT2Hl24e1bwsN87KY7I+tsfT98vyG0OZUxJyuGYFN0t/fYctdVxWAaq8SYXU3YuJ2NyyFP XbnAJvZoejsbG4xp5tRQ59T7R8k3hCCDQWTvOFdN/GJZiIwnhBzxd6N6llnr4VKVDcwDc6 0r7rcxOoAiUXMZdVXBYTSK4n+0UWG+/s7ddUICrvsh8DDA8mQtIM4wGotFaenkcEnURDGs QOm4mEZfuIzhshW3BKMf478+oVsdjsxoLaNCVbqWEKCUDi1UIDkgqBZabs+bHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXlT6f3Rz1GvM; Tue, 06 May 2025 22:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MFXuk063038; Tue, 6 May 2025 22:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MFXkq063035; Tue, 6 May 2025 22:15:33 GMT (envelope-from git) Date: Tue, 6 May 2025 22:15:33 GMT Message-Id: <202505062215.546MFXkq063035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 2b04ba6e08b9 - main - rtld-elf: Fix UB for direct exec with no extra rtld arguments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b04ba6e08b983d8756552286846059507bca7a3 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=2b04ba6e08b983d8756552286846059507bca7a3 commit 2b04ba6e08b983d8756552286846059507bca7a3 Author: Jessica Clarke AuthorDate: 2025-05-06 22:14:51 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 22:14:51 +0000 rtld-elf: Fix UB for direct exec with no extra rtld arguments If no extra rtld arguments are provided, rtld_argc will be 1 (for argv[0] and so we are shifting the entire memory range down by a single pointer. However, unlike argv and envp, auxp's entries are two pointers in size, not one, and so in this case the source and destination overlap, meaning simple assignment is UB (C99 6.5.16.1p3). On many architectures this ends up being harmless as the compiler will emit double machine word loads and stores, or if it splits them it may still schedule them such that it works in this case, but our RISC-V baseline does not include such instructions and LLVM ends up picking a schedule that copies the second word before the first word, thereby replacing the first word with a copy of the second word. This results in direct exec mode segfaulting on RISC-V when given no arguments. Fix this by using a temporary in the source and let the compiler safely elide its use. Reviewed by: kib Fixes: 0fc65b0ab82c ("Make ld-elf.so.1 directly executable.") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50185 --- libexec/rtld-elf/rtld.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index e4e14edbb5c8..d7ac1e36d70f 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -496,7 +496,7 @@ rtld_trunc_page(uintptr_t x) func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { - Elf_Auxinfo *aux, *auxp, *auxpf, *aux_info[AT_COUNT]; + Elf_Auxinfo *aux, *auxp, *auxpf, *aux_info[AT_COUNT], auxtmp; Objlist_Entry *entry; Obj_Entry *last_interposer, *obj, *preload_tail; const Elf_Phdr *phdr; @@ -673,7 +673,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) * present */ for (;; auxp++, auxpf++) { - *auxp = *auxpf; + /* + * NB: Use a temporary since *auxpf and + * *auxp overlap if rtld_argc is 1 + */ + auxtmp = *auxpf; + *auxp = auxtmp; if (auxp->a_type == AT_NULL) break; } From nobody Tue May 6 22:15: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 4ZsXlW4grPz5vXP6; Tue, 06 May 2025 22:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXlW0Wt9z3d4M; Tue, 06 May 2025 22:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IAwC2p8+p7RfePJd9JhWo1dQrSqI/BLEDUbcFAA2CrU=; b=A4jW0XZKOdniu0cDOtgrbBH/0w9Rcs21Ac3rz9F9Zy2IPXmIcskhJjv8H9Es1zoHW19KPs m4+hQ1x8gGM8rmQW3sKTyW6SK6z1Q++1pJFDddu4jRVAyng+2Ai93aIagVyTzYTygrBC8n K4b5aGoVj2lSaV/K4FqB23VrpyRdckIcJkT5p2fFDRBaezcUtCJ59RqrGQ5rxdfBD+1Pps 2Bg0JJGty7tfEc6PQ9CPz5FyvPq0TAitgsGscEtRsEB5yzVij6LHDpQCg3phEX1wrpw//1 fiN8y/klaiXsJciihqN/WrskZnlLga+dbuMafOeDTbwBtX44EifZafD7ZBBZKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IAwC2p8+p7RfePJd9JhWo1dQrSqI/BLEDUbcFAA2CrU=; b=lsxjp6zF7OEFlLv66Pl728hkoIR7wRUFHyIfoBavt+7K0Q5WeRlVy+iPL0gCH/ORjoAZ1o TXfB8XGSrYPaGN3rFRdWCOzNBR992zFGr8rSuLAxavnOFNeyPYbb3aEKHHo7rRKvL0fupS 1wfW3rw3fNB/EOGKungdHp9W3o/GbAbbSYu8bkVBcyC8xNcRnJuJRt86/P91ULtRdHP2UP BlH3lYHGaGNVzQLKNhJS/hwSmpYPX/Cozt5dWu6mxAaNSl74wLtg8yDx1oqqlMIf+3YUQc bfRHQG3jw2MW6BBF9eBw1oiF77Jvv5cbnga0bBpkYK0ACogtf7T6+NnMSy+Q/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746569735; a=rsa-sha256; cv=none; b=jFSsbbJyf1+EJUqXas67VUN/jguVWiNbcxvvc0adpTOiaPU/cQgvdGfVY4y5YMLXlzYbLv YvPBQlDR8mPCKCddIk04htSP5D05kQ+I78nc8DOeCuGrPoHwa/b0LR77hqmq/ePwaC1FCe Q+tI7tOS9uMjFsQOgFeWRCZLBqgXMCK8hcw1wJdhsIqFcQk2zxbaHfP54eSnqDjD9sxU/C Gjq1hBxa8s2v6OzyvpsfR3rYuzq+gpRHJkKw4dYOWjgtczi5aq/NO8AxcjazeTdpaTXwt0 HvZwtM2+fD+NojqYArSJ9P/tRVHv7Cmr9r00ubtJMOsHZtE9kptTxm0ZHJu0Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXlW07Dyz1HMn; Tue, 06 May 2025 22:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MFYUa063080; Tue, 6 May 2025 22:15:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MFYfa063077; Tue, 6 May 2025 22:15:34 GMT (envelope-from git) Date: Tue, 6 May 2025 22:15:34 GMT Message-Id: <202505062215.546MFYfa063077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: a08d92def20a - main - rtld-elf: Fix executable's TLS module index for direct exec List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a08d92def20a41243d4afc97cf4a2124be5386b9 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=a08d92def20a41243d4afc97cf4a2124be5386b9 commit a08d92def20a41243d4afc97cf4a2124be5386b9 Author: Jessica Clarke AuthorDate: 2025-05-06 22:14:51 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 22:14:51 +0000 rtld-elf: Fix executable's TLS module index for direct exec For direct exec mode we reuse map_object, but tls_max_index is initialised to 1. As a result, the executable ends up being assigned module 2 (and the generation is pointlessly incremented, unlike in digest_phdr for the normal case). For most architectures this is harmless, since TLS linker relaxation will optimise General Dynamic accesses to Initial Exec or Local Exec for executables, but on RISC-V this relaxation does not exist, yet the linker will initialise the tls_index in the GOT with module 1, and at run time the call to __tls_get_addr will fail with: ld-elf.so.1: Can't find module with TLS index 1 Fix this by making map_object use 1 for obj->tlsindex when it's loading the main executable, and don't bother to increment tls_dtv_generation either, matching digest_phdr (though that one is harmless). (Note this also applies to MIPS on stable/13) Reviewed by: kib Fixes: 0fc65b0ab82c ("Make ld-elf.so.1 directly executable.") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50186 --- libexec/rtld-elf/map_object.c | 10 +++++++--- libexec/rtld-elf/rtld.c | 4 ++-- libexec/rtld-elf/rtld.h | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 148b6dc4ca6e..04d17072af77 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -60,7 +60,7 @@ phdr_in_zero_page(const Elf_Ehdr *hdr) * for the shared object. Returns NULL on failure. */ Obj_Entry * -map_object(int fd, const char *path, const struct stat *sb) +map_object(int fd, const char *path, const struct stat *sb, bool ismain) { Obj_Entry *obj; Elf_Ehdr *hdr; @@ -327,8 +327,12 @@ map_object(int fd, const char *path, const struct stat *sb) obj->interp = (const char *)(obj->relocbase + phinterp->p_vaddr); if (phtls != NULL) { - tls_dtv_generation++; - obj->tlsindex = ++tls_max_index; + if (ismain) + obj->tlsindex = 1; + else { + tls_dtv_generation++; + obj->tlsindex = ++tls_max_index; + } obj->tlssize = phtls->p_memsz; obj->tlsalign = phtls->p_align; obj->tlspoffset = phtls->p_offset; diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index d7ac1e36d70f..eb04a2f17603 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -784,7 +784,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) */ if (fd != -1) { /* Load the main program. */ dbg("loading main program"); - obj_main = map_object(fd, argv0, NULL); + obj_main = map_object(fd, argv0, NULL, true); close(fd); if (obj_main == NULL) rtld_die(); @@ -2920,7 +2920,7 @@ do_load_object(int fd, const char *name, char *path, struct stat *sbp, } dbg("loading \"%s\"", printable_path(path)); - obj = map_object(fd, printable_path(path), sbp); + obj = map_object(fd, printable_path(path), sbp, false); if (obj == NULL) return (NULL); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index d1ea00b96627..a15c1d6d159f 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -380,7 +380,7 @@ enum { void _rtld_error(const char *, ...) __printflike(1, 2) __exported; void rtld_die(void) __dead2; const char *rtld_strerror(int); -Obj_Entry *map_object(int, const char *, const struct stat *); +Obj_Entry *map_object(int, const char *, const struct stat *, bool); void *xcalloc(size_t, size_t); void *xmalloc(size_t); char *xstrdup(const char *); From nobody Tue May 6 22:15: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 4ZsXlX450Bz5vXcL; Tue, 06 May 2025 22:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXlX1WjLz3d2K; Tue, 06 May 2025 22:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XdNOc0YxEvphDYZgRKIHbD2YJchY4mfROomZKPp+jV0=; b=B8hmfl3XvBddd3lPwVoJ2a4vC6vEqVSb05hOJbvfGubPAuJgasesz5H85HZZ9eDDOjxreL bHYcL5YRkfqY4aris8cFlyGiKqlniwddWujc94Jc+6ABclclVvHz38C9xGt+BFsRDwFXwx OCx3pRJ5MOtItu1By04ipaiCSR4XsSd7IxZchT9MP6XZWustb463WzOASzc9PoVzQXIAD5 iLzh8tpXpVjD8wvlkbwErC7H1zXJ6f6cIsjS/5iAJz1UNIZMU3Yr/g2rHvRYwttFEm32pS D+h5B+CVW7mN2PvPbYY+ifkMG3rulTLYfFbeTkeCblnNbB1vY0W6Gt/iHtSY0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746569736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XdNOc0YxEvphDYZgRKIHbD2YJchY4mfROomZKPp+jV0=; b=s5hetqEv0M3K5keY+Of+VEencgKHhF78HOLop90ID7sBa14uSE0uib7EiOe34ZnHoPcXM5 +/UITN7quzvEm8H2c/OlZeAMJctuINNXCJKjoGZh8QjI22CyA2KUqLkTuSTTACtYfSSACF nIvobVZ0icJQzNXfXwI4nc4eigkX/NuEgktwxJeJDsjmpcp82A2BLEZJr0QHFTkaBI0V1Y vEJTjgkaEr1cssYfI2e/xCvkOiom96HJ+UbT414LV+bl6E6Y0ToGAqJ7jhw8SYBQ84e9BC 7Ts5QU3NhABtGiS0hWu8uHEvPF/Ctj2HTM7aEYykPxevSHIHfR5LGM6IBJWtOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746569736; a=rsa-sha256; cv=none; b=s+cyQ2iPjwn0QnH9za/DTgh7+xihwhO1t0ZjwjNYqO3DTGExwWuwojgsB5B7LpAXG8TrWh LMleNBet+DtmEO7QKd2elKnWf0NeDDUDwd/FlxFmb2tXjE9vWEbR2JWwk4v4dqxcd6hHNa /GugeaLl498lEboAarbix4YsGxQqWyhhUAXTsYwBmdh6PKusiPwXRIi1zNIXtG6CJgFUOp ROz2B+FRbs3ObJrWHJM55y0hBwdjPhxMNtjb4ztJE8fTtMSlHDFT9IVv2fdxnuXSoZT9Zv 3wep8YRKHZK9/V5nMcT4zUzC2SFrZic8jyvelWrnJLKQfs7kK+Otqn7yC6HKAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXlX11jcz1H8m; Tue, 06 May 2025 22:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MFalr063124; Tue, 6 May 2025 22:15:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MFaNW063121; Tue, 6 May 2025 22:15:36 GMT (envelope-from git) Date: Tue, 6 May 2025 22:15:36 GMT Message-Id: <202505062215.546MFaNW063121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: d71c97026366 - main - rtld-elf: Push TLS_DTV_OFFSET into tls_get_addr_common's arguments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d71c97026366eff5d8a701077fd9e1499a28c7b1 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d71c97026366eff5d8a701077fd9e1499a28c7b1 commit d71c97026366eff5d8a701077fd9e1499a28c7b1 Author: Jessica Clarke AuthorDate: 2025-05-06 22:14:52 +0000 Commit: Jessica Clarke CommitDate: 2025-05-06 22:14:52 +0000 rtld-elf: Push TLS_DTV_OFFSET into tls_get_addr_common's arguments Rather than calling tls_get_addr_common with a biased ti_offset and un-biasing the return value, we can instead un-bias the offset given in the first place and not need to adjust the return value. This is in fact how the MIPS implementation worked, and makes this call tail-recursive. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50187 --- libexec/rtld-elf/powerpc/reloc.c | 6 ++---- libexec/rtld-elf/powerpc64/reloc.c | 6 ++---- libexec/rtld-elf/riscv/reloc.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 82a9669e3e73..4d5b1be6a429 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -838,10 +838,8 @@ void* __tls_get_addr(tls_index* ti) { uintptr_t **dtvp; - char *p; dtvp = &_tcb_get()->tcb_dtv; - p = tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset); - - return (p + TLS_DTV_OFFSET); + return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset + + TLS_DTV_OFFSET)); } diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 70acd0ac390d..b0b5ca6419f7 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -735,10 +735,8 @@ void* __tls_get_addr(tls_index* ti) { uintptr_t **dtvp; - char *p; dtvp = &_tcb_get()->tcb_dtv; - p = tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset); - - return (p + TLS_DTV_OFFSET); + return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset + + TLS_DTV_OFFSET)); } diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c index aa2cc97ae769..80a0acd3510f 100644 --- a/libexec/rtld-elf/riscv/reloc.c +++ b/libexec/rtld-elf/riscv/reloc.c @@ -496,10 +496,8 @@ void * __tls_get_addr(tls_index* ti) { uintptr_t **dtvp; - void *p; dtvp = &_tcb_get()->tcb_dtv; - p = tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset); - - return ((char*)p + TLS_DTV_OFFSET); + return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset + + TLS_DTV_OFFSET)); } From nobody Tue May 6 22:21: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 4ZsXt742GXz5vXds; Tue, 06 May 2025 22:21: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsXt71fcpz3lg5; Tue, 06 May 2025 22:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746570079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/2QsUFXbB2yPPRVA1/BBerUefDNj1t/9R0xMRgAk4Vo=; b=IDqByfiNGwkiZoXzf9lGcRKJi0a82G8y3C65c0PyXC8Bb1uZjRvmQQY+qe1N/cFpZboxLt GdwDHbLSSgnk7xQ4lTbZdwM/aUXLWbxJhFXINTrQnEI2LMiRnJIWdBL14mlJmx36GZAALT D5ITKtCnuzgmwIYexMsPHmu6VC++98F0xCSQ537V/IaCnJRkiPBbrc43h10AnraE5Jbb2x /XMlo6cMayASoBCYwVxcogKN/ZcWo9xrbE7HgIQdzwbE7KOc3A4WehunXwmzfkxCBO1WFt vkSWwycC5zGg6H0tsWJu34fQcwfHnJVEEsA/plfwQAN8lbW2oOwzgFpkKtGVww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746570079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/2QsUFXbB2yPPRVA1/BBerUefDNj1t/9R0xMRgAk4Vo=; b=beXrhiDgU5lQ2DgE3oBOxzTL5iz6rPPnQWQ6xk+N0KOA5KEytivtjVw+DZVW5msgPcvTB4 w64BDOuHFyd0ZVexDHSYwgj6GPiuXMj0R/dIqgFxthGA2g08p/VLOw9wW7V9I8ONjGb3mo m6tzRnGk07Ut2X7PKRl7/inAW0D/7wJ/5waNSDkbq42Tye5jrbCm1bUqJsnjzbnm/RKA+g 9Atu4OJTIopjP1u9IIzlOarBCxCC+Fvq/TTR1ax0xxHT6Nbw8I2htN2mMRYJmiRY2Nrpna G5XKMN2xzLJzvTxmmdXcVoojAzdweoQEYobFFPyDN/iAeImDzb3fvEBkeyH3+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746570079; a=rsa-sha256; cv=none; b=l7i/VkZsyNbn9GOnAbixVCAzfcEK4xfxKr4xywb7Fp1nPzi/m4aKH1FORTITuoItjh9lmZ V9L0rAU6Vb+JWyoq/qGPkwwlZyd1nz4Ct1X6rFxyQz8naqtseR31IBvIoD6bx0oPpOEIbY /0zL0W06p5v8kD3YWEetoU87asN71Ff1ogr/qnaLwMcMUqylZPFVx+bF6eNtT/SEphz23n aUbsM9+9qQFnDtBmVU+XHZ6W+mFxpARAt6HLbzR6oE+QIMF/MxER3SBhOXe46m9ZKi5r8x FM1DswRM7PViKYsRoHYocgIjk1Ba1NAHjxjZpF7irV1YYWwCbjI4PDt7iZtCPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsXt71CC5z1HTk; Tue, 06 May 2025 22:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 546MLJV1076650; Tue, 6 May 2025 22:21:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 546MLJvv076647; Tue, 6 May 2025 22:21:19 GMT (envelope-from git) Date: Tue, 6 May 2025 22:21:19 GMT Message-Id: <202505062221.546MLJvv076647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c15cdaf50584 - main - sys/queue.h: use reserved identifiers with the file scope for locals List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: c15cdaf505849509900b018a44d91eee3647fb13 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c15cdaf505849509900b018a44d91eee3647fb13 commit c15cdaf505849509900b018a44d91eee3647fb13 Author: Konstantin Belousov AuthorDate: 2025-05-06 18:09:06 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-06 22:17:23 +0000 sys/queue.h: use reserved identifiers with the file scope for locals This should prevent conflicts with the C-standard compliant code, although sys/queue.h is not a standard header. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50216 --- sys/sys/queue.h | 94 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index b2ba3d63bb0c..aa6453889e6b 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -273,14 +273,14 @@ struct { \ "slist %p is empty", (head)) #define SLIST_CONCAT(head1, head2, type, field) do { \ - QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head1); \ - if (curelm == NULL) { \ + QUEUE_TYPEOF(type) *_Curelm = SLIST_FIRST(head1); \ + if (_Curelm == NULL) { \ if ((SLIST_FIRST(head1) = SLIST_FIRST(head2)) != NULL) \ SLIST_INIT(head2); \ } else if (SLIST_FIRST(head2) != NULL) { \ - while (SLIST_NEXT(curelm, field) != NULL) \ - curelm = SLIST_NEXT(curelm, field); \ - SLIST_NEXT(curelm, field) = SLIST_FIRST(head2); \ + while (SLIST_NEXT(_Curelm, field) != NULL) \ + _Curelm = SLIST_NEXT(_Curelm, field); \ + SLIST_NEXT(_Curelm, field) = SLIST_FIRST(head2); \ SLIST_INIT(head2); \ } \ } while (0) @@ -338,24 +338,24 @@ struct { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ - QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head); \ - while (SLIST_NEXT(curelm, field) != (elm)) \ - curelm = SLIST_NEXT(curelm, field); \ - SLIST_REMOVE_AFTER(curelm, field); \ + QUEUE_TYPEOF(type) *_Curelm = SLIST_FIRST(head); \ + while (SLIST_NEXT(_Curelm, field) != (elm)) \ + _Curelm = SLIST_NEXT(_Curelm, field); \ + SLIST_REMOVE_AFTER(_Curelm, field); \ } \ } while (0) #define SLIST_REMOVE_AFTER(elm, field) do { \ - QMD_SAVELINK(oldnext, SLIST_NEXT(elm, field)->field.sle_next); \ + QMD_SAVELINK(_Oldnext, SLIST_NEXT(elm, field)->field.sle_next); \ SLIST_NEXT(elm, field) = \ SLIST_NEXT(SLIST_NEXT(elm, field), field); \ - TRASHIT(*oldnext); \ + TRASHIT(*_Oldnext); \ } while (0) #define SLIST_REMOVE_HEAD(head, field) do { \ - QMD_SAVELINK(oldnext, SLIST_FIRST(head)->field.sle_next); \ + QMD_SAVELINK(_Oldnext, SLIST_FIRST(head)->field.sle_next); \ SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ - TRASHIT(*oldnext); \ + TRASHIT(*_Oldnext); \ } while (0) #define SLIST_REMOVE_PREVPTR(prevp, elm, field) do { \ @@ -371,9 +371,9 @@ struct { \ } while (0) #define SLIST_SWAP(head1, head2, type) do { \ - QUEUE_TYPEOF(type) *swap_first = SLIST_FIRST(head1); \ + QUEUE_TYPEOF(type) *_Swap_first = SLIST_FIRST(head1); \ SLIST_FIRST(head1) = SLIST_FIRST(head2); \ - SLIST_FIRST(head2) = swap_first; \ + SLIST_FIRST(head2) = _Swap_first; \ } while (0) #define SLIST_END(head) NULL @@ -512,17 +512,17 @@ struct { \ #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) #define STAILQ_REMOVE(head, elm, type, field) do { \ - QMD_SAVELINK(oldnext, (elm)->field.stqe_next); \ + QMD_SAVELINK(_Oldnext, (elm)->field.stqe_next); \ if (STAILQ_FIRST((head)) == (elm)) { \ STAILQ_REMOVE_HEAD((head), field); \ } \ else { \ - QUEUE_TYPEOF(type) *curelm = STAILQ_FIRST(head); \ - while (STAILQ_NEXT(curelm, field) != (elm)) \ - curelm = STAILQ_NEXT(curelm, field); \ - STAILQ_REMOVE_AFTER(head, curelm, field); \ + QUEUE_TYPEOF(type) *_Curelm = STAILQ_FIRST(head); \ + while (STAILQ_NEXT(_Curelm, field) != (elm)) \ + _Curelm = STAILQ_NEXT(_Curelm, field); \ + STAILQ_REMOVE_AFTER(head, _Curelm, field); \ } \ - TRASHIT(*oldnext); \ + TRASHIT(*_Oldnext); \ } while (0) #define STAILQ_REMOVE_AFTER(head, elm, field) do { \ @@ -552,12 +552,12 @@ struct { \ } while (0) #define STAILQ_SWAP(head1, head2, type) do { \ - QUEUE_TYPEOF(type) *swap_first = STAILQ_FIRST(head1); \ - QUEUE_TYPEOF(type) **swap_last = (head1)->stqh_last; \ + QUEUE_TYPEOF(type) *_Swap_first = STAILQ_FIRST(head1); \ + QUEUE_TYPEOF(type) **_Swap_last = (head1)->stqh_last; \ STAILQ_FIRST(head1) = STAILQ_FIRST(head2); \ (head1)->stqh_last = (head2)->stqh_last; \ - STAILQ_FIRST(head2) = swap_first; \ - (head2)->stqh_last = swap_last; \ + STAILQ_FIRST(head2) = _Swap_first; \ + (head2)->stqh_last = _Swap_last; \ if (STAILQ_FIRST(head1) == NULL) \ (head1)->stqh_last = &STAILQ_FIRST(head1); \ if (STAILQ_FIRST(head2) == NULL) \ @@ -658,18 +658,18 @@ struct { \ "list %p is empty", (head)) #define LIST_CONCAT(head1, head2, type, field) do { \ - QUEUE_TYPEOF(type) *curelm = LIST_FIRST(head1); \ - if (curelm == NULL) { \ + QUEUE_TYPEOF(type) *_Curelm = LIST_FIRST(head1); \ + if (_Curelm == NULL) { \ if ((LIST_FIRST(head1) = LIST_FIRST(head2)) != NULL) { \ LIST_FIRST(head2)->field.le_prev = \ &LIST_FIRST((head1)); \ LIST_INIT(head2); \ } \ } else if (LIST_FIRST(head2) != NULL) { \ - while (LIST_NEXT(curelm, field) != NULL) \ - curelm = LIST_NEXT(curelm, field); \ - LIST_NEXT(curelm, field) = LIST_FIRST(head2); \ - LIST_FIRST(head2)->field.le_prev = &LIST_NEXT(curelm, field);\ + while (LIST_NEXT(_Curelm, field) != NULL) \ + _Curelm = LIST_NEXT(_Curelm, field); \ + LIST_NEXT(_Curelm, field) = LIST_FIRST(head2); \ + LIST_FIRST(head2)->field.le_prev = &LIST_NEXT(_Curelm, field);\ LIST_INIT(head2); \ } \ } while (0) @@ -741,21 +741,21 @@ struct { \ LIST_REMOVE(LIST_FIRST(head), field) #define LIST_REMOVE(elm, field) do { \ - QMD_SAVELINK(oldnext, (elm)->field.le_next); \ - QMD_SAVELINK(oldprev, (elm)->field.le_prev); \ + QMD_SAVELINK(_Oldnext, (elm)->field.le_next); \ + QMD_SAVELINK(_Oldprev, (elm)->field.le_prev); \ QMD_LIST_CHECK_NEXT(elm, field); \ QMD_LIST_CHECK_PREV(elm, field); \ if (LIST_NEXT((elm), field) != NULL) \ LIST_NEXT((elm), field)->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = LIST_NEXT((elm), field); \ - TRASHIT(*oldnext); \ - TRASHIT(*oldprev); \ + TRASHIT(*_Oldnext); \ + TRASHIT(*_Oldprev); \ } while (0) #define LIST_REPLACE(elm, elm2, field) do { \ - QMD_SAVELINK(oldnext, (elm)->field.le_next); \ - QMD_SAVELINK(oldprev, (elm)->field.le_prev); \ + QMD_SAVELINK(_Oldnext, (elm)->field.le_next); \ + QMD_SAVELINK(_Oldprev, (elm)->field.le_prev); \ QMD_LIST_CHECK_NEXT(elm, field); \ QMD_LIST_CHECK_PREV(elm, field); \ LIST_NEXT((elm2), field) = LIST_NEXT((elm), field); \ @@ -764,8 +764,8 @@ struct { \ &(elm2)->field.le_next; \ (elm2)->field.le_prev = (elm)->field.le_prev; \ *(elm2)->field.le_prev = (elm2); \ - TRASHIT(*oldnext); \ - TRASHIT(*oldprev); \ + TRASHIT(*_Oldnext); \ + TRASHIT(*_Oldprev); \ } while (0) #define LIST_SPLIT_AFTER(head, elm, rest, field) do { \ @@ -1022,8 +1022,8 @@ struct { \ TAILQ_REMOVE(head, TAILQ_FIRST(head), field) #define TAILQ_REMOVE(head, elm, field) do { \ - QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ - QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \ + QMD_SAVELINK(_Oldnext, (elm)->field.tqe_next); \ + QMD_SAVELINK(_Oldprev, (elm)->field.tqe_prev); \ QMD_TAILQ_CHECK_NEXT(elm, field); \ QMD_TAILQ_CHECK_PREV(elm, field); \ if ((TAILQ_NEXT((elm), field)) != NULL) \ @@ -1034,14 +1034,14 @@ struct { \ QMD_TRACE_HEAD(head); \ } \ *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ - TRASHIT(*oldnext); \ - TRASHIT(*oldprev); \ + TRASHIT(*_Oldnext); \ + TRASHIT(*_Oldprev); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) #define TAILQ_REPLACE(head, elm, elm2, field) do { \ - QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ - QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \ + QMD_SAVELINK(_Oldnext, (elm)->field.tqe_next); \ + QMD_SAVELINK(_Oldprev, (elm)->field.tqe_prev); \ QMD_TAILQ_CHECK_NEXT(elm, field); \ QMD_TAILQ_CHECK_PREV(elm, field); \ TAILQ_NEXT((elm2), field) = TAILQ_NEXT((elm), field); \ @@ -1052,8 +1052,8 @@ struct { \ (head)->tqh_last = &(elm2)->field.tqe_next; \ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ *(elm2)->field.tqe_prev = (elm2); \ - TRASHIT(*oldnext); \ - TRASHIT(*oldprev); \ + TRASHIT(*_Oldnext); \ + TRASHIT(*_Oldprev); \ QMD_TRACE_ELEM(&(elm)->field); \ } while (0) From nobody Tue May 6 23:31: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 4ZsZQv4k83z5vd5p; Tue, 06 May 2025 23:31:19 +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 4ZsZQv2gW3z3lvS; Tue, 06 May 2025 23:31:19 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id CKZwuefrN5MqyCRksunPlk; Tue, 06 May 2025 23:31:18 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id CRkrurr7gl5eGCRksuSWTF; Tue, 06 May 2025 23:31:18 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=EO6l0EZC c=1 sm=1 tr=0 ts=681a9bc6 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=jmd6AzR5BgWnvRu4sOUA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id D10461C1; Tue, 06 May 2025 16:31:16 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id BBAEF382; Tue, 06 May 2025 16:31:16 -0700 (PDT) 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: Gleb Smirnoff cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d15792780760 - main - unix: new implementation of unix/stream & unix/seqpacket In-reply-to: References: <202505051956.545JuOPR085707@gitrepo.freebsd.org> <20250506150654.DEAF8300@slippy.cwsent.com> <20250506154446.917B818D@slippy.cwsent.com> <20250506172901.E5DA4305@slippy.cwsent.com> Comments: In-reply-to Gleb Smirnoff message dated "Tue, 06 May 2025 14:20:32 -0700." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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, 06 May 2025 16:31:16 -0700 Message-Id: <20250506233116.BBAEF382@slippy.cwsent.com> X-CMAE-Envelope: MS4xfFhB3OxhwsecbSOvwE9vts43F95iijZ3g0CSxkuD2xf27bkjDmbwhNt4445Dl1BuTPkv/qzRe5Anti2TT02eijCugJhGht5K4bRDBsCuY9JWMNrZmLgs ts5uryStT27nIhz3qLLb/YKrZjwpAxuSeehncHRgDlOWExvdY6a4LE1WVwdynzZ+1yfmpYNxhKdKPxjiXB8LX9BEiGbE9iVoKG0fJMKPravZBAkbsgXSE9Di i5/I2OXa+QBuoNWhK56k70fMOjdqzT0foEz50Ap9o7f047Uq3VyxCvJy9cK+qC7emifLzGAXXeFMsb1XQwEvvBrrqamG7M9znefe1p8AMNc= X-Rspamd-Queue-Id: 4ZsZQv2gW3z3lvS X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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-Spamd-Bar: ---- In message , Gleb Smirnoff writes: > > > --llvy8OFwqUtJAMbb > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > On Tue, May 06, 2025 at 10:29:01AM -0700, Cy Schubert wrote: > C> In the case of /usr/obj I did, > C> > C> rsync -aHv --delete --progress /usr/obj/. other_server:/usr/obj/. > > I think I was able to reproduce, but not sure. > > Can you please try the attached patch at your setup? Thanks Gleb. The patch resolves the problem. Thank you for fixing it. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Wed May 7 04:22: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 4Zshv31ddbz5vjBt; Wed, 07 May 2025 04:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zshv26ljlz478r; Wed, 07 May 2025 04:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746591758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvITtwRZcWStIahyLTFaqAMZ4nUU1c7KI4RQtN7+vEQ=; b=w4jK9qSAPKz2Yxpn3IOe4wxGzjCTgexPrZ5tTLf18oh9j15LWEkvBCbLos4sv7Ciwm9VvW BdnbUP8GpBzf0W+eeCAwCWq7OP1rde4edHlHahKmWxQK7G6vDco3cRG7pidKbA629u39O8 5pJWvxfSXCOfasmxTBPnQZxkLHYtC8hKHi+ELYa2bwY07eqCGfvjxEOtjw95iyaotYLy8F wFWyI9d+wKC3jCXwQ8HnaYMqKFo1vuFENsmoUv51cL2nTP8HZLdPX07+4bjalura6gLG/S zDaj1aVrkQ/elY5AP3/9d83xBP6W4Q/k40rlxm3WajJkaLnfryCp33aLatG8hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746591758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvITtwRZcWStIahyLTFaqAMZ4nUU1c7KI4RQtN7+vEQ=; b=vrtHBhR7CBhBxtXeIxYIlQiv06ndON8c9jH9PbKZ4Pz/R1luNacLoD+p7Vs8DoB5XExe1X 7wNDycs+CXgZz4n+PXeyQZoIR0U6vNFYmsHt0kBpuPuLSLVAdaDy8oI+3l8raoNeoXemx9 6jYBfFN2Z6Hd/sZjoOaS2c9h7Q0xa5wLmUAMFyAtnwQt1q+vJBnNQTGGxMWrYjtRylKnhu Ak5KR6kJOjfI5UXJQauiwnt4LjCeiJvM7YfVMNc0AStQpUXA3T+3bnkGyHZL9JVX79Fec/ nZKHhYJ/gE9iFD4D71kR09r8g3hCXdgGfPstt4ic8ejtfQ+B/lZUCSBXL7h6AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746591758; a=rsa-sha256; cv=none; b=HMZcnxEH2J/J1zUTrvAyU78zQmb2f37t2AWKJoB/hY0PTT6q0hzimmbTn6wWcQcIAi9I52 uwa/aZDEitnVqg/XIKulD9IIE8VME7/x6a3ZbVHnSmWVQboVahbpa9mI9JAWBmCHunEu2E 7APIG6iAPr6YDPjA7wcxbh3TEfCKdAuLteyIO+56j4G5EgAmEohwGgPeHA7vhHdhosgAJo xx/qJPqDDt1BP2V5okddI7V1xDqR3YvK6aJgTqJRKh3b+wFExgm2ULq0ugYNF5nFZ1nULm js8WGAGrD/GqgHIlpQmnUfx8nWf0Cxeb8TGKYaXXN8GfBVUifiyfBg8RgGdSfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zshv265KVz2p; Wed, 07 May 2025 04:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5474McFh054863; Wed, 7 May 2025 04:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5474McFk054858; Wed, 7 May 2025 04:22:38 GMT (envelope-from git) Date: Wed, 7 May 2025 04:22:38 GMT Message-Id: <202505070422.5474McFk054858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 20d808f42860 - main - net80211: document the vap / device transmit paths, fragment node 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=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: 20d808f428601c5122f8b394068dda04e5174bac Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=20d808f428601c5122f8b394068dda04e5174bac commit 20d808f428601c5122f8b394068dda04e5174bac Author: Adrian Chadd AuthorDate: 2025-01-27 05:45:37 +0000 Commit: Adrian Chadd CommitDate: 2025-05-07 04:21:17 +0000 net80211: document the vap / device transmit paths, fragment node references * Document what the VAP and device transmit paths do. Take care to note down the 802.11 fragment handling and node references. * Almost none of the drivers (save ath(4), which I fixed a long time ago) implement 802.11 fragments after the big VAP rework done years and years ago. A few others announce support (mwl, ral, uath, wpi) but I haven't validated them. I'll be doing that as part of this work. * Add some comments in ieee80211_fragment() around how fragment node references work. Differential Revision: https://reviews.freebsd.org/D49765 --- sys/net80211/ieee80211_freebsd.c | 48 ++++++++++++++++++++++++++++++++++++++-- sys/net80211/ieee80211_output.c | 31 ++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index d3c8352ab411..6979e601ce41 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -706,7 +706,37 @@ ieee80211_get_toa_params(struct mbuf *m, struct ieee80211_toa_params *p) } /* - * Transmit a frame to the parent interface. + * @brief Transmit a frame to the parent interface. + * + * Transmit an 802.11 or 802.3 frame to the parent interface. + * + * This is called as part of 802.11 processing to enqueue a frame + * from net80211 into the device for transmit. + * + * If the interface is marked as 802.3 via IEEE80211_C_8023ENCAP + * (ie, doing offload), then an 802.3 frame will be sent and the + * driver will need to understand what to do. + * + * If the interface is marked as 802.11 (ie, no offload), then + * an encapsulated 802.11 frame will be queued. In the case + * of an 802.11 fragmented frame this will be a list of frames + * representing the fragments making up the 802.11 frame, linked + * via m_nextpkt. + * + * A fragmented frame list will consist of: + * + only the first frame with M_SEQNO_SET() assigned the sequence number; + * + only the first frame with the node reference and node in rcvif; + * + all frames will have the sequence + fragment number populated in + * the 802.11 header. + * + * The driver must ensure it doesn't try releasing a node reference + * for each fragment in the list. + * + * The provided mbuf/list is consumed both upon success and error. + * + * @param ic struct ieee80211com device to enqueue frame to + * @param m struct mbuf chain / packet list to enqueue + * @returns 0 if successful, errno if error. */ int ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m) @@ -726,6 +756,8 @@ ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m) /* XXX number of fragments */ if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + + /* Note: there's only one node reference for a fragment list */ ieee80211_free_node(ni); ieee80211_free_mbuf(m); } @@ -733,7 +765,19 @@ ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m) } /* - * Transmit a frame to the VAP interface. + * @brief Transmit an 802.3 frame to the VAP interface. + * + * This is the entry point for the wifi stack to enqueue 802.3 + * encapsulated frames for transmit to the given vap/ifnet instance. + * This is used in paths where 802.3 frames have been received + * or queued, and need to be pushed through the VAP encapsulation + * and transmit processing pipeline. + * + * The provided mbuf/list is consumed both upon success and error. + * + * @param vap struct ieee80211vap instance to transmit frame to + * @param m mbuf to transmit + * @returns 0 if OK, errno if error */ int ieee80211_vap_xmitpkt(struct ieee80211vap *vap, struct mbuf *m) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index e3cd73cd22d6..da7719b16dba 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1889,6 +1889,10 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni, * * If the hardware does fragmentation offload, then don't bother * doing it here. + * + * Don't send AMPDU/FF/AMSDU through fragmentation. + * + * 802.11-2016 10.2.7 (Fragmentation/defragmentation overview) */ if (IEEE80211_CONF_FRAG_OFFLOAD(ic)) txfrag = 0; @@ -1963,6 +1967,33 @@ ieee80211_free_mbuf(struct mbuf *m) * mbuf for each fragment and chain it through m_nextpkt; * we might be able to optimize this by reusing the original * packet's mbufs but that is significantly more complicated. + * + * A node reference is NOT acquired for each fragment in + * the list - the caller is assumed to have taken a node + * reference for the whole list. The fragment mbufs do not + * have a node pointer. + * + * Fragments will have the sequence number and fragment numbers + * assigned. However, Fragments will NOT have a sequence number + * assigned via M_SEQNO_SET. + * + * This must be called after assigning sequence numbers; it + * modifies the i_seq field in the 802.11 header to include + * the fragment number. + * + * @param vap ieee80211vap interface + * @param m0 pointer to mbuf list to fragment + * @param hdrsize header size to reserver + * @param ciphdrsize crypto cipher header size to reserve + * @param mtu maximum fragment size + * + * This implements the fragmentation part of 802.11-2016 10.2.7 + * (Fragmentation/defragmentation overview.) + * + * @retval 1 if successful, with the mbuf pointed at by m0 + * turned into an mbuf list of fragments (with the original + * mbuf being truncated.) + * @retval 0 if failure, the mbuf needs to be freed by the caller */ static int ieee80211_fragment(struct ieee80211vap *vap, struct mbuf *m0, From nobody Wed May 7 04:22: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 4Zshv46RcDz5vjSy; Wed, 07 May 2025 04:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zshv40L78z4727; Wed, 07 May 2025 04:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746591760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkrC0t/v/ldzeFr/MWZ1mnyMmLV1CMIIgnGL6l8Tams=; b=c4rnJbC8ywxSbigE+IZfkbRSMaMjXh5urgcUztcGVZJ/Y+zArsQyzfktT9+g+LAfmKl297 olT0pmgq3gQ2M7dWGjDoptp2KcPou2PVmTq3ZuuqacuOqPuJuZB8lKD24O0OQegnpAZp5V zPctOkO1y/BmPQYArbf/dyurO8S0kljMvGR/iply44NROuE6EcubT03HTvGa0cGjt+QEvX y/fKv4/X0HzD2ARrlobObCoxGM2lD5AyCX2fARWsxdqXZnRQWSn2Ga/3j6WOGVRLpf8qYi t0cLIWgGgmHxi04n6tdhGAJZWonkodKnzCG7qXI+dgm1yySnGl2tTjLM1XvMSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746591760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkrC0t/v/ldzeFr/MWZ1mnyMmLV1CMIIgnGL6l8Tams=; b=RSmskcBQ/h7UKSn0NKdsf8LfE4Lm+bmxAnMlx/caS+Fm5NJPlkwj7qPlwVY0AwoyC/2KHz gk/90LlSnqR2TxxhOZUZBRTiZ3CBHqIwpICk6XEuVvQBTWREOUSYlEsYJv5kcvK8WWS+rh Dr3SiqnuOO5trdo7dP9zrWPl4/QUMTLJ7FNmhyvkVvWV2IPJhOjGfdJRJKbYdyQDUjz/3c eNRer3/kgLpqB2eQWnDdW+bnCAKNyhqf7hBLS5kjlFWKWt829mOdsga8TVbLZDyH2K3bVn 1a5oZZXNyMP1+h8ZimqPw8KfzIQHkcPP1VhLPyetVj8lPCT9Ao2JNdOOABP0fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746591760; a=rsa-sha256; cv=none; b=Vmb6WvOJZWrz8BW0/wFT6hPhlmfbPIfp5TlP8bJWF7Qvd9FR16Hgb0csM1y9eSQP2GPmmW hkS79uHYhdMjcefHVKxjg5zyco1UDd/N8R3Ih+mmtuOBVAWJsWasVmTQLYESmSJQk7xr/5 dt5zFrXaKcVsBb089JV4znQzBCdg362qkCqigOuoraoAsblqIYqkRyz0Y2zHl4Bn1j154V Eia1yady382O4yGuSt2QhI6GsTJgkKg1iEsvm8GWScJu+64LP5P2Z43bOhrQWXIAzwpnHA 3A1k6ObdGc609iJZQEZtINRZeAJkxMb21e6C5oMhrFJVHnxbcRlnoW5AmX5Ieg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zshv36y8Fz1S6l; Wed, 07 May 2025 04:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5474MdiK054900; Wed, 7 May 2025 04:22:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5474MdGJ054897; Wed, 7 May 2025 04:22:39 GMT (envelope-from git) Date: Wed, 7 May 2025 04:22:39 GMT Message-Id: <202505070422.5474MdGJ054897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 68e73f03655c - main - sys: don't panic on ifm_status being NULL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 68e73f03655c308442a8354ee2c040df23f234b6 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=68e73f03655c308442a8354ee2c040df23f234b6 commit 68e73f03655c308442a8354ee2c040df23f234b6 Author: Adrian Chadd AuthorDate: 2025-05-03 15:41:56 +0000 Commit: Adrian Chadd CommitDate: 2025-05-07 04:22:18 +0000 sys: don't panic on ifm_status being NULL Some ethernet drivers that use miibus aren't probe/attaching the miibus early enough for the ifioctl path to correctly run without panicing. Although yes, the drivers do need fixing, this stops them from immediately panicing the kernel when they're loaded. PR: kern/286530 Differential Revision: https://reviews.freebsd.org/D50136 Reviewed by: jhb --- sys/net/if_media.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/net/if_media.c b/sys/net/if_media.c index 0cc88a0929e9..bdf9f8ad20c4 100644 --- a/sys/net/if_media.c +++ b/sys/net/if_media.c @@ -59,6 +59,7 @@ #include #include +#include /* for if_printf() */ #include /* @@ -290,6 +291,22 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm, } ifmr->ifm_mask = ifm->ifm_mask; ifmr->ifm_status = 0; + + /* + * Don't panic if ifm_status isn't yet setup due to + * driver/miibus probe ordering. This can happen if + * a kldload'ed driver doesn't set the module order + * to setup miibus early enough. + * + * See kern/286530 for more information. + */ + if (ifm->ifm_status == NULL) { + if_printf(ifp, + "%s: ifm_status is NULL; please fix miibus/driver" + " order\n", + __func__); + return (EDOOFUS); + } (*ifm->ifm_status)(ifp, ifmr); /* From nobody Wed May 7 09:15: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 4ZsqP303Nqz5w2G9; Wed, 07 May 2025 09:15: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsqP26F2Rz3Hpj; Wed, 07 May 2025 09:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=buPylr39cY2+KYJ6gvrWxNSX7GO0ZZ6+t0dJsT+Le58=; b=g/xL8qEy/8a9iI6XWzmw7cXnkkXtkQ2hGwiOpCsuDip8+uGXeYAVC0gDeY64OQ0JZFRJZb 61yvFCcAX75qCKVuXaWEWm1Cj38indsI0DiNzFVS+1dappkFXSrGpoN9WIndjvSB/7TOjT hWB8+56dXiBC/v48/psm06bmpl9DnHV5YdR9y3ricBkxgywvkqeah4C74zATlXGv7BfdNV 25myLYO8LT2iRYFxeBaqlHCAlgYfptjYEb1mK3CblbRLtu2Otm6IlRccMXpkW+taSIhtRL wP7BiAP85Zl93fFRsJs2C/TiZkpbiPNQLWFO7Jm1OGgPR0hVzHkIRbfBahCw1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=buPylr39cY2+KYJ6gvrWxNSX7GO0ZZ6+t0dJsT+Le58=; b=mXv6n7DwiBPR2txQwJoJHLzJ89J5ZxDcDMf72QjWRMEYJdCUcIM65V7z4x9RWJ94ILPglK hRBEwlLIfruQnghulQLe8nG36GDM2Umrx14fw9uYWHBsyOXWm4S7KNqaZqHjllAmBpgfVe d4g9j9cSj0umKMJ2vR+DwSICztNVkfjLWfz4cXquoDx8/AxkbVHR6VnmaqRgWyCC2r+hDg LEawR4MT7GdcYgygfLuwRhyoqCxgBdl+iEOeQ1UdpVHV8GXhRlkRqza/THBwiHoF1vv0Y+ RR8NlJ0I0EqdR2tU0Z4lClVYcWSgtsA1P+pDIRge3WY6mnrq0NpJqbThKBM0zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746609334; a=rsa-sha256; cv=none; b=jCfOWIs7RMdHxMK7444YZnGykO6pU56bb2Sevqmx5qT5fA7hmZnbXa65dckFA2unE+to1P FRwDoJh+dWKQTrdp4O99cVwCUn6E6Ho26g7U0hsFuMn3bO0K0JCYnyRCKo2VDmu5/LnpTw hbpJvx68+GjpSLjcGXZ6wIHFIyi09Gsgt8qV/6n8FVdOuLS00t3egx/3fNBRnLxIpImGsD QKnjlNJWMUWB8yWBABmHy/SQtv4jiiiCBieSnsgi3RiOryrJ2pgJZrvi/nXW8xg4ZIWASG bzowRl7vX5O3bWH3YEfZF/Ou8XehAtQOAbGe9igibzM3sYKVCYb5Hit3a5iGEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsqP25X4Zz7Z8; Wed, 07 May 2025 09:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5479FY7r098622; Wed, 7 May 2025 09:15:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5479FYUt098619; Wed, 7 May 2025 09:15:34 GMT (envelope-from git) Date: Wed, 7 May 2025 09:15:34 GMT Message-Id: <202505070915.5479FYUt098619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 428200d2f068 - main - RELNOTES: ps(1): Document change in behavior for '-a'/'-A' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 428200d2f0689aa801f5cab15d3066e2c77825f5 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=428200d2f0689aa801f5cab15d3066e2c77825f5 commit 428200d2f0689aa801f5cab15d3066e2c77825f5 Author: Olivier Certner AuthorDate: 2025-05-06 13:42:33 +0000 Commit: Olivier Certner CommitDate: 2025-05-07 09:14:50 +0000 RELNOTES: ps(1): Document change in behavior for '-a'/'-A' Document the practical consequence of change "ps(1): Make '-a' and '-A' always show all processes" (93a94ce731a8) that specifying '-a'/'-A' leads to printing all processes regardless of the presence of other process selection options (except for '-x'/'-X', which command a filter). While here, mention a possible practical issue with '-J', as reported by dch@. This option was introduced by commit "Add -J to filter by matching jail IDs and names." (13767130c7147ae7182a, r265229), which unfortunately talked about '-J' being a filter while actually implementing it as a regular selection option which adds to the processes to display. Reviewed by: dch MFC after: 1 day Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50193 --- RELNOTES | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/RELNOTES b/RELNOTES index 369ce0d9c504..49a4085214aa 100644 --- a/RELNOTES +++ b/RELNOTES @@ -15,6 +15,24 @@ Changes to this file should not be MFCed. interfaces for viewing and manipulating audio device settings (sysctls, /dev/sndstat), into a single utility with a similar control-driven interface to that of mixer(8). + +93a94ce731a8: + ps(1)'s options '-a' and '-A', when combined with any other one + affecting the selection of processes except for '-X' and '-x', would + have no effect, in contradiction with the rule that one process is + listed as soon as any of the specified options selects it (inclusive + OR), which is both mandated by POSIX and arguably a natural expectation. + This bug has been fixed. + + As a practical consequence, specifying '-a'/'-A' now causes all + processes to be listed regardless of other selection options (except for + '-X' and '-x', which still apply). In particular, to list only + processes from specific jails, one must not use '-a' with '-J'. Option + '-J', contrary to its apparent initial intent, never worked as a filter + in practice (except by accident with '-a' due to the bug), but instead + as any other selection options (e.g., '-U', '-p', '-G', etc.) subject to + the "inclusive OR" rule. + 995b690d1398: ps(1)'s '-U' option has been changed to select processes by their real user IDs instead of their effective one, in accordance with POSIX and From nobody Wed May 7 09:15: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 4ZsqP42Pnpz5w2CW; Wed, 07 May 2025 09:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsqP405GBz3J0G; Wed, 07 May 2025 09:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Z7zt5BHxNFL6yo6JjH3qY98tMs41QPxWRaoM48Q4Q0=; b=Ryu8/xGftgEs14KBANIlhC8cqdkKxryyMjbfqFb1qAmbnHnd3AVFrqkBemDaSTOBETsNkV jTnS4FtjPhm0FnjvSYeigx6phn+0Ja0WHYTbH4M2urCsGGqdkaPqSbKuOMi2wsR02vHrQL nXCnYRS+/IEOVYQD3IvdJUCYBv9Fmtr81Ch/Bult/d9NOxhLLhNZw9M27+RjpDhAwbwzDJ V3WgXDMFU82HtrsiuzLpjwZM/4Vzk9jItVWCm8eR0f9TAb20KmgT8O3XQFLXBPFdoYcLQB /lLFMduhhMMFsCWCh2XPrZrDm3b/g3l5K/3co4tk6Ueyh65tGo1j27i8yGhvuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Z7zt5BHxNFL6yo6JjH3qY98tMs41QPxWRaoM48Q4Q0=; b=W73Zcl32hAvxsqwxFgW4G9J0ZtXgT3bk4kmx5KDojtOGvpMI7Lh1GgPR2uPUhzHyTj7LMf GINfs2+2U156lvi2BTCmXyVHNamh/tBWXjUYy1vxpQBP6ymfdq/V72bH8mRR+XvQnnC7In 6bhTQ9rpkRMtZ79+2MW7bws/IbZifE3v4NCJi544aAi4jFA1nHhkVeo6+Cj/SyaMjYHyo+ zjFjmiDoihR37bi5qSivL6XrH6BHgQeLWLqyT8grjzrbPkN+lyckqwLlk9AK+FJUek/jiP qZNU6MDZGD7heV3X8VHXlmlPjfalsbnl7BQxZDWMlMe8ug7rN1PD9jdKuRuCNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746609336; a=rsa-sha256; cv=none; b=Q12kUciXf3TTOZlhH4zHa/skjnNgk48ABtLOTi6hSoNiU4/4mLK8BYnsMFqsyHFLVOH2FF GZjEbSJ8Hh/ArKPtQ7wBN9ro9SIUKPsdGZmO+Qyzdqcvm4w8Iq3OHlm87AZ/atDEtr6/if l6ct1l1kTboFpKXbmk5XIHMWZduSLMgqaqRkLaeUD51Jshu6+VK81nd10ZM5K8CGLrBFfj IpiaMQquSaPe1U6hQNoLAl907EkWz5iN8jgRpG1Qj2DwqWHXsY/bv//X+5RwctuESXLR25 u8ZEnw2U5SEQZllJFaAwCQXWxuXOPlFqzYMhVugJ0yzAXhZDUaS1MzUWOmHuOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsqP36lpKz7Z9; Wed, 07 May 2025 09:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5479FZV4098659; Wed, 7 May 2025 09:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5479FZFf098656; Wed, 7 May 2025 09:15:35 GMT (envelope-from git) Date: Wed, 7 May 2025 09:15:35 GMT Message-Id: <202505070915.5479FZFf098656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: cbda1aea6532 - main - ps.1: Remove ambiguity in description of option '-J' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: cbda1aea6532697247bcca6e59d45775857c35e2 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cbda1aea6532697247bcca6e59d45775857c35e2 commit cbda1aea6532697247bcca6e59d45775857c35e2 Author: Olivier Certner AuthorDate: 2025-05-06 13:47:18 +0000 Commit: Olivier Certner CommitDate: 2025-05-07 09:14:55 +0000 ps.1: Remove ambiguity in description of option '-J' As stated in the previous commit, option '-J' was introduced by commit "Add -J to filter by matching jail IDs and names." (13767130c7147ae7182a, r265229), which unfortunately talked about '-J' being a filter while actually implementing it as a regular selection option which adds to the processes to display. The manual page's formulation hinted more at '-J' being a filter, which it is not, or could be just considered ambiguous, because of the presence of the "only" word. Consequently, remove it and reformulate. Reviewed by: ziaee, dch MFC after: 1 day Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50194 --- bin/ps/ps.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 24d8f98b1f73..1c964157f53f 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2025 +.Dd May 06, 2025 .Dt PS 1 .Os .Sh NAME @@ -289,7 +289,7 @@ of the jail. Use .Fl J .Sy 0 -to display only host processes. +to request display of host processes. Implies .Fl x by default. From nobody Wed May 7 09:15: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 4ZsqP53DY9z5w29S; Wed, 07 May 2025 09:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsqP515ZZz3HmH; Wed, 07 May 2025 09:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dn8BZZ5GWNry4Mat1+SWY8/b6vfU9yJIzBHxNWHGRRg=; b=EAxzA6giia9Bwg2x8HJuA6oNeC1tBHOWO86ILfaTJRIMfI+OgzKyK3GWhVZl/XEf4Ba8h8 txT8m7JdbmTH6V7GUzTgEGHu43T+f7as0zjYhNrGSmZQ00cXgDUS3OIlQwUWV0DW2d5guF ehUpZ89HNje+n4Wg98EdUTvUlh0JexxtVl603PSbIy7OZGix0RUjME8/Xi1KOW1o/OuCre TD7xgqSriyk/ArNqs6HjLNVnbmWcb/LiQoxFyScM6yaZfx9JzU9R5YcpFmMMLo78YllH5/ +tGzge8iCg7myWyhAAnJPZ3G/uQa+l+Z82sccR5xl+iLWrOBeVQ7TqHTQWBSsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dn8BZZ5GWNry4Mat1+SWY8/b6vfU9yJIzBHxNWHGRRg=; b=Spyp560ejgvIgUSa+YBUJlxQs6vFcdYt5p+RhLpFYCT7ymvbP/ZE7Ew3imWdlO/BcIJTke NhPwHEja0SGB55tfo+mGNxHil3LO1h7FuzAoMJOUZj34am9DPa1GsP1Z1aKL5SQwMkBuHd UQQ8X7o6lNtOCOVDugL+vmH1x3Bj7GigcxpnZRouPw1RAgUUlPbZsfJi6URJdgNybqVOqA 95kJ6d1rwlVexPToA0a59E2E1JmsZLwYcA38IdAJWFbii+6XJzOf0BoFh1UC9pCUv4Q2Ic Xmoh4iweY2W/Gr+jd8fkHaSXghRAUex2juZnZa2WI9G4n3CwZA0ioTp+yydRvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746609337; a=rsa-sha256; cv=none; b=BcpoN4+jtBITVOcqWln0nIFcPGc5JFQWBgT2fGtIpcIO5AB/wByKlF0xDAkuPdBSWKyjdV 9a7QRbIwNN1zPBz6RkVUAbhiJvtzpxrQr8sxlZZaems7XIkhLl9sQh9QnVpWnucaKQh2qA lEfjMm4JHI8N/LWUAK6ehiq608xOPpcPj0xbP+iAWKbCYUucvSbCmvsADPihbHAxZV0xGS RFvsn5u5ArvvKWZu8AfBto++v5Sx8fw+mPBG0aWoCz+jmE9k8KsX6WzL9mbtchOV25boqZ FZR79XbwMsClAuZGGG53bIFh1qumKlCpZR3awCJftL3rL3gtHJeyJZVWRDL+HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsqP50T8Zz7FH; Wed, 07 May 2025 09:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5479FaYq098693; Wed, 7 May 2025 09:15:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5479FaLG098690; Wed, 7 May 2025 09:15:36 GMT (envelope-from git) Date: Wed, 7 May 2025 09:15:36 GMT Message-Id: <202505070915.5479FaLG098690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 646375408742 - main - rc/tests: Fix process flags checks using ps(1) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 646375408742dd5ed9abb174a621a3f8f65a56ef Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=646375408742dd5ed9abb174a621a3f8f65a56ef commit 646375408742dd5ed9abb174a621a3f8f65a56ef Author: Olivier Certner AuthorDate: 2025-05-06 13:52:39 +0000 Commit: Olivier Certner CommitDate: 2025-05-07 09:14:55 +0000 rc/tests: Fix process flags checks using ps(1) These checks use ps(1) with both the '-p' and '-a' flags, which worked so far as ps(1)'s '-a' option was buggy. Since the fix in commit "ps(1): Make '-a' and '-A' always show all processes" (93a94ce731a89b56), such a command-line always selects all processes, making the specified '-p' useless and the test wrong. Remove the useless '-a'. While here, remove the redundant '-x', as '-p' implies '-x' by default. MFC after: 1 day Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50201 --- libexec/rc/tests/rc_subr_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/tests/rc_subr_test.sh b/libexec/rc/tests/rc_subr_test.sh index f004354fe52e..60f77c2c2de3 100644 --- a/libexec/rc/tests/rc_subr_test.sh +++ b/libexec/rc/tests/rc_subr_test.sh @@ -59,9 +59,9 @@ oomprotect_all_body() atf_check -s exit:0 -o inline:"Starting ${__name}.\n" -e empty \ /bin/sh "$__script" "$__name" "$__pidfile" "$__childpidfile" onestart atf_check -s exit:0 -o match:'^..1..... .......1$' -e empty \ - ps -p "$(cat "$__pidfile")" -ax -o flags,flags2 + ps -p "$(cat "$__pidfile")" -o flags,flags2 atf_check -s exit:0 -o match:'^..1..... .......1$' -e empty \ - ps -p "$(cat "$__childpidfile")" -ax -o flags,flags2 + ps -p "$(cat "$__childpidfile")" -o flags,flags2 atf_check -s exit:0 -o ignore -e empty \ /bin/sh "$__script" "$__name" "$__pidfile" "$__childpidfile" onestop } From nobody Wed May 7 09:15: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 4ZsqP654zpz5w2CZ; Wed, 07 May 2025 09:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsqP61VsBz3HsP; Wed, 07 May 2025 09:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UMH0ajdA7m1Do8Hx+aEqRggWNM8fQw48M/RO3InuFeo=; b=SvGsukpZfEP2gy4ZxUqjt7xXwCJ9aVaCD7glMSujGtys9D7fxQHnUUinznZw7VI+JVv6lf UDAskO7W3KsriHCioyPXuIRj9vEkvgF3OpGxLsCsanxiBxCIilWhWI1f+sDMjQdI1aZFGg bXXSUXA3PmPseTWJqP0bGCu+/AuTBg/y3dVPQXyA5TLzIPGAQuFj6inY4O8qc45ojTL3Uk gbo6awH5o5WAOMw+6iAlEkse45IyunQ+mo/1qEwwXNXIvFKaea+7O5061M9/3Sxyh15CDN 6oi9N2VN/v8bm0TsZLGChK98LO1hbA3jdem4+C3fV5F5/lu0+0Rjo9NTZ60htA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746609338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UMH0ajdA7m1Do8Hx+aEqRggWNM8fQw48M/RO3InuFeo=; b=iotbxRXSkdpKGOL1Cyo01/yWstdNTJcgJU/nMMzcBVupBrINRBCYIMRukiYe69j8czcJ8V 9jgHEv81YgyaVxTaovqbwY3PAyNnaBzB2/Rfevqo8XyR3Pe/qToLPNV3rST5muZ3ErYGRG IDSALmOEAB3q9KYupL/tzw0PvsxkDe696V05twFXKUvm2J3ZshG8tIbSFFxZ2jXjfajVk/ F7l7ZM+UEeMEUhl9rKzA1u7tpKOxYjgyTzXhZQT9JabvLebmEaIMMlV2gZ9IWl9FKMbiON jNj/Tt0edaWuaEjNR6lYaDs5f6wTu3xR8Kl7hqGDNmw5tW5TkbWOqc9+7yZ3tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746609338; a=rsa-sha256; cv=none; b=KJo552Z8lKNSvDQQZN9K001CzPktn0yIR1xd9RtMSwkvGK9z2Y8h4ZYboDFURkGv8LVLwd zWRS2c7Rw4fiKGZbGBB2pSIQ01Wxlsz3i+eFOX/yMVtD5YGYO98me5K3m2WiWUqS6i7Jjo 9PwzLeroiLb141EshMkhxzwsenRbJybAb6IHrB7ULKc2MYMaLqWsE2ropivwdLgy2rkWjk WEoITv7vq1xRzCcM+8sdCVhfRhJn645k6f20YWdr2LeVyllTL+L/A7DDIPTGncRTSqO21y OI1I+3XEurQFl+IqDQBFiBhUhStaEtK2rk0iYQZ7LWoNZDPt+Lah2DmvsS/gvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsqP6138wz7kv; Wed, 07 May 2025 09:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5479FcZX098727; Wed, 7 May 2025 09:15:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5479FcZo098724; Wed, 7 May 2025 09:15:38 GMT (envelope-from git) Date: Wed, 7 May 2025 09:15:38 GMT Message-Id: <202505070915.5479FcZo098724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 1265d3b07eaa - main - stress2: exlock2.sh: Preserve behavior after ps(1)'s '-U' change List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1265d3b07eaa418e9c60800db93f3482ddbb6ae2 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=1265d3b07eaa418e9c60800db93f3482ddbb6ae2 commit 1265d3b07eaa418e9c60800db93f3482ddbb6ae2 Author: Olivier Certner AuthorDate: 2025-05-06 14:43:33 +0000 Commit: Olivier Certner CommitDate: 2025-05-07 09:14:55 +0000 stress2: exlock2.sh: Preserve behavior after ps(1)'s '-U' change Remove '-Uroot', as now '-U' selects processes based on their real user IDs, and since the program using them was launched as 'root', the equivalent now is just to remove it, as now ps(1) by default selects processes based on its effective UID (root) and their effective UIDs. It seems that matching on effective or real UID does not really matter in this test, but at least this change simplifies the command-line. MFC after: 1 day Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50200 --- tools/test/stress2/misc/exlock2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/exlock2.sh b/tools/test/stress2/misc/exlock2.sh index e1760cc52a4d..85f606aec2b3 100755 --- a/tools/test/stress2/misc/exlock2.sh +++ b/tools/test/stress2/misc/exlock2.sh @@ -150,7 +150,7 @@ out: usleep(100); } if (debug != 0 && e != 0) - system("ps -Uroot | grep -v grep | grep /tmp/exlock2 | "\ + system("ps | grep -v grep | grep /tmp/exlock2 | "\ "awk '{print $1}' | xargs procstat -f"); share[SYNC] = 0; From nobody Wed May 7 09:52: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 4ZsrCr1ydNz5w3vW; Wed, 07 May 2025 09:52: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsrCr1XY0z3Yks; Wed, 07 May 2025 09:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746611560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePr1bmVR1WeApi6T58fAdDzeOb1SUVL3ElaqupWaQeE=; b=LFgrRv5cfjotXiOds7LOG4/m6hMoGa0EqxRT9zAP1P/dJelaP9Zd2iJEQTVO0qrgqnDu4/ jNj1pcs323STFZmN67gCimVUyXeQ5/ciebl+OX1mmVwMrt/BL4pi0yPFipx+xyozQvq4Vi 2r/g+p0db2/tVfva0Jhfoogd/c9WjPuAFqsWNMXrgbRM5N0AFgdjlLSJxhAG9sbWAF1qkn zw3svicwBVbPFM7TrZb3gOTD0NaVl9qSlc1TgofvFZG3Wtd6fipvmSpXPYeFVIxjS44zvu +wocAnt8lM2bzYGC0aE4zxlXMSYw9Omx1hHsGfNnTywqy9jcLjlm0vNUNxUr6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746611560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePr1bmVR1WeApi6T58fAdDzeOb1SUVL3ElaqupWaQeE=; b=xuHq8/nTOuMot+a57Z34sjsEhZgS8ofdCN2aIOFHbnJWwVah1kLVgc0D2sD6EefIMULfCL clR49/ua5daEJsLwXdqWy3/OYbPWXm82TPKA773ZMPq2xGuvHREN9VrxQ/MyKI3UQDPhnM Gd7SOyYXifRU843mCO/yxQE051r43GmtsRfoeTTteEamK1N5EDdVn9Uu+pudC+MsU8MEVQ c90YmufRPxFhyN3xmdn91/MGxcWjcvU6sgVtuPihQ7fTCHRL+bUyKlp6yl8G12KETwWx9O txwKBUsKaGLnMUhup+30oNrGjvCQpEQlCM+TCvv4Jc6KbOTFLleZuHqN6bmv2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746611560; a=rsa-sha256; cv=none; b=vkAaq3FSvRdyan4NiKKEPKHWCYRSXo24vmni2uaQ2YPCuPtQGaadYFIF/8g1CdwuEphnBl qmqtyRTI87Mob3reWri5OnYlx/bKxEr+qLkpVFroxhwWdXhC0yxb3oFiJiVjV8dLAAyLyZ qV4R0z9SUqCmH4YWm/8qD7I9MOiEDodAKy5sBUnXL+roy+hgTDhErkZZ+vH9ZZckfzdpuL LHurZuu2TvXrrjXf26YaQNWmDMC9+41dKlpij4+9M2VUm8g0Oojb8+pM+tyaxMTTlb+Kt1 rCwmEsi5lSjcCTIvx/zxXdIYU8gdQYnV/byDxw500HEtb4TuK3ZZvOJVF/3XCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsrCr0sCMz8nR; Wed, 07 May 2025 09:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5479qeu6071619; Wed, 7 May 2025 09:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5479qe0v071616; Wed, 7 May 2025 09:52:40 GMT (envelope-from git) Date: Wed, 7 May 2025 09:52:40 GMT Message-Id: <202505070952.5479qe0v071616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 6f2b1b56ac3d - main - column(1): add tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f2b1b56ac3dd154bd98f5a7ea075abcb4356560 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=6f2b1b56ac3dd154bd98f5a7ea075abcb4356560 commit 6f2b1b56ac3dd154bd98f5a7ea075abcb4356560 Author: Lexi Winter AuthorDate: 2025-05-07 09:27:20 +0000 Commit: Lexi Winter CommitDate: 2025-05-07 09:27:20 +0000 column(1): add tests Reviewed by: des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D49911 --- etc/mtree/BSD.tests.dist | 2 + usr.bin/column/Makefile | 5 ++ usr.bin/column/tests/Makefile | 3 + usr.bin/column/tests/column.sh | 170 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 180 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index bb62c44403d2..bfd21607ed4d 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1087,6 +1087,8 @@ .. col .. + column + .. comm .. compress diff --git a/usr.bin/column/Makefile b/usr.bin/column/Makefile index b0b88c086b41..5ead3de91932 100644 --- a/usr.bin/column/Makefile +++ b/usr.bin/column/Makefile @@ -1,3 +1,8 @@ +.include + PROG= column +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests + .include diff --git a/usr.bin/column/tests/Makefile b/usr.bin/column/tests/Makefile new file mode 100644 index 000000000000..40a7767f0dc0 --- /dev/null +++ b/usr.bin/column/tests/Makefile @@ -0,0 +1,3 @@ +ATF_TESTS_SH= column + +.include diff --git a/usr.bin/column/tests/column.sh b/usr.bin/column/tests/column.sh new file mode 100644 index 000000000000..c7c6502098d4 --- /dev/null +++ b/usr.bin/column/tests/column.sh @@ -0,0 +1,170 @@ +# SPDX-License-Identifier: ISC +# +# Copyright (c) 2025 Lexi Winter +# +# 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. + +atf_test_case "basic" +basic_head() +{ + atf_set descr "Basic column(1) with default options" +} + +basic_body() +{ + cat >input.1 <input.2 <input.3 <expected <input.1 <input.2 <input.3 <expected <input.1 <input.2 <input.3 <expected <input <expected < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: da509c29089a - main - libc: add link_ntoa_r() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da509c29089ab169b667ebdf82aa903987ba9c6d Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=da509c29089ab169b667ebdf82aa903987ba9c6d commit da509c29089ab169b667ebdf82aa903987ba9c6d Author: Lexi Winter AuthorDate: 2025-05-07 09:34:08 +0000 Commit: Lexi Winter CommitDate: 2025-05-07 09:52:04 +0000 libc: add link_ntoa_r() this is a re-entrant version of link_ntoa. use an in-out parameter for the buffer size, so the user requires at most two calls to determine the needed size. reimplement link_ntoa using link_ntoa_r with a static buffer. Reviewed by: des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50202 --- lib/libc/net/Makefile.inc | 3 +- lib/libc/net/Symbol.map | 4 ++ lib/libc/net/linkaddr.3 | 45 +++++++++++++- lib/libc/net/linkaddr.c | 110 ++++++++++++++++++++++++++-------- lib/libc/tests/net/link_addr_test.cc | 111 +++++++++++++++++++++++++++++++++++ sys/net/if_dl.h | 1 + 6 files changed, 246 insertions(+), 28 deletions(-) diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc index 58c650b207cf..7e9e5295c78c 100644 --- a/lib/libc/net/Makefile.inc +++ b/lib/libc/net/Makefile.inc @@ -141,7 +141,8 @@ MLINKS+=inet6_opt_init.3 inet6_opt_append.3 \ inet6_rthdr_space.3 inet6_rthdr_reverse.3 \ inet6_rthdr_space.3 inet6_rthdr_segments.3 MLINKS+=linkaddr.3 link_addr.3 \ - linkaddr.3 link_ntoa.3 + linkaddr.3 link_ntoa.3 \ + linkaddr.3 link_ntoa_r.3 MLINKS+=rcmd.3 iruserok.3 \ rcmd.3 iruserok_sa.3 \ rcmd.3 rcmd_af.3 \ diff --git a/lib/libc/net/Symbol.map b/lib/libc/net/Symbol.map index ebc3a56b549f..25e79b4e5807 100644 --- a/lib/libc/net/Symbol.map +++ b/lib/libc/net/Symbol.map @@ -138,6 +138,10 @@ FBSD_1.3 { sctp_sendv; }; +FBSD_1.8 { + link_ntoa_r; +}; + FBSDprivate_1.0 { _nsdispatch; _nsyyerror; /* generated from nslexer.l */ diff --git a/lib/libc/net/linkaddr.3 b/lib/libc/net/linkaddr.3 index ee3ea3056c71..ccfbf4c8d2e1 100644 --- a/lib/libc/net/linkaddr.3 +++ b/lib/libc/net/linkaddr.3 @@ -28,12 +28,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 28, 2007 +.Dd May 7, 2025 .Dt LINK_ADDR 3 .Os .Sh NAME .Nm link_addr , -.Nm link_ntoa +.Nm link_ntoa , +.Nm link_ntoa_r .Nd elementary address specification routines for link level access .Sh LIBRARY .Lb libc @@ -45,12 +46,15 @@ .Fn link_addr "const char *addr" "struct sockaddr_dl *sdl" .Ft char * .Fn link_ntoa "const struct sockaddr_dl *sdl" +.Ft int +.Fn link_ntoa_r "const struct sockaddr_dl *sdl" "char *obuf" "size_t *buflen" .Sh DESCRIPTION The routine .Fn link_addr interprets character strings representing link-level addresses, returning binary information suitable for use in system calls. +.Pp The routine .Fn link_ntoa takes @@ -60,9 +64,34 @@ address and returns an string representing some of the information present, including the link level address itself, and the interface name or number, if present. +The returned string is stored in a static buffer. This facility is experimental and is still subject to change. .Pp +The routine +.Fn link_ntoa_r +behaves like +.Fn link_ntoa , +except the string is placed in the provided buffer instead of a static +buffer. +The caller should initialize +.Fa buflen +to the number of bytes available in +.Fa obuf . +On return, +.Fa buflen +is set to the actual number of bytes required for the output buffer, +including the NUL terminator. +If +.Fa obuf +is NULL, then +.Fa buflen +is set as described, but nothing is written. +This may be used to determine the required length of the buffer before +calling +.Fn link_ntoa_r +a second time. +.Pp For .Fn link_addr , the string @@ -94,6 +123,14 @@ The .Fn link_ntoa function always returns a null terminated string. +.Pp +The +.Fn link_ntoa_r +function returns 0 on success, or -1 if the provided buffer was not +large enough; in the latter case, the contents of the buffer are +indeterminate, but a trailing NUL will always be written if the buffer +was at least one byte in size. +.Pp The .Fn link_addr function @@ -109,6 +146,10 @@ and .Fn link_ntoa functions appeared in .Bx 4.3 Reno . +The +.Fn link_ntoa_r +function appeared in +.Fx 15.0 . .Sh BUGS The returned values for link_ntoa reside in a static memory area. diff --git a/lib/libc/net/linkaddr.c b/lib/libc/net/linkaddr.c index dedc910b9474..27d444666185 100644 --- a/lib/libc/net/linkaddr.c +++ b/lib/libc/net/linkaddr.c @@ -31,8 +31,12 @@ #include #include + #include #include + +#include +#include #include /* States*/ @@ -113,53 +117,109 @@ link_addr(const char *addr, struct sockaddr_dl *sdl) return; } -static const char hexlist[] = "0123456789abcdef"; - char * link_ntoa(const struct sockaddr_dl *sdl) { static char obuf[64]; + size_t buflen; _Static_assert(sizeof(obuf) >= IFNAMSIZ + 20, "obuf is too small"); + + /* + * Ignoring the return value of link_ntoa_r() is safe here because it + * always writes the terminating NUL. This preserves the traditional + * behaviour of link_ntoa(). + */ + buflen = sizeof(obuf); + (void)link_ntoa_r(sdl, obuf, &buflen); + return obuf; +} + +int +link_ntoa_r(const struct sockaddr_dl *sdl, char *obuf, size_t *buflen) +{ + static const char hexlist[] = "0123456789abcdef"; char *out; const u_char *in, *inlim; int namelen, i, rem; + size_t needed; - namelen = (sdl->sdl_nlen <= IFNAMSIZ) ? sdl->sdl_nlen : IFNAMSIZ; + assert(sdl); + assert(buflen); + /* obuf may be null */ + needed = 1; /* 1 for the NUL */ out = obuf; - rem = sizeof(obuf); + if (obuf) + rem = *buflen; + else + rem = 0; + +/* + * Check if at least n bytes are available in the output buffer, plus 1 for the + * trailing NUL. If not, set rem = 0 so we stop writing. + * Either way, increment needed by the amount we would have written. + */ +#define CHECK(n) do { \ + if ((SIZE_MAX - (n)) >= needed) \ + needed += (n); \ + if (rem >= ((n) + 1)) \ + rem -= (n); \ + else \ + rem = 0; \ + } while (0) + +/* + * Write the char c to the output buffer, unless the buffer is full. + * Note that if obuf is NULL, rem is always zero. + */ +#define OUT(c) do { \ + if (rem > 0) \ + *out++ = (c); \ + } while (0) + + namelen = (sdl->sdl_nlen <= IFNAMSIZ) ? sdl->sdl_nlen : IFNAMSIZ; if (namelen > 0) { - bcopy(sdl->sdl_data, out, namelen); - out += namelen; - rem -= namelen; + CHECK(namelen); + if (rem > 0) { + bcopy(sdl->sdl_data, out, namelen); + out += namelen; + } + if (sdl->sdl_alen > 0) { - *out++ = ':'; - rem--; + CHECK(1); + OUT(':'); } } - in = (const u_char *)sdl->sdl_data + sdl->sdl_nlen; + in = (const u_char *)LLADDR(sdl); inlim = in + sdl->sdl_alen; - while (in < inlim && rem > 1) { - if (in != (const u_char *)sdl->sdl_data + sdl->sdl_nlen) { - *out++ = '.'; - rem--; + while (in < inlim) { + if (in != (const u_char *)LLADDR(sdl)) { + CHECK(1); + OUT('.'); } i = *in++; if (i > 0xf) { - if (rem < 3) - break; - *out++ = hexlist[i >> 4]; - *out++ = hexlist[i & 0xf]; - rem -= 2; + CHECK(2); + OUT(hexlist[i >> 4]); + OUT(hexlist[i & 0xf]); } else { - if (rem < 2) - break; - *out++ = hexlist[i]; - rem--; + CHECK(1); + OUT(hexlist[i]); } } - *out = 0; - return (obuf); + +#undef CHECK +#undef OUT + + /* + * We always leave enough room for the NUL if possible, but the user + * might have passed a NULL or zero-length buffer. + */ + if (out && *buflen) + *out = '\0'; + + *buflen = needed; + return ((rem > 0) ? 0 : -1); } diff --git a/lib/libc/tests/net/link_addr_test.cc b/lib/libc/tests/net/link_addr_test.cc index 6b9f5a841ef7..ea8f64c6723b 100644 --- a/lib/libc/tests/net/link_addr_test.cc +++ b/lib/libc/tests/net/link_addr_test.cc @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -262,10 +263,120 @@ ATF_TEST_CASE_BODY(overlong) ::link_ntoa(&sdl)); } +/* + * Test link_ntoa_r, the re-entrant version of link_ntoa(). + */ +ATF_TEST_CASE_WITHOUT_HEAD(link_ntoa_r) +ATF_TEST_CASE_BODY(link_ntoa_r) +{ + static constexpr char garbage = 0x41; + std::vector buf; + sockaddr_dl sdl; + size_t len; + int ret; + + // Return the contents of buf as a string, using the NUL terminator to + // determine length. This is to ensure we're using the return value in + // the same way C code would, but we do a bit more verification to + // elicit a test failure rather than a SEGV if it's broken. + auto bufstr = [&buf]() -> std::string_view { + // Find the NUL. + auto end = std::ranges::find(buf, '\0'); + ATF_REQUIRE(end != buf.end()); + + // Intentionally chopping the NUL off. + return {begin(buf), end}; + }; + + // Resize the buffer and set the contents to a known garbage value, so + // we don't accidentally have a NUL in the right place when link_ntoa_r + // didn't put it there. + auto resetbuf = [&buf, &len](std::size_t size) { + len = size; + buf.resize(len); + std::ranges::fill(buf, garbage); + }; + + // Test a short address with a large buffer. + sdl = make_linkaddr("ix0:1.2.3"); + resetbuf(64); + ret = ::link_ntoa_r(&sdl, &buf[0], &len); + ATF_REQUIRE_EQ(0, ret); + ATF_REQUIRE_EQ(10, len); + ATF_REQUIRE_EQ("ix0:1.2.3"s, bufstr()); + + // Test a buffer which is exactly the right size. + sdl = make_linkaddr("ix0:1.2.3"); + resetbuf(10); + ret = ::link_ntoa_r(&sdl, &buf[0], &len); + ATF_REQUIRE_EQ(0, ret); + ATF_REQUIRE_EQ(10, len); + ATF_REQUIRE_EQ("ix0:1.2.3"sv, bufstr()); + + // Test various short buffers, using a table of buffer length and the + // output we expect. All of these should produce valid but truncated + // strings, with a trailing NUL and with buflen set correctly. + + auto buftests = std::vector>{ + {1u, ""sv}, + {2u, ""sv}, + {3u, ""sv}, + {4u, "ix0"sv}, + {5u, "ix0:"sv}, + {6u, "ix0:1"sv}, + {7u, "ix0:1."sv}, + {8u, "ix0:1.2"sv}, + {9u, "ix0:1.2."sv}, + }; + + for (auto const &[buflen, expected] : buftests) { + sdl = make_linkaddr("ix0:1.2.3"); + resetbuf(buflen); + ret = ::link_ntoa_r(&sdl, &buf[0], &len); + ATF_REQUIRE_EQ(-1, ret); + ATF_REQUIRE_EQ(10, len); + ATF_REQUIRE_EQ(expected, bufstr()); + } + + // Test a NULL buffer, which should just set buflen. + sdl = make_linkaddr("ix0:1.2.3"); + len = 0; + ret = ::link_ntoa_r(&sdl, NULL, &len); + ATF_REQUIRE_EQ(-1, ret); + ATF_REQUIRE_EQ(10, len); + + // A NULL buffer with a non-zero length should also be accepted. + sdl = make_linkaddr("ix0:1.2.3"); + len = 64; + ret = ::link_ntoa_r(&sdl, NULL, &len); + ATF_REQUIRE_EQ(-1, ret); + ATF_REQUIRE_EQ(10, len); + + // Test a non-NULL buffer, but with a length of zero. + sdl = make_linkaddr("ix0:1.2.3"); + resetbuf(1); + len = 0; + ret = ::link_ntoa_r(&sdl, &buf[0], &len); + ATF_REQUIRE_EQ(-1, ret); + ATF_REQUIRE_EQ(10, len); + // Check we really didn't write anything. + ATF_REQUIRE_EQ(garbage, buf[0]); + + // Test a buffer which would be truncated in the middle of a two-digit + // hex octet, which should not write the truncated octet at all. + sdl = make_linkaddr("ix0:1.22.3"); + resetbuf(8); + ret = ::link_ntoa_r(&sdl, &buf[0], &len); + ATF_REQUIRE_EQ(-1, ret); + ATF_REQUIRE_EQ(11, len); + ATF_REQUIRE_EQ("ix0:1."sv, bufstr()); +} + ATF_INIT_TEST_CASES(tcs) { ATF_ADD_TEST_CASE(tcs, basic); ATF_ADD_TEST_CASE(tcs, ifname); ATF_ADD_TEST_CASE(tcs, nonether); ATF_ADD_TEST_CASE(tcs, overlong); + ATF_ADD_TEST_CASE(tcs, link_ntoa_r); } diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h index f8c7c2f75956..683f298f5463 100644 --- a/sys/net/if_dl.h +++ b/sys/net/if_dl.h @@ -84,6 +84,7 @@ struct sockaddr_dl *link_init_sdl(struct ifnet *, struct sockaddr *, u_char); __BEGIN_DECLS void link_addr(const char *, struct sockaddr_dl *); char *link_ntoa(const struct sockaddr_dl *); +int link_ntoa_r(const struct sockaddr_dl *, char *, size_t *); __END_DECLS #endif /* !_KERNEL */ From nobody Wed May 7 10:14: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 4Zsrhv4Hbgz5w50d; Wed, 07 May 2025 10:14: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zsrhv3Nhtz3hNV; Wed, 07 May 2025 10:14:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746612863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsSgcuz/VOVa5sBlFWDZynJHEtIyhz8RI4OWT5BIXKo=; b=cdnflhaWJyFlqnPsjz5c2/vzWP/qsEIlnWMKfGMninlof258/k1UxHKqLaXDph1Jp4wEhH Oe7ys7YW0v1UF7mpXKRBGK3wSHhQ1C5HgEDLjxg23NucI3SSb9wb+L1q3+bXg+zZ6GZ6X/ xWczBFUkEhPI9iOqpaLy0ahsl1HwcrezwWvZYZubvv0PB2hq4g9dgRVxrA5O/z+IhLQyu6 wMiiq3rAYcfiskBrxiXJTfgVRg0+JdQ+YpHBBwtPJm0XWWDO1KL9R3JIUH5R26MrBDfMB2 f2yG1EVfbd0oPBVOml1NEvRVj68fDHpYbV7f1G8Ch5vK9dBqIMt1CYy/BIyPgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746612863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsSgcuz/VOVa5sBlFWDZynJHEtIyhz8RI4OWT5BIXKo=; b=mPsfxnwMgX1LI/omxPdgrwg+22BAN7QFicBRyvvh1toVITahlgJnCULEX4Z4PYJaaYEicd cFXC+ZSFBk4IAbFbJXC+V7WAIv7fMmED6bavK+2kDj1qJe8g16hV1s2i7z3cs/vsgFfozt jiMIMS4mTPejD9pFo7uDyNN0MAqZU2Rx3GeGz74CKBT1eX04Y5Of+gW/Vro+woEY2z91Vc tMvocnzzlrznLHkjN9l3GMmRXNBWh9eLzYNklBZQ8alSd+TL6EZekUUYBhSvg9sJyrO1u3 yCmRDCtYdmau+JG2yvqqc2KzG4k9cg7PyQrzRNSyafAKzhCwt9imvrwkAvK8hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746612863; a=rsa-sha256; cv=none; b=XBaRLDU5nISmvdfrAzAATkiZ4qxPcy8/83Utf9rBgxwHW0wWw6Mt/NBMZnh2paf4yFl7Zw wVFr/SKkfL2CNfAHabX6VBWH93zyNQcNdiMllKpQvgF4nGJ3bHVx99DvAJNM7iLGQGn/KD fRy6kHEK3PeC6qEgbwS/BM9QaGXNrLw83WO/L6BafQ6NGgNa9eF3vX8GdYZb7kKcP3odJV +EEKRMIbQaFjN/3PHwUZNlMHJ7xOL56mSbZfG534JZ8dFINV96+40kDDui6AzsoJoL45rE dFMlP0+DlA+6aICaSIFUPTvrGO7hE1dSO+p3QmtRFHsqSdHIWdEj+W0mkQ6MeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zsrhv2yM4z8Z8; Wed, 07 May 2025 10:14:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547AENJQ011327; Wed, 7 May 2025 10:14:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547AENau011324; Wed, 7 May 2025 10:14:23 GMT (envelope-from git) Date: Wed, 7 May 2025 10:14:23 GMT Message-Id: <202505071014.547AENau011324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 713abc9880aa - main - sysctl(9): Ease exporting struct sizes; Discourage doing that List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 713abc9880aabe0ff924ff644bceb6ff404ed3cd Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=713abc9880aabe0ff924ff644bceb6ff404ed3cd commit 713abc9880aabe0ff924ff644bceb6ff404ed3cd Author: Olivier Certner AuthorDate: 2025-05-01 16:02:44 +0000 Commit: Olivier Certner CommitDate: 2025-05-07 10:13:40 +0000 sysctl(9): Ease exporting struct sizes; Discourage doing that Introduce two helpers, the more general SYSCTL_SIZEOF() and a struct-specific one SYSCTL_SIZEOF_STRUCT() which prepends 'struct' in the description and in the use of sizeof() but uses the raw structure name as the knob's name. The size of the object/structure is exported under 'debug.sizeof'. Existing knobs under 'debug.sizeof' were all converted to use the helpers. Add a note before the helpers discouraging the introduction of new leaves for ad-hoc reasons. List alternative means for developers to obtain the size of arbitrary kernel structures easily (thanks to markj@ for providing these). No functional change (intended). Reviewed by: kib, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50121 --- .../openzfs/module/os/freebsd/zfs/zfs_znode_os.c | 4 ++++ sys/fs/devfs/devfs_devs.c | 7 ++----- sys/geom/geom_kern.c | 15 +++++---------- sys/kern/kern_mib.c | 18 ++++++------------ sys/kern/subr_devstat.c | 3 +-- sys/kern/vfs_cache.c | 3 +-- sys/sys/sysctl.h | 21 +++++++++++++++++++++ 7 files changed, 40 insertions(+), 31 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c index ce7b93d20a47..e97a0dd84040 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode_os.c @@ -67,8 +67,12 @@ #include "zfs_comutil.h" /* Used by fstat(1). */ +#ifdef SYSCTL_SIZEOF +SYSCTL_SIZEOF(znode, znode_t); +#else SYSCTL_INT(_debug_sizeof, OID_AUTO, znode, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, sizeof (znode_t), "sizeof(znode_t)"); +#endif /* * Define ZNODE_STATS to turn on statistic gathering. By default, it is only diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index c6dcd4fc7646..124f9f0449af 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -121,11 +121,8 @@ SYSCTL_PROC(_kern, OID_AUTO, devname, CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_ANYBODY|CTLFLAG_MPSAFE, NULL, 0, sysctl_devname, "", "devname(3) handler"); -SYSCTL_INT(_debug_sizeof, OID_AUTO, cdev, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct cdev), "sizeof(struct cdev)"); - -SYSCTL_INT(_debug_sizeof, OID_AUTO, cdev_priv, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct cdev_priv), "sizeof(struct cdev_priv)"); +SYSCTL_SIZEOF_STRUCT(cdev); +SYSCTL_SIZEOF_STRUCT(cdev_priv); struct cdev * devfs_alloc(int flags) diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c index 7f767da99dfc..c6ffd540bc9b 100644 --- a/sys/geom/geom_kern.c +++ b/sys/geom/geom_kern.c @@ -229,13 +229,8 @@ SYSCTL_INT(_kern_geom, OID_AUTO, collectstats, CTLFLAG_RW, &g_collectstats, 0, "Control statistics collection on GEOM providers and consumers"); -SYSCTL_INT(_debug_sizeof, OID_AUTO, g_class, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct g_class), "sizeof(struct g_class)"); -SYSCTL_INT(_debug_sizeof, OID_AUTO, g_geom, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct g_geom), "sizeof(struct g_geom)"); -SYSCTL_INT(_debug_sizeof, OID_AUTO, g_provider, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct g_provider), "sizeof(struct g_provider)"); -SYSCTL_INT(_debug_sizeof, OID_AUTO, g_consumer, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct g_consumer), "sizeof(struct g_consumer)"); -SYSCTL_INT(_debug_sizeof, OID_AUTO, g_bioq, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct g_bioq), "sizeof(struct g_bioq)"); +SYSCTL_SIZEOF_STRUCT(g_class); +SYSCTL_SIZEOF_STRUCT(g_geom); +SYSCTL_SIZEOF_STRUCT(g_provider); +SYSCTL_SIZEOF_STRUCT(g_consumer); +SYSCTL_SIZEOF_STRUCT(g_bioq); diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index f8f90fce87cf..97742aefe8f7 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -730,11 +730,9 @@ SYSCTL_STRING(_user, USER_LOCALBASE, localbase, CTLFLAG_RWTUN, localbase, sizeof(localbase), "Prefix used to install and locate add-on packages"); #include -SYSCTL_INT(_debug_sizeof, OID_AUTO, vnode, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct vnode), "sizeof(struct vnode)"); +SYSCTL_SIZEOF_STRUCT(vnode); -SYSCTL_INT(_debug_sizeof, OID_AUTO, proc, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct proc), "sizeof(struct proc)"); +SYSCTL_SIZEOF_STRUCT(proc); static int sysctl_kern_pid_max(SYSCTL_HANDLER_ARGS) @@ -770,19 +768,15 @@ SYSCTL_INT(_kern, OID_AUTO, pid_max_limit, CTLFLAG_RD, #include #include -SYSCTL_INT(_debug_sizeof, OID_AUTO, bio, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct bio), "sizeof(struct bio)"); -SYSCTL_INT(_debug_sizeof, OID_AUTO, buf, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct buf), "sizeof(struct buf)"); +SYSCTL_SIZEOF_STRUCT(bio); +SYSCTL_SIZEOF_STRUCT(buf); #include -SYSCTL_INT(_debug_sizeof, OID_AUTO, kinfo_proc, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct kinfo_proc), "sizeof(struct kinfo_proc)"); +SYSCTL_SIZEOF_STRUCT(kinfo_proc); /* Used by kernel debuggers. */ const int pcb_size = sizeof(struct pcb); -SYSCTL_INT(_debug_sizeof, OID_AUTO, pcb, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct pcb), "sizeof(struct pcb)"); +SYSCTL_SIZEOF_STRUCT(pcb); /* XXX compatibility, remove for 6.0 */ #include diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index f7e2595aa7cf..07a9cc0f57be 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -599,5 +599,4 @@ devstat_free(struct devstat *dsp) } } -SYSCTL_INT(_debug_sizeof, OID_AUTO, devstat, CTLFLAG_RD, - SYSCTL_NULL_INT_PTR, sizeof(struct devstat), "sizeof(struct devstat)"); +SYSCTL_SIZEOF_STRUCT(devstat); diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 9089c0fd78b4..ff671e80b803 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -627,8 +627,7 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, #endif /* Export size information to userland */ -SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, - sizeof(struct namecache), "sizeof(struct namecache)"); +SYSCTL_SIZEOF_STRUCT(namecache); /* * The new name cache statistics diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 0eb9ff274c1b..902f5bde9c37 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -36,6 +36,7 @@ #define _SYS_SYSCTL_H_ #ifdef _KERNEL +#include #include #include #endif @@ -932,6 +933,26 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); CTLFLAG_RD | CTLFLAG_CAPRD | CTLTYPE_INT | CTLFLAG_MPSAFE, \ NULL, 1, sysctl_handle_int, "I", desc, "feature"); +/* + * Adding new leaves to the 'debug.sizeof' MIB tree for ad-hoc reasons is + * discouraged, and in particular for reporting to developers the size of some + * kernel structures, which can be obtained by the following alternative means: + * 1. In GDB, load a full kernel image and use 'print(sizeof(struct XXX))'. + * Alternatively, use 'ptype/o struct XXX' to additionally get the offsets + * and size of all structure's fields. + * 2. If the structure is allocated from UMA, then 'vmstat -z' reports its size + * (the mapping between structure types and zones is usually + * straightforward). + */ +/* Generates a read-only sysctl reporting the size of an object/structure. */ +#define SYSCTL_SIZEOF(name, expr) \ + SYSCTL_INT(_debug_sizeof, OID_AUTO, name, CTLFLAG_RD, \ + SYSCTL_NULL_INT_PTR, sizeof(expr), \ + "sizeof(" __STRING(expr) ")"); +/* Same, specialized for structures. */ +#define SYSCTL_SIZEOF_STRUCT(struct_name) \ + SYSCTL_SIZEOF(struct_name, struct struct_name) + #endif /* _KERNEL */ /* From nobody Wed May 7 11:35: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 4ZstVT3mRdz5w9Hh; Wed, 07 May 2025 11:35: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZstVT3Gyzz3NG7; Wed, 07 May 2025 11:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746617729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=we21VjeGgUYEb3MM589yxhumn5F4dNaSTuwHvXGCLI4=; b=OZT6YVzi5zImQs0uotWolIvHMAoE5zO6snuDR/i3pXTw3lQ6QMrzm306wKwz9ACDzmmwZe g31ceuNZ/+anEq8e4deph6BWuQuK60Nc59Bnv5sszmeJATYwHTy5L61NLmmTeiF1Bhqhui UqeQG+Ei1R8HqcCfpPVnfG2coXHVS4YbuBK9Cij09E6Szw7Qgo4nGRZH/QQw7TuMSRIlSK G4YTJYF/MnM3RGW/MM4jcMSilT37lvidWg9wxRoqo/TMuVvfdtW5X8OqxTlFyzzJTlD5P5 aR4WYxEMhGQp7hq4JIwUYYKztRDlXfZvYtl+1QvoA5NN9vqK4Jd3vvlxzx80xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746617729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=we21VjeGgUYEb3MM589yxhumn5F4dNaSTuwHvXGCLI4=; b=qhN9dVvIpPPduKCjlGBQ6bpmVmfE+6I9HTeuscACoU2Yam2WZJF4k5y2IIdAFh+Vqcbnds rg4XucoFaXLrX3traH5vczLv8Fo1fPn24hEG83UvyvKeTe1s8SalFY9QG8g+PTQK/CgEHR jMBjxKXAhA8C+G0+j9a9PZCPATe13f4hXTJq2d4kVs6YWwR0nSiUBcgFSOQLiB2Rnf8rxt ++V3eNeOSNz6PQJlgzbaA8uTzO77KLWh0uR3Zun2c2IFCBai8kyGBKiSr/ZaCrxp6PiFJ+ roQ6mzu0J4IxpYnPGXT5b3VAyOnHv7hdNu9ZgINJgrSAn7lif/jSmUvyGFarLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746617729; a=rsa-sha256; cv=none; b=Go9/fhEukCXfPMK5F2JekrptuCK8vZcNR4/WZdhXWKeXYI7Lg+MnCNGCOiEKoOmIT3BE5s gZPbodTgJFPPVn6jYn6zyzoT5qzOIUXcjmkzLEMXbIpmnx7VbBQKyr3yb/tQWlaMp6w4AC 6L3SMgiFBpZyKEVw3UbQpApcn0WqWiAn+JhV7K4anVvTQqEna/4FUAMnLCQ+7XxFyJzzZZ jvtv16Bo1UR7yVR8eXN0bAFCOzvesnlrw41mJeAbEJr1oj+E6E4AjkJ1N1TAjDbnJ83lUT dQbggiOXS4WfSgeszlxYAz0yFm8wFdGOXfkqXTgk9QE2ZZPRPOihzdx3pH4/9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZstVT2s0GzCD1; Wed, 07 May 2025 11:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547BZTn7060859; Wed, 7 May 2025 11:35:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547BZTiE060856; Wed, 7 May 2025 11:35:29 GMT (envelope-from git) Date: Wed, 7 May 2025 11:35:29 GMT Message-Id: <202505071135.547BZTiE060856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: d72fcd6d5a84 - main - mailmap: add my personal 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d72fcd6d5a8429c90fda22b3964d757f2f0c48b5 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=d72fcd6d5a8429c90fda22b3964d757f2f0c48b5 commit d72fcd6d5a8429c90fda22b3964d757f2f0c48b5 Author: Lexi Winter AuthorDate: 2025-05-07 11:30:40 +0000 Commit: Lexi Winter CommitDate: 2025-05-07 11:35:12 +0000 mailmap: add my personal address Approved by: des (mentor) --- .mailmap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index 3d33acc8d59a..f54f321b17e3 100644 --- a/.mailmap +++ b/.mailmap @@ -17,3 +17,5 @@ Val Packett Piotr Paweł Stefaniak Sumit Saxena Ganael LAPLANCHE + + From nobody Wed May 7 12:36: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 4ZsvrK1TNnz5wDYt; Wed, 07 May 2025 12:36:01 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsvrK03f0z3q32; Wed, 07 May 2025 12:36:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746621361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cKdjLJRPn0jwgGNgeU09MOzJQWcH9mzAg+OodokPJes=; b=Ppp/CGt9DHQXinQOXxMVEsRZDx05vuosOS3qyLhKlYlQsUdqt6ydOG+2UiT+LYcLkBreCb Q8HfrN7VLFxDaD4J8KuxIqMKKbqre+BUlncAwzoZZA+32RiqGNrVnTye+OPoI6gSE++iVB UtGAYepz71LvvIxzXf91KKcxYDk5WLadVutr44dTYXPDo5djjuPJxE2LKcAXQUWLzaWekR 5KJyFm+jSDW9GD8k5HvuesomVTlypTLTtxn0rSS0jyab2Gg3udvXiMdejDXd/9vkmcahpk OrnyWNU3IEnW3sv5sJHZkMwzgwFDAMq8vfNVm7eFGFNp+t1/mITg2hAP0+hs9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746621361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cKdjLJRPn0jwgGNgeU09MOzJQWcH9mzAg+OodokPJes=; b=OGlwnGSwqGTKT6W7YzTt21wJbRdJxRezE14u3TvUmbXVoXUXj5drDD8R01rQQ0EXPWXBL3 Ed03VziwfgwzxV/1Pdi9RkQFkeVq8cCZ5Aof3R38/Td2JUBKtFsAD717n+fwAbWFB9SXDK 3s0ed3ppApwf8vV7+AHOECcMbn1oCwKZhX/qh3JiNVWVVBIRrrulGUVPA/I/TMPcSmp9Xn G2sRTVB9jEZ4Deo5U230topmzOjHjH6DUpFsiX9GzSXvqQnxAfKoL+dyZgCi5qI2iZx0MD Ze9h8710Cwka1lOdmFlT4wrQ+iOG2ZSK/WkjwEFba1tMtiOZG0asXol7nzziSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746621361; a=rsa-sha256; cv=none; b=na0Aq/gLEhHqnRM4TgSUnI0hZnt+886l1VpKqilIZXWeb3vXUTQtjKusZc1g8qM/AJC2Sq vgDSXnb/PQsSRdnYSewhF1W/Eh8TxexJcPoIlr04D8ZWOpw6j9wLxRHyzt1SX/+sS+q63K b9k2aLUdWtO6RPKFMdG52kYsaGxRIN7rQVNwhmzu9aS8b+U1FJ+M9VMSh/8VW75wCx1lCv IBAz6TUaeU0pmKBENVIQ867GrLQPdHhhnWisdd0q+bh7Zcfwt0dCGrOAztplQHtt0j2Fgk 54qibAIdlqjJGAv6pKu0jOHjLSnd1nfM3QCqEcNpCxaBdHiOya4eaq1MvmvjsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsvrJ6WzQzDN1; Wed, 07 May 2025 12:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Ca0xI073577; Wed, 7 May 2025 12:36:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Ca0XO073574; Wed, 7 May 2025 12:36:00 GMT (envelope-from git) Date: Wed, 7 May 2025 12:36:00 GMT Message-Id: <202505071236.547Ca0XO073574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 0285c2428780 - main - queue(3): Add a test for STAILQ_REVERSE() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 0285c2428780cdb94bfb7d2dc1806a4bd129324e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0285c2428780cdb94bfb7d2dc1806a4bd129324e commit 0285c2428780cdb94bfb7d2dc1806a4bd129324e Author: Olivier Certner AuthorDate: 2025-05-05 09:50:28 +0000 Commit: Olivier Certner CommitDate: 2025-05-07 12:34:39 +0000 queue(3): Add a test for STAILQ_REVERSE() Reviewed by: kib, markj MFC after: 1 week MFC with: e8286eb29516 ("sys/queue.h: add STAILQ_REVERSE") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50165 --- tests/sys/sys/queue_test.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/tests/sys/sys/queue_test.c b/tests/sys/sys/queue_test.c index 75974ad8d792..7f8738751b85 100644 --- a/tests/sys/sys/queue_test.c +++ b/tests/sys/sys/queue_test.c @@ -165,6 +165,34 @@ ATF_TC_BODY(type ## _split_after_and_concat, tc) \ type ## _destroy(type); \ } +#define QUEUE_TESTS_CHECK_REVERSED(type, TYPE) \ +/* \ + * Checks that some tailq/list is reversed. \ + */ \ +static void \ +type ## _check_reversed(const struct type ## _ids *const type, \ + const u_int nb, const u_int id_shift) \ +{ \ + struct type ## _id_elem *e; \ + u_int i = 0; \ + \ + TYPE ## _FOREACH(e, type, ie_entry) { \ + const u_int expected_id = nb - 1 - i + id_shift; \ + \ + ATF_REQUIRE_MSG(i < nb, \ + #type " %p has more than %u elements", \ + type, nb); \ + ATF_REQUIRE_MSG(e->ie_id == expected_id, \ + #type " %p element %p, idx %u: Found ID %u, " \ + "expected %u", \ + type, e, i, e->ie_id, expected_id); \ + ++i; \ + } \ + ATF_REQUIRE_MSG(i == nb, \ + #type " %p has only %u elements, expected %u", \ + type, i, nb); \ +} + /* * Paper over the *_CONCAT() signature differences. */ @@ -216,11 +244,40 @@ ATF_TC_BODY(type ## _split_after_and_concat, tc) \ * Meat. */ +/* Common tests. */ QUEUE_TESTS_COMMON(tailq, TAILQ); QUEUE_TESTS_COMMON(list, LIST); QUEUE_TESTS_COMMON(stailq, STAILQ); QUEUE_TESTS_COMMON(slist, SLIST); +/* STAILQ_REVERSE(). */ +QUEUE_TESTS_CHECK_REVERSED(stailq, STAILQ); +ATF_TC(stailq_reverse); +ATF_TC_HEAD(stailq_reverse, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test STAILQ_REVERSE"); +} +ATF_TC_BODY(stailq_reverse, tc) +{ + const u_int size = 100; + struct stailq_ids *const stailq = stailq_create(size, 0); + struct stailq_ids *const empty_stailq = stailq_create(0, 0); + const struct stailq_id_elem *last; + + stailq_check(stailq, size, 0); + STAILQ_REVERSE(stailq, stailq_id_elem, ie_entry); + stailq_check_reversed(stailq, size, 0); + last = STAILQ_LAST(stailq, stailq_id_elem, ie_entry); + ATF_REQUIRE_MSG(last->ie_id == 0, + "Last element of stailq %p has id %u, expected 0", + stailq, last->ie_id); + stailq_destroy(stailq); + + STAILQ_REVERSE(empty_stailq, stailq_id_elem, ie_entry); + stailq_check(empty_stailq, 0, 0); + stailq_destroy(empty_stailq); +} + /* * Main. */ @@ -230,6 +287,7 @@ ATF_TP_ADD_TCS(tp) QUEUE_TESTS_REGISTRATION(tp, list); QUEUE_TESTS_REGISTRATION(tp, stailq); QUEUE_TESTS_REGISTRATION(tp, slist); + ATF_TP_ADD_TC(tp, stailq_reverse); return (atf_no_error()); } From nobody Wed May 7 12:36: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 4ZsvrL2K72z5wF0V; Wed, 07 May 2025 12:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsvrL0fC8z3qCs; Wed, 07 May 2025 12:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746621362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KDgmvRrAf9ZEVhf8GWKk1QhUesH5HLAA4PEgyigwB48=; b=Pk/44kEfGPc7nPJW2AAwWuVSujVpT3hdSluVVkPVQMGUn6cGlpoyL6N6Cv9HXi6Z7kKaYI D4P6+eWUjsYIZzoJLIT2Ob9RciTYVEV3XFIDnkwz2FYhHOKMruw+VFOhVQgT19u/pW+YVG 9TftWlSDDr0QKp6Uu6ByH5it6Vv4EqhJqKP/hJdw25cWK/szuKmztplON/lXO0x5WM32Fm cuvUzeES3OmP1LuNLk4W2L2kgytFw62Ov8Ix2ZfYkhAooMHir21PA6Ze1uA6aYhTfSt2gD X5283oujOyAiNtgBLluoo49fRuyQ2HjzeZlWz1sD8CLg4Qo1PMy5RbO2kCrTmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746621362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KDgmvRrAf9ZEVhf8GWKk1QhUesH5HLAA4PEgyigwB48=; b=RSEoc3fj6L6BlvvbuWg1bZYHjgXbjvmqg6w80qjBB4kZzba0auhOk5YbPaZLaQ7colSvao DLtVQT0fRJ9P7RQsokzc8M000WmtDKGFNYtT6K+4qamwNCiPPwbtRbsLCYhtw96RFRIojj 2teiRyXZyUlbFD9ofb1EjcQeGb0KxQNEINEU6+7EKqOsGg3TcmbgZnqXrQPi1EL3wwT/HJ CZu8+agNRncikUqDyTDa1qKe3ilppvQlt41JqPnLNvgNNEqFnyA8qe57kgyYLgRZtb7b6e T7OO3mXNy03KlCgnbNyMLakqjFWZzmYLgqenDTj8gn7d0RxyIMvCTPIEBXLPqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746621362; a=rsa-sha256; cv=none; b=go5auS+YybzNVCWyBrWXWSQAHDetdoFZOfb67azG2kQ4nifM8d1qqX9IVXeqN6Oe///TPn Qn/SmeQVLraaUl1lQlCf7sKG3aZxhHJzg5Qj2MPYWr1tmaxjwM9rCAlG5jmgBDR8WxP8iI v2/bknQJbwTYpUVhMsRJ4qSbpJHNlpvMnjN9G3JcosgvCjec8/n973ZtdJOgxy4dTlVlN3 eZxOFlUGZdS5Axrfni78lr9oiMXy4UVDdE7QoO8cK7xlKU1LQlQxFoonz/ZipQ0hj4eYS7 9t4iXj0z9b5SUX37fQ2Pk1ohlrtNoCCRHtgHq3i/2h5ne3KLRqrwQXZM/7bZ8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsvrL0227zTXx; Wed, 07 May 2025 12:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Ca10p073611; Wed, 7 May 2025 12:36:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Ca10G073608; Wed, 7 May 2025 12:36:01 GMT (envelope-from git) Date: Wed, 7 May 2025 12:36:01 GMT Message-Id: <202505071236.547Ca10G073608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: c071616b06aa - main - queue(3): Install *_SPLIT_AFTER() links to the main 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c071616b06aa0f51ac4314f989c472d0268c2ddb Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c071616b06aa0f51ac4314f989c472d0268c2ddb commit c071616b06aa0f51ac4314f989c472d0268c2ddb Author: Olivier Certner AuthorDate: 2025-05-05 10:04:12 +0000 Commit: Olivier Certner CommitDate: 2025-05-07 12:34:44 +0000 queue(3): Install *_SPLIT_AFTER() links to the main manual page Completes commit "queue(3): New *_SPLIT_AFTER(), *_ASSERT_EMPTY(), *_ASSERT_NONEMPTY()" (c02880233949b01f). MFC after: 1 day Sponsored by: The FreeBSD Foundation --- share/man/man3/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 7322954b45ca..a1a5febb2bf8 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -216,6 +216,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 LIST_PREV.3 \ queue.3 LIST_REMOVE.3 \ queue.3 LIST_REPLACE.3 \ + queue.3 LIST_SPLIT_AFTER.3 \ queue.3 LIST_SWAP.3 \ queue.3 SLIST_CLASS_ENTRY.3 \ queue.3 SLIST_CLASS_HEAD.3 \ @@ -236,6 +237,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 SLIST_REMOVE_AFTER.3 \ queue.3 SLIST_REMOVE_HEAD.3 \ queue.3 SLIST_REMOVE_PREVPTR.3 \ + queue.3 SLIST_SPLIT_AFTER.3 \ queue.3 SLIST_SWAP.3 \ queue.3 STAILQ_CLASS_ENTRY.3 \ queue.3 STAILQ_CLASS_HEAD.3 \ @@ -259,6 +261,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ queue.3 STAILQ_REVERSE.3 \ + queue.3 STAILQ_SPLIT_AFTER.3 \ queue.3 STAILQ_SWAP.3 \ queue.3 TAILQ_CLASS_ENTRY.3 \ queue.3 TAILQ_CLASS_HEAD.3 \ @@ -286,6 +289,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 TAILQ_PREV.3 \ queue.3 TAILQ_REMOVE.3 \ queue.3 TAILQ_REPLACE.3 \ + queue.3 TAILQ_SPLIT_AFTER.3 \ queue.3 TAILQ_SWAP.3 MLINKS+= stats.3 stats_tpl_alloc.3 \ stats.3 stats_tpl_fetch_allocid.3 \ From nobody Wed May 7 13:47: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 4ZsxQX2Xjtz5wJZw; Wed, 07 May 2025 13:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsxQX1nwmz4NYv; Wed, 07 May 2025 13:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746625636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Ch/yMthlrwAcFKJH7DyUdcT1kaC4cc9h0upCc3WzHQ=; b=KZlnYsxTC7QYzFvnb82Wr3vJc1PS9yvVoerOlxQUdZArdQ7yfwxbM5X/fviGGTFNHubR0W ByvtMpHM/jEynNiBzMTCXq9s9aVBo7fParnW/7vhbhoo7vEYtUl09r7v9EElLo/YwVI0Bn i7TOwjZww2UeLtMoQlq+RVR25Vn71UcRdLAasDPkV1UkCKZKSBC0zRVCigwe1zWn+3QJjV k1hZi7ZcheB7Ekg26YodKO3ZaqoNXlqed6/HEp/qTwRQbeAXCuEJCHzTmr8/MzrQA9W/83 ZB3fsEKnpLR6rv6IMJbuvu1i09b+3oL0/JMWt9POzYKOHyi8ZzpI/QZ/4jO56g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746625636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Ch/yMthlrwAcFKJH7DyUdcT1kaC4cc9h0upCc3WzHQ=; b=eaNlOhlGZXXiMot5cnDZYk+bA8IXGNgfMa0FeGZlPmd6RkV/z2lpkymUG7RsB5WF+Jga2V l61MW+PO03PMW+5bxYCtiDKmMxld7yrBalOnb6ckeXG7kfv1KxV1fxphiYGha+caT7EZ+t 8Lpj3eE6MLttdyJ+9WbZpUt43Obw8Wp3tv0ZVKB3ATQAp0ICZkbabNhVQLBDnbkOcVQtun KnM6CLvUNKYW0JHyapAHz3ZcUI/Widq/zUf2j1+UnaS2bnQc7PepHqQ1sqS1ALQ27hQwQV kFSFFnUkUdoF81ecglw25Jyz2qKzFeAtgTL9+xn9NR7hEjoh+M9rDliFy42izQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746625636; a=rsa-sha256; cv=none; b=tqwbE6CoRbRPIR3pq3oL3NzPwHJT/NBwkUjOCLxxwyudseDWbenYk6B73IoQR2VgBnWzAn 0iQm5E2UEu/N/vSEoqstGHc6VuoWNWTNGm7e9iJxpnLKy4KnhmxCbYHVr1XP6TPurRGFvF MMyg+aOzXtVkdju1JFGiW77BFxK+F0Yh1SRCG17R09kpYFd63GcXPygeXIKOhpolJS+U3P 5mpqPYi9RFC/AKRN9H2DXvQEp8GH1ipGKfm47EXmBmh53fvgDi/LY7EFLlO9gW10dCzPlG r7QRvr0V4FKCWDAsOS9/d/sxaP885dNjxmjpJ0Uo+Q2QphcVodqmfa6YtyK10g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsxQX14QfzXGV; Wed, 07 May 2025 13:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547DlFYl007905; Wed, 7 May 2025 13:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547DlFEw007902; Wed, 7 May 2025 13:47:15 GMT (envelope-from git) Date: Wed, 7 May 2025 13:47:15 GMT Message-Id: <202505071347.547DlFEw007902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 38a5520692d8 - main - devd.8: Document monitoring devd.pipe via cat List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 38a5520692d8202087ae04d1e1ba3dae42b994fa Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=38a5520692d8202087ae04d1e1ba3dae42b994fa commit 38a5520692d8202087ae04d1e1ba3dae42b994fa Author: John Baldwin AuthorDate: 2025-05-07 13:45:55 +0000 Commit: John Baldwin CommitDate: 2025-05-07 13:46:52 +0000 devd.8: Document monitoring devd.pipe via cat Reviewed by: ziaee, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D50175 --- sbin/devd/devd.8 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sbin/devd/devd.8 b/sbin/devd/devd.8 index f7e19df438ed..f4e8e173399c 100644 --- a/sbin/devd/devd.8 +++ b/sbin/devd/devd.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 19, 2021 +.Dd May 7, 2025 .Dt DEVD 8 .Os .Sh NAME @@ -154,6 +154,12 @@ to communicate with its clients. .It Pa /var/run/devd.pipe A deprecated socket retained for use with old clients. .El +.Sh EXAMPLES +Use +.Xr cat 1 +to monitor kernel events: +.Pp +.Dl cat /var/run/devd.seqpacket.pipe .Sh SEE ALSO .Xr devctl 4 , .Xr devd.conf 5 From nobody Wed May 7 13:47: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 4ZsxQY6DzKz5wJDb; Wed, 07 May 2025 13:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsxQY1lpPz4Nhs; Wed, 07 May 2025 13:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746625637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt3vagZnmm1G1CZroxHcqR5AicqJoDGsHmfvRnw90ik=; b=mNAqEDQL7MTP2dR4kp9i+4BkKUVsCWoxxsqZo9ex18dx2EPgYeCHx0j0W3XriHPFcjqJYy IciqBeReNzizU/tcASugxTFRquyhsok4AE34/DUnmkXQTACsEb9pFwGzhD7iUP208L9FUc woOu9RjMf2Rvf0433r1tHd1rq+8cw6+6teJ3jubdTvb4KdLkPSAQ5zQ1PG2aJlPBPm4N72 LhIrkifWv8I9eyX45ZBp4K5mUKm+pFE6cDQXsm8qI1HcKsf0+hHF3/bsv6nE7yku4UVIQ8 3WDwTtI6HHOYMN6FqmT4sFmMEexpulJ7LN4VCGQ8LAMMLBlh5N2HlbVnD7Rfug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746625637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tt3vagZnmm1G1CZroxHcqR5AicqJoDGsHmfvRnw90ik=; b=ebjnDS72XJGUDaWawtnWTU3jnW3nSEF+hzCEjoSpINMOiVYtg+Dpus7X5+GpBoaPBOcv+0 9X/C5C4gMqwhf/dUIc0SIYtRauQPJzcOP8ZFuLgd35S9X5ULDUjsv3OcnMr3QtQDB/tzJx zGfMCwNoH6NvIbk8F/XjjEhi6zU65vide5zVVz4fkSZOUsNLS+rPAZJA6kMXQQcKSdw/Sv YotQfjabKsYdf1QoRiRPsNYXB4AxD+HOeAipE20uvF5JiV8ywbivXGXjTB6rHRiATdlQ64 PIlRTIaS68CLd91TCxiL+EFgB0w2qe8T9UlY7EENFqf9NZI2onloHeqyiNdT1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746625637; a=rsa-sha256; cv=none; b=enEbSqEZMNPrQDqS0HlFkDjs7Jtg9QDKfuKmId+JDgHhFfwzTzRYsc75CL3cvgoOIjZ42N Jxif2CFM6XmFfcw2rqtfjdCJerSsFiTS1TmcfVObk26CiWlHPEq5SHjJVp9JZLeXSjKUdp cRc5DnXABae2xX7Gd9yhoymHsWaaJvPOiHGnOUZBpJkHlDilzKfbUujiLHNsM7XFxpYJpn IVyQKGO1mhospNlz5RzoIoQvL8HBbzcQu1D3Y1X9DA8c2Fihexf86xTo1BVsPvLBN0HTVV mzUVlWN0+wlzLw4wTyABpoGYTsB+DDqt8UTV2VTe5+UKrlv+lf5LjBctA0bA4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZsxQY1LJXzXGW; Wed, 07 May 2025 13:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547DlHEO007937; Wed, 7 May 2025 13:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547DlH19007934; Wed, 7 May 2025 13:47:17 GMT (envelope-from git) Date: Wed, 7 May 2025 13:47:17 GMT Message-Id: <202505071347.547DlH19007934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f22326c73eeb - main - nvmf.4: Remove obsolete 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f22326c73eebff9e61f6498c148038119f65dc3d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f22326c73eebff9e61f6498c148038119f65dc3d commit f22326c73eebff9e61f6498c148038119f65dc3d Author: John Baldwin AuthorDate: 2025-05-07 13:46:35 +0000 Commit: John Baldwin CommitDate: 2025-05-07 13:47:02 +0000 nvmf.4: Remove obsolete bug Commit 3ff90d91b433c1eafe857ba21470db5e5052b3b6 added support for multiple I/O queues to nvmf(4). Sponsored by: Chelsio Communications --- share/man/man4/nvmf.4 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/share/man/man4/nvmf.4 b/share/man/man4/nvmf.4 index 298365acefa9..9ace67783351 100644 --- a/share/man/man4/nvmf.4 +++ b/share/man/man4/nvmf.4 @@ -3,7 +3,7 @@ .\" .\" Copyright (c) 2024 Chelsio Communications, Inc. .\" -.Dd June 5, 2024 +.Dd May 7, 2025 .Dt NVMF 4 .Os .Sh NAME @@ -104,6 +104,3 @@ The driver was developed by .An John Baldwin Aq Mt jhb@FreeBSD.org under sponsorship from Chelsio Communications, Inc. -.Sh BUGS -.Nm -only supports a single I/O queue pair per association. From nobody Wed May 7 14:45: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 4Zsyk12RDZz5wMYX; Wed, 07 May 2025 14:45: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zsyk11zqLz3Zl3; Wed, 07 May 2025 14:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746629145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiXapNH8f3JrlfLqyDECXX0GTFG0UYsgnMgm5f6llnM=; b=Pt8GTzZyZBshB0qdIZJpuyFU8rmZ6/uF93dd2wRfAnxM8nYqyDE6SeB6mARfBvEUOHvbE8 Rf+sVBI+xVk9i2ZIci9Z3ln3nJqCVskEtB+fJBtW6RBjVi74bmVXJ6CJsi8+XjGtMrZYia JgJaSE/X0t4YMvEwTYSDcti5I+7m1AHzCZ/vIoYMML62LCWj5abPb5iQYtmnQfk7YABryZ EOXBAhaohTyMMAPPRaxK4udNWIJF7KDInfOV8+joCySRLiLltevXmymm5TknsxgeJ6SdGR 33g24WMpTBRG5PJ1MXgSXHlZhbhdLem+LMhJCek7QKnXNSqrxohobWYKj49KGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746629145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiXapNH8f3JrlfLqyDECXX0GTFG0UYsgnMgm5f6llnM=; b=BjIsKrvBjGg3yGLK7Ubxl1SaqGSGWiUKi02nBweL4CvoAIZ2HqNngZ71gREE/kMp5GuSl8 pXpcHLs58PMx6rn/x4VVP1NuMRlt/SGsYoQmD7+kSWGSC+huUmN6QQ4y8460WADl62tL81 qrGcEbQA28fGYbdjOJgZZTcrmGrrxmDRJ5d/X6TViSsF3PBuSRnTwuFs5MGJK2Mi/DPbrB CwPX4wguY5UWwXhKM11gLaLUu5x09Bg4jUxvvUszX4orbMkLGkEYkKfZEUNtaNiLSvQ+Vf gWNIr+kypi/Pz3QclaChuSNHBMRnN4NYB4Kb+3WOtmXqnnxFb/9FZctkAHXFAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746629145; a=rsa-sha256; cv=none; b=euGZn/IQF2g9lHgfnnjlrhyWhruTDPohIow8RaA6qOSxZbQ2hPRjwFdIafRnVFuon/Q1Ic CTtUtjk5/aaXdV2VuXTig6e1hAAaPCM43W5fSpmQ5mi7jWXMb4T5boKFJOrXIPNVD1Z3P1 AMIaivS63pBXQ0mCte2m7wqF1ZUoyxwNI+H9eCJPgDTR6jsSZt//St2RSp6grRosZwrdlL f6dIaHqKWXuE93jDmuENzi8rvcY/4NyBVdsklHYcQsN31JRYF1wxnbbC/PfKF7b6mR5kWy UYj/XPBMDqS47ZlbN5np2oL0GHtZiGJ/G8kMZyU+mUyWqJfPMRlYvy7NRU/v7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zsyk11b83zYrC; Wed, 07 May 2025 14:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Ejjjv020781; Wed, 7 May 2025 14:45:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547EjjC2020778; Wed, 7 May 2025 14:45:45 GMT (envelope-from git) Date: Wed, 7 May 2025 14:45:45 GMT Message-Id: <202505071445.547EjjC2020778@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a130a604a4fb - main - rc.conf.5: document precious_machine List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a130a604a4fb0e9a6d767c7c3f0422396d61b2b1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a130a604a4fb0e9a6d767c7c3f0422396d61b2b1 commit a130a604a4fb0e9a6d767c7c3f0422396d61b2b1 Author: Konstantin Belousov AuthorDate: 2025-05-06 17:39:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-07 14:44:59 +0000 rc.conf.5: document precious_machine Reviewed by: bapt Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50215 --- share/man/man5/rc.conf.5 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 9681542bff41..7dbea16d51f9 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -4956,6 +4956,16 @@ daemon. .Dq Li YES , these are the flags to pass to the .Xr sendmail 8 +.It Va precious_machine +If set to +.Dq Li YES , +some destructive actions require removal of the action-specific safe-belts +before being allowed. +For instance, the file +.Pa /var/run/noshutdown +is created to prevent +.Xr shutdown 8 +targeted at the wrong machine. .El .Sh SERVICE JAILS The service jails part of the rc system automatically puts a service From nobody Wed May 7 15:36: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 4Zszrb4g5Lz5wQ6X; Wed, 07 May 2025 15:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zszrb3KXxz3tLY; Wed, 07 May 2025 15:36:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746632191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KXG3iIrXNNu4hN+MDAMl6wYn9mijtNFyrvciLBHHf0M=; b=EujrGtkI2jQfHYmj3//L/W97XKy2MiiRR/mc1PpBKCQxh9ta2EPQu+T2T7PUqLsrm9uE0/ EdPnX0Doq/odOLwX0HsClndd+Gp39SdA5QcvYyc1zLY9nrVM4DMiKCDzbqj/GyrulEqi+d /4qNblhLC0ZWLFALLrIHCQSU9ivJZdhWIZc3CzTOridXG2WcbmZ2k6vAxKbYsJ+loXIDen ppSKiDvJRIyf2CqoZXT9IWr7I6GS+C9MYgzYetxDd0vZBtmlOYPFs405xqFrHwSJz4t1nX 8u8JCzGh2vt6Wl1y91z31WlT28qe8YBIBGvnXkvqNFkrVzLEmfKRzCVaOC0PZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746632191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KXG3iIrXNNu4hN+MDAMl6wYn9mijtNFyrvciLBHHf0M=; b=s8xHqyiBREDlLPMCR5KEE0+dG1nCCopfTjjl8OpyVeDgE2kvrCP2/iDcUjg9g9pN1ztvNk lU6Ef8LNvY1HjlyIQKG5yh7w96YOeJ2lwtgSPsxSfX2+kWWA6cO4ZL70/0YOXILbWSa/Co TAgNC+GBqnU9EVYXGLlNif9CRkwYqBfEzzhK0Mvz2/SknBzSZzgOQCYxyD3QpY7yT5wC7F briJUfgJqj1SiR7/JLzd3TSNHMaG5TC9w2scWQZOB7lhL7A2pEYJTR6z2iSHYb2bYUbb/E dlUCg5UZJCM2JIip/6zXta/DQ75jxxmH71OOuVX7hyc37q4kvDQjvvTC1G7fUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746632191; a=rsa-sha256; cv=none; b=aeYy89bMlbmP+kZEv6/67J8XaOSgHFuDJfKRlRTnZQNnZccqbPrbKtJ/JjCjNFAM+vICKX lqpza7Y17BQEykqaw1EcPKpjUAgqQ1Kr6CTdpuK4GYipqHNRHn23vaa4/WmO8Kx9Vpb9Pq 3v+IWvWjgg0TdAS8cHClJ4K5p9OzrbSAMGQhLHbNgVbL9uSRioV+ijipJlHjOhF/Moe5YX nAi9oaWA1ByFGOApEkuHzx935H4EzNHu/GRnc/kaGCgGrnYpovqM9eb7jB9/Y8LTahrGOz wWnOaav+K35elY99MsM4ptCUftwOsDyky4cJ2ATw+Hpz0zF9dLIvC7eBLyeyVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zszrb2jk5zbPl; Wed, 07 May 2025 15:36:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547FaVVo015262; Wed, 7 May 2025 15:36:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547FaVFe015259; Wed, 7 May 2025 15:36:31 GMT (envelope-from git) Date: Wed, 7 May 2025 15:36:31 GMT Message-Id: <202505071536.547FaVFe015259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 1df3097d5525 - main - unix/stream: fix wakeup race between pr_poll and pr_soreceive List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 1df3097d5525509020fa0ced391377554aad2918 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1df3097d5525509020fa0ced391377554aad2918 commit 1df3097d5525509020fa0ced391377554aad2918 Author: Gleb Smirnoff AuthorDate: 2025-05-07 15:32:26 +0000 Commit: Gleb Smirnoff CommitDate: 2025-05-07 15:36:04 +0000 unix/stream: fix wakeup race between pr_poll and pr_soreceive Both selrecord(9) and UXST_PEER_SEL marking should happen under the receive buffer lock. Otherwise, there is a race window, when a reading thread would issue wakeup(9) before a polling thread have entered sleep(9). Reported by: cy Fixes: d15792780760ef94647af9b377b5f0a80e1826bc --- sys/kern/uipc_usrreq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 1722a43a800e..0836652b6a24 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1681,11 +1681,12 @@ uipc_sopoll_stream_or_seqpacket(struct socket *so, int events, (POLLOUT | POLLWRNORM); if (sb->sb_state & SBS_CANTRCVMORE) revents |= POLLHUP; - if (!(revents & (POLLOUT | POLLWRNORM))) + if (!(revents & (POLLOUT | POLLWRNORM))) { so2->so_rcv.uxst_flags |= UXST_PEER_SEL; + selrecord(td, &so->so_wrsel); + } SOCK_RECVBUF_UNLOCK(so2); - } - if (!(revents & (POLLOUT | POLLWRNORM))) + } else selrecord(td, &so->so_wrsel); } } From nobody Wed May 7 16:38: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 4Zt1DL0C3mz5wSnD; Wed, 07 May 2025 16:38:42 +0000 (UTC) (envelope-from olce@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt1DK6cyqz3L88; Wed, 07 May 2025 16:38:41 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746635921; 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=Mhn3EP9dq/afKUhAVpuGb6qK92qy21cecY6ltPL9RSI=; b=G6tav+urRUrlWtCrz8gE0n1sIIEJl3Jjr683QBA1yrbijVyu7VrPt3rs4N2g1M2hzkryF7 cMOskcDfLAUqbeiKMU0uwSbrCYfVjksDO321istxFyo7p0QaIC76GJZgv2/3hPMpqNJziE JVw2i0XqxbGSFqygjN0ozWSXBoWzoS9zJ8glrh0zNQearD9GtVdOKUclimIFQgzq6HgsAR T7vn9ZDTT+C3SaGVdXbi9KzYh6eJ0K4/ZTWvq+N4/JQeZX+DxJkq3lMlryiKRQXfQVsxKh EqUjZ3tF6/vqBFkOWw8NnpSJW6McexRiMqfWqnACQPH6U2cDv0zunCaUTMYu3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746635921; 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=Mhn3EP9dq/afKUhAVpuGb6qK92qy21cecY6ltPL9RSI=; b=xCH058wFFRJJ/fdX2BO4anAnWW3of/7oVd0BMc7bNiMWe/rJocWb08Ndu2pNHpUh/NDMNP LniqdyBHp2gRTBFySb015UFIuy1qZ/C60c3QUUdknbGJ3bbsk/7Lhyb9HIy0vexWAXoXyj UMQ8YWYg4WqKWvYqD3HqGUadSQy7Ts9eLlHrAqM156YcnA8h+JKUJ5252fezdnUAmoa0Rq DAg4FMc+oEgOx2lbv6gIoyVvYcR+J0ryOmPnJ3jbG3YDHYlaBdSX53sn6kDvlYa7r+JAtw hxvl0sw+WN3Grh8fOFirWPtiQIBgaqN3GyNNEzgKRc/Yp7hb9RhyBdXU8amtQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746635921; a=rsa-sha256; cv=none; b=Jqs9L6/z5Xlzx8RMDIorR8IiQk5bbKnBMnI3ddKCGh3jWxQRl5jiu+uFC3Ew0wvbHJBjx/ 5y0VcYQEdVKTXnXGX47+r/fBQUCj0wn5n5EBknm0jJInQ1BYUPMgH/6nlSI3ifCZc/5Gf8 F4lrJamuzU0nDjOzb1NouoVzBpIHwdKnZSw2Vsl+PM5MWo9ktsbMjLHA7sRbl6f8RWaOvx l5FpmdNz8XfXcRrz/uuJAKrCClKj4unhRnxTkBX/KvUWt1Wqn4S32J5rrZP9DavvOgEs4f ipuoE6NsXrZw8riOZAlFgqgkO+S7g9gshF6KDov/hnTWh5PzkJ4y7eTh/cEAQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.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: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Zt1DK2Rb4z9jK; Wed, 07 May 2025 16:38:41 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Xin LI Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 83507f9e6fed - main - newsyslog(8): Disable compression by default in newsyslog.conf. Date: Wed, 07 May 2025 18:38:35 +0200 Message-ID: <5049201.M427ezpTYi@ravel> In-Reply-To: <202505040750.5447oQWq012045@gitrepo.freebsd.org> References: <202505040750.5447oQWq012045@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5743926.vRHrNHmk2K"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart5743926.vRHrNHmk2K Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: Xin LI Date: Wed, 07 May 2025 18:38:35 +0200 Message-ID: <5049201.M427ezpTYi@ravel> In-Reply-To: <202505040750.5447oQWq012045@gitrepo.freebsd.org> References: <202505040750.5447oQWq012045@gitrepo.freebsd.org> MIME-Version: 1.0 Hi Xin and all, > (snip) > Historically, newsyslog compressed rotated log files to save disk spa= ce. > This was helpful when storage was limited. However, with modern files > systems like ZFS providing built-in compression and with larger disks > now common, the benefits of additional log compression have diminishe= d, > especially given the inconvenience of needing to decompress logs when > searching for specific patterns. > (snip) I remember having rebuked these arguments and most of the other ones presen= ted in a discussion started by commit 2f036705f337 ("Document the two recen= t newsyslog(8) change (-c option and configuration option).") mo= re than a year ago. The main point of contention was turning the compressi= on off by default. Re-reading what I wrote, I still find it as spot on as = it seemed at that time. In a nutshell, I developed ample arguments showing= why the benefits of compression for logs far outweigh the drawbacks. In f= act, I could only find one drawback in a very niche scenario where log file= s would stay big (i.e., they are not rotated enough/based on size). All ot= her "drawbacks" reported by you and those wanting the change were very weak= at best, and even sometimes based on plain wrong assumptions (to stay poli= te). In a subsequent private message, I was told there would be some followup to= my last mail wrapping up the discussion (dated 2024/01/10), but unfortunat= ely it never came. Today, browsing D43169, D43466 or even related D42961, = I can see that there are exactly zero new arguments for the need to disable= compression *by default*. In absence of more elements, I thus stand by the same conclusion as one yea= r ago: The sensible default is to enable compression (for files marked as c= ompressible), and for POLA it is probably to stay with 'legacy', so that co= mpression letters actually mandate the desired compression format. This is= what seems to benefit most uses and users by far. In other words, this commit should just be reverted. Surely some people will find that this is a minor change, that we should no= t make a fuss about it and just change our configuration file at next updat= e if we disagree. That would just be missing the point. We are developing= and shipping to users a highly configurable complex system, with lots of m= oving parts, automatic tuning mechanisms, configuration files, and admin-tu= nable parameters that more often then not are piling up over time. Expecti= ng that most of our users will have/take the time to review and tweak even = a fraction of them and correctly for their use case seems a delusion to me.= They will just keep running with with essentially the automatically tuned= and default values with some exceptions. Consequently, we should strive t= o have sensible defaults, even on minor stuff, as otherwise we keep adding = burden on administrators with all the bad choices/changes we made they have= to correct (if at all possible), not even speaking about more casual users= who at some point will choose to just give up and choose another system. I would like to encourage a realization in this matter (or a rebuttal if yo= u do not agree). I would also like that, at the very least, people have some consideration w= hen some others spend non-trivial amounts of time reviewing their work and = endorsing the sometimes not-fun role of seriously challenging them for (wha= t they think is) the greater good, e.g., by responding to well-argued criti= cism. =46or this precise case, I've read all the above-mentioned material (revisi= ons, commits) and exchanged mails on src-committers@, and sent all my point= s to the latter (in January 2024). I certainly don't intend to participate= in a rehash of what has already been said in these venues, that would just= be a waste of time, thank you. But if there are new elements in favor of = this change, or if some of my understanding or arguments were wrong, I'd be= glad to hear about that.=20 Thanks and regards. =2D-=20 Olivier Certner --nextPart5743926.vRHrNHmk2K Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmgbjIsACgkQjKEwQJce Jiew1g//Yu9JPCdu8HwheixHLhrhlVLcijXwWmPwyAobQREdLX+WpliUzZ7Axytu kxsByo2TrueOzw/wrhZqeUKTQm5N5ebJEprDqExhYwtMtspF2bCbtZJVxedemBHt sMMR3/TKxNujj9ivwvbgpGj21NM2SYDiCbOgmu0Qe4SAWW0hg+Hl+5fV6tq4QqM/ PQiDZ5x4BKWLvM58oDkumtpKkHpsjgyWmMWTuhrXAVzc7fjQG7Wi36ymq+fMp2PS uZKDrHFQtjXN+2E6eqzZsNvQBEdTvLJbCHd4XzSMV13r18UuiwzBtMZd0RQsxZKf BvSGa474bKenabVwyXML8dENJLrARhLRVFW9oz6Gc5drHasVW9ktFRKLk02Cvgd2 3gXeFHojFJrNO/gqKD6/7kSEgFl0jA4LEfFca9np93PAuUaddnSV+nJaY8z9MIru r7kBYzJoRnjlcDejSlP2llLKzTshnZL331ed6jYCL9KkLUjeYJP6BiPadvlDk+Ky Ag2k9E6m2aVuf+AHk9pzP6xCKG3vESq/NKpCnUerCbSMRSPb3r/H8g4u+DRxImkM ExKr1nEaaUoicGRL0NriW+IJamydVF2Tgp/2f8DU7LX/soLZRZRWHgREbwvLQR4B sVzcV7dyqqTXDM5aVdmV73vdO4OlwaTejJ/TJJcF1SDd3S54pho= =tqv5 -----END PGP SIGNATURE----- --nextPart5743926.vRHrNHmk2K-- From nobody Wed May 7 17:21: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 4Zt29t16YXz5wWMk; Wed, 07 May 2025 17:21:38 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2001:41d0:700:4a43:a25:de0:0:13]) (using TLSv1.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 4Zt29s2psgz3jrF; Wed, 07 May 2025 17:21:37 +0000 (UTC) (envelope-from freebsd@omnilan.de) Authentication-Results: mx1.freebsd.org; none Received: from mh0.gentlemail.de (mh0.gentlemail.de [135.125.173.218]) by mx0.gentlemail.de (8.18.1/8.18.1) with ESMTP id 547HLTmf037558; Wed, 7 May 2025 17:21:29 GMT (envelope-from freebsd@omnilan.de) Received: from [172.21.3.1] (s1.omnilan.de [217.91.127.234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 77D6B20762; Wed, 07 May 2025 17:21:29 +0000 (UTC) Message-ID: <5aa77132-ad02-4cc2-a622-5c4e035316fd@omnilan.de> Date: Wed, 7 May 2025 19:21:29 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: 83507f9e6fed - main - newsyslog(8): Disable compression by default in newsyslog.conf. To: Olivier Certner , Xin LI Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202505040750.5447oQWq012045@gitrepo.freebsd.org> <5049201.M427ezpTYi@ravel> Content-Language: en-US, de-DE From: Harry Schmalzbauer Autocrypt: addr=h.schmalzbauer@omnilan.de; keydata= xsDNBGYAIiYBDAC60wPttMw9ESCW1NCayghEHYqdBb0tTQpwzPEidSAEwLYUceWznTKOoBub vqRT4MjkFhVitEVSsx0c9isq75w5PuKr8XHwxvne1nDAuRQZxDWlhimTkPago7zC+X4dKUBb 8+3gWV8WCyno8nsdlf3VvO/GeagX4l4SR9msiQM3XZIDfoqIXMeMF8Z85COdtcQf6JxGHmm3 //X0Z4FbhvUMEXWHOVFigyUippvQa95T3k5fUoZAdhcve+4p/XasIdexpPHCKGWXm/dpGzpm edMN0hUlBSgtjdRfgfDsQGwaPmSYsRBMOoHat7DuEhvFMSY3qE7KU7kEvrUwU420b6iuOROp JNFbIMAqozwEd0IqM4dGQqoxRyDMP/yh10Juy/E/fNTYS8OIbR7JXStXhlBf+B2qTAE0JkDD nhwiHmaMweV6BVhvCfK8nT2pmyKfBSfSMD3gUzLQaq4WQinEz5WSQSWBdYPWYsquVNr+DwpT NmOcYRD7CSKmvojMC1ThqxEAEQEAAc0vSGFyYWxkIFNjaG1hbHpiYXVlciA8aC5zY2htYWx6 YmF1ZXJAb21uaWxhbi5kZT7CwQ0EEwEIADcWIQTjKgWHwF1RpC5MiPNOp16HIeNrLQUCZgAi JgUJBaOagAIbAwQLCQgHBRUICQoLBRYCAwEAAAoJEE6nXoch42st1+EMALbSpQeb11yc95u8 5sbK03jFey4hBf1EZpRpDEFhxLk1uVzr2plrpf4OZw571p6BI5K2GnoMSlzQF1RNUmVqz0zk iJgJmc338oO0+u5xKuf39O8e2JsOuIalOgUEOg5BBqZvVZHivDxjLQ1genVTHZgr2LQE327Z iNvRiQ04JMhlbxGKqpp0YcXLhQ5wwxvjq7+057KB9G4opycpKlRzWkykEKhbVOm5hd7HxTZh +G7QNsEdk0Tkjpt8MKvEZut036Xeo2AlJnoVySJcsGJgDeKngRxbuxwoZ9y6almAvcAXMht3 WRtgk8HWv0KeX9kqvMcZ8nZcoK+TQnXHjKNfVq7pvggmju6d6sFetteGGwpMrKnpXeDZ79GW bjUHFSQNJtJO04KaLrpj4aW+bcACoscUhRjkUVpMXvaSY6i4RVx4Ji9o8CZIEoPD63ii60/4 HDo2H+kLXI3mVOfVhjmfBOmF7nLDt69ZBiXtGKZTV2G0fKLV4ygAV8Zgci2y26q5yc7AzQRm ACInAQwA7JCRsBaHiTGAZ2WxyG3QKOaZuStQ9RIL4m+l3bfIdS6sXJ3skdE7u5r36PKrU2gX QdMmC6c1oN43RpwVZour2xF1Z6HekDkGeN5c8XjKjCbBejVnn6BwHEzvxs+zimIx80uW2iEo cCzB0zA7ItetFTheyZcIYSfu7ZJb48HNFV+43VPDsr/jUY0BbQFGacioEE6UB+nwZSqDVmrw rI574qffBK9Fj9MNO80wiMTK4qS5nviaDU/OKxfs1t5UyoYW3ZxTXLP4xORiJFLBbjovVKhM +5JrUS5TK0tL0N6j2YcMWtJqL8OvuCuczZsUOezFI5Z3RTkQDcGydquj+JlR5pVV94P02M19 KYDLs5ZA4m69aOFTTjl2JvWOPJ037aWNpLFcBJ0h1LBkUel4Z7HSa6WJ+c6iUtD0lVMfxJlT cGBRXzq/0SMn6QVNC1qrBMTN1bVDkrIkCYmTqohMvCW0SUg5K4R8RDG1ruGSqj5LXwAeSZ43 Zns6UhJ80Im1QxhTABEBAAHCwPwEGAEIACYWIQTjKgWHwF1RpC5MiPNOp16HIeNrLQUCZgAi JwUJBaOagAIbDAAKCRBOp16HIeNrLeAQC/98l0xG48cPQ825wCADmR4juIiEqeU/KfZyR2zW GoHHb6rBJth2tU4JAv2TayHT+jYhioo6a1rhxlYfZeVKlCK+toEnJ+usnd0hJ+rwffURWdef uDwKAqvSavWVVDQ07gjlQjgTIiStn+PJ4jvH6YaLroH9aStADje730BqgWwq9BzO45V0GEoM DqF+xtTATDSPkhopcA2n05qeXLJ6/2FAsPjFfHGUr92Gw4wEWOm0wkoGRnRSxpF0ectRNmXk d0Z8JA0hY+XIzXYr9lTJo89CUdx/ppkkKC3mB8E8H7vGCaOim1nGCjTZ6hJ5lAv4Np/Xlzng kT6+wWnWa5j5VXyZykvr+y1JzIFpiDdy9TpmsJBeAbF80UBur2CuXQNxPhRHJyXAxZe2Q0A+ tQgHN6uOjW8Bp9nQdOy4y55FfUMoN9nbdeNNLq7qhTv6GmOQ2PUupocn4YOskKZJn3PXJ18S YNz7MneVch+fUKhJS+DIXkNvInWH/sZBGlBTK0A+Bp4= Organization: OmniLAN In-Reply-To: <5049201.M427ezpTYi@ravel> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Zt29s2psgz3jrF X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Spamd-Bar: ---- On 2025-05-07 18:38, Olivier Certner wrote: > Hi Xin and all, > >> (snip) >> Historically, newsyslog compressed rotated log files to save disk space. >> This was helpful when storage was limited. However, with modern files >> systems like ZFS providing built-in compression and with larger disks >> now common, the benefits of additional log compression have diminished, >> especially given the inconvenience of needing to decompress logs when >> searching for specific patterns. >> (snip) > ... > In absence of more elements, I thus stand by the same conclusion as one year ago: The sensible default is to enable compression (for files marked as compressible), and for POLA it is probably to stay with 'legacy', so that compression letters actually mandate the desired compression format. This is what seems to benefit most uses and users by far. > > In other words, this commit should just be reverted. While ZFS is one of the strong features for using FreeBSD, more than the half of my setups back /var/log on UFS/FFS. And since bzgrep(1) lives in /usr/bin (just like bzless is), the claim of extra effort to decompress for pattern searching is not correct. Thank you Oliver, for your much more constructive postings, this is just a 'me wants it reverted too'! br, -harry From nobody Wed May 7 18:21: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 4Zt3Vn28K7z5v5dr; Wed, 07 May 2025 18:21: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt3Vn12snz3MC7; Wed, 07 May 2025 18:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746642081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3rOZXmU5dJqlN1F/PmF/AkxjJE3ruEg1Rdonney3RQ=; b=sQehbDt4RQ6Xl5SGiJkq7/1AgWMJcVjOgQHHWz9XKPkkAICcGJ9H/RYAq7+CKa2LWwLMHL OePmUD8ty7/8EqozC0luC6PFDuez6Dv+16B7NwoQZNU+7bq3SB/0o8jgkWz7d5IQin9ax1 TQZXELR3hdYkonoTS/3Ea5pK9NgGw22GA3gTMFFHmVPqa4OCZVUwWe+YX4ZBjuV5F4aBrm WV0qmWHP5hHrKRu7qoJELa46ceYXOJviRRNj+JO0Zat0/2ANLSLC5Dke4gxD8kymIzufOq 4tOdhhp97+/OQGjXTJirrXTtuNSOd1ekT+aY+nJEBsMM+uw8bDRcsAqgZK1CMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746642081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3rOZXmU5dJqlN1F/PmF/AkxjJE3ruEg1Rdonney3RQ=; b=mibDv0Lky04AqF8Nw1SHWlfUXxcMqi1Z8uxo0r0Vcm4PmkZ5apev/Dgjo0jxRmp2ItPpDx gldTOXHXtu7Dd9j8dL6AL855mNtNS2SlKm5qrE2JvfU0n6W8/R5oA5C1tS2T3qeeONHYGH sgrjpXVvlNGYS4dT/curqqaCccbOwlHSaXA7gw5Srok6xWUtZprJVC+DP5Pft48emdtDVY YmeIwIbroD3oFh5FbVpO+Do5zvX4Nljk12ux7vSNCvZEFKJK3/IJtPNm+uD1z5tOmzhACc SxU6HOzPQ6bVpZMme0af8qvEaJU+IWklYV6wbraOaatIZZc/FQTa8OwhspAEaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746642081; a=rsa-sha256; cv=none; b=IM4jhNXkKdwofXYcIPJERLhXBKow+y1VkHKlhq5zYHNDjq/jmsY+0SehrS0BZKnFM6ud7L H8DA+GHmDBD2y1ox0939AZkac9Qb7dwIek8pliBQTcIJUAeRj+8HROxtxjywhLrlT0feQn lQamucJK3ld5E9rY0hQlg4BCwSwdilL1VKoMgtBZoHALg+M/F9+i/UhSCsJdJ3vDYvjC2/ L1Lj36Gqpz8tdjJha7eQPadEyUVQ2rzHO76GSW0qdKQigDDvcK9XQ920Wi8TfKKNp5AYBW tp6vBv6X2nKgnHMIaV5AV/mGpfNVYNqTAyybVZ4vFjS1pzSBW3KwwLzjKHXLeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt3Vn0dxSzh8y; Wed, 07 May 2025 18:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547ILK77026983; Wed, 7 May 2025 18:21:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547ILK00026980; Wed, 7 May 2025 18:21:20 GMT (envelope-from git) Date: Wed, 7 May 2025 18:21:20 GMT Message-Id: <202505071821.547ILK00026980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1e45fb397dce - main - release: Use unprivileged mode for disc1 and memstick List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 1e45fb397dcea779536b8b115fdc0cc598e5863f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1e45fb397dcea779536b8b115fdc0cc598e5863f commit 1e45fb397dcea779536b8b115fdc0cc598e5863f Author: Ed Maste AuthorDate: 2025-05-05 20:44:19 +0000 Commit: Ed Maste CommitDate: 2025-05-07 18:14:38 +0000 release: Use unprivileged mode for disc1 and memstick This same change was made for the bootonly and mini-memstick targets in commit cbba69fb5793. That uncovered some makefs bugs, which are now fixed. As there are no other known issues, extend this to disc1 and memstick images now. The change for the dvd image is waiting on PR 283387. Reviewed by: brooks, cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50179 --- release/Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/release/Makefile b/release/Makefile index 38590e364401..1489ec8dc881 100644 --- a/release/Makefile +++ b/release/Makefile @@ -179,18 +179,16 @@ disc1: packagesystem MK_TOOLCHAIN=no \ MK_RESCUE=no MK_DICT=no \ MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ - -DDB_FROM_SRC ) + -DDB_FROM_SRC -DNO_ROOT) # Copy distfiles mkdir -p ${.TARGET}/usr/freebsd-dist for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done -.if defined(NO_ROOT) echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done -.endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. ${PKG_INSTALL} pkg || true @@ -206,13 +204,11 @@ disc1: packagesystem echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc -.if defined(NO_ROOT) echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG -.endif touch ${.TARGET} bootonly: packagesystem @@ -304,7 +300,7 @@ bootonly-bootonly bootonly-memstick: bootonly release.iso: disc1.iso disc1.iso: disc1-disc1 - cd disc1-disc1 && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} + cd disc1-disc1 && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ../${.TARGET} ./METALOG ${XTRADIR} dvd1.iso: dvd pkg-stage cd dvd && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} @@ -314,7 +310,7 @@ bootonly.iso: bootonly-bootonly memstick: memstick.img memstick.img: disc1-memstick - cd disc1-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} + cd disc1-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh ./METALOG ../${.TARGET} mini-memstick: mini-memstick.img mini-memstick.img: bootonly-memstick From nobody Wed May 7 19:00: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 4Zt4Mt03xXz5v7ql; Wed, 07 May 2025 19:00: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4Ms6SSxz3sHn; Wed, 07 May 2025 19:00:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746644425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGFFBbNy3b99UscIJ81WPXi7Txe1T5Luog4iFqpi7EI=; b=GpZ4HFXMlDBDcscAKLeKL0eviXsBmO71ed6t3qLefAfnTyPSEnC1LHAe0b2DS3lz4p7Mgd h633P/xGBLd6jOK0MzZBC0uVn5oUNWLJGTTWvAyXt9GFWxkj0BQRBMTWNFX2f7HrZEZOUF tx7i+OGN+d4QjNFd5WI0L4gyec4/Td56Qce9ahxy3Y/ds8F63LvjaGlEEcVKXL8LPNs4YZ ju3hiyzgq27quSgT/RYFFP3NtbKwvwL4sn+DFXnHiT5RxptUt5QoaszT06aI1lHR4XXv/I I1bn4D+NNibjYrZRe8RJkwuKdb0mu+3Y2aWmOCiyVytz7ewNJ3f3GSeQ+XMzmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746644425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sGFFBbNy3b99UscIJ81WPXi7Txe1T5Luog4iFqpi7EI=; b=N4Hv/oHk3MCg/FVky+Ikey65rfQq8wYjjO+reMlKVcICm0FLsycXhGdYSuesPl74N4yPqF YURUzbA9V9h7C7I8saya7YVWk8fGwUXW/J+KP+9/OI4rHCXgZQNFtxyxRxNwbXCTdLuIMO 1i4DerEEIDFGOe8tlHfFJTbxsavUDjiQZMWlajpplxkRAc8kXcKcLlz0szdcUpi3ODQcdm LUbxzzLPzN5v+dZdixHu+7qkQe2nmNwrFeReIlqQOH5mysgm+F9vUsrj+KarwXr7Ghskue ddBAAnMKFJowb5d7hefDqn2/i6iyhowvkdjP3rI4ldGW5UC5h6aov/h7NcSlWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746644425; a=rsa-sha256; cv=none; b=LO3+6SV1KqYClG6LhO/EaWmWAyKvSxrkjovYdxDtWgK1ECwIdhFXWvbbt0wA+vrF0uiWeJ tB6rMumSnM1wDW7yY1O+E4+xAs9IRUrHQ4XUPBqQcF63jx8xO9KZW8iN3R52yDFiWY2XWJ JBoPAS+QE5e3ZTevdh7F2HzXfPMxkSTKMC8Tfq66XTGIpVr7nStYm6QX1HZd6AVUNNLRkK U4dY/QlPzmuqzu3TqbtJxGGt/XYOq1DRXGc8z3oA/nakcpkhf/UGNWRxj2jom2m9mI2Zmm 0gAMA2zlNxy3ysZCPDaDXnzzB3M19SPq9Fm8/l6izcUVqQ/R6VUtzLgrTKkM8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4Ms5thwzhRJ; Wed, 07 May 2025 19:00:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547J0Pdh000392; Wed, 7 May 2025 19:00:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547J0PiT000389; Wed, 7 May 2025 19:00:25 GMT (envelope-from git) Date: Wed, 7 May 2025 19:00:25 GMT Message-Id: <202505071900.547J0PiT000389@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 271128b06986 - main - mbuf: Allow clusters to fill an entire jumbo 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 271128b0698653294acf0ed3457d5871af5b3ef1 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=271128b0698653294acf0ed3457d5871af5b3ef1 commit 271128b0698653294acf0ed3457d5871af5b3ef1 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-07 18:58:48 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-07 18:59:09 +0000 mbuf: Allow clusters to fill an entire jumbo page. The assumption that MCLBYTES == MJUMPAGESIZE can only happen if pages are small is incorrect: it can also happen if MCLSHIFT is adjusted to increase the size of clusters. Restore the ability to have clusters fill a jumbo page, while still disallowing them from exceeding them. MFC after: 1 week Fixes: 840327e5ddf3, 9c3ad5ba932b Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: siderop1_netapp.com, kevans, brooks Differential Revision: https://reviews.freebsd.org/D50242 --- sys/conf/NOTES | 3 ++- sys/dev/cxgbe/adapter.h | 4 ++++ sys/dev/cxgbe/t4_sge.c | 8 ++++++++ sys/kern/kern_mbuf.c | 4 ++-- sys/sys/mbuf.h | 6 ++++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index d85980e4e122..e84fdcb30220 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2057,7 +2057,8 @@ device rtwnfw # mismatch between the mbuf size assumed by the kernel and the mbuf size # assumed by a module. The only driver that currently has the ability to # detect a mismatch is ti(4). -options MCLSHIFT=11 # mbuf cluster shift in bits, 11 == 2KB +options MCLSHIFT=12 # mbuf cluster shift in bits, 12 == 4 kB + # default is 11 == 2 kB options MSIZE=256 # mbuf size in bytes # diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 3bf4f666ce7d..d3820245837a 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -107,7 +107,11 @@ enum { CTRL_EQ_QSIZE = 1024, TX_EQ_QSIZE = 1024, +#if MJUMPAGESIZE != MCLBYTES SW_ZONE_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ +#else + SW_ZONE_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ +#endif CL_METADATA_SIZE = CACHE_LINE_SIZE, SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index bc81a0251deb..86454bc4fe10 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -570,7 +570,9 @@ t4_sge_modload(void) } if (largest_rx_cluster != MCLBYTES && +#if MJUMPAGESIZE != MCLBYTES largest_rx_cluster != MJUMPAGESIZE && +#endif largest_rx_cluster != MJUM9BYTES && largest_rx_cluster != MJUM16BYTES) { printf("Invalid hw.cxgbe.largest_rx_cluster value (%d)," @@ -579,7 +581,9 @@ t4_sge_modload(void) } if (safest_rx_cluster != MCLBYTES && +#if MJUMPAGESIZE != MCLBYTES safest_rx_cluster != MJUMPAGESIZE && +#endif safest_rx_cluster != MJUM9BYTES && safest_rx_cluster != MJUM16BYTES) { printf("Invalid hw.cxgbe.safest_rx_cluster value (%d)," @@ -718,7 +722,9 @@ t4_tweak_chip_settings(struct adapter *sc) uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); static int sw_buf_sizes[] = { MCLBYTES, +#if MJUMPAGESIZE != MCLBYTES MJUMPAGESIZE, +#endif MJUM9BYTES, MJUM16BYTES }; @@ -855,7 +861,9 @@ t4_init_rx_buf_info(struct adapter *sc) int i, j, n; static int sw_buf_sizes[] = { /* Sorted by size */ MCLBYTES, +#if MJUMPAGESIZE != MCLBYTES MJUMPAGESIZE, +#endif MJUM9BYTES, MJUM16BYTES }; diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 48886c1e5b0c..90af03e29dfb 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -61,8 +61,8 @@ #include #include -_Static_assert(MJUMPAGESIZE > MCLBYTES, - "Cluster must be smaller than a jumbo page"); +_Static_assert(MCLBYTES <= MJUMPAGESIZE, + "Cluster must not be larger than a jumbo page"); /* * In FreeBSD, Mbufs and Mbuf Clusters are allocated from UMA diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 58b7585303bb..c75094aea450 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -885,9 +885,11 @@ m_gettype(int size) case MCLBYTES: type = EXT_CLUSTER; break; +#if MJUMPAGESIZE != MCLBYTES case MJUMPAGESIZE: type = EXT_JUMBOP; break; +#endif case MJUM9BYTES: type = EXT_JUMBO9; break; @@ -933,9 +935,11 @@ m_getzone(int size) case MCLBYTES: zone = zone_clust; break; +#if MJUMPAGESIZE != MCLBYTES case MJUMPAGESIZE: zone = zone_jumbop; break; +#endif case MJUM9BYTES: zone = zone_jumbo9; break; @@ -1055,9 +1059,11 @@ m_cljset(struct mbuf *m, void *cl, int type) case EXT_CLUSTER: size = MCLBYTES; break; +#if MJUMPAGESIZE != MCLBYTES case EXT_JUMBOP: size = MJUMPAGESIZE; break; +#endif case EXT_JUMBO9: size = MJUM9BYTES; break; From nobody Wed May 7 19:22: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 4Zt4rs2NFdz5v9Bg; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4rs1mb6z49SK; Wed, 07 May 2025 19:22:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zlI1gF4qp0lC2uQFjfxwXRpsQug2qD3yEnh1Tn14szk=; b=e3pnkV4oiY8Y+3N6wruwunmy3G87jV561BL+KSKi8NYiwlKi4DZplBUJjrYIKe/rUrnVSF si/GjKKCUg0Fn6rs7siwYtSZBm4xTv9XmVAS2GEoo2gj3N/OaS1gmcRxpWe0Nea1fmKLe4 LDbZxv0Lh/S6g+KA582b6sVSarkT4Gt5VzHrTbCSGuPSgLeNZGBW77uL1Yjh7qyXrEP4zY StUS83SyoNqit9OeVEk9YY6V4aCbdpYLxwEoa59jcLnxqZpmcBKbi4Wx1JvC6Eqzd34K8R 8hVU/gYQ3mrbgOo7LWlcbBBPsAGqGABsZ5YRCyzx/FYZ6o/gdJKjDHvYK9sYaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zlI1gF4qp0lC2uQFjfxwXRpsQug2qD3yEnh1Tn14szk=; b=TtNz7THMiVEo7MLUQMwpUMmF5c74P61pIOec8Oh0TacL+W3tGWrIB07DRzfQ06DXMGT3/O fk/ZCimK5wTns0bVfz5EnVGc6gQ3G+/A6pUHi6m7NuUM19cJJmHgMKl1o99/PY8rI98PJp VM7Tk5N3BxTE786Pi8nXcJ6UyEcjBeZr20IU1Uyehzijze2mx2t80wUkF1VAFvh92JbCQL gmraL7ixJuCghdKRPY5JDfVtxEqc7n2KycG1s6q+VuZPzlurUa5Rx/ptUsYu/5UdlNcn4a N7Q/uztt6J42ttFMARQGm3fW0rnwk7tnEom26LkY+4oJdgBvrc52bak0ttQitw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645725; a=rsa-sha256; cv=none; b=JYAY5UJkk/RHir4EoKbrSTXHQiUpMIX8IRqQtj1ZxsDCJWMgeVadDkpP/Xam5r9nQ+HvMS d9Mp1U7m+ieLhnnY8iloUfxtmSFD9P3pRHHIrD4eqjkmvHMtj7fskzDDnHL8Dgic2XwQO0 mqOlI1hHVMX+8/EZPtCH16U1XFW6as/VVycLAmPeqATyrluZ4ZKMTqMArxw0jqB8XbWE8d 6rz8jjebHLsQCYO59tlX7WnhVhyK3iHePsycbAMoQ7QaBBsRggkoKo/S+RCqJNJDYXS7s5 3GdMEu7i5KMqMD8pW15c4dPindaMcUqbPjZvcloSmj+kI6HneXoeGcqBMI5Xmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4rs1GqTzjkN; Wed, 07 May 2025 19:22:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JM5Qw042927; Wed, 7 May 2025 19:22:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JM5BV042924; Wed, 7 May 2025 19:22:05 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:05 GMT Message-Id: <202505071922.547JM5BV042924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 7953cbaabe7c - main - libc: Reassociate pointer arithmetic in __libc_tls_get_addr List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7953cbaabe7c35d439f0222481a12ad52d0b0df0 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=7953cbaabe7c35d439f0222481a12ad52d0b0df0 commit 7953cbaabe7c35d439f0222481a12ad52d0b0df0 Author: Jessica Clarke AuthorDate: 2025-05-07 19:19:42 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:19:42 +0000 libc: Reassociate pointer arithmetic in __libc_tls_get_addr Rather than compute a biased pointer only to then un-bias it again, un-bias the offset before adding it to the DTV entry. This mirrors rtld-elf commit d71c97026366 ("rtld-elf: Push TLS_DTV_OFFSET into tls_get_addr_common's arguments") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50224 --- lib/libc/gen/tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 8d453eccb801..218cd1da92df 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -85,8 +85,8 @@ __libc_tls_get_addr(void *vti) dtv = _tcb_get()->tcb_dtv; ti = vti; - return ((char *)(dtv[ti->ti_module + 1] + ti->ti_offset) + - TLS_DTV_OFFSET); + return ((char *)dtv[ti->ti_module + 1] + (ti->ti_offset + + TLS_DTV_OFFSET)); } #ifdef __i386__ From nobody Wed May 7 19:22: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 4Zt4rt6Q1jz5v92V; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4rt37Hnz49XS; Wed, 07 May 2025 19:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhY/i6a03Cq9qkz4uaV1/7eUCx+kzqbMyettZgH2X2U=; b=tssAi2HQaE9EKvwiyBUMDyyAaRBupAMsTdrMq8TVNlkVAAKzJV4s9Zb/+CyCTXA4Txm6Uu SUyKwIn2K2rli863VXFxm1UuqSxMTy/iG9gDVO8T30wxwLI8e91/QHO2XB9L2eHwHaQgfg zPAEyHXdBBgBDD3hr9K/8C366ERg83ALZ1EY66v9cIntW0MVANrj4fw1BheT2uJ2hHeuEo 0llrftIdk/eBGQ4AVLRs+v0iYAL48Mb3y3q7Yl82LbdzLOF5XABAKOuwU1v5d+Ny3CcOGr VyM9p6XZzRlEGwwljgLNmYIqrQQXhMMa/t+mopjZoLO6+8TLv778fCykqhyvpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yhY/i6a03Cq9qkz4uaV1/7eUCx+kzqbMyettZgH2X2U=; b=MaRpW0PPxF1BtCY6/a8wEZbX0sSPE10Kb/QD0JSv9EHRIvp4/67TZAjLYN06Ch1lHlr6nQ LTYSF7iHo9Z6hJV2GdpVqzkwbam7++c3zMjmOpSLqsNpdge1k3FsLVjBYW/0IIkJZpvEAX 8KkF590hvBlscJGILTgUgVtXEmVCPnkkZHQVdoLtvPEUE5uVpI8qBSz8OwuaOjeO0GBUIG LJEgOIqj2l/DzaGtTtcZ3UhBRp+4GsKce2gMHjlz2UbMjZUvJgC0U1ezNdJ+7uyTrQ68ZK Dxeif1oPjb0lHgZOtbEaIR6lNp/N72J37dIyvXC0o68zp4ZO8auCuzDX+n5qzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645726; a=rsa-sha256; cv=none; b=jMW4O7BvYydbCp4DrzIS8Zmul1s1h4JkjqaTG04NVLp3/q+YgjuD9giVLPtJOK78zmD+Ah wMJwny40USXXxI8f6s7aGYZU2ac5254INkBQFX0rqbQ0XSI3Ct6S2gM+X2CigIzclGbkoj M0IR88SJiFyKd7bwXFv02140Xv5fIBLAtPClV6t7+Rbg/AAr2SUdfK52Dymh+9rV7hoSgI XVUXQHfI9pour9sZOgyh/vwCJ93L7qTNskBxWT2kZEJ9XcOqtDvmcqG2OEf5D6lil9Gj0/ UHnVTS6MCQhSqY3AqjjgmSthldw/WTP+vh1Kklb0iz+dCbCYLldS4hv0bA1xbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4rt2WyzzjkP; Wed, 07 May 2025 19:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JM671042960; Wed, 7 May 2025 19:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JM6YN042957; Wed, 7 May 2025 19:22:06 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:06 GMT Message-Id: <202505071922.547JM6YN042957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 1ef9f0371e2d - main - libc: Consistently use uintptr_t for TLS 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ef9f0371e2dce8bc53bd43d6c95f0acba987853 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=1ef9f0371e2dce8bc53bd43d6c95f0acba987853 commit 1ef9f0371e2dce8bc53bd43d6c95f0acba987853 Author: Jessica Clarke AuthorDate: 2025-05-07 19:19:49 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:19:49 +0000 libc: Consistently use uintptr_t for TLS implementation Elf_Addr is the format of addresses in the ELF file with the current ABI's default class. This is normally the same as the format of an address at run time, though technically exceptions do exist outside of FreeBSD's currently-supported architectures (for example, IA-64's LP64 supports both ELFCLASS32 and ELFCLASS64 file formats; LP64 vs ILP32 is an orthogonal EF_IA_64_ABI64 flag). On traditional architectures, including all currently-supported FreeBSD architectures, addresses and pointers are synonymous, but on CHERI they are not, as pointers are capabilities that contain metadata alongside the address. In the cases here, the quantities are run-time pointers, not addresses (and definitely not ELF file addresses), so we should use pointer-ish types. Note that we already use uintptr_t in struct tcb (both Variant I and Variant II) but still use Elf_Addr in various places here. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50225 --- lib/libc/gen/tls.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 218cd1da92df..ad6f43eb3534 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -200,10 +200,10 @@ get_tls_block_ptr(void *tcb, size_t tcbsize) void __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) { - Elf_Addr *dtv; - Elf_Addr **tls; + uintptr_t *dtv; + uintptr_t **tls; - tls = (Elf_Addr **)tcb; + tls = (uintptr_t **)tcb; dtv = tls[0]; __je_bootstrap_free(dtv); libc_free_aligned(get_tls_block_ptr(tcb, tcbsize)); @@ -232,7 +232,7 @@ __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) void * __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { - Elf_Addr *dtv, **tcb; + uintptr_t *dtv, **tcb; char *tls_block, *tls; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; @@ -261,7 +261,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) abort(); } memset(tls_block, 0, tls_block_size); - tcb = (Elf_Addr **)(tls_block + pre_size + extra_size); + tcb = (uintptr_t **)(tls_block + pre_size + extra_size); tls = (char *)tcb + TLS_TCB_SIZE + post_size; if (oldtcb != NULL) { @@ -271,9 +271,9 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) /* Adjust the DTV. */ dtv = tcb[0]; - dtv[2] = (Elf_Addr)tls; + dtv[2] = (uintptr_t)tls; } else { - dtv = __je_bootstrap_malloc(3 * sizeof(Elf_Addr)); + dtv = __je_bootstrap_malloc(3 * sizeof(uintptr_t)); if (dtv == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); @@ -282,7 +282,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) tcb[0] = dtv; dtv[0] = 1; /* Generation. */ dtv[1] = 1; /* Segments count. */ - dtv[2] = (Elf_Addr)tls; + dtv[2] = (uintptr_t)tls; if (libc_tls_init_size > 0) memcpy(tls, libc_tls_init, libc_tls_init_size); @@ -302,8 +302,8 @@ void __libc_free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) { size_t size; - Elf_Addr* dtv; - Elf_Addr tlsstart, tlsend; + uintptr_t *dtv; + uintptr_t tlsstart, tlsend; /* * Figure out the size of the initial TLS block so that we can @@ -312,8 +312,8 @@ __libc_free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) tcbalign = MAX(tcbalign, libc_tls_init_align); size = roundup2(libc_tls_static_space, tcbalign); - dtv = ((Elf_Addr**)tcb)[1]; - tlsend = (Elf_Addr) tcb; + dtv = ((uintptr_t **)tcb)[1]; + tlsend = (uintptr_t)tcb; tlsstart = tlsend - size; libc_free_aligned((void*)tlsstart); __je_bootstrap_free(dtv); @@ -327,29 +327,29 @@ __libc_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign) { size_t size; char *tls; - Elf_Addr *dtv; - Elf_Addr segbase, oldsegbase; + uintptr_t *dtv; + uintptr_t segbase, oldsegbase; tcbalign = MAX(tcbalign, libc_tls_init_align); size = roundup2(libc_tls_static_space, tcbalign); - if (tcbsize < 2 * sizeof(Elf_Addr)) - tcbsize = 2 * sizeof(Elf_Addr); + if (tcbsize < 2 * sizeof(uintptr_t)) + tcbsize = 2 * sizeof(uintptr_t); tls = libc_malloc_aligned(size + tcbsize, tcbalign); if (tls == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); } memset(tls, 0, size + tcbsize); - dtv = __je_bootstrap_malloc(3 * sizeof(Elf_Addr)); + dtv = __je_bootstrap_malloc(3 * sizeof(uintptr_t)); if (dtv == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); } - segbase = (Elf_Addr)(tls + size); - ((Elf_Addr*)segbase)[0] = segbase; - ((Elf_Addr*)segbase)[1] = (Elf_Addr) dtv; + segbase = (uintptr_t)(tls + size); + ((uintptr_t *)segbase)[0] = segbase; + ((uintptr_t *)segbase)[1] = (uintptr_t)dtv; dtv[0] = 1; dtv[1] = 1; @@ -359,7 +359,7 @@ __libc_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign) /* * Copy the static TLS block over whole. */ - oldsegbase = (Elf_Addr) oldtls; + oldsegbase = (uintptr_t)oldtls; memcpy((void *)(segbase - libc_tls_static_space), (const void *)(oldsegbase - libc_tls_static_space), libc_tls_static_space); @@ -368,7 +368,8 @@ __libc_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign) * We assume that this block was the one we created with * allocate_initial_tls(). */ - _rtld_free_tls(oldtls, 2*sizeof(Elf_Addr), sizeof(Elf_Addr)); + _rtld_free_tls(oldtls, 2 * sizeof(uintptr_t), + sizeof(uintptr_t)); } else { memcpy((void *)(segbase - libc_tls_static_space), libc_tls_init, libc_tls_init_size); From nobody Wed May 7 19:22: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 4Zt4rv6MYcz5v98J; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4rv3xdVz49gX; Wed, 07 May 2025 19:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kqTYAimzIKXliJy3P8PW+sdil7W9X15VlZozL1gJ4Oc=; b=dW1yJrh7UjqcLHH3TQ6tKmqmicMQazXR8p9L6HxJ/DmL3UWg22IkO7+6QS46pNNDJkS+HI l0Hvcz67WpKDPFgT6Vu4bUjPRfwChcXGsJSunBD+9nqd8D+D4H+hlFZv6WT0iYB02DtdV4 umQtfqBBOg0FIcWImACvQwYZ+BvlGpsb+xOnSZ+dBehf868NGDpLQQAr/ptu5SV0OulDAi 1yGXdfNsG0o4faHhmlsKRbFteNhUZz36hsXRw/pQZC/6EAYwLKAsFHOuLU98/RShY1sNMe PwJgFF4ZnlRow3oSkBzImSDnQhxpAjgRTPwFhSOSnWY/I1xihvY9PEVrKNYUOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kqTYAimzIKXliJy3P8PW+sdil7W9X15VlZozL1gJ4Oc=; b=EzpMVajhnNE6WK1ejsXMm0yu+LDhAjHpthbtG4pq6xKY5seyl3prXTO1n53Y5aEQhQHeCu j8yuLnE9SeXXQDsm1mg2FR0TjHXLqhHS9IWv1o5W1aA2k85ASuSa+bqVFccELfZbdxyVh3 oEKt2nCChIipkbeKflFCW0iN+XyP4cGSEnH3R+X8GRwEjH81lD27K1qZNEgqPXnVNRszxN qFBqxjYen67vWqX/m3hSpekES0eZgaaNLJ6TjoOH5J69KExyDFuMhZz/2LzRjDDRejuQjW PO9ZKipfaA4Xi6unYlUt6fWUwY9xsc6sVXO2P8hynGIRcPt1z/Hn0QJ7SK416g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645727; a=rsa-sha256; cv=none; b=hCQZqCm847+6Vu1HA/4lmQAR24L5P6/P53NojHc9B/B9n7lXXjzokrQwQG4wnIMlVGrZAN KpB73wvks11lD8dVXmySFvBaOaHH7Q9RbjFes+VlvO/1CinXdYU4LwYR+si/kO2eEf11Ra Lorq30KY2s9JP4cNn+Z8CkhvFJoscRlhrQHi8CWWIiSq9/mlILTWTOxmuYKp7ii58u2aE+ 9qTRN0LLzxwLa+oB1kDXQ394vIlokOpqLIx1WLE9k5hbc0NF+Vt1dII2v7n/LmZQZydFaQ LGUPbtDClCAOEn5nWBXc9y3z5ex1LPgjSvKiuRMPgc5RZlppgpUVCYP/W7wTaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4rv3TswzjkQ; Wed, 07 May 2025 19:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JM7HE042993; Wed, 7 May 2025 19:22:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JM7vn042990; Wed, 7 May 2025 19:22:07 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:07 GMT Message-Id: <202505071922.547JM7vn042990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 4642b638a522 - main - rtld-elf: Consistently use uintptr_t for TLS 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4642b638a52253ae04aef699bee246b1fa7c9d1c Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=4642b638a52253ae04aef699bee246b1fa7c9d1c commit 4642b638a52253ae04aef699bee246b1fa7c9d1c Author: Jessica Clarke AuthorDate: 2025-05-07 19:19:55 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:19:55 +0000 rtld-elf: Consistently use uintptr_t for TLS implementation Elf_Addr is the format of addresses in the ELF file with the current ABI's default class. This is normally the same as the format of an address at run time, though technically exceptions do exist outside of FreeBSD's currently-supported architectures (for example, IA-64's LP64 supports both ELFCLASS32 and ELFCLASS64 file formats; LP64 vs ILP32 is an orthogonal EF_IA_64_ABI64 flag). On traditional architectures, including all currently-supported FreeBSD architectures, addresses and pointers are synonymous, but on CHERI they are not, as pointers are capabilities that contain metadata alongside the address. In the cases here, the quantities are run-time pointers, not addresses (and definitely not ELF file addresses), so we should use pointer-ish types. Note that we already use uintptr_t in struct tcb (both Variant I and Variant II) but still use Elf_Addr in various places here (including different argument types for tls_get_addr_slow and tls_get_addr_common). Also use char * for addr rather than even uintptr_t, since most of the time we want it to be an actual pointer. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50226 --- libexec/rtld-elf/rtld.c | 94 ++++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index eb04a2f17603..4376b67aa4a9 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -170,7 +170,7 @@ static int symlook_list(SymLook *, const Objlist *, DoneList *); static int symlook_needed(SymLook *, const Needed_Entry *, DoneList *); static int symlook_obj1_sysv(SymLook *, const Obj_Entry *); static int symlook_obj1_gnu(SymLook *, const Obj_Entry *); -static void *tls_get_addr_slow(Elf_Addr **, int, size_t, bool) __noinline; +static void *tls_get_addr_slow(uintptr_t **, int, size_t, bool) __noinline; static void trace_loaded_objects(Obj_Entry *, bool); static void unlink_object(Obj_Entry *); static void unload_object(Obj_Entry *, RtldLockState *lockstate); @@ -5350,9 +5350,9 @@ unref_dag(Obj_Entry *root) * Common code for MD __tls_get_addr(). */ static void * -tls_get_addr_slow(Elf_Addr **dtvp, int index, size_t offset, bool locked) +tls_get_addr_slow(uintptr_t **dtvp, int index, size_t offset, bool locked) { - Elf_Addr *newdtv, *dtv; + uintptr_t *newdtv, *dtv; RtldLockState lockstate; int to_copy; @@ -5361,11 +5361,11 @@ tls_get_addr_slow(Elf_Addr **dtvp, int index, size_t offset, bool locked) if (dtv[0] != tls_dtv_generation) { if (!locked) wlock_acquire(rtld_bind_lock, &lockstate); - newdtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); + newdtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); to_copy = dtv[1]; if (to_copy > tls_max_index) to_copy = tls_max_index; - memcpy(&newdtv[2], &dtv[2], to_copy * sizeof(Elf_Addr)); + memcpy(&newdtv[2], &dtv[2], to_copy * sizeof(uintptr_t)); newdtv[0] = tls_dtv_generation; newdtv[1] = tls_max_index; free(dtv); @@ -5380,7 +5380,7 @@ tls_get_addr_slow(Elf_Addr **dtvp, int index, size_t offset, bool locked) if (!locked) wlock_acquire(rtld_bind_lock, &lockstate); if (!dtv[index + 1]) - dtv[index + 1] = (Elf_Addr)allocate_module_tls(index); + dtv[index + 1] = (uintptr_t)allocate_module_tls(index); if (!locked) lock_release(rtld_bind_lock, &lockstate); } @@ -5436,9 +5436,9 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) { Obj_Entry *obj; char *tls_block; - Elf_Addr *dtv, **tcb; - Elf_Addr addr; - Elf_Addr i; + uintptr_t *dtv, **tcb; + char *addr; + uintptr_t i; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; size_t tls_init_align, tls_init_offset; @@ -5459,7 +5459,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) /* Allocate whole TLS block */ tls_block = xmalloc_aligned(tls_block_size, maxalign, 0); - tcb = (Elf_Addr **)(tls_block + pre_size + extra_size); + tcb = (uintptr_t **)(tls_block + pre_size + extra_size); if (oldtcb != NULL) { memcpy(tls_block, get_tls_block_ptr(oldtcb, tcbsize), @@ -5469,14 +5469,14 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) /* Adjust the DTV. */ dtv = tcb[0]; for (i = 0; i < dtv[1]; i++) { - if (dtv[i + 2] >= (Elf_Addr)oldtcb && - dtv[i + 2] < (Elf_Addr)oldtcb + tls_static_space) { - dtv[i + 2] = dtv[i + 2] - (Elf_Addr)oldtcb + - (Elf_Addr)tcb; + if (dtv[i + 2] >= (uintptr_t)oldtcb && + dtv[i + 2] < (uintptr_t)oldtcb + tls_static_space) { + dtv[i + 2] = dtv[i + 2] - (uintptr_t)oldtcb + + (uintptr_t)tcb; } } } else { - dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); + dtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); tcb[0] = dtv; dtv[0] = tls_dtv_generation; dtv[1] = tls_max_index; @@ -5486,21 +5486,21 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) if (obj->tlsoffset == 0) continue; tls_init_offset = obj->tlspoffset & (obj->tlsalign - 1); - addr = (Elf_Addr)tcb + obj->tlsoffset; + addr = (char *)tcb + obj->tlsoffset; if (tls_init_offset > 0) - memset((void *)addr, 0, tls_init_offset); + memset(addr, 0, tls_init_offset); if (obj->tlsinitsize > 0) { - memcpy((void *)(addr + tls_init_offset), - obj->tlsinit, obj->tlsinitsize); + memcpy(addr + tls_init_offset, obj->tlsinit, + obj->tlsinitsize); } if (obj->tlssize > obj->tlsinitsize) { - memset((void *)(addr + tls_init_offset + - obj->tlsinitsize), + memset(addr + tls_init_offset + + obj->tlsinitsize, 0, obj->tlssize - obj->tlsinitsize - tls_init_offset); } - dtv[obj->tlsindex + 1] = addr; + dtv[obj->tlsindex + 1] = (uintptr_t)addr; } } @@ -5510,8 +5510,8 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) void free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) { - Elf_Addr *dtv; - Elf_Addr tlsstart, tlsend; + uintptr_t *dtv; + uintptr_t tlsstart, tlsend; size_t post_size; size_t dtvsize, i, tls_init_align __unused; @@ -5521,10 +5521,10 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) /* Compute fragments sizes. */ post_size = calculate_tls_post_size(tls_init_align); - tlsstart = (Elf_Addr)tcb + TLS_TCB_SIZE + post_size; - tlsend = (Elf_Addr)tcb + tls_static_space; + tlsstart = (uintptr_t)tcb + TLS_TCB_SIZE + post_size; + tlsend = (uintptr_t)tcb + tls_static_space; - dtv = *(Elf_Addr **)tcb; + dtv = *(uintptr_t **)tcb; dtvsize = dtv[1]; for (i = 0; i < dtvsize; i++) { if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || @@ -5549,8 +5549,9 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) Obj_Entry *obj; size_t size, ralign; char *tls; - Elf_Addr *dtv, *olddtv; - Elf_Addr segbase, oldsegbase, addr; + uintptr_t *dtv, *olddtv; + uintptr_t segbase, oldsegbase; + char *addr; size_t i; ralign = tcbalign; @@ -5558,13 +5559,13 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) ralign = tls_static_max_align; size = roundup(tls_static_space, ralign) + roundup(tcbsize, ralign); - assert(tcbsize >= 2 * sizeof(Elf_Addr)); + assert(tcbsize >= 2 * sizeof(uintptr_t)); tls = xmalloc_aligned(size, ralign, 0 /* XXX */); - dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); + dtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); - segbase = (Elf_Addr)(tls + roundup(tls_static_space, ralign)); - ((Elf_Addr *)segbase)[0] = segbase; - ((Elf_Addr *)segbase)[1] = (Elf_Addr)dtv; + segbase = (uintptr_t)(tls + roundup(tls_static_space, ralign)); + ((uintptr_t *)segbase)[0] = segbase; + ((uintptr_t *)segbase)[1] = (uintptr_t)dtv; dtv[0] = tls_dtv_generation; dtv[1] = tls_max_index; @@ -5573,7 +5574,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) /* * Copy the static TLS block over whole. */ - oldsegbase = (Elf_Addr)oldtls; + oldsegbase = (uintptr_t)oldtls; memcpy((void *)(segbase - tls_static_space), (const void *)(oldsegbase - tls_static_space), tls_static_space); @@ -5582,7 +5583,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) * If any dynamic TLS blocks have been created tls_get_addr(), * move them over. */ - olddtv = ((Elf_Addr **)oldsegbase)[1]; + olddtv = ((uintptr_t **)oldsegbase)[1]; for (i = 0; i < olddtv[1]; i++) { if (olddtv[i + 2] < oldsegbase - size || olddtv[i + 2] > oldsegbase) { @@ -5595,20 +5596,19 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) * We assume that this block was the one we created with * allocate_initial_tls(). */ - free_tls(oldtls, 2 * sizeof(Elf_Addr), sizeof(Elf_Addr)); + free_tls(oldtls, 2 * sizeof(uintptr_t), sizeof(uintptr_t)); } else { for (obj = objs; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker || obj->tlsoffset == 0) continue; - addr = segbase - obj->tlsoffset; - memset((void *)(addr + obj->tlsinitsize), 0, - obj->tlssize - obj->tlsinitsize); + addr = (char *)segbase - obj->tlsoffset; + memset(addr + obj->tlsinitsize, 0, obj->tlssize - + obj->tlsinitsize); if (obj->tlsinit) { - memcpy((void *)addr, obj->tlsinit, - obj->tlsinitsize); + memcpy(addr, obj->tlsinit, obj->tlsinitsize); obj->static_tls_copied = true; } - dtv[obj->tlsindex + 1] = addr; + dtv[obj->tlsindex + 1] = (uintptr_t)addr; } } @@ -5618,10 +5618,10 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) void free_tls(void *tls, size_t tcbsize __unused, size_t tcbalign) { - Elf_Addr *dtv; + uintptr_t *dtv; size_t size, ralign; int dtvsize, i; - Elf_Addr tlsstart, tlsend; + uintptr_t tlsstart, tlsend; /* * Figure out the size of the initial TLS block so that we can @@ -5632,9 +5632,9 @@ free_tls(void *tls, size_t tcbsize __unused, size_t tcbalign) ralign = tls_static_max_align; size = roundup(tls_static_space, ralign); - dtv = ((Elf_Addr **)tls)[1]; + dtv = ((uintptr_t **)tls)[1]; dtvsize = dtv[1]; - tlsend = (Elf_Addr)tls; + tlsend = (uintptr_t)tls; tlsstart = tlsend - size; for (i = 0; i < dtvsize; i++) { if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || From nobody Wed May 7 19:22: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 4Zt4rw6ncJz5v9C0; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4rw4q0gz49dt; Wed, 07 May 2025 19:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mtrN1v+XUJieQgWjava2Jdq8r8v3NbEc/vcdSHkgUsg=; b=qX+es0hX9kFWBbLlUKPKpYIppRF1kFTTfgSM0B5hEXhsUwe8EjUo5Rf1qPGBkiC1jkC/6/ HXckI87U1/0zwn6u0NlvKMZLlye7qR/rv34ITxXexopq2hgElQz0ZWRrdwWDhEiNdQclof Yqow09eGBHIl6bbwc29zk4KXIK6Pgy/a8SAg1p6Y2w/jBOG61Tw6aPv4XMYaBnbHb+dThW y8tz5ri4x26ZQsZ5k2hxsVK+dpLA5ISqS+xh2nCz/CQGiEbuvh0wQ9+tSHQq6P+DthHhr9 NGKe5kJCORRQTLS4c8W31eykXg7gel01ogfITiVluFAWChPlr85kr5mjzIjJ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mtrN1v+XUJieQgWjava2Jdq8r8v3NbEc/vcdSHkgUsg=; b=ymCs9cINelYMmdjdInLN/kGPIS76opjzMf8KL2uHZfjLZV0pib4MUKUyrRW83VaAOOS421 MP/a1H9Bcsa3jHoe6Ae2w0Ht8MePP4VNNck6Xzoh8XIYC6TfnVI6qVXLuShPU4K2GVpFzj 14+l6xL3yAoUuljQoOuMb/vdN0dF6JFhBerF0oPcxabuVBs3WV0bvzGIIQnvPihM2/L5cJ 3B/mL5sVN5+ukwjXBbafLdFzvEKKTzgSFb3tBjdHKFQ1rNtW/jtA1jRbiHjG8R1dI28OKD r90r9AkXTt62t0SIOVJuv4h+xc0VmUB6afxfE57lqOyTk/sKX7D1VxRahB48Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645728; a=rsa-sha256; cv=none; b=uGeyTwxdJFlZDcCnkLtYgu2uPV/R/zpnCZ88mbWPQYtN6mbgr2wAk4ALZ1wT0Zs0oLB+c/ EA+RNLgzkm5zKz+1vf/5Io/N1eVmrCwKtKaPbzNo4ORhJPyp4cJMYCOGaIQ6Utc5a76pix he+ZKXcQuGQW1thCspui8YPsPBfAsLpJcmDedLEMN1CDeda4d01bGS3h9DrQrpss4CZjYS wB3sFvA48YAmnoL25EYE8e9uLKL8p2R1FJNwWcpzriDxoUHeNarwGfa+BagNwVhwdGf/bL VD8TwMZ2qB32Id1Vn70FufWEGqRNknL9/NE0xkBFia7Dpc9dJ8QHdgrYdXX8vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4rw4QqXzj9J; Wed, 07 May 2025 19:22:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JM8NY043026; Wed, 7 May 2025 19:22:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JM8Zr043023; Wed, 7 May 2025 19:22:08 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:08 GMT Message-Id: <202505071922.547JM8Zr043023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 62dfddd083da - main - libc: Use variables more consistent with Variant I for Variant II TLS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62dfddd083dab8ed1b2d9dd390fa27d37d132416 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=62dfddd083dab8ed1b2d9dd390fa27d37d132416 commit 62dfddd083dab8ed1b2d9dd390fa27d37d132416 Author: Jessica Clarke AuthorDate: 2025-05-07 19:20:00 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:20:00 +0000 libc: Use variables more consistent with Variant I for Variant II TLS Firstly, the first argument to __libc_allocate_tls is the old TCB (versus oldtls, which has less of a clear meaning), so rename it to oldtcb like Variant I. Secondly, segbase and oldsegbase are oriented towards what ends up in the segment registers, but that's not the main concern here, and those don't convey what they actually point to. Instead, rename segbase to tcb and change it to a uintptr_t **, and remove oldsegbase as it's always equal to oldtcb, again both matching Variant I. Finally, rename tls to tls_block, and add back a (different) tls variable rather than constantly recomputing tcb - libc_tls_static_space, again both matching Variant I. Whilst here, similarly fix the oldtls argument to be oldtcb in the PIC __libc_allocate_tls stub. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50227 --- lib/libc/gen/tls.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index ad6f43eb3534..9772c99833d5 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -323,62 +323,58 @@ __libc_free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) * Allocate Static TLS using the Variant II method. */ void * -__libc_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign) +__libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { size_t size; - char *tls; - uintptr_t *dtv; - uintptr_t segbase, oldsegbase; + char *tls_block, *tls; + uintptr_t *dtv, **tcb; tcbalign = MAX(tcbalign, libc_tls_init_align); size = roundup2(libc_tls_static_space, tcbalign); if (tcbsize < 2 * sizeof(uintptr_t)) tcbsize = 2 * sizeof(uintptr_t); - tls = libc_malloc_aligned(size + tcbsize, tcbalign); - if (tls == NULL) { + tls_block = libc_malloc_aligned(size + tcbsize, tcbalign); + if (tls_block == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); } - memset(tls, 0, size + tcbsize); + memset(tls_block, 0, size + tcbsize); dtv = __je_bootstrap_malloc(3 * sizeof(uintptr_t)); if (dtv == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); } - segbase = (uintptr_t)(tls + size); - ((uintptr_t *)segbase)[0] = segbase; - ((uintptr_t *)segbase)[1] = (uintptr_t)dtv; + tcb = (uintptr_t **)(tls_block + size); + tls = (char *)tcb - libc_tls_static_space; + tcb[0] = (uintptr_t *)tcb; + tcb[1] = dtv; dtv[0] = 1; dtv[1] = 1; - dtv[2] = segbase - libc_tls_static_space; + dtv[2] = (uintptr_t)tls; - if (oldtls) { + if (oldtcb != NULL) { /* * Copy the static TLS block over whole. */ - oldsegbase = (uintptr_t)oldtls; - memcpy((void *)(segbase - libc_tls_static_space), - (const void *)(oldsegbase - libc_tls_static_space), + memcpy(tls, (const char *)oldtcb - libc_tls_static_space, libc_tls_static_space); /* * We assume that this block was the one we created with * allocate_initial_tls(). */ - _rtld_free_tls(oldtls, 2 * sizeof(uintptr_t), + _rtld_free_tls(oldtcb, 2 * sizeof(uintptr_t), sizeof(uintptr_t)); } else { - memcpy((void *)(segbase - libc_tls_static_space), - libc_tls_init, libc_tls_init_size); - memset((void *)(segbase - libc_tls_static_space + - libc_tls_init_size), 0, + memcpy(tls, libc_tls_init, libc_tls_init_size); + memset(tls + libc_tls_init_size, 0, libc_tls_static_space - libc_tls_init_size); } - return (void*) segbase; + return (tcb); } #endif /* TLS_VARIANT_II */ @@ -386,7 +382,7 @@ __libc_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign) #else void * -__libc_allocate_tls(void *oldtls __unused, size_t tcbsize __unused, +__libc_allocate_tls(void *oldtcb __unused, size_t tcbsize __unused, size_t tcbalign __unused) { return (0); From nobody Wed May 7 19:22: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 4Zt4ry3ZsSz5v9Jx; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4ry04kVz49k7; Wed, 07 May 2025 19:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1QsXaWDS9JqkqnhkEjArM1abrPEWHxY3e4QCuI++2M=; b=MJfPamNsIBgNd0eGAvql5KuJujQn1nEoGEpSjEIQf8c1P2EEGnFGwpw6GIVQIBHtvBlKVd 8MPknSrO6dFfiqo6hFdxr1spP6N2qpeMKQa0Tt7aWk0n14pE4jlAIIPR/EsI0FuSnr7ReQ 5Y9PZLlmzygEvoZxh8wEuYdGVxbHqZdgr4w1uwelaxWIyayPoTgoNNkO9gKAjZ0fw2+kiK Zw4aq1p06OnE6ZscpODgIsvng9kWUlA3fID7wvTZ70Wnccs+0qBnzAR/v41iCfrdUWrexI ti9VuT3YrpNKMhOyzSDtqSsuto8hnbjXPH83YU4+YAjZ23xErNgQxCCT5jhEIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1QsXaWDS9JqkqnhkEjArM1abrPEWHxY3e4QCuI++2M=; b=CxMhqZKdzys+dGh0HYrIsTqLtdzieq5rflLqB/LMjlhsdrwC762CsJ2yUvJkFJwdDIY4XE JEHXnl42JuAUhHd9Ck+uFqe4oil0zK7DPCozyFtEGlwth3XdvOzSx08tQimsroYUMi+PZa 4i1Uat2gy6z2a/je4/X55OA2D6b7jIXvD2P6mXzrNPB2ORVvlGGR1ktL/8IhCGij4vtc7r z7gv0w3Woq5hXTDfITwGQHL5jxdd7k3kWOvs3eSEE5KdOwP2rsE0izUxvgwVVq7paEIugB ozbpTghuvD6uEbiy/iV0ypChdkVWAxHe0gl3WlwUTPhBeOJEZSytloBv3K4fCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645730; a=rsa-sha256; cv=none; b=WUduYZuyGcktNimQDabwkegRNtPSd1hSPJMztj4bIQtwQI9NTCFBfhQou/QscksJQkirhO rrGdZXvGcePuxIfbmP4jnAl9hpTYC959WGQA2AseTXclDhOCyYtCH0bYUdvZYLCWhSm+8R cj19k+f3/XzSt/nkOgTpAIYrp2oIYd2iYRcnx6RMXd/FhAGYrA6zOAC4w+2Sc1ZuY329ly Se34Daem73Hs/1R9kFTaEvHvhXJkPvTGum060mOIe3sNnKbZ904rrv5JP92C0Mm/4aIXa+ mCZZsINu0NvBABCXIZq2AhVPvhGYMPRdMA8Q6PR9/qFO0ymKzge45IbXAoa1WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4rx5RN5zjyc; Wed, 07 May 2025 19:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JM9Om043058; Wed, 7 May 2025 19:22:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JM9aO043055; Wed, 7 May 2025 19:22:09 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:09 GMT Message-Id: <202505071922.547JM9aO043055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 14c534eaef41 - main - rtld-elf: Use variables more consistent with Variant I for Variant II TLS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14c534eaef41247053cd71e0021a0fa05e17aae7 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=14c534eaef41247053cd71e0021a0fa05e17aae7 commit 14c534eaef41247053cd71e0021a0fa05e17aae7 Author: Jessica Clarke AuthorDate: 2025-05-07 19:20:05 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:20:05 +0000 rtld-elf: Use variables more consistent with Variant I for Variant II TLS Firstly, the second argument to allocate_tls is the old TCB (versus oldtls, which has less of a clear meaning), so rename it to oldtcb like Variant I. Secondly, segbase and oldsegbase are oriented towards what ends up in the segment registers, but that's not the main concern here, and those don't convey what they actually point to. Instead, rename segbase to tcb and change it to a uintptr_t **, and remove oldsegbase as it's always equal to oldtcb, again both matching Variant I. Thirdly, rename tls to tls_block, again both matching Variant I. Finally, similarly rename tls to tcb in free_tls, and oldtls to oldtcb in the common _rtld_allocate_tls. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50232 --- libexec/rtld-elf/rtld.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 4376b67aa4a9..8234efdecf53 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5544,13 +5544,13 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) * Allocate Static TLS using the Variant II method. */ void * -allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) +allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) { Obj_Entry *obj; size_t size, ralign; - char *tls; + char *tls_block; uintptr_t *dtv, *olddtv; - uintptr_t segbase, oldsegbase; + uintptr_t **tcb; char *addr; size_t i; @@ -5560,33 +5560,32 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) size = roundup(tls_static_space, ralign) + roundup(tcbsize, ralign); assert(tcbsize >= 2 * sizeof(uintptr_t)); - tls = xmalloc_aligned(size, ralign, 0 /* XXX */); + tls_block = xmalloc_aligned(size, ralign, 0 /* XXX */); dtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); - segbase = (uintptr_t)(tls + roundup(tls_static_space, ralign)); - ((uintptr_t *)segbase)[0] = segbase; - ((uintptr_t *)segbase)[1] = (uintptr_t)dtv; + tcb = (uintptr_t **)(tls_block + roundup(tls_static_space, ralign)); + tcb[0] = (uintptr_t *)tcb; + tcb[1] = dtv; dtv[0] = tls_dtv_generation; dtv[1] = tls_max_index; - if (oldtls != NULL) { + if (oldtcb != NULL) { /* * Copy the static TLS block over whole. */ - oldsegbase = (uintptr_t)oldtls; - memcpy((void *)(segbase - tls_static_space), - (const void *)(oldsegbase - tls_static_space), + memcpy((char *)tcb - tls_static_space, + (const char *)oldtcb - tls_static_space, tls_static_space); /* * If any dynamic TLS blocks have been created tls_get_addr(), * move them over. */ - olddtv = ((uintptr_t **)oldsegbase)[1]; + olddtv = ((uintptr_t **)oldtcb)[1]; for (i = 0; i < olddtv[1]; i++) { - if (olddtv[i + 2] < oldsegbase - size || - olddtv[i + 2] > oldsegbase) { + if (olddtv[i + 2] < (uintptr_t)oldtcb - size || + olddtv[i + 2] > (uintptr_t)oldtcb) { dtv[i + 2] = olddtv[i + 2]; olddtv[i + 2] = 0; } @@ -5596,12 +5595,12 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) * We assume that this block was the one we created with * allocate_initial_tls(). */ - free_tls(oldtls, 2 * sizeof(uintptr_t), sizeof(uintptr_t)); + free_tls(oldtcb, 2 * sizeof(uintptr_t), sizeof(uintptr_t)); } else { for (obj = objs; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker || obj->tlsoffset == 0) continue; - addr = (char *)segbase - obj->tlsoffset; + addr = (char *)tcb - obj->tlsoffset; memset(addr + obj->tlsinitsize, 0, obj->tlssize - obj->tlsinitsize); if (obj->tlsinit) { @@ -5612,11 +5611,11 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) } } - return ((void *)segbase); + return (tcb); } void -free_tls(void *tls, size_t tcbsize __unused, size_t tcbalign) +free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) { uintptr_t *dtv; size_t size, ralign; @@ -5632,9 +5631,9 @@ free_tls(void *tls, size_t tcbsize __unused, size_t tcbalign) ralign = tls_static_max_align; size = roundup(tls_static_space, ralign); - dtv = ((uintptr_t **)tls)[1]; + dtv = ((uintptr_t **)tcb)[1]; dtvsize = dtv[1]; - tlsend = (uintptr_t)tls; + tlsend = (uintptr_t)tcb; tlsstart = tlsend - size; for (i = 0; i < dtvsize; i++) { if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || @@ -5755,13 +5754,13 @@ free_tls_offset(Obj_Entry *obj) } void * -_rtld_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign) +_rtld_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { void *ret; RtldLockState lockstate; wlock_acquire(rtld_bind_lock, &lockstate); - ret = allocate_tls(globallist_curr(TAILQ_FIRST(&obj_list)), oldtls, + ret = allocate_tls(globallist_curr(TAILQ_FIRST(&obj_list)), oldtcb, tcbsize, tcbalign); lock_release(rtld_bind_lock, &lockstate); return (ret); From nobody Wed May 7 19:22: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 4Zt4rz2Nbrz5v9MJ; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4ry6hP7z49pg; Wed, 07 May 2025 19:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtpPzCNUdVTVBt+VTCS/V9ow/dOSdDv6PNMq85Yoy7w=; b=Wb0JekUYVcl0jA2qKvkHJi0L/3pj5DWGQVTAaklRyqGiGixV7nHjftEE4FLoAUOXCA9lsE cwGetHMZgXPFJeruE2WA8PB8NYbkvc2l1ETIYDSKAn3YTAftHw2P1iIize/Iy+iDNy9tEV 2DcMKIhU6JjNPXj2zdlUVlZa93dL1wHAgmFNb3Y8ISRHh5t7Gvb0s0x+NQ6ps9kDHqaxup Sr6C1DzvuiuYzMXsU/fnD0TdHp5/xq6wts348SEFi3OSvXOqtZgnQVfp334N+C9ZWqJYeI 2zVx+pa4U8wmjFrcoq3bijtgBx+1dpZ9YS19KhGKmVaVMLJwdClRslWWT/oAzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtpPzCNUdVTVBt+VTCS/V9ow/dOSdDv6PNMq85Yoy7w=; b=RHLRog0ymVaIhQrQpxHBL4BdA2r/6/TFAJSxMw9h4mkXafal8sJcHVsme4KboJcsBi7/aq ltFKIZnertiTYx1cFNq83QlOPHj6Th81NFPu7lpdnAKQcawTx5SKghsuHySfvfHgi42xFr qD9SkqEyQXRNPwTUEDwFuxU6T/TYvyJ1MkID5//r4LF5U/7pSONtfnHHMU4sVTNnXoeyJn +mDOe+sPg+DA2rI95lXO43b/Tnv87bNWMZyHSRToKjz3V6RMhLyi1eALpH1UDK9GF+hxNn z/DEr460Mk+jfuEte5UoDEqN5BkCnt0kjlVAWkQ4jjPMH8ZQLmwVhwwA5qy1Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645730; a=rsa-sha256; cv=none; b=ubSJo5amxgk2D/WjlnsyAIqt0CRCXg6DMDGCQseyxfKPKfNxBdfYUiCX+I5dX88lKTmR0u t3nHBLO1WHE9XyP0U6ljIAUr8BDHtXbFFvQeslh3XtwY5z3C/hjDMlh4dJewgFVf7/NYQL J94oNfBb4gKPTm4VRa5Bk9TtsF7wFdtQxrx2+80aI0LxIlWYohYAhQmdt7T3HQE5BmHs5c 5HxVE9u2Yu+ddrmsQRKdrZUiBcyVDFzo4Ti36c8kmQK9t0H65jT9qPpGcwLm8RSsSaVl+J zSHZLjyWcEmerSadiPfaVugFG8tDGxJQJrLsdHPRvRm8p7e8O6F1vjWognRXSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4ry5zyvzj9L; Wed, 07 May 2025 19:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JMAQR043098; Wed, 7 May 2025 19:22:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JMAd1043095; Wed, 7 May 2025 19:22:10 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:10 GMT Message-Id: <202505071922.547JMAd1043095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 3703f95c6fca - main - libc: Use struct tcb * rather than uintptr_t ** for the tcb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3703f95c6fcaede56bb1d62c4ac00b933e2eb887 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=3703f95c6fcaede56bb1d62c4ac00b933e2eb887 commit 3703f95c6fcaede56bb1d62c4ac00b933e2eb887 Author: Jessica Clarke AuthorDate: 2025-05-07 19:20:10 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:20:10 +0000 libc: Use struct tcb * rather than uintptr_t ** for the tcb This lets us access via named struct members rather than magic hard-coded indices. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50228 --- lib/libc/gen/tls.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 9772c99833d5..5b6970ad3905 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -201,10 +201,8 @@ void __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) { uintptr_t *dtv; - uintptr_t **tls; - tls = (uintptr_t **)tcb; - dtv = tls[0]; + dtv = ((struct tcb *)tcb)->tcb_dtv; __je_bootstrap_free(dtv); libc_free_aligned(get_tls_block_ptr(tcb, tcbsize)); } @@ -232,7 +230,8 @@ __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) void * __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { - uintptr_t *dtv, **tcb; + uintptr_t *dtv; + struct tcb *tcb; char *tls_block, *tls; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; @@ -261,7 +260,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) abort(); } memset(tls_block, 0, tls_block_size); - tcb = (uintptr_t **)(tls_block + pre_size + extra_size); + tcb = (struct tcb *)(tls_block + pre_size + extra_size); tls = (char *)tcb + TLS_TCB_SIZE + post_size; if (oldtcb != NULL) { @@ -270,7 +269,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) libc_free_aligned(oldtcb); /* Adjust the DTV. */ - dtv = tcb[0]; + dtv = tcb->tcb_dtv; dtv[2] = (uintptr_t)tls; } else { dtv = __je_bootstrap_malloc(3 * sizeof(uintptr_t)); @@ -279,7 +278,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) abort(); } /* Build the DTV. */ - tcb[0] = dtv; + tcb->tcb_dtv = dtv; dtv[0] = 1; /* Generation. */ dtv[1] = 1; /* Segments count. */ dtv[2] = (uintptr_t)tls; @@ -312,7 +311,7 @@ __libc_free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) tcbalign = MAX(tcbalign, libc_tls_init_align); size = roundup2(libc_tls_static_space, tcbalign); - dtv = ((uintptr_t **)tcb)[1]; + dtv = ((struct tcb *)tcb)->tcb_dtv; tlsend = (uintptr_t)tcb; tlsstart = tlsend - size; libc_free_aligned((void*)tlsstart); @@ -327,7 +326,8 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { size_t size; char *tls_block, *tls; - uintptr_t *dtv, **tcb; + uintptr_t *dtv; + struct tcb *tcb; tcbalign = MAX(tcbalign, libc_tls_init_align); size = roundup2(libc_tls_static_space, tcbalign); @@ -346,10 +346,10 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) abort(); } - tcb = (uintptr_t **)(tls_block + size); + tcb = (struct tcb *)(tls_block + size); tls = (char *)tcb - libc_tls_static_space; - tcb[0] = (uintptr_t *)tcb; - tcb[1] = dtv; + tcb->tcb_self = tcb; + tcb->tcb_dtv = dtv; dtv[0] = 1; dtv[1] = 1; From nobody Wed May 7 19:22: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 4Zt4s05J8rz5v944; Wed, 07 May 2025 19:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4s000tRz49px; Wed, 07 May 2025 19:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wynIkosMvXpTcu6siiF5Gs9hI3Y0QRfOmVB4FB1sh4=; b=dgkaK2sWI13eHNe0MfuGzbkV3jy4yNoUJRKiYBzQIn01XfFNIvNGTJ58RGHbwoa8qrCkDZ UGD/69l2gP1vJGaFIEmc0KwxFH8SYuNGFjBGBaIU3nx3pyIncvo1iLmhxIIivG5m4ofu7C vrN18r61vF8LbNiUDtfRIylRTlN2xwvhOxy6VvKYNDyvOnMA7rVttbmfU8bQqfg/GJ4nsX kuORJVz0pRKfmEaYDhh9bJDPfW3JgDDjtEVAupZ3H7VwosyfyQyFLJN/qxwpvFw6PHI28G +rirZEq6th3jA4UTsJbNbNOc7WnwNTFQn2sD2IUudhdRuD57qCL4E2IBgXd4ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wynIkosMvXpTcu6siiF5Gs9hI3Y0QRfOmVB4FB1sh4=; b=PTmEQ4wyM+miTUtY0J/m1SiHls5yB9FzApLGk3UJndvpRtYyCgz4jXOoyRTO0fx0mSey8a XfcUov9sZ00zypAm/IEUsg747ZmIr7YZkdsPheuVc4+RLtAxV1+XCrE8wKCzRkEBb8O4eU jHnAgx8XgNcntpznyoxm+ODBOYsOKBBUKpNcEzZeYHEIET6hlm14qAbDrGZEed91QD2P46 VaR0p4wXN+XuojrVt36zVC1YfQLxp8+xYhvEXTbTHtYyi2oOMohTBMOc2ek/HaUpHIhQhn PqCJasQpc73yQzu3QV39/iJfPbMacspUrH0SoGJUah2mQ8Iuo/CiY92/CCtLXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645732; a=rsa-sha256; cv=none; b=mCHd+B73zSFtr0B13CI+YL3m08ZyC99sicd9zhoA+W+ukk7TddEoAWEmZp33OIERvWhWvX P0becuPhEAO/djtgFkPdH3wv3IOD9E+0Cbt/6ImVrqkMGtm96w0G0SneeefFupDHXJwMAz K6Y5RqfryQpGDjbt2l8dZ4XS8NoCooua9BBmLvII5lcZ8L4jfASnc6GD16JWvF5XEXu0FO fhTHgMyeGs6K50DBCwIeto60dl/LC6Wu/BogKTVJGfn4WcjqhzgV/6B+DwoNRqgrZnUZIE dxqKMf9oyr0q7DfuCzRmq3qTprxk0gZFTmPbJeT80DzRHp3ANQ+vWLufh6T+Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4rz6dcPzjkS; Wed, 07 May 2025 19:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JMBOS043132; Wed, 7 May 2025 19:22:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JMB4Y043129; Wed, 7 May 2025 19:22:11 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:11 GMT Message-Id: <202505071922.547JMB4Y043129@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: b209947fc27c - main - rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b209947fc27ce60be866d8a16657485eedd97d55 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b209947fc27ce60be866d8a16657485eedd97d55 commit b209947fc27ce60be866d8a16657485eedd97d55 Author: Jessica Clarke AuthorDate: 2025-05-07 19:20:15 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:20:15 +0000 rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb This lets us access via named struct members rather than magic hard-coded indices. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50229 --- libexec/rtld-elf/rtld.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 8234efdecf53..44347e482c64 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5436,7 +5436,8 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) { Obj_Entry *obj; char *tls_block; - uintptr_t *dtv, **tcb; + uintptr_t *dtv; + struct tcb *tcb; char *addr; uintptr_t i; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; @@ -5459,7 +5460,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) /* Allocate whole TLS block */ tls_block = xmalloc_aligned(tls_block_size, maxalign, 0); - tcb = (uintptr_t **)(tls_block + pre_size + extra_size); + tcb = (struct tcb *)(tls_block + pre_size + extra_size); if (oldtcb != NULL) { memcpy(tls_block, get_tls_block_ptr(oldtcb, tcbsize), @@ -5467,7 +5468,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) free(get_tls_block_ptr(oldtcb, tcbsize)); /* Adjust the DTV. */ - dtv = tcb[0]; + dtv = tcb->tcb_dtv; for (i = 0; i < dtv[1]; i++) { if (dtv[i + 2] >= (uintptr_t)oldtcb && dtv[i + 2] < (uintptr_t)oldtcb + tls_static_space) { @@ -5477,7 +5478,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) } } else { dtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); - tcb[0] = dtv; + tcb->tcb_dtv = dtv; dtv[0] = tls_dtv_generation; dtv[1] = tls_max_index; @@ -5524,7 +5525,7 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) tlsstart = (uintptr_t)tcb + TLS_TCB_SIZE + post_size; tlsend = (uintptr_t)tcb + tls_static_space; - dtv = *(uintptr_t **)tcb; + dtv = ((struct tcb *)tcb)->tcb_dtv; dtvsize = dtv[1]; for (i = 0; i < dtvsize; i++) { if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || @@ -5550,7 +5551,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) size_t size, ralign; char *tls_block; uintptr_t *dtv, *olddtv; - uintptr_t **tcb; + struct tcb *tcb; char *addr; size_t i; @@ -5563,9 +5564,9 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) tls_block = xmalloc_aligned(size, ralign, 0 /* XXX */); dtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); - tcb = (uintptr_t **)(tls_block + roundup(tls_static_space, ralign)); - tcb[0] = (uintptr_t *)tcb; - tcb[1] = dtv; + tcb = (struct tcb *)(tls_block + roundup(tls_static_space, ralign)); + tcb->tcb_self = tcb; + tcb->tcb_dtv = dtv; dtv[0] = tls_dtv_generation; dtv[1] = tls_max_index; @@ -5582,7 +5583,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) * If any dynamic TLS blocks have been created tls_get_addr(), * move them over. */ - olddtv = ((uintptr_t **)oldtcb)[1]; + olddtv = ((struct tcb *)oldtcb)->tcb_dtv; for (i = 0; i < olddtv[1]; i++) { if (olddtv[i + 2] < (uintptr_t)oldtcb - size || olddtv[i + 2] > (uintptr_t)oldtcb) { @@ -5631,7 +5632,7 @@ free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) ralign = tls_static_max_align; size = roundup(tls_static_space, ralign); - dtv = ((uintptr_t **)tcb)[1]; + dtv = ((struct tcb *)tcb)->tcb_dtv; dtvsize = dtv[1]; tlsend = (uintptr_t)tcb; tlsstart = tlsend - size; From nobody Wed May 7 19:22: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 4Zt4s15xG3z5v9MN; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4s12gYyz49nf; Wed, 07 May 2025 19:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7V72Qe55/AZ9qPU7nK2VlxND4XgpV5WndGQFZEunpaI=; b=PfWWkoRuTmfo6msKAkxRfKP/DWQcuQIHNAmJ6FjTcS0YpMmbW2a1PMQ0ROf7139z6wouQ5 4SVAzL7iCZ8oB9Qj8mATxig8EkC9jXfXnyGuf20w8tAUglNNCU16qJVUEXIC0LdOFEvizH m++ftsytDd6k8lxrQEpukrAmmS0otac+7O4gWRz/xtM91TuJp98jU9MoxJacbucXcCwgf9 5JKYF39Q5KA7pJYh2qHTmoCY4V3Oy4Vh9blAE/z8X3xTipkCl+bgqwjnpMCbsPbF21MSm8 OHibmjq24P6A/NAWAL4m6Ap71d70UqK6lhgBw3ehjsbehYZ9Z7GhdjRGUukZDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7V72Qe55/AZ9qPU7nK2VlxND4XgpV5WndGQFZEunpaI=; b=hcvyYmOCWsPEedLf/SAYXz2HVVXN2hByNAZ5QMBsbv5DfSrOytJXnOISldGHjHz9v9W3X4 084BrCtLAQYwMApjRMpwanf/6Sz6g5New1FiHtIF7wWDMU45jnJbbBx9k7OOFN/JfFTp5t z1CQ3Is2r70323TyzmvkbTLDm+H/cfmWKHcBC7stIXaqZ7uJZdtafM1zrjQRIlWd9AMf5V aH7zzMq7Kan3AGYHZ32Bj9ohgqRroMXsBICFTfAviQe1ttHhwK9VCNCTGfym/lDaj4WTm4 H6YO6gC7CcBBTu61fsxBWUF74HPcS2iWAWO/IPOkTs0Wz4Sh2z5AMQCayi81jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645733; a=rsa-sha256; cv=none; b=sdAV8YRxc7Wx957b/iRSy/kgLaDqbIWaAig+p78JcJb4G3c1Ohy+ZRVdH7+Jzenr3kd3Gx REioht3wIGsRi4UrdkpfLBQaKTfbXOGxqHuO6oaoClkr+sAC5wQspitfL6/ELWtCtRGGkR 9qEz8EA5eUm1aX27/mgK98xM0XR/dI+NftACGaLNtLXlnXAOqjEp1hafkbDkVNJGlH8B4S XEgQnwYhR3+5SnB5bIPBaVlwHO2b7iqUSQOfYV784SslyoE5Bg16JVXSXlBfMlFeSqDj/D KU0G+TVvYMXBHOWray58570wnP5/LdlM67FhICf4XgK93McxxSEQjMCNEYwftQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4s10jKPzjhN; Wed, 07 May 2025 19:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JMCop043164; Wed, 7 May 2025 19:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JMCR4043161; Wed, 7 May 2025 19:22:12 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:12 GMT Message-Id: <202505071922.547JMCR4043161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 0d12f495d8d9 - main - rtld-elf: Use clear pointer provenance when updating DTV pointer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d12f495d8d9442352afa9dfc59a0b078c7b2852 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=0d12f495d8d9442352afa9dfc59a0b078c7b2852 commit 0d12f495d8d9442352afa9dfc59a0b078c7b2852 Author: Jessica Clarke AuthorDate: 2025-05-07 19:20:20 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:20:20 +0000 rtld-elf: Use clear pointer provenance when updating DTV pointer On traditional architectures where uintptr_t is just a plain integer, there is no provenance from the order of operations. However, on CHERI there is even for uintptr_t, and in future this code will use actual pointer types anyway, where the provenance does technically matter even for non-CHERI. Commute and associate the operands appropriately to ensure the provenance is for the new allocation, not the old one. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50230 --- libexec/rtld-elf/rtld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 44347e482c64..cd564daa94a6 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5472,8 +5472,8 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) for (i = 0; i < dtv[1]; i++) { if (dtv[i + 2] >= (uintptr_t)oldtcb && dtv[i + 2] < (uintptr_t)oldtcb + tls_static_space) { - dtv[i + 2] = dtv[i + 2] - (uintptr_t)oldtcb + - (uintptr_t)tcb; + dtv[i + 2] = (uintptr_t)((char *)tcb + + ((char *)dtv[i + 2] - (char *)oldtcb)); } } } else { From nobody Wed May 7 19:22: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 4Zt4s30B4hz5v9C5; Wed, 07 May 2025 19:22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt4s21btzz49tJ; Wed, 07 May 2025 19:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DFsOr5qvJu7Ac0TWi2tLcy3C5zM9LhD4B/ITLT8/AAI=; b=gheSH5DSWuz/nXeORMeLxpHaFv+cfL7pHaGg/GPcAHGqJRy8qG8zk6s0nLj+nrL40Ju3/E OPQ98q98u0WLXoCE+DjSO3JNE7z++9qDiCQ+FPGGcdVq9gGLhfq4pydRNbag91BpNIGOFS qPRwoJ6KFBXbyX+HBi/OZDxddNwKtHxje6vbRtjkUABc4eJ9CMDO/lomJ+xLCms+CVClGH uuZjhVESz2owcfxK5HS6uf3avoql4W8CLaJkOEbAJ1fF7tUfY/0/vv19wX5hfh+6eGXOt2 TueX9Q4aRyHqtVU9voyhO1jvzEkPpZGFswH0ZRK+FRbdTC5xUDcvgQPmM2KmYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746645734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DFsOr5qvJu7Ac0TWi2tLcy3C5zM9LhD4B/ITLT8/AAI=; b=j6NDrnRTpxqN7yUDsUrLgqndYB34lYDsMW7WgPrOPOzkyiE7LhULKfd6nyrXWF65XiBV6p Rdtl/rVsB95yyXr3qa7cvIA/F8Nnp69RqsvMteqDaU+G1oHsjwQ0pvkfHDJZptIPxYPGGR kgVZnO6XX6bLJKSEJovOqsbQLwESQc9qHjPhsQmYix4LsugTZhlLblSWUpoxv4WsuB0xtO QuY7rga582sNqBEwo+++qSofrhvh3XOSdNbI6Fl3jlpc2/yRqvpTgqCIOVMJgBcJ/dbyxa Bs9JCYwHR0GYBB8VRb0Ly8mK51N+g+xgUH2G0hXbkXjFWcAmMuPo6aPCdACkEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746645734; a=rsa-sha256; cv=none; b=xNJuTi/unI7uGYqJATdceuWOPnLVbAuWJQS/KLCZaNc+8VgJQPxkwOaf9kmv2vGjyUqQFM LNdw/Sw8eodyeaAbd79AKjMOkRc9hV8rzz4HrySyhRt2D77TUyZg47D0h+i/BC/4gUDZxQ iJ7o7vyyISq0Ef8H158j/5WEEssps0oPodMQPHNIZ/NUfp/7bsnVhvEdYeylZg62mfazvZ uACx+u0tsxVTcQcoCvB4QJN39ep35Mn0/zrxQ+sk/ZwEbgMGzL/U+j9jwXNpo/lej5Grkf CESL4BKZd3LlHZTiMXE3kjj000NETJZ3xzrLiRjSePFlhlEjnenhR0OKK27aIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt4s210Rfzjtc; Wed, 07 May 2025 19:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547JMEXY043196; Wed, 7 May 2025 19:22:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547JMEi5043193; Wed, 7 May 2025 19:22:14 GMT (envelope-from git) Date: Wed, 7 May 2025 19:22:14 GMT Message-Id: <202505071922.547JMEi5043193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 48cce2a2982f - main - tls: Introduce struct dtv and struct dtv_slot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48cce2a2982ff3d13327c6cfbdf9441539ce42b3 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=48cce2a2982ff3d13327c6cfbdf9441539ce42b3 commit 48cce2a2982ff3d13327c6cfbdf9441539ce42b3 Author: Jessica Clarke AuthorDate: 2025-05-07 19:20:26 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 19:20:26 +0000 tls: Introduce struct dtv and struct dtv_slot Rather than treating the DTV as a raw array of uintptr_t, use proper struct types and gain the benefit of having different types for different members. In particular, the module slots now have real pointer types so less casting is generally needed. Note that, whilst struct dtv_slot may seem a little unnecessary, this will help downstream in CheriBSD where we wish to be able to easily alter the layout of a module's slot, which this helps abstract. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50231 --- lib/libc/gen/tls.c | 34 ++++++----- libexec/rtld-elf/aarch64/reloc.c | 2 +- libexec/rtld-elf/amd64/reloc.c | 2 +- libexec/rtld-elf/arm/reloc.c | 2 +- libexec/rtld-elf/i386/reloc.c | 4 +- libexec/rtld-elf/powerpc/reloc.c | 2 +- libexec/rtld-elf/powerpc64/reloc.c | 2 +- libexec/rtld-elf/riscv/reloc.c | 2 +- libexec/rtld-elf/rtld.c | 118 ++++++++++++++++++++----------------- libexec/rtld-elf/rtld.h | 2 +- sys/sys/_tls_variant_i.h | 12 +++- sys/x86/include/tls.h | 12 +++- 12 files changed, 114 insertions(+), 80 deletions(-) diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 5b6970ad3905..b26b13d45589 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -80,13 +80,13 @@ static void *libc_tls_init; void * __libc_tls_get_addr(void *vti) { - uintptr_t *dtv; + struct dtv *dtv; tls_index *ti; dtv = _tcb_get()->tcb_dtv; ti = vti; - return ((char *)dtv[ti->ti_module + 1] + (ti->ti_offset + - TLS_DTV_OFFSET)); + return (dtv->dtv_slots[ti->ti_module - 1].dtvs_tls + + (ti->ti_offset + TLS_DTV_OFFSET)); } #ifdef __i386__ @@ -200,7 +200,7 @@ get_tls_block_ptr(void *tcb, size_t tcbsize) void __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) { - uintptr_t *dtv; + struct dtv *dtv; dtv = ((struct tcb *)tcb)->tcb_dtv; __je_bootstrap_free(dtv); @@ -230,7 +230,7 @@ __libc_free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) void * __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { - uintptr_t *dtv; + struct dtv *dtv; struct tcb *tcb; char *tls_block, *tls; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; @@ -270,18 +270,19 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) /* Adjust the DTV. */ dtv = tcb->tcb_dtv; - dtv[2] = (uintptr_t)tls; + dtv->dtv_slots[0].dtvs_tls = tls; } else { - dtv = __je_bootstrap_malloc(3 * sizeof(uintptr_t)); + dtv = __je_bootstrap_malloc(sizeof(struct dtv) + + sizeof(struct dtv_slot)); if (dtv == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); } /* Build the DTV. */ tcb->tcb_dtv = dtv; - dtv[0] = 1; /* Generation. */ - dtv[1] = 1; /* Segments count. */ - dtv[2] = (uintptr_t)tls; + dtv->dtv_gen = 1; /* Generation. */ + dtv->dtv_size = 1; /* Segments count. */ + dtv->dtv_slots[0].dtvs_tls = tls; if (libc_tls_init_size > 0) memcpy(tls, libc_tls_init, libc_tls_init_size); @@ -301,7 +302,7 @@ void __libc_free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) { size_t size; - uintptr_t *dtv; + struct dtv *dtv; uintptr_t tlsstart, tlsend; /* @@ -326,7 +327,7 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) { size_t size; char *tls_block, *tls; - uintptr_t *dtv; + struct dtv *dtv; struct tcb *tcb; tcbalign = MAX(tcbalign, libc_tls_init_align); @@ -340,7 +341,8 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) abort(); } memset(tls_block, 0, size + tcbsize); - dtv = __je_bootstrap_malloc(3 * sizeof(uintptr_t)); + dtv = __je_bootstrap_malloc(sizeof(struct dtv) + + sizeof(struct dtv_slot)); if (dtv == NULL) { tls_msg("__libc_allocate_tls: Out of memory.\n"); abort(); @@ -351,9 +353,9 @@ __libc_allocate_tls(void *oldtcb, size_t tcbsize, size_t tcbalign) tcb->tcb_self = tcb; tcb->tcb_dtv = dtv; - dtv[0] = 1; - dtv[1] = 1; - dtv[2] = (uintptr_t)tls; + dtv->dtv_gen = 1; + dtv->dtv_size = 1; + dtv->dtv_slots[0].dtvs_tls = tls; if (oldtcb != NULL) { /* diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index 3687c9385326..8182bb428bd2 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -629,7 +629,7 @@ allocate_initial_tls(Obj_Entry *objs) void * __tls_get_addr(tls_index* ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset)); diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index b5750ac746b2..373a1cdd2d06 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -556,7 +556,7 @@ allocate_initial_tls(Obj_Entry *objs) void * __tls_get_addr(tls_index *ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset)); diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index b10e6ce844d5..7bb7ce83e1bd 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -465,7 +465,7 @@ allocate_initial_tls(Obj_Entry *objs) void * __tls_get_addr(tls_index* ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset)); diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index 3d724bcacb6f..ff4b1ebbb148 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -523,7 +523,7 @@ allocate_initial_tls(Obj_Entry *objs) __attribute__((__regparm__(1))) void * ___tls_get_addr(tls_index *ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset)); @@ -533,7 +533,7 @@ ___tls_get_addr(tls_index *ti) void * __tls_get_addr(tls_index *ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset)); diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 4d5b1be6a429..283a02c53511 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -837,7 +837,7 @@ allocate_initial_tls(Obj_Entry *list) void* __tls_get_addr(tls_index* ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset + diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index b0b5ca6419f7..b1ca871d2780 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -734,7 +734,7 @@ allocate_initial_tls(Obj_Entry *list) void* __tls_get_addr(tls_index* ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset + diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c index 80a0acd3510f..4b61c4b9a061 100644 --- a/libexec/rtld-elf/riscv/reloc.c +++ b/libexec/rtld-elf/riscv/reloc.c @@ -495,7 +495,7 @@ allocate_initial_tls(Obj_Entry *objs) void * __tls_get_addr(tls_index* ti) { - uintptr_t **dtvp; + struct dtv **dtvp; dtvp = &_tcb_get()->tcb_dtv; return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset + diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index cd564daa94a6..3a6863abfe0d 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -170,7 +170,7 @@ static int symlook_list(SymLook *, const Objlist *, DoneList *); static int symlook_needed(SymLook *, const Needed_Entry *, DoneList *); static int symlook_obj1_sysv(SymLook *, const Obj_Entry *); static int symlook_obj1_gnu(SymLook *, const Obj_Entry *); -static void *tls_get_addr_slow(uintptr_t **, int, size_t, bool) __noinline; +static void *tls_get_addr_slow(struct dtv **, int, size_t, bool) __noinline; static void trace_loaded_objects(Obj_Entry *, bool); static void unlink_object(Obj_Entry *); static void unload_object(Obj_Entry *, RtldLockState *lockstate); @@ -4312,7 +4312,7 @@ dlinfo(void *handle, int request, void *p) static void rtld_fill_dl_phdr_info(const Obj_Entry *obj, struct dl_phdr_info *phdr_info) { - uintptr_t **dtvp; + struct dtv **dtvp; phdr_info->dlpi_addr = (Elf_Addr)obj->relocbase; phdr_info->dlpi_name = obj->path; @@ -5350,24 +5350,26 @@ unref_dag(Obj_Entry *root) * Common code for MD __tls_get_addr(). */ static void * -tls_get_addr_slow(uintptr_t **dtvp, int index, size_t offset, bool locked) +tls_get_addr_slow(struct dtv **dtvp, int index, size_t offset, bool locked) { - uintptr_t *newdtv, *dtv; + struct dtv *newdtv, *dtv; RtldLockState lockstate; int to_copy; dtv = *dtvp; /* Check dtv generation in case new modules have arrived */ - if (dtv[0] != tls_dtv_generation) { + if (dtv->dtv_gen != tls_dtv_generation) { if (!locked) wlock_acquire(rtld_bind_lock, &lockstate); - newdtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); - to_copy = dtv[1]; + newdtv = xcalloc(1, sizeof(struct dtv) + tls_max_index * + sizeof(struct dtv_slot)); + to_copy = dtv->dtv_size; if (to_copy > tls_max_index) to_copy = tls_max_index; - memcpy(&newdtv[2], &dtv[2], to_copy * sizeof(uintptr_t)); - newdtv[0] = tls_dtv_generation; - newdtv[1] = tls_max_index; + memcpy(newdtv->dtv_slots, dtv->dtv_slots, to_copy * + sizeof(struct dtv_slot)); + newdtv->dtv_gen = tls_dtv_generation; + newdtv->dtv_size = tls_max_index; free(dtv); if (!locked) lock_release(rtld_bind_lock, &lockstate); @@ -5375,27 +5377,29 @@ tls_get_addr_slow(uintptr_t **dtvp, int index, size_t offset, bool locked) } /* Dynamically allocate module TLS if necessary */ - if (dtv[index + 1] == 0) { + if (dtv->dtv_slots[index - 1].dtvs_tls == 0) { /* Signal safe, wlock will block out signals. */ if (!locked) wlock_acquire(rtld_bind_lock, &lockstate); - if (!dtv[index + 1]) - dtv[index + 1] = (uintptr_t)allocate_module_tls(index); + if (!dtv->dtv_slots[index - 1].dtvs_tls) + dtv->dtv_slots[index - 1].dtvs_tls = + allocate_module_tls(index); if (!locked) lock_release(rtld_bind_lock, &lockstate); } - return ((void *)(dtv[index + 1] + offset)); + return (dtv->dtv_slots[index - 1].dtvs_tls + offset); } void * -tls_get_addr_common(uintptr_t **dtvp, int index, size_t offset) +tls_get_addr_common(struct dtv **dtvp, int index, size_t offset) { - uintptr_t *dtv; + struct dtv *dtv; dtv = *dtvp; /* Check dtv generation in case new modules have arrived */ - if (__predict_true(dtv[0] == tls_dtv_generation && dtv[index + 1] != 0)) - return ((void *)(dtv[index + 1] + offset)); + if (__predict_true(dtv->dtv_gen == tls_dtv_generation && + dtv->dtv_slots[index - 1].dtvs_tls != 0)) + return (dtv->dtv_slots[index - 1].dtvs_tls + offset); return (tls_get_addr_slow(dtvp, index, offset, false)); } @@ -5436,7 +5440,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) { Obj_Entry *obj; char *tls_block; - uintptr_t *dtv; + struct dtv *dtv; struct tcb *tcb; char *addr; uintptr_t i; @@ -5469,18 +5473,22 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) /* Adjust the DTV. */ dtv = tcb->tcb_dtv; - for (i = 0; i < dtv[1]; i++) { - if (dtv[i + 2] >= (uintptr_t)oldtcb && - dtv[i + 2] < (uintptr_t)oldtcb + tls_static_space) { - dtv[i + 2] = (uintptr_t)((char *)tcb + - ((char *)dtv[i + 2] - (char *)oldtcb)); + for (i = 0; i < dtv->dtv_size; i++) { + if ((uintptr_t)dtv->dtv_slots[i].dtvs_tls >= + (uintptr_t)oldtcb && + (uintptr_t)dtv->dtv_slots[i].dtvs_tls < + (uintptr_t)oldtcb + tls_static_space) { + dtv->dtv_slots[i].dtvs_tls = (char *)tcb + + (dtv->dtv_slots[i].dtvs_tls - + (char *)oldtcb); } } } else { - dtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); + dtv = xcalloc(1, sizeof(struct dtv) + tls_max_index * + sizeof(struct dtv_slot)); tcb->tcb_dtv = dtv; - dtv[0] = tls_dtv_generation; - dtv[1] = tls_max_index; + dtv->dtv_gen = tls_dtv_generation; + dtv->dtv_size = tls_max_index; for (obj = globallist_curr(objs); obj != NULL; obj = globallist_next(obj)) { @@ -5501,7 +5509,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) obj->tlssize - obj->tlsinitsize - tls_init_offset); } - dtv[obj->tlsindex + 1] = (uintptr_t)addr; + dtv->dtv_slots[obj->tlsindex - 1].dtvs_tls = addr; } } @@ -5511,10 +5519,10 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) void free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) { - uintptr_t *dtv; + struct dtv *dtv; uintptr_t tlsstart, tlsend; size_t post_size; - size_t dtvsize, i, tls_init_align __unused; + size_t i, tls_init_align __unused; assert(tcbsize >= TLS_TCB_SIZE); tls_init_align = MAX(obj_main->tlsalign, 1); @@ -5526,11 +5534,11 @@ free_tls(void *tcb, size_t tcbsize, size_t tcbalign __unused) tlsend = (uintptr_t)tcb + tls_static_space; dtv = ((struct tcb *)tcb)->tcb_dtv; - dtvsize = dtv[1]; - for (i = 0; i < dtvsize; i++) { - if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || - dtv[i + 2] >= tlsend)) { - free((void *)dtv[i + 2]); + for (i = 0; i < dtv->dtv_size; i++) { + if (dtv->dtv_slots[i].dtvs_tls != NULL && + ((uintptr_t)dtv->dtv_slots[i].dtvs_tls < tlsstart || + (uintptr_t)dtv->dtv_slots[i].dtvs_tls >= tlsend)) { + free(dtv->dtv_slots[i].dtvs_tls); } } free(dtv); @@ -5550,7 +5558,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) Obj_Entry *obj; size_t size, ralign; char *tls_block; - uintptr_t *dtv, *olddtv; + struct dtv *dtv, *olddtv; struct tcb *tcb; char *addr; size_t i; @@ -5562,14 +5570,15 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) assert(tcbsize >= 2 * sizeof(uintptr_t)); tls_block = xmalloc_aligned(size, ralign, 0 /* XXX */); - dtv = xcalloc(tls_max_index + 2, sizeof(uintptr_t)); + dtv = xcalloc(1, sizeof(struct dtv) + tls_max_index * + sizeof(struct dtv_slot)); tcb = (struct tcb *)(tls_block + roundup(tls_static_space, ralign)); tcb->tcb_self = tcb; tcb->tcb_dtv = dtv; - dtv[0] = tls_dtv_generation; - dtv[1] = tls_max_index; + dtv->dtv_gen = tls_dtv_generation; + dtv->dtv_size = tls_max_index; if (oldtcb != NULL) { /* @@ -5584,11 +5593,14 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) * move them over. */ olddtv = ((struct tcb *)oldtcb)->tcb_dtv; - for (i = 0; i < olddtv[1]; i++) { - if (olddtv[i + 2] < (uintptr_t)oldtcb - size || - olddtv[i + 2] > (uintptr_t)oldtcb) { - dtv[i + 2] = olddtv[i + 2]; - olddtv[i + 2] = 0; + for (i = 0; i < olddtv->dtv_size; i++) { + if ((uintptr_t)olddtv->dtv_slots[i].dtvs_tls < + (uintptr_t)oldtcb - size || + (uintptr_t)olddtv->dtv_slots[i].dtvs_tls > + (uintptr_t)oldtcb) { + dtv->dtv_slots[i].dtvs_tls = + olddtv->dtv_slots[i].dtvs_tls; + olddtv->dtv_slots[i].dtvs_tls = NULL; } } @@ -5608,7 +5620,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) memcpy(addr, obj->tlsinit, obj->tlsinitsize); obj->static_tls_copied = true; } - dtv[obj->tlsindex + 1] = (uintptr_t)addr; + dtv->dtv_slots[obj->tlsindex - 1].dtvs_tls = addr; } } @@ -5618,9 +5630,9 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) void free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) { - uintptr_t *dtv; + struct dtv *dtv; size_t size, ralign; - int dtvsize, i; + size_t i; uintptr_t tlsstart, tlsend; /* @@ -5633,18 +5645,18 @@ free_tls(void *tcb, size_t tcbsize __unused, size_t tcbalign) size = roundup(tls_static_space, ralign); dtv = ((struct tcb *)tcb)->tcb_dtv; - dtvsize = dtv[1]; tlsend = (uintptr_t)tcb; tlsstart = tlsend - size; - for (i = 0; i < dtvsize; i++) { - if (dtv[i + 2] != 0 && (dtv[i + 2] < tlsstart || - dtv[i + 2] > tlsend)) { - free((void *)dtv[i + 2]); + for (i = 0; i < dtv->dtv_size; i++) { + if (dtv->dtv_slots[i].dtvs_tls != NULL && + ((uintptr_t)dtv->dtv_slots[i].dtvs_tls < tlsstart || + (uintptr_t)dtv->dtv_slots[i].dtvs_tls > tlsend)) { + free(dtv->dtv_slots[i].dtvs_tls); } } free((void *)tlsstart); - free((void *)dtv); + free(dtv); } #endif /* TLS_VARIANT_II */ diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index a15c1d6d159f..a92350b9387c 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -415,7 +415,7 @@ void _rtld_bind_start(void); void *rtld_resolve_ifunc(const Obj_Entry *obj, const Elf_Sym *def); void symlook_init(SymLook *, const char *); int symlook_obj(SymLook *, const Obj_Entry *); -void *tls_get_addr_common(uintptr_t **dtvp, int index, size_t offset); +void *tls_get_addr_common(struct dtv **dtvp, int index, size_t offset); void *allocate_tls(Obj_Entry *, void *, size_t, size_t); void free_tls(void *, size_t, size_t); void *allocate_module_tls(int index); diff --git a/sys/sys/_tls_variant_i.h b/sys/sys/_tls_variant_i.h index 0207585871b9..90defd41f309 100644 --- a/sys/sys/_tls_variant_i.h +++ b/sys/sys/_tls_variant_i.h @@ -37,8 +37,18 @@ struct pthread; +struct dtv_slot { + char *dtvs_tls; +}; + +struct dtv { + uintptr_t dtv_gen; + uintptr_t dtv_size; + struct dtv_slot dtv_slots[]; +}; + struct tcb { - uintptr_t *tcb_dtv; /* required by rtld */ + struct dtv *tcb_dtv; /* required by rtld */ struct pthread *tcb_thread; }; diff --git a/sys/x86/include/tls.h b/sys/x86/include/tls.h index 4b6b58b4a5e3..29d036fd4871 100644 --- a/sys/x86/include/tls.h +++ b/sys/x86/include/tls.h @@ -36,13 +36,23 @@ struct pthread; +struct dtv_slot { + char *dtvs_tls; +}; + +struct dtv { + uintptr_t dtv_gen; + uintptr_t dtv_size; + struct dtv_slot dtv_slots[]; +}; + /* * Variant II tcb, first two members are required by rtld, * %fs (amd64) / %gs (i386) points to the structure. */ struct tcb { struct tcb *tcb_self; /* required by rtld */ - uintptr_t *tcb_dtv; /* required by rtld */ + struct dtv *tcb_dtv; /* required by rtld */ struct pthread *tcb_thread; }; From nobody Wed May 7 19:47:46 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 4Zt5QZ5JsDz5vBR4; Wed, 07 May 2025 19:47:50 +0000 (UTC) (envelope-from garga@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt5QZ3836z3VC3; Wed, 07 May 2025 19:47:50 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746647270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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=dD67KiU5uTOtbwwrRYbg5JKxSDqhaVm5Q2r2DHqB70s=; b=foWUQKp5g0+OH8O/j8JRmYZaNzQzKgdEuIfhSUdsu9330mrpQx+JdQK3RZRGHFP5vLs5v5 TAVk3NrqbvcNVt11RX/8VF5eNk2HfWcqziYrWZpqAbpzH9PQA+N7Vepk7X0usGFPQSYN/L Dwk194JDuvqbwPbeX1McugSY3PKQORU1NdDTfsgH/EvTtzxSIleYSeWXkVpM44Vu1VBx0t xsNF1FurFXqTYIUZGj9ucUF15ULL0utWRNz/j1W5vU/rcG+KbXiPjS4qfgCsRAdcz/6+dj D0x1LwVKso5ExGlA1In2/2imSUTH42sgkzDtRAaTCOdaI81c3r5wbUNU5fEVgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746647270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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=dD67KiU5uTOtbwwrRYbg5JKxSDqhaVm5Q2r2DHqB70s=; b=efVrkOn+CMdBNKSBQyxWcCd0lvoqBbSDoKQtxmdM0TXxraGxBNcBNEt7pXv2TFLIwPePAu ap4ERUKe2NvzgE0RCTez6FDeXLjogonzAJ6XfsVF7dZVT7IXnrbbKqznQuHRXj/H2lkz8U UieoZ/sqEeUGOcO3IaPMjo+wcO1rNVgYQVRMoFhOdJzqb215J17opDJbT0xmzGf8XtEOi5 f5xyblfAlrd6imDPsqVIDPHcjyIqVri7hInhDuta2+f3Id7yqibjbjwp+CX5AGnpXHV0MM /CLm9W5MMDJxMZPmhaN/7U9EeoZlgjkCkoEyZrjceNf/7aZHx1Hp5bPM+j60Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746647270; a=rsa-sha256; cv=none; b=UdNxAoY7wBAGscOsxt4lZvAPtTSlgWwwPEPiBL4jxVJ/VehgdZ6Fiovh35RMBOzku8V1YC lJCJPtv6C5BtGFdLHx2bDfNvYvvKrcTvjo1L9zvyoi7azguXBLfr73/w3hy1Ji0TrlDxVV Ie6veUWbDnu+WAhZ7pMfFejf0vOdk9NqWj3gCsjgsDuPQM9R2iMnESee23SblGBRHo4b5M 907k95Hhve0hguPt3ox+gxJgWr1yC7sgCqYD5WRVTfvMbffTXhkeB48B0WLvRp9iXLLO9/ 7Qv8RK8pWyUO/Nbcpb+D0Y6YBATTMYxP8A4KDUA4sQwSvsxaFabEYGzNIOqOHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2804:f1c:8a5:1801:d0c3:ce97:a9d1:9461] (unknown [IPv6:2804:f1c:8a5:1801:d0c3:ce97:a9d1:9461]) (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: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Zt5QY4P3ZzFZj; Wed, 07 May 2025 19:47:49 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: Date: Wed, 7 May 2025 16:47:46 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: ee9cfd727578 - main - bsdinstall: add pkgbase target To: Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Isaac Freund References: <202504281614.53SGE7HH057518__27995.3302627959$1745856891$gmane$org@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: <202504281614.53SGE7HH057518__27995.3302627959$1745856891$gmane$org@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 28/04/25 13:14, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ee9cfd7275784b61b030beb242df588bb35b21f0 > > commit ee9cfd7275784b61b030beb242df588bb35b21f0 > Author: Isaac Freund > AuthorDate: 2025-04-01 23:25:49 +0000 > Commit: Ed Maste > CommitDate: 2025-04-28 16:12:27 +0000 > > bsdinstall: add pkgbase target > > Reviewed by: ziaee (manpages), kevans (lua), emaste > Relnotes: Yes > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D49822 I've rebuilt current with WITHOUT_BSDINSTALL=yes and there are 3 remaining files at /usr/libexec/bsdinstall that are not removed by make delete-old: pkgbase finalconfig firmware pkgbase was introduced by this commit -- Renato Botelho From nobody Wed May 7 20: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 4Zt6Fy2jGGz5vF0T; Wed, 07 May 2025 20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt6Fy1schz401T; Wed, 07 May 2025 20: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=1746649526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKz72E9KTEoUKobsi2i00cG1dFKd2ydTK61fw+L80aM=; b=wTNrJ9pBsNh7iTwX58vjgITZgdB2Uw87a33byMTKG0IbK+S4iczizEMgwOSrUaGdH+7+N3 +KB2fHBpPClNcyaN6fNw8RxUMlMSad42U3uSM3iGAhEuBrklZ8sfbWQczE0iIDU9JWjgJ5 O0X/1+H7fTyZYxDNk7inJU20XMX4bk2nAUo++9nn8JYT9EeWqS74bgLzR5cin5oUhklxAR f6kP9e2lqQzrb1QzboKTvkfuMfJkzd63qRU8+9UqAt6wF5WUNhizlo3iJaBQHfGstLwsbM BZ6RYoAmUpGSRm+XhNNrwazZ4kJwruzsHwZPo8LF20qSHPHoTtR32L9GMI8Ozw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746649526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKz72E9KTEoUKobsi2i00cG1dFKd2ydTK61fw+L80aM=; b=VCPGHHbYbHmqBK3/nb6/61PIw2gXgr7RGfqA8gLkZpQUw+V5McNtcl8pBlUm7oeTHI0mBH bHI29IGQzugIib68y1RWlYR0yvei7D/21QDFnYpkCUGrCnOsAO0cfdqWzUV2cvxEvrmeGG f+9IctfJBK+i8yy+sYC7nzV/69hZD53RSnuorMGPlYm0KKKeSLLG+GXjzsR7KCizgT9XSe Tx1a5eM+VMj6osnTDdzb9AEs/qeWKIySeZMth5fD4AreDYZiEmPQw991VjDjr+weJw1yCr v/yWmecMSprOCylnF11FjOL9qQn+1T261ttPKdbhfhNE/Sv8mwuvIsAZ0KEK9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746649526; a=rsa-sha256; cv=none; b=QPEUC2LQ6I99munTlLYDgEB/zj5tkg/aSOzrQKI18eMrnqkI9Jgx84ToILLEFRRr908XXQ xEYCnUoVB57Oka58KWwpCPArogUJar+4SiEVkM/i1y7G3RuSDOSUSvjKhiWeS+ObC0VD1m Dsw39XghLcTL7SI0X04p1W/TCEFvPZFNG9YHppfK+i3IM5teo4aTm7kFOU+4Tj9m4MMoYM sNW8C3an+voeSBgo/thvOTcjnQGaoeNgLWvDX/ep3mvqI4oclS6og4vhLCddpg+606vvCB YzY6FXhgVp1XKGK8WrrmUI5ULR0tTc50H2AlMSr6UEUjb5PcrdR7pHqPXT7HrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt6Fy1CP4zlKh; Wed, 07 May 2025 20:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547KPQrO059928; Wed, 7 May 2025 20:25:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547KPQsD059925; Wed, 7 May 2025 20:25:26 GMT (envelope-from git) Date: Wed, 7 May 2025 20:25:26 GMT Message-Id: <202505072025.547KPQsD059925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 4b656ded9248 - main - Refactor pre-commit CI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 4b656ded9248840ebc7afb8aba2384c8b0a2afb3 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=4b656ded9248840ebc7afb8aba2384c8b0a2afb3 commit 4b656ded9248840ebc7afb8aba2384c8b0a2afb3 Author: Muhammad Moinur Rahman AuthorDate: 2025-05-07 20:23:57 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2025-05-07 20:25:18 +0000 Refactor pre-commit CI Currently our test mechanism is not fit for building without cross-toolchain as we are not allowing EXTRA_MAKE_FLAGS. Also we are not allowing to build and test other KERNCONF. So allow these variables to be overridden in command line. Approved by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50220 --- tests/ci/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index e51c97fa2b83..e6464e8392e6 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -27,6 +27,7 @@ PARALLEL_JOBS!=sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null TOTAL_MEMORY!=expr ${_MEMORY} / 1073741824 KERNCONF?= GENERIC LOCALBASE?= /usr/local +EXTRA_MAKE_FLAGS?= .if !defined(TARGET) || empty(TARGET) TARGET= ${MACHINE} @@ -167,15 +168,16 @@ ci-buildworld: .PHONY @echo "Building world for ${TARGET_ARCH}" ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \ ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} \ - buildworld > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ + ${EXTRA_MAKE_FLAGS} buildworld > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) ci-buildkernel: ci-buildworld-${TARGET_ARCH:tl} .PHONY @echo "Building kernel for ${TARGET_ARCH"}" ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \ - ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} \ - SRCCONF=${SRCCONF} buildkernel > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ + ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} + ${EXTRA_MAKE_FLAGS} KERNCONF=${KERNCONF} \ + buildkernel > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) ci-buildimage: ${QEMUTGT} ci-buildkernel-${TARGET_ARCH:tl} .PHONY From nobody Wed May 7 21:20: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 4Zt7Tx5jSXz5vJ3V; Wed, 07 May 2025 21:20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7Tx5FTDz3VJH; Wed, 07 May 2025 21:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746652853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nqSdyDq0LJKE2a5vQLJluUhNWHK/MwExbxnXqgbznuc=; b=gG6yDJaRvfvj+iRsW/+bgGn5K3oSRzee1zTenn4th6HQ+FtN6v4XaoM5iULWmFD7Py8J1F jf7ni4hGVvYV0L+Nw4rtgMG5b8NrXSYknef6hgO5ts2yguenNqeEHe75Li0XahRPlKQSGt v1fmtfOFFVqaSWWLCygneJ+4K9kIRheVX2rROyZQheJ9qOPBMx7fN+c5taiStEiUpPEvzm 8qz17rxqqTj0L2Pt4QjqHxj+8suty5guR+bCJG2Eb/2Wp6PQxDVCx0xdKVUN8J8o0DJT4x M/Tst20s36QwiscfKdQWG42Iq3fr+t53Du1oyalO/xp7bKcMcAKx1cJ0dqyUQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746652853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nqSdyDq0LJKE2a5vQLJluUhNWHK/MwExbxnXqgbznuc=; b=g7XvBWHiHPDu3ksos0TQVLyG+xJcnS+KArAa9xg0hGxuU8dvETyYx0Y9xepKN4LeNcZCbh Q1vGgqEF8YQPZR2XGf6zLfIWnBr/FKbfad2Nj6NGimqCT9QS0gbUWnwVNDht/7Ug0yu+CJ n5rXFoxPWC5KB9NICX6Oma4y2oE2Ur2ncOwk4S3ah8NDuce8nbPAnaz0EzufCCpiL17t16 6wOkhML5+G7/ojqV2H1D1mvAyRqrWvh+/azpyThAw3tGvxKlCxKLCq2t/PMQUpssJ2F5dk 7gncrBLKdOdskRwei0fCMs8ml6jGj8fmHtaLzS1mUpwAfAxIEAv4hSAFWzPXpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746652853; a=rsa-sha256; cv=none; b=Kx70zFzfpqKilccs3WEqAFS1aX2H9VphUaqFVIccboM3YWRUMMI2UsO/zd1/6ISg+gAMx4 YHblVN6SY10sud2vn4DJyvfKNv4StsHK+ThZkIFxJaeyWdb1vDB/SlrSwIW6+8uolFhu7B 2TAUQSVaa9SsiHaGBc6ZQAceOUAnusp/NkBH0p/XNVHg1ViheO+KHtAr5q/JZmD2sM8/tx trgGvAlCin9BbKEzi3/sWJaCWRxfRf8XApT8CJh2Wt9LLreHLs2YNFhTNUX0aMrxTm9xbL nXKM7UcTz8RlJiYfviPfbzAcalAKLwUrw4l1vdk8RqNUYOWpkHeTDFASBe0PVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7Tx4kdJzmKY; Wed, 07 May 2025 21:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LKrsq064710; Wed, 7 May 2025 21:20:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LKrrP064707; Wed, 7 May 2025 21:20:53 GMT (envelope-from git) Date: Wed, 7 May 2025 21:20:53 GMT Message-Id: <202505072120.547LKrrP064707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: b640600834e7 - main - rtld-elf: Use size_t rather than uintptr_t for an 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b640600834e73178056caa9a07f981b707eb40e7 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b640600834e73178056caa9a07f981b707eb40e7 commit b640600834e73178056caa9a07f981b707eb40e7 Author: Jessica Clarke AuthorDate: 2025-05-07 21:20:48 +0000 Commit: Jessica Clarke CommitDate: 2025-05-07 21:20:48 +0000 rtld-elf: Use size_t rather than uintptr_t for an index This was previously an Elf_Addr and was turned into a uintptr_t when really it should have been made a size_t. Even on CHERI both actually work in this case, but it's better style (and more consistent with elsewhere in the file) to use size_t instead. Fixes: 4642b638a522 ("rtld-elf: Consistently use uintptr_t for TLS implementation") --- libexec/rtld-elf/rtld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 3a6863abfe0d..03b4cd2bdda4 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5443,7 +5443,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) struct dtv *dtv; struct tcb *tcb; char *addr; - uintptr_t i; + size_t i; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; size_t tls_init_align, tls_init_offset; From nobody Wed May 7 21:37: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 4Zt7rd1LpSz5vKqv; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rc5h94z3lq6; Wed, 07 May 2025 21:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pfoivQR8h1Nn0y0R4cdO39C08JTmmHVsDz5qQiD+K0k=; b=kR34NHUeyMtreG1Q8HNSt8vp6ostd666iLt74c5iUxoBl2F9/OR0Stks8HVxKtbbehHjPE TJUTNg/toz6B8JbweqMedsJt8qIx2Dw6xb61ca21tKWxd99eiU9Q66tq9nzgYdnXl/sA+c r+m5JkOn7Q/KPMI5iT5eWXNIUHGoIQkpBIDOWfjQSnCrOGeVVtqZYDr35da/5jK2N5zcXw jCbzUXSaLbhTXR1+GxdLqZ8lBYSLmt/1fGfPyvjjY6loNP9HNa4AUk20yB2K3TOs9+yA9m WY6AKFDQsED2q/n+LHerMlLZCWJznW34BfcdZ3dHXrldYXeyrGmg4cPWC9o5RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pfoivQR8h1Nn0y0R4cdO39C08JTmmHVsDz5qQiD+K0k=; b=YT/SunTsAcI3O+ZNvGcou7jrlaoOPqf2skYzd90TLqtyeiuscKi9Sps8mQQhyKT2MDHBLg 56V2xyNTdRDbkybNwe5Zq0z72G6GWw+gnlKhd12P+3pO9KJzCd8AR4f2E5RWDs4tRQPPda DMYYfAYD3GlNyiV8MPZNqRT0RTXP8arH10hIsKsLinuSZWrHMziPkN8Ma+JoHe9mdLMeGL jMh8Q3wy1Lijlf1ycGo9s0l0I7Q5Q+6FzaXn6uyfJkVMEYSeChQqEdbXq4BHfQZBWdSmf7 Ppbt1Tw2zAJzpV9qp+aRCNWvYABMVq4gaNdsFF92+PHRvSCETgOTXmghJ3S4PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653824; a=rsa-sha256; cv=none; b=aMkLFtW42J/1L+FO92NynT06WENJm36Niixfmioo9hJW3O/al33WN1ApDylgtYg5ESsJf7 avQrLDSwwDBhcDjIJYSyIAQoVCOIFuJLX6hzIDVh7aFdVdBnxZgs7moo8HfeWRayN8L8ER 6VTiFvf8Uah5q5nYk9sygMuZmtg+X3XTUsGuf8YvmfubNLBBlIXCDYtTQ12zIZshLZL3Zs jf4P40gbeOJhRz/FwpQMIgPhBGICpUrezfG0EWGD7rGEI36GjVz9KSZwE9cIhdYgfovgPT 7DiqF5hAauLrWhz6wAJnFCC2CF4lsb3ZTzqqWNtkb8+sPHWr0cm1dmz67TV7EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rc54h7zn7K; Wed, 07 May 2025 21:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Lb4h2091919; Wed, 7 May 2025 21:37:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Lb41W091916; Wed, 7 May 2025 21:37:04 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:04 GMT Message-Id: <202505072137.547Lb41W091916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 668cef02ce8c - main - umass: Move illegal opcode return to a 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 668cef02ce8c9a9bb9862e98c55a2fe15030e042 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=668cef02ce8c9a9bb9862e98c55a2fe15030e042 commit 668cef02ce8c9a9bb9862e98c55a2fe15030e042 Author: Warner Losh AuthorDate: 2025-05-07 16:06:59 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:54 +0000 umass: Move illegal opcode return to a function Move illegal opcode completion of ccb to its own function. da can cope with a number of different failures now (it didn't used to), so we should return the unnsupported commands as illegal rather than faking completion. This will allow da to, in the future, do more intelligent things in response to these quirks. Other SIMs will need to do this too. Differential Revision: https://reviews.freebsd.org/D49465 Sponsored by: Netflix --- sys/dev/usb/storage/umass.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 3e5cc9a7e084..145c2ba81b3c 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -489,6 +489,7 @@ static void umass_cam_sense_cb(struct umass_softc *, union ccb *, uint32_t, uint8_t); static void umass_cam_quirk_cb(struct umass_softc *, union ccb *, uint32_t, uint8_t); +static void umass_cam_illegal_request(union ccb *ccb); static uint8_t umass_scsi_transform(struct umass_softc *, uint8_t *, uint8_t); static uint8_t umass_rbc_transform(struct umass_softc *, uint8_t *, uint8_t); static uint8_t umass_ufi_transform(struct umass_softc *, uint8_t *, uint8_t); @@ -2262,20 +2263,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) */ if ((sc->sc_quirks & (NO_INQUIRY_EVPD | NO_INQUIRY)) && (sc->sc_transfer.cmd_data[1] & SI_EVPD)) { - scsi_set_sense_data(&ccb->csio.sense_data, - /*sense_format*/ SSD_TYPE_NONE, - /*current_error*/ 1, - /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST, - /*asc*/ 0x24, /* 24h/00h INVALID FIELD IN CDB */ - /*ascq*/ 0x00, - /*extra args*/ SSD_ELEM_NONE); - ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; - ccb->ccb_h.status = - CAM_SCSI_STATUS_ERROR | - CAM_AUTOSNS_VALID | - CAM_DEV_QFRZN; - xpt_freeze_devq(ccb->ccb_h.path, 1); - xpt_done(ccb); + umass_cam_illegal_request(ccb); goto done; } /* @@ -2463,6 +2451,29 @@ umass_cam_poll(struct cam_sim *sim) usbd_transfer_poll(sc->sc_xfer, UMASS_T_MAX); } +/* umass_cam_illegal_request + * Complete the command as an illegal command with invalid field + */ + +static void +umass_cam_illegal_request(union ccb *ccb) +{ + scsi_set_sense_data(&ccb->csio.sense_data, + /*sense_format*/ SSD_TYPE_NONE, + /*current_error*/ 1, + /*sense_key*/ SSD_KEY_ILLEGAL_REQUEST, + /*asc*/ 0x24, /* 24h/00h INVALID FIELD IN CDB */ + /*ascq*/ 0x00, + /*extra args*/ SSD_ELEM_NONE); + ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + ccb->ccb_h.status = + CAM_SCSI_STATUS_ERROR | + CAM_AUTOSNS_VALID | + CAM_DEV_QFRZN; + xpt_freeze_devq(ccb->ccb_h.path, 1); + xpt_done(ccb); +} + /* umass_cam_cb * finalise a completed CAM command */ From nobody Wed May 7 21:37: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 4Zt7rc0BCmz5vKyf; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rb5Pzxz3m5Y; Wed, 07 May 2025 21:37:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QAxOWtagZTuofxRDDHNymZ1AokLNxE5nMiDP0bKwoo=; b=oJhVPN/1Y8doKlxD/UXMd7VtDRvpIpFSrenHKl0ej0JD6ai0uL49Z8VgLX/UwVSm/4kI+K kkLwSl0FOnDXpIGd5aLpOgop0oIOE9i/burVBx02qbb/n6dBNZ/TzD1KQeQw8aanOBDniF /w0mHsdNf+UfwsLcDT10x0tzA69wwkdvHmiP2l6KyKjZW636PQKw8RwHYPH3QXD+vZkjiV IbS+6UWC1Wa50mLk1zlhfT8VfouGybFlVrpwZCU4msgO2Ma/Si8lgjzTskA7cmzAgWG6AT veLmIdqonEHoFjR1t6RcACoCqSPTnGtlYRVMtDPTT7fUmr/Rl5ABFQCRpCR+Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4QAxOWtagZTuofxRDDHNymZ1AokLNxE5nMiDP0bKwoo=; b=KFDr+YDz8Y/Yzfo524gl52+kn0/YCHyX08IFaYv0sLrRaAPQRewtNLfcfccdvxcNYazsU1 Z+bwYkpVB3TH3l+KWJTqBn6Lt7YJgMNWa/5zc2CAIrCoQsFTbFgvUgjIURmEugI9DbGJ6w g7IjHHm6dPuoO9P7RRkD1FfrLETt+5FzKaokCFLi86f0ON3Yc5sa34/Qz4STs8M8jW3rxg If0E+Fw8pq5mM+iX1ONn8G2lqqgPmKuIV3QQgYMrMzBl7e+8aYUeiK0L2+uDOzgkRDK26Z gdh288ycQLj2K2w+bmkF7ZDUbNGIdfl/seny6+pZIkjpfsiaZoEpVTki7oCtYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653823; a=rsa-sha256; cv=none; b=XSNAXBsrsCGp4Jf25XOy1pLN22yYM8cnQzyAP04nRT3TV+be/zyrlrkOyAOuJPXAF/iPyy XstRVsU+kWkDlRBMp0Dx8ZDcjsz22DWelS1033C89vFDpTX2U0qv/tLPDYZ7VVz2u4tpa1 v6H+byulkxrjvsYO4OxUuWusoxXRfz9lJNGbO3jAPTx7y/Gk35RUrFPu+nXrFD1xm8cJq6 g5XKGwHeBC+Gi01IkPjkUclgNefTaLHomc9r5A1MrfLwNoNt7Y2dQzaCeMcojKVzqduAwG 6RvA9iLAlYTV8Ywxm9mBTMFxHnO9hog7E2e35/JWK5RmiIfdvRxSrXZnV2Ymxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rb4Vmpzn7J; Wed, 07 May 2025 21:37:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Lb353091881; Wed, 7 May 2025 21:37:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Lb3Uc091878; Wed, 7 May 2025 21:37:03 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:03 GMT Message-Id: <202505072137.547Lb3Uc091878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 231d36dccb82 - main - scsi/da: Export quirks as sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 231d36dccb820aa874800bdcd7e3e250bbd6df79 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=231d36dccb820aa874800bdcd7e3e250bbd6df79 commit 231d36dccb820aa874800bdcd7e3e250bbd6df79 Author: Warner Losh AuthorDate: 2025-05-07 16:06:52 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:53 +0000 scsi/da: Export quirks as sysctl Differential Revision: https://reviews.freebsd.org/D49464 Sponsored by: Netflix --- sys/cam/scsi/scsi_da.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 1fd6d4919c61..71a4b0fa6b22 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -1496,6 +1496,7 @@ static int dacmdsizesysctl(SYSCTL_HANDLER_ARGS); static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS); static int dabitsysctl(SYSCTL_HANDLER_ARGS); static int daflagssysctl(SYSCTL_HANDLER_ARGS); +static int daquirkssysctl(SYSCTL_HANDLER_ARGS); static int dazonemodesysctl(SYSCTL_HANDLER_ARGS); static int dazonesupsysctl(SYSCTL_HANDLER_ARGS); static int dadeletemaxsysctl(SYSCTL_HANDLER_ARGS); @@ -2394,6 +2395,10 @@ dasysctlinit(void *context, int pending) OID_AUTO, "flags", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, softc, 0, daflagssysctl, "A", "Flags for drive"); + SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "quirks", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + softc, 0, daquirkssysctl, "A", + "Active quirks for drive"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "rotating", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, &softc->flags, (u_int)DA_FLAG_ROTATING, dabitsysctl, "I", @@ -2718,6 +2723,24 @@ daflagssysctl(SYSCTL_HANDLER_ARGS) return (error); } +static int +daquirkssysctl(SYSCTL_HANDLER_ARGS) +{ + struct sbuf sbuf; + struct da_softc *softc = arg1; + int error; + + sbuf_new_for_sysctl(&sbuf, NULL, 0, req); + if (softc->quirks != 0) + sbuf_printf(&sbuf, "0x%b", (unsigned)softc->quirks, DA_Q_BIT_STRING); + else + sbuf_putc(&sbuf, '0'); + error = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + + return (error); +} + static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS) { From nobody Wed May 7 21:37: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 4Zt7rf25WMz5vKND; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rd6YVvz3lqB; Wed, 07 May 2025 21:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X39YnDCZx2sSVJXjI2OBQys6ki28wB2kmJfPLdf3fWw=; b=Q7y13PYJjviKNxv5LUxuCmCexFmMDbwC4e7nWXfYk635cHURSi7O4QjriMHewL6HR1Ke9X eacXDRgygcRZE7VBaCaz5FN7dBp0Ep0xA27IiDxtp/3Fj41vGEpISsTfOWspBaRMTK53jG KUTtf1VLUOikEae49nDlxFrSEjJzhfELYmfOgIt8KYy5n2UFr3OrFbPsl6Qzqh2WF69WS+ CYn92v2yJKouUh7nNjqZaeqdQD2RAeQaCqmteD7XYrrq5FbFca5eJSehlIIXV1EVvtKSlT 4nKiPs9bGgrcp43GUnt1VLnpl7L1ZKJFTgiHNM3FYcqnkp9rc92sDJJ8xCcfOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X39YnDCZx2sSVJXjI2OBQys6ki28wB2kmJfPLdf3fWw=; b=HsAaJN06NugJsknLGIZ46KaQrReNNjTNgIEzeQ/EtCULPX93KsL1YC0dusx6G7wXiwZON1 qclPiaEqCr7SaczQWNn3dBxfPOuN0pN6+GgIKhAmjawA16nWgDf/1lTPAXRAVVFiUBFtxl 6sJ0J7iCgzzFKWEekb+MB9IwPtJoJvKJTO6pfQvG0OphJRb/b3EFsHxkQg9vFil6Tu88G7 k4G9BsY9g/ubbHaX2Fx+MuOjuenseH1HcA0hEQhfSy1JrCOgZ40gUnkijhqwRT/NvrNLcu vFlpEX7Oq0MbHENrRAK7B0HuC5sHfbp+nZCkiMjqzqiRc6a5ZZz8U4zQB5YxPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653825; a=rsa-sha256; cv=none; b=hHiNenC+U4Sien9oBzxgEtodYTc9HSp03Jq9uCMZGGJdV4eWdCsu6/tvKX6RXePisitVak /emMIP7RQSeqtHgfzSh8zB3Zff3dgJZgyaxSxEOE9gnaVLE1UyNrSvTVzS/he3i8sUHDKO +Svltx2wOBlzWRmtCEHQNsjdnfln64UkN0CXWdGslIhuejj5C1YOHYu1zbCd6feSQ5h1/u GqnaQ7f8v2RmsIe2Qik1IzyvDt03PgFzQpnXe0Ogi6RtR7/pT4fUlzA3mp2VyNPKk7AUwY ofHytsLDmkX8fTZOoIgsxbPssAa53oV7t1pyNWPsOBPeJA9b80z/dF9w91iRPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rd615Bzmpk; Wed, 07 May 2025 21:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Lb5cx091952; Wed, 7 May 2025 21:37:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Lb5DG091949; Wed, 7 May 2025 21:37:05 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:05 GMT Message-Id: <202505072137.547Lb5DG091949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 966c6be6c8be - main - umass: fail synchronize_cache List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 966c6be6c8be74d67303f99b5f2d0329de5b64e7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=966c6be6c8be74d67303f99b5f2d0329de5b64e7 commit 966c6be6c8be74d67303f99b5f2d0329de5b64e7 Author: Warner Losh AuthorDate: 2025-05-07 16:07:05 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:54 +0000 umass: fail synchronize_cache When we know the umass device doesn't support synchronize cache (either probed or hard quirk), fail the command w/o sending it to the device. The da driver is the only driver that sends this command, and since this filter was written has grown the ability to catch the failure and never send the command again. In an ideal world, we'd let the da driver work this out. However, there's a lot of devices that hang when this command is sent in a way that's impossible to detect other than a black list. There's also a number that require a hard USB endpoint reset to recover, which the autoquirk code takes care of. So umass has to act as a filter. By failing this command, we're able to avoid upper level BIO_FLUSH commands by tagging the underlying disk as not supporting that. Differential Revision: https://reviews.freebsd.org/D49466 Sponsored by: Netflix --- sys/dev/usb/storage/umass.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 145c2ba81b3c..0a62e97a07fe 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2290,9 +2290,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) } } else if (sc->sc_transfer.cmd_data[0] == SYNCHRONIZE_CACHE) { if (sc->sc_quirks & NO_SYNCHRONIZE_CACHE) { - ccb->csio.scsi_status = SCSI_STATUS_OK; - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); + umass_cam_illegal_request(ccb); goto done; } } else if (sc->sc_transfer.cmd_data[0] == START_STOP_UNIT) { From nobody Wed May 7 21:37: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 4Zt7rg3qvCz5vKNH; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rg0Mhvz3lxj; Wed, 07 May 2025 21:37:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xa/UpkkiTNZH1Tp2g2v39mcHm75zpsANT7rknKHcySo=; b=SlxvpFVDP+8e7D8UdT5cguyodXoi1Kv6X/QnWCW/h1twi8vL0lp+VHJHQy2tjGxtapTmkS 6NG69lJxdxsInlSjL9WANAc8pp8Zx+qhqpu6veMRHXFinOAP/vRb8eH5PMX+Axpw30Ged8 UnDyotH/m7HuKOhas0+Wi+dyvlUbobhAUQ82CRjid/TPqh7FItgjrENBut2T8shiVl674t CvSsqIDGCKsTUMtbffEB2S8uNT6hAtsJtYNVF2zn7HDDuEPyK4tYvrVwpcfWix6Q94AGYD N35r859MkIeBnhnQ5DweB517///rV58nUwBGOaWmOVMeuZhGX7ffRiEcCxk2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xa/UpkkiTNZH1Tp2g2v39mcHm75zpsANT7rknKHcySo=; b=T2Gw875aCUCA/txlYrNeFGH2jE06sTHKvbnzjGwOFAgB/GpWyTGoy1akf5n/tklZO0kVAM qxEBM7DopeLnUQ8hD2M3FiX6Jg2hNe8EtKPijwwz6bRE2g//JZKQ/1BwPxFDiYei5pUsBa FnzB7TjUzQsyDVEWobuyY9+K9Or0sbm6DZt36PyFpyPeeLahlULX6f6NCJly83qoS8MTfU s9ELHnn5u2TZ68R9IQiKmB5txfugksS84lUlSnypJzSZiTwsuB6S6Oh8UP7r/fuguBgghE PbcqZuyw9YNmJSmtdkExmS5oDfnHbCdZiqUn2I2jJ3Knl3UweDXrLDNrJnRTzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653827; a=rsa-sha256; cv=none; b=c4vl1OHP2Ne87lcv5GkoC5ccv80qGce6tkT00RpFnOfjEl+6fHkff4zxvoT4nmBMDhNTYx y52pJ70c1Ud9BdPtVAawKNKe85L/H6e9EjA6ou2K1gXSHn/90FLu3Ua8WIpwhnaqi31xEb /ggtKgAsjlasreLQxGa9GcQlwHyE4azV+tGbDrSN9r71rtB+lDCWsPFfjX2Ez/NkNzDwbj pqRv67OhJhGudj12a9mstfVusPnANx5wAHbVi4lUJa0Cg/JL1IwzMkgry/AdEKwMCZWb80 aE6WEtDOlZ49BbagDlcZrQNfN3RKOJB8mQWowWNUD3ZgtvQizobUX+cGPi8dDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rf6xGNzmpl; Wed, 07 May 2025 21:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Lb6jb091991; Wed, 7 May 2025 21:37:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Lb61c091989; Wed, 7 May 2025 21:37:06 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:06 GMT Message-Id: <202505072137.547Lb61c091989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: db860eb348ad - main - umass: Document the ideal that it's better to fail bad commands List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db860eb348ad20e4c4be09c9b65cdf0a3b1b57c2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=db860eb348ad20e4c4be09c9b65cdf0a3b1b57c2 commit db860eb348ad20e4c4be09c9b65cdf0a3b1b57c2 Author: Warner Losh AuthorDate: 2025-05-07 16:07:11 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:54 +0000 umass: Document the ideal that it's better to fail bad commands Generally, lying to the periph drivers about commands working is a bad idea. They cannot get a global insight into the actual capacities of the device when commands just work. There's good reason to intercept bad commands at times, and to prevent the device from being exposed to commands that, for example, hand the device. However, upper layer periph drivers is the better place to cope with devices that don't support the commands since it can make other inferences about the device when it has wider knowledge. But this represents a change in philosphy, so document that as well. This shift happened for some commands a while ago. Many of the quirks existed only to avoid whining errors on boot that were benign and were a big burden. So da and cd slowly stopped the whining. Except in cases where the command hangs the drive, we should limit new quirks and avoid overly broad quirks (things work, but are less performant or reliable, again mostly to avoid harmless errors that are no longer printed). Other sims will likely need some help with this. Differential Revision: https://reviews.freebsd.org/D49467 Sponsored by: Netflix --- sys/dev/usb/storage/umass.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 0a62e97a07fe..8922b3770e6a 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2230,6 +2230,13 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) * command format needed by the specific command set * and return the converted command in * "sc->sc_transfer.cmd_data" + * + * For commands we know the device doesn't support, we + * either complete them with an illegal request, or fake + * the completion, based on what upper layers tolerate. + * Ideally, we'd let the periph drivers know and not + * fake things up, but some periphs fall short of the + * ideal. */ if (umass_std_transform(sc, ccb, cmd, ccb->csio.cdb_len)) { if (sc->sc_transfer.cmd_data[0] == INQUIRY) { From nobody Wed May 7 21:37: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 4Zt7rk3j5Wz5vKp0; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rj21ZJz3lnB; Wed, 07 May 2025 21:37:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUVLlvGUk1uOXcU21KcMqS+IIM98qoqjZq8OJYMcF/Q=; b=v/JhIPED3DluiPvVnJP0Ht6n4nzA/oqwHPkT73YM4LHz0oxmhaT4TbJ0CySAzWRSp5T5ST jwLnz/sCLoy03fytTfNCrjDmRuBw+sWJ7MnPSZzRGYLF5tl+7LK9U/lnL0Gw7zdxNS34LX +yM04KNcIB01EmdbTe6v8ujDS5cK7TlERcgXMK4rGdVBoOrKTGuK4OotyMOfBrH3ZnMy0L ZXe1u1b+gsPV7es6t+Vx1Qi8eeCWV7TJWu85tvCdOD5cltRFjJ2Zwn+2zMZEo+ZOo97NtC 050s/5E/++0SlVBbqqxQ7d23769JxYzkjyq8UnzpdzzNWmDuHwgBPLdfxPyRDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUVLlvGUk1uOXcU21KcMqS+IIM98qoqjZq8OJYMcF/Q=; b=GeDasjgjuub+mP9utQ276rtZc0t7bfG3VfZ7ydNPFcn+cjd05zi1Ms+rWg5db/tGARO2JD jg6lyqmikNXdxectyNvg4+/JGNQI/wt/L+RR0pgZDjwVeRlU27ij2R+84I8UZio8T1zx9A 1CjNbZuLWisPA80t4GYrjbimwka1ofE+oAwwlkuucOFohdd6kVRvRQnEVoDQf0FYbCII78 pjgm0xxvDIYeMjEJaCICXwnJ85uWOnDQrKdwXJ5s9R5IDzG9TeCRnQsFqiFvv/06gSTd3n MUTD9tDH15hZtUn9mtXZQr54ZoLnSrxNLvcPm+xKgyhvHsERsJ/5uQvmysw7Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653829; a=rsa-sha256; cv=none; b=J/jUvHcPBDjpDWaQDnmrLOUu8L7KMu9UV3A9Y15V6LmUXPda4DcuSbUxRztssG2HgPfiEN 66C3sl7PDxHpvaC5EltoO3mMEaFPPHjcMS2BM5kOTtUEaEhN6MwnYEkKMBRFjfpoFFJvI2 7KHLcFqp4+MMci5qz+03ytjEVm5ZtSR3s2UFVQYZ6htmllCBkVhL71WuaiW7NrAviyWy6+ vwsFZ5w4UPwHdu94vUhLPtCOBhrDlgTON7fximQwNY5ZlvmRZjmRdHriK1r6M8vkWifeYZ uUfPPbYguUb536VLoHXcecCZ1JfsvhJIvE+yX1NzoWX64Mg8MvA20BG9Ea00Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rj1Ty5zmvK; Wed, 07 May 2025 21:37:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Lb9Gf092057; Wed, 7 May 2025 21:37:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Lb9HP092054; Wed, 7 May 2025 21:37:09 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:09 GMT Message-Id: <202505072137.547Lb9HP092054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 49633d5d02e1 - main - umass: Simplify umass_std_transform to eliminate fake success List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49633d5d02e1c6cea718d0581974d614534019c8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=49633d5d02e1c6cea718d0581974d614534019c8 commit 49633d5d02e1c6cea718d0581974d614534019c8 Author: Warner Losh AuthorDate: 2025-05-07 16:07:22 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:54 +0000 umass: Simplify umass_std_transform to eliminate fake success Now that nothing returns (2) to fake the success of the command, eliminate that magic number by eliminating the case. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49469 --- sys/dev/usb/storage/umass.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index bdbe04ce3bbd..9878635f7e59 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2949,20 +2949,13 @@ umass_std_transform(struct umass_softc *sc, union ccb *ccb, { uint8_t retval; - retval = (sc->sc_transform) (sc, cmd, cmdlen); + if (sc->sc_transform(sc, cmd, cmdlen)) + return (1); /* Execute command */ - if (retval == 2) { - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - return (0); - } else if (retval == 0) { - xpt_freeze_devq(ccb->ccb_h.path, 1); - ccb->ccb_h.status = CAM_REQ_INVALID | CAM_DEV_QFRZN; - xpt_done(ccb); - return (0); - } - /* Command should be executed */ - return (1); + xpt_freeze_devq(ccb->ccb_h.path, 1); + ccb->ccb_h.status = CAM_REQ_INVALID | CAM_DEV_QFRZN; + xpt_done(ccb); + return (0); /* Already failed */ } #ifdef USB_DEBUG From nobody Wed May 7 21:37: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 4Zt7rj5KG9z5vKwg; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rh4L3gz3m62; Wed, 07 May 2025 21:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2WcJIT+indKk5gQw81wPokVWuNMg1696rQzxHsg9oI=; b=ewGsqZjFvSmEFTZE8kSZlXVxFhr9ocQUfVmBeX1wrP3uMlYxDSF7K1LnhVv07wChOIyDD3 0D1HE94cMPnwAwyiTnaDxHuwIosZkEahYUbbPKw34tR7+XNM1enb0VeN3x5T7PDe0h0FK/ Y4er/U5jBnzoe9nc9izSu2JLNR+PTubGJrXsZExAmxrz2dC6n6eWEbq0PWL7i1jWhbBcm7 7tGaMECoZDNj6Zxsb8T1xG65LaqJPGP6Z6oGLSJSoQqu8YgWWEHjjZiEtLh4urvLO9olW/ q3rw3RF6HfnZC352xynQHtq7aLlaHE2iWoC7n+kjLEX9AlsbVnSUMR50HUsotA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2WcJIT+indKk5gQw81wPokVWuNMg1696rQzxHsg9oI=; b=ZfQA6zeRlnhCFyqlVizoJK0xDtPOsyb8FFOcRaJS7DsjovT+mwk/DUAkVwXw9S1ndc3MtR S/oKeUdAhG8rUsLi4+VKmvpgExspoAsw3P2GZTkjjri0JJl2ObNaTuGXp7lwzqQHD/19An xWJKa+nNCJRx4z8JlwZLgm5Kh08zGFgDr6qyYiZvd6205uOIiSrBOHtOk1N3ZlubUOPwxl vYr3ifXr5Qbcy6gcqwGPnHk0XBWlhSZMiAD+wZYb17QKGSBo2MNKnzwTzk3S3/AVNWz0GM HESwLe/MwTwhBJIwVHM1oP17yP/z5AXUwou9uZKOOKI1Y/lGynPmJBB9pth5mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653828; a=rsa-sha256; cv=none; b=phCG9D/f8B8NPXv9u3J+JJr7wK0fwr5zbveXR/zwm3GiRWPOJlMcO1V9yRtflmLnaYTG2I Qgei47GPWkG6VQYL9sdkUbQLJH8m1ELXaw7SnFIBfL23iMOlY1PnMFQaFCj/3Oc/a4h1Ql IQe+U9/8/KhCjENk+oRENf85/3qQcGf5YOE2NseA3LfYZPtoiv78Gy9XWJ6UZZcvpHi5ug 0u6CX0aGUEgxQGEca6552pNHkBV2PyiNVe9kIe+zFHbgtCLjCpy3U4/fl7ImXAcvF80kNK 0VkJDu3uNw27zaj+qQYXPMfwy4HLkYyusEk665wW2HiX0PrT9E+AfvrjsvoreA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rh0TtSzmwt; Wed, 07 May 2025 21:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Lb83Q092025; Wed, 7 May 2025 21:37:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Lb8Oh092022; Wed, 7 May 2025 21:37:08 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:08 GMT Message-Id: <202505072137.547Lb8Oh092022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a945c21a6101 - main - umass: Fail SYNCHRONIZE_CACHE for UFI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a945c21a61019691f526fe8feaf0ec413977dbd0 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a945c21a61019691f526fe8feaf0ec413977dbd0 commit a945c21a61019691f526fe8feaf0ec413977dbd0 Author: Warner Losh AuthorDate: 2025-05-07 16:07:17 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:54 +0000 umass: Fail SYNCHRONIZE_CACHE for UFI Just go ahead and fail SYNCHRONIZE_CACHE commands for UFI. This standard doesn't have a cache to flush, and the upper layers (aka da) will notice sync cache failed and won't send it again. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49468 --- sys/dev/usb/storage/umass.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 8922b3770e6a..bdbe04ce3bbd 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2825,12 +2825,11 @@ umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, /* * SYNCHRONIZE_CACHE isn't supported by UFI, nor should it be - * required for UFI devices, so it is appropriate to fake - * success. + * required for UFI devices. Just fail it, the upper layers + * know what to do. */ case SYNCHRONIZE_CACHE: - return (2); - + return (0); default: DPRINTF(sc, UDMASS_SCSI, "Unsupported UFI " "command 0x%02x\n", cmd_ptr[0]); From nobody Wed May 7 21:37: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 4Zt7rm3dLHz5vKr6; Wed, 07 May 2025 21:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rl3Zm0z3m4J; Wed, 07 May 2025 21:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6mzxlAk2oyUF8Biy3uABXIbHQgWTOcAnbvIu3CKa/oo=; b=WPLUwjgHiYQnOsSbN2m4JMonWyUNr74XAgJSu4hwWAjT64md5ajAWQbPlxcSpG8bJpXYQD TSeR6lZ2m390ynjpCah4sSqMzPG8ybgLZOpPdDvzYQmWcBmb/PrmgaEpEAL/K401PthOar Foe5AX3hWnO0goEniOtIj6RFGvtB2B58D9eP0DjB4R5c/VQPajglaJeLyv0pLQXVHybWJH jU3Yog+RoWsrnl4pDQv/4oQh357TvqkIrpo8tkwuSnLxVGvl63uOXDZUX9VVcz0Kd3Pj/Y UBziyYfEsf7RTw3h7P+7cm+RoO9/oQ1meD061K1P/MvHbOwSVvqF6F76K4N/Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6mzxlAk2oyUF8Biy3uABXIbHQgWTOcAnbvIu3CKa/oo=; b=s9hRdPf9RGYtMLPa8P8HP5JMNOtazm45GwKDnpQ2qsua6qQ0Hslhk/+qD9YROSFeyIrRB1 XQBFqnh6r2xnylvi9mL9VgQ8D3Wyr8lLZNH1N31kwdfstFsAvKloaHJSq6EkqfqY5vKmis 7u/2KK8/QPivAsyM8FuvB5g6tnwQtTivucLjWmFT6ImLgfLTx6KecFQtT9j+1U8dA6qGgX o+kZF203iOE9gycLzoVJdF0V6OSm0PyhMw/1XDFIY6BZBhEFc2w/X7CUqS0ki5lAoSarIw SHtMBFbze1JuXqyqv2qf0+72em1m8eiQyepoW7zwtr1aCxsULkz2MofuFAuwCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653831; a=rsa-sha256; cv=none; b=JmrT5qDh87tdQt0rVq9DNDLaFfrT7cDrHE4TCLQksRTs0T+gZg6oBtHBS/sH0ILrVoeHT3 gYPCYvK+hG3+5SmxbyCXh0tPHh4+7+8zu0emZOxBILzPmlw9wySaEfR0mvw3In5VcEgGPn ECmMB+OeYzNAWu+c1yVDhWx+QTJcx2C0r6Gt6ULOgHkrnV9Rru/8jJ4nKrfQy8qcEoDFkJ SjXi2FQRGztYy3iyN+9HhkLPxMBSBtq9egiAI23VVvxoOg4vKx19pPINO5lroYyRfcHQym URWIdai2GPRc6jhMlj6k+dxGzCw4zdHsupZgSCGEncDRULRvbfNdSnAPFm7+aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rl34tzzn6V; Wed, 07 May 2025 21:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbBup092121; Wed, 7 May 2025 21:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbBLS092118; Wed, 7 May 2025 21:37:11 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:11 GMT Message-Id: <202505072137.547LbBLS092118@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b8e77c8b00c1 - main - umass: Move common code into umass_std_transform List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8e77c8b00c1190005142b1a2a70e3b5d36c6841 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b8e77c8b00c1190005142b1a2a70e3b5d36c6841 commit b8e77c8b00c1190005142b1a2a70e3b5d36c6841 Author: Warner Losh AuthorDate: 2025-05-07 16:07:31 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:54 +0000 umass: Move common code into umass_std_transform Move the length checks, and byte copying into umass_std_transform. The copies are typically small and this simplifies the code a lot. Move zeroing the buffer now to only when we change TEST UNIT READY to START STOP. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49471 --- sys/dev/usb/storage/umass.c | 54 +++++++++------------------------------------ 1 file changed, 11 insertions(+), 43 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index f7df9f49257e..344a42f718fc 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2680,12 +2680,6 @@ static bool umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { - if ((cmd_len == 0) || - (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { - DPRINTF(sc, UDMASS_SCSI, "Invalid command " - "length: %d bytes\n", cmd_len); - return (false); /* failure */ - } sc->sc_transfer.cmd_len = cmd_len; switch (cmd_ptr[0]) { @@ -2706,26 +2700,16 @@ umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; - return (true); } break; } - - memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (true); } static bool umass_rbc_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { - if ((cmd_len == 0) || - (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { - DPRINTF(sc, UDMASS_SCSI, "Invalid command " - "length: %d bytes\n", cmd_len); - return (false); /* failure */ - } switch (cmd_ptr[0]) { /* these commands are defined in RBC: */ case READ_10: @@ -2746,9 +2730,6 @@ umass_rbc_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) */ case REQUEST_SENSE: case PREVENT_ALLOW: - - memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); - if ((sc->sc_quirks & RBC_PAD_TO_12) && (cmd_len < 12)) { memset(sc->sc_transfer.cmd_data + cmd_len, 0, 12 - cmd_len); @@ -2769,18 +2750,9 @@ static bool umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { - if ((cmd_len == 0) || - (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { - DPRINTF(sc, UDMASS_SCSI, "Invalid command " - "length: %d bytes\n", cmd_len); - return (false); /* failure */ - } /* An UFI command is always 12 bytes in length */ sc->sc_transfer.cmd_len = UFI_COMMAND_LENGTH; - /* Zero the command data */ - memset(sc->sc_transfer.cmd_data, 0, UFI_COMMAND_LENGTH); - switch (cmd_ptr[0]) { /* * Commands of which the format has been verified. They @@ -2796,6 +2768,8 @@ umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, DPRINTF(sc, UDMASS_UFI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); + /* Zero the command data */ + memset(sc->sc_transfer.cmd_data, 0, UFI_COMMAND_LENGTH); sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; sc->sc_transfer.cmd_data[4] = SSS_START; return (1); @@ -2835,7 +2809,6 @@ umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, return (false); /* failure */ } - memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (true); /* success */ } @@ -2846,18 +2819,9 @@ static bool umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { - if ((cmd_len == 0) || - (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { - DPRINTF(sc, UDMASS_SCSI, "Invalid command " - "length: %d bytes\n", cmd_len); - return (false); /* failure */ - } /* An ATAPI command is always 12 bytes in length. */ sc->sc_transfer.cmd_len = ATAPI_COMMAND_LENGTH; - /* Zero the command data */ - memset(sc->sc_transfer.cmd_data, 0, ATAPI_COMMAND_LENGTH); - switch (cmd_ptr[0]) { /* * Commands of which the format has been verified. They @@ -2867,13 +2831,10 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, case INQUIRY: /* * some drives wedge when asked for full inquiry - * information. + * information, so adjust the transfer length */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); - sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; - return (true); } break; @@ -2881,6 +2842,7 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, if (sc->sc_quirks & NO_TEST_UNIT_READY) { DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); + memset(sc->sc_transfer.cmd_data, 0, ATAPI_COMMAND_LENGTH); sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; sc->sc_transfer.cmd_data[4] = SSS_START; return (true); @@ -2931,7 +2893,6 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, break; } - memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (true); /* success */ } @@ -2948,6 +2909,13 @@ umass_std_transform(struct umass_softc *sc, union ccb *ccb, { uint8_t retval; + if (cmd_len == 0 || cmd_len > sizeof(sc->sc_transfer.cmd_data)) { + DPRINTF(sc, UDMASS_SCSI, "Invalid command length: %d bytes\n", + cmd_len); + return (false); /* failure */ + } + + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); if (sc->sc_transform(sc, cmd, cmdlen)) return (true); /* Execute command */ From nobody Wed May 7 21:37: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 4Zt7rl26X4z5vKPl; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rk2Gj8z3lsn; Wed, 07 May 2025 21:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HNriYt9XeSQ7Az+9Epd31Mb4MzulC2QA5dWq0/F3wOw=; b=qEplsIPPSUQO6yt8RAvv12NjS5/GYilKc6h11V0xYLM5jhgZl0aFg9W2hTxfkksZVZrpAx WpPf0CElMAaFL9M+w3QG0TeiqqQ3bjcFTDf/65nGjgKvx4cXqANB1gH9W9SESpa+UE0j5+ ZHucLR8TMJ5rADb+KGHugHZd134PdIoEKjh4bCJf+xq3AQ7giep7Mfaq3qTvxVMnBJ4U1g KRUNvtvIGcOXztQVu2pDvkxYnClNDMpt22eH3pFKk+HeXVNM+F9k89d/o3D44NQnG3IjeM TdqG/NkJLK9njKsiE6BVOh4QI0b+ySsiEbIpyKGtWKVEm3AdWp4XRRxlAA0UMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HNriYt9XeSQ7Az+9Epd31Mb4MzulC2QA5dWq0/F3wOw=; b=cCISj4whRBltrobHtTzWs9EX2AozW9sLTyHgd3mtM1j3VxcW/VfIUb+t8ujHPYo9XIGo+d UJtyLPH8gNyhX3IDquByySTqLN2SCT17h9rL+zYNpqyauF2DxFQpPMFVTQddOcD5oXiIuw idD4I9IQjhrtlzBWwz6SEETYuxYEHD8kY9McmQdXs82xLjQYg+tjgUMzx1AyI2bn2U8If3 AyoYmd5faXa60iTZP7j8ud5Y87LmZesVPE+Ms6puT3r8Nhd5kiTjOKn2k09TT0qSOlglb+ TTnlqm2FRDEOs0Nk4W+qfM8DRKxsIgatiyyr6tC9rFEdxri5aBCAd2GwNzD46w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653830; a=rsa-sha256; cv=none; b=KWpkIpoCyyiwWrQXMu48YxAq6/zsBDGeuW7ckuguOV+fwO4MjrHuZJ/CX8yklr+L2+VPDH CMqXI9hry2YWnQxpkO6w2Qd2IIH3oIR52zf5TcdrbKjyVyjjAzX5+b64oNPTw1fFaOBMT7 JJKiBZjtnBGOXgumWvsAAx+KvDEVY/ZkJ8XxPpw9/QyeBMtvTbmqyILDyXD6aXZJ+MoChg rt503hhbRj7as3FC1MuIDWbsMQlo3HubUV6Fw0+WKQpjli7t8Oey1wS0lkoxeXH3NEi51J ojIdBQqHGQhwK7Bp6iTVfjEY5ZmdcQvyKz8ZEbNEVXp4zvTbyXIfKXWVInyZFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rk1pWJzmvL; Wed, 07 May 2025 21:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbAp0092089; Wed, 7 May 2025 21:37:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbA8a092086; Wed, 7 May 2025 21:37:10 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:10 GMT Message-Id: <202505072137.547LbA8a092086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bff8730c24b2 - main - umass: make *_transform() return a bool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bff8730c24b25af4f1d1dc6fee9240c74f60fab5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bff8730c24b25af4f1d1dc6fee9240c74f60fab5 commit bff8730c24b25af4f1d1dc6fee9240c74f60fab5 Author: Warner Losh AuthorDate: 2025-05-07 16:07:27 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:54 +0000 umass: make *_transform() return a bool These are now boolean, so make them return a boolean. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49470 --- sys/dev/usb/storage/umass.c | 63 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 9878635f7e59..f7df9f49257e 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -299,7 +299,7 @@ typedef void (umass_callback_t)(struct umass_softc *sc, union ccb *ccb, #define STATUS_CMD_FAILED 2 /* transfer was ok, command failed */ #define STATUS_WIRE_FAILED 3 /* couldn't even get command across */ -typedef uint8_t (umass_transform_t)(struct umass_softc *sc, uint8_t *cmd_ptr, +typedef bool (umass_transform_t)(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len); /* Wire and command protocol */ @@ -490,13 +490,12 @@ static void umass_cam_sense_cb(struct umass_softc *, union ccb *, uint32_t, static void umass_cam_quirk_cb(struct umass_softc *, union ccb *, uint32_t, uint8_t); static void umass_cam_illegal_request(union ccb *ccb); -static uint8_t umass_scsi_transform(struct umass_softc *, uint8_t *, uint8_t); -static uint8_t umass_rbc_transform(struct umass_softc *, uint8_t *, uint8_t); -static uint8_t umass_ufi_transform(struct umass_softc *, uint8_t *, uint8_t); -static uint8_t umass_atapi_transform(struct umass_softc *, uint8_t *, - uint8_t); -static uint8_t umass_no_transform(struct umass_softc *, uint8_t *, uint8_t); -static uint8_t umass_std_transform(struct umass_softc *, union ccb *, uint8_t +static bool umass_scsi_transform(struct umass_softc *, uint8_t *, uint8_t); +static bool umass_rbc_transform(struct umass_softc *, uint8_t *, uint8_t); +static bool umass_ufi_transform(struct umass_softc *, uint8_t *, uint8_t); +static bool umass_atapi_transform(struct umass_softc *, uint8_t *, uint8_t); +static bool umass_no_transform(struct umass_softc *, uint8_t *, uint8_t); +static bool umass_std_transform(struct umass_softc *, union ccb *, uint8_t *, uint8_t); #ifdef USB_DEBUG @@ -2677,7 +2676,7 @@ umass_cam_quirk_cb(struct umass_softc *sc, union ccb *ccb, uint32_t residue, * SCSI specific functions */ -static uint8_t +static bool umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { @@ -2685,7 +2684,7 @@ umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); - return (0); /* failure */ + return (false); /* failure */ } sc->sc_transfer.cmd_len = cmd_len; @@ -2697,7 +2696,7 @@ umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, memset(sc->sc_transfer.cmd_data, 0, cmd_len); sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; sc->sc_transfer.cmd_data[4] = SSS_START; - return (1); + return (true); } break; @@ -2709,23 +2708,23 @@ umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; - return (1); + return (true); } break; } memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); - return (1); + return (true); } -static uint8_t +static bool umass_rbc_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { if ((cmd_len == 0) || (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); - return (0); /* failure */ + return (false); /* failure */ } switch (cmd_ptr[0]) { /* these commands are defined in RBC: */ @@ -2756,17 +2755,17 @@ umass_rbc_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) cmd_len = 12; } sc->sc_transfer.cmd_len = cmd_len; - return (1); /* success */ + return (true); /* success */ /* All other commands are not legal in RBC */ default: DPRINTF(sc, UDMASS_SCSI, "Unsupported RBC " "command 0x%02x\n", cmd_ptr[0]); - return (0); /* failure */ + return (false); /* failure */ } } -static uint8_t +static bool umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { @@ -2774,7 +2773,7 @@ umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); - return (0); /* failure */ + return (false); /* failure */ } /* An UFI command is always 12 bytes in length */ sc->sc_transfer.cmd_len = UFI_COMMAND_LENGTH; @@ -2829,21 +2828,21 @@ umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, * know what to do. */ case SYNCHRONIZE_CACHE: - return (0); + return (false); default: DPRINTF(sc, UDMASS_SCSI, "Unsupported UFI " "command 0x%02x\n", cmd_ptr[0]); - return (0); /* failure */ + return (false); /* failure */ } memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); - return (1); /* success */ + return (true); /* success */ } /* * 8070i (ATAPI) specific functions */ -static uint8_t +static bool umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, uint8_t cmd_len) { @@ -2851,7 +2850,7 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, (cmd_len > sizeof(sc->sc_transfer.cmd_data))) { DPRINTF(sc, UDMASS_SCSI, "Invalid command " "length: %d bytes\n", cmd_len); - return (0); /* failure */ + return (false); /* failure */ } /* An ATAPI command is always 12 bytes in length. */ sc->sc_transfer.cmd_len = ATAPI_COMMAND_LENGTH; @@ -2874,7 +2873,7 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; - return (1); + return (true); } break; @@ -2884,7 +2883,7 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, "to START_UNIT\n"); sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; sc->sc_transfer.cmd_data[4] = SSS_START; - return (1); + return (true); } break; @@ -2933,29 +2932,29 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, } memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); - return (1); /* success */ + return (true); /* success */ } -static uint8_t +static bool umass_no_transform(struct umass_softc *sc, uint8_t *cmd, uint8_t cmdlen) { - return (0); /* failure */ + return (false); /* failure */ } -static uint8_t +static bool umass_std_transform(struct umass_softc *sc, union ccb *ccb, uint8_t *cmd, uint8_t cmdlen) { uint8_t retval; if (sc->sc_transform(sc, cmd, cmdlen)) - return (1); /* Execute command */ + return (true); /* Execute command */ xpt_freeze_devq(ccb->ccb_h.path, 1); ccb->ccb_h.status = CAM_REQ_INVALID | CAM_DEV_QFRZN; xpt_done(ccb); - return (0); /* Already failed */ + return (false); /* Already failed -- don't submit */ } #ifdef USB_DEBUG From nobody Wed May 7 21:37: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 4Zt7rn6qdsz5vL25; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rn4m0wz3m7R; Wed, 07 May 2025 21:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0UI6dmkgCXGnxm1FFi5mPSfdvDNoP2562q9V72/5IY=; b=EEBHpfJW8his+CSN4J335upg4g/P9KKTNOBoWfRS75i38lE1dSZxsyePyOp8upc851/V5H rPuG/ZmBU729Ikp0IutMSGMG8COmnoT0iro/09cAKcQHQRSAlLIG4+LwqHPrnNiOHVddRS tTIxqbb89lVDnP0VhQRu5b4Q/BC9SaHaXf1TpbJqFjIdTr4sZzGMs8EEmGKmUfsoeP8JKg cFAijazkEM/N6bHZCJZjwr1JwP9/EK3S4Ik4OfxnpcTCtFDjd70IdcXhsIf3GRdcZYCq8R Hx/wQlSKN3Thqdk4IZraES9FbUucz/qd5PL+YFoqhL1zF+LVWR+p9dcFSoE1fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W0UI6dmkgCXGnxm1FFi5mPSfdvDNoP2562q9V72/5IY=; b=qseuITn0T3z8uN5ScsyFlzzr+JbDDpHUEdj7cb314CyyxbUVjm3Qk39Py9A1F5xA/Vtx2V 2wRzURgJHFZh4WTJ7bdeLbknUrRz59qNAJgQ62b8MxZjF4HAy+yi0wPBq9DzBIs6g5fABn zaiqQDpAnvWoDQzCdO2r6afPVEyBCAgsozKKSo2ErSZumaew67hz9lZjZWSddQMaxNoW8O w61piSOXE4rxkRc133nVfUlSl/fAfAyeUZ/nAxkneFLATAjnYZR0ZhjO1MKUGzgXqBQ4f6 GSZpZI0/KMJlQpfDou9rhGWGM768C2KpfYTklYM4Ibh5iJgseYqGSeqpwyCyFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653833; a=rsa-sha256; cv=none; b=XAGmRhriOH4A8Zup4AVKC2PHvMIFpNcOETdbN5rc0jWdxa3lPvJ/X1jRAUI0suWVllI4qV 0AINMc3HPNViAfq/eMaet00gZz0MKjBQu49CFVVZq4LmQK+mj2cIFbGPjbXwQUn99OVgMj FkHzPITm4Btp0Akg28lJadiMTMDZF4EWq7d7FXu3aMp+KwfTVqKL0KLzUSndk/PcsUM99T k3fvZ1ra7Zci4sRGhDTDxeDOym4MCzDWoWDMZlApXQ4UQJX1ISfknHSov+XXi3PDWL5Fnz oeAbl2TgQOvRb0BpS4Dn+w4aYcneZxfsLQhN/QAa0tZhln5M+o+fpCDg8gC0QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rn4MYPzn6W; Wed, 07 May 2025 21:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbD1Z092193; Wed, 7 May 2025 21:37:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbDDL092190; Wed, 7 May 2025 21:37:13 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:13 GMT Message-Id: <202505072137.547LbDDL092190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 43030e34453b - main - umass: Be more consistent about how we fail bad commands List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43030e34453bf5cc92c6cd62f1b07c246eeec3ba Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=43030e34453bf5cc92c6cd62f1b07c246eeec3ba commit 43030e34453bf5cc92c6cd62f1b07c246eeec3ba Author: Warner Losh AuthorDate: 2025-05-07 16:07:40 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:55 +0000 umass: Be more consistent about how we fail bad commands Elsewhere, if we fail a command, we use SCSI code ILLEGAL REQUEST/24/00, but here we were using the CAM code for illegal request. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49473 --- sys/dev/usb/storage/umass.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index a5f1c891a509..04a0157b14ce 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2890,10 +2890,7 @@ umass_std_transform(struct umass_softc *sc, union ccb *ccb, } if (sc->sc_transform(sc, cmd, cmd_len)) return (true); /* Execute command */ - - xpt_freeze_devq(ccb->ccb_h.path, 1); - ccb->ccb_h.status = CAM_REQ_INVALID | CAM_DEV_QFRZN; - xpt_done(ccb); + umass_cam_illegal_request(ccb); return (false); /* Already failed -- don't submit */ } From nobody Wed May 7 21:37: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 4Zt7rn01QMz5vKp7; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rm4SMQz3lyw; Wed, 07 May 2025 21:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K4+AiFcG8BpRurY4lu6dIxmRb6iQp+4Uq0X/UuGrNok=; b=AuJnwr3TvDxpHR2zau0zndxqTSioaTe4UgV0TlZ2YkbQ4EWwfAAeXtgNiGoW4gffFKuDh3 JxUW7IrGnldcIWw3Garjc7VN+YzQiRM4mAbG4WZ/oc778NiGbUtsqFdDTMKUMVe0wLvS1P itIMfMnlt/CG+kHS0FywT6f0eGn+gbeYsUemPB8nbZoxTvS9S4mbIEHr6xzHIyeVWadYCW /StXWq21y76b/nS4AZLypAUBgaKq9hmgTdq1vS6AQDD1RXrlIxs7JMURm+E6Ga90BxSDGV RGdbFuKHWSqfLlVeC+wXxNOzGifrSD0EcHmuL4g01ZPWvxsE8a5eOrKe1qnVBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K4+AiFcG8BpRurY4lu6dIxmRb6iQp+4Uq0X/UuGrNok=; b=l8Ga1OwSNxHeGSGo8tlZ9trufk2OOQagRiaKCSWtEwNpxitrL9oJtXHJLKnvQK8GBukWTE wP9ryVrrZGON1MZc4vpxL/gtK3D2SikowZWaPYxAIXAVm8rql8B5iMbGIWLrV5vEWTXZe6 EQ2bLi3xTAgW9td2tHHN6zUUdS5vHMjxuzwuxgSq+nSOA/yyCTYTVo6hLTbzI5tfd5ZcYX pB+aFyJ3HZzixZYq5j7KClRrUeTfJinwX8E+89Hw248wQr/y1wFUTYltdadrVzUGYnm6R4 BkYlwFFiBXFufbCwzFxdkkkXxDXlV1s2TTI+g7gpu5jBRI1vneYIE+Cm9k4qUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653832; a=rsa-sha256; cv=none; b=WYZAli9WmjzynqmRmy8uiq7V3Dkb0N1LAYcOl+YlYeG+92aspiZjVZwrO3IUmSav45EVch manEGdB7XTjEy4+2vbYw0jLwMaCMilUE5SUX7L83Dr1mdClpRkbh1HwjtHLLg5hMOp43nk PXs/4p6OpX4+sZybLInWQuLolJf6J3NmGJE0D3+5AxgFnlC6esubumUKeAzuy9HFVjhp+p 1JCBrCklNqhOP39sHxjeUVnuKY2KowV8eRYBgCrAppV2GXb/pCQde79zQ096J0jG6FhZgy M9YPHMQtOA8+JHrb0ihB5dtsidHJFaL/WKhSD4PqNuF5h/jbcEJJ4s+CqJOGCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rm3wk7zmpm; Wed, 07 May 2025 21:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbCBU092157; Wed, 7 May 2025 21:37:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbCGb092154; Wed, 7 May 2025 21:37:12 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:12 GMT Message-Id: <202505072137.547LbCGb092154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 86de66a67432 - main - umass: Move INQUIRY and TEST UNIT READY quirks to umass_std_transform List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86de66a67432008fb92a1520931e6ec4365b770b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=86de66a67432008fb92a1520931e6ec4365b770b commit 86de66a67432008fb92a1520931e6ec4365b770b Author: Warner Losh AuthorDate: 2025-05-07 16:07:36 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:55 +0000 umass: Move INQUIRY and TEST UNIT READY quirks to umass_std_transform Only doing a short inquiry and converting TUR to START STOP UNIT are the same everywhere, so move those quirks to umass_std_transform. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49472 --- sys/dev/usb/storage/umass.c | 100 ++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 64 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 344a42f718fc..a5f1c891a509 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2682,28 +2682,6 @@ umass_scsi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, { sc->sc_transfer.cmd_len = cmd_len; - switch (cmd_ptr[0]) { - case TEST_UNIT_READY: - if (sc->sc_quirks & NO_TEST_UNIT_READY) { - DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " - "to START_UNIT\n"); - memset(sc->sc_transfer.cmd_data, 0, cmd_len); - sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; - sc->sc_transfer.cmd_data[4] = SSS_START; - return (true); - } - break; - - case INQUIRY: - /* - * some drives wedge when asked for full inquiry - * information. - */ - if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; - } - break; - } return (true); } @@ -2759,27 +2737,12 @@ umass_ufi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, * should work. Copy the command into the (zeroed out) * destination buffer. */ - case TEST_UNIT_READY: - if (sc->sc_quirks & NO_TEST_UNIT_READY) { - /* - * Some devices do not support this command. Start - * Stop Unit should give the same results - */ - DPRINTF(sc, UDMASS_UFI, "Converted TEST_UNIT_READY " - "to START_UNIT\n"); - - /* Zero the command data */ - memset(sc->sc_transfer.cmd_data, 0, UFI_COMMAND_LENGTH); - sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; - sc->sc_transfer.cmd_data[4] = SSS_START; - return (1); - } - break; case REZERO_UNIT: case REQUEST_SENSE: case FORMAT_UNIT: case INQUIRY: + case TEST_UNIT_READY: case START_STOP_UNIT: case SEND_DIAGNOSTIC: case PREVENT_ALLOW: @@ -2828,30 +2791,11 @@ umass_atapi_transform(struct umass_softc *sc, uint8_t *cmd_ptr, * should work. Copy the command into the destination * buffer. */ - case INQUIRY: - /* - * some drives wedge when asked for full inquiry - * information, so adjust the transfer length - */ - if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; - } - break; - - case TEST_UNIT_READY: - if (sc->sc_quirks & NO_TEST_UNIT_READY) { - DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " - "to START_UNIT\n"); - memset(sc->sc_transfer.cmd_data, 0, ATAPI_COMMAND_LENGTH); - sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; - sc->sc_transfer.cmd_data[4] = SSS_START; - return (true); - } - break; - case REZERO_UNIT: case REQUEST_SENSE: + case INQUIRY: case START_STOP_UNIT: + case TEST_UNIT_READY: case SEND_DIAGNOSTIC: case PREVENT_ALLOW: case READ_CAPACITY: @@ -2905,18 +2849,46 @@ umass_no_transform(struct umass_softc *sc, uint8_t *cmd, static bool umass_std_transform(struct umass_softc *sc, union ccb *ccb, - uint8_t *cmd, uint8_t cmdlen) + uint8_t *cmd, uint8_t cmd_len) { - uint8_t retval; - if (cmd_len == 0 || cmd_len > sizeof(sc->sc_transfer.cmd_data)) { DPRINTF(sc, UDMASS_SCSI, "Invalid command length: %d bytes\n", cmd_len); return (false); /* failure */ } - memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); - if (sc->sc_transform(sc, cmd, cmdlen)) + /* + * Copy the CDB to the cmd_data buffer and then apply the common quirks + * to the code. We then pass the transformed command down to allow + * further transforms. + */ + memset(sc->sc_transfer.cmd_data, 0, sizeof(sc->sc_transfer.cmd_data)); + memcpy(sc->sc_transfer.cmd_data, cmd, cmd_len); + switch (cmd[0]) { + case TEST_UNIT_READY: + /* + * Some drive choke on TEST UNIT READY. Convert it to START STOP + * UNIT to get similar status. + */ + if ((sc->sc_quirks & NO_TEST_UNIT_READY) != 0) { + DPRINTF(sc, UDMASS_SCSI, + "Converted TEST_UNIT_READY to START_UNIT\n"); + memset(sc->sc_transfer.cmd_data, 0, cmd_len); + sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; + sc->sc_transfer.cmd_data[4] = SSS_START; + } + break; + + case INQUIRY: + /* + * some drives wedge when asked for full inquiry + * information. + */ + if ((sc->sc_quirks & FORCE_SHORT_INQUIRY) != 0) + sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; + break; + } + if (sc->sc_transform(sc, cmd, cmd_len)) return (true); /* Execute command */ xpt_freeze_devq(ccb->ccb_h.path, 1); From nobody Wed May 7 21:37: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 4Zt7rq31c2z5vKv6; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rp6Jj7z3m7s; Wed, 07 May 2025 21:37:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EnsCgKCHJs4oKxImPVqSBPcnU4wNnl6b2ij4lBH0qKM=; b=Fenx+oT+V9fthkhXPUAvWF8B2wLnQ2JOOoHLG6e1tHl9CyqAE4FQ3sdKUkDRu0l4leT3yT QxOa7ueINcnfKArE8pCZsJeKYHNmykEzcu0dQUAaF3rnLpRMwwh7resLNQIDrIHZ9H5X+M E4qjLvPh1WX9Rw0niUMlt2/KHjTh6NOQsmy5b8PFp9f2oz1ABB3zjyRdQFbRm2Rc2zvxmn 7drY5YkHcwAQF56FIZrA7Oy+WTdX/0O0wSfyf8K05AvThxalZdLhIUJlwTIMXPP6XS9B8V hCWQbPUJDY/ug9zckIxtFuPDm1RGSPFS9o2ULArpJ+Im9RpTc0YDOpTn/mBYMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EnsCgKCHJs4oKxImPVqSBPcnU4wNnl6b2ij4lBH0qKM=; b=wBlw9agpPNG9maD1J5UyrdVKurgGjJEM2SbfO0K+PzO7e+xQ3mCm38f4l2XIay6eWyqVEu Tyo6xVBqFowwaQ7S3nAYJq9b+GzuQWHHWa3O0oeSCjShdfDTEHF3Kuh17+7rhjLGiSy/CB DDCFD1aEPnvyu8g7M2XrFXZZc8dSCmHi7jUiHgw8LGnrSnYHKIW6vP5OWGJw2B4IgstV9r 1kBZQLr3Y9dg2ADXQ36C/iwLenPCJ32+c9d6jOCsajtrzyz0IVrYxs9BtzUXXobZNkRgif GEJqpMiwCcTRoL3m9rY5orwcdnVfmX8M8zyPc5jeVQAFuGF314wW/4rkH0Vx0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653835; a=rsa-sha256; cv=none; b=iESSI9ftsTQKyXnk9Z1RoD2aTrEMrF01HAyywSHx5X3jZHJRRo77f7V9nurEO/x8bsGo93 6iVlIjGGxdg5XHAlLOR922pLFLZSySsSdkugI+ABMuzGfw6SRUIdVhqCvIJIO6GyVdNLv6 Q44Jag0dANnfwggaeLiPDXbe5IUME9zn1lker936fQec+aE/L+VyCKomrhTSjlHC/3stFY WoxB98SFhcfE5zFQS7WsFXOtD2YEcsS+i6ftXpb90TejPZLtNcy29zchAERD5c0Zk6qaW0 PXsnijMQU+yJj3fbsFW50MX2FSdloFb53E39dd4mDqhO2YNYqSj7CbIndEwD7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rp5b9hzn6X; Wed, 07 May 2025 21:37:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbE62092225; Wed, 7 May 2025 21:37:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbEAB092222; Wed, 7 May 2025 21:37:14 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:14 GMT Message-Id: <202505072137.547LbEAB092222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ff77f1ca5ae8 - main - umass: Fix a direct call to sc_transform List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff77f1ca5ae8dd7fcaee54672067e1493d953d7e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ff77f1ca5ae8dd7fcaee54672067e1493d953d7e commit ff77f1ca5ae8dd7fcaee54672067e1493d953d7e Author: Warner Losh AuthorDate: 2025-05-07 16:07:45 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:55 +0000 umass: Fix a direct call to sc_transform Call umass_std_transform instead of following the sc_transform member to get the standard transforms now that has moved to umass_std_transform. Pass NULL as the CCB so that we don't stomp on the status that was just set (and allow that in std_transform). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49474 --- sys/dev/usb/storage/umass.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index 04a0157b14ce..c3a5028f5726 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2625,11 +2625,14 @@ umass_cam_sense_cb(struct umass_softc *sc, union ccb *ccb, uint32_t residue, DPRINTF(sc, UDMASS_SCSI, "Doing a sneaky" "TEST_UNIT_READY\n"); - /* the rest of the command was filled in at attach */ - - if ((sc->sc_transform)(sc, + /* + * Transform the TUR and if successful, send it. Pass + * NULL for the ccb so we don't override the above + * status. + */ + if (umass_std_transform(sc, NULL, &sc->cam_scsi_test_unit_ready.opcode, - sizeof(sc->cam_scsi_test_unit_ready)) == 1) { + sizeof(sc->cam_scsi_test_unit_ready))) { umass_command_start(sc, DIR_NONE, NULL, 0, ccb->ccb_h.timeout, &umass_cam_quirk_cb, ccb); @@ -2890,7 +2893,8 @@ umass_std_transform(struct umass_softc *sc, union ccb *ccb, } if (sc->sc_transform(sc, cmd, cmd_len)) return (true); /* Execute command */ - umass_cam_illegal_request(ccb); + if (ccb) + umass_cam_illegal_request(ccb); return (false); /* Already failed -- don't submit */ } From nobody Wed May 7 21:37: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 4Zt7rr6Chrz5vL29; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rr0RJCz3mJ9; Wed, 07 May 2025 21:37:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tWai8Edds1gJf9P7q0uCNsFtzoGdX4sYhUhVA/Ci4M=; b=C2Wth1T/IzTuCHZdnbkTZpxG3JsL1UvioNDaKcNcLLakv+4T9vPyGNYYDcvQ6YGhS1nCuJ HGG0nXkD+RAxNDzabeugOImY5E8+xczicxD1LKAUoNE+QpsJWbEEWV1IguPqGpXLRn7lSb JV1aN4UcjZ1kALWeN+GHvz+UhHMoj/k/60zllVBTe/aeqDBu52jez1l9KfyxyyxFAjgl1u iU82dveXr/uEIUqCdsHRHmPrRWf0xMlQPvjQPjCVFW2zw9BJNQqmh990OuVxOxnbpomeZ1 E6cAWaQPFUjX8zZ9XzfdNKeIuxUOUxXcBViAHkts9V3rVJcEeK2HZ2yZ8CUMxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2tWai8Edds1gJf9P7q0uCNsFtzoGdX4sYhUhVA/Ci4M=; b=vUdrsi4Ei0eLI9nsL11iKJX+7oNfm5fRyqKWLPOEVALQUsqz6nHKzfDNUUg6mQJYRrTeHm K2LW9zLy7Dl4CF7IdFlllbz3HA0seXEcSU2gliib+mxvvuwEYVa6DavlJJ4ObGXmo3ueV6 cG35voUGWn/hApnFv4GgG9xRmJVgm8fOMRUzTpdDwoPu4Z/k4234CKgNC5Lb6/sysbwP7t a1xZ0ykBQ6viwj444c8aHHIpCkwiR5mNdLBIOignlDRKmzTOqqP0vHo3cscEqIayl2qZ4i m91E7Tx/zccUfh+1kP+yq+p1ORhugAcGgsoQb6Cpy5G3bxNoMWfsf/M5JZZwFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653836; a=rsa-sha256; cv=none; b=ZR8AKyfNV3JSgFrfrwdywtdCKv6y7k57vCWohxEkZkO0U/9ZqPYXgRSO1e6jLRIS8KNt/P cC22d5lCBPoGg5H0iejkrasXCWzK00ogJ4Hy5mrQzzS/ZBuyhNq3OgZJo78dx/UuoE8HzS 0caarSqGCq4zprwga2CJT50ihOu6LyyiD0SLNjdU2zyToubJLX7C6SZCnaBGFet1CNNuHt cP83PX05GoUZw2hoJOcW/v5ninbUc++Q1c4MTZoRE1a1H9fmM48U5liyhORvuTjy31ICx5 nQKXeGHMUhHlg2RxnyY+gLsvAwpiWNWji8oLDOhaaImoeq11j7rnNwkt4ur9iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rq6YGyzn6Y; Wed, 07 May 2025 21:37:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbF5V092257; Wed, 7 May 2025 21:37:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbFOt092254; Wed, 7 May 2025 21:37:15 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:15 GMT Message-Id: <202505072137.547LbFOt092254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ec3cc37bd938 - main - umass: Bring in small fix from NetBSD's umass List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec3cc37bd938446839a34ab9eca79c75257383e1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ec3cc37bd938446839a34ab9eca79c75257383e1 commit ec3cc37bd938446839a34ab9eca79c75257383e1 Author: Warner Losh AuthorDate: 2025-05-07 16:07:50 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:55 +0000 umass: Bring in small fix from NetBSD's umass When completing a request for UFI, don't fail the request on non-zero asc/ascq values if we've done a request sense. This idea is from umass.c 1.100 by mycroft. He used it to help elminate the INQUIRY_SHORT quirk that we still have. However, it will make little difference because we treat both return values the same for CBI. And it appears we have (maybe bogusly) some devices that specify this quirk that aren't CBI. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49475 --- sys/dev/usb/storage/umass.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index c3a5028f5726..cacf4ddf8f16 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -431,6 +431,7 @@ struct umass_softc { uint8_t sc_maxlun; /* maximum LUN number, inclusive */ uint8_t sc_last_xfer_index; uint8_t sc_status_try; + bool sc_sending_sense; }; struct umass_probe_proto { @@ -2013,16 +2014,20 @@ umass_t_cbi_status_callback(struct usb_xfer *xfer, usb_error_t error) /* * Section 3.4.3.1.3 specifies that the UFI command * protocol returns an ASC and ASCQ in the interrupt - * data block. + * data block. However, we might also be fetching the + * sense explicitly, where they are likely to be + * non-zero, in which case we should succeed. */ DPRINTF(sc, UDMASS_CBI, "UFI CCI, ASC = 0x%02x, " "ASCQ = 0x%02x\n", sc->sbl.ufi.asc, sc->sbl.ufi.ascq); - status = (((sc->sbl.ufi.asc == 0) && - (sc->sbl.ufi.ascq == 0)) ? - STATUS_CMD_OK : STATUS_CMD_FAILED); + if ((sc->sbl.ufi.asc == 0 && sc->sbl.ufi.ascq == 0) || + sc->sc_transfer.cmd_data[0] == REQUEST_SENSE) + status = STATUS_CMD_OK; + else + status = STATUS_CMD_FAILED; sc->sc_transfer.ccb = NULL; From nobody Wed May 7 21:37: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 4Zt7rs3flrz5vKPs; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rs1ZVYz3m56; Wed, 07 May 2025 21:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gaiNEcYkf+lVnLMwBuoHKdb+qi+G+d020NEOtLaCdEc=; b=q1Cj2urz3RBLVEVulaKgtuU7j2HA7/12OwACwFZ/KsLLSOuNRlAW9JeuMlLJ59YFmWb76+ giV1P/dIHi7gq+X4suAP3SOvSwuJr7Nq14yjXIdIPPB1BgaGY83UKtfhv37jka3usLytK5 Vh35vAlCWrDY1GNnN8zUUYYLv9q8Ee2F2MhorIgwS4o8tsJT/ZUEP/6ez9CV0E3QUvBeMi KOvTjW/j2cXWlg45VZdx5d0odAwhLEiIq0s+ZJULGdPy35hBqfxCiPkvCReDZb0Z488rey 9+QV0x03CSJT1vwilqqPwn6VBtSBB7oqdzKI6GUFCWUVqGJ1d9gC7tE/ExI/uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gaiNEcYkf+lVnLMwBuoHKdb+qi+G+d020NEOtLaCdEc=; b=NoGngyXYKtyTHvIuILA7oG5NJXLaU5vAiOvvr9Cu3cXzOToKpO48kPzq/wzhhPkJBN+iQF KEtLB0vtSbVBLF4Eek4Go3bUVUnVbF1gwq/oESLCRkhfm+dSo4hKeg+UQjcW96QgQdriC7 HtvoWjuPwnkNgPUMVYdqe152kY+5v+mlX6Y+d1zZ09+my1mXL4PZvwzxt9X05a1MM7Zfoo D6ISiVgSLLQOca6HNpM572egFBxIZ6oywQEDtpU98jkr2oWeqiHe5cOfMZCBeTCj3+RwiF hE2gxMe+3Iyg16u6hxP7A/ylUMDS1d0eVEnmB/keTXZ7JX2179x2qSdsPGaYRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653837; a=rsa-sha256; cv=none; b=de21cYzT75B7Tkp1cvU//eAWH6ZEM4PB6bYXYI2GZX0mZY/nEGSGWgbPHXIWxYAFmKk8Ia 2QHhVhc8Nth8mBkItJWNynxTAdUaIRRK29E0Dy5I9IY4kRIt3jaFvPJOpjTBteYOdf9Vob snEM2FkDBv+7uNMJMnCfZ/c/j/rNFV4FWNT2h8ekY13DA6Q+QrYo/WaWlmRqzc+qTeiYjN jIjFx6eS74dm4LUV8ZEoYFd2CxPt2l+TlnkXGH11C1FRgtRHJRqh6DWWIVtp5IYM3dTTw0 fCmdDNXeFDoY5oXSP7//bX8u381WixrPeGNwE+Zm9c9V7yJp7jI54pQ5ZL61jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rs0PsYzmpn; Wed, 07 May 2025 21:37:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbGAH092289; Wed, 7 May 2025 21:37:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbGwf092286; Wed, 7 May 2025 21:37:16 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:16 GMT Message-Id: <202505072137.547LbGwf092286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d5489f7d91ae - main - scsi/da: Only send SYNC CACHE for devices with mode page 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5489f7d91aee42e474bb66602bdbd6d9bedaffa Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d5489f7d91aee42e474bb66602bdbd6d9bedaffa commit d5489f7d91aee42e474bb66602bdbd6d9bedaffa Author: Warner Losh AuthorDate: 2025-05-07 16:07:55 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:55 +0000 scsi/da: Only send SYNC CACHE for devices with mode page 8 Mode page 8 is the 'cache' mode page. It's used to control the cache, if one is present, on a device. When it is absent, that's a very strong hint that SYNCHRONIZED CACHE willl not be necessary. Set the NO_SYNC_CACHE quirk for this situation. SBC defines the 2010 Profile which specifies that both SYNCRHONIZE CACHE and Cache Mode Page must be supported. There are additional vague statements tieing these two together, but nothing that explicitly requires Cache Mode Page support when SYNCHRONIZE CACHE is needed for cache coherency. However, when the Cace Mode Page is present, that's a very strong hint SYNCHRONIZE CACHE is supported (or at the very least won't hang the firmware). Given the diversity of implementations, it's hard to say this is 100% safe. However, many devices known to hang or worse on a SYNCHRONIZE CACHE tolerate querying an unsupported mode page well. If there's any devices that have a valid Cache page, but where SYNCHRONIZE CACHE actually hangs can be dealt with by specific quirks. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49476 --- sys/cam/scsi/scsi_da.c | 245 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 212 insertions(+), 33 deletions(-) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 71a4b0fa6b22..0a2389cd9b5d 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -87,6 +87,7 @@ typedef enum { DA_STATE_PROBE_WP, DA_STATE_PROBE_RC, DA_STATE_PROBE_RC16, + DA_STATE_PROBE_CACHE, DA_STATE_PROBE_LBP, DA_STATE_PROBE_BLK_LIMITS, DA_STATE_PROBE_BDC, @@ -120,7 +121,8 @@ typedef enum { DA_FLAG_CAN_ATA_SUPCAP = 0x020000, DA_FLAG_CAN_ATA_ZONE = 0x040000, DA_FLAG_TUR_PENDING = 0x080000, - DA_FLAG_UNMAPPEDIO = 0x100000 + DA_FLAG_UNMAPPEDIO = 0x100000, + DA_FLAG_LBP = 0x200000, } da_flags; #define DA_FLAG_STRING \ "\020" \ @@ -144,7 +146,8 @@ typedef enum { "\022CAN_ATA_SUPACP" \ "\023CAN_ATA_ZONE" \ "\024TUR_PENDING" \ - "\025UNMAPPEDIO" + "\025UNMAPPEDIO" \ + "\026LBP" \ typedef enum { DA_Q_NONE = 0x00, @@ -190,6 +193,7 @@ typedef enum { DA_CCB_PROBE_ATA_SUP = 0x10, DA_CCB_PROBE_ATA_ZONE = 0x11, DA_CCB_PROBE_WP = 0x12, + DA_CCB_PROBE_CACHE = 0x13, DA_CCB_TYPE_MASK = 0x1F, DA_CCB_RETRY_UA = 0x20 } da_ccb_state; @@ -1525,6 +1529,8 @@ static void dadone_probeblklimits(struct cam_periph *periph, union ccb *done_ccb); static void dadone_probebdc(struct cam_periph *periph, union ccb *done_ccb); +static void dadone_probecache(struct cam_periph *periph, + union ccb *done_ccb); static void dadone_probeata(struct cam_periph *periph, union ccb *done_ccb); static void dadone_probeatalogdir(struct cam_periph *periph, @@ -3756,6 +3762,45 @@ out: xpt_action(start_ccb); break; } + case DA_STATE_PROBE_CACHE: + { + void *mode_buf; + int mode_buf_len; + + /* XXX Future: skip if already not doing SYNC CACHE */ + + /* + * Probe the CACHE mode page to see if we need to do a + * SYNCHRONIZE CACHE command or not. If there's no + * caching page, or we get back garbage when we ask + * for the caching page or MODE SENSE isn't supported, + * we set DA_Q_NO_SYNC_CACHE. + */ + mode_buf_len = sizeof(struct scsi_mode_header_6) + + sizeof(struct scsi_mode_blk_desc) + + sizeof(struct scsi_caching_page); + mode_buf = malloc(mode_buf_len, M_SCSIDA, M_NOWAIT); + if (mode_buf == NULL) { + printf("dastart: Couldn't malloc mode_buf data\n"); + /* da_free_periph??? */ + break; + } + scsi_mode_sense(&start_ccb->csio, + /*retries*/4, + dadone_probecache, + MSG_SIMPLE_Q_TAG, + /*dbd*/FALSE, + SMS_PAGE_CTRL_CURRENT, + SMS_CACHE_PAGE, + mode_buf, + mode_buf_len, + SSD_FULL_SIZE, + /*timeout*/60000); + start_ccb->ccb_h.ccb_bp = NULL; + start_ccb->ccb_h.ccb_state = DA_CCB_PROBE_CACHE; + xpt_action(start_ccb); + break; + } case DA_STATE_PROBE_ATA: { struct ata_params *ata_params; @@ -4857,7 +4902,7 @@ dadone_proberc(struct cam_periph *periph, union ccb *done_ccb) da_ccb_state state; char *announce_buf; uint32_t priority; - int lbp, n; + int n; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone_proberc\n")); @@ -4873,7 +4918,6 @@ dadone_proberc(struct cam_periph *periph, union ccb *done_ccb) ("CCB State (%lu) not PROBE_RC* in dadone_probewp, periph %p ccb %p", (unsigned long)state, periph, done_ccb)); - lbp = 0; rdcap = NULL; rcaplong = NULL; /* XXX TODO: can this be a malloc? */ @@ -4944,7 +4988,9 @@ dadone_proberc(struct cam_periph *periph, union ccb *done_ccb) */ dasetgeom(periph, block_size, maxsector, rcaplong, sizeof(*rcaplong)); - lbp = (lalba & SRC16_LBPME_A); + if ((lalba & SRC16_LBPME_A) != 0 && + (softc->quirks & DA_Q_NO_UNMAP) == 0) + softc->flags |= DA_FLAG_LBP; dp = &softc->params; n = snprintf(announce_buf, DA_ANNOUNCETMP_SZ, "%juMB (%ju %u byte sectors", @@ -5106,34 +5152,7 @@ dadone_proberc(struct cam_periph *periph, union ccb *done_ccb) return; } - /* Ensure re-probe doesn't see old delete. */ - softc->delete_available = 0; - dadeleteflag(softc, DA_DELETE_ZERO, 1); - if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) { - /* - * Based on older SBC-3 spec revisions - * any of the UNMAP methods "may" be - * available via LBP given this flag so - * we flag all of them as available and - * then remove those which further - * probes confirm aren't available - * later. - * - * We could also check readcap(16) p_type - * flag to exclude one or more invalid - * write same (X) types here - */ - dadeleteflag(softc, DA_DELETE_WS16, 1); - dadeleteflag(softc, DA_DELETE_WS10, 1); - dadeleteflag(softc, DA_DELETE_UNMAP, 1); - - softc->state = DA_STATE_PROBE_LBP; - xpt_release_ccb(done_ccb); - xpt_schedule(periph, priority); - return; - } - - softc->state = DA_STATE_PROBE_BDC; + softc->state = DA_STATE_PROBE_CACHE; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; @@ -5391,6 +5410,166 @@ dadone_probebdc(struct cam_periph *periph, union ccb *done_ccb) return; } +static void +dadone_probecache(struct cam_periph *periph, union ccb *done_ccb) +{ + struct da_softc *softc; + struct ccb_scsiio *csio; + uint32_t priority; + struct scsi_mode_header_6 *sense_hdr; + struct scsi_caching_page *cache_page; + + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone_probecache\n")); + + softc = (struct da_softc *)periph->softc; + priority = done_ccb->ccb_h.pinfo.priority; + csio = &done_ccb->csio; + sense_hdr = (struct scsi_mode_header_6 *)csio->data_ptr; + cache_page = (struct scsi_caching_page *)(csio->data_ptr + + sizeof(struct scsi_mode_header_6) + sense_hdr->blk_desc_len); + + if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + /* + * Sanity check different fields of the data. We make sure + * there's enough data, in total, and that the page part of the + * data is long enough and that the page number is correct. Some + * devices will return sense data as if we'd requested page 0x3f + * always, for exmaple, and those devices can't be trusted + * (which is why we don't walk the list of pages or try to + * request a bigger buffer). The devices that have problems are + * typically cheap USB thumb drives. + */ + if (sense_hdr->data_length + 1 < + sense_hdr->blk_desc_len + sizeof(*cache_page)) { + xpt_print(done_ccb->ccb_h.path, + "CACHE PAGE TOO SHORT data len %d desc len %d\n", + sense_hdr->data_length, + sense_hdr->blk_desc_len); + goto bad; + } + if ((cache_page->page_code & ~SMS_PAGE_CTRL_MASK) != + SMS_CACHE_PAGE) { + xpt_print(done_ccb->ccb_h.path, + "Bad cache page %#x\n", + cache_page->page_code); + goto bad; + } + if (cache_page->page_length != sizeof(*cache_page) - + offsetof(struct scsi_caching_page, flags1)) { + xpt_print(done_ccb->ccb_h.path, + "CACHE PAGE length bogus %#x\n", + cache_page->page_length); + goto bad; + } + /* + * If there's a block descritor header, we could save the block + * count to compare later against READ CAPACITY or READ CAPACITY + * (16), but the same devices that get those wrongs often don't + * provide a block descritptor header to store away for later. + */ + + /* + * Warn about aparently unsafe quirking. A couple of + * my USB sticks have WCE enabled, but some quirk somewhere + * disables the necessary SYCHRONIZE CACHE ops. + */ + if (softc->quirks & DA_Q_NO_SYNC_CACHE && + cache_page->flags1 & SCP_WCE) + xpt_print(done_ccb->ccb_h.path, + "Devices quirked NO_SYNC_CACHE, but WCE=1 enabling write cache.\n"); + } else { + int error, error_code, sense_key, asc, ascq; + bool mark_bad; + + /* + * Three types of errors observed here: + * 24h/00h DZTPROMAEBKVF INVALID FIELD IN CDB + * 26h/00h DZTPROMAEBKVF INVALID FIELD IN PARAMETER LIST + * 3Ah/00h DZT ROM BK MEDIUM NOT PRESENT + * + * The first two are legit ways of saying page 8 doesn't exist + * and set the NO_SYNC_CACHE quirk. The third is a null result: + * At least some devices that report this when a slot is empty + * none-the-less have working SYNCHRONIZE CACHE. Take our + * chances and refrain from setting the quirk. The one device I + * have that does this, but doesn't support the command doesn't + * hang on the command either. I conjecture that the exact card + * that's inserted will determine if SYNC is supported which + * would make repeated probings hard. + */ + mark_bad = true; + if (scsi_extract_sense_ccb(done_ccb, &error_code, &sense_key, + &asc, &ascq)) { + if (sense_key == SSD_KEY_NOT_READY && asc == 0x3a) + mark_bad = false; + } + error = daerror(done_ccb, CAM_RETRY_SELTO, SF_RETRY_UA | SF_NO_PRINT); + if (error == ERESTART) { + return; + } else if (error != 0) { + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { + /* Don't wedge this device's queue */ + cam_release_devq(done_ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + } + } + xpt_print(done_ccb->ccb_h.path, + "MODE SENSE for CACHE page command failed.\n"); + + /* + * There's no cache page, the command wasn't + * supported, retries failed or the data returned was + * junk. Any one of these reasons is enough to + * conclude that the drive doesn't support caching, so + * SYNCHRONIZE CACHE isn't needed and may hang the + * drive! + */ + if (mark_bad) { +bad: + xpt_print(done_ccb->ccb_h.path, + "Mode page 8 missing, disabling SYNCHRONIZE CACHE\n"); + if (softc->quirks & DA_Q_NO_SYNC_CACHE) + xpt_print(done_ccb->ccb_h.path, + "Devices already quirked for NO_SYNC_CACHE, maybe remove quirk table\n"); + softc->quirks |= DA_Q_NO_SYNC_CACHE; + softc->disk->d_flags &= ~DISKFLAG_CANFLUSHCACHE; + } + } + free(sense_hdr, M_SCSIDA); + + /* Ensure re-probe doesn't see old delete. */ + softc->delete_available = 0; + dadeleteflag(softc, DA_DELETE_ZERO, 1); + if ((softc->flags & DA_FLAG_LBP) != 0) { + /* + * Based on older SBC-3 spec revisions + * any of the UNMAP methods "may" be + * available via LBP given this flag so + * we flag all of them as available and + * then remove those which further + * probes confirm aren't available + * later. + * + * We could also check readcap(16) p_type + * flag to exclude one or more invalid + * write same (X) types here + */ + dadeleteflag(softc, DA_DELETE_WS16, 1); + dadeleteflag(softc, DA_DELETE_WS10, 1); + dadeleteflag(softc, DA_DELETE_UNMAP, 1); + + softc->state = DA_STATE_PROBE_LBP; + } else { + softc->state = DA_STATE_PROBE_BDC; + } + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; +} + static void dadone_probeata(struct cam_periph *periph, union ccb *done_ccb) { From nobody Wed May 7 21:37: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 4Zt7rw477Lz5vKPx; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rv2sQ5z3mPd; Wed, 07 May 2025 21:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5FW+hjALNT2H+iUAFrQPo1rFSrY3uM1F+p4DwMTYBqA=; b=gIHzar+vUonXIqSJxyR30jLOBtFqcRUvX25hknPiJhfzZvVAG1cgqQmvrFvbGx4/0jbY1j hJTM9iYn6eShE243BiOcbn0LvC2TCUnmI0WAFWsccTD91mFVt9t12UqS30p/xkFDLHCFyA +SzAr5LCZ2zkEOaKt6CnBUxnQJDcTvXxWahzmVkqpGwacIu4ZVW9QIj5nOP/1OlFTo9Poi fc3ZsUJ9PQM7oX2hkY5CJGjDu4IWM4bJh8iUJSu9bxfTGxsmLOKRT/v9SirhJ5JxAOeEK+ ZhBkssqM63fZefqseDuPNtBTDOvOokdEZzHm79oznziqF1QRHQCqHxlCFBpkAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5FW+hjALNT2H+iUAFrQPo1rFSrY3uM1F+p4DwMTYBqA=; b=nNbR4TaV10f7S6NyyQJxZi1so2NYCbJjYH10SePIJILUvOinDlSk9Mr8xGjwq9gUVufg4b Ah9M6eVxsHw5PNZvdq33oXbHt19IhyNSpXhy3iPGgeWt6eE0GAbqiS3idyI43SkgWF376O PXGe5CMcQ2Fxn8RtJvJZYNlch5crmjUxnWB55MKQasnIr/aof76AxDBCQlz74WgoVW9R9L NZ/i8Ql+J6YvpxKNzDEvWAIw4CXSApJ6k+ZgzQtfHaRicvnDQYB0RrgmBMSRhm0Ae44Ecc N4lxkPWcI6CF13gQQ8sDxTnRsPuSSVGDS4hEpod7cQ50n1Ih3TnV1/6iUQyTyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653839; a=rsa-sha256; cv=none; b=rUzOq1mcKX8T8XT7zkFFtdUYYlrfC8mvD5H4fXN3Cqmi5kF0ui0euFtyj0nNa/3LNhIMXg krkfUUc2F5is48XLWNPtS5Lal/ls4EWzqbrjpUlkKhqv1vttDHq9EVMuGr8rqcfvX09jnS iIHehk4iK8GW4v/aPBKIB4cDDBSlDQ1OPEo0jBCQ86yIK74Ka7PypU7LkIOX7rMOWJe78H /oNBaRhtdhbPjXX9G3V5JVCMlFAjeSvko2km242ZY/d8sne99vcrkXy58vMPKqJie/8d2L YXdbbzVmNCT5C6GYyI/pv6iBgfArhx9Q39PrYlEE+7xnOyc7NI79W/EdURI85w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rv1rVNzmcs; Wed, 07 May 2025 21:37:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbJQT092359; Wed, 7 May 2025 21:37:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbJSM092356; Wed, 7 May 2025 21:37:19 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:19 GMT Message-Id: <202505072137.547LbJSM092356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6f8fbb2adfde - main - usb/quirks: Remove overly broad quirks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f8fbb2adfde9eeb2b13e693e8be19a08e9d0ad4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6f8fbb2adfde9eeb2b13e693e8be19a08e9d0ad4 commit 6f8fbb2adfde9eeb2b13e693e8be19a08e9d0ad4 Author: Warner Losh AuthorDate: 2025-05-07 16:08:51 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:55 +0000 usb/quirks: Remove overly broad quirks Now that we have a safe way to detect the vast majority of problems with SYNCHRONIEZ CACHE, and since I have devices from many of these vendors that work just fine (one of which will hang if you send it a SYNCHROMIZE CACHE), I think these should all be reverted. The details of when they were added are sketchy, the age of the devices in question means these vendors have many generations of products after and the general over-quirking of SYNCHRONIZE CACHE all point to just removing them and adding back specific quirks should any need arise after trying other means to debug. The APPLE quirk was added because the autoquirk code would hang an ipod with RockBox with a reset loop in the firmware. Since it was quirked, it disabled the autoprobe and started working. Now that we've disabled the autoprobe, we can remove it for sure. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49478 --- sys/dev/usb/quirk/usb_quirk.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 653395bbdac9..64396918a3d7 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -565,16 +565,6 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(PLOYTEC, SPL_CRIMSON_1, UQ_CFG_INDEX_1), USB_QUIRK(ROLAND, UA25EX_AD, UQ_AU_VENDOR_CLASS), - /* - * Quirks for manufacturers which USB devices does not respond - * after issuing non-supported commands: - */ - USB_QUIRK_VO(ALCOR, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY), - USB_QUIRK_VO(APPLE, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK_VO(FEIYA, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK_VO(REALTEK, UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK_VO(INITIO, UQ_MSC_NO_SYNC_CACHE), - /* DYMO LabelManager Pnp */ USB_QUIRK(DYMO, LABELMANAGERPNP, UQ_MSC_DYMO_EJECT), From nobody Wed May 7 21:37: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 4Zt7rt5sxtz5vKrY; Wed, 07 May 2025 21:37: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt7rt3f04z3mPN; Wed, 07 May 2025 21:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNWHCJwiw7DJ3B/iValItA+ZO8r5mt7hGg2Jlh1t4Fo=; b=Ldi1ClPsTCL63bO+rrIamHqEFXsaJe4D9QJPxz6kVUOnNNqL5pIryt/PUM30sZgNDHszAo 2MmtYqX/LzrP6O6gpZB3Gjy4/3+b3qoJ5fY9aBvJ7UKNHF7ksTocGfnwcFNIYG4WjWMlyU ++Ye2h1bHi0ROfDfA1WvjrxMzzBLhb6nGH6azz2sRxAYI/D55MWA9SJhwcCG1QSd5WAgQZ 7iezYAbIGvAfbIZzOAVsCqWNht+Kf/mL8xlbygoI05Rkjlra3i8mtCItJ5eipll7fXOHfT TZ8nC6N5xUiArSb84Fd0dRZ97bNFI87eXY+HpL2AqztTBwTSOH3CfYaLFkT0lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746653838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNWHCJwiw7DJ3B/iValItA+ZO8r5mt7hGg2Jlh1t4Fo=; b=D+oAHPYxRVZbokJo8PHAvr+mLkHkA7yPmH+PMTpUIseQXPUQy0IUmpCn9rxrAG6kInlzZS M+h+jbKF+yZWR35xxWMg8t2lHzLaVbuaxFzR8TKcmnQgZ4zFwxyy9ezHseDbi9v42v+aLI o4fCrYxOcwf8iTbLPYDFgHoNBx24hQTXM+0eFjBuj5K8gzQ6EJU8WxNBoix4PNe3RpYb8S 0iwP1cRTpgJrF2oQJnkFRnFO+1QQmxp3tah8PHa2KB7fkSEZaBIFFMnryGmx7iPOMGKdzq s0bZRyPZeN54tX3l1HeG7WCkg5ufHYkwFM1jhFnouz+b14ZmOGLLD+l/lAw1Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746653838; a=rsa-sha256; cv=none; b=svao1FqLyzYBZjVcmps1NLWIrGXZAQZmjY6H7DCs0MKYyBl0x4GW+wMy89uhMzlH3AwaBq VEIXRCzpz3w9WuEyFb8my48lXXxXjkNyX8/qWasE51olrG3DL1uELgQsZpeifklN8J7ok7 DJtwnVlvhUZMG4UpK71M5MiljQDiaXCZbsuJMAs2MYpM2D4yZxDYlrXv4Tz3T97kL8b+rS y93crs2/fNrmSko3MEPK/kpNTbX9xc4edv3PXin9VmK1TNpOKaywlxesGQWpZsdarILMz4 ++nT0QWaZC3/k+G5jDPUX5Xs75EWpbFFAgCxBn65+A71RbPkBM/6C/WPDyZ27Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt7rt1003zmpp; Wed, 07 May 2025 21:37:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LbIg9092323; Wed, 7 May 2025 21:37:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LbI6c092320; Wed, 7 May 2025 21:37:18 GMT (envelope-from git) Date: Wed, 7 May 2025 21:37:18 GMT Message-Id: <202505072137.547LbI6c092320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d41600e59c3f - main - usb: Make autoquirk code optional and opt out List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d41600e59c3f13419066e9dd771a03328c44624f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d41600e59c3f13419066e9dd771a03328c44624f commit d41600e59c3f13419066e9dd771a03328c44624f Author: Warner Losh AuthorDate: 2025-05-07 16:08:01 +0000 Commit: Warner Losh CommitDate: 2025-05-07 21:36:55 +0000 usb: Make autoquirk code optional and opt out There are significant problems with the current autoquirk code. This results in quite a bit of bogus over-quirking. Most commands don't do the proper "sense" dance to get the scsi sense codes to see if the failures are interesting or not. A number of 'sleeps' are used to try to get around this, but they are racy. Rather than fix these, use better hueristics just introduced to catch SYNCHRONIZE CACHE problems, etc. The test for getting max lun number was bogus. It would set this quirk both on errors and when 0 was returned. It appears to be an attempt to filter our REPORT LUNS error messages that are actually benign (we ignore the errors properly). These errors are also only filtered sometimes, so the test is unreliable. In addition, it's doing exactly the same test that the umass driver is doing and recovering in the same way. There's no value add here. The TEST UNIT READY almost always fails because the drive is becoming ready. The SENSE is usually UNIT ATTENTION 28/0 "Drive went from not ready to ready" which is a normal condition. The crazy looping to get INQUIRY data is odd. It shouldn't be needed and rarely actually fails (I've not seen any, despite using this code on some really sketchy drives). It should set a NO_INQUIRY quirk if it fails, but instead sets a whole bunch of other, mostly unrelated quirks if it fails. The INQUIRY code also doesn't recognie RBC devices as well as DIRECT devices. This means it fails on some older generations of cameras that could actually benefit from this code. The SYNCHRONIZE CACHE test is flawed. It will do the same failed test over and over again in the event the command succeeds. There are better ways to detect probelms. The START STOP test is useless. It doesn't really help on any of the devices I've tested on. It appears to be another result of the failure to properly obtain the SENSE code and do appropriate things with it. The PREVENT ALLOW test is useless. It is overwhelmingly used to prevent an error message later. However, after it was added the error message was changed to be informative and not scary. We properly probe this at runtime on all the devices I tested on. At the end of the tests, we try to clear the SENSE errors, but do so imperfectly. Only one is cleared and we use INQUIRY rather than the better TEST UNIT READY. Attempted re-write to fix this caused additional problems as the reset code was not at all robust (the same sequnce in umass / CAM worked when we disabled this code). In addition, the over-quirking and hair-triggered declaration that SYNCHRONIE CACHE is bad would mean that some working drives that have cache wouldn't flush the cache when WCE=1, leading to corruption. Thankfully, nearly all (but not all) the USB sticks I have default to WCE=0. One, however, did default to WCE=1 and some allow setting it (despite the fact this is a bad idea on removeable devices). However, for real disks attached via USB could be tripped up over this. When we do reset, some small subset of drives are now failing to probe. There are reports on the FreeBSD forums that at least one ebook reader no longer works. A different ebook reads is affected as well (one of my long-time friends has htis). in my collection, one USB memory stick, one SD card reader and one USB to generic PATA adapter no longer work. All of them are pretty obscure (you could literally say they were found in my junk drawer), but are troubling. These problems appear to disappear if we stop doing the auto-quirk code. For all these reasons, I'm turning this off and will likely remove it entirely in the future once the alternative SYNC CACHE code has provent itself. Differential Revision: https://reviews.freebsd.org/D49477 Sponsored by: Netflix --- sys/dev/usb/usb_device.c | 2 +- sys/dev/usb/usb_freebsd.h | 1 + sys/dev/usb/usb_freebsd_loader.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index e478fa66b6c9..49195bd0af38 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -2061,7 +2061,7 @@ repeat_set_config: } #endif } -#if USB_HAVE_MSCTEST +#if USB_HAVE_MSCTEST_AUTOQUIRK if (set_config_failed == 0 && config_index == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_START_STOP) == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_PREVENT_ALLOW) == 0 && diff --git a/sys/dev/usb/usb_freebsd.h b/sys/dev/usb/usb_freebsd.h index d67e230e72dd..02ae6b245134 100644 --- a/sys/dev/usb/usb_freebsd.h +++ b/sys/dev/usb/usb_freebsd.h @@ -42,6 +42,7 @@ #define USB_HAVE_TT_SUPPORT 1 #define USB_HAVE_POWERD 1 #define USB_HAVE_MSCTEST 1 +#define USB_HAVE_MSCTEST_AUTOQUIRK 0 #define USB_HAVE_MSCTEST_DETACH 1 #define USB_HAVE_PF 1 #define USB_HAVE_ROOT_MOUNT_HOLD 1 diff --git a/sys/dev/usb/usb_freebsd_loader.h b/sys/dev/usb/usb_freebsd_loader.h index 404456f76152..edc6bcc9720c 100644 --- a/sys/dev/usb/usb_freebsd_loader.h +++ b/sys/dev/usb/usb_freebsd_loader.h @@ -42,6 +42,7 @@ #define USB_HAVE_TT_SUPPORT 1 #define USB_HAVE_POWERD 1 #define USB_HAVE_MSCTEST 1 +#define USB_HAVE_MSCTEST_AUTOQUIRK 0 #define USB_HAVE_MSCTEST_DETACH 0 #define USB_HAVE_PF 0 #define USB_HAVE_ROOT_MOUNT_HOLD 0 From nobody Wed May 7 21:44: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 4Zt81H2cXRz5vL9D; Wed, 07 May 2025 21:44: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt81H2NqZz400l; Wed, 07 May 2025 21:44:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746654275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oocKkfmwjKDBgT3JQzSCkzpcL6+tiwtkf65jEcInmmI=; b=VcReldi6p64MBpPivMniP6r7hDlzQd5CNhJNvSJjK9Ae1hsQyKopv/u5w/nFBSjOJHG2sC WJo51xWyE0VKjIF1eDJq2bIFsiwriK2yCkMVee4P2FZF8/pLfzZVoANIW9Bsg2nwwQktKQ qmTPKrh6VrEIu/tQxfjYAOv5KyH/7EjxqS4CjF1WTFqq15uA8F8sFsOkaP8+O94UL4A5kK Mq0qXE7hP3FCrBamRthvn/Kj4Inl6TKkwQGaqUybMGxkBVX5vhU/Q2leIJNM4rbNQHCg22 fJM2SCbuZVOw/YuKuKRjIAu+XDVEyrcOn5hKY6j0LnH5ceT2mSM+7sy2BOuXlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746654275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oocKkfmwjKDBgT3JQzSCkzpcL6+tiwtkf65jEcInmmI=; b=MNeNa+8EdqcHM+i2N0lotlF5ahGu6kWTqGiR6CWjpAbYt9CmT0S4FwuQi91Md1Dz8UtTLq oPOEG5iax2mkKZOv2jjZJqBgE8KTg4UGcw5OI/qEt2PM1CHhDcHAtbfMAkRnCUQR6GXPk4 R1Va2u5Tgt4W2FeR1uogxx2Bo1aKOaatN9WiCm0i/X0RNhwrbQu8cyFETkB+2JUP1lKbGS 8gMmbAuV9o4zNDBxpsOUJSTthaf7pjjagX2T1BuNDPKGMofaIHHuQQKPsvMb9tYb7iczz2 zNQneLvBSx1fXM/Ct5HeBVixqxz6EpXVTQjJTqsS51CI29vPXmtE1ejPgB7Acg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746654275; a=rsa-sha256; cv=none; b=WxczKcCn3hmVKHdOWFHNP3kkpCELoy6GqqupbFTwVYt2DrLvh/Tmx+MVnIh2OKfIL7VI86 /7+bFlmFpeQznyLmf9gKMvFInTRgS7pK+Jw62Br+cDdFrl4RsCMiDcydwkJTH0dvzv9/TM TfNLDpRhruvTjgh0UELvHdOtlAcKY7SjfS3RcDUHi3ZuS4SNgEPdVVrknUqrozCvRxYYQZ hKzLHB8FEY5CYzu/b78APrd9Tb+zJprDxgPZJOUJUNzKV686DFqv50ynGdK0QxKEQRJWpH 2qY9CPgdHf4WdUzltq48h9VMXToKh/EXnwN+0/VCZyspWqPGDTqCrEcmtVrbew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt81H1rxKznGQ; Wed, 07 May 2025 21:44:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547LiZLL010253; Wed, 7 May 2025 21:44:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547LiZR0010250; Wed, 7 May 2025 21:44:35 GMT (envelope-from git) Date: Wed, 7 May 2025 21:44:35 GMT Message-Id: <202505072144.547LiZR0010250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 4c65b51f44af - main - vm_page: drop mpred param from insert_lookup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c65b51f44af718bd3fcc1c77d1f771159a3d8bd Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=4c65b51f44af718bd3fcc1c77d1f771159a3d8bd commit 4c65b51f44af718bd3fcc1c77d1f771159a3d8bd Author: Doug Moore AuthorDate: 2025-05-07 21:40:51 +0000 Commit: Doug Moore CommitDate: 2025-05-07 21:40:51 +0000 vm_page: drop mpred param from insert_lookup There is no longer a sorted page list maintained by a vm_object, so there is no longer a need for the mpred parameter to vm_page_insert_lookup(). Dropping that parameter creates new functions that also don't need that parameter. Drop all those parameters. Some of the functions have names ending in "_after", where "after" refers to the mpred parameter that is being dropped. So that those names make sense, change "_after" to "_iter" in all of them, because they all take pctrie_iter parameters. Make those parameters last in parameter lists, as "mpred" was before. Reviewed by: alc, markj, kib Differential Revision: https://reviews.freebsd.org/D50199 --- sys/kern/uipc_shm.c | 4 +- sys/vm/phys_pager.c | 4 +- sys/vm/swap_pager.c | 19 ++++---- sys/vm/vm_fault.c | 16 +++---- sys/vm/vm_glue.c | 12 +++-- sys/vm/vm_kern.c | 9 ++-- sys/vm/vm_object.c | 17 +++---- sys/vm/vm_page.c | 126 ++++++++++++++++++++-------------------------------- sys/vm/vm_page.h | 17 ++++--- sys/vm/vm_radix.h | 20 --------- sys/vm/vm_reserv.c | 18 ++++---- sys/vm/vm_reserv.h | 13 +++--- 12 files changed, 104 insertions(+), 171 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 28e90b73aa8d..6f83b875a6b6 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -232,8 +232,8 @@ uiomove_object_page(vm_object_t obj, size_t len, struct uio *uio) * lock to page out tobj's pages because tobj is a OBJT_SWAP * type object. */ - rv = vm_page_grab_valid_iter(&m, obj, &pages, idx, - VM_ALLOC_NORMAL | VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY); + rv = vm_page_grab_valid_iter(&m, obj, idx, + VM_ALLOC_NORMAL | VM_ALLOC_SBUSY | VM_ALLOC_IGN_SBUSY, &pages); if (rv != VM_PAGER_OK) { VM_OBJECT_WUNLOCK(obj); if (bootverbose) { diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index ee39221402fa..3e6766e6f9e9 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -251,8 +251,8 @@ default_phys_pager_populate(vm_object_t object, vm_pindex_t pidx, for (i = base; i <= end; i++) { ahead = MIN(end - i, PHYSALLOC); - m = vm_page_grab_iter(object, &pages, i, - VM_ALLOC_NORMAL | VM_ALLOC_COUNT(ahead)); + m = vm_page_grab_iter(object, i, + VM_ALLOC_NORMAL | VM_ALLOC_COUNT(ahead), &pages); if (!vm_page_all_valid(m)) vm_page_zero_invalid(m, TRUE); KASSERT(m->dirty == 0, diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 38203e4cd0af..86b75a2d7989 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1202,8 +1202,8 @@ swap_pager_copy(vm_object_t srcobject, vm_object_t dstobject, * store exists before and after the requested page. */ static boolean_t -swp_pager_haspage_iter(struct pctrie_iter *blks, vm_pindex_t pindex, - int *before, int *after) +swp_pager_haspage_iter(vm_pindex_t pindex, int *before, int *after, + struct pctrie_iter *blks) { daddr_t blk, blk0; int i; @@ -1265,7 +1265,7 @@ swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, struct pctrie_iter blks; swblk_iter_init_only(&blks, object); - return (swp_pager_haspage_iter(&blks, pindex, before, after)); + return (swp_pager_haspage_iter(pindex, before, after, &blks)); } static void @@ -1366,7 +1366,7 @@ swap_pager_getpages_locked(struct pctrie_iter *blks, vm_object_t object, KASSERT((object->flags & OBJ_SWAP) != 0, ("%s: object not swappable", __func__)); pindex = ma[0]->pindex; - if (!swp_pager_haspage_iter(blks, pindex, &rbehind, &rahead)) { + if (!swp_pager_haspage_iter(pindex, &rbehind, &rahead, blks)) { VM_OBJECT_WUNLOCK(object); uma_zfree(swrbuf_zone, bp); return (VM_PAGER_FAIL); @@ -1935,11 +1935,9 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object, if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) break; } else { - m = vm_radix_iter_lookup_lt(&pages, - blks.index + i); - m = vm_page_alloc_after( - object, &pages, blks.index + i, - VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL, m); + m = vm_page_alloc_iter(object, blks.index + i, + VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL, + &pages); if (m == NULL) break; } @@ -2593,8 +2591,7 @@ swap_pager_scan_all_shadowed(vm_object_t object) * required to clear valid and initiate paging. */ if ((pp == NULL || vm_page_none_valid(pp)) && - !swp_pager_haspage_iter(&blks, new_pindex, NULL, - NULL)) + !swp_pager_haspage_iter(new_pindex, NULL, NULL, &blks)) break; if (pi == pv) vm_page_xunbusy(p); diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 36e6e7d50513..21584abacfa3 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1291,9 +1291,8 @@ vm_fault_allocate(struct faultstate *fs, struct pctrie_iter *pages) vm_fault_unlock_and_deallocate(fs); return (FAULT_FAILURE); } - fs->m = vm_page_alloc_after(fs->object, pages, fs->pindex, - P_KILLED(curproc) ? VM_ALLOC_SYSTEM : 0, - vm_radix_iter_lookup_lt(pages, fs->pindex)); + fs->m = vm_page_alloc_iter(fs->object, fs->pindex, + P_KILLED(curproc) ? VM_ALLOC_SYSTEM : 0, pages); } if (fs->m == NULL) { if (vm_fault_allocate_oom(fs)) @@ -2103,7 +2102,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map __unused, vm_pindex_t dst_pindex, pindex, src_pindex; vm_prot_t access, prot; vm_offset_t vaddr; - vm_page_t dst_m, mpred; + vm_page_t dst_m; vm_page_t src_m; bool upgrade; @@ -2176,11 +2175,9 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map __unused, * regardless of whether they can be written. */ vm_page_iter_init(&pages, dst_object); - mpred = (src_object == dst_object) ? - vm_page_mpred(src_object, src_pindex) : NULL; for (vaddr = dst_entry->start, dst_pindex = 0; vaddr < dst_entry->end; - vaddr += PAGE_SIZE, dst_pindex++, mpred = dst_m) { + vaddr += PAGE_SIZE, dst_pindex++) { again: /* * Find the page in the source object, and copy it in. @@ -2220,15 +2217,14 @@ again: */ pindex = (src_object == dst_object ? src_pindex : 0) + dst_pindex; - dst_m = vm_page_alloc_after(dst_object, &pages, pindex, - VM_ALLOC_NORMAL, mpred); + dst_m = vm_page_alloc_iter(dst_object, pindex, + VM_ALLOC_NORMAL, &pages); if (dst_m == NULL) { VM_OBJECT_WUNLOCK(dst_object); VM_OBJECT_RUNLOCK(object); vm_wait(dst_object); VM_OBJECT_WLOCK(dst_object); pctrie_iter_reset(&pages); - mpred = vm_radix_iter_lookup_lt(&pages, pindex); goto again; } diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index c441b8b3155f..c2a032b24000 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -615,7 +615,7 @@ vm_thread_stack_back(vm_offset_t ks, vm_page_t ma[], int npages, int req_class, struct pctrie_iter pages; vm_object_t obj = vm_thread_kstack_size_to_obj(npages); vm_pindex_t pindex; - vm_page_t m, mpred; + vm_page_t m; int n; pindex = vm_kstack_pindex(ks, npages); @@ -623,14 +623,12 @@ vm_thread_stack_back(vm_offset_t ks, vm_page_t ma[], int npages, int req_class, vm_page_iter_init(&pages, obj); VM_OBJECT_WLOCK(obj); for (n = 0; n < npages; ma[n++] = m) { - m = vm_page_grab_iter(obj, &pages, pindex + n, - VM_ALLOC_NOCREAT | VM_ALLOC_WIRED); + m = vm_page_grab_iter(obj, pindex + n, + VM_ALLOC_NOCREAT | VM_ALLOC_WIRED, &pages); if (m != NULL) continue; - mpred = (n > 0) ? ma[n - 1] : - vm_radix_iter_lookup_lt(&pages, pindex); - m = vm_page_alloc_domain_after(obj, &pages, pindex + n, - domain, req_class | VM_ALLOC_WIRED, mpred); + m = vm_page_alloc_domain_iter(obj, pindex + n, + domain, req_class | VM_ALLOC_WIRED, &pages); if (m != NULL) continue; for (int i = 0; i < n; i++) { diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index d13dfb1bc953..875c22d27628 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -532,7 +532,7 @@ kmem_back_domain(int domain, vm_object_t object, vm_offset_t addr, { struct pctrie_iter pages; vm_offset_t offset, i; - vm_page_t m, mpred; + vm_page_t m; vm_prot_t prot; int pflags; @@ -550,10 +550,9 @@ kmem_back_domain(int domain, vm_object_t object, vm_offset_t addr, vm_page_iter_init(&pages, object); VM_OBJECT_WLOCK(object); retry: - mpred = vm_radix_iter_lookup_lt(&pages, atop(offset + i)); - for (; i < size; i += PAGE_SIZE, mpred = m) { - m = vm_page_alloc_domain_after(object, &pages, atop(offset + i), - domain, pflags, mpred); + for (; i < size; i += PAGE_SIZE) { + m = vm_page_alloc_domain_iter(object, atop(offset + i), + domain, pflags, &pages); /* * Ran out of space, free everything up and return. Don't need diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index bf6867d4ffcc..b885b3eda5c1 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -233,7 +233,6 @@ static void _vm_object_allocate(objtype_t type, vm_pindex_t size, u_short flags, vm_object_t object, void *handle) { - LIST_INIT(&object->shadow_head); object->type = type; @@ -2137,8 +2136,8 @@ vm_object_populate(vm_object_t object, vm_pindex_t start, vm_pindex_t end) vm_page_iter_init(&pages, object); VM_OBJECT_ASSERT_WLOCKED(object); for (pindex = start; pindex < end; pindex++) { - rv = vm_page_grab_valid_iter(&m, object, &pages, pindex, - VM_ALLOC_NORMAL); + rv = vm_page_grab_valid_iter(&m, object, pindex, + VM_ALLOC_NORMAL, &pages); if (rv != VM_PAGER_OK) break; @@ -2289,10 +2288,9 @@ vm_object_prepare_buf_pages(vm_object_t object, vm_page_t *ma_dst, int count, mpred = vm_radix_iter_lookup_lt(&pages, pindex); *rbehind = MIN(*rbehind, pindex - (mpred != NULL ? mpred->pindex + 1 : 0)); - /* Stepping backward from pindex, mpred doesn't change. */ for (int i = 0; i < *rbehind; i++) { - m = vm_page_alloc_after(object, &pages, pindex - i - 1, - VM_ALLOC_NORMAL, mpred); + m = vm_page_alloc_iter(object, pindex - i - 1, + VM_ALLOC_NORMAL, &pages); if (m == NULL) { /* Shift the array. */ for (int j = 0; j < i; j++) @@ -2312,15 +2310,14 @@ vm_object_prepare_buf_pages(vm_object_t object, vm_page_t *ma_dst, int count, msucc = vm_radix_iter_lookup_ge(&pages, pindex); *rahead = MIN(*rahead, (msucc != NULL ? msucc->pindex : object->size) - pindex); - mpred = m; for (int i = 0; i < *rahead; i++) { - m = vm_page_alloc_after(object, &pages, pindex + i, - VM_ALLOC_NORMAL, mpred); + m = vm_page_alloc_iter(object, pindex + i, + VM_ALLOC_NORMAL, &pages); if (m == NULL) { *rahead = i; break; } - ma_dst[*rbehind + count + i] = mpred = m; + ma_dst[*rbehind + count + i] = m; } } } diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 15d38dd436ae..869ba1634000 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1469,18 +1469,14 @@ vm_page_dirty_KBI(vm_page_t m) } /* - * Insert the given page into the given object at the given pindex. From - * vm_page_insert, iter is false, mpred is initially NULL, and this procedure - * looks it up. From vm_page_iter_insert, iter is true and mpred is known to - * the caller to be valid, and may be NULL if this will be the page with the - * lowest pindex. + * Insert the given page into the given object at the given pindex. * * The procedure is marked __always_inline to suggest to the compiler to - * eliminate the lookup parameter and the associated alternate branch. + * eliminate the iter parameter and the associated alternate branch. */ static __always_inline int vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, - struct pctrie_iter *pages, bool iter, vm_page_t mpred) + bool iter, struct pctrie_iter *pages) { int error; @@ -1496,13 +1492,12 @@ vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, m->ref_count |= VPRC_OBJREF; /* - * Add this page to the object's radix tree, and look up mpred if - * needed. + * Add this page to the object's radix tree. */ if (iter) error = vm_radix_iter_insert(pages, m); else - error = vm_radix_insert_lookup_lt(&object->rtree, m, &mpred); + error = vm_radix_insert(&object->rtree, m); if (__predict_false(error != 0)) { m->object = NULL; m->pindex = 0; @@ -1510,9 +1505,6 @@ vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, return (1); } - /* - * Now link into the object's ordered list of backed pages. - */ vm_page_insert_radixdone(m, object); vm_pager_page_inserted(object, m); return (0); @@ -1528,7 +1520,7 @@ vm_page_insert_lookup(vm_page_t m, vm_object_t object, vm_pindex_t pindex, int vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) { - return (vm_page_insert_lookup(m, object, pindex, NULL, false, NULL)); + return (vm_page_insert_lookup(m, object, pindex, false, NULL)); } /* @@ -1538,16 +1530,13 @@ vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) * "pindex" using the iterator "pages". Returns 0 if the insertion was * successful. * - * The page "mpred" must immediately precede the offset "pindex" within - * the specified object. - * * The object must be locked. */ static int -vm_page_iter_insert(struct pctrie_iter *pages, vm_page_t m, vm_object_t object, - vm_pindex_t pindex, vm_page_t mpred) +vm_page_iter_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex, + struct pctrie_iter *pages) { - return (vm_page_insert_lookup(m, object, pindex, pages, true, mpred)); + return (vm_page_insert_lookup(m, object, pindex, true, pages)); } /* @@ -1937,7 +1926,6 @@ bool vm_page_iter_rename(struct pctrie_iter *old_pages, vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) { - vm_page_t mpred; vm_pindex_t opidx; KASSERT((m->ref_count & VPRC_OBJREF) != 0, @@ -1952,14 +1940,13 @@ vm_page_iter_rename(struct pctrie_iter *old_pages, vm_page_t m, */ opidx = m->pindex; m->pindex = new_pindex; - if (vm_radix_insert_lookup_lt(&new_object->rtree, m, &mpred) != 0) { + if (vm_radix_insert(&new_object->rtree, m) != 0) { m->pindex = opidx; return (false); } /* - * The operation cannot fail anymore. The removal must happen before - * the listq iterator is tainted. + * The operation cannot fail anymore. */ m->pindex = opidx; vm_radix_iter_remove(old_pages); @@ -1976,18 +1963,6 @@ vm_page_iter_rename(struct pctrie_iter *old_pages, vm_page_t m, return (true); } -/* - * vm_page_mpred: - * - * Return the greatest page of the object with index <= pindex, - * or NULL, if there is none. Assumes object lock is held. - */ -vm_page_t -vm_page_mpred(vm_object_t object, vm_pindex_t pindex) -{ - return (vm_radix_lookup_le(&object->rtree, pindex)); -} - /* * vm_page_alloc: * @@ -2016,8 +1991,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) struct pctrie_iter pages; vm_page_iter_init(&pages, object); - return (vm_page_alloc_after(object, &pages, pindex, req, - vm_page_mpred(object, pindex))); + return (vm_page_alloc_iter(object, pindex, req, &pages)); } /* @@ -2027,8 +2001,8 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) * page index, or NULL if no such page exists. */ vm_page_t -vm_page_alloc_after(vm_object_t object, struct pctrie_iter *pages, - vm_pindex_t pindex, int req, vm_page_t mpred) +vm_page_alloc_iter(vm_object_t object, vm_pindex_t pindex, int req, + struct pctrie_iter *pages) { struct vm_domainset_iter di; vm_page_t m; @@ -2036,8 +2010,8 @@ vm_page_alloc_after(vm_object_t object, struct pctrie_iter *pages, vm_domainset_iter_page_init(&di, object, pindex, &domain, &req); do { - m = vm_page_alloc_domain_after(object, pages, pindex, domain, - req, mpred); + m = vm_page_alloc_domain_iter(object, pindex, domain, req, + pages); if (m != NULL) break; } while (vm_domainset_iter_page(&di, object, &domain) == 0); @@ -2099,8 +2073,8 @@ vm_domain_allocate(struct vm_domain *vmd, int req, int npages) } vm_page_t -vm_page_alloc_domain_after(vm_object_t object, struct pctrie_iter *pages, - vm_pindex_t pindex, int domain, int req, vm_page_t mpred) +vm_page_alloc_domain_iter(vm_object_t object, vm_pindex_t pindex, int domain, + int req, struct pctrie_iter *pages) { struct vm_domain *vmd; vm_page_t m; @@ -2116,9 +2090,6 @@ vm_page_alloc_domain_after(vm_object_t object, struct pctrie_iter *pages, KASSERT(((req & (VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)) != (VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY)), ("invalid request %#x", req)); - KASSERT(mpred == NULL || mpred->pindex < pindex, - ("mpred %p doesn't precede pindex 0x%jx", mpred, - (uintmax_t)pindex)); VM_OBJECT_ASSERT_WLOCKED(object); flags = 0; @@ -2136,7 +2107,7 @@ again: * Can we allocate the page from a reservation? */ if (vm_object_reserv(object) && - (m = vm_reserv_alloc_page(object, pages, pindex, domain, req)) != + (m = vm_reserv_alloc_page(object, pindex, domain, req, pages)) != NULL) { goto found; } @@ -2206,7 +2177,7 @@ found: } m->a.act_count = 0; - if (vm_page_insert_lookup(m, object, pindex, pages, true, mpred)) { + if (vm_page_iter_insert(m, object, pindex, pages)) { if (req & VM_ALLOC_WIRED) { vm_wire_sub(1); m->ref_count = 0; @@ -2372,8 +2343,8 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, * Can we allocate the pages from a reservation? */ if (vm_object_reserv(object) && - (m_ret = vm_reserv_alloc_contig(object, &pages, pindex, - domain, req, npages, low, high, alignment, boundary)) != + (m_ret = vm_reserv_alloc_contig(object, pindex, domain, + req, npages, low, high, alignment, boundary, &pages)) != NULL) { break; } @@ -2414,7 +2385,7 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, m->a.act_count = 0; m->oflags = oflags; m->pool = VM_FREEPOOL_DEFAULT; - if (vm_page_iter_insert(&pages, m, object, pindex, mpred)) { + if (vm_page_iter_insert(m, object, pindex, &pages)) { if ((req & VM_ALLOC_WIRED) != 0) vm_wire_sub(npages); KASSERT(m->object == NULL, @@ -4753,8 +4724,8 @@ vm_page_grab_pflags(int allocflags) * not it was grabbed. */ static inline vm_page_t -vm_page_grab_lookup(struct pctrie_iter *pages, vm_object_t object, - vm_pindex_t pindex, int allocflags, bool *found) +vm_page_grab_lookup(vm_object_t object, vm_pindex_t pindex, int allocflags, + bool *found, struct pctrie_iter *pages) { vm_page_t m; @@ -4777,25 +4748,24 @@ vm_page_grab_lookup(struct pctrie_iter *pages, vm_object_t object, * however, be released and reacquired if the routine sleeps. */ vm_page_t -vm_page_grab_iter(vm_object_t object, struct pctrie_iter *pages, - vm_pindex_t pindex, int allocflags) +vm_page_grab_iter(vm_object_t object, vm_pindex_t pindex, int allocflags, + struct pctrie_iter *pages) { - vm_page_t m, mpred; + vm_page_t m; bool found; VM_OBJECT_ASSERT_WLOCKED(object); vm_page_grab_check(allocflags); while ((m = vm_page_grab_lookup( - pages, object, pindex, allocflags, &found)) == NULL) { + object, pindex, allocflags, &found, pages)) == NULL) { if ((allocflags & VM_ALLOC_NOCREAT) != 0) return (NULL); if (found && (allocflags & (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL)) != 0) return (NULL); - mpred = vm_radix_iter_lookup_lt(pages, pindex); - m = vm_page_alloc_after(object, pages, pindex, - vm_page_grab_pflags(allocflags), mpred); + m = vm_page_alloc_iter(object, pindex, + vm_page_grab_pflags(allocflags), pages); if (m != NULL) { if ((allocflags & VM_ALLOC_ZERO) != 0 && (m->flags & PG_ZERO) == 0) @@ -4825,7 +4795,7 @@ vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags) VM_OBJECT_ASSERT_WLOCKED(object); vm_page_iter_init(&pages, object); - return (vm_page_grab_iter(object, &pages, pindex, allocflags)); + return (vm_page_grab_iter(object, pindex, allocflags, &pages)); } /* @@ -4909,8 +4879,8 @@ vm_page_grab_unlocked(vm_object_t object, vm_pindex_t pindex, int allocflags) * of allocflags. */ int -vm_page_grab_valid_iter(vm_page_t *mp, vm_object_t object, - struct pctrie_iter *pages, vm_pindex_t pindex, int allocflags) +vm_page_grab_valid_iter(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, + int allocflags, struct pctrie_iter *pages) { vm_page_t m, mpred; vm_page_t ma[VM_INITIAL_PAGEIN]; @@ -4957,7 +4927,7 @@ retrylookup: return (VM_PAGER_FAIL); } else { mpred = vm_radix_iter_lookup_lt(pages, pindex); - m = vm_page_alloc_after(object, pages, pindex, pflags, mpred); + m = vm_page_alloc_iter(object, pindex, pflags, pages); if (m == NULL) { if (!vm_pager_can_alloc_page(object, pindex)) { *mp = NULL; @@ -4978,8 +4948,8 @@ retrylookup: for (i = 1; i < after; i++) { m = vm_radix_iter_lookup(pages, pindex + i); if (m == NULL) { - m = vm_page_alloc_after(object, pages, - pindex + i, VM_ALLOC_NORMAL, mpred); + m = vm_page_alloc_iter(object, pindex + i, + VM_ALLOC_NORMAL, pages); if (m == NULL) break; } else if (vm_page_any_valid(m) || !vm_page_tryxbusy(m)) @@ -5037,8 +5007,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, VM_OBJECT_ASSERT_WLOCKED(object); vm_page_iter_init(&pages, object); - return (vm_page_grab_valid_iter(mp, object, &pages, pindex, - allocflags)); + return (vm_page_grab_valid_iter(mp, object, pindex, allocflags, + &pages)); } /* @@ -5054,7 +5024,7 @@ vm_page_grab_zero_partial(vm_object_t object, vm_pindex_t pindex, int base, int end) { struct pctrie_iter pages; - vm_page_t m, mpred; + vm_page_t m; int allocflags, rv; bool found; @@ -5066,12 +5036,11 @@ vm_page_grab_zero_partial(vm_object_t object, vm_pindex_t pindex, int base, allocflags = VM_ALLOC_NOCREAT | VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL; vm_page_iter_init(&pages, object); while ((m = vm_page_grab_lookup( - &pages, object, pindex, allocflags, &found)) == NULL) { + object, pindex, allocflags, &found, &pages)) == NULL) { if (!vm_pager_has_page(object, pindex, NULL, NULL)) return (0); - mpred = vm_radix_iter_lookup_lt(&pages, pindex); - m = vm_page_alloc_after(object, &pages, pindex, - vm_page_grab_pflags(allocflags), mpred); + m = vm_page_alloc_iter(object, pindex, + vm_page_grab_pflags(allocflags), &pages); if (m != NULL) { vm_object_pip_add(object, 1); VM_OBJECT_WUNLOCK(object); @@ -5182,7 +5151,7 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count) { struct pctrie_iter pages; - vm_page_t m, mpred; + vm_page_t m; int pflags; int i; @@ -5197,7 +5166,6 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, i = 0; vm_page_iter_init(&pages, object); retrylookup: - mpred = vm_radix_iter_lookup_lt(&pages, pindex + i); for (; i < count; i++) { m = vm_radix_iter_lookup(&pages, pindex + i); if (m != NULL) { @@ -5212,8 +5180,8 @@ retrylookup: } else { if ((allocflags & VM_ALLOC_NOCREAT) != 0) break; - m = vm_page_alloc_after(object, &pages, pindex + i, - pflags | VM_ALLOC_COUNT(count - i), mpred); + m = vm_page_alloc_iter(object, pindex + i, + pflags | VM_ALLOC_COUNT(count - i), &pages); if (m == NULL) { if ((allocflags & (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL)) != 0) @@ -5228,7 +5196,7 @@ retrylookup: vm_page_valid(m); } vm_page_grab_release(m, allocflags); - ma[i] = mpred = m; + ma[i] = m; } return (i); } diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 6d1982767cc8..979d9bd12b9f 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -79,7 +79,7 @@ * perform object/offset lookups * * A list of all pages for a given object, - * so they can be quickly deactivated at + * so that they can be quickly deactiviated at * time of deallocation. * * An ordered list of pages due for pageout. @@ -606,12 +606,11 @@ void vm_page_free_zero(vm_page_t m); void vm_page_activate (vm_page_t); void vm_page_advise(vm_page_t m, int advice); -vm_page_t vm_page_mpred(vm_object_t, vm_pindex_t); vm_page_t vm_page_alloc(vm_object_t, vm_pindex_t, int); -vm_page_t vm_page_alloc_after(vm_object_t, struct pctrie_iter *, vm_pindex_t, - int, vm_page_t); -vm_page_t vm_page_alloc_domain_after(vm_object_t, struct pctrie_iter *, - vm_pindex_t, int, int, vm_page_t); +vm_page_t vm_page_alloc_iter(vm_object_t, vm_pindex_t, int, + struct pctrie_iter *); +vm_page_t vm_page_alloc_domain_iter(vm_object_t, vm_pindex_t, int, int, + struct pctrie_iter *); vm_page_t vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr); @@ -632,8 +631,8 @@ bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); int vm_page_grab_zero_partial(vm_object_t object, vm_pindex_t pindex, int base, int end); vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); -vm_page_t vm_page_grab_iter(vm_object_t object, struct pctrie_iter *pages, vm_pindex_t pindex, - int allocflags); +vm_page_t vm_page_grab_iter(vm_object_t object, vm_pindex_t pindex, + int allocflags, struct pctrie_iter *pages); vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, vm_page_t *ma, int count); @@ -642,7 +641,7 @@ int vm_page_grab_pages_unlocked(vm_object_t object, vm_pindex_t pindex, int vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int allocflags); int vm_page_grab_valid_iter(vm_page_t *mp, vm_object_t object, - struct pctrie_iter *, vm_pindex_t pindex, int allocflags); + vm_pindex_t pindex, int allocflags, struct pctrie_iter *pages); int vm_page_grab_valid_unlocked(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int allocflags); void vm_page_deactivate(vm_page_t); diff --git a/sys/vm/vm_radix.h b/sys/vm/vm_radix.h index 231075d32754..1e9115f1a6ba 100644 --- a/sys/vm/vm_radix.h +++ b/sys/vm/vm_radix.h @@ -79,26 +79,6 @@ vm_radix_iter_insert(struct pctrie_iter *pages, vm_page_t page) return (VM_RADIX_PCTRIE_ITER_INSERT(pages, page)); } -/* - * Insert the page into the vm_radix tree with its pindex as the key. Panic if - * the pindex already exists. Return zero on success or a non-zero error on - * memory allocation failure. Set the out parameter mpred to the previous page - * in the tree as if found by a previous call to vm_radix_lookup_le with the - * new page pindex. - */ -static __inline int -vm_radix_insert_lookup_lt(struct vm_radix *rtree, vm_page_t page, - vm_page_t *mpred) -{ - int error; - - error = VM_RADIX_PCTRIE_INSERT_LOOKUP_LE(&rtree->rt_trie, page, mpred); - if (__predict_false(error == EEXIST)) - panic("vm_radix_insert_lookup_lt: page already present, %p", - *mpred); - return (error); -} - /* * Returns the value stored at the index assuming there is an external lock. * diff --git a/sys/vm/vm_reserv.c b/sys/vm/vm_reserv.c index a562fd80b4a1..bc4c47076975 100644 --- a/sys/vm/vm_reserv.c +++ b/sys/vm/vm_reserv.c @@ -510,8 +510,8 @@ vm_reserv_from_page(vm_page_t m) * successor pointer. */ static vm_reserv_t -vm_reserv_from_object(vm_object_t object, struct pctrie_iter *pages, - vm_pindex_t pindex, vm_page_t *mpredp, vm_page_t *msuccp) +vm_reserv_from_object(vm_object_t object, vm_pindex_t pindex, + vm_page_t *mpredp, vm_page_t *msuccp, struct pctrie_iter *pages) { vm_reserv_t rv; vm_page_t mpred, msucc; @@ -685,9 +685,9 @@ vm_reserv_populate(vm_reserv_t rv, int index) * The object must be locked. */ vm_page_t -vm_reserv_alloc_contig(vm_object_t object, struct pctrie_iter *pages, - vm_pindex_t pindex, int domain, int req, u_long npages, vm_paddr_t low, - vm_paddr_t high, u_long alignment, vm_paddr_t boundary) +vm_reserv_alloc_contig(vm_object_t object, vm_pindex_t pindex, int domain, + int req, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, + vm_paddr_t boundary, struct pctrie_iter *pages) { struct vm_domain *vmd; vm_paddr_t pa, size; @@ -725,7 +725,7 @@ vm_reserv_alloc_contig(vm_object_t object, struct pctrie_iter *pages, /* * Look for an existing reservation. */ - rv = vm_reserv_from_object(object, pages, pindex, &mpred, &msucc); + rv = vm_reserv_from_object(object, pindex, &mpred, &msucc, pages); if (rv != NULL) { KASSERT(object != kernel_object || rv->domain == domain, ("vm_reserv_alloc_contig: domain mismatch")); @@ -832,8 +832,8 @@ out: * The object must be locked. */ vm_page_t -vm_reserv_alloc_page(vm_object_t object, struct pctrie_iter *pages, - vm_pindex_t pindex, int domain, int req) +vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex, int domain, + int req, struct pctrie_iter *pages) { struct vm_domain *vmd; vm_page_t m, mpred, msucc; @@ -853,7 +853,7 @@ vm_reserv_alloc_page(vm_object_t object, struct pctrie_iter *pages, /* * Look for an existing reservation. */ - rv = vm_reserv_from_object(object, pages, pindex, &mpred, &msucc); + rv = vm_reserv_from_object(object, pindex, &mpred, &msucc, pages); if (rv != NULL) { KASSERT(object != kernel_object || rv->domain == domain, ("vm_reserv_alloc_page: domain mismatch")); diff --git a/sys/vm/vm_reserv.h b/sys/vm/vm_reserv.h index 1dcf09e6c736..24620e8a2f9a 100644 --- a/sys/vm/vm_reserv.h +++ b/sys/vm/vm_reserv.h @@ -45,13 +45,12 @@ /* * The following functions are only to be used by the virtual memory system. */ -vm_page_t vm_reserv_alloc_contig(vm_object_t object, - struct pctrie_iter *pages, vm_pindex_t pindex, int domain, - int req, u_long npages, vm_paddr_t low, vm_paddr_t high, - u_long alignment, vm_paddr_t boundary); -vm_page_t vm_reserv_alloc_page(vm_object_t object, - struct pctrie_iter *pages, vm_pindex_t pindex, int domain, - int req); +vm_page_t vm_reserv_alloc_contig(vm_object_t object, vm_pindex_t pindex, + int domain, int req, u_long npages, vm_paddr_t low, + vm_paddr_t high, u_long alignment, vm_paddr_t boundary, + struct pctrie_iter *pages); +vm_page_t vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex, + int domain, int req, struct pctrie_iter *pages); void vm_reserv_break_all(vm_object_t object); boolean_t vm_reserv_free_page(vm_page_t m); void vm_reserv_init(void); From nobody Wed May 7 21:52: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 4Zt89s2x6hz5vLb1; Wed, 07 May 2025 21:52:01 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zt89s26lPz45RD; Wed, 07 May 2025 21:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746654721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4SMiKsgVhUyxyNiO7qaC75g2Q2ztVjLKQRHrTFuQA4=; b=RqwYkZ41kiz9bLhz7rnY8og+VBuU8wdvofGkL+G3Bcyro/agIGcGb3jiPK2ZDxWZ81rUfK jtd+p6X99nUV4CvCS4sk5Xc3BnWd8gka6vviDfy/adjCpPlKEV6TO071/hzLuC+JMVz869 lCnLfdUbgUabnWdxPlIuWaCrVbDl3B5bJZhrC9dDqgdTyFB9/RrNNLkQXiMddVWiJlbEQg 4LPF/F5WGXT28c1FVg909ZzXcimW5YQtvgRE4Hg/m1AIK2YMDmIztdxgaEWGFOJuEZYGUh wEGpzCXKEwWjJaiCljCmBeeSuZNpvqpmqjST+cdkn3RzrQksVfQYldigOrU/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746654721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4SMiKsgVhUyxyNiO7qaC75g2Q2ztVjLKQRHrTFuQA4=; b=QJ25URyOV3YDmsm1UBEVkvxLJW1fu2+8MqBTifakJfoi99XYEQizhbMqwMLnFSqP7LFB9j UkyansJoPUmhLJ/4LW4JMCBcZUZMNxFW/AEIvD6xX0CZyDb57PEBoj9U2YBWRKcCEgFMFf GOGklQF5izdBGQUWqB9ocERRoaodCjNrV87SpAlH5VYTmwpYyUP7P3DidEbm3cd44nHOhY 893iA75rMd6iA+G6gvm7DGeWEdsq45j8UQJbpmDKkN03ccVLn0O1br47TV2quOpX2Q/2Oy owJYUgXLGsrpNE+9ZrC4c5ATELJIBJmSbQiXF/yvYRuWH3xRmryLAanQE+Ss8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746654721; a=rsa-sha256; cv=none; b=ydJxhAwfthuQ2TcAfbK+nqsEeD3SLC2f33W8WOXYRgbpy13eYtbillfUpvauV5fyzIM509 xnfKtENz+toEl8rQKaUEl+P+/UGAZLsh9DM4G/pQo6c8LO6Xn+J6mpqGSFsdsKsI1tBWe0 EVkZnd4sBPB3pUxRHeYvXFG/uS12vbFXowrjxDkkcWJwt2qWERhov2oEkVQ7fdOWTX/Y4h 2OVz4lF+XvhBT83Y7Ko4fPQw1Q93jHBvGZRj67/gRUrKqY6nFdYuhgTgg2/oX44noEjFRi kKcysJG3D/rJS9EUT9rOY7xv1XYuLLLP+BMmLQmubSXIgEU3uLxkxdP0CHeg6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zt89s1fB1znTj; Wed, 07 May 2025 21:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547Lq1us025065; Wed, 7 May 2025 21:52:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547Lq1A3025062; Wed, 7 May 2025 21:52:01 GMT (envelope-from git) Date: Wed, 7 May 2025 21:52:01 GMT Message-Id: <202505072152.547Lq1A3025062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 5b4b2c7c9b8a - main - vm_page: drop stale memq comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b4b2c7c9b8a43eceaa3aa3d2f962599f602928b Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=5b4b2c7c9b8a43eceaa3aa3d2f962599f602928b commit 5b4b2c7c9b8a43eceaa3aa3d2f962599f602928b Author: Doug Moore AuthorDate: 2025-05-07 21:47:20 +0000 Commit: Doug Moore CommitDate: 2025-05-07 21:47:20 +0000 vm_page: drop stale memq comments The member memq was dropped from the vm_object struct because it was redundant. Pages were kept in an ordered tail queue, and also as leaves in a radix tree. Over time, the radix tree was enhanced so that it could iterate over pages as effectively as could the tail queue, and then a series of small changes replaced uses of the tail queue, one by one, until finally it was created and maintained but never used. So then it was removed. But two comments about its existence were not dropped, until now. Reviewed by: alc Fixes: c8d56817b80f ("vm_object: drop memq field") --- sys/vm/vm_page.c | 3 --- sys/vm/vm_page.h | 4 ---- 2 files changed, 7 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 869ba1634000..5ed1879c6a34 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1545,9 +1545,6 @@ vm_page_iter_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex, * Complete page "m" insertion into the specified object after the * radix trie hooking. * - * The page "mpred" must precede the offset "m->pindex" within the - * specified object. - * * The object must be locked. */ static void diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 979d9bd12b9f..3d7257644ef6 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -78,10 +78,6 @@ * A radix tree used to quickly * perform object/offset lookups * - * A list of all pages for a given object, - * so that they can be quickly deactiviated at - * time of deallocation. - * * An ordered list of pages due for pageout. * * In addition, the structure contains the object From nobody Wed May 7 23:49: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 4ZtBnX1R89z5vTrG; Wed, 07 May 2025 23:49: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtBnX0gVkz3psp; Wed, 07 May 2025 23:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746661776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bQNKWalUTUkrJsEz1fhi8l847LbCA4IpEBV8E+ton1M=; b=CXY5GB4ZDAYmkscf/cSBUzJJBdwZ46vnGS7I5huqksmN/y15bYotXDma5qUheZOJaU2cU3 M8z4Lu7bPC6pB8VTYv7Yw75af1+euQNWFCDeZBKC3SaIEEfrV9lll2Ma5dkRCCKpGq5a3O DHJM8JMh9qS71qD9hyzZv2Al4xQLy3BtGZpcowaJpxoMa1mKNQv8GEn1ng234UOykvNhzT dqED9I6rbq/pyTSLth2+ZIWXHLQ7oPy1KHs53GvrTXJMP8Asx/LdvGM0GH6jU1o4UZs2tK jek1ASUhTvdRrOm+kTaRb7lJSboomD/UTrsFrWOCBR7GgkmbePfcGWOXvrBFQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746661776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bQNKWalUTUkrJsEz1fhi8l847LbCA4IpEBV8E+ton1M=; b=cbq3nkP6igvQJPEF9iAJZHVThfpdz7y8D1/ZZ4V9pPotmsB16XEIIbX650s/sE7OyFojKF YXDu1Tv2GpwYO293Q+rVsH9EaOK/HclhA6jGKUCkI68syC+PxmUjZ89TJnAb+ltEbFtveU AAC9mh1BG33xDbmd1Q4UVaFoye013efHen375aCi12f09wyWRrNO9ls1C2pIpebP20wu8M vXgc4F173NwSxcSj+UQ24/k8U9wVCUqgd4v7FxfPS3mv0i1y0lvr43VUT8eU7X02asI9yY RBYvHke/sDlaaxfUT73BYEfy8rqRKrcZ3GSLXCQwwcsMKNm8vo40iwMpD7JkdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746661776; a=rsa-sha256; cv=none; b=Go44oJkA1VQLrZXeUgJ5aYJ9FV2k5BxwKnz2YTDyj7iRTvZ3RN7Md7XFRPBU7dT8XgwL0q tE9T5EEMmZzRVkLXho6WrZtH2iFvKXx4awSZ+7GLx5yL1tpf1svQWKYzx2qyoARTP+0o1g mtgxFOm+kII7PcC5SaTbBYp+COUy2w8Dym3rDqs5lKKz7Lpy/+b2WFDSbM1fV12VR3HDW5 q8feka0DrTFI+3Qjz1zzrJCMMubRELH+5N2rrCcDMPm/cWV6Rw3tA5dENKThoO7CQNbArj woa4OC50AS2YdrSh0EPGRubDFwxgpkjITCGIszaAgbL4Yy+krL5rWMu7cy+HHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtBnX09x6zrDy; Wed, 07 May 2025 23:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 547NnZAY036229; Wed, 7 May 2025 23:49:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 547NnZP1036226; Wed, 7 May 2025 23:49:35 GMT (envelope-from git) Date: Wed, 7 May 2025 23:49:35 GMT Message-Id: <202505072349.547NnZP1036226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6ee513f4f26d - main - UPDATING: Note umass/cam 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ee513f4f26d5876c14996d5d919c34782e1999a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ee513f4f26d5876c14996d5d919c34782e1999a commit 6ee513f4f26d5876c14996d5d919c34782e1999a Author: Warner Losh AuthorDate: 2025-05-07 23:49:15 +0000 Commit: Warner Losh CommitDate: 2025-05-07 23:49:15 +0000 UPDATING: Note umass/cam updates Sponsored by: Netflix --- UPDATING | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UPDATING b/UPDATING index 7678c65b3761..71af29553221 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250507: + UMASS quirks and auto-quirk probing has been overhauled. CAM now won't + send SYNCHRONIZE CACHE unless MODE PAGE 8 is present and valid. This + should allow more devices to work (since the auto quirk code was updated + in 14 and broke several e-readers and the like). Please send imp@freebsd.org + any regression reports. + 20250504: Commit 9419e086e1a3 changed the internal API between the nfscommon and nfscl modules. Both need to be built from updated sources. From nobody Thu May 8 00:35: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 4ZtCq02dGRz5vXWB; Thu, 08 May 2025 00:35:56 +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 4ZtCpz2dNMz3N7w; Thu, 08 May 2025 00:35:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=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 5480ZfG5008853; Thu, 8 May 2025 03:35:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5480ZfG5008853 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5480Zf0V008852; Thu, 8 May 2025 03:35:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 8 May 2025 03:35:41 +0300 From: Konstantin Belousov To: Olivier Certner Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0f2090ccfeb6 - main - kassert: Explicitly include Message-ID: References: <202504281223.53SCNg4B025834@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: <202504281223.53SCNg4B025834@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.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4ZtCpz2dNMz3N7w X-Spamd-Bar: + X-Spamd-Result: default: False [1.01 / 15.00]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_SPAM_MEDIUM(1.00)[0.998]; NEURAL_HAM_SHORT(-0.99)[-0.990]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_TLS_LAST(0.00)[]; HAS_XAW(0.00)[] On Mon, Apr 28, 2025 at 12:23:42PM +0000, Olivier Certner wrote: > The branch main has been updated by olce: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0f2090ccfeb6e3e1a2290300b53baedfb057c2b5 > > commit 0f2090ccfeb6e3e1a2290300b53baedfb057c2b5 > Author: Olivier Certner > AuthorDate: 2025-04-07 12:16:34 +0000 > Commit: Olivier Certner > CommitDate: 2025-04-28 12:19:42 +0000 > > kassert: Explicitly include > > Include it as has direct references defined in it (to > '__va_list' and '__printflike' at least). > > This is a step to make usable without the need to > explicitly include other headers. > > Reviewed by: imp, markj > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D49972 > --- > sys/sys/kassert.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sys/sys/kassert.h b/sys/sys/kassert.h > index a2bc42058d93..e61eca308c07 100644 > --- a/sys/sys/kassert.h > +++ b/sys/sys/kassert.h > @@ -31,6 +31,7 @@ > #ifndef _SYS_KASSERT_H_ > #define _SYS_KASSERT_H_ > > +#include > #include cdefs.h must go first, I believe. > > #ifdef _KERNEL From nobody Thu May 8 00:57: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 4ZtDJb1wYWz5vZ3X for ; Thu, 08 May 2025 00:58:07 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-20.consmr.mail.gq1.yahoo.com (sonic314-20.consmr.mail.gq1.yahoo.com [98.137.69.83]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtDJY66rJz3p3h for ; Thu, 08 May 2025 00:58:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="Q+0/QzJq"; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1746665883; bh=W/Lmz99rt9cHLO6pDdfPwqDNf/z9xsiovKti5v+vTvo=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=Q+0/QzJqPX9JMTtEnDYzvtZX4zmK3rF5V+O1/RGqP1Q4O0GZ5JE+6g79kcu4cx+yonhBFEjAmf0RCPnX7RhrV/u1wdAoZ/dTODHacOuhFtRMsKo1bWpusEvBhT6YNAjhUlBVqUwDiRD24b92HrjSTsCcW/nggev+IDIEVxZaKfM4IccsvSNcaaNbMRBIv/NekjvVLlyFEgnu1Kxs2vroKXQV8l5Rpo8XsQkkACb4lxycDWJ/Mry+F3RaonHOHSXYSICrWzp82NAQ/X8Ux3jFiHmIUSoL93tUpdbeimgXwyWUuYDPRsn3u58EsfZXH/w6k24avERaxc6SPo+pWhII/A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1746665883; bh=4lHcSc6pSsowmffzuVFCEhAKpBlB8au3j40wactHNT0=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=LUAhPGj5Jkoi4A/kzt3bgiLd69hkMcfprweCtmET9ri5I3p9u1iyBIsKD0LWbzKwt5cZKSqmYK4Z8DpIyjFK9qUE200AkI7T1EAZEaIh00NPtVTc5NkpeEgGaYY7n1ByXjAIWV3TB8tCuJNqra7MwDLRT1oTlL9eCD3sNFLQxqYiqcHEQ8Rf7LIiycCkNtvX5N4PMkoz6yMwhZf/cQCwo5UQ/0KfRtfE2tdidBDpQ1N7GXGyyVMrxFEZCusbI7ekz7U1oQaOwqJp7ipYhw4SX4tJ/fMJ7OuIyITNy4F1aO7Jm5fFXmMcKD/Pnp7fLP9huwU6ojhBiAmQWp3LakTFfg== X-YMail-OSG: l9Ho6wIVM1nm4rhtz_uQlsQIWfyLcNAOYQjYxOcrSAhi9uNF1_su48_aAd7YPpG qAHEmB.jYAKZYie6KguEEQOh7osNcMQxs6V2mlHsiSVFQAg5AIVDKbV7sagJdzHUuaI0JsJuFqW8 _m1h4uCfi06iHCRYO41qsYUZv5hsVVLm_kO7MOyJHXALpW4AqsblkHCSB8tpwLvCnlxueFOFv8sg IhfAo7IJs.R_DJXY1AFA3MfLFZQ6cAiFieSKTb34NVxtaGpdbp_tEIS0VHTult3e6DzdvKyvK7m0 zP9boBmueQNW7Ehj3hpNgtJbZU7w6AgMmj2iZhZmx_Uy8O2OOXYR7Jzl.BgPaJaaYDe4WMyuBs_h 3OolChgPRnKGpkLkSCfoyQwsMcgyaIQ29olzsqM1sxnyggMKYQ_G_Ng1aLyY7V.RgkUD7RXX36tA Si73rulTfbD8b2nI3YT0YXTJVvadbAE2WReY7X01QNtKkQ32NxxQgrWKpy1cmeDpUTD_Z7DVxZoJ k6t63qEdRe1dsuExEqoziFEsaRhaL_k8hHMieAd2KuNsz1SYEZAYJtKxRnp5kO7Lkl.RyAbIvO8Z JpMt9.bzMaWueWeGLPICuav8QuzuVVdHJ53E45imWYfZNxYMMRi.F9OC7Ps3qKfawjQSIU.Y9BSg CE.uiFwVWcGtp9.XpaFfe9iO5ka7EII.SXat1yCJPmI7QzuQZceYT9Th.dFHy6NwMPIPJnmTwGXY 9mFPSFVHopiJhVkQiE91okh3.egjMtd4h2vuRVjh57oeV3pYj1.NiYhR.F8329EZ.cHgA_NfYy4T YsXeqL2vC.Snci0sORTf0qnTPKy5bEoLdEYOtRHfQBZrgOkHX_FFM5vvvUKJ8OiPWgIjSjnb8XnP OfwULKQQEDzQ97YbIVrTRQyYBOzP1sRGQ00dmRExCS_Dqh7GJ0UmX01d9UpymLbhlJEdIjeRMxDV Xjn4cq2kOYBaSWjE2maYSTsqL5KTAmNQ3YV5yjFfIGCdGeB.pq0RRZ8QrVSXkw8s7OsXpHQQS5NE NVbVWfMpdRRN6SyWE97j6Iq.2O1SLXQM1C81OyoIl31NrGbTFp6TtMCyKsz4AwTRd9tthqGq43Xu VzJs94wWw0gT1aiT02g78_ev1ni9Gi0hC1LgOd8saX4fYO5vmb8wptP55qPw5Cpc0mIMlwM7e35b pWDxF3V.TsMz0Jkhv3Q1gw7JLMf9pvmf7FG.xKofFd8BUShSVk8wr1qWzu49ni2s5rL9xsIbPycc bRmPzMbrQqBf8Hp5HEWC8Jqc.2xObpI_A6LsgJztg6sili6NP3pbUn_5t59RvuoQK6BWTNO1UmWs tLNyqxeuLzZF49.UEbgG0bYJq.4UfYDUBjxTH1y2vezlfF9rK9Hzw.nqjPO9.dOLdJKnbF4TaEhd ebZZ7d6Q9F7V746jccGHmsCoQwqGBOol4MoSo5qm96supoZlfWo2AVXOMqQsrO1rN087mAk8qxZI _Iwyl2NDgJi549428c4sduMv57nds3mDVnhWk46WaatnqcRnoLFEMWNxiIwZqUL9lDtL.0lRCkse Sjt9P16JtLlg067VwsWyljGJcdUd.pA6fSetw5rwMpZGl.O2ATr5Ag6GGuHToEVkawxs7paZ_OLc EPUaqTbsEh1Nrkd_7vXGqDbOygMpbrJA5iEVLbRTVDqCWUnVx7ZZJMPBI1RxqfDjdCuSKTWla0JU aPOezwmu7UY.7Yfufb0dIB7lXSFI1ftw1UM.om9OZyaVXps136Ip2S7wM.Tew0YdKoleKg6gCnXe 7yS7Wtx.OOTwMQi6udLRBe6c.MR5P6lj.xUPbOdQon0p5ayBtRziQlN7ViSgnGotQuinbBE5Iqxb ISaEBXTmKehkuDwTnfUpSCSzgF_MLuRLeSV4BQ6Cau2AgBfOcjH7kqLw1kWiS4op0H0DMU5NBfuM t4N1o.RTtqWR5.FhgpIa80Zmb_zkoZXhV_P4m7LumkGD3TcbvZKm2vnjHWeQz7Wi4DL_.3NY5q34 qN171gViQe4MeD6A8EOOiU..DNmg9VBjm_MSpTeQVRWykZFNAaPkAbOGThOMEUXH5ThG9XIprEMG .vBF_saqCNQ_YTaWuo0DtfuUl3awlp7Hgyt5hCT3ibf29RZKX.TRmPLBoX.F_sMnlkGsbuVM_H0y tsM0y7sBuYsnGC3NyHNr3iRs7CTB7GJuYzIQFTpLUs2W4Hhshie7cGqY46oCFHpufy_7Sq8cxZxC dSRzMJ67fqgy4Yyx5ny9EMPXKpd0cw4PqOrTDBdRPzAzU2Egy.Tm6cDA.OTb6yeFnafuWPVnXQon 9P3mRawkGYr.fuE6saIC8fNnOy2cBfVch.Fkz2A-- X-Sonic-MF: X-Sonic-ID: 94211707-2f62-4081-a46c-729910fbb0d9 Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Thu, 8 May 2025 00:58:03 +0000 Received: by hermes--production-gq1-74d64bb7d7-fsgc5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e5118a010174858ea45b358e07878e81; Thu, 08 May 2025 00:58:01 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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.500.181.1.5\)) Subject: RE: git: 22d4fecbcf57 - main - param.h: Bump __FreeBSD_version to 1500040 Message-Id: <86860246-2E60-4811-8535-C3271DCF36CF@yahoo.com> Date: Wed, 7 May 2025 17:57:51 -0700 To: "rmacklem@freebsd.org" , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3826.500.181.1.5) References: <86860246-2E60-4811-8535-C3271DCF36CF.ref@yahoo.com> X-Rspamd-Queue-Id: 4ZtDJY66rJz3p3h X-Spamd-Bar: + X-Spamd-Result: default: False [1.53 / 15.00]; NEURAL_SPAM_LONG(0.96)[0.958]; NEURAL_SPAM_MEDIUM(0.94)[0.937]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_SPAM_SHORT(0.13)[0.133]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.83:from]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.83:from]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_HAS_DN(0.00)[] git: 4a795fb913fe - main - UPDATING: Add an entry for commit = 9419e086e1a3 git: 22d4fecbcf57 - main - param.h: Bump __FreeBSD_version to 1500040 +20250504: + Commit 9419e086e1a3 changed the internal API between the nfscommon + and nfscl modules. Both need to be built from updated sources. git: 2c0e6f53171c - main - Revert "nfscommon: Use _PC_HAS_NAMEDATTR to = check for named attributes" Revert "nfscommon: Use _PC_HAS_NAMEDATTR to check for named = attributes" This reverts commit 9419e086e1a37124d11e428892d60a514e5c579e. Does the UPDATING note for 1500040 need to be changed or deleted? =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu May 8 01:05: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 4ZtDTh7445z5vZgL for ; Thu, 08 May 2025 01:06:00 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 4ZtDTh023Lz3wGn; Thu, 08 May 2025 01:06:00 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5fc8c68dc9fso5975a12.1; Wed, 07 May 2025 18:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746666358; x=1747271158; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JZS73KT6RPJjB3HD35XDqvrnEccl7AY4uLdT5zmkPdo=; b=jf5Irbrct1Mhk9DjvdZeN92lP+8vzKcVj6QwqhHlcEsm74KLiK7DauHI5F/I9FJROk sO+RS/sejqmr7D97Z/FO+3poYlL37bYkMo2JcLbNhP9lJsDp6cZAyxgaS/H0QkcyG93r rMnr1PrBIP6c68u8c1MEAiWvNET+x1V70Y5ZJInoqP8J6Gns640ogvZYFDdStnMsBWyA HZtmuCpkld1POcjUdO41ihE4Ht7As9vbB5NnnD/0RZ5iGfwXVyu/uTWv9ZAKOx5yFLug MJH0+xv6JsNBNvWtSp3xaUTLRlQKmmGoZtjr3LP1yH4yrY+0kj3gh/t4N8zHASVxzREe kIow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746666358; x=1747271158; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JZS73KT6RPJjB3HD35XDqvrnEccl7AY4uLdT5zmkPdo=; b=VDXd8nWN9oS9ZeKFgZSUaClMr0KegmS55mPrOpvlEIuyej4ZQ2ZkxjBufUWfi7Z9pU 6zT6+Q3nfB4EF3VmUVPudr0PB5lxfT8aY5i1Z6LkVqIAM7hjxJh0wEILqlefZ7N6mbYS C95PPZbjIzANu3O+inEqzM6mNiCNcbWEpzuQAOlZQINlUHKNJRJYggqm5SZsct0ASysZ QbzwjMCKgi4QZDM8+mX51upjhusiUAewu/enGdUfRn/Rz3oYf3lCbVXOm9wWV2syMBF+ TcOTbAyGqCubvALQtmOWLw+Bvzddu7ASOXqswQmi90wU6sQCZXiEzQxC2psYahms8z4X 2m8w== X-Forwarded-Encrypted: i=1; AJvYcCV6Ihd5ZF/0+DexDcQQMBUF17bZ6yO1FXNCLWLx2CF0s0oGs0FzIDldaquO1tRhXxzKUXtcafDRRnLXoCGz7uKNVLyT7w==@freebsd.org X-Gm-Message-State: AOJu0YyO1gv93PB8UXcaKS4KC2SAPXueFd2IX3WK2EJV9G62NFObIWor clly6g1px05v+Eqb8/cvtFdeWAepS3zEKEiatkehb2x82sqmcaQTK72E7nrHoWhFnha2dHQIly4 RkLZvUk1VJ3DzsPDCnQYCt5URIPKQ X-Gm-Gg: ASbGncuLDZIZhC1crBctfqaUVseHa7GOMUeVtvuHcLEXU7FxPDl8hsyXW3XorsWSZLs aUbB6UDal72qQNtwpezmruUhjxFTADuhhz7uNp2QXBtzzxPgIP7w5vL77qPY78i+2aTycHIK/c0 zTmRaMBAdk+s2OUDLgueUUqrxzwm5dndfFdtaWSb7o7qWmHoivZ7JxFA== X-Google-Smtp-Source: AGHT+IHv7ulbYA+fqo1g3+uvwGDIH0k/uT7+5Aj/nHcvBk+s22weh+Q7K+4Py0UdbQsDcFJS0TXhpVzkX+YbCgZxWyg= X-Received: by 2002:a05:6402:42c6:b0:5f6:23b1:ab4b with SMTP id 4fb4d7f45d1cf-5fbe9fa8013mr4948753a12.30.1746666357551; Wed, 07 May 2025 18:05:57 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <86860246-2E60-4811-8535-C3271DCF36CF.ref@yahoo.com> <86860246-2E60-4811-8535-C3271DCF36CF@yahoo.com> In-Reply-To: <86860246-2E60-4811-8535-C3271DCF36CF@yahoo.com> From: Rick Macklem Date: Wed, 7 May 2025 18:05:44 -0700 X-Gm-Features: ATxdqUFFdBZCr4Y91cB9H17werJD1KwoTzxJ-kSYzlqDW0mC3vQ8tZwJNslHRK0 Message-ID: Subject: Re: git: 22d4fecbcf57 - main - param.h: Bump __FreeBSD_version to 1500040 To: Mark Millard Cc: "rmacklem@freebsd.org" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4ZtDTh023Lz3wGn X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- On Wed, May 7, 2025 at 5:58=E2=80=AFPM Mark Millard wro= te: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > > git: 4a795fb913fe - main - UPDATING: Add an entry for commit 9419e086e1a3 > > git: 22d4fecbcf57 - main - param.h: Bump __FreeBSD_version to 1500040 > +20250504: > + Commit 9419e086e1a3 changed the internal API between the nfscommon > + and nfscl modules. Both need to be built from updated sources. > > git: 2c0e6f53171c - main - Revert "nfscommon: Use _PC_HAS_NAMEDATTR to ch= eck for named attributes" > Revert "nfscommon: Use _PC_HAS_NAMEDATTR to check for named attribute= s" > > This reverts commit 9419e086e1a37124d11e428892d60a514e5c579e. > > > Does the UPDATING note for 1500040 need to be > changed or deleted? Not really, imo. A replacement commit did change the internal API so that the bump was needed (it just ended up happening the day before instead of the same day). If others think the commit hash needs to be changed in UPDATING, I will do that. rick > > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > > From nobody Thu May 8 03:44: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 4ZtJ0H6cvKz5vlwX; Thu, 08 May 2025 03: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtJ0H5fkNz43jS; Thu, 08 May 2025 03: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=1746675855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E88rYJYuLcqrFHMNlQ8LIufVbiRc4e9HsTR27Ic5rbs=; b=qumAPuxvE/YOYJkXwvzG27xrke2pCTnbX755VrU1Ii6C4kSivTw2vUq/aDKcklMYhsTsf/ KJnlBi4ucDx+TNKwXIxa3VlhTxTi/PJo4Dn1kJ1CK2UXRX8JoDM7JUv0qCpChUS4jSpATs lJ/xc5p6YYMKrhDqnlO+Fqbjn4fAVJsvjD5kz+ZZYnUgHSC9XqzUB/7LGHvTD+smQsSnRv KDnH8KXev2swKDfpsd/h+exDXMNw/3D+tUeEGgteko5IXCAFPMVwh0UXqNyZqMwlhitgXi IamDDTJTf1yUgLzdz33FxqgHk/fq/sEHn8xHbqNKE04woawyHoT95S1IKyYhQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746675855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E88rYJYuLcqrFHMNlQ8LIufVbiRc4e9HsTR27Ic5rbs=; b=bgeyaCjWy+TYBKhwWudWjZ/kdb4fvO6yxFP8fOStqvm8cX0eKO88h7IHKrGNY7BS3/BfBy LZoFdWMW/WAc1dL+P5dBU1xig5mKPsLzqIS5zh48zwbvQ0BIb1QQkVqbJ8nand+44JEOkm qtCzimGQyemivoZpttLpSc10PmK2dB5jwEirSUCNzm9pK87GkwigGp5vxzBtU3Cxajsgys 1vAy7n8q8ree3NdFwn9QgMzHdHyndmaptKBssL0/LDYyX1oSAii5Xz4Ae2CXXsRzGGLQtJ DNiSjieTH+Ok7sWSqp4jyFskMWoGT1hzRYv8lQmhYItK4HeIc3OHXbhPa6Y4Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746675855; a=rsa-sha256; cv=none; b=mPpZspcGWoTWeBg8R9J51S0vopE3ZddZfUNRwMod3fjvO1nV6tEOhL7+uQQla2VDkp+idq LYB5lY3KyFyeOvFiaRYe6HGMNOfIAtqldwK0BwiwI3XShil7Q7K2kZ082212GqrVPBHl3n kGKadOs041cDQZtxX3XBiETRxdfVMzrIn2yToBispTyX+ob0p5yq5gSpE8WsKJa3RRgHbF IjHzq/qX8HgQiwy1hiufu5ZVasD0goncrVF7BZbULwr9aH+mwQ/wYYEGBDPu24Vj/ELH7Y /HLjZbUflrQt0LfK5rdHsHtZabsyifjxOuN5c36TzxEz1jid2owXqDxStEyQEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtJ0H55RGzxmk; Thu, 08 May 2025 03:44:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5483iFKg086098; Thu, 8 May 2025 03:44:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5483iFum086095; Thu, 8 May 2025 03:44:15 GMT (envelope-from git) Date: Thu, 8 May 2025 03:44:15 GMT Message-Id: <202505080344.5483iFum086095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 991ed10e3960 - main - Revert "newsyslog(8): Disable compression by default in newsyslog.conf." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 991ed10e396080c58099631dc6f7d357f16ad53e Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=991ed10e396080c58099631dc6f7d357f16ad53e commit 991ed10e396080c58099631dc6f7d357f16ad53e Author: Xin LI AuthorDate: 2025-05-08 03:43:01 +0000 Commit: Xin LI CommitDate: 2025-05-08 03:43:01 +0000 Revert "newsyslog(8): Disable compression by default in newsyslog.conf." This reverts commit 83507f9e6fedbc02d1acecc9fb5c09eae34b1ae6. Requested by: olce --- UPDATING | 15 --------------- usr.sbin/newsyslog/newsyslog.conf | 2 -- 2 files changed, 17 deletions(-) diff --git a/UPDATING b/UPDATING index 71af29553221..d46db9e13794 100644 --- a/UPDATING +++ b/UPDATING @@ -38,21 +38,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: Commit 9419e086e1a3 changed the internal API between the nfscommon and nfscl modules. Both need to be built from updated sources. -20250504: - newsyslog(8) will no longer compress rotated log files by default. - The J, X, Y, and Z flags in newsyslog.conf(5) now indicate that a - file may be compressed, rather than specifying a particular - compression method. - - To restore the previous default behavior of automatic compression, - remove the line: - - none - - from /etc/newsyslog.conf. - - For more details, refer to the newsyslog(8) manual page. - 20250412: LinuxKPI alloc routines were changed to return physically contiguous memory where expected. These changes may require out-of-tree drivers diff --git a/usr.sbin/newsyslog/newsyslog.conf b/usr.sbin/newsyslog/newsyslog.conf index 691aa4503ec2..d907e08fd747 100644 --- a/usr.sbin/newsyslog/newsyslog.conf +++ b/usr.sbin/newsyslog/newsyslog.conf @@ -1,7 +1,5 @@ # configuration file for newsyslog # -# Global compress method for files tagged as compressible. - none # Entries which do not specify the '/pid_file' field will cause the # syslogd process to be signalled when that log file is rotated. This # action is only appropriate for log files which are written to by the From nobody Thu May 8 04:06: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 4ZtJVJ4vY8z5vn4t; Thu, 08 May 2025 04:06:48 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtJVJ4Gvpz4LWb; Thu, 08 May 2025 04:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746677208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBbUQPel1KQf7oS90ZfbvTpTTHjCfGZ1fAefL0jmSQk=; b=IpBb/WRAQnsU5rDXaGciIT8tOkc6gbygemC62IeYTOOV9mcl2pmlFUfaWG9cwaha0AclTe ENVmzvUX5iS4z8TjMFsUpRMKRV4VZdQD06osGb+50YJjXx2nxMU3DLun+5WhcqJbWeExCx 3ji8FQ+li7+aw54HnT4CgnRxkO97a+jYR4vD7uN8ctXoPp5ESlcE5XlY9+YMnCtSF2OjFH kwHObei899WCNafdj/oTvRGL9AuQLVZrawFyA9k95nmxrq6XhFbAvzWugKodr7/i9m8CZU /E89Qcih8BZE0NbeyxvdsULl72ULzuCXcP2BicFLdcDE5dMNSXpDhleceajHFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746677208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBbUQPel1KQf7oS90ZfbvTpTTHjCfGZ1fAefL0jmSQk=; b=giBjz3/gE/gtck+sWWbA/rDO3ZEZN/k2QsywGiTHN2DyljT/+H+/a7p9kkXP+tod+2iy/A Ivpc9nruXo+D2BV1n9FgTyoE7eJJc3QfMoTvKaW3xLe4AvORYuSwKX6fJ2XHnw6NXcpG9K DkQRsU5DG4gb7THZI/igZ8jJtVaJpeJp++8HqLq8lcVKlaT9Y5oetUbwCXIlWIvsFIKwlK 8otG1RvzNnszq3CYdHeJy8+iQrFD9to28zQYefnj2miGYa2GYEjlVNohLf1b0WxKMZ387z D9hffwzYqXnscgEs1Z8YwgZJoV4kxdTVtHMd2xVFraE7Gk974ifW14xxCAAWpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746677208; a=rsa-sha256; cv=none; b=ePBM8GC96ARkB7MRwtToX4geBJAYzC5K9isu/CYRJKCDgyx2J4X0u4XGn8enYQdheF4Hqo KzR5ZQyi9UQhYvkLwwgWSdg/kCo0MtzpYRyOuIGzGH+9jnAQAF5b70f86aODu3WTn2TBM8 7f0eOG8JXnCRiUeWyJod6Qtrs4zh71NZevhrLk8gKjreBjk2ZCKsKmi+BjFj6voXIfA3UE Jxb0cbo/CQzBYouoCac9D24R+PWTgBknl44eoDz4R4wm69h6jYgdfcc6tg5cJlmhAlfMfK inAA2IgQKIROQeomUTb5C0IyiQv/DSlN3Rc+Uob76Y+T6eRr1CQYblZ0u0LElQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtJVJ3pqkz101C; Thu, 08 May 2025 04:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54846mIw025210; Thu, 8 May 2025 04:06:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54846mWT025207; Thu, 8 May 2025 04:06:48 GMT (envelope-from git) Date: Thu, 8 May 2025 04:06:48 GMT Message-Id: <202505080406.54846mWT025207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 354fb783e6d5 - main - loader: ficl: restore isvirtualized? List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 354fb783e6d5ff9abcb6529cbb17cbb2ff6a7375 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=354fb783e6d5ff9abcb6529cbb17cbb2ff6a7375 commit 354fb783e6d5ff9abcb6529cbb17cbb2ff6a7375 Author: Kyle Evans AuthorDate: 2025-05-08 04:04:17 +0000 Commit: Kyle Evans CommitDate: 2025-05-08 04:06:22 +0000 loader: ficl: restore isvirtualized? This word was accidentally removed when gfx bindings were made optional to remove some overhead not needed for all loaders. This one isn't graphics related, so we can safely restore it without irritating anyone. Reported by: sjg Reviewed by: adrian, imp Fixes: 9c8bf69a53f ("loader: Only create gfx 4th bindings when [...]") --- stand/ficl/loader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/ficl/loader.c b/stand/ficl/loader.c index 69a65ebedb73..32ec2d6fc172 100644 --- a/stand/ficl/loader.c +++ b/stand/ficl/loader.c @@ -864,6 +864,9 @@ void ficlCompilePlatform(FICL_SYSTEM *pSys) dictAppendWord(dp, "ccall", ficlCcall, FW_DEFAULT); dictAppendWord(dp, "uuid-from-string", ficlUuidFromString, FW_DEFAULT); dictAppendWord(dp, "uuid-to-string", ficlUuidToString, FW_DEFAULT); +#ifndef TESTMAIN + dictAppendWord(dp, "isvirtualized?", ficlIsvirtualizedQ, FW_DEFAULT); +#endif SET_FOREACH(fnpp, X4th_compile_set) (*fnpp)(pSys); From nobody Thu May 8 08:51: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 4ZtQqF6Wj2z5w3yC; Thu, 08 May 2025 08:51: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtQqF5wBHz41wF; Thu, 08 May 2025 08:51:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746694313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YD7X/Tg575QJTDAlVwlGukUwgy56pBHeaVobVvRYp54=; b=JnFFlHBOEIlzE1QgugBVcog/1Sm0GdaAgkT9ytdv89N7AZA5+sESaq79hsg0lK4ldbvu83 UBLEfeANzH0wY2hT47xkEvdkM+R4mvJql33vX2tXMfFatxDOd01L9Iuk62g2NOUdiLnU31 IXx5VbniN9YhqdTQsmo2fTk7maScQs2OdDwlH+B8XXfBeeK6bfRiDMEVinQ+h4vSttaln5 Ih4dwyEl4iLfdS3I01wdSh+3FIddqKcvRHLUh93aeZLTvNbfWvhRUQ3IbwZlCCWiZeILTH 6Qe849z/arETmIjkDQI2ek9yxytHGZHB7wcrhVWY2Vbdh2A6x6wj7MbmrnIWQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746694313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YD7X/Tg575QJTDAlVwlGukUwgy56pBHeaVobVvRYp54=; b=d3qoG6NjZYPDx0LBkkMiFAgGIYfKWVCQQkWbv5ipXiYkraHIjbPK3noKbh5PFQ6WqPYmMs ORjEQOiIxHxval7En4aXu9Uq1Zn9rOBX0LsEWnhM+u33t/UTjxHGwLU1lrXxB6EfVRivrX QHcS0YIKKxvwfxmPxb3kkS9CMOSQo7yiDc8gl1t6q8wbYB38hi5xSIMyzJEvXfK3BWyUL2 W5JZ+la7kn/B5sNRrQ4FhQsvq0iJXxDi5NT2AQ+2aY4vOhOOI/ZJzJ1gLLfUZBS+Bl25lQ lDv2dhwDjXDOBWmpNEiiPeHGLG/Ak9IHzxpahr+fi/OHUHWZkVLAeEeS3J82Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746694313; a=rsa-sha256; cv=none; b=U39j5rzLCDTlNdTKW9+7VmjbBzXa3dwIEKcDJwaZyCT3ZQbhP1FZ4kA5oG4Zi+/2lt4Spt DW/jM518vmBAXxsPpwrnZic4vYTYomo2GfcUmti/vVPSBunUVibQZx7VBO2UUR55gIFtpm uH8cHnDPBPQJiwR9L2H0ZqMNZ7fVlTpuDOEKjOq+MVKMiuxsKFRsrSEgnH92YbE8c2fokh dEZaNQ3Q5P+mseZYQAxslcZfqckoIeO28q1thLa7EAjw91Y/Z/pIQ42fYb2cr25k/nQMn/ ikp1hTSR5C6Aec02HCJLlX3qKlS2gdITD7pBUJgE07U0TWGTAUEw0IS9IpHHBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtQqF57ffz16yH; Thu, 08 May 2025 08:51:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5488pr6d064842; Thu, 8 May 2025 08:51:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5488prMC064839; Thu, 8 May 2025 08:51:53 GMT (envelope-from git) Date: Thu, 8 May 2025 08:51:53 GMT Message-Id: <202505080851.5488prMC064839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: efedac28c7ce - main - ig4(4): Add several PCI IDs for Intel Jasper Lake controllers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: efedac28c7ce4bef9d9b09b7901f1cb35babc2c4 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=efedac28c7ce4bef9d9b09b7901f1cb35babc2c4 commit efedac28c7ce4bef9d9b09b7901f1cb35babc2c4 Author: Jean-Sébastien Pédron AuthorDate: 2025-04-17 10:02:15 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2025-05-08 08:50:17 +0000 ig4(4): Add several PCI IDs for Intel Jasper Lake controllers The first added ID was found in a Asus E510KA laptop by the reporter. They tested the patch successfully: with that patch, the Elantech touchpad was properly detected and worked fine. Other PCI IDs were not tested but they are from the same family. Reported by: Lukas Friedrich Tested by: Lukas Friedrich Reviewed by: wulf MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D49879 --- sys/dev/ichiic/ig4_pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 4674f2615648..0195466150eb 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -148,6 +148,12 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_GEMINILAKE_I2C_5 0x31b68086 #define PCI_CHIP_GEMINILAKE_I2C_6 0x31b88086 #define PCI_CHIP_GEMINILAKE_I2C_7 0x31ba8086 +#define PCI_CHIP_JASPERLAKE_I2C_0 0x4de88086 +#define PCI_CHIP_JASPERLAKE_I2C_1 0x4de98086 +#define PCI_CHIP_JASPERLAKE_I2C_2 0x4dea8086 +#define PCI_CHIP_JASPERLAKE_I2C_3 0x4deb8086 +#define PCI_CHIP_JASPERLAKE_I2C_4 0x4dc58086 +#define PCI_CHIP_JASPERLAKE_I2C_5 0x4dc68086 #define PCI_CHIP_ALDERLAKE_P_I2C_0 0x51e88086 #define PCI_CHIP_ALDERLAKE_P_I2C_1 0x51e98086 #define PCI_CHIP_ALDERLAKE_P_I2C_2 0x51ea8086 @@ -272,6 +278,12 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { { PCI_CHIP_GEMINILAKE_I2C_5, "Intel Gemini Lake I2C Controller-5", IG4_GEMINILAKE}, { PCI_CHIP_GEMINILAKE_I2C_6, "Intel Gemini Lake I2C Controller-6", IG4_GEMINILAKE}, { PCI_CHIP_GEMINILAKE_I2C_7, "Intel Gemini Lake I2C Controller-7", IG4_GEMINILAKE}, + { PCI_CHIP_JASPERLAKE_I2C_0, "Intel Jasper Lake I2C Controller-0", IG4_TIGERLAKE}, + { PCI_CHIP_JASPERLAKE_I2C_1, "Intel Jasper Lake I2C Controller-1", IG4_TIGERLAKE}, + { PCI_CHIP_JASPERLAKE_I2C_2, "Intel Jasper Lake I2C Controller-2", IG4_TIGERLAKE}, + { PCI_CHIP_JASPERLAKE_I2C_3, "Intel Jasper Lake I2C Controller-3", IG4_TIGERLAKE}, + { PCI_CHIP_JASPERLAKE_I2C_4, "Intel Jasper Lake I2C Controller-4", IG4_TIGERLAKE}, + { PCI_CHIP_JASPERLAKE_I2C_5, "Intel Jasper Lake I2C Controller-5", IG4_TIGERLAKE}, { PCI_CHIP_ALDERLAKE_P_I2C_0, "Intel Alder Lake-P I2C Controller-0", IG4_TIGERLAKE}, { PCI_CHIP_ALDERLAKE_P_I2C_1, "Intel Alder Lake-P I2C Controller-1", IG4_TIGERLAKE}, { PCI_CHIP_ALDERLAKE_P_I2C_2, "Intel Alder Lake-P I2C Controller-2", IG4_TIGERLAKE}, From nobody Thu May 8 09:12: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 4ZtRHF5JLrz5w4fj; Thu, 08 May 2025 09:12:41 +0000 (UTC) (envelope-from olce@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtRHF4cKzz47yR; Thu, 08 May 2025 09:12:41 +0000 (UTC) (envelope-from olce@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746695561; 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=NkJvu9RBjGBs9J/UXm/x0KGs2SMpeL8YvAMj7SRwrIs=; b=jmhIhDLr41MVQDoLwVVmUcavYpWSmYCsT31WdBh8/a4hZtkwY2DnZA7fXeB9mSwg0C9Yq8 rB70bYu7AMpoZvhn2qEGyU0c1NO93H7Okvs3SlNDLq71Nx8kNMLB8YfygaJBPGFyAlIz4Z ZYZWEbRZ8BYUWGKEdG4HTkBvhzIpmXcPUY3ZDpGqN89UIjSNc+k5TxBwxy6aor8TdUUiDn hSKbWiaoM8ZlRgqnuIkLjubpvQtDXPLcYpUy7BlvXe7s7j9pFE1vV74qkFXbWHGIuX0Mck UiWWqpX7LW1CgS7YUkAp5MdgjxVRiGMTBbu0alT8fiUCsc8lq0PXvk41hhOz+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746695561; 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=NkJvu9RBjGBs9J/UXm/x0KGs2SMpeL8YvAMj7SRwrIs=; b=iGv6pTXkEb5xROFcbLqzHCDfs1jH5E/hVX49WMsD9WMFIquNWElRsWL/zBZYw1+0zDyVf0 aaA4+vvAFzdFceiDWEWFCg16Ran1ASypA6d0as7nTEueDsaJkCg06AdqS9JzmsQsEi7GQs sgqwqzfJlA4W9kOnLGnJl3DE3yeBb7kfdqYaAibaCPLN3XPplh63IoRztC7t0osJsxNnBL ixsLfaO1EqcioHNhflfcbocOFpgCYtieWBVWjdEO8tyKV3LS0c0gYtMxjnY47mvQOOE3kz Ggqa+K49tBkvlqeTc2oP4PdJrTDSL1VrD5ZYIfAmCnPhZvmWFh7q6mMK1HQdvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746695561; a=rsa-sha256; cv=none; b=Hb4MaKX7JScmdXC9Jok1Pi1N1/cIfPc1NtSolq/+78RUKeVk8PUZZ4n4R6epYwf/cr7i6E b1v3z+0OHh9kbSZBV25zTID7yDFB9ODTa2ZA/hyK7jZh916PkGclMSznmYivmVaDsHMvb9 lvMVUfZ/FYi1I6Q2CUXa1OPxqWkzLn6CfECSJu+JC3shEzXSuPU5LfoxKDEwqvK6UqKKv0 D2jFwqwbdN/hTUg5FdtzhOZg25ivQNjDNRRtDMyV40VKu1tZTYbnwWXWZBoV2gMs49F5QP BaAdn5pfiBx11KyOcbpjplcJp6xTVbPr+ItLuIf0eZPT34JK/lo/fIgQVe7/6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ravel.localnet (aclermont-ferrand-653-1-222-123.w90-14.abo.wanadoo.fr [90.14.66.123]) (using TLSv1.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: olce/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZtRHF0VGYzmxK; Thu, 08 May 2025 09:12:40 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: Xin LI Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 991ed10e3960 - main - Revert "newsyslog(8): Disable compression by default in newsyslog.conf." Date: Thu, 08 May 2025 11:12:33 +0200 Message-ID: <8296531.bYQgcRI8ro@ravel> In-Reply-To: <202505080344.5483iFum086095@gitrepo.freebsd.org> References: <202505080344.5483iFum086095@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2603605.0dHE6SNnxz"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart2603605.0dHE6SNnxz Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Olivier Certner To: Xin LI Date: Thu, 08 May 2025 11:12:33 +0200 Message-ID: <8296531.bYQgcRI8ro@ravel> In-Reply-To: <202505080344.5483iFum086095@gitrepo.freebsd.org> References: <202505080344.5483iFum086095@gitrepo.freebsd.org> MIME-Version: 1.0 > Revert "newsyslog(8): Disable compression by default in newsyslog.conf." Thank you. -- Olivier Certner --nextPart2603605.0dHE6SNnxz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmgcdYEACgkQjKEwQJce JifTtA/+LNzgL69TYj3uc5fojniK7qqSgIUP8I1XX7ZISxCo8u6Xqdr0/OugLf1W x+bnmGih4B0rM46tEgBKCYnjCzcnpAqCxvNHL3WwGEkvAo2666MeBHceuejbsil3 GqZv1qfIT/grDL2vCt17l5VjtHQW4qgzL93eck4okxMXEwxnrCJW+RmCi/SLdkRA 6q+xVe9S9CwNN1/cDsIVkcEJC1unbMs6/T4pCr9QlKYyATEq5xDHPX2gHhblEGUh Mi2FrSSjBetHeEraWt5BQKZmAAaKC8KwjXL6sT+jyYeuoG2QgBzhpJDJkOiNzU9W lnk0wboKmwtgVOmWEkZk4kIuwk8DG2z49Gm/oIHnTuJ+41hPE4I94BQJHMa3R6Kl p0KfkRWTJEsLYQdD10JlSaHUYFeY/sLmbg0KhS635pyP1KiusZesGBhSexzFKmrS 5qhAdhQgy0mq12IAqbAAX8/li1Gh6nfl2Xw2IwK/EBV1B8rqfK/06NAR+ih+u4HA sq0FOzPFGIfpqizskP6dpXG27HXQguTHDGjpfeymmGQbQmEToshZb1kYqrSlL3WC dgC89rqD4/V2AvoCGva66y0uZU4SdB8aHEmxWCtIyceHiZBuHUWYTp8C0WGe5LkX x23R+K74uYaFNSwQKJzpahuTCelpHtQUuHgiFmHkzwezP4eK4aU= =mwS6 -----END PGP SIGNATURE----- --nextPart2603605.0dHE6SNnxz-- From nobody Thu May 8 13: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 4ZtXKt3dMzz5wHb0; Thu, 08 May 2025 13: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXKt1Sx2z3CfX; Thu, 08 May 2025 13: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=1746709218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsHCmxjawnGq7rlChPaUyV/mqcrS9Axa0lAq7v5VWhw=; b=UEHaU2eT4/AGfupOMQDl4EhW4NGnKF2TV8hWPQrS0nSLARcz1qfZlmruebbncNl1+8ysaA AnkB89y9x3bcw8JSxFo2xLwx3yATBHTzCiXerm7sldCF2pwLDnDjui/zjbsI09Em1us+kN w9+5uINtN30dG+PQf8h1rUok4Xqqug1/DiVqU3K4E+T0Gd67URIlvEvorpF8jL+Qql9rtE UK9mfKZVT3NstywHg80tqv0F4xOEeM0Q+gZ1uRyNyMRP2DZggiEbnO4gq7pff0ZSeifgln jO0exsnoloCt26BAX6byjvkfwhyxp4GFztBAoVlOcaFVxfZe2xJeHx3kpCIvPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsHCmxjawnGq7rlChPaUyV/mqcrS9Axa0lAq7v5VWhw=; b=MAZlcS3MGn+IVQj/0UGXiEJOrnzVZASDtGUgz1rs9kyFliJ650cGl4b7h9cjQndQckJF65 P1kuJBA9UaWrgUJUGBuu0NA7KDticIWdNHlzb7MA1H8JLzGs6bfqMayoF2gwnR+/np+5V2 cmuHF1pMZA78hDgQqrWaNqj0m4yCgVao63qKpjjZ+f0/lrillgA44NUdeI5UXes0hBI2JC ck/BWWwFaAyIp3ggEkrYRBJtOZOui5LSa+Xsv352gxvrwGuLKO0doQE/3moMKkW8fwZSPa XrY0dQFH4tjPtmWYzgvwJynGgzSBCsTnsA7PNn1Fwyh6QcY2ab7q6pDoYiCvMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709218; a=rsa-sha256; cv=none; b=QtTqvOCEsULqKlfCVrDM/jJ8or05fVigRdEFwZ/y0WfPubdL3XR+/ws/PPVaJma8zd1x0v LbbrD2pz6Nw99BEknl7kK18bRsJlFy/lvQNOazyEaD8TyUNZha/BDsbAnzZA7XK0a+XFuu 4eItZmIXcRjYaCMxYjIJg7k6RBOolDnoSZ98S5HU+mVftBMm96QFICW3ogsQP1SXx7DljP WoR9EWVU0gIThb3rUGzGvWbboIzyFVTtx1KUtNX2d59Z2Wp4tF6iqhb/z8CeRlpGRwRcIJ UOUfNOXC2JK2omfKEOvt13qREz2u9j5UloX69G4xf/vFFyuJa9lFG65cF1aMHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXKt14Ffz1DT; Thu, 08 May 2025 13:00:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548D0IdE027046; Thu, 8 May 2025 13:00:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548D0I4x027040; Thu, 8 May 2025 13:00:18 GMT (envelope-from git) Date: Thu, 8 May 2025 13:00:18 GMT Message-Id: <202505081300.548D0I4x027040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: af4c34e4db85 - main - OptionalObsoleteFiles: Add bsdinstall pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: af4c34e4db85ebbae93013c8374396fe2451202a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=af4c34e4db85ebbae93013c8374396fe2451202a commit af4c34e4db85ebbae93013c8374396fe2451202a Author: Ed Maste AuthorDate: 2025-05-08 12:58:18 +0000 Commit: Ed Maste CommitDate: 2025-05-08 12:59:30 +0000 OptionalObsoleteFiles: Add bsdinstall pkgbase Reported by: garga Fixes: ee9cfd727578 ("bsdinstall: add pkgbase target") --- tools/build/mk/OptionalObsoleteFiles.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index bd0a0972500d..baaca10ea3f1 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -423,6 +423,7 @@ OLD_FILES+=usr/libexec/bsdinstall/netconfig OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4 OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6 OLD_FILES+=usr/libexec/bsdinstall/partedit +OLD_FILES+=usr/libexec/bsdinstall/pkgbase OLD_FILES+=usr/libexec/bsdinstall/rootpass OLD_FILES+=usr/libexec/bsdinstall/runconsoles OLD_FILES+=usr/libexec/bsdinstall/script From nobody Thu May 8 13:09: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 4ZtXXF2KcGz5wHmh; Thu, 08 May 2025 13:09: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXXF1rK8z3KSk; Thu, 08 May 2025 13:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4IwcJRLCrxKZZ217bVE9L/ZHIHsFbk4h7f2brzVpimw=; b=CGyi601uL87tNyx2x1ix+bnOiqunrH7IfUjqLkQQCRuykeGsZ+McZcz9xFXhc682gKOkmC u7cTUSULGhzKe1+s/a7Mmo5GWU2Z1uKcFfT34vwYRe2GCcDIdwbOMiTlGG69CsrIKB/iyj 2g8F/si7Q/hhJyaLEI2soHUpllgQs0MM3kpJct5dxRLCH2hL+0pynVKDx4orhlhgIX41HY xJn0fvFxL78m97sLUFnDNbG/yIroQh0/IV/DcIeqPAptD/DrlhGr6uisNaz/j2ggXkyrHp slPEaMAm3sw8EMrMeN6/OghKHK7UgTUB+wcZqShXKKlp7OyVY48S24+/vfGfaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4IwcJRLCrxKZZ217bVE9L/ZHIHsFbk4h7f2brzVpimw=; b=FmbMKWLYEg0Kx26TZz0onYRxZuC/O5pO/5sEZJ2k/ta9uZZAPZO9V/WYLCy/nN8syfA8ZU +zD/wOElZs1ifISioQzpUOUluU7fr1sAW6Ip8Ju2iKxcmYWtB+Yv1e5MYPaSLTMQzTtUzx DIRtxrYPnYVQw7M0ZiNWYxNGVn7MPelOw/Y0hEPSMN0oHfgQIs+zKKaNHhYWawBjNZcEn3 z4+QalttAGbREZ7hBhsuz/YJepXR1kkAxzyxz/hctVfFqJ1Nu0RPacd8E8odacm7poJ2EW nGCpYSjPAhXOSf94tZQwi+1t9T5o2lqEPz9qM9QjXj7ukbcMZTN23aWFo9cIzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709757; a=rsa-sha256; cv=none; b=TBY2dT7gL3LZd0Y8AHRWEnscXekAe3+Y+EpLIKP7SN2rcbnQtWv90g+coAPUnt0XCthgoN Yb0jUvtju9QsiDPDFC/9ngTM4G1L4/DLCzeLrF10QCuGfA/yI3qCJVN30g9vcUxII8iCNZ q8Ma4pLMZUuoUgxUEtW8v6Wtk3nEsdUhF4NnNZtXr3/aVDmbSGfoXOlCSaidQffJRg4heu vjGTqbIEnDjtS49qkiw9Q2iYSp2jd1/Hvt2Lve7zwaj782VLDg99sqkpS6EVSGipVp4e4+ oYUL6K2PTjx6Y1Co4Zg8Nr4rsn1+LGoNXEfT90yy5O3uYlPEnhM+baqTb8LS/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXXF1Hvhz1FC; Thu, 08 May 2025 13:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548D9Hos036657; Thu, 8 May 2025 13:09:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548D9HUG036654; Thu, 8 May 2025 13:09:17 GMT (envelope-from git) Date: Thu, 8 May 2025 13:09:17 GMT Message-Id: <202505081309.548D9HUG036654@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2ffd04bbab17 - main - OptionalObsoleteFiles: Add recent bsdinstall additions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 2ffd04bbab17343c09d7e4119ee3a18b8ad72c44 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2ffd04bbab17343c09d7e4119ee3a18b8ad72c44 commit 2ffd04bbab17343c09d7e4119ee3a18b8ad72c44 Author: Ed Maste AuthorDate: 2025-05-08 13:06:12 +0000 Commit: Ed Maste CommitDate: 2025-05-08 13:08:24 +0000 OptionalObsoleteFiles: Add recent bsdinstall additions Reported by: garga Fixes: a6d202077dee ("bsdinstall: revisit the finalconfig step") Fixes: bbe2a1da2df6 ("bsdinstall: add menu to install firmware") --- tools/build/mk/OptionalObsoleteFiles.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index baaca10ea3f1..6de8f1c5a0f6 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -413,6 +413,8 @@ OLD_FILES+=usr/libexec/bsdinstall/distfetch OLD_FILES+=usr/libexec/bsdinstall/docsinstall OLD_FILES+=usr/libexec/bsdinstall/entropy OLD_FILES+=usr/libexec/bsdinstall/fetchmissingdists +OLD_FILES+=usr/libexec/bsdinstall/finalconfig +OLD_FILES+=usr/libexec/bsdinstall/firmware OLD_FILES+=usr/libexec/bsdinstall/hardening OLD_FILES+=usr/libexec/bsdinstall/hostname OLD_FILES+=usr/libexec/bsdinstall/jail From nobody Thu May 8 13:10: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 4ZtXYn27q2z5wJQZ; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYn1L6Tz3LcF; Thu, 08 May 2025 13:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fANIn10d3CU9O+C99Ocb7D/j2tZiEjc9/eXb3K7Yxy8=; b=aKb4sHfdLSPN6R8NgZ+xr8I4Vs9qekILvMNw/seDw95gy2NYcQCSQKV9WimU6RoQteTE9W IhjibhtOEVa0uE8UWjYVSZC812WsmX0z18qgFyv7S/mESrA7vojrSc1lXxiiR/7s1NJqs1 PR0Ly6/0RfqbmoF8XA6DujKgaDn3tjlCo9xFCpmyJ2VUqNVYIe1FHIWpdy+chAqX4MADor H3oOvVNw/G7yISgLtIQshZ2sj+udH1SmCU9RIZ90LJNtGzeGnpYGzoQ74D2xozBD0jE79I 6L3F/bVeogC170DF3DlVPjd3n9LoZskFvj8WvMWUAuyqTkHWDNjLUjsHKOJ2yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fANIn10d3CU9O+C99Ocb7D/j2tZiEjc9/eXb3K7Yxy8=; b=jgGQiCHgtyNgc9ROOZymK+SnmhsKI2hZ02AeeRZxXWcgej+C6rqpaTU8AFw6iyTkjONuJl +2KJi50KHL5Aw18WKwLclhMsMrX0MKsAFz8nO/cKQWCGezLfy8QHgPBgV9m217rSdODBAp Y/mD8qTPO+bwUlUkt9heMg/oUtV3RhHg/pCSEFCvZqtbg9hbwOk/1jK9AKab1TP179o0wm tDbLIqNzOqpyXASD7vpzXFS8KgnmSAKX1FpdnZs8gU6273bvfA/HsyTAU5g1ZjoTJ6YEC8 92ICE4jTbxQhg2sSjy+5b9R6T7YIxo64l9zBmg2rhdxNIKiqsxxxr4UHD0fO5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709837; a=rsa-sha256; cv=none; b=q22aXTyBuWg3FYjaaA1qEWOiB+FDCY4d0WJZlQLWybEeCotuhG+9+gGazhoZNwebSGCRXC Prz57vnd0WM/ETwIY2QY7ntoRsa0xfNJeW3wpVvbAwuSPWTt5+Jih1WhA583s9oJsZNy29 FNFv3drh5uL9AoWF3D8FNqnemyKySWLIZPMRIEZTC84rlU7mEr0PsSsm9KZACo74ELtfxD snk1L0TsalSz/axqWkHnpWqJHmZBB554quorgBy+OL5knWdhH1RIZtcdg4DX+/zJ5krhym Tq4TZzdPk2NNJ+c1aJ+lyesSYnFytlUi9K7QcNnt773H4DDYCQEmOpuxbVLp2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYn0wNmz19B; Thu, 08 May 2025 13:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAbv6046723; Thu, 8 May 2025 13:10:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAbji046720; Thu, 8 May 2025 13:10:37 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:37 GMT Message-Id: <202505081310.548DAbji046720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 75568c61bfdd - main - pf: add missing braces List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 75568c61bfdd512e6ebef6a2024774e7bd70d23a Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=75568c61bfdd512e6ebef6a2024774e7bd70d23a commit 75568c61bfdd512e6ebef6a2024774e7bd70d23a Author: Kristof Provost AuthorDate: 2025-05-05 14:08:03 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:24 +0000 pf: add missing braces 4e5657ab346c9 added assertions here, which caused us to always execute PACKET_UNDO_NAT(), even when that's not needed. Add braces to ensure we execute only when expected. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8c74b15ef991..39aa965a2d29 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9073,11 +9073,12 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, error = EMSGSIZE; KMOD_IPSTAT_INC(ips_cantfrag); if (pd->act.rt != PF_DUPTO) { - if (s && s->nat_rule != NULL) + if (s && s->nat_rule != NULL) { MPASS(m0 == pd->m); PACKET_UNDO_NAT(pd, (ip->ip_hl << 2) + (ip_off & IP_OFFMASK), s); + } icmp_error(m0, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0, ifp->if_mtu); @@ -9359,11 +9360,12 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, else { in6_ifstat_inc(ifp, ifs6_in_toobig); if (pd->act.rt != PF_DUPTO) { - if (s && s->nat_rule != NULL) + if (s && s->nat_rule != NULL) { MPASS(m0 == pd->m); PACKET_UNDO_NAT(pd, ((caddr_t)ip6 - m0->m_data) + sizeof(struct ip6_hdr), s); + } icmp6_error(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu); SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); From nobody Thu May 8 13:10: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 4ZtXYp3wlyz5wJX2; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYp22PXz3LcN; Thu, 08 May 2025 13:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mOKXvyUHJcTp8mg6knN7gzB/Xn3F650f2WFWt+3k8Cs=; b=ZT3r/h4QiU9tmmXEFUXb48Yj5zX9Ebbwa7J8klPebbf2PhcwfeW68BhPEz2Z8bnwTtOdEL h2NxK8i2Q8wKefPIlyLZRYgpn84RzYmyvw6lQEZQRIkDLm4RIZoUVPIH7tXe//+pVn0gZ0 D77cOQ2JcZH3/LqXnLxoer21EZJh7gffuW9lsOlfRZsmgA8MSrZ+I7gCo3d4RLVk9/FFqq BawimRAl7z6lWtwQwy9W8XcaXZeDPteB7nauoDc90KYD+D1iJWaYMxIdQBjz4c1ubiDjkx GWO1O9wBPXsEgI+ztdKFlUv5I3kwQcgQm+t3EBjqhAghxZn/TBkDUoGrgmVaKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mOKXvyUHJcTp8mg6knN7gzB/Xn3F650f2WFWt+3k8Cs=; b=w2C4t7k1DGyqjwWtMHXboWaeYu/yRFclyHrW73QvLxkayvk79JXhm8mpNb+5E4DKuozU4k g6+jEAZmo8SsyohA6+7taPM3VkjPe7wSyAbrjsIflT+7L9bqsk69ZGErYP5HObbOfyWZ9v xmYG6NXwTTNzxKJrVpHBhhMrMM+P69Rt92tq/xuSkoCrJZkyUMVNAYsgKqZYFLAsiHdT/S a+hIcIGaP7JI8pi3y5fOawRUdnVhS5uMnwojSKdHb6+LTWXsCTovQankCmVfU+oQ6qnEaC HZrN7t5QXNByi6iUElgb9SZ7cp8bIRDBmisocJVEMcFZ+jsA+CWuIBDb3M0PMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709838; a=rsa-sha256; cv=none; b=cWrOUIBBfYOKvFUM19STtoUyfRrqDyrOMr+KgM1Zz0Bu4vFF0/OxQFjwc3jm7WPf2qDJmR n/ZvTYCMg2T8c75DDS1EQBzMsnogduq68s4R30vx6zkSlU+IeTzvzYmXbbxWs/yk3W/eou w3SCOMF8lfhentGl/Hnh5r3gJUhmV6mmC6PgwXwy5trrNNBy4FUcgnmNdAJTBOOwvG/6iG +NfyyJe9NYJwoyYEQpkenULX3VFO9Fp/oSekWR0/87hQhQ8CXLcqjFIO2UQ5ry4gdg1i+x OKY87sAqrhoRfpjgADo4OmcdY7wEHPYOQ7bVhleQlKXbiP1Gkx+Uspq/42TF+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYp1SMRz1FG; Thu, 08 May 2025 13:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAcY7046996; Thu, 8 May 2025 13:10:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAc5n046993; Thu, 8 May 2025 13:10:38 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:38 GMT Message-Id: <202505081310.548DAc5n046993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a34efd08d983 - main - libpfct: remove incorrect __unused annotation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a34efd08d9833685495f3b44e0bffda6e41421f6 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a34efd08d9833685495f3b44e0bffda6e41421f6 commit a34efd08d9833685495f3b44e0bffda6e41421f6 Author: Kristof Provost AuthorDate: 2025-05-06 10:07:55 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:24 +0000 libpfct: remove incorrect __unused annotation Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index d84a66063647..e607cc78e613 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -396,7 +396,7 @@ SNL_DECLARE_PARSER(getstatus_parser, struct genlmsghdr, snl_f_p_empty, ap_getsta #undef _OUT struct pfctl_status * -pfctl_get_status_h(struct pfctl_handle *h __unused) +pfctl_get_status_h(struct pfctl_handle *h) { struct pfctl_status *status; struct snl_errmsg_data e = {}; From nobody Thu May 8 13:10: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 4ZtXYq5PsWz5wJGh; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYq2jTgz3LcT; Thu, 08 May 2025 13:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJzh2LzkOt95VV1GcT0OWuaonKspw50vdGCmkhEzoEg=; b=UiA8WhgKimceJ4MPohIDTDPzZGYLMucGrsGWkZ4qykD9/q0SvMPiEqObdGn6TwGoxn7dxB 08YVzXFPAQ8/G/wnpzkBkK0WMT0xUDjznE7CzK+CfiouZ9mre9wFRkjqxC9f+RsP9qDBiJ 36F2CoCsdvTpSYoj4BpZjGEg1JclwOOu0DTzmI+vE9VmUQ7PNQWYWWC4uBWaTmb62QVZkC 9iSvBI2iLEg5NqH/CfQxgOQAspm5brcEuQahcPCxsD9e/vNfq2VC9vxkQdpj4wLnnv4BTM ShXjcDQUxtltcmGhZo/Fs8JVBGEo4hHUq+ybGaFeb4XnY5pFYhCN/RfMjGEsMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJzh2LzkOt95VV1GcT0OWuaonKspw50vdGCmkhEzoEg=; b=bOaJs/e8d/2FUvXj/zG9ue8kKA6sgph3uMmQUKZ1eZxSINvf2e9udiVYeu/qjJ8UDV7R5j NjFLdxvhH+d9GYJvZ0521PPznRa/TpBC51+xXrCE5T0Q+mT9maali7DbuYCzj/SsxX9Wgk IQKVWWRb7f2Rj/TgM6KJK2B2kcC9M780FMXceiB32ZR5fUqTfqBbPCmF2o7d8ioau1th3L wABf0ScFHgT5meFGVuGEMdVhaLw56HK7EMCbKnwRpGBYWDJUV0xWI9mUFNgdbNWEPMwIRb j5r8VOCLT611LkheDUEpkc1dHD95/YBHZ10wLgMrKMK0FUVmLiNPS51kv2Y+Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709839; a=rsa-sha256; cv=none; b=K09KTAXFfsFiJ4Q8K4cd3RinlOlJu6VsX8oiJwh/vjxWkGO66VG7IcX6VX7Pen9V+JT4Hl QmXlbd3oy3La2NHPE1llhskU+UmtraE5CvglmHsJm2l2bxEfswN2rG4nJtegTaFRDtJR8u 0bslI0nZj1wFqSDau+P4zqm2C/Loa/laOtUsRsACEVP7ipFPxdA7fr5zFdqhKDTMerWEAF T3Ba6TtzU+uaqaKxsVGSiAc6PfvDr2VB13xclQMy2Ng7+KNUbqReA1SfXRli4mbDyOIdV0 yM7Jjd1+DWzA4UWpxp2WBzZrDfYyqtZcC9jbvEercsiI2QZe8Sv1HZDhyuGfxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYq29DVz1ld; Thu, 08 May 2025 13:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAdwH047030; Thu, 8 May 2025 13:10:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAdWi047027; Thu, 8 May 2025 13:10:39 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:39 GMT Message-Id: <202505081310.548DAdWi047027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 033b34069626 - main - pf: use pd->m in pf_route() and pf_route6() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 033b34069626ce7bb8389d47973eae9ba73e7120 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=033b34069626ce7bb8389d47973eae9ba73e7120 commit 033b34069626ce7bb8389d47973eae9ba73e7120 Author: Kristof Provost AuthorDate: 2025-05-05 13:07:58 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:24 +0000 pf: use pd->m in pf_route() and pf_route6() Instead of passing an extra mbuf pointer to pf_route(), it should just use pd->m. Then pf_test() can also operate on pd.m and set the *m0 value in the caller just before it returns. OK sashan@ Obtained from: OpenBSD, bluhm , 3dfcac0201 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 79 ++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 39aa965a2d29..2515c85c3eb7 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -405,14 +405,14 @@ static void pf_mtag_free(struct m_tag *); static void pf_packet_rework_nat(struct pf_pdesc *, int, struct pf_state_key *); #ifdef INET -static void pf_route(struct mbuf **, struct pf_krule *, +static void pf_route(struct pf_krule *, struct ifnet *, struct pf_kstate *, struct pf_pdesc *, struct inpcb *); #endif /* INET */ #ifdef INET6 static void pf_change_a6(struct pf_addr *, u_int16_t *, struct pf_addr *, u_int8_t); -static void pf_route6(struct mbuf **, struct pf_krule *, +static void pf_route6(struct pf_krule *, struct ifnet *, struct pf_kstate *, struct pf_pdesc *, struct inpcb *); #endif /* INET6 */ @@ -8842,7 +8842,7 @@ pf_routable(struct pf_addr *addr, sa_family_t af, struct pfi_kkif *kif, #ifdef INET static void -pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, +pf_route(struct pf_krule *r, struct ifnet *oifp, struct pf_kstate *s, struct pf_pdesc *pd, struct inpcb *inp) { struct mbuf *m0, *m1, *md; @@ -8857,9 +8857,9 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, int r_dir; bool skip_test = false; - KASSERT(m && *m && r && oifp, ("%s: invalid parameters", __func__)); + KASSERT(pd->m && r && oifp, ("%s: invalid parameters", __func__)); - SDT_PROBE4(pf, ip, route_to, entry, *m, pd, s, oifp); + SDT_PROBE4(pf, ip, route_to, entry, pd->m, pd, s, oifp); if (s) { r_dir = s->direction; @@ -8872,10 +8872,10 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, __func__)); if ((pd->pf_mtag == NULL && - ((pd->pf_mtag = pf_get_mtag(*m)) == NULL)) || + ((pd->pf_mtag = pf_get_mtag(pd->m)) == NULL)) || pd->pf_mtag->routed++ > 3) { - m0 = *m; - *m = NULL; + m0 = pd->m; + pd->m = NULL; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad_locked; } @@ -8892,14 +8892,14 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, /* When the 2nd interface is not skipped */ return; } else { - m0 = *m; - *m = NULL; + m0 = pd->m; + pd->m = NULL; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; } } else { pd->pf_mtag->flags |= PF_MTAG_FLAG_DUPLICATED; - if (((m0 = m_dup(*m, M_NOWAIT)) == NULL)) { + if (((m0 = m_dup(pd->m, M_NOWAIT)) == NULL)) { if (s) PF_STATE_UNLOCK(s); return; @@ -8908,7 +8908,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { if ((pd->act.rt == PF_REPLYTO) == (r_dir == pd->dir)) { if (pd->af == pd->naf) { - pf_dummynet(pd, s, r, m); + pf_dummynet(pd, s, r, &pd->m); if (s) PF_STATE_UNLOCK(s); return; @@ -8934,7 +8934,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, ifp = NULL; } } - m0 = *m; + m0 = pd->m; } ip = mtod(m0, struct ip *); @@ -8949,7 +8949,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, if (ifp == NULL && (pd->af != pd->naf)) { /* We're in the AFTO case. Do a route lookup. */ const struct nhop_object *nh; - nh = fib4_lookup(M_GETFIB(*m), ip->ip_dst, 0, NHR_NONE, 0); + nh = fib4_lookup(M_GETFIB(m0), ip->ip_dst, 0, NHR_NONE, 0); if (nh) { ifp = nh->nh_ifp; @@ -8984,8 +8984,8 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } if (ifp == NULL) { - m0 = *m; - *m = NULL; + m0 = pd->m; + pd->m = NULL; SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; } @@ -9118,7 +9118,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, done: if (pd->act.rt != PF_DUPTO) - *m = NULL; + pd->m = NULL; return; bad_locked: @@ -9132,7 +9132,7 @@ bad: #ifdef INET6 static void -pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, +pf_route6(struct pf_krule *r, struct ifnet *oifp, struct pf_kstate *s, struct pf_pdesc *pd, struct inpcb *inp) { struct mbuf *m0, *md; @@ -9143,9 +9143,9 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, int r_dir; bool skip_test = false; - KASSERT(m && *m && r && oifp, ("%s: invalid parameters", __func__)); + KASSERT(pd->m && r && oifp, ("%s: invalid parameters", __func__)); - SDT_PROBE4(pf, ip6, route_to, entry, *m, pd, s, oifp); + SDT_PROBE4(pf, ip6, route_to, entry, pd->m, pd, s, oifp); if (s) { r_dir = s->direction; @@ -9158,10 +9158,10 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, __func__)); if ((pd->pf_mtag == NULL && - ((pd->pf_mtag = pf_get_mtag(*m)) == NULL)) || + ((pd->pf_mtag = pf_get_mtag(pd->m)) == NULL)) || pd->pf_mtag->routed++ > 3) { - m0 = *m; - *m = NULL; + m0 = pd->m; + pd->m = NULL; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad_locked; } @@ -9178,14 +9178,14 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, /* When the 2nd interface is not skipped */ return; } else { - m0 = *m; - *m = NULL; + m0 = pd->m; + pd->m = NULL; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } } else { pd->pf_mtag->flags |= PF_MTAG_FLAG_DUPLICATED; - if (((m0 = m_dup(*m, M_NOWAIT)) == NULL)) { + if (((m0 = m_dup(pd->m, M_NOWAIT)) == NULL)) { if (s) PF_STATE_UNLOCK(s); return; @@ -9194,7 +9194,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } else { if ((pd->act.rt == PF_REPLYTO) == (r_dir == pd->dir)) { if (pd->af == pd->naf) { - pf_dummynet(pd, s, r, m); + pf_dummynet(pd, s, r, &pd->m); if (s) PF_STATE_UNLOCK(s); return; @@ -9220,7 +9220,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, ifp = NULL; } } - m0 = *m; + m0 = pd->m; } ip6 = mtod(m0, struct ip6_hdr *); @@ -9233,7 +9233,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, if (s != NULL) { if (ifp == NULL && (pd->af != pd->naf)) { const struct nhop_object *nh; - nh = fib6_lookup(M_GETFIB(*m), &ip6->ip6_dst, 0, NHR_NONE, 0); + nh = fib6_lookup(M_GETFIB(m0), &ip6->ip6_dst, 0, NHR_NONE, 0); if (nh) { ifp = nh->nh_ifp; @@ -9277,8 +9277,8 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, } if (ifp == NULL) { - m0 = *m; - *m = NULL; + m0 = pd->m; + pd->m = NULL; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } @@ -9377,7 +9377,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, done: if (pd->act.rt != PF_DUPTO) - *m = NULL; + pd->m = NULL; return; bad_locked: @@ -10723,21 +10723,19 @@ done: break; case PF_AFRT: if (pf_translate_af(&pd)) { - if (!pd.m) - *m0 = NULL; + *m0 = pd.m; action = PF_DROP; break; } - *m0 = pd.m; /* pf_translate_af may change pd.m */ #ifdef INET if (pd.naf == AF_INET) - pf_route(m0, r, kif->pfik_ifp, s, &pd, inp); + pf_route(r, kif->pfik_ifp, s, &pd, inp); #endif /* INET */ #ifdef INET6 if (pd.naf == AF_INET6) - pf_route6(m0, r, kif->pfik_ifp, s, &pd, inp); + pf_route6(r, kif->pfik_ifp, s, &pd, inp); #endif /* INET6 */ - *m0 = NULL; + *m0 = pd.m; action = PF_PASS; goto out; break; @@ -10747,16 +10745,17 @@ done: #ifdef INET case AF_INET: /* pf_route() returns unlocked. */ - pf_route(m0, r, kif->pfik_ifp, s, &pd, inp); + pf_route(r, kif->pfik_ifp, s, &pd, inp); break; #endif /* INET */ #ifdef INET6 case AF_INET6: /* pf_route6() returns unlocked. */ - pf_route6(m0, r, kif->pfik_ifp, s, &pd, inp); + pf_route6(r, kif->pfik_ifp, s, &pd, inp); break; #endif /* INET6 */ } + *m0 = pd.m; goto out; } if (pf_dummynet(&pd, s, r, m0) != 0) { From nobody Thu May 8 13:10: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 4ZtXYr6q8Tz5wJSh; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYr3CX5z3Lcc; Thu, 08 May 2025 13:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prSPnDQ060H8V/vt9lTu1H+IHLexD5VhAwr9KN0tauI=; b=c/lAreHZtxRb62jzqOcJTB8kE00ELwdO1oz95wx/kqabj5LsnRWGrV10lNecfDeA2Hi9dq nRw+nUJ0Q4Ay42OwlosAbF29zHDtuGAeFJZ6UDRkJl8pNCIpUut+SfiCawl7kFmxxAOkif Om2Ipc2+7kNbPOJ2wklfR8KbjI3mZPvBQC8IBFtuMLJsgzDqcIN0LCI6yVT1/BRc1HelsQ yIFgALWSX2ms/YWxlQcUFmpCng+BieQMFCDDbGB8i5Vgamt8XRAr3wvg1Y6/NH8JGyaaXH 5ltEIfVVKSmZsuYfoFzTk1hcPxchOKh7j53kwkxyTI3ldvHeHh+/bXBXprkSPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=prSPnDQ060H8V/vt9lTu1H+IHLexD5VhAwr9KN0tauI=; b=xyBo52B1dVSp2K8zg4iEQ5kco0BcUOgsxLW+nEsJK87hAPyeMTt4MseTpAXoqYLNLFpaS7 AhJ9i4Y2Ut1rw3s8B36AsZ9snT6UuruSmcns5nceNNrJRMPnHosgXH2Rzkm1iXNsDNM3F/ Ihie15Rqjxl3Vba77jRIsIbMuN4ZGrw6I5VnxGhwfmi3YgNULr2YfxxsY0JY0u4Gx1IRA7 HtOVVOQGf8V/uTBYrqFlsg/sY5FgXlxwtfo+YQ6u5spAQM3q51rL4XeVCztxwh71sB+9xC VcfnOgFXdEmLcPGWzUcXI5BoU3+E7qrfIiGS0I/IxjG4Sij5NMi/jFWyckCDLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709840; a=rsa-sha256; cv=none; b=ZIwwPMKzjUeNepYI7IKaIhRaAMRowrYjNUOOxlBoZAbxxcUnGq/NVLxfhZAHxbRwCf4H7A yFryAO6CKSFkgLh6ePkEQsLfx5NsBO/EUAEbkaLbFSN/xYcuJeoqMEMVUcdVcDiPgu+4rL 96T5LD2GmZcgBtztfdBDZ/74zjx0oszwxFI6sfncqXT2510pUBiyyl8laTJMfIyWqt0xjD dP2oyXCorh0rAbfobvUmggEMunvGwn6fnGCSMh1erOsZEH01qiBNDoKn4Lk6XE1OKr8nMe xuzlqJjniclRQUAdDGEm3JZm48a787emNIC04EKKddJJcP00aqmZjJazMAumow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYr2mX2z19C; Thu, 08 May 2025 13:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAeJR047064; Thu, 8 May 2025 13:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAe8U047061; Thu, 8 May 2025 13:10:40 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:40 GMT Message-Id: <202505081310.548DAe8U047061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3bb82353b528 - main - pf: reject hop-by-hop if it's not the first extension header List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 3bb82353b528e7e2a0815648d5be36c610b001f9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3bb82353b528e7e2a0815648d5be36c610b001f9 commit 3bb82353b528e7e2a0815648d5be36c610b001f9 Author: Kristof Provost AuthorDate: 2025-05-06 09:18:27 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:24 +0000 pf: reject hop-by-hop if it's not the first extension header The pf fragment reassembly code accepted IPv6 hop-by-hop headers after fragment headers. Add an extra check that the hop-by-hop header is always the first extension header after the IPv6 header. Found by Antonios Atlasis; OK sthen@ mpi@ Obtained from: OpenBSD, bluhm , 17ea4b2bcd Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2515c85c3eb7..2f69f36e2db3 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9774,13 +9774,14 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) struct ip6_ext ext; struct ip6_rthdr rthdr; uint32_t end; - int fraghdr_cnt = 0, rthdr_cnt = 0; + int hdr_cnt = 0, fraghdr_cnt = 0, rthdr_cnt = 0; pd->off += sizeof(struct ip6_hdr); end = pd->off + ntohs(h->ip6_plen); pd->fragoff = pd->extoff = pd->jumbolen = 0; pd->proto = h->ip6_nxt; for (;;) { + hdr_cnt++; switch (pd->proto) { case IPPROTO_FRAGMENT: if (fraghdr_cnt++) { @@ -9833,8 +9834,15 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) return (PF_DROP); } /* FALLTHROUGH */ - case IPPROTO_AH: case IPPROTO_HOPOPTS: + /* RFC2460 4.1: Hop-by-Hop only after IPv6 header */ + if (pd->proto == IPPROTO_HOPOPTS && hdr_cnt > 1) { + DPFPRINTF(PF_DEBUG_MISC, ("IPv6 hopopts not first")); + REASON_SET(reason, PFRES_IPOPTIONS); + return (PF_DROP); + } + /* FALLTHROUGH */ + case IPPROTO_AH: case IPPROTO_DSTOPTS: if (!pf_pull_hdr(pd->m, pd->off, &ext, sizeof(ext), NULL, reason, AF_INET6)) { From nobody Thu May 8 13:10: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 4ZtXYs6pMLz5wJZd; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYs4X5Jz3LwM; Thu, 08 May 2025 13:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hpxsGKH79Rscomje3xqSQFH3mB1Pamg2DF6m10ZDsuU=; b=l/87d72AbgBfnORHaLfk/XRgyVNIojLFIRL6HFVG1uiOZfiGTy80oDfErsd5xACanqf6A3 XugPJ6PeKiJLe5h/3S3cXzFv0RQq/tVH4+++bU0zHJOUwxDnW9fG6wIFrl6z8LsKdUm7LD 6qBSz4og05Az/Bup1S5/HJ6T0KPzYaF6OXgMRvDGBJtupsbQ4LRbrQP48CJTi717LcfzGY 0hcbPf59lO4IxPRXkGW3eGiTi50fOH0aW4YsFJHyH1pzo1salI97ErNZYi5x817O3fah7y fL5/o4I0Hjdv1z0LZPHL3QV+FiTHkyfQBgeV7djwmwyXQptYsVS9ZjvImw+WlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hpxsGKH79Rscomje3xqSQFH3mB1Pamg2DF6m10ZDsuU=; b=kF/yIGcZSCEPIwexDelb+iqmch0djFrCFYE7Sq9sFNcfQt/8QBcKive4Iiz5twjLfx0QHh r1tKPkbAz/4NLsnMaFYaI/fU7ixF4DDwyFc5n1FuPjZnHvUr2vugtqW1+Lt5ty+teQpQC4 GMPgrCha2WS+vrS+bvy6IB3Zq66u6LUhJbThivI95nLLM+g83Y8VezwbPkurwpKa92oPnY K73+4Cqc8k4yj8lchJ2F+mk31yROdgjFWi3nRrtf8CX3bJEmW7coXeDvFQBiBm9O9+JmSb MFv4fr2sdGS2mCsQKZg5XR+i3frqzo6oiNMpuLSt+r9oCq2cl9szQAv37SiRkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709841; a=rsa-sha256; cv=none; b=UyUTyMBcgGh2s4KGO+S32cWXdlD0p75c8dulNkNnf7umXMZLHNPqXXxDfVIF9BzBNl7c/b 8WacuXgEoVNVgcB+3BSDNDGwM5SpxSxOhAPn/gT1LT/rT2bih7N764ldc138fYS9/x9Er4 hW2vSh7FViOz/mw8ojiCLMkFgM+0cRGgDAhs+yMbS2bJdpOOtCHfuyqNWc1FnaC547aGbV lgYsgcSnEDJqHq1LYmcVHlaKLTbLzpT7Kt67k1u/m7zMweed81VNqqXH7gGLBdxuquE4id uGC9R+ObL1bFnO5rA8VUV01NMKFKR0ppGcIbxJXfOF4dDVOSk4zhBkgmDmOmMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYs43M6z1lh; Thu, 08 May 2025 13:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAfWI047101; Thu, 8 May 2025 13:10:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAfQ4047098; Thu, 8 May 2025 13:10:41 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:41 GMT Message-Id: <202505081310.548DAfQ4047098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 681a04dbda0e - main - pf tests: verify we accept exactly one hop-by-hop header List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 681a04dbda0e06cccf2ecc1ab8cac1e9e2be78d2 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=681a04dbda0e06cccf2ecc1ab8cac1e9e2be78d2 commit 681a04dbda0e06cccf2ecc1ab8cac1e9e2be78d2 Author: Kristof Provost AuthorDate: 2025-05-06 10:07:23 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:25 +0000 pf tests: verify we accept exactly one hop-by-hop header Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/frag6.py | 90 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/tests/sys/netpfil/pf/frag6.py b/tests/sys/netpfil/pf/frag6.py index c9a71f73c0cf..de14fec528fd 100644 --- a/tests/sys/netpfil/pf/frag6.py +++ b/tests/sys/netpfil/pf/frag6.py @@ -97,6 +97,96 @@ class TestFrag6(VnetTestTemplate): sp.send(pkts, inter = 0.1) +class TestFrag6HopHyHop(VnetTestTemplate): + REQUIRED_MODULES = ["pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1", "if2"]}, + "vnet2": {"ifaces": ["if1", "if2"]}, + "if1": {"prefixes6": [("2001:db8::1/64", "2001:db8::2/64")]}, + "if2": {"prefixes6": [("2001:db8:666::1/64", "2001:db8:1::2/64")]}, + } + + def vnet2_handler(self, vnet): + ifname = vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/sysctl net.inet6.ip6.forwarding=1") + ToolsHelper.print_output("/usr/sbin/ndp -s 2001:db8:1::1 00:01:02:03:04:05") + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.print_output("/sbin/pfctl -x loud") + ToolsHelper.pf_rules([ + "scrub fragment reassemble min-ttl 10", + "pass", + ]) + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_hop_by_hop(self): + "Verify that we reject non-first hop-by-hop headers" + if1 = self.vnet.iface_alias_map["if1"].name + if2 = self.vnet.iface_alias_map["if2"].name + ToolsHelper.print_output("/sbin/route add -6 default 2001:db8::2") + ToolsHelper.print_output("/sbin/ping6 -c 1 2001:db8:1::2") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + # A hop-by-hop header is accepted if it's the first header + pkt = sp.IPv6(src="2001:db8::1", dst="2001:db8:1::1") \ + / sp.IPv6ExtHdrHopByHop() \ + / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f0') * 30)) + pkt.show() + + # Delay the send so the sniffer is running when we transmit. + s = DelayedSend(pkt) + + replies = sp.sniff(iface=if2, timeout=3) + found = False + for p in replies: + p.show() + ip6 = p.getlayer(sp.IPv6) + hbh = p.getlayer(sp.IPv6ExtHdrHopByHop) + icmp6 = p.getlayer(sp.ICMPv6EchoRequest) + + if not ip6 or not icmp6: + continue + assert ip6.src == "2001:db8::1" + assert ip6.dst == "2001:db8:1::1" + assert hbh + assert icmp6 + found = True + assert found + + # A hop-by-hop header causes the packet to be dropped if it's not the + # first extension header + pkt = sp.IPv6(src="2001:db8::1", dst="2001:db8:1::1") \ + / sp.IPv6ExtHdrFragment(offset=0, m=0) \ + / sp.IPv6ExtHdrHopByHop() \ + / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f0') * 30)) + pkt2 = sp.IPv6(src="2001:db8::1", dst="2001:db8:1::1") \ + / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f0') * 30)) + + # Delay the send so the sniffer is running when we transmit. + ToolsHelper.print_output("/sbin/ping6 -c 1 2001:db8:1::2") + + s = DelayedSend([ pkt2, pkt ]) + replies = sp.sniff(iface=if2, timeout=10) + found = False + for p in replies: + # Expect to find the packet without the hop-by-hop header, not the + # one with + p.show() + ip6 = p.getlayer(sp.IPv6) + hbh = p.getlayer(sp.IPv6ExtHdrHopByHop) + icmp6 = p.getlayer(sp.ICMPv6EchoRequest) + + if not ip6 or not icmp6: + continue + assert ip6.src == "2001:db8::1" + assert ip6.dst == "2001:db8:1::1" + assert not hbh + assert icmp6 + found = True + assert found + class TestFrag6_Overlap(VnetTestTemplate): REQUIRED_MODULES = ["pf"] TOPOLOGY = { From nobody Thu May 8 13:10: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 4ZtXYw1btTz5wJSl; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYt5Tgsz3Lys; Thu, 08 May 2025 13:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zcRrhBsqvwsRp2pd8WUOycR3kWBwkOJqGT5/7W6vRT0=; b=Iv/x4SVgVm9uK4rqP4Lz+mS/i0Se+zJlfP9JtFT7XTnolJRm03/9/DeZfyqFx4J9XmPGRU 64jK0BrzvpNy4WG3PM3kAZsbLXFk3YCxVbTu7ajcWH069Pd3uzKWhpaproXt/3tbPuWVZt H8gdHOPEhM00K9OTMlsoKqp6HulWfX+y6p+Uy5mSjtYs9kogZ+liqO6qgOiDYw4wXY1cLY hwglpR4kjYH43y2FzHYCjcojDinG+xea+eDiJAl1vNhZZhmWq3ljn5Fojbb0A/AxQwthJU NU83M7nQRuwvDzJSTwygBfu/writnnoPEPTZS7lQMDsDdqcMMbSsTZs9d6TbHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zcRrhBsqvwsRp2pd8WUOycR3kWBwkOJqGT5/7W6vRT0=; b=AfusUfkgZw9RHm5GUjZOgq+PjD2jzQqicZsnQaH3HD1TIEKPqZCdA2+/qiwjN3UBzWEi4u MaiYzcO3nvEDVzzrqpn+sNoh6tHzEYu0B02wIiLc74mJbOC/5TUOTLUmfa9uAL7SblK/VT DUWSRrJ4CCpp1VwnMj/e7A5BqzRenOScBRNspqNCrX22PSAo06o7gb0IRFgZ8qB8+aENjs EBFOaQx917CGgDs0ypEt+20NoTy+was3WPohzmQ094/rOd28OCkqwTcQ6Racu8qcJ+dE2R kDd9vrhmDoF830ywx/B4HPZdNJVNf0bumqE0O+kUnIsfheIj2VbTUuqrhrjIXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709842; a=rsa-sha256; cv=none; b=iuG1ptScwlu0YK9OkxyomfdzV4BpSs52rH0w7aAC/gLOouWH/MBsI5liDu/RAiWZObtZ2f OAlF2AreFyD9FOp+P1w4LuFFGtjtlLHtWmBJ0ErCyXmjgZQZ5J3dNnWnpYe9tfOHZUwhbm XFWe1N4hMfKmDEbt48sd57tjNtdkmvmnMsc4t9+eSG1Vt5kxGj+viOOTojBUlPc3BHNKTD 5bFgOav3PtimJ06O9ZxXi+JMcgnZ5fJ81+UTomoFYbfQSGt1Xq+jj7fslyiUcDUWlgTZi2 8fqA445LzEL03UCUzhEW/NcFi9bfVz4ZQrfJDpw3IVWYol+cqT8SDYkaTDlLQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYt50zJz1lk; Thu, 08 May 2025 13:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAgEq047139; Thu, 8 May 2025 13:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAg6f047136; Thu, 8 May 2025 13:10:42 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:42 GMT Message-Id: <202505081310.548DAg6f047136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b543f426c25e - main - pf: convert DIOCRCLRADDRS to 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b543f426c25ecd7d4723918021178ad57031c1ff Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b543f426c25ecd7d4723918021178ad57031c1ff commit b543f426c25ecd7d4723918021178ad57031c1ff Author: Kristof Provost AuthorDate: 2025-05-06 15:15:53 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:25 +0000 pf: convert DIOCRCLRADDRS to netlink Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 42 ++++++++++++++++++++++++++++++++++++++++++ lib/libpfctl/libpfctl.h | 2 ++ sbin/pfctl/pfctl_radix.c | 15 +-------------- sys/netpfil/pf/pf_nl.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ sys/netpfil/pf/pf_nl.h | 1 + 5 files changed, 90 insertions(+), 14 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e607cc78e613..271fb33babfe 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -3324,3 +3324,45 @@ pfctl_clear_tstats(struct pfctl_handle *h, const struct pfr_table *filter, return (e.error); } + +int +pfctl_clear_addrs(struct pfctl_handle *h, const struct pfr_table *filter, + int *ndel, int flags) +{ + struct snl_writer nw; + struct snl_errmsg_data e = {}; + struct nlmsghdr *hdr; + uint64_t del; + uint32_t seq_id; + int family_id; + + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); + + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_CLR_ADDRS); + + snl_add_msg_attr_string(&nw, PF_T_ANCHOR, filter->pfrt_anchor); + snl_add_msg_attr_string(&nw, PF_T_NAME, filter->pfrt_name); + snl_add_msg_attr_u32(&nw, PF_T_TABLE_FLAGS, filter->pfrt_flags); + snl_add_msg_attr_u32(&nw, PF_T_FLAGS, flags); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + + seq_id = hdr->nlmsg_seq; + + if (!snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + if (!snl_parse_nlmsg(&h->ss, hdr, &tstats_clr_parser, &del)) + continue; + if (ndel) + *ndel = (uint32_t)del; + } + + return (e.error); +} + diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index d8a7d1b6ebc4..4d481f436674 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -556,5 +556,7 @@ int pfctl_get_tstats(struct pfctl_handle *h, const struct pfr_table *filter, pfctl_get_tstats_fn fn, void *arg); int pfctl_clear_tstats(struct pfctl_handle *h, const struct pfr_table *filter, int *nzero, int flags); +int pfctl_clear_addrs(struct pfctl_handle *h, const struct pfr_table *filter, + int *ndel, int flags); #endif diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c index e4659a30b234..9739b0f238e1 100644 --- a/sbin/pfctl/pfctl_radix.c +++ b/sbin/pfctl/pfctl_radix.c @@ -113,20 +113,7 @@ pfr_get_tables(struct pfr_table *filter, struct pfr_table *tbl, int *size, int pfr_clr_addrs(struct pfr_table *tbl, int *ndel, int flags) { - struct pfioc_table io; - - if (tbl == NULL) { - errno = EINVAL; - return (-1); - } - bzero(&io, sizeof io); - io.pfrio_flags = flags; - io.pfrio_table = *tbl; - if (ioctl(dev, DIOCRCLRADDRS, &io)) - return (-1); - if (ndel != NULL) - *ndel = io.pfrio_ndel; - return (0); + return (pfctl_clear_addrs(pfh, tbl, ndel, flags)); } int diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 3a5ae2f233b4..fb1f5f1f470e 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -2073,6 +2073,43 @@ pf_handle_clear_tstats(struct nlmsghdr *hdr, struct nl_pstate *npt) return (error); } +static int +pf_handle_clear_addrs(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + struct pfioc_table attrs = { 0 }; + struct nl_writer *nw = npt->nw; + struct genlmsghdr *ghdr_new; + int error; + int ndel; + + error = nl_parse_nlmsg(hdr, &table_parser, npt, &attrs); + if (error != 0) + return (error); + + PF_RULES_WLOCK(); + error = pfr_clr_addrs(&attrs.pfrio_table, &ndel, + attrs.pfrio_flags | PFR_FLAG_USERIOCTL); + PF_RULES_WUNLOCK(); + + if (error) + return (error); + + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) + return (ENOMEM); + + ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = PFNL_CMD_CLR_ADDRS; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + nlattr_add_u64(nw, PF_T_NBR_DELETED, ndel); + + if (!nlmsg_end(nw)) + return (ENOMEM); + + return (error); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser, &addrule_parser, @@ -2302,6 +2339,13 @@ static const struct genl_cmd pf_cmds[] = { .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, }, + { + .cmd_num = PFNL_CMD_CLR_ADDRS, + .cmd_name = "CRL_ADDRS", + .cmd_cb = pf_handle_clear_addrs, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index 55cc9c991b18..0f2f0b01415c 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -66,6 +66,7 @@ enum { PFNL_CMD_DEL_TABLE = 28, PFNL_CMD_GET_TSTATS = 29, PFNL_CMD_CLR_TSTATS = 30, + PFNL_CMD_CLR_ADDRS = 31, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) From nobody Thu May 8 13:10: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 4ZtXYw1bspz5wJDY; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYw09ycz3LlZ; Thu, 08 May 2025 13:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m763k5Q+b8pKTy2kl0Jeh0mErk0lckBBbiO58eOQgx4=; b=IYVljSn/4/YQ5d5SortR+3+sHTXRNIxGU5wY+0e3nyj8BYMMNP8eTzHMNa75KbvgEsNX9C Peyza1mltE6Wy3PqVf4PtwyhdVizAedTAljegC92lW1C4wWWtQW+whtTvbJOf92nTl9VKs nvE2UK/EcfZnOqCv5z7rfnZKMiAEDGvOu+mLhqgVbE5JUwbZCJLHPcxNU+tlsWqi8q1ulo Jm29OaB5cnZjOeppws+ficJ5cgDGa09312K/6ro1nw7FlSWvdrr73UBV90m1/OKS8PEyx8 Eq5sUHeaFGpdJB/V364VIzlXpgac2Qfq6XqyUfQKT2kVu+EV6lplQEpFhIgP5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m763k5Q+b8pKTy2kl0Jeh0mErk0lckBBbiO58eOQgx4=; b=hJmmd3z+BgUG+FEttxvwpMXsWifJeo7t0lz+vG6CbPkoIKYqgtUTKJhQkVNEUXw8obYve2 fy/4FiWomDa4YUJSmNNbY+Q5r8SBLj2g9uIZJpIfQAbcSSRyYwM/YhFhkKiUMGA9SY8on2 qYE2gZ9KU4jo6fA4r6jyS4NL1WU40ZfcaojCxy3CG96Xr/A2uqBqMixcWcIJ4jEQ1Zay8D Dn8WbTUae849NtZLhwhGKsSWIf66dh/R39gfjIiK9WaLhoex7OjJwAGwPTAD8zKRyijTag s7c/24Rab24o6gW1NxMN7HKAD51LK6vCsBz+tvCSM8uZ0zbxmmwsg6BjM5+LZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709844; a=rsa-sha256; cv=none; b=Zpexv1ll6evGb654xuf/LHG0ImgH+qXQOxzh4ACDUcA2JTpNO3yKx7RW3AwHjYrII29TKI JxLOBWB1KbHu7RmPonGH8PN9NMm+kkO+ZzrN+31g9PGLwlPYJ8Q9mKz236OvwuMBLMQyWh /tUc41PqJbGyWJOmEhZJdGoMbt/iBfCN87Wuh8qv+/HSraJ1XJ7JIcfBiIYDnPUq6fh1LV ZzahhVtEE8M4P7gzxIdufQSHCtFQlYK6RVMii9FWmBK0H3Q/Tt3/uvnXF2yIE7qS6cfLaq AfDSdIKK0EWGEnH1ksfpOSy6Zj0m2Ibig0SsyB9oV6TfozqjHsR0zxjG4BYdxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYv5y4Mz1gC; Thu, 08 May 2025 13:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAhcs047175; Thu, 8 May 2025 13:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAh1I047172; Thu, 8 May 2025 13:10:43 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:43 GMT Message-Id: <202505081310.548DAh1I047172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 93a955fcc313 - main - pf: fix incorrect list use in pflow_jail_remove() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93a955fcc3137772c06195a19e5a1d85982fec27 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=93a955fcc3137772c06195a19e5a1d85982fec27 commit 93a955fcc3137772c06195a19e5a1d85982fec27 Author: Kristof Provost AuthorDate: 2025-05-06 15:36:03 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:25 +0000 pf: fix incorrect list use in pflow_jail_remove() We remove items from V_pflowif_list while iterating it (via pflow_destroy()), so we must use the _SAFE macro. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pflow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pflow.c b/sys/netpfil/pf/pflow.c index 00890589814d..d30b80c88d89 100644 --- a/sys/netpfil/pf/pflow.c +++ b/sys/netpfil/pf/pflow.c @@ -191,10 +191,10 @@ pflow_jail_remove(void *obj, void *data __unused) #ifdef VIMAGE const struct prison *pr = obj; #endif - struct pflow_softc *sc; + struct pflow_softc *sc, *tmp; CURVNET_SET(pr->pr_vnet); - CK_LIST_FOREACH(sc, &V_pflowif_list, sc_next) { + CK_LIST_FOREACH_SAFE(sc, &V_pflowif_list, sc_next, tmp) { pflow_destroy(sc->sc_id, false); } CURVNET_RESTORE(); From nobody Thu May 8 13:10: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 4ZtXYx6WPpz5wJX7; Thu, 08 May 2025 13:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYx0Mk6z3Lv5; Thu, 08 May 2025 13:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=17KknKRSWKL8Jt/NEGkJIfroobOK0atpBE2xqDER4QE=; b=xHka5FS8cfuFczIRB+r76VH449vDEEvEzxLx9cNpkjBnhbVYUnn1ZYNkY2zz0A4EgBg3BW tTkkxzGAGkR7KCtACP2Y36Byvp/JexjjpuY+YEMGT1MtoUIMK/l5SksD8dwvVjmBaVFvMP UejQ0wX6+1uVtsQDR2BE1XxljS0DgWiOYBlSYMB2sl15IpeaXASb8kILw/MG0dzFc/5iCY 27gVFzsz67Sp/E2QXHN2izXCGGukfPhF+mtkVOavhjKTjSm2LRoZa4eX3EVuO9j/eL8MwQ jm+FWGoTh+k2INKemAfM6AntFt8O8Ob2/5yJciI54CPXZCD2i3dPZ7Mx9TYZWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=17KknKRSWKL8Jt/NEGkJIfroobOK0atpBE2xqDER4QE=; b=tn7+iGweQYtnpyGBDEfSiGfHMQ/uWXulCuaXH1IT/TiZfQb6wJHzoCTjNZkLM2Q+jP0xcC tfQl6qWdwNwsfmde6zGEwSBoiwMa5RA11Tr65NyHEH6rscE7c+R3xPxx9iacGs4CHdSBn4 O9Xez2W43QRyk7bMv+pegSfC8JTQZRnNoKZ63qQw09512/EVWhOgbp5JTDqpoZWLMJ9cPC 5AV/lzH+mcz236pwz1gaeuCKXKyAmt7yc+1hvinNmRg6CtjhGIElCgGTjIGLCVVnve2Ib6 b0R3x8ML9Ai8CF3t7C92oVw75Z7+BZV4Fl4DZuYxu43tRaZM9gJatILelAPPXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709845; a=rsa-sha256; cv=none; b=YdvPLPE7behF6LFs9ubukJGNZ4ZBGBRjpRL4Q5CTpRQZZZcHRAmivFjsAS3DIctWE80hy2 vPhU5kxmPf+grd8Qa6TtRuOeP/l7Mb8B/94iTi/PqVobD8UPldwd1iStJZrH7g6hnTwn73 ruakdNQ9wlHBfpRlvsaH89NhirW4/BoVAsSt2ndwVMnlvOl9fln+2Un1FXczwSCgWoyfQu cmv857iPmRh2R0BLcWToxfWoeveVEKMujS4FOZT8pRtn3qe4fXyNPVKFefkw3DHlD+Psws geivS1VzTkdDxcJ3J+T/NVTF8m9h99UQ5okbT4T0yTHTUUmYv/EfiCiiUc7RDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYw6xQ2z1lw; Thu, 08 May 2025 13:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAib9047208; Thu, 8 May 2025 13:10:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAiUm047205; Thu, 8 May 2025 13:10:44 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:44 GMT Message-Id: <202505081310.548DAiUm047205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b70fadca623f - main - pf: fix dealing with 0 limits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: b70fadca623f1ce62c34c67270feae6cf48ca4ba Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b70fadca623f1ce62c34c67270feae6cf48ca4ba commit b70fadca623f1ce62c34c67270feae6cf48ca4ba Author: Kristof Provost AuthorDate: 2025-05-07 08:43:14 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:25 +0000 pf: fix dealing with 0 limits uma doesn't like setting a limit on a zone which previously had none. At startup pf applies the default limit to all zones, so we can assume a limit was always set. We cope with the uma limitation by translating a limit of '0' (i.e. unlimited) to INT_MAX. This is high enough that we'll never realistically hit this limit, but it keeps uma happy. Add a test case to provoke this, and while we're here also fix syncookie handling of a 0 state limit. See also: d53927b0bae45 Reported-by: syzbot+02b784f183f79d4c07e4@syzkaller.appspotmail.com Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 6 +++++ sys/netpfil/pf/pf_ioctl.c | 3 ++- tests/sys/netpfil/pf/limits.sh | 53 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 271fb33babfe..a4afa26f0afe 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -2271,6 +2271,9 @@ pfctl_set_syncookies(int dev, const struct pfctl_syncookies *s) if (ret != 0) return (ret); + if (state_limit == 0) + state_limit = INT_MAX; + lim = state_limit; hi = lim * s->highwater / 100; lo = lim * s->lowwater / 100; @@ -2311,6 +2314,9 @@ pfctl_get_syncookies(int dev, struct pfctl_syncookies *s) if (ret != 0) return (ret); + if (state_limit == 0) + state_limit = INT_MAX; + bzero(s, sizeof(*s)); nvl = nvlist_create(0); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 5c3aec906b79..bd3c2b93c954 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2537,7 +2537,8 @@ pf_ioctl_set_limit(int index, unsigned int limit, unsigned int *old_limit) PF_RULES_WUNLOCK(); return (EINVAL); } - uma_zone_set_max(V_pf_limits[index].zone, limit); + uma_zone_set_max(V_pf_limits[index].zone, + limit == 0 ? INT_MAX : limit); if (old_limit != NULL) *old_limit = V_pf_limits[index].limit; V_pf_limits[index].limit = limit; diff --git a/tests/sys/netpfil/pf/limits.sh b/tests/sys/netpfil/pf/limits.sh index 474684bef660..69f0b6af2ccf 100644 --- a/tests/sys/netpfil/pf/limits.sh +++ b/tests/sys/netpfil/pf/limits.sh @@ -60,7 +60,60 @@ basic_cleanup() pft_cleanup } +atf_test_case "zero" "cleanup" +zero_head() +{ + atf_set descr 'Test changing a limit from zero on an in-use zone' + atf_set require.user root +} + +zero_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}b 192.0.2.2/24 up + + vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + atf_check -s exit:0 -o ignore \ + ping -c 3 192.0.2.1 + + jexec alcatraz pfctl -e + # Set no limit + pft_set_rules noflush alcatraz \ + "set limit states 0" \ + "pass" + + # Check that we really report no limit + atf_check -s exit:0 -o 'match:states hard limit 0' \ + jexec alcatraz pfctl -sa + + # Create a state + atf_check -s exit:0 -o ignore \ + ping -c 3 192.0.2.1 + + # Limit states + pft_set_rules noflush alcatraz \ + "set limit states 1000" \ + "pass" + + # And create a new state + atf_check -s exit:0 -o ignore \ + ping -c 3 192.0.2.1 + + atf_check -s exit:0 -o 'match:states hard limit 1000' \ + jexec alcatraz pfctl -sa +} + +zero_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" + atf_add_test_case "zero" } From nobody Thu May 8 13:10: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 4ZtXYy3pfQz5wJct; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYy23vxz3LxH; Thu, 08 May 2025 13:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwBcqIVU98hIpjJDVIuMAzOstU8CagtSJMnIR9di/Aw=; b=ZrhEs9KqpFA6c8Dhrayw6G7F8zie3RwIldvKVPgA0ZfV2oY01cMv6HpHHJdVgXdUBrdPJk TyJSqkJfLK4jet079+hl/KgRljyTt5hKrj25Ut3M73V9CJOUYNi9KIt8ne9n8Qre4UUV6Q YHxakkMxHt2nXo9LHdwP7C4Y6r90tdMKZUdjVyC43nyo0zBRhyDCX6VVmZYy3kMX13OFxw K7H9NOxfNaMeAcAzEc2gLS/8jWcxJ+8cgxaWsYlH6lsGD+XB2ACbMpHHlVPPSAAlcM7mEj uhg7p0tsHmnzxmrKTjNIGcSQSoBAwnwi6Y+P/nfsmuWa7dzpvO3tltqrjbDN0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwBcqIVU98hIpjJDVIuMAzOstU8CagtSJMnIR9di/Aw=; b=xAvOT37XEUoAhhkq/d3ec/+7CVZ9SPmzxYvIXhjuaL1fdDQyK00O+7haimQ99lM8suNhJt HcIPyGr9Iuns7uYGc+705oySrHa6HNBJ0gGD9VKClZmOgTtj3xoKiWFEDEt2iHI3P9PXg5 vn4NHgEMnKG5dAMYX3FiIuoM+39LKm13kc+5dumTWXGplMLJx4fA9di+E7DBEp5J0hkK50 uDDDaR6mhHnpGZHD1fA92noxifpoQ7KXUO7tJAPfcetrVfyICFpde3A4txpos1wsb5MMlm NtpdtB9dcZL0EtWRcXubXcj2+UOGR+EbC5MqbF1tq/8ZCioj8us2gwJ1AOOwFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709846; a=rsa-sha256; cv=none; b=bH6Gu3RT2l9S6hixpXtS9ImuSY+WPiOyh5dlFdkfE0xgvxNtQbvs0ATQSg1O9hxdd3Wysf lAqqg6z2ffOQQCwr2XggVkpXa/c9tHIP3N7K2m70RXaC6H7ApHMBQrkfFv9CEZtYmh9uT2 aRqXxOfVEKatilJzCPlBAG1NU/qWpBbI+TIpwwuhpWuHgoFrY++8ce62yzZx4XWODEU8Zb I8KgMpqvyA31tdQIPTgG/lbHunEIT6LQsGShAfqQINwFvn+J8OiBdTF6pPgwQSYLkqIku0 SigCnYZks1sUZAHF5Df2SoyPJWgeO1MQYteNZFqUeuCZhPqpABPXIIGlrUUtzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYy0jZfz1H7; Thu, 08 May 2025 13:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAj08047242; Thu, 8 May 2025 13:10:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAjam047239; Thu, 8 May 2025 13:10:45 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:45 GMT Message-Id: <202505081310.548DAjam047239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 1f8b1a3fac5f - main - authpf: use libpfctl to add or remove addresses to/from a table List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 1f8b1a3fac5f7fd28bd2eb09a13272774d2b6899 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1f8b1a3fac5f7fd28bd2eb09a13272774d2b6899 commit 1f8b1a3fac5f7fd28bd2eb09a13272774d2b6899 Author: Kristof Provost AuthorDate: 2025-05-07 09:08:41 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:25 +0000 authpf: use libpfctl to add or remove addresses to/from a table Sponsored by: Rubicon Communications, LLC ("Netgate") --- contrib/pf/authpf/authpf.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index fcf9812cdcca..73cc9a7dc657 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -842,15 +842,11 @@ error: static int change_table(int add, const char *ip_src) { - struct pfioc_table io; + struct pfr_table tbl = { 0 }; struct pfr_addr addr; + int ret; - bzero(&io, sizeof(io)); - strlcpy(io.pfrio_table.pfrt_name, tablename, - sizeof(io.pfrio_table.pfrt_name)); - io.pfrio_buffer = &addr; - io.pfrio_esize = sizeof(addr); - io.pfrio_size = 1; + strlcpy(tbl.pfrt_name, tablename, sizeof(tbl.pfrt_name)); bzero(&addr, sizeof(addr)); if (ip_src == NULL || !ip_src[0]) @@ -866,11 +862,16 @@ change_table(int add, const char *ip_src) return (-1); } - if (ioctl(pfctl_fd(pfh), add ? DIOCRADDADDRS : DIOCRDELADDRS, &io) && - errno != ESRCH) { + if (add) + ret = pfctl_table_add_addrs(pfctl_fd(pfh), &tbl, &addr, 1, NULL, 0); + else + ret = pfctl_table_del_addrs(pfctl_fd(pfh), &tbl, &addr, 1, NULL, 0); + + + if (ret != 0 && ret != ESRCH) { syslog(LOG_ERR, "cannot %s %s from table %s: %s", add ? "add" : "remove", ip_src, tablename, - strerror(errno)); + strerror(ret)); return (-1); } return (0); From nobody Thu May 8 13:10: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 4ZtXYz5BWmz5wJcx; Thu, 08 May 2025 13:10: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtXYz2hHBz3LmJ; Thu, 08 May 2025 13:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3NmavDkgiNBVu1I0EMzGMIDp3bZYIeocXDvwz3XNEZE=; b=xc4KlKcVxyS1FkhgDDoJYwubuV87h6Kk/S9N7dcq50XB+1PhRIYexeJIUEVyKcv8D4Ihir N+6Hlr5iMdpyb3UumwvGFSjzXQhi+ocohKzG5N3pvDXn1BYQnoj2sk40GLtvN/AYstj8sS mgNxFiPWFNHUwpbvR4pSYFl28x+CCcW81So0KFFsK3KKRf8HjppdLvys42Z/N8MLLcQqOc 5hzG2UPW0ULlCU/J/RuLz3IEu5j+2Nl4SiBshMOs8mXqDOpZM+PLJPIYfA/Ltu9L3xIXQo hCdBg+/V6krKT1peIyQDLgDZGVnYyq5ndkhzQ1NQewyk2F685o5qhOd5mXvhoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3NmavDkgiNBVu1I0EMzGMIDp3bZYIeocXDvwz3XNEZE=; b=pyZGbDrXfPD0eW9/pdCKZ/bJeacvtdJz3jdU2H56UAs9wYmGLoto4cfUBTsFOb1ues8lN3 vpYFSRLoD9/08Xe4NP7jri2jDFgW7BpmQiMsUH763WKoXsejL7upM4opO3Z1nybfmznSDO 7TAd2cH5RuWgUR8SPaAOkXIK6J2r3KBXXkKigY7aRLs8mtP/hO/enmiP+t4ZJeEIAu7P45 B4UI1e8vr3GP7JNM26NYfcmUeKrxj1knRoTvN0BTOkO9+fwIqFhL+UQcGVAQUdbbXwGgom uQ4B8KDKWgk+q7zb6F1iAw5RSVjYYwzNaznFHCqstShS3AVxyjdXyZE1PxBxiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709847; a=rsa-sha256; cv=none; b=QdPbjSjwbSj25Wv64EORcCmhT1DifYIRUq0l8mqqOGgKMojOg9t1wZEm6IE4Fc+Flt4c3/ e1SfoapZFDEHtqEtzor7POy+Qib2mJy+I8wyPACY6YGxTAqbvempCuZdiZT0XuqctG2+4R VZgn3KfNq5U6hwC3GUsMdk15MUymny6oKUNr9OXjtEP/sHJPfDI//g5PE5Zzp3QFIyJPoB n15L1eXwQKqfH6rYq9548gabuSEnRHSBQw+dC14gb/cs95RHAGQ8d8fN2BvFsvpIvdBxZH U4G2QLdYRv84aHAafmlLTrga6NzwTZyCCFzUj2/l1dXf1OC1SBytf+QmdC0YeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtXYz1Y6cz1m1; Thu, 08 May 2025 13:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548DAlHn047275; Thu, 8 May 2025 13:10:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAlTt047272; Thu, 8 May 2025 13:10:47 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:47 GMT Message-Id: <202505081310.548DAlTt047272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6ae89b2f152f - main - aft_python: fix incorrect ndp use List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 6ae89b2f152f9770646bdd66e53df702b99eb0ad Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ae89b2f152f9770646bdd66e53df702b99eb0ad commit 6ae89b2f152f9770646bdd66e53df702b99eb0ad Author: Kristof Provost AuthorDate: 2025-05-07 15:29:17 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:26 +0000 aft_python: fix incorrect ndp use If we want to clear a flag we have to include '--' before the flag we clear, otherwise ndp will misparse our command (the getopt call will interpret it as another option, and reject it). This caused spurious errors at the end of every atf_python test case such as: ============================== 1 passed in 7.26s =============================== usage: ndp [-nt] hostname ndp [-nt] -a | -c | -p | -r | -H | -P | -R ndp [-nt] -A wait ndp [-nt] -d hostname ndp [-nt] -f filename ndp [-nt] -i interface [flags...] ndp [-nt] -I [interface|delete] ndp [-nt] -s nodename etheraddr [temp] [proxy] Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/atf_python/sys/net/vnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index 6da5f2625990..68c8ce4e0cba 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -134,7 +134,7 @@ class VnetInterface(object): self.run_cmd(cmd) def enable_ipv6(self): - cmd = "/usr/sbin/ndp -i {} -disabled".format(self.name) + cmd = "/usr/sbin/ndp -i {} -- -disabled".format(self.name) self.run_cmd(cmd) def has_tentative(self) -> bool: From nobody Thu May 8 14:29: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 4ZtZK03DJjz5v90X; Thu, 08 May 2025 14:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtZK02QSmz3HYw; Thu, 08 May 2025 14:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xb9ZaNIrc9die7XNa9BusCYuQnMTK9j75KNFbR6gnsc=; b=FyxeZCX6GrvSGRchE5dHt7YPNTZyna57NpnWlWmuSOopvLBip5wUiRKX/mZP6riw4gD8Ps qN2WwLuq6ZAgAR8bS87kklmlyUcKEVhqV2Zmdi4mCITNHrvAdNcUlsKc0wDccwINSRUTOc oZt0zph6n9ckHDmWgnXHCBIEupb4w7drwTx9pNi6IDsqjhaS36K2yNDGRsreeK5BPd3cfh /lGTkM5vPzLHyln5V5nkosFG9/lGgLlXgNdkTrLfDfEVbGaXMtsiPjptC8Aw+v24UmDnVg a/KwMNLmKwOBlF1DGcyoXR6945AjGCWwoQKfQ/C77/9DiURVFIqCakR3DOkUdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xb9ZaNIrc9die7XNa9BusCYuQnMTK9j75KNFbR6gnsc=; b=FkGLxcz4ttJ7e0bhoIhXdoskqdGFGGRoxq3tXKeKvqKhMVyMsgPiZ/iR+KkEQVjYCN3QUB ASsVHUymXvqCyTEWBnpscnrzdzuWGEOi8u21zNlF/kSmyBNRw8wHFH5CyFFXjnxOmUdsW6 G139VpBI1CiUQc1eARZhJ/OnYYS220Fnt7+BLDX7GYNuaMVeuxwUg661MkQiRWYRsU/W+N MUO0NmUlkhpvj5FZpaq0S6YPjvAhNJYjQRJp2+NHIYzmHgGkYgm/epDmgdS7V7yKsOGftj EMwHPwkPT8pnSjS7A3cEqxeaDyYZ0KJXxV9H8FlGIo+gDWeQB5owWuSN8JBHNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746714580; a=rsa-sha256; cv=none; b=Ln+aDGHPard3vve/QpWc1Z8CnTkGbNs24cBG98+Q9fJ2PuUZv2pcSztmwaYoK0fU4PXLri bHObuV9MUk1OI+QRR3b03GRJxpjsYH17UFP/X5AAMAK8VeDI5YatahNbw7uPFue8JJStZ5 q65YgWN/wlm8I+dWVD7R3Csk26JveoylFwzbT1WVhV8QCjgcrdlJsO2xkjLu5AByxtOjmQ VXhxtrcHEAWbTOGh+Bng+G1ZndToTC/uQmz5PyYCFPuIu8+I5kbher2CKDWLKTW2ICutey 2XSx/aHh4CU9n/t3Juee/pGF6O2DAUrsB3VGm354RIxZ2vpwlnhU+efWJII/Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtZK01S1rz3p0; Thu, 08 May 2025 14:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548ETd34086520; Thu, 8 May 2025 14:29:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548ETdj2086517; Thu, 8 May 2025 14:29:39 GMT (envelope-from git) Date: Thu, 8 May 2025 14:29:39 GMT Message-Id: <202505081429.548ETdj2086517@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: a0da2f73b6ef - main - Remove remaining mentions of pr_usrreq. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a0da2f73b6ef12db95d5391d380b0b04507b4778 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a0da2f73b6ef12db95d5391d380b0b04507b4778 commit a0da2f73b6ef12db95d5391d380b0b04507b4778 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 14:28:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 14:29:15 +0000 Remove remaining mentions of pr_usrreq. When struct pr_usrreq was folded into struct protosw and the function pointers it contained were renamed from pru_* to pr_* in 2022, a number of references to the old names in comments and error messages were missed. Chase them down and fix them. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: kevans, glebius Differential Revision: https://reviews.freebsd.org/D50190 --- sys/dev/hyperv/hvsock/hv_sock.c | 2 +- sys/kern/kern_sendfile.c | 4 ++-- sys/kern/uipc_socket.c | 26 +++++++++++----------- sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c | 4 ++-- sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c | 2 +- sys/netgraph/bluetooth/socket/ng_btsocket_sco.c | 4 ++-- sys/netinet/tcp_usrreq.c | 6 ++--- sys/netinet/tcp_var.h | 9 -------- sys/netinet/toecore.c | 2 +- sys/netinet/toecore.h | 2 +- 10 files changed, 26 insertions(+), 35 deletions(-) diff --git a/sys/dev/hyperv/hvsock/hv_sock.c b/sys/dev/hyperv/hvsock/hv_sock.c index 8072765f2d5b..5a69eaa2b47b 100644 --- a/sys/dev/hyperv/hvsock/hv_sock.c +++ b/sys/dev/hyperv/hvsock/hv_sock.c @@ -1461,7 +1461,7 @@ hvsock_open_conn_passive(struct vmbus_channel *chan, struct socket *so, } /* - * Create a new socket. This will call pru_attach to complete + * Create a new socket. This will call pr_attach() to complete * the socket initialization and put the new socket onto * listening socket's sol_incomp list, waiting to be promoted * to sol_comp list. diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index cfacfe40b832..25c1f357dfd4 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -83,7 +83,7 @@ static MALLOC_DEFINE(M_SENDFILE, "sendfile", "sendfile dynamic memory"); * Every I/O completion calls sendfile_iodone(), which decrements the 'nios', * and the syscall also calls sendfile_iodone() after allocating all mbufs, * linking them and sending to socket. Whoever reaches zero 'nios' is - * responsible to * call pru_ready on the socket, to notify it of readyness + * responsible to call pr_ready() on the socket, to notify it of readyness * of the data. */ struct sf_io { @@ -353,7 +353,7 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) * Either I/O operation failed, or we failed to allocate * buffers, or we bailed out on first busy page, or we * succeeded filling the request without any I/Os. Anyway, - * pru_send hadn't been executed - nothing had been sent + * pr_send() hadn't been executed - nothing had been sent * to the socket yet. */ MPASS((curthread->td_pflags & TDP_KTHREAD) == 0); diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 03a2c532f053..d478b09ca71c 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -41,18 +41,18 @@ * sodealloc() tears down socket layer state for a socket, called only by * sofree() and sonewconn(). Socket layer private. * - * pru_attach() associates protocol layer state with an allocated socket; + * pr_attach() associates protocol layer state with an allocated socket; * called only once, may fail, aborting socket allocation. This is called * from socreate() and sonewconn(). Socket layer private. * - * pru_detach() disassociates protocol layer state from an attached socket, - * and will be called exactly once for sockets in which pru_attach() has - * been successfully called. If pru_attach() returned an error, - * pru_detach() will not be called. Socket layer private. + * pr_detach() disassociates protocol layer state from an attached socket, + * and will be called exactly once for sockets in which pr_attach() has + * been successfully called. If pr_attach() returned an error, + * pr_detach() will not be called. Socket layer private. * - * pru_abort() and pru_close() notify the protocol layer that the last + * pr_abort() and pr_close() notify the protocol layer that the last * consumer of a socket is starting to tear down the socket, and that the - * protocol should terminate the connection. Historically, pru_abort() also + * protocol should terminate the connection. Historically, pr_abort() also * detached protocol state from the socket state, but this is no longer the * case. * @@ -969,7 +969,7 @@ socreate(int dom, struct socket **aso, int type, int proto, } /* * Auto-sizing of socket buffers is managed by the protocols and - * the appropriate flags must be set in the pru_attach function. + * the appropriate flags must be set in the pr_attach() method. */ CURVNET_SET(so->so_vnet); error = prp->pr_attach(so, proto, td); @@ -1338,9 +1338,9 @@ sopeeloff(struct socket *head) __func__, head->so_pcb); return (NULL); } - if ((*so->so_proto->pr_attach)(so, 0, NULL)) { + if (so->so_proto->pr_attach(so, 0, NULL)) { sodealloc(so); - log(LOG_DEBUG, "%s: pcb %p: pru_attach() failed\n", + log(LOG_DEBUG, "%s: pcb %p: pr_attach() failed\n", __func__, head->so_pcb); return (NULL); } @@ -3826,7 +3826,7 @@ sosetopt(struct socket *so, struct sockopt *sopt) CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - error = (*so->so_proto->pr_ctloutput)(so, sopt); + error = so->so_proto->pr_ctloutput(so, sopt); } else { switch (sopt->sopt_name) { case SO_ACCEPTFILTER: @@ -4037,7 +4037,7 @@ sosetopt(struct socket *so, struct sockopt *sopt) break; } if (error == 0) - (void)(*so->so_proto->pr_ctloutput)(so, sopt); + (void)so->so_proto->pr_ctloutput(so, sopt); } bad: CURVNET_RESTORE(); @@ -4087,7 +4087,7 @@ sogetopt(struct socket *so, struct sockopt *sopt) CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - error = (*so->so_proto->pr_ctloutput)(so, sopt); + error = so->so_proto->pr_ctloutput(so, sopt); CURVNET_RESTORE(); return (error); } else { diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c index 9fc26f53e9c6..1f0c5f1b4751 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c @@ -1984,7 +1984,7 @@ ng_btsocket_l2cap_attach(struct socket *so, int proto, struct thread *td) if (so->so_type != SOCK_SEQPACKET) return (ESOCKTNOSUPPORT); -#if 0 /* XXX sonewconn() calls "pru_attach" with proto == 0 */ +#if 0 /* XXX sonewconn() calls pr_attach() with proto == 0 */ if (proto != 0) if (proto != BLUETOOTH_PROTO_L2CAP) return (EPROTONOSUPPORT); @@ -2055,7 +2055,7 @@ ng_btsocket_l2cap_attach(struct socket *so, int proto, struct thread *td) * In the second case we hold ng_btsocket_l2cap_sockets_mtx already. * So we now need to distinguish between these cases. From reading * /sys/kern/uipc_socket.c we can find out that sonewconn() calls - * pru_attach with proto == 0 and td == NULL. For now use this fact + * pr_attach() with proto == 0 and td == NULL. For now use this fact * to figure out if we were called from socket() or from sonewconn(). */ diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c index 4780227a66f1..6c0a6fda1fb1 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c @@ -384,7 +384,7 @@ ng_btsocket_rfcomm_attach(struct socket *so, int proto, struct thread *td) if (so->so_type != SOCK_STREAM) return (ESOCKTNOSUPPORT); -#if 0 /* XXX sonewconn() calls "pru_attach" with proto == 0 */ +#if 0 /* XXX sonewconn() calls pr_attach() with proto == 0 */ if (proto != 0) if (proto != BLUETOOTH_PROTO_RFCOMM) return (EPROTONOSUPPORT); diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c index 115dd6d87ec4..400ec05c87eb 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c @@ -1192,7 +1192,7 @@ ng_btsocket_sco_attach(struct socket *so, int proto, struct thread *td) if (so->so_type != SOCK_SEQPACKET) return (ESOCKTNOSUPPORT); -#if 0 /* XXX sonewconn() calls "pru_attach" with proto == 0 */ +#if 0 /* XXX sonewconn() calls pr_attach() with proto == 0 */ if (proto != 0) if (proto != BLUETOOTH_PROTO_SCO) return (EPROTONOSUPPORT); @@ -1247,7 +1247,7 @@ ng_btsocket_sco_attach(struct socket *so, int proto, struct thread *td) * In the second case we hold ng_btsocket_sco_sockets_mtx already. * So we now need to distinguish between these cases. From reading * /sys/kern/uipc_socket2.c we can find out that sonewconn() calls - * pru_attach with proto == 0 and td == NULL. For now use this fact + * pr_attach() with proto == 0 and td == NULL. For now use this fact * to figure out if we were called from socket() or from sonewconn(). */ diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index c64d25f0fa87..61ca29dc0ad2 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -146,7 +146,7 @@ tcp_bblog_pru(struct tcpcb *tp, uint32_t pru, int error) } /* - * TCP attaches to socket via pru_attach(), reserving space, + * TCP attaches to socket via pr_attach(), reserving space, * and an internet control block. */ static int @@ -907,8 +907,8 @@ out: /* * Do a send by putting data in output queue and updating urgent * marker if URG set. Possibly send more data. Unlike the other - * pru_*() routines, the mbuf chains are our responsibility. We - * must either enqueue them or free them. The other pru_* routines + * pr_*() routines, the mbuf chains are our responsibility. We + * must either enqueue them or free them. The other pr_*() routines * generally are caller-frees. */ static int diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 5be024ededc7..ddc701581f90 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -528,15 +528,6 @@ typedef enum { /* Minimum map entries limit value, if set */ #define TCP_MIN_MAP_ENTRIES_LIMIT 128 -/* - * TODO: We yet need to brave plowing in - * to tcp_input() and the pru_usrreq() block. - * Right now these go to the old standards which - * are somewhat ok, but in the long term may - * need to be changed. If we do tackle tcp_input() - * then we need to get rid of the tcp_do_segment() - * function below. - */ /* Flags for tcp functions */ #define TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ #define TCP_FUNC_OUTPUT_CANDROP 0x02 /* tfb_tcp_output may ask tcp_drop */ diff --git a/sys/netinet/toecore.c b/sys/netinet/toecore.c index 76aadad9a3b9..4203029ff7c3 100644 --- a/sys/netinet/toecore.c +++ b/sys/netinet/toecore.c @@ -525,7 +525,7 @@ toe_connect_failed(struct toedev *tod, struct inpcb *inp, int err) /* * Temporary failure during offload, take this PCB back. * Detach from the TOE driver and do the rest of what - * TCP's pru_connect would have done if the connection + * TCP's pr_connect() would have done if the connection * wasn't offloaded. */ diff --git a/sys/netinet/toecore.h b/sys/netinet/toecore.h index 612c2fe1caf5..843b261ec162 100644 --- a/sys/netinet/toecore.h +++ b/sys/netinet/toecore.h @@ -66,7 +66,7 @@ struct toedev { void (*tod_input)(struct toedev *, struct tcpcb *, struct mbuf *); /* - * This is called by the kernel during pru_rcvd for an offloaded TCP + * This is called by the kernel during pr_rcvd() for an offloaded TCP * connection and provides an opportunity for the TOE driver to manage * its rx window and credits. */ From nobody Thu May 8 14:29: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 4ZtZK14cGDz5v8SZ; Thu, 08 May 2025 14:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtZK11qbcz3HfK; Thu, 08 May 2025 14:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AjW2yHUlx/SBR7LEEko3sDa8CkwLBfCvYWMeRjxpDKY=; b=oZzNE+Rq/XqRiQ45VqgGYmrMZ/rQBQFLU6tH1FIDndNLrT6ME0UTfiL/eFW3Tt2bA0Lq+M Jrf0OLZvI4UHQFpaewuggakzWShIFPX/P1hOCQmEc1duX4ksXLo63zaTgaP42vbtbhy41r 7dYaLh0TasFgetpvEeAixTBXduglPaOaeQdNUwmg1IFJzGrZNXCaI6AOaz/0oOMwUtQrHG enMnRV2P9IXLbNu0Lk0YxttM1ALMfHu8b+P+i7ooZ729mcfo9lfcYMQ+WiCkRYLJl53/2t PCzUEFahpIAt3ah1kASM9hVuIpVZ6inqIqXb4yMFU1TdUbH4GVwMhMXqfn6iPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AjW2yHUlx/SBR7LEEko3sDa8CkwLBfCvYWMeRjxpDKY=; b=gb75vuI23K/vXRyf5genoJiFJlJ0D2gJQMusXrXj2r60waq8eaaoibgI8HHsheb05dK3RM ZzFqmxKHixT2LotJF+W08SA5uGp942l8IEV1GIGxSIGvWTC1KIHY+iAKS9HZc1pY0WD5R2 StGvozyXcm6osSk+X8EFJi5q/S4hSDO43Gk4vl3iLBcBcWEZFZRtMyl4hnupPbyiZ5Mw+u UZ6MvnJdU/xCcpjj9LaXoB+tEJTD7vIHVX3pdg/9W8z/9RFlJBz+RHVektsAulChAgwLtZ ABxsmkSxK+33Muj3dfAjFFGzI7kPhfVMxUqdLmMMDVglyvYxaOj6JJ82Dp8xBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746714581; a=rsa-sha256; cv=none; b=EnQGm/QJ/JDOIGrRBm3B3r6YNp7s2sm/tL4V7YuBAjWAiItHUJCTf83PR2FmsuVr9gGB59 aVA5mUpYnr3E6jPz63x92j2X0ip1XSxPiw9C4onBgjUqJE9z8zRSgw5QP3P8SNLS0emsK1 LNttuX+MRnn4/6J9NrEDcuso22yjos3+j8ulU7BfORZ/KQZxn3Of76t3Z2OVTEFrF5K32Y aJIsgVOwglXAd7dv49e6aLVIsQcX8XId3q9Oh53D0TboQKwEVotoZXBgg1Qciu2BM5kG7r 7+9OkuVn6H+RxPp271JLGY9ssIoWU+fSjOoArUD1fV2sgNRd8W+V1U1B61rpLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtZK11Dxkz350; Thu, 08 May 2025 14:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548ETfMi086557; Thu, 8 May 2025 14:29:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548ETf8S086554; Thu, 8 May 2025 14:29:41 GMT (envelope-from git) Date: Thu, 8 May 2025 14:29:41 GMT Message-Id: <202505081429.548ETf8S086554@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: bdc2ed1cf47c - main - fts: Drop obsolete conditionals. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: bdc2ed1cf47ccf9a03b69f467e4406a4d437234b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=bdc2ed1cf47ccf9a03b69f467e4406a4d437234b commit bdc2ed1cf47ccf9a03b69f467e4406a4d437234b Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 14:28:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 14:29:15 +0000 fts: Drop obsolete conditionals. We've never not had DT_DIR or FTS_WHITEOUT. Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D50218 --- lib/libc/gen/fts.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index d440bc24eeca..a55b4a6e2981 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -743,14 +743,10 @@ fts_build(FTS *sp, int type) * Open the directory for reading. If this fails, we're done. * If being called from fts_read, set the fts_info field. */ -#ifdef FTS_WHITEOUT if (ISSET(FTS_WHITEOUT)) oflag = DTF_NODUP; else oflag = DTF_HIDEW | DTF_NODUP; -#else -#define __opendir2(path, flag) opendir(path) -#endif if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) { if (type == BREAD) { cur->fts_info = FTS_DNR; @@ -877,10 +873,8 @@ mem1: saved_errno = errno; p->fts_parent = sp->fts_cur; p->fts_pathlen = len + dnamlen; -#ifdef FTS_WHITEOUT if (dp->d_type == DT_WHT) p->fts_flags |= FTS_ISW; -#endif if (cderrno) { if (nlinks) { @@ -889,12 +883,8 @@ mem1: saved_errno = errno; } else p->fts_info = FTS_NSOK; p->fts_accpath = cur->fts_accpath; - } else if (nlinks == 0 -#ifdef DT_DIR - || (nostat && - dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) -#endif - ) { + } else if (nlinks == 0 || (nostat && + dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)) { p->fts_accpath = ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; p->fts_info = FTS_NSOK; @@ -1003,7 +993,6 @@ fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) /* If user needs stat info, stat buffer already allocated. */ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; -#ifdef FTS_WHITEOUT /* Check for whiteout. */ if (p->fts_flags & FTS_ISW) { if (sbp != &sb) { @@ -1012,7 +1001,6 @@ fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) } return (FTS_W); } -#endif /* * If doing a logical walk, or application requested FTS_FOLLOW, do From nobody Thu May 8 14:29: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 4ZtZK26bjzz5v8w2; Thu, 08 May 2025 14:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtZK22Ylpz3HW4; Thu, 08 May 2025 14:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P+q9cRD9bCOvHuEB63z2UQHMqJe5mH6wrrwk3pS8bw8=; b=w91UmyTJ6EKYpeU+w+DtE44VRMtGMjlc7p3B9KIFWaqzbYDMPrgZ9SJRxZqC4QpKNlMgLy SrjCKJMgJzQqwsnESA74zFwxe219nWPUWz7fcVWrfPKb6+gD+dHv6KjVFk2E5YkDFWDg90 z35oKRHtag66LHMYkbl3YECPXVGrBq48ElaUwvpVC8z/bhh5/3dQ6KSOI8exSacSyb+FRU MmPr0ooLOzoAJ+RZ2Squv4hUH+nSp3nxPOumzPsvblrkbnelh5eFMMUigOn11m9+yAg/wL ZeWJMMsLGeGhuuAnQDJ6vsz6I+MwsMXIreGMKGQoap13o9AqNMDoAMorsYXU6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P+q9cRD9bCOvHuEB63z2UQHMqJe5mH6wrrwk3pS8bw8=; b=DK2HvBRhj/Qh64xJI9zMupU63ZDruzuqaoIASGVsZ+CuwT+zpeXNLhMYZAUrt4CI1I+OYH hSlUxEyIR/3ojDbw7rl+u7OYrwJMoFqnklRIYX4zM4Ee8LkZ/wCsYcNuTER7O36j4joAxi qqK9EGw0kZ59OvdB15APziwy0xoYWxaaZs84eY0vfFKSOX0Ux4omOvewJ880IM9EwSXAeb mybqgM3apVyB7Vufv2g2uItRn4VXdOWK1VhU4cNSAGvXv/rFCl0LOQQ+2wmWySr9rsBPfz 9SQVxCfSxFZZGrPofbnRpnpHayA9XACumY2Pw7NUOXNXa/2a/J8Nqjvqh8alaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746714582; a=rsa-sha256; cv=none; b=iJPHLoe6fYdVCXVdo3e8SGbvWpoJmVKEKizAJM+VGdSrtWVONnVL/98a2JE0QeebswngQp AEs1SbGUyanBpj0EG9gEUxmQckseQuaYKfPXgI7uXiWN0PZls5YNzcQCXya99CdTXBgC2E /oQR0OL+r3QS2Emtj6WKruPNZyaxG3NTWCV3Ov/rRNXRURIDD1caPMpiAdgaNqHx8Oe+r9 hu3S1ZKr6bd8MPHTriKkkAgmdZvDOmSO97qdmxIveiJZlSvnrwNgsoyFWlTl8C7liNITvS OvK7fIZ9wvnrRbwiVHhs9MfZc5EfhPx3pjYWPTlGGh0xt7u3OmJdDz2htVXncA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtZK225HVz3bp; Thu, 08 May 2025 14:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548ETgjN086594; Thu, 8 May 2025 14:29:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548ETgL7086591; Thu, 8 May 2025 14:29:42 GMT (envelope-from git) Date: Thu, 8 May 2025 14:29:42 GMT Message-Id: <202505081429.548ETgL7086591@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: da2025a0e894 - main - fts: Add FTS_COMFOLLOWDIR and FTS_NOSTAT_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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da2025a0e89455fb646b542b53d5a4ddaa2acbe0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=da2025a0e89455fb646b542b53d5a4ddaa2acbe0 commit da2025a0e89455fb646b542b53d5a4ddaa2acbe0 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 14:28:51 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 14:29:15 +0000 fts: Add FTS_COMFOLLOWDIR and FTS_NOSTAT_TYPE. MFC after: never Relnotes: yes Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D50233 --- include/fts.h | 6 +++++- lib/libc/gen/fts.3 | 22 +++++++++++++++++++++- lib/libc/gen/fts.c | 45 ++++++++++++++++++++++++++++++++++++++------- 3 files changed, 64 insertions(+), 9 deletions(-) diff --git a/include/fts.h b/include/fts.h index f2c40b854ffb..479905bda463 100644 --- a/include/fts.h +++ b/include/fts.h @@ -65,7 +65,11 @@ typedef struct { #define FTS_SEEDOT 0x000020 /* return dot and dot-dot */ #define FTS_XDEV 0x000040 /* don't cross devices */ #define FTS_WHITEOUT 0x000080 /* return whiteout information */ -#define FTS_OPTIONMASK 0x0000ff /* valid user option mask */ + /* 0x0100 is FTS_NAMEONLY below */ + /* 0x0200 was previously FTS_STOP */ +#define FTS_COMFOLLOWDIR 0x00400 /* like COMFOLLOW but directories only */ +#define FTS_NOSTAT_TYPE 0x000800 /* like NOSTAT but use d_type */ +#define FTS_OPTIONMASK 0x000cff /* valid user option mask */ /* valid only for fts_children() */ #define FTS_NAMEONLY 0x000100 /* child names only */ diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index 3007b773ec55..0c32bb0ebdb6 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 17, 2025 +.Dd May 7, 2025 .Dt FTS 3 .Os .Sh NAME @@ -394,6 +394,10 @@ This option causes any symbolic link specified as a root path to be followed immediately whether or not .Dv FTS_LOGICAL is also specified. +.It Dv FTS_COMFOLLOWDIR +This option is similar to +.Dv FTS_COMFOLLOW , +but only follows symbolic links to directories. .It Dv FTS_LOGICAL This option causes the .Nm @@ -449,6 +453,15 @@ field to and leave the contents of the .Fa statp field undefined. +.It Dv FTS_NOSTAT_TYPE +This option is similar to +.Dv FTS_NOSTAT , +but attempts to populate +.Fa fts_info +based on information from the +.Fa d_type +field of +.Vt struct dirent . .It Dv FTS_PHYSICAL This option causes the .Nm @@ -820,6 +833,13 @@ functions were introduced in principally to provide for alternative interfaces to the .Nm functionality using different data structures. +Blocks support and the +.Dv FTS_COMFOLLOWDIR +and +.Dv FTS_NOSTAT +options were added in +.Fx 15.0 +based on similar functionality in macOS. .Sh BUGS The .Fn fts_open diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index a55b4a6e2981..fa3ee9cc4c83 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -126,6 +126,10 @@ __fts_open(FTS *sp, char * const *argv) if (ISSET(FTS_LOGICAL)) SET(FTS_NOCHDIR); + /* NOSTAT_TYPE implies NOSTAT */ + if (ISSET(FTS_NOSTAT_TYPE)) + SET(FTS_NOSTAT); + /* * Start out with 1K of path space, and enough, in any case, * to hold the user's paths. @@ -149,7 +153,9 @@ __fts_open(FTS *sp, char * const *argv) p->fts_level = FTS_ROOTLEVEL; p->fts_parent = parent; p->fts_accpath = p->fts_name; - p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW), -1); + p->fts_info = fts_stat(sp, p, + ISSET(FTS_COMFOLLOWDIR) ? -1 : ISSET(FTS_COMFOLLOW), + -1); /* Command-line "." and ".." are real directories. */ if (p->fts_info == FTS_DOT) @@ -904,6 +910,25 @@ mem1: saved_errno = errno; p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) --nlinks; } + if (p->fts_info == FTS_NSOK && ISSET(FTS_NOSTAT_TYPE)) { + switch (dp->d_type) { + case DT_FIFO: + case DT_CHR: + case DT_BLK: + case DT_SOCK: + p->fts_info = FTS_DEFAULT; + break; + case DT_REG: + p->fts_info = FTS_F; + break; + case DT_LNK: + p->fts_info = FTS_SL; + break; + case DT_WHT: + p->fts_info = FTS_W; + break; + } + } /* We walk in directory order so "ls -f" doesn't get upset. */ p->fts_link = NULL; @@ -980,7 +1005,7 @@ fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) dev_t dev; ino_t ino; struct stat *sbp, sb; - int saved_errno; + int ret, saved_errno; const char *path; if (dfd == -1) { @@ -1003,19 +1028,25 @@ fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) } /* - * If doing a logical walk, or application requested FTS_FOLLOW, do - * a stat(2). If that fails, check for a non-existent symlink. If - * fail, set the errno from the stat call. + * If doing a logical walk, or caller requested FTS_COMFOLLOW, do + * a full stat(2). If that fails, do an lstat(2) to check for a + * non-existent symlink. If that fails, set the errno from the + * stat(2) call. + * + * As a special case, if stat(2) succeeded but the target is not a + * directory and follow is negative (indicating FTS_COMFOLLOWDIR + * rather than FTS_COMFOLLOW), we also revert to lstat(2). */ if (ISSET(FTS_LOGICAL) || follow) { - if (fstatat(dfd, path, sbp, 0)) { + if ((ret = fstatat(dfd, path, sbp, 0)) != 0 || + (follow < 0 && !S_ISDIR(sbp->st_mode))) { saved_errno = errno; if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { p->fts_errno = saved_errno; goto err; } errno = 0; - if (S_ISLNK(sbp->st_mode)) + if (ret != 0 && S_ISLNK(sbp->st_mode)) return (FTS_SLNONE); } } else if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { From nobody Thu May 8 14:29: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 4ZtZK40sBZz5v8Ms; Thu, 08 May 2025 14:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtZK33qXtz3HQp; Thu, 08 May 2025 14:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yaKQNCW2OoviUx6oGMwgZ/bmMY9B8qOQNQvXn5FUus=; b=oHTe9RdtzWizHoyEz3H2CFxGBQP0a6IvrgC1mOA2v1zTSHqSQmSrVwyMjPsC/EhRtAb+BK fOnfgTuOUre3BC/OiIi4+krS6UxXtRQlZtNSqWYBMTY5SMChazhLeScHDzZ0wKZwQfYlKi zqFej2ydwS76P5PXJExUNI7ghXN/+xOV9ShvCdoh5wlcYJqyoVeE2cI9lbYjp2YOD2upIe lW0omzi46N44PJT3p9D+kaM0ZGKGFYkVJuEtad0mjvKd5kQbm6wooe8kRYDfkYviUyiUJ3 L01vGcFP1Vk+pb12EsL4htlt/hWlNAqpMkb5Zpot+3ZFG1tKXfyZw0i6GJqAyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yaKQNCW2OoviUx6oGMwgZ/bmMY9B8qOQNQvXn5FUus=; b=WiTFBJ9kU1HZT2VujX85/OAO1i9xhAXN+2z8yjhqPhINp6fzt5AVk2C40IqbvbHSHgJ+Lc o+86oCvkyc1zD/EmgU3/v0SBRkuQX4ePgYD6E+Spb4Jz3uLGGotaMyHKsq9IVbPfr7XGmj Z3OBltbMt466nDgQSE8LReX9lZzoCWonnJ9B+rW5eGsIHWp/cvIY4wbF8myx8FV15LmxkW 250G2U41r4dO1+l5H7gXWGv5GFjnKxLRDcQ/qIZK9kv1FIA3gIEXyXGn39P+Bz2XQE2rQW qpWQxGHi6b8udJ+2mG2dGXaelhctHNXkhjh5fdbcSkmrOnnKacHf2/gmp5/adw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746714583; a=rsa-sha256; cv=none; b=AOYCeuW6rl5iUDSPGzbYSVRbA1FI5RBTSZ1/VhStgAQ+cO61hoHv4exzg14fO2yPbtNE0+ EEGgeU8n4GgIS3cuWB2VVR53qeiGzY9neoUSILmxlHWPOnVgoFRLWiZPVpaGKpZkYFeI5J EWDoRuAWeb8Z+z4NcOj37Bj+u+joPZnw0PJ4huRvWSLNrNGXV7Wk2m4GnJjtlLQVPrZ0oo ymS/UXzPo36ppmm3wiAh4OBwd7JSrn0NYGP+SJTz0x5xoqVwvsFlWTDW8jqx/3nCk7OTs6 VWjmTk/ihJub5j33ok3bpYc/iQ1cFnlTsz8aHSxXszx5oI9kCIoXadTDRQT7SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtZK33B4gz3pn; Thu, 08 May 2025 14:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548ETh9O086633; Thu, 8 May 2025 14:29:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548EThfh086628; Thu, 8 May 2025 14:29:43 GMT (envelope-from git) Date: Thu, 8 May 2025 14:29:43 GMT Message-Id: <202505081429.548EThfh086628@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: d2da6ed98494 - main - fts: Add tests for most FTS options. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: d2da6ed98494a66c0119b10345bb11daaa297ae3 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d2da6ed98494a66c0119b10345bb11daaa297ae3 commit d2da6ed98494a66c0119b10345bb11daaa297ae3 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 14:29:02 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 14:29:15 +0000 fts: Add tests for most FTS options. Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D50234 --- lib/libc/tests/gen/Makefile | 1 + lib/libc/tests/gen/fts_options.c | 454 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 455 insertions(+) diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index 247b44f50484..04710293c37e 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -10,6 +10,7 @@ ATF_TESTS_C+= fpclassify2_test .if ${COMPILER_FEATURES:Mblocks} ATF_TESTS_C+= fts_blocks_test .endif +ATF_TESTS_C+= fts_options ATF_TESTS_C+= ftw_test ATF_TESTS_C+= getentropy_test ATF_TESTS_C+= getmntinfo_test diff --git a/lib/libc/tests/gen/fts_options.c b/lib/libc/tests/gen/fts_options.c new file mode 100644 index 000000000000..c80474b70ac7 --- /dev/null +++ b/lib/libc/tests/gen/fts_options.c @@ -0,0 +1,454 @@ +/*- + * Copyright (c) 2025 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +struct fts_expect { + int fts_info; + const char *fts_name; + const char *fts_accpath; +}; + +struct fts_testcase { + char **paths; + int fts_options; + struct fts_expect *fts_expect; +}; + +static char *all_paths[] = { + "dir", + "dirl", + "file", + "filel", + "dead", + "noent", + NULL +}; + +/* shorter name for dead links */ +#define FTS_DL FTS_SLNONE + +/* are we being debugged? */ +static bool debug; + +/* + * Prepare the files and directories we will be inspecting. + */ +static void +fts_options_prepare(const struct atf_tc *tc) +{ + debug = !getenv("__RUNNING_INSIDE_ATF_RUN") && + isatty(STDERR_FILENO); + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + ATF_REQUIRE_EQ(0, close(creat("file", 0644))); + ATF_REQUIRE_EQ(0, close(creat("dir/file", 0644))); + ATF_REQUIRE_EQ(0, symlink("..", "dir/up")); + ATF_REQUIRE_EQ(0, symlink("dir", "dirl")); + ATF_REQUIRE_EQ(0, symlink("file", "filel")); + ATF_REQUIRE_EQ(0, symlink("noent", "dead")); +} + +/* + * Lexical order for reproducability. + */ +static int +fts_options_compar(const FTSENT * const *a, const FTSENT * const *b) +{ + return (strcmp((*a)->fts_name, (*b)->fts_name)); +} + +/* + * Run FTS with the specified paths and options and verify that it + * produces the expected result in the correct order. + */ +static void +fts_options_test(const struct atf_tc *tc, const struct fts_testcase *fts_tc) +{ + FTS *fts; + FTSENT *ftse; + const struct fts_expect *expect = fts_tc->fts_expect; + long level = 0; + + fts = fts_open(fts_tc->paths, fts_tc->fts_options, fts_options_compar); + ATF_REQUIRE_MSG(fts != NULL, "fts_open(): %m"); + while ((ftse = fts_read(fts)) != NULL && expect->fts_name != NULL) { + if (expect->fts_info == FTS_DP) + level--; + if (debug) { + fprintf(stderr, "%2ld %2d %s\n", level, + ftse->fts_info, ftse->fts_name); + } + ATF_CHECK_STREQ(expect->fts_name, ftse->fts_name); + ATF_CHECK_STREQ(expect->fts_accpath, ftse->fts_accpath); + ATF_CHECK_INTEQ(expect->fts_info, ftse->fts_info); + ATF_CHECK_INTEQ(level, ftse->fts_level); + if (expect->fts_info == FTS_D) + level++; + expect++; + } + ATF_CHECK_EQ(NULL, ftse); + ATF_CHECK_EQ(NULL, expect->fts_name); + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +ATF_TC(fts_options_logical); +ATF_TC_HEAD(fts_options_logical, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_LOGICAL"); +} +ATF_TC_BODY(fts_options_logical, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_LOGICAL, + (struct fts_expect[]){ + { FTS_DL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_F, "file", "dir/file" }, + { FTS_D, "up", "dir/up" }, + { FTS_DL, "dead", "dir/up/dead" }, + { FTS_DC, "dir", "dir/up/dir" }, + { FTS_DC, "dirl", "dir/up/dirl" }, + { FTS_F, "file", "dir/up/file" }, + { FTS_F, "filel", "dir/up/filel" }, + { FTS_DP, "up", "dir/up" }, + { FTS_DP, "dir", "dir" }, + { FTS_D, "dirl", "dirl" }, + { FTS_F, "file", "dirl/file" }, + { FTS_D, "up", "dirl/up" }, + { FTS_DL, "dead", "dirl/up/dead" }, + { FTS_DC, "dir", "dirl/up/dir" }, + { FTS_DC, "dirl", "dirl/up/dirl" }, + { FTS_F, "file", "dirl/up/file" }, + { FTS_F, "filel", "dirl/up/filel" }, + { FTS_DP, "up", "dirl/up" }, + { FTS_DP, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_F, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_logical_nostat); +ATF_TC_HEAD(fts_options_logical_nostat, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_LOGICAL | FTS_NOSTAT"); +} +ATF_TC_BODY(fts_options_logical_nostat, tc) +{ + /* + * While FTS_LOGICAL is not documented as being incompatible with + * FTS_NOSTAT, and FTS does not clear FTS_NOSTAT if FTS_LOGICAL is + * set, FTS_LOGICAL effectively nullifies FTS_NOSTAT by overriding + * the follow check in fts_stat(). In theory, FTS could easily be + * changed to only stat links (to check what they point to) in the + * FTS_LOGICAL | FTS_NOSTAT case, which would produce a different + * result here, so keep the test around in case that ever happens. + */ + atf_tc_expect_fail("FTS_LOGICAL nullifies FTS_NOSTAT"); + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_LOGICAL | FTS_NOSTAT, + (struct fts_expect[]){ + { FTS_DL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_NSOK, "file", "dir/file" }, + { FTS_D, "up", "dir/up" }, + { FTS_DL, "dead", "dir/up/dead" }, + { FTS_DC, "dir", "dir/up/dir" }, + { FTS_DC, "dirl", "dir/up/dirl" }, + { FTS_NSOK, "file", "dir/up/file" }, + { FTS_NSOK, "filel", "dir/up/filel" }, + { FTS_DP, "up", "dir/up" }, + { FTS_DP, "dir", "dir" }, + { FTS_D, "dirl", "dirl" }, + { FTS_NSOK, "file", "dirl/file" }, + { FTS_D, "up", "dirl/up" }, + { FTS_DL, "dead", "dirl/up/dead" }, + { FTS_DC, "dir", "dirl/up/dir" }, + { FTS_DC, "dirl", "dirl/up/dirl" }, + { FTS_NSOK, "file", "dirl/up/file" }, + { FTS_NSOK, "filel", "dirl/up/filel" }, + { FTS_DP, "up", "dirl/up" }, + { FTS_DP, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_F, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_logical_seedot); +ATF_TC_HEAD(fts_options_logical_seedot, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_LOGICAL | FTS_SEEDOT"); +} +ATF_TC_BODY(fts_options_logical_seedot, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_LOGICAL | FTS_SEEDOT, + (struct fts_expect[]){ + { FTS_DL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_DOT, ".", "dir/." }, + { FTS_DOT, "..", "dir/.." }, + { FTS_F, "file", "dir/file" }, + { FTS_D, "up", "dir/up" }, + { FTS_DOT, ".", "dir/up/." }, + { FTS_DOT, "..", "dir/up/.." }, + { FTS_DL, "dead", "dir/up/dead" }, + { FTS_DC, "dir", "dir/up/dir" }, + { FTS_DC, "dirl", "dir/up/dirl" }, + { FTS_F, "file", "dir/up/file" }, + { FTS_F, "filel", "dir/up/filel" }, + { FTS_DP, "up", "dir/up" }, + { FTS_DP, "dir", "dir" }, + { FTS_D, "dirl", "dirl" }, + { FTS_DOT, ".", "dirl/." }, + { FTS_DOT, "..", "dirl/.." }, + { FTS_F, "file", "dirl/file" }, + { FTS_D, "up", "dirl/up" }, + { FTS_DOT, ".", "dirl/up/." }, + { FTS_DOT, "..", "dirl/up/.." }, + { FTS_DL, "dead", "dirl/up/dead" }, + { FTS_DC, "dir", "dirl/up/dir" }, + { FTS_DC, "dirl", "dirl/up/dirl" }, + { FTS_F, "file", "dirl/up/file" }, + { FTS_F, "filel", "dirl/up/filel" }, + { FTS_DP, "up", "dirl/up" }, + { FTS_DP, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_F, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_physical); +ATF_TC_HEAD(fts_options_physical, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_PHYSICAL"); +} +ATF_TC_BODY(fts_options_physical, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_PHYSICAL, + (struct fts_expect[]){ + { FTS_SL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_F, "file", "file" }, + { FTS_SL, "up", "up" }, + { FTS_DP, "dir", "dir" }, + { FTS_SL, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_physical_nochdir); +ATF_TC_HEAD(fts_options_physical_nochdir, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_PHYSICAL | FTS_NOCHDIR"); +} +ATF_TC_BODY(fts_options_physical_nochdir, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_PHYSICAL | FTS_NOCHDIR, + (struct fts_expect[]){ + { FTS_SL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_F, "file", "dir/file" }, + { FTS_SL, "up", "dir/up" }, + { FTS_DP, "dir", "dir" }, + { FTS_SL, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_physical_comfollow); +ATF_TC_HEAD(fts_options_physical_comfollow, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_PHYSICAL | FTS_COMFOLLOW"); +} +ATF_TC_BODY(fts_options_physical_comfollow, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_PHYSICAL | FTS_COMFOLLOW, + (struct fts_expect[]){ + { FTS_DL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_F, "file", "file" }, + { FTS_SL, "up", "up" }, + { FTS_DP, "dir", "dir" }, + { FTS_D, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "up", "up" }, + { FTS_DP, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_F, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_physical_comfollowdir); +ATF_TC_HEAD(fts_options_physical_comfollowdir, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_PHYSICAL | FTS_COMFOLLOWDIR"); +} +ATF_TC_BODY(fts_options_physical_comfollowdir, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_PHYSICAL | FTS_COMFOLLOWDIR, + (struct fts_expect[]){ + { FTS_DL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_F, "file", "file" }, + { FTS_SL, "up", "up" }, + { FTS_DP, "dir", "dir" }, + { FTS_D, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "up", "up" }, + { FTS_DP, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_physical_nostat); +ATF_TC_HEAD(fts_options_physical_nostat, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_PHYSICAL | FTS_NOSTAT"); +} +ATF_TC_BODY(fts_options_physical_nostat, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_PHYSICAL | FTS_NOSTAT, + (struct fts_expect[]){ + { FTS_SL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_NSOK, "file", "file" }, + { FTS_NSOK, "up", "up" }, + { FTS_DP, "dir", "dir" }, + { FTS_SL, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_physical_nostat_type); +ATF_TC_HEAD(fts_options_physical_nostat_type, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_PHYSICAL | FTS_NOSTAT_TYPE"); +} +ATF_TC_BODY(fts_options_physical_nostat_type, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_PHYSICAL | FTS_NOSTAT_TYPE, + (struct fts_expect[]){ + { FTS_SL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_F, "file", "file" }, + { FTS_SL, "up", "up" }, + { FTS_DP, "dir", "dir" }, + { FTS_SL, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +ATF_TC(fts_options_physical_seedot); +ATF_TC_HEAD(fts_options_physical_seedot, tc) +{ + atf_tc_set_md_var(tc, "descr", "FTS_PHYSICAL | FTS_SEEDOT"); +} +ATF_TC_BODY(fts_options_physical_seedot, tc) +{ + fts_options_prepare(tc); + fts_options_test(tc, &(struct fts_testcase){ + all_paths, + FTS_PHYSICAL | FTS_SEEDOT, + (struct fts_expect[]){ + { FTS_SL, "dead", "dead" }, + { FTS_D, "dir", "dir" }, + { FTS_DOT, ".", "." }, + { FTS_DOT, "..", ".." }, + { FTS_F, "file", "file" }, + { FTS_SL, "up", "up" }, + { FTS_DP, "dir", "dir" }, + { FTS_SL, "dirl", "dirl" }, + { FTS_F, "file", "file" }, + { FTS_SL, "filel", "filel" }, + { FTS_NS, "noent", "noent" }, + { 0 } + }, + }); +} + +/* + * TODO: Add tests for FTS_XDEV and FTS_WHITEOUT + */ + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, fts_options_logical); + ATF_TP_ADD_TC(tp, fts_options_logical_nostat); + ATF_TP_ADD_TC(tp, fts_options_logical_seedot); + ATF_TP_ADD_TC(tp, fts_options_physical); + ATF_TP_ADD_TC(tp, fts_options_physical_nochdir); + ATF_TP_ADD_TC(tp, fts_options_physical_comfollow); + ATF_TP_ADD_TC(tp, fts_options_physical_comfollowdir); + ATF_TP_ADD_TC(tp, fts_options_physical_nostat); + ATF_TP_ADD_TC(tp, fts_options_physical_nostat_type); + ATF_TP_ADD_TC(tp, fts_options_physical_seedot); + return (atf_no_error()); +} From nobody Thu May 8 14:29: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 4ZtZK53G3Cz5v8w9; Thu, 08 May 2025 14:29: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtZK44VNRz3Hmg; Thu, 08 May 2025 14:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BkAdaEqkGEwe5Jdm52OY83Gx0bEsFCoe88TKADZ9L+o=; b=lrfI9knjHBN3SH4aWe1ikzlTO5PXdXrWxAodADfOtZHDeXUulJcdvTb334fqbFzM3JpGMW 1D/y/DvoPSSZDq7PfRbBmXK3l9B/xRP6MPK0Lm/9qRNUt+SgKfzcSq2zkx9wki1mu+2Zxb KAjy3+TpeVWst2UOUEptTUQhSxU9l+U+0Gr2KhxT4Sc1tMS/v6UPc5YsTa50d/9W8VkEra v6zsW8+y5BpjUlO6VqDNDRe53VVuMhYAAP0Pt7NVghi4ikVTC3xcWNVDPa67S4aoty4hx1 o7qPq2jNcT25R9Bd6r1hoj4JsUJj8isVa4LjX8nejzTraxpXyq53Pl5dcjodow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BkAdaEqkGEwe5Jdm52OY83Gx0bEsFCoe88TKADZ9L+o=; b=B4Zl6fYzHAKrrjvCMY+pCFqnqbM9FNIr3O+d2rx5BaP5ctx8oBdB/A+r19rOiQA7jKJK+4 /1pqAEdjkvhnNoQ8QEwG+DkeIq/WuciHe3lpYGVKAZWnxsAEdUuj/W4J/k6tThb2zVrnN3 vyEewpQZzCFjpqR+Xfn5zWeqzDKpJhky1yaDnuKvToJmgpR6tVdKrNXxSZZWFjmM335qsj 22kSvxBH4R8jVbwQ5GEnrSIeUM3Stmsn5ZmP2wbdkdA7KZYQUCIA6jVWTanRxNzAnFI7oL Aw2JbMD4REwgwg6YpknfP/XdR62WeIvZgPtoabuYqS+BttWQDIhGc4sQPipGaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746714584; a=rsa-sha256; cv=none; b=mI2iQmWHKrgn68Y7oxy/CFD/w7B524u7FRfd/yfSxyrdFjWUdGl6NTz2UIrtifaBid5s68 604zOektgMaCpHvMjfkFH8oCLp8aRLpssr0hW7Jt6UQIRIGgiTdZQtogOSV8RlkEXa49Qx xts1+tP8KHvCICPagcfmGb2Em5n+HcaCfl019cwqMxSRjz3rZoE9HDfrpe14y0RkF03FxQ k1KUGK8zMrlkqm/Bl1brlphpmdcFnW8pkZr3XTDVHe3i4sg2jHyOHSBm4TQxwWi1Ajta/g /dW/HsWLPLr+lplolUwhNC5jbDhGm/vSjf24IjXkZDgqVQu28kOto1pxrIqxWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtZK43ZyQz3YT; Thu, 08 May 2025 14:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548ETi1w086676; Thu, 8 May 2025 14:29:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548ETiEx086673; Thu, 8 May 2025 14:29:44 GMT (envelope-from git) Date: Thu, 8 May 2025 14:29:44 GMT Message-Id: <202505081429.548ETiEx086673@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 782a611a0ba6 - main - fts: Give the blocks test a description. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 782a611a0ba6ac4eaa3650003da9d77c04b20849 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=782a611a0ba6ac4eaa3650003da9d77c04b20849 commit 782a611a0ba6ac4eaa3650003da9d77c04b20849 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 14:29:07 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 14:29:16 +0000 fts: Give the blocks test a description. Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D50235 --- lib/libc/tests/gen/fts_blocks_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libc/tests/gen/fts_blocks_test.c b/lib/libc/tests/gen/fts_blocks_test.c index 1aec55b581d5..f020dd8dea45 100644 --- a/lib/libc/tests/gen/fts_blocks_test.c +++ b/lib/libc/tests/gen/fts_blocks_test.c @@ -19,7 +19,12 @@ * order they were created while ZFS will sort them lexicographically; in * both cases, the order we expect is the reverse. */ -ATF_TC_WITHOUT_HEAD(fts_blocks_test); +ATF_TC(fts_blocks_test); +ATF_TC_HEAD(fts_blocks_test, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test FTS with a block in lieu of a comparison function"); +} ATF_TC_BODY(fts_blocks_test, tc) { char *args[] = { From nobody Thu May 8 14:32: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 4ZtZNB1kRnz5v8yR; Thu, 08 May 2025 14:32:26 +0000 (UTC) (envelope-from phil@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtZN92GWSz3MKY; Thu, 08 May 2025 14:32:25 +0000 (UTC) (envelope-from phil@juniper.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=juniper.net header.s=PPS1017 header.b=avZFmcfP; dkim=none ("invalid DKIM record") header.d=juniper.net header.s=selector1 header.b=Tx42d7Pv; spf=pass (mx1.freebsd.org: domain of phil@juniper.net designates 67.231.152.164 as permitted sender) smtp.mailfrom=phil@juniper.net; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=juniper.net Received: from pps.filterd (m0108162.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 548ATUUZ007851; Thu, 8 May 2025 07:32:24 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=PPS1017; bh=w/P+S+3umi0xl+bneIkrFvnV52 sEcw4/1FJnhjmNi5E=; b=avZFmcfP9SbRT1ZquIYf9EIKWPlHgyWv9XU5RuN4Q/ GP2rSRhAexRArU9vjbKqh/PLZDP915p/gUbDVc0YUNIYs/Hh0bo/F3jaVVzgZtki ekHOnoHVvvu5KmiEaPw/w0cwv7zRkePUKLbsQWMI0a7Vft73qOt/PlnwE0hS3s13 GlzL5npwJIuf7VTJAMJWFpz+FbZZi2lRoHrO+TAJ2rGWvrp+2QWdQEM1MsoA69WU 0yjG2w0qMqilfEnS4tD6kDp6msvB7y7dBUqUL15mnInBLgsdAdP1d+/KFzo46mtY IpkqTlAtaT5OkXwfBCptbSgbJvII4kZSoRg4sW3M1sRQ== Received: from bn1pr04cu002.outbound.protection.outlook.com (mail-eastus2azlp17010019.outbound.protection.outlook.com [40.93.12.19]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 46gpses2v0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 May 2025 07:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NqHrtvdQQuiLP8vUhJWtnX/1yIizZ1oAi+bUlDeVTao22SAYSdjjNu3+BgQ/zqzoE041J7D5XioYRul5agy3BBiTRXTsCMvJpkIV9R67MYyiKZJLjv4qjK8u3p0piJYdw7MMs8oeILqMoZNzbRilE7Noh8exGqapryxiKPzdiMXlYU0FNtunOzpvo8nAZK9/PSdNvUuTsLeUEazVyNkEa/MeTmxR2e4ywSn4aS4Ic+Gc4xh7XG89dwtLCm6oBGyaVrq4/Os9XbnBBBbvzv+1TKF3o6s/m4JjSV4ttHb6xEpM2BZejUSlvs+PBXKp/iQjnQDG+ZmTYLeFFaVgtoxHkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=w/P+S+3umi0xl+bneIkrFvnV52sEcw4/1FJnhjmNi5E=; b=qr4PTn5CQe32NnmX2TMI/cK18ZSQpObmNzXj4f/+jC6pH0alpn3TOGHeELO98d634QEXKw89HY/av/didarWtlILwSwmLMsckPEd+9U+8WQjyZ7tDsLQu9qTvwQEXLs2inoVax29KKz9dy2/xFjRum5tMhZMJA+74XncJU+6JuZ/OGtBhC/61Vg4qKbXXCdFTu6bgjDwa5ybqq3vMJyKH4ngi/7cEfwwaLKqBKgoWykF++IzV/dGE56B4LHGYuL/+gT7KhY7rCu015zinZ/u/y0QcKWXOWdK4b3CD44jFudQYJ0PkMUyv1ui66ZV9m1w2giMaeBX9fBGq8qtGbyqFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.14) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w/P+S+3umi0xl+bneIkrFvnV52sEcw4/1FJnhjmNi5E=; b=Tx42d7PvVwEYGDqn6fvqH+blUnCd6w9D4RUrHVmigsllpO0jeHzlMYhBO1Kh/evJORy/nW9Efnl6kqlfpX2hg3YOixkTQh+mmH2JDgRnCS6OOiGDBRnmS4vv9FB9Yr1ffdZm/jLIKW+5BvLnGr5Gub09i85pVct3EGa84NKvKH8= Received: from DM5PR08CA0044.namprd08.prod.outlook.com (2603:10b6:4:60::33) by PH0PR05MB8560.namprd05.prod.outlook.com (2603:10b6:510:c7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8699.23; Thu, 8 May 2025 14:32:20 +0000 Received: from DS1PEPF00017099.namprd05.prod.outlook.com (2603:10b6:4:60:cafe::bf) by DM5PR08CA0044.outlook.office365.com (2603:10b6:4:60::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8655.42 via Frontend Transport; Thu, 8 May 2025 14:32:20 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.239.14) by DS1PEPF00017099.mail.protection.outlook.com (10.167.18.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.18 via Frontend Transport; Thu, 8 May 2025 14:32:20 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Thu, 8 May 2025 09:32:19 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14 via Frontend Transport; Thu, 8 May 2025 09:32:19 -0500 Received: from idleski.juniper.net (idleski.juniper.net [172.25.4.10]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 548EWIxh017864; Thu, 8 May 2025 07:32:19 -0700 (envelope-from phil@juniper.net) Received: from [10.0.0.3] (localhost [127.0.0.1]) by idleski.juniper.net (8.16.1/8.16.1) with ESMTP id 548BG2RR065088; Thu, 8 May 2025 07:16:02 -0400 (EDT) (envelope-from phil@juniper.net) From: Phil Shafer To: Warner Losh CC: , , Subject: Re: git: c759aca606ce - main - devinfo: Add support for libxo Date: Thu, 8 May 2025 10:32:17 -0400 X-Mailer: MailMate (1.14r5937) Message-ID: <0F9E0431-84E0-46E2-B28F-99F5A7DB70C5@juniper.net> In-Reply-To: <202505062202.546M2O1b042545@gitrepo.freebsd.org> References: <202505062202.546M2O1b042545@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 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017099:EE_|PH0PR05MB8560:EE_ X-MS-Office365-Filtering-Correlation-Id: 5aec8203-8a7a-4eeb-5876-08dd8e3d2416 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?MAzJI6JwGXZ9646oqiLSDYCmysMIYlxXKCl10v0xZJD2GElblXPogBDrjW+9?= =?us-ascii?Q?NohvS+tBZ+vfL7H+dnznPcIAKsN8CxiqVjMo/COPDQi9U8I3nEwvi6KQRFcZ?= =?us-ascii?Q?K6fT7/pYOAmsvYvHV1A3wJnPjVyg6ExSgcQEphpjasHKdc3H8b5pnz9bJed7?= =?us-ascii?Q?dAwERaF3ZJyMfAI+SLv9jjIZFYqV0s7wh3BdaIff2i0XYwWqwoU7FfzI9mf6?= =?us-ascii?Q?kGHKBf3VnSna8q+rM7g8PgAdCntIUtlYYADA4T3hpBljjIhKYf69ieGN938a?= =?us-ascii?Q?Og1NO6FVibIy7hETFSWi1tafHIZl4a65DCjmSGOotFJsnyr1RMw4lUglar00?= =?us-ascii?Q?zmkHFPiTFiXW9360rpauKk0Q5JFlArayjmVu9PFoPhKgRQsGjo4rH8LFi50B?= =?us-ascii?Q?stUD1qh1z0Ypm1v4tS4Mj/BnTAFteNVdE5MPnXdisZFNdfU5On+Ss8T83THe?= =?us-ascii?Q?BF68RJ+Cmio3NMLvNoYc9TA2yP5qSVeLS9McxCOIHwOwSQ894vUuw02maVXn?= =?us-ascii?Q?ZelXtPhPYZoHm+D+QO+SLN9H3SaARXXJgCbC+TlzF6qulucMS6czWJQk+0Zt?= =?us-ascii?Q?J29gEl3B1bzmwp+8dM5HCU6SH1M/hegWlJXTB11bWBT/ZTQaV19z1KA1hgLm?= =?us-ascii?Q?U4uqaYgF5dkf3kPi+HFJ+kXsNY96Da5vmKwTi2bLWbnUIxd8BZgPflMkYtO5?= =?us-ascii?Q?VRkB7ZfVPiY8YxYPq0azaJyG7hET2aq8b0tCKvKLkq2jczGCO6KEIsjwQlMZ?= =?us-ascii?Q?UzhX8mkG/e2sGlz0Fw0dTDCqQd56zSh/wLO0yROiSfSmU9BgUbPAHTgp9PdK?= =?us-ascii?Q?eR46bdq4lCQq9Rk4kYgwrI+mPYCIQRIOhaaUx9tv7oatexOJePIrbwxvjqaN?= =?us-ascii?Q?OAjitvs/52j8e7MLngj/TK7KhppEZ4VoRR3IHqJL4XN+qUowVY8Z5UWSycqG?= =?us-ascii?Q?T4Mxi1QP8Z+z2Zw4OgX+UYj9bcZN8LQUa3afwDbyo3m3kfN5aQtz7Dqun0C2?= =?us-ascii?Q?9BL1zDj4J/sXHgdxALoZrfy/QMYvZaRYD5G3h4URxKhDa/yWulLF360pwlbQ?= =?us-ascii?Q?s8FbRuHGLa4wqDF4fQNvNvQOYqNd1A1tVmZWrICEj6JA8J5VA4V7q6xHqiZ3?= =?us-ascii?Q?GLtWz9Yjw4xtOVxbfW6DC5gDIuzuVz7yBhMljaSdlGPt/p1LuC3AyYCkJD1J?= =?us-ascii?Q?QhDsyaRBJGO5mydhFty1mdClrXf61G1HUA+DAKdjkUvUsfAfeK0SBe7dejCI?= =?us-ascii?Q?Y6AXsqWClW2/5pzpSWQ3GEMscwnMcucjG01cE58fB3VUI42zgVqEzvS3Jexz?= =?us-ascii?Q?O6V8AaDzdo1dH814ilHBEvhTedUo2LkYBwiSayELkTQBRp6tW7PvPV58IcQH?= =?us-ascii?Q?OFJH8IfiyrXNh+0kIeB2b+IvniJrChFc/mLtbG8nFePKn4NE31i5SF5bFR8g?= =?us-ascii?Q?WNYzzkiBHEs18b7qeM/8vLYshVLpFTWTMyfc2+7s4k2hfNFBr3PzSqw6w8dI?= =?us-ascii?Q?nK109ZJN26DcYdq0rx5Zt6R4WVivw05PFTB+?= X-Forefront-Antispam-Report: CIP:66.129.239.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2025 14:32:20.5177 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5aec8203-8a7a-4eeb-5876-08dd8e3d2416 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017099.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR05MB8560 X-Proofpoint-ORIG-GUID: P0rX3HhjMwpkjJU8_1MvOmFUZv035Rln X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTA4MDEyNCBTYWx0ZWRfX+hByp2wXXHBI 8vHVwGY9yomjC3B6LFagw5zNnZfJzjJlWKi0W6jpa0OgCtqczdTHuiOBg1dnuPN0WCKQmItbWz8 aEpgRhGiaUjlLmiVHHcocWSbIZIKje1anq8o8jJRuP/2GyINJV6Zhqf6F56WwNcAkwlK2wd5GyU 6ZxuNdWDAIxHmjQChWnXq8Hn5TJhzJ1t0bjlKyvo2eDHSR5DLznR7qiclWnxpwZwnESuXmxrqJy Y/6BrctZi60BuGyQPRkrGZ32MlLBlZSCH1zeReWpS1y+8VgJarIVrXHqb3amlJCjD7u5YLPRekb LkSWd0qOkAKtoRV7gIW1Uz+L2GhtpfjLW/+cbF+gmrSWj+FEsrugu9hLvvWsCZh9fLm/Zp25qvr HZobnJF1m/jnyT2CT6tg5l5Cre8SIsnLwxt5q9hEYKdgJv5DMngzZdayCpALXF0w1OWruAHl X-Proofpoint-GUID: P0rX3HhjMwpkjJU8_1MvOmFUZv035Rln X-Authority-Analysis: v=2.4 cv=TdKWtQQh c=1 sm=1 tr=0 ts=681cc078 cx=c_pps a=b4GTUaH8bIYRMqSiyTmTYA==:117 a=f/rncuQqEjTEF/G1odkJ9w==:17 a=h8e1o3o8w34MuCiiGQrqVE4VwXA=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=dt9VzEwgFbYA:10 a=s63m1ICgrNkA:10 a=rhJc5-LppCAA:10 a=XSr2-R0Gb8Nm4hJX0XcA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-08_05,2025-05-07_02,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 clxscore=1011 adultscore=0 malwarescore=0 bulkscore=0 mlxlogscore=806 suspectscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 mlxscore=0 phishscore=0 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2505080124 X-Rspamd-Queue-Id: 4ZtZN92GWSz3MKY X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.41 / 15.00]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector10001:i=1]; NEURAL_HAM_LONG(-0.99)[-0.986]; NEURAL_HAM_MEDIUM(-0.93)[-0.927]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; NEURAL_HAM_SHORT(-0.40)[-0.399]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017]; R_SPF_ALLOW(-0.20)[+ip4:67.231.152.164]; RCVD_IN_DNSWL_LOW(-0.10)[67.231.152.164:from]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_PERMFAIL(0.00)[juniper.net:s=selector1]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; FREEFALL_USER(0.00)[phil]; RCVD_IN_DNSWL_NONE(0.00)[40.93.12.19:received]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+,juniper.net:~]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DKIM_MIXED(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; RCVD_COUNT_SEVEN(0.00)[9] On 6 May 2025, at 18:02, Warner Losh wrote: > xo_emit(" <{d:%s}>", dev->dd_desc); Missing the field name and the "/". With "--libxo:W", you should see "foo: invalid XML tag name: '%s'". Annoying, 'xolint' does not catch this. + xo_emit(" <{d:%s}>", dev->dd_desc); + xo_emit("{e:description/%s}", dev->dd_desc); I'm not sure why you need both lines here, given that: xo_emit("<{:description/%s}>", dev->dd_desc); should suffice, since the "encoding" styles will not emit the surrounding text: % cat /tmp/foo.c #include int main (int argc, char **argv) { xo_parse_args(argc, argv); xo_open_container("data"); xo_emit(" <{:description/%s}>\n", argv[0]); xo_close_container(NULL); xo_finish(); return 0; } % /tmp/foo % /tmp/foo --libxo:XPW /tmp/foo % /tmp/foo --libxo:JPW { "data": { "description": "/tmp/foo" } } % The same issue ("{d:%s}") is repeated in print_rman, etc. + if (xo_finish() < 0) { + exit(1); } return(0); Should I make a more convenient form, so one can just: return xo_finish_rc(); /* xo_finish_exit_code()? */ Thanks, Phil From nobody Thu May 8 15:05: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 4Ztb6T2bCXz5vBxw; Thu, 08 May 2025 15:05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ztb6T0lfzz3kqH; Thu, 08 May 2025 15:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746716737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0BkP7PvpmEAEW+aGiX5UZ2eaCp1mQ+3bbgz0Hl/L4DE=; b=OfTwXMy9uUayf9zwM1p1Un976RvQ4g3VSW/K7NbnBxTm2ogBwu2AJhBAjObPKFLuJ4Eg72 VhBT0PHMNW4RlshIiEMkvb87Za4sGgzI0d+OvVkcInYqsr+QgSKFDLCrV6L31vFDCXMwYf huo/3raNh0HvhRifKL1gcM7kwzXUn4JbpqYCh5dnMJvyV1n64amkULZ+bCdCOA89PTLJRf k0TR/sm5bAxB7NEyjdalX7EczF3x2XFuY/J0rjlGWP19pAuVuIO5PUKE9fZuYHpFeqwhuG M3oU0P45WpkI3T3NIcExF7l7TCyF8Unil4E0GIRmvMSJco8hiWFmlX9psVY0LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746716737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0BkP7PvpmEAEW+aGiX5UZ2eaCp1mQ+3bbgz0Hl/L4DE=; b=tXV8q0tQEVGQ4c2unHnlH9M+FViLp23u7THTnfiY/PmO254g0hWHBfwuebrL7gbUeCqscu SdMYp/wKv/XOBQhS+/W+mWgaVhm87vT4eEA+UGmyrOsKC9V5nXktfxyn4hTHiev4CLtBoq p+mFvKKC/HDOq6D9j7EgzT+HKpNAvvcwjeYsmp74mNmZQjV5DjpCCXFhUPvhrsoWoBz9mB vzH6zTp9W0I/33c7kG+BRPiZtKGHni5FUcIEnwT/JIn1Qjv/+hzvYTPiuSnwYHvqu1Tmha 9fE0fuVvq6o1MbcWWaHQgeBDa76rxdqbVm2pcOnVfEbF1IK1TvnakA8MwRIX/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746716737; a=rsa-sha256; cv=none; b=v02tDTFOsng9OVQRZVYk9IiY9GVhfvYMbRSXzCTLyR/g1Pm6zetyXavtob5+Scno9on/0t E1Fi5p95IBEboUQjJRiCF15jEqCj4xk3SKrcQEVeUQzaLIDfY3wjELgoU3Rmqm0mGSuwmN JwRsbP3PfsZNAlTUq0qZa2eMETSqfiBQ0u/D6t2t4tLry0EV++De0U+sQ1ayHnskxBH4ke 1IPC/yvx1dJWhyfw5wX6212t4MPhE3UlJFNVni37lreJV5h/tBWfNjmlBbmZFpr4xlpj2x JSd1oJSiga1Z5xofpXNdLoGj0cVVoIac25CnL5FIVh2lNeLEHDXxKRqthv5ehg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ztb6T0LM7z4pW; Thu, 08 May 2025 15:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548F5ahr060482; Thu, 8 May 2025 15:05:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548F5aLk060479; Thu, 8 May 2025 15:05:36 GMT (envelope-from git) Date: Thu, 8 May 2025 15:05:36 GMT Message-Id: <202505081505.548F5aLk060479@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: d30a84ab442e - main - fts: Rename fts_options to fts_options_test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: d30a84ab442e13ba0ed9ac3b01743e49f94dcb41 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d30a84ab442e13ba0ed9ac3b01743e49f94dcb41 commit d30a84ab442e13ba0ed9ac3b01743e49f94dcb41 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 15:05:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 15:05:12 +0000 fts: Rename fts_options to fts_options_test Sponsored by: Klara, Inc. --- lib/libc/tests/gen/Makefile | 2 +- lib/libc/tests/gen/{fts_options.c => fts_options_test.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index 04710293c37e..2aff14f078bc 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -10,7 +10,7 @@ ATF_TESTS_C+= fpclassify2_test .if ${COMPILER_FEATURES:Mblocks} ATF_TESTS_C+= fts_blocks_test .endif -ATF_TESTS_C+= fts_options +ATF_TESTS_C+= fts_options_test ATF_TESTS_C+= ftw_test ATF_TESTS_C+= getentropy_test ATF_TESTS_C+= getmntinfo_test diff --git a/lib/libc/tests/gen/fts_options.c b/lib/libc/tests/gen/fts_options_test.c similarity index 100% rename from lib/libc/tests/gen/fts_options.c rename to lib/libc/tests/gen/fts_options_test.c From nobody Thu May 8 16:03: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 4ZtcPm1j2Zz5vH0r; Thu, 08 May 2025 16:03: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtcPm12g2z4LRx; Thu, 08 May 2025 16:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PHaORFo23TnfH11Y2A7LAEb3v8kOWYYkFlz+FpdohPc=; b=ar1pS29gzAzga8wQX8EU/c1uOv4Flr8QAOQNLM5b0OmiY4abfQU5HDxUg+Z7xWxcmEskx4 HD/383lzXh7ZatdyTxH2qeC6Foz6jeGgUoTDFefL40WpqWEY1V5K2FCli7odAZliK5GBfD UDxiq9iAIkDdDyxZ4/ekSd0qGiJfyvSLLIzyYQS2O6VVXjrujfmo6KmQXIBrYqPMFNKfuz wnFEVqc53pTrFe5LPxHPdnh/8WIS0IQH2jqSzFeioNzLLpezWiSNEi+abWFBHy0X7Vydne 0XkAh+yGsG+2szx2Jw+ajFJKEts5CRghW3kK+6r4T43YJQ9CwHpPvecLCQPe1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PHaORFo23TnfH11Y2A7LAEb3v8kOWYYkFlz+FpdohPc=; b=yCdUB4bm+T3S2xsmufUcYUQDySt4KlnVuJ0eCtYEM1qoE2N3EmjaByPJ9iPhm4y9TZu0I/ 3B7LsTUrjs3rJYc6OtzHg0nEmFyVs+TxIV2n6ZyQhsq6XmoYXrz/AQihjutHnu7h6hPneG bXBqqstXdyuFjbE66FoM7gQfD6OJ9P2pdAvP19E9wvYW4FwH6cLiAqLfcgcflCna6bY46u G2CiKCWh2+Hbl9iYgOMaOtqywyXxQATKzDNJJ72badjxcMQ9E2iAOgflKA2vFpLOWKx6ow u7rRfRsRkUxVh41cLtKrJsUXVVnNPcme/DOTThAaGEhRLUbATnN2bX07zyKyUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746720236; a=rsa-sha256; cv=none; b=rds+87JVg5r4xKHDum4z17gbAd3JQm96GBXmukTqi+jPVRPJtyhAm+FB+TRw3xcoYmNWh3 RKdWjFMQRHbPOJLLw5xmK4UgH1KuNmDfnykOiOBUBq9mIqRxMIeRPZ57GGC7e5FxrAUOYM btAZFIb4b1T9IlZ9DIfQj1VTPQ9m5uSNUoKLyIj/xl8rdOOsVLalgJI9TyBRTdOf5NquqU lfuMlxW+lLI9GSYHfkzXEwGn504m1lmi6Y1r4KRjrCnrm4dWqpMPmImhY0M9agLzDDaq/X v5lZBi+Gy5j0LIg9HLyzB+pjAOkiHH41C5JG2NWFQCtlvAb6sDn/QLhAdGeamw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtcPm0SCDz5cy; Thu, 08 May 2025 16:03:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548G3tq0073356; Thu, 8 May 2025 16:03:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548G3t6u073353; Thu, 8 May 2025 16:03:55 GMT (envelope-from git) Date: Thu, 8 May 2025 16:03:55 GMT Message-Id: <202505081603.548G3t6u073353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 764ccf410c3c - main - makefs: Ensure that FFS superblocks are reproducible List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 764ccf410c3c5453c4656113d75cd81fcf01828d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=764ccf410c3c5453c4656113d75cd81fcf01828d commit 764ccf410c3c5453c4656113d75cd81fcf01828d Author: Mark Johnston AuthorDate: 2025-05-08 15:49:53 +0000 Commit: Mark Johnston CommitDate: 2025-05-08 15:49:53 +0000 makefs: Ensure that FFS superblocks are reproducible The superblock structure has space reserved for a pointer to an in-memory structure that gets created at mount time. makefs populates it since that simplifies code elsewhere. However, the pointer value ends up in the output file, which breaks reproducibility. Zero the field when writing the superblock instead, as its on-disk value is ignored. Reviewed by: emaste MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50196 --- usr.sbin/makefs/ffs/mkfs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c index b2f752102a69..81e3da5725c8 100644 --- a/usr.sbin/makefs/ffs/mkfs.c +++ b/usr.sbin/makefs/ffs/mkfs.c @@ -579,13 +579,21 @@ ffs_write_superblock(struct fs *fs, const fsinfo_t *fsopts) { int size, blks, i, saveflag; uint32_t cylno; - void *space; + void *info, *space; char *wrbuf; saveflag = fs->fs_flags & FS_INTERNAL; fs->fs_flags &= ~FS_INTERNAL; - memcpy(writebuf, &sblock, sbsize); + /* + * Write out the superblock. Blank out the summary info field, as it's + * a random pointer that would make the resulting image unreproducible. + */ + info = fs->fs_si; + fs->fs_si = NULL; + memcpy(writebuf, fs, sbsize); + fs->fs_si = info; + if (fsopts->needswap) ffs_sb_swap(fs, (struct fs*)writebuf); ffs_wtfs(fs->fs_sblockloc / sectorsize, sbsize, writebuf, fsopts); From nobody Thu May 8 16:03: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 4ZtcPn2vNqz5vGQZ; Thu, 08 May 2025 16:03: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtcPn27f5z4Lcf; Thu, 08 May 2025 16:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rw/R9hkHtUIFczBDKPTOtfhOkcQKtFWfFeA35l9e18=; b=RLGz/F+/Oa+aj6Eg8kQXMyUouayNFVskxMBTMamKyLE/K6HCbO7TTfl0Bg8vYYmKNkg9TK gTzxF317p/L/MuVuFSEBsrFwcKoAIlKtISam4UlBqZzXhMZgUKTYFX8XiArbSlcmfxcaMs uZei5dKy+LnModQj4qJ7E9stEmEUnCD0FtAC1MSv4ecgjFHEHpVT+Yr/5Ip1Ex4LwYSM7E SPe8m0s+IJO2LXEHfohkF5bopojRSlxeKNQEEAKEcpntuQIEcDo2dP87q7hslTh2jrDzBx ftNiLsQojT/WHcrqTiLYVjhKtysSZpAp8uuUoqGwcHcNe7VAWS41zoILIIW0TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+rw/R9hkHtUIFczBDKPTOtfhOkcQKtFWfFeA35l9e18=; b=S/+9xVyVwdwhFQCMx8x5Jo67UmY78pDTi01HO6wvqWAuh7xX+JraF+BC1Llp8qjc0gC93m JYH3wMxFWndpsi38Wz4vDlBR/46IuCS46dGLeQ7ntRPQfbCgpar9IjwtIwpWJpN6nAZ0sL hkNC+InotixcvRWa+AA0TNOxD2wsrQo3YELTdVBKAyZaF6YW5WpvOr8K1cZwa340LVTVSC UFAIbf5NBp6273aJUFyMbToYpyIyOwU4et0dbLisblpRmCeiYaQRmChiwKz/iD3jNU2MTa Uaih2nQU11vGgUMBHiQgjtyw1qgnzxYO8kFcu/6C5RJ1vlRs37G78cRxfnOnFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746720237; a=rsa-sha256; cv=none; b=kDNmqfT1ebL590jbrvGKzdzAeU8E/nWQ3uTjDeliiPwdXYdHKRMVoYPdGzAjozrkgBabyn D7PIwx4UQdVhU8TTMn9HwBUUIVmAO4yS3sq3ciuoRtZnweSRp+7ub2VSVzVHtfgwtnxcoo Wu+vjgDMzDsABSYnnJWDbWwhwqYmdrtYE8A613t91+y0QyMa2mlj0Z7E3JgDo1UXSYxYhj F9jUOEq4/qjJFHu3G+CV8DRpbJ2XESc+eOFnmBbP2AsqcPg0RYBNjouV3XiucVi+n8i32Q meq+fyEa4bCk2vtqpkD/ILAfFseCvgPT8/9mwPjx7f4lyq+RPep0Ss75UQwSMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtcPn1CSXz5vZ; Thu, 08 May 2025 16:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548G3vRh073393; Thu, 8 May 2025 16:03:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548G3v5u073390; Thu, 8 May 2025 16:03:57 GMT (envelope-from git) Date: Thu, 8 May 2025 16:03:57 GMT Message-Id: <202505081603.548G3v5u073390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 31c3ef95ec43 - main - makefs: Make sure that directory entry order is consistent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 31c3ef95ec430d130363a664e96135eb7abebd7b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=31c3ef95ec430d130363a664e96135eb7abebd7b commit 31c3ef95ec430d130363a664e96135eb7abebd7b Author: Mark Johnston AuthorDate: 2025-05-08 15:50:23 +0000 Commit: Mark Johnston CommitDate: 2025-05-08 15:50:23 +0000 makefs: Make sure that directory entry order is consistent When walking a directory hierarchy (as opposed to reading an mtree), makefs builds up a tree of file nodes. Within a directory, the order of the sibling nodes is determined by the order they're returned by readdir(), which isn't very reproducible (e.g., depends on filesystem, build parallelism). Add a routine which sorts entries within a directory after its contents have been read. This is a bit more expensive, but I wasn't able to measure a significant runtime cost (and I don't think makefs has been optimized very much to begin with), and we avoid this cost in mtree mode anyway. This fixes some sources of reproducibility problems. In mtree mode, for now we let the ordering of METALOG entries determine the ordering in the fsnode tree. It might be worth sorting these too, since with parallel installworld they won't have a consistent ordering, and single-threaded installworld is pretty slow. Reviewed by: emaste MFC after: 1 month Sponsored by: Klara, Inc. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50197 --- usr.sbin/makefs/makefs.c | 8 +++++ usr.sbin/makefs/walk.c | 83 ++++++++++++++++++++++++++++++------------------ 2 files changed, 60 insertions(+), 31 deletions(-) diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c index 7646c1c0f6be..d85b9c2668e7 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,13 @@ main(int argc, char *argv[]) setprogname(argv[0]); + /* + * Set the locale for collation, so that directory entry sorting is + * consistent. + */ + if (setlocale(LC_COLLATE, "C") == NULL) + err(1, "setlocale"); + debug = 0; if ((fstype = get_fstype(DEFAULT_FSTYPE)) == NULL) errx(1, "Unknown default fs type `%s'.", DEFAULT_FSTYPE); diff --git a/usr.sbin/makefs/walk.c b/usr.sbin/makefs/walk.c index b2afa9e78094..dc03a16cf2c6 100644 --- a/usr.sbin/makefs/walk.c +++ b/usr.sbin/makefs/walk.c @@ -59,6 +59,50 @@ static void apply_specentry(const char *, NODE *, fsnode *); static fsnode *create_fsnode(const char *, const char *, const char *, struct stat *); +static int +cmp(const void *_a, const void *_b) +{ + const fsnode * const *a = _a; + const fsnode * const *b = _b; + + assert(strcmp((*a)->name, (*b)->name) != 0); + if (strcmp((*a)->name, ".") == 0) + return (-1); + if (strcmp((*b)->name, ".") == 0) + return (1); + return (strcoll((*a)->name, (*b)->name)); +} + +/* + * Sort the entries rather than relying on the order given by readdir(3), + * which might not be reproducible. + */ +static fsnode * +sort_dir(fsnode *list) +{ + fsnode **array; + fsnode *cur; + size_t nitems, i; + + nitems = 0; + for (cur = list; cur != NULL; cur = cur->next) + nitems++; + assert(nitems > 0); + + array = malloc(nitems * sizeof(fsnode *)); + if (array == NULL) + err(1, "malloc"); + for (i = 0, cur = list; cur != NULL; i++, cur = cur->next) + array[i] = cur; + qsort(array, nitems, sizeof(fsnode *), cmp); + for (i = 0; i < nitems; i++) { + array[i]->first = array[0]; + array[i]->next = i == nitems - 1 ? NULL : array[i + 1]; + } + cur = array[0]; + free(array); + return (cur); +} /* * walk_dir -- @@ -71,7 +115,7 @@ static fsnode *create_fsnode(const char *, const char *, const char *, fsnode * walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) { - fsnode *first, *cur, *prev, *last; + fsnode *first, *cur; DIR *dirp; struct dirent *dent; char path[MAXPATHLEN + 1]; @@ -95,10 +139,8 @@ walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) first = cur = join; while (cur->next != NULL) cur = cur->next; - prev = cur; } else - first = prev = NULL; - last = prev; + first = NULL; while ((dent = readdir(dirp)) != NULL) { name = dent->d_name; dot = 0; @@ -136,10 +178,6 @@ walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) for (;;) { if (cur == NULL || strcmp(cur->name, name) == 0) break; - if (cur == last) { - cur = NULL; - break; - } cur = cur->next; } if (cur != NULL) { @@ -160,24 +198,11 @@ walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) cur = create_fsnode(root, dir, name, &stbuf); cur->parent = parent; - if (dot) { - /* ensure "." is at the start of the list */ - cur->next = first; - first = cur; - if (! prev) - prev = cur; - cur->first = first; - } else { /* not "." */ - if (prev) - prev->next = cur; - prev = cur; - if (!first) - first = cur; - cur->first = first; - if (S_ISDIR(cur->type)) { - cur->child = walk_dir(root, rp, cur, NULL); - continue; - } + cur->next = first; + first = cur; + if (!dot && S_ISDIR(cur->type)) { + cur->child = walk_dir(root, rp, cur, NULL); + continue; } if (stbuf.st_nlink > 1) { fsinode *curino; @@ -204,13 +229,9 @@ walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) cur->symlink = estrdup(slink); } } - assert(first != NULL); - if (join == NULL) - for (cur = first->next; cur != NULL; cur = cur->next) - cur->first = first; if (closedir(dirp) == -1) err(1, "Can't closedir `%s/%s'", root, dir); - return (first); + return (sort_dir(first)); } static fsnode * From nobody Thu May 8 16:03: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 4ZtcPp6STjz5vGhr; Thu, 08 May 2025 16:03: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtcPp325cz4LMX; Thu, 08 May 2025 16:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+pakaQb3+SU1ycP2B0Ovnakj3kL/6gAv3qEunqrqMww=; b=m10OsP0rx0P5AqtO0iDdLuUTdfTmro/nRm56X4dLw03i/lawNx5LMHAjljJIKadDAMv5/G M8rb9Ar/bFrVcjZws5NzzuQmnLKlffNec0BTeYwOXKbIoo1lbq9EuVK0DuA6DIYfXY5Ulh pVUlXXXKve77oMDDAilf+uUX91aQc2A88OphBel0FqGXxMmoPcGcu96FsHu1UeA6dZ1jrP nZtE31VuBs5n8ZAWnty565BjGptoOZ3GqagakJjOWaROkoGCgRmzgSVPb8GUJXh98Lz5K2 N7Drk3XdO1xjhLDmWypXymiGiUn6rALBezv9nJABIVg5FDoNX34SXAJzov3Zmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+pakaQb3+SU1ycP2B0Ovnakj3kL/6gAv3qEunqrqMww=; b=pCYaOn/b1lA94A/eM0soTU/SqfC9azuJyCMei7y0jqg1W1QTdXOCQHQsWyTU8Uigc9vb0u HkswwEec6nYm6ZBYbDCfQBjYzvCx0cWaEefilNhkMt4/i+jP5moNz9zYYGnmuZreAGhco6 2G3H4UH8Bi1HxY/kRPgukg+ufgzWEwjaxKTNTlOYWuiBwc3yqCjl9My8QWZxbG4Ls7w1Hk HisuNoHm2cC66ffZxj88RLDd9FLI+yHfBqhSxz5EOqd7EBqDVVQQ8YgjTYeHIpf15wenTS EzyuUoM32x6rRTAxwXxDU23U1zTa1lOaiSKgBDT8sChSgggZgxFFi6Y+hV93SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746720238; a=rsa-sha256; cv=none; b=PejZ3p67L9CKAgj6j2GM+OYmCNyuI0KWk8zH+1CSfVb7SAngiH8qNxdCcCXeBECfD40YOa POFuBnqJsE+p8O5P2mUTKTpZ8YuZikDgkxboi2b9VIIK6NvYd4DPwHXXDUkpAvDxXk+geX bmS5RPNYvVvN9nvG+uVE13oipOAPnbx+DPJqXCigwkd9/o4aEiQ4gbo2VYhXPcmFsyJu9d LVHioKBCFqPrNQez6pEAraY1d+oB+0U/kCBJu18B/Y08QTXJzQhaDBONwEVvquTVkhsctm UeAsVh8Z2wLn9rUi8fDKE9bAMqqvkfFxG37KTzvbXvTzQT+IY73GZIwXIQpZtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtcPp2XXWz64P; Thu, 08 May 2025 16:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548G3wFp073427; Thu, 8 May 2025 16:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548G3wwR073424; Thu, 8 May 2025 16:03:58 GMT (envelope-from git) Date: Thu, 8 May 2025 16:03:58 GMT Message-Id: <202505081603.548G3wwR073424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 018493d32ac2 - main - makefs: Use gmtime() instead of localtime for timestamps List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 018493d32ac2a637bfb9196bc80ecff89789b808 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=018493d32ac2a637bfb9196bc80ecff89789b808 commit 018493d32ac2a637bfb9196bc80ecff89789b808 Author: Mark Johnston AuthorDate: 2025-05-08 15:51:26 +0000 Commit: Mark Johnston CommitDate: 2025-05-08 15:52:49 +0000 makefs: Use gmtime() instead of localtime for timestamps Otherwise the output file's contents will depend on the configured time zone. Reviewed by: emaste MFC after: 1 month Sponsored by: Klara, Inc. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50198 --- usr.sbin/makefs/msdos/msdosfs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index e07f837187fb..441af0cae86a 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -113,7 +113,7 @@ unix2fattime(const struct timespec *tsp, uint16_t *ddp, uint16_t *dtp) struct tm lt = {0}; t1 = tsp->tv_sec; - localtime_r(&t1, <); + gmtime_r(&t1, <); unsigned long fat_time = ((lt.tm_year - 80) << 25) | ((lt.tm_mon + 1) << 21) | From nobody Thu May 8 16:06: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 4ZtcT06pRGz5vGjl; Thu, 08 May 2025 16:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtcT05KHvz4MdL; Thu, 08 May 2025 16:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3RgoYXESZ6JhTQmxJk25c0ZAZ04itbILOqCS0WGYnaw=; b=Lqaw2ON2Tbfx6IMk+w6bih5CJmx8We6b6jz6rSGIpEeSpD3iemX7WHKFPq8GCzTjjubxUK t1WTgY/T3mVT0gVYK/OeEnTzX+dg4tbwzv+cpv5cz8i3VDe6daE6KUL1tcL/WGXjhhxGpm SvE2zEEdnOrwHRv3uPTLSx76OvU9mW9/jSC4zZX/cv+6j8Jz4uoQsud5Do9mqkcfm/ZPZW ptW02VyRcWSnPwohlGIa33ftiIdnacaltIOsaZ3M44LNUABkQ4QTG0yIuMdZ5l75kSXAXv MtnZSOj5jYvqPC0eJnd9Vov5y6fwa0Fg3MQvlvzU8H80rj6dxPIvLJy0AB0UhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746720404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3RgoYXESZ6JhTQmxJk25c0ZAZ04itbILOqCS0WGYnaw=; b=JpB/hSHoPh3SNAaVXj/vn1DLuvsW0zq8AEfAmnSSSgm77uPvN2QaVvr0hbbV7dRz+JKq39 NrCKMQTJ0g0YV6/1j04vnem9R37S5VdVraLqaQFAyoZOOG/salIJMkCEwE7P9SLabgqL5G uHlE9Xa545DHyyPSEJJCe/LOBhLs29MAKpY4Gt4SBnE5nTrnidOg/Gon4otSG+iHwaQdMC E+7Gd/LRf7jV4bXZjYg8XU1VawdeY1qreKD+cKHtXtOzEIZOvIA3Pk53hiU+macHdJpgPO Zi4u7OBOa4uE41/PuK8kbnUB2zAlH5fnlPF8HXO+g4EEZapVD8PrOOqyMfZUtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746720404; a=rsa-sha256; cv=none; b=S1C8QXzQiVqsP39sKj+RDvmr63HXkX6UsnJzgu1S5FhxTKsjTAZxrO++7cRUCmPJ5zkXXt ngqH226olntkJzUeg9qwQ+xAM5Mn7Mj49hqakggIm8NRHJ4CuFXc0A3XlaFjU2RZDICA1A FQXI/vL6pzcmUH4Vjk/VmI09pmZaYPHsQHJzu38GUapDjdMLdCzCbbPUA6oWG01XlX6FIZ 34wAWH2kJEVb9h2R+XgqFYou3uACTNkipzm2Ij1SgKGOVM2vIRg9/xGSgqomCL/Je8ZSZ6 CCluVt9JrPtPWCht4uyuENU9rD2QjtWLDuFK+7vBOVY+wZ7SGspMRQH+F4MG4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtcT04tw6z5d1; Thu, 08 May 2025 16:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548G6iNF074383; Thu, 8 May 2025 16:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548G6iZH074380; Thu, 8 May 2025 16:06:44 GMT (envelope-from git) Date: Thu, 8 May 2025 16:06:44 GMT Message-Id: <202505081606.548G6iZH074380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 977b2faf6328 - main - xen: Add support for platform device with id 5853:0002 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 977b2faf6328ce18f019c399929809177b9fc672 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=977b2faf6328ce18f019c399929809177b9fc672 commit 977b2faf6328ce18f019c399929809177b9fc672 Author: Frediano Ziglio AuthorDate: 2025-04-02 13:04:32 +0000 Commit: Roger Pau Monné CommitDate: 2025-05-08 16:06:27 +0000 xen: Add support for platform device with id 5853:0002 According to https://xenbits.xen.org/docs/unstable/man/xen-pci-device-reservations.7.html the Xen Platform Device can either be 5853:0001 or 5853:0002. Currently kernel only recognises 5853:0001. Add detection for 5853:0002. Tested with XenServer and different machine templates. Reviewed by: royger --- sys/dev/xen/xenpci/xenpci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/xen/xenpci/xenpci.c b/sys/dev/xen/xenpci/xenpci.c index b7a810bf9e15..9fc0a4102f66 100644 --- a/sys/dev/xen/xenpci/xenpci.c +++ b/sys/dev/xen/xenpci/xenpci.c @@ -127,8 +127,9 @@ errexit: static int xenpci_probe(device_t dev) { + uint32_t device_id = pci_get_devid(dev); - if (pci_get_devid(dev) != 0x00015853) + if (device_id != 0x00015853 && device_id != 0x00025853) return (ENXIO); device_set_desc(dev, "Xen Platform Device"); From nobody Thu May 8 16:46: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 4ZtdLx6dpyz5vK7L; Thu, 08 May 2025 16:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtdLx6BDLz3bkB; Thu, 08 May 2025 16:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746722793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vTFTNGz/cbtxiUFaQxhB3RFARF7tyTUV+2w8s5m4X2o=; b=GPOKWXwyztK5/7cp7VpAN0fRLPYHgdez/FmM19E4o2WF7jLc9xQc0DIIO4pFH/XIILRULT Je/pheJ2weyhlemd3WobdCtVNXqf0r06QEk+0Pi5N6on0pBtvkUnrPoj9+WZnA7oraMQ5V 4booSVVZMD+kYPnSMF2knw8s+xelnqOBS9wwOqbewhQjhfluyCJoi71iBiiszje5b1VL34 j4QtMudkTqgsdTLlsA+SkaZ1TwdqJJkgM8qP6dndLkWRbMsaNyQJX7JKP4lJaci48+j43G p3k25gMOSlY08eeUEjpzzgQ8OMkdn3INlTnCOY925w2/de0QjLM9+W9yti7EFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746722793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vTFTNGz/cbtxiUFaQxhB3RFARF7tyTUV+2w8s5m4X2o=; b=WUnMja2BExocxyUKdaLGPEvK6mCiSkOycKW3iMrYowHWQHe7AVuVAfVcSW+N/cgWks98zx bwdsn6Z7b1VpPHMVzWqQJPwRWePyolxQKSn6jkS7wGsaqj/rSM/Sug6scU5/ottr+vb9iP hCxlv7afwwJN0HSsMWGh04n4xJNcCwL61M0ww4tUjoF9RW5Xq2F2mrBq64YfkpO8sZZC54 Ti7DG3+3lgzJeptcqLE28S4p0lXZcnrPxoz1CQFIfunazwY8ff0ihgFg1zpIEMVgsRxSy4 t0ENCmjIe4DgWuy6skF852Cs7Rql1zhCjpGkGmTzyvp9f9f/EtIQlVmMP57u4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746722793; a=rsa-sha256; cv=none; b=QuXBt19wR7W+ke8KQOuvas43hK78pb8vCVeDLj3eYBGKGJxzKMuiIIyI4oFFalJn2fvmnA cdcD10bxbNzCRJnD5Tk2rpCwayIx41hiTFzTKsXbOONS0h34fSHUu2pgdHPfT1mkbSLTB4 RL9TM6W+BZAgSYjXbO1Hnpvp3psmX3754z3zvuNY0zuVVKpvzrAofjGmWFBJeC4S0StlQ4 br/J3NkExr4+BIVG6dttAM7ypVXhkcjfpUyj7Ya2fhb9npvrrcVg34rDRnHNRsBKrsgALi 1qk5D+vGyKPXi0HjCkNCMYFuoQ29EnilZVk+kpKLs0LoPyFhTMdtluubsyisrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtdLx5L92z76q; Thu, 08 May 2025 16:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548GkXr8048957; Thu, 8 May 2025 16:46:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548GkXeA048954; Thu, 8 May 2025 16:46:33 GMT (envelope-from git) Date: Thu, 8 May 2025 16:46:33 GMT Message-Id: <202505081646.548GkXeA048954@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b064317fa8de - main - release/pkg-stage: Support non-release artifact 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b064317fa8deb46d5b63bb52375f349fc4d7d5f5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b064317fa8deb46d5b63bb52375f349fc4d7d5f5 commit b064317fa8deb46d5b63bb52375f349fc4d7d5f5 Author: Ed Maste AuthorDate: 2025-05-05 19:26:01 +0000 Commit: Ed Maste CommitDate: 2025-05-08 16:46:24 +0000 release/pkg-stage: Support non-release artifact builds Add -N flag to invoke pkg commands with INSTALL_AS_USER mode, and add package repo contents to METALOG. Reviewed by: bapt, brooks PR: 283387 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50173 --- release/scripts/pkg-stage.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index fc74f8e6c0c6..ba6edf2eee07 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -4,12 +4,13 @@ set -e +unset NO_ROOT + export ASSUME_ALWAYS_YES="YES" export PKG_DBDIR="/tmp/pkg" export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export ROOTDIR="$PWD/dvd" -export PKGCMD="/usr/sbin/pkg -d --rootdir ${ROOTDIR}" export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES=" @@ -45,6 +46,25 @@ if [ ! -f ${PORTSDIR}/Makefile ]; then exit 0 fi +usage() +{ + echo "usage: $0 [-N]" + exit 0 +} + +while getopts N opt; do + case "$opt" in + N) NO_ROOT=1 ;; + *) usage ;; + esac +done + +PKG_ARGS="-d --rootdir ${ROOTDIR}" +if [ $NO_ROOT ]; then + PKG_ARGS="$PKG_ARGS -o INSTALL_AS_USER=1" +fi +PKGCMD="/usr/sbin/pkg ${PKG_ARGS}" + if [ ! -x /usr/local/sbin/pkg ]; then /etc/rc.d/ldconfig restart /usr/bin/make -C ${PORTSDIR}/ports-mgmt/pkg install clean @@ -91,5 +111,10 @@ ln -s ../All/$(${PKGCMD} rquery %n-%v pkg).pkg ${LATEST_DIR}/pkg.pkg ${PKGCMD} repo ${PKG_REPODIR} +if [ $NO_ROOT ]; then + mtree -c -p $ROOTDIR | mtree -C -k type,mode,link,size | \ + grep '^./packages/' >> $ROOTDIR/METALOG +fi + # Always exit '0', even if pkg(8) complains about conflicts. exit 0 From nobody Thu May 8 18:02: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 4Ztg290g2Pz5vPgX; Thu, 08 May 2025 18:02: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ztg2874pmz3dFs; Thu, 08 May 2025 18:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746727329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EpRgzbzUyIvkbr65kChvJA48rD7A5hzJOUS0MqeqdUw=; b=jgPEt2zG3eKLKd/OQLOv4gyYDQKLsfK+zivJ8wTdAaXUux7b1+5JzE2yvLolddy0f9o8LN 0HGX9QVpNXFs0PvQcsVxJr/Xagpc9untL2TtuPCd1eBTd+kdzTHGI18gR7fRc1wDSUhKl5 35qziY3Wgu6B/dz4QOkVUnVpwwjxN/NHuVj9S2KeghREiBE+AVmq6OH3w+Itepa4wg8Jk1 YqKoOfHgKsCUNJv2GUHQ2NKVJysYOcjCPm+m7e8haJVxMddiNWuln58iHhWLwWff5E7ALu 7CKIuBFUPkPAyq/hzE9uOS7chlEZGXxoi7q5ECR5oYTda73QsbgbOdZ2/948Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746727329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EpRgzbzUyIvkbr65kChvJA48rD7A5hzJOUS0MqeqdUw=; b=bdwh3CkmsPi2GElJr4nXNk7n4/rkMlUl6ZNqAWuZPDBArq2rUUlszh6hc5eCtLI+8K4ZGa a7kkNIPM515NVYPxaiMFhSm+TiVqyyOJVbkuOCGqysK99qLMBRkEcaTRzqY8oFyj4P1KCc z4lQR6/ZUS8tppnxSu8d/8H3f3/AYeMtNYDsn+TyvsMHqJI4+z3jNoiVbcmJcWLya5D6Y3 027n0YRE9Ih6DUv3+lksPlUkTIWnm9OCZrdgZ3WiuQb1dlCi3LxM1OSM7dKsbOBxfyzQk7 5FAdaGk8nYLP5g/Mach2+H7IyM2GqlNhE7N6WX/dNZ/Pea1pEmZZ/8sxp+VypQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746727329; a=rsa-sha256; cv=none; b=dV1osu2290k9ktIxSo8qbbS8aFfFtZCSrJ5XtspD435rTEvE6OVdVZCsXAUFa3Ud4tBO4X AUgczUW7FR00WJ/7gOMuEgawVsFrqJ1xMUD4elsJTjX7MUn0HYiXhf/yNx+STuRFBOtUp+ 2cCyICYjYtWIm6pIA90ay87tUvJVJmmTCP9oJigucvyJ452zytfcbFVKWBcEC78PBH/UeB V0jeiO/Xd40R5LguMDw5Ik7lhVlln+dIUKhCOsI22DZBEz0ygxy5M8r5DEG2i1YcGGqqMQ HWOIsrF9z/DowhuH/by72NIf9Tyxa2aWq1g59KvDSgbBl+D47dkuW5dVslI48Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ztg286fQrz9RM; Thu, 08 May 2025 18:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548I28cs098024; Thu, 8 May 2025 18:02:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548I28a8098021; Thu, 8 May 2025 18:02:08 GMT (envelope-from git) Date: Thu, 8 May 2025 18:02:08 GMT Message-Id: <202505081802.548I28a8098021@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 08f613e1d142 - main - fts: Fix misindented 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08f613e1d142b7c4b00d71b226d334b8b69eaa94 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=08f613e1d142b7c4b00d71b226d334b8b69eaa94 commit 08f613e1d142b7c4b00d71b226d334b8b69eaa94 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 17:58:38 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 18:01:55 +0000 fts: Fix misindented line. Fixes: da2025a0e894 Sponsored by: Klara, Inc. --- lib/libc/gen/fts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index fa3ee9cc4c83..cce959ba836a 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -127,8 +127,8 @@ __fts_open(FTS *sp, char * const *argv) SET(FTS_NOCHDIR); /* NOSTAT_TYPE implies NOSTAT */ - if (ISSET(FTS_NOSTAT_TYPE)) - SET(FTS_NOSTAT); + if (ISSET(FTS_NOSTAT_TYPE)) + SET(FTS_NOSTAT); /* * Start out with 1K of path space, and enough, in any case, From nobody Thu May 8 18:20: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 4ZtgRj6jGDz5vR3m; Thu, 08 May 2025 18:20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtgRj52r4z3tGb; Thu, 08 May 2025 18:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746728449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QmfKL6TetTypud2e7g0WEroem9WEDekvmj7neBY1YCk=; b=kQMaaM3QI+SZEzWh/EKDMs1C4qbj5NDG7MAQ+O9xE+JKwALsGNhG4+3+xSNFoih0NWIZmh b6q/jXXOa4BX87B1DVV59DGTqIqQJ2USVj9VMcG9S4qqpw2/PZhP3vBXB7JhJ7kNy2bGUF J+7e9XKCOJRTlh2nS93lDv0WK5LsnXKCsXHacRV4lyzkfV6qkWJv9Rp1YUGl8cYg0KMJRX blHJ2wwWMqimlcPx2djy8Feoe44pxXdZymAuIfMGIBfPX8Wy9ccwrIfC/XQvkB/Zc5KfyZ N+2K9OsWkfyMGpsVAQuA5kStif8nbY/kM/S0t2IRUlL/3HwB7fBB69ctZpf3QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746728449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QmfKL6TetTypud2e7g0WEroem9WEDekvmj7neBY1YCk=; b=m0kZ5A/j5o54lXkjEvJZYJgeEyeVcrosZ7g5Zv/0Dk09rwnUD89ZRXs6TNf5rEvy4/Ff4p S94wyIx/eTNVcujHQRGTjRq1oClKuIwXMWL1pn8v3N9TjYCnX5ZuiF8W2K+xxHhj7yvcSV Q6vIeuMP+ztOLbx/iWEetGb7ulbhzhyyOXm3XcEOv8fggPIzEm/e2cbjYO+3mqfRqU0GT1 jOE0zC8Fwx432UjUN8fxA9vdqLJ+8XeV3zDJmZUkMRcpGKMkuVAtpATpWsSFYLXxZ1RqpO w4pDVy9T1EUsTbIRJGYyx8oWcTzF1F0M3rjfrls+lfnFHig7f8/xbUvaLXFN1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746728449; a=rsa-sha256; cv=none; b=yMEcOO2mN7PCCc6j1Rvu7hW9fKdsGxUaja4jYzBW/3OrgCl42K68p/72A0liWLx53oy/2t 0sllNEwlTcrAhse+Ja+Eeqwvyrn7Tr2NnEYszLayRX/vfwJxgMImRSJKu2NQLdNJS1xe3r U3tjEpX0a4pPwNaTCtMhL339tORPPnFMWN9QeVyTFJhubhR9bg+EDrTv4FaKIdYGDgvjOr x1bPE+afVWKOeTq4GdmTwNDpYn4V7829M6qVpkEKubC/x5ck/Ykg1PvEmeAq9LE70gfRds HoC+3I97s0NrnDI8p5/PjvnIjqmdjosF9Dyg19s2rpOrAvJBMcVQltGWyGW1ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtgRj4dsHzB0d; Thu, 08 May 2025 18:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548IKnjA028476; Thu, 8 May 2025 18:20:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548IKniq028473; Thu, 8 May 2025 18:20:49 GMT (envelope-from git) Date: Thu, 8 May 2025 18:20:49 GMT Message-Id: <202505081820.548IKniq028473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: d28526591803 - main - libusb: Emit event after deregistering hotplug handler List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: d2852659180307475a8376ce86aa587cccbb10bf Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d2852659180307475a8376ce86aa587cccbb10bf commit d2852659180307475a8376ce86aa587cccbb10bf Author: SHENGYI HUNG AuthorDate: 2025-05-05 17:52:45 +0000 Commit: Ed Maste CommitDate: 2025-05-08 18:20:21 +0000 libusb: Emit event after deregistering hotplug handler The original implementation did not emit an event when a hotplug handler was deregistered. This omission causes issues for programs that follow the best practices recommended by libusb—particularly those that use `libusb_hotplug_register_callback()` or similar functions in a loop while managing hotplug handlers dynamically. Without emitting an event after deregistration, these programs can become stuck waiting indefinitely for an event that will never come, as the condition to break out of the wait loop is never satisfied. See: https://github.com/libusb/libusb/blob/6c0ae1ab456da49e7805115e77ce0428ace4ea41/libusb/hotplug.c#L459 Reviewed by: bapt Sponsored By: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50170 --- lib/libusb/libusb10_hotplug.c | 1 + lib/libusb/libusb10_io.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libusb/libusb10_hotplug.c b/lib/libusb/libusb10_hotplug.c index b7573bf916ec..1e8037da1bd4 100644 --- a/lib/libusb/libusb10_hotplug.c +++ b/lib/libusb/libusb10_hotplug.c @@ -407,6 +407,7 @@ void libusb_hotplug_deregister_callback(libusb_context *ctx, HOTPLUG_LOCK(ctx); TAILQ_REMOVE(&ctx->hotplug_cbh, handle, entry); + libusb_interrupt_event_handler(ctx); HOTPLUG_UNLOCK(ctx); free(handle); diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c index 59bac60c4672..2790142486ba 100644 --- a/lib/libusb/libusb10_io.c +++ b/lib/libusb/libusb10_io.c @@ -231,6 +231,7 @@ do_done: /* Wakeup other waiters */ pthread_cond_broadcast(&ctx->ctx_cond); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb10_handle_events_sub complete"); return (err); } From nobody Thu May 8 19:47: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 4ZtjMZ6nqCz5vXJq; Thu, 08 May 2025 19:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtjMZ5wbMz3DSJ; Thu, 08 May 2025 19:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746733642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnI2Oupe3EAS7Uf1ZmlTtwuaGGEq3lr40PbuoiJ0SV8=; b=G0nCKwJShMshivZIWNIg7M3QdI9A/aLksLPj/F/UdBU45k7uaFiKpRmiHfhpjlf9728+3C u+fGfs+xUAwB7iO1GBkXfo+HHAqLPbjikIlTVQGk0evuQp14UnG2Qn/bzvjTPp/08Jg2AC 3WUsVoH/BUFiwqtK1Nid+/tM+x0wgyPLwEf9TFf1hTIGpkUXsCNxDQUgPDbfrFJ8EaMu8i H0pEvjVEkCHFHq3p6VrJd10OD8vbr6PJcbLZY/3VVsaAC1pXX+tbDbwuJ9ZJu4iqJvY517 1Y2joP/ZsAW9sIFN5IQTn4dXsdTd7cZK2wONEBANQyHim3/BB5MiHEVl+5bttg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746733642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnI2Oupe3EAS7Uf1ZmlTtwuaGGEq3lr40PbuoiJ0SV8=; b=FADD7Lnm6QBdmQhzgstwgyw9jnJ493gY+wWm8G45PTE/FnIumk7OuSwcqC8+l682HBkU4g +H49ipi6k2TYPc/1bOACQcwC5LTsQI8UOB3Kc5HyDL9ta33fn8n0oPPjgwOO7y5PgURD03 xCKJRSW7FuUwCMHlsr6JPsRbhLbev+BeaWXyA7ibmgG3qEWzjNVS+THI0CKthyTAyWUZRY sx3TzXS8RxLTgNO0vZvqy6eRHW01R+P6NrdhyHcITQTuhgnpAxicLLEpDwV4z+zUbarUnR eZnTA89wvO7XUs4vSpWOI+qUZVjPfpU7I7FOE682zt5pUnG3c9UCv384gjk/FQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746733642; a=rsa-sha256; cv=none; b=fA+DzRkULNP9HCdoMq7H6sk5+c0rPWgkTfd7gEtzbm2xqyNDnY8oDfBEWlPJfsVaGLe/tZ o6D7fl0/2985ssNrs5f4hXi7dAU7AUY5kfPw12eM5pvVb1Job2jTm5v3yBPj1kOeu+fwrR nooJ/LMAInjQ0Z79+6pLJCEZXCwlT2fRwdLl7N5a3P9r4PknOR10/Z25RW/ReakLXAKWj3 bVjQPHLXfKZDpv/cqjRxSzbrXwPzpNqJDUfwAM278DdLcXeekrQRebYs01oXgns6+fgmZT n8ffIi7me5hU9yq3ljvRtMb3JQ+MiLObYjn3KErWOcmJ1sl+y6vMG+yYxDFpzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtjMZ4tRmzDHW; Thu, 08 May 2025 19:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548JlMqs086833; Thu, 8 May 2025 19:47:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548JlM93086830; Thu, 8 May 2025 19:47:22 GMT (envelope-from git) Date: Thu, 8 May 2025 19:47:22 GMT Message-Id: <202505081947.548JlM93086830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 78661696e639 - main - loader: i386: use -z nostart-stop-gc for bfd as well List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 78661696e639836c9c41313020308f132057189a Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=78661696e639836c9c41313020308f132057189a commit 78661696e639836c9c41313020308f132057189a Author: Kyle Evans AuthorDate: 2025-05-08 19:47:16 +0000 Commit: Kyle Evans CommitDate: 2025-05-08 19:47:16 +0000 loader: i386: use -z nostart-stop-gc for bfd as well binutils 2.37 seems to have added the knob, so let's just use that version here (it's not clear if GC'ing start/stop symbols was actually made the default at the time, and it didn't seem worth it to dig much further). This fixes misbehavior when built with more recent binutils, as we do rely on linker sets for loader commands that we use. Reported by: sjg Reviewed by: dim, sjg Differential Revision: https://reviews.freebsd.org/D50252 --- stand/i386/loader/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index bb9111c3dcce..e1f0298403b3 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -90,7 +90,8 @@ ORG= 0x0 CFLAGS+= -Wall LDFLAGS+= -static ${LDFLAGS_ORG} -Wl,--gc-sections -.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 130000 +.if (${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 130000) || \ + (${LINKER_TYPE} == "bfd" && ${LINKER_VERSION} >= 23700) # lld 13 and higher default to garbage collecting start/stop symbols, # completely ruining our linker sets. For now, work around it by # disabling this un-feature. From nobody Thu May 8 23:17: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 4Ztp2Q5wy6z5vlcV; Thu, 08 May 2025 23:17:50 +0000 (UTC) (envelope-from brooks@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ztp2Q4sl8z3FcH; Thu, 08 May 2025 23:17:50 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746746270; 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=eIw+r2ysJyyxjgKrQqgWaony5UIBb2JhDhgyk7m4ASg=; b=AajA4E4GjNFQweVfj3hd4Njx2mf7dBOPYeE/CvX1b2cv2oGpy9QeTZich0tercmFJCHCCx fJFl3E9XwLiJ6GSZNY02aU1jtS3csSucq8rSwrHRwrAGN81jCz3hwGxpBEaiProLtLVnQO 94d8yYIm280mc4qAEAAiTc0YLkdSHdqcopZvBJk0j5ThAUyZcS0jCDcjN+g/uXr/HqJy1l bxzhIWNrfgZ7p60/48RXsm5bDgZtni5+adNm3mWRzQXfu5AxuA1kyUwYrVu4aWNwp7ILjP 4feBuEGsHhPY8Re0WmRCJKQFGwQu9UZuEAIPhHlyPPdL3fj9OnOmnOhettmQvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746746270; 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=eIw+r2ysJyyxjgKrQqgWaony5UIBb2JhDhgyk7m4ASg=; b=dv5GZRJJA/SozbcOXv31iW2ovTNiy1fGnIniDyOS1drQgeLfL7m84SKWDiOknh5Jf0tGvv MUCM5wnj/NTD/iHp3NGbbMKR33TMWggxNyxVuffJw1T0SuqzDYCjebguzkNBIgR3VuR6g3 Ry7TV2zJJ4hGBDnWFWrKmQ/0J+w1rwe6R8Kg8mJvdnwPW2b4zSDVH4c16VTXZkQs3/coJ9 pB+omVXONnZxRbeOm/OHmnYJd/kuabQpAEXC8dTKsho9zq9iI3h6DCJt7ydSoV8h16W7yl he4OXMYJUGCJ631G6JTHIoZlg4GXBxkFRShZBfL6tdZ8pSO8hqQ/MFNxxlDghA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746746270; a=rsa-sha256; cv=none; b=vKzBY/Ut/2tQJ+KO4qVxT7N6qdMhU77zQVSzUV2k+MZFuMG0cXU0HlhARyPAzJkamLFoyl 3AYpwlz0HKdqQKvBwVEOBkRjYbNzo7A2wNjJ5p7HYs/I8sIMel40cFprrQjTw4QX2Kn/W/ HNe2t5zzg5eCF0AGhAvhmWdDP2+J4KeyKBH8akK8M/TrSXe+9kx/kN/IVgGLIkogjmhwzz kb9WOLugXnlDGl/SqtkjYvn9xnWCzm0I33LOgpfxjYJA6l3KCoVyt5JlsuLmY5bRTfsmsu FhYoUm4wcUpLJ+sP/TreNyAAStVLgmnvLPTtRevzw7QG0croqHKc8kUFjehWcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.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: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Ztp2Q3tdlz16R8; Thu, 08 May 2025 23:17:50 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id CADBC3C01A0; Thu, 08 May 2025 23:17:49 +0000 (UTC) Date: Thu, 8 May 2025 23:17:49 +0000 From: Brooks Davis To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 78661696e639 - main - loader: i386: use -z nostart-stop-gc for bfd as well Message-ID: References: <202505081947.548JlM93086830@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: <202505081947.548JlM93086830@gitrepo.freebsd.org> On Thu, May 08, 2025 at 07:47:22PM +0000, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=78661696e639836c9c41313020308f132057189a > > commit 78661696e639836c9c41313020308f132057189a > Author: Kyle Evans > AuthorDate: 2025-05-08 19:47:16 +0000 > Commit: Kyle Evans > CommitDate: 2025-05-08 19:47:16 +0000 > > loader: i386: use -z nostart-stop-gc for bfd as well > > binutils 2.37 seems to have added the knob, so let's just use that > version here (it's not clear if GC'ing start/stop symbols was actually > made the default at the time, and it didn't seem worth it to dig much > further). This fixes misbehavior when built with more recent binutils, > as we do rely on linker sets for loader commands that we use. Do we need the version guards any more? Even FreeBSD 12 has LLVM 13 and binutils 2.37 is about to turn 4. -- Brooks From nobody Thu May 8 23:56: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 4ZtpvS4GWVz5vnL6; Thu, 08 May 2025 23:56:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtpvS3hYJz3vSX; Thu, 08 May 2025 23:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746748612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPGRnnFMct8gocl0IjkgeylHkRh7mHAxd3lERiS71i8=; b=r1Wzf2yRpqIddmcSY0qAisLTpOoGhDCq3SErztIwtZatyIaclFK3/LKcfQu2Tge6QZqilp 9bBRu34tIy9UUxHSZ4Sg3M0CTDY9LKNk9loglrPuT1GXF2tw+pD7AAuChPlqlnq6mc3Uan 67dLPIs+l0prTwxFjPsqAiUM39bx7F/1w7sp4c+CIHpEcq5Naxq60xsEld+sNXQpSZsDtO B+0kjAJB/x1cgIpuxB+MD6zTQuV0Y0fIed1dESq4RFYv4VCzLe/zin/UA5YZ1NZS0TuXtD yt3tVDI9rh9GEAS3r4RN8dsydWjADpXOZ8c8bvDg32JYHPYqXEAqcODtatTmiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746748612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oPGRnnFMct8gocl0IjkgeylHkRh7mHAxd3lERiS71i8=; b=pMiloG4t+wZUUqyO68lbJEjliaKg8Ioy5aQNDdaY1WwoOKtR9Nfa7L/3Pns7VmiCLuGU/S ceg/mXB/XnJaPuzST2YqJtTpPPWrkLV6N/9oEG/VOZakSxXk8WX5sPK7MDG/IyIzK2LzIr ec/Qv4nTiIZWDqyWkiuvvviIGWt3SvWDsBNnJUIANSTgOZ3jyMb+GBR4fnt0FlFl5AYrnR 7VjAzCfYEHAyyVHbOf9IpycqBGgnyCbnDJ2ypx3Ni+3woMRoo09St9OUO5AKZEc8Jj0lhs tRe+BWNFEUS3roiMl5dihxouWrEMCmQdvo7HMczp8SP3LFVQkmdZZf+a8ArN3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746748612; a=rsa-sha256; cv=none; b=TLn5KSfDj5dhAu9ffFuTSbs9v7O+t54juLFW1pqqd/xCqaDfjCX5Qbbp5NCjPEDi63pYRw H1QeNFH1L8PwNkJOppG6Mi9ye9CK8LaNsoHSFAY9jf4Zy2j+YYWjCo9BXbUvPYkRFqvLXl Zx2wNh+Sx4UDFgwnwsG4eTtxdxUUE0oTLlUz+bBs9zj3QcsRv9q2EiVyICwDHE/+YbgD9w O9KAfT3/JR8J7BHhQ6vuLNMJPJOL9ML5zOlThbdn1aKaCXQ2QAb3d2kR+A15Ln9HyTDb9A eUTsuUc2gcsDp2asBMvG8IHNY6XEAGj63bpnsTYMaCkDpZRQeAXac9blwaO0IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtpvS3Bt6zcfB; Thu, 08 May 2025 23:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 548NuqtD055652; Thu, 8 May 2025 23:56:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548NuqfZ055649; Thu, 8 May 2025 23:56:52 GMT (envelope-from git) Date: Thu, 8 May 2025 23:56:52 GMT Message-Id: <202505082356.548NuqfZ055649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 33759fc7e823 - main - rtld: remove stray tabs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 33759fc7e823be533d4ab0611950f8264de06ecc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=33759fc7e823be533d4ab0611950f8264de06ecc commit 33759fc7e823be533d4ab0611950f8264de06ecc Author: Konstantin Belousov AuthorDate: 2025-05-08 23:56:02 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-08 23:56:02 +0000 rtld: remove stray tabs Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 03b4cd2bdda4..8ef6301fab36 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2640,7 +2640,7 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list, nobj = globallist_next(obj); if (nobj != NULL && obj != tail) initlist_add_objects(nobj, tail, list, iflist); - + /* Recursively process the needed objects. */ if (obj->needed != NULL) initlist_add_neededs(obj->needed, list, iflist); @@ -2650,7 +2650,7 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list, if (obj->needed_aux_filtees != NULL) initlist_add_neededs(obj->needed_aux_filtees, list, iflist); - + /* Add the object to the init list. */ objlist_push_tail(list, obj); From nobody Fri May 9 00:08: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 4Ztq8W4lhnz5vpJG; Fri, 09 May 2025 00:08:11 +0000 (UTC) (envelope-from kevans@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ztq8W38ycz459R; Fri, 09 May 2025 00:08:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746749291; 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=KZOc4Ageb0Iv2sKrTdzA69mQ37frF4KmZipBzLD37TY=; b=lWnIupRLPzQIcwmNYzdly2yb6vRnUkH60fue8k5MJhrAA4l3eNtothBChsny9b97P7O3ba +sOvdsboasL3FF282jqE/hPFkIiqfoF4xGyk8ZZxppL/axdVHp0mGXUq9PRyM7ocM8ObEm QGkksJtz2tQafnrEjWEU/5KlMNJbnaE6964vCWlfUkGKXQ6hbjybq23PJWG6clThPZGjoL V7jbYCNMzg8lUShR53s69FCi6sYZHgODeDjU9SixhSeAWdoc2C8SOkU7IuydY57DJFUHIw DVVm1bol/gfyN7gRjTZYlFXb3RIiWPHQkvW8iXXXlv0qwq/T4lLMoDVwMXRb8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746749291; 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=KZOc4Ageb0Iv2sKrTdzA69mQ37frF4KmZipBzLD37TY=; b=AGCeBcKn2Ug6tnh/W265CP3cEVeJj00eg2JgvftmCxSlEv/Bq9Yg02oz1EPfhdKJwnOr33 qb+bdFJSD2psWYnj28UopUQyBkVGq6mko+H8u7/+mg5m9hAIF2ObnQU4rZ3B17BoD+r8fP 3FTVWN5DuYKItyhdEBwDfK+DVRUdYtxmi3HzwpzjcCxQj03LB/0TgXw37UjM3vVDPr088p R8vp5Osr/TyiBiai4PR6IQGtlIDTBWjdlAta5eugiBES3u3VAPQ/gS0WTG2leWPYdnNZeL votdVBhUlmeUwt9GTRkoux+byQYcl0VKLv+9sJ0669nFf2nU/65yxzJpTvr55A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746749291; a=rsa-sha256; cv=none; b=dMKWjGShoT/4lkIl3uZwAvz0mjc/LBokxHqyB4unsPm8sekbxmuV0XuuDEBmmV5rV7o/mu tbZrkopcy1q3oP4/7L87n2ZUAfdnURj/1+Z0pGDqIPhql9nVurSVbcpPnevGyhK2g86Msq 3qBVPmhiOQxbIuRnleAQBQCogQq7H6cmtqMPVZUXsQk7IMkVuATd0RrAQuXLkS8X115Pfo CQ3hE6gfPq05MvRZrgn9P0HE7MHUDKG6Jw3t6qLvnf6MLMynegDwyAIChgJjU1Ag//Hjbd mG/8W3QijlGQ3bhbWIR8pEZB4CT/B3UXZQY6pD4ynhhUIwnBy0SXSyfzaWbvQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (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: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Ztq8V40JSz17Pq; Fri, 09 May 2025 00:08:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Thu, 8 May 2025 19:08:09 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: 78661696e639 - main - loader: i386: use -z nostart-stop-gc for bfd as well To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202505081947.548JlM93086830@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/8/25 18:17, Brooks Davis wrote: > On Thu, May 08, 2025 at 07:47:22PM +0000, Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=78661696e639836c9c41313020308f132057189a >> >> commit 78661696e639836c9c41313020308f132057189a >> Author: Kyle Evans >> AuthorDate: 2025-05-08 19:47:16 +0000 >> Commit: Kyle Evans >> CommitDate: 2025-05-08 19:47:16 +0000 >> >> loader: i386: use -z nostart-stop-gc for bfd as well >> >> binutils 2.37 seems to have added the knob, so let's just use that >> version here (it's not clear if GC'ing start/stop symbols was actually >> made the default at the time, and it didn't seem worth it to dig much >> further). This fixes misbehavior when built with more recent binutils, >> as we do rely on linker sets for loader commands that we use. > > Do we need the version guards any more? Even FreeBSD 12 has LLVM 13 and > binutils 2.37 is about to turn 4. > > -- Brooks Yeah, probably not. Jessica raised a valid point in the review that I had overlooked, though. Based on Simon's feedback, I did light investigation to determine where the options were introduced and just slapped it on for at least that, assuming it later became the default. Apparently it did not become the default, so it's not clear how Simon's build was different. OTOH, I'm not sure if that really changes anything (except that the mystery isn't fully solved)- if it's possible to configure such a bfd, IMO it doesn't hurt to use it since these sections/symbols being retained is critical. I don't see any reason not to drop the version bits. Ubuntu 22.04 seems to have binutils 2.38, so that's good at least -- I wasn't sure if the timing on 2.37 was right for that (or even what Ubuntu's policy is there). Thanks, Kyle Evans From nobody Fri May 9 00:34: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 4ZtqkS6R2lz5vqGM; Fri, 09 May 2025 00:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtqkS4bnxz3HRh; Fri, 09 May 2025 00:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746750848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AW2/bzHZA921PzEMxIlrEOaoI1DundTbP9GXkrORfEs=; b=M3vQQXc5LdBLsj9AtMOS/YGcACSFep7QNh9+ZCb3kuiqrlu2wtxCGyol1JfjGFUbnj8CCL SkOUkPb+u5xche8MI4FMB2MLZRNadtPV4Ny9tUi3AwvWwPXSo2nR13BL+5yqFYS6NayPlI BZFX+W5NTg9AmbwaRjwMlVKBycrWjK1WM1EVPgn1oRIMCZI9TpT+M7QSZoXKgx7q3erNk+ qrhS9DLku+KUqJNvHtOqvfVehYDD480Y3MVFcMllvGr2z7isfeH5egELQHTiaTMu/vCjFE v3E55/3wcFI+g27mmbgx/PGBdIGmJF1sbt3N23Q7/z1+3mOI3mfiFSE72dUdpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746750848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AW2/bzHZA921PzEMxIlrEOaoI1DundTbP9GXkrORfEs=; b=K0CVhR+1WXTtXH2gfzDHSHwnDS4w7+lF38r0zVfJVo6M0d2NCL+Uc0IXy3CKq3qJXaUAx1 LBMSMkuwlSwgeTOHsJmmZ8wPPknEhG8+6trtuP6TvuYA3N3eM02pVJxjr687W6WJsliLCO d/b0+yEIXKUMmxiC4v0WGKeiSO4boA42wKQmUuOxG+QMqpbWfaGKq2CmpELnzAYH/sDLKa vH+Q34l6CSmJGAAE2cL8TAEcZUTM3v6PovKK9TjDkUa+uE40tEm7fYiizCVxfgccbLhJ4r 2cIVYd4RWuoCL5dJ67XBVV5U+V/eSnNxEjd5cUMlycQWeWgVEfU7ZNEFkJiPVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746750848; a=rsa-sha256; cv=none; b=Jr9P0BCFMTWoxlOIOvVGQdA8RHMLkc9T/UVMspP0i7tF6NPJK4ypLbf/z9lglBUytw0Ac/ 3CXY7Kuopy65f8m1J4VZVnpBW/pbEQvTpNMyRYlVoZQNaiWLhnHjKUB/PXcgs46OvAEyI5 RXjixTqgLkUfK2WNLImTAsowaHE/a6bsrcKqn7A4Bw7YlcXen1wOxrGDV0/ivhqqVk+ur5 oJwUX1IBbQcTlTYpQS4fYkuknCRepqgseNUcUhTpWD0V1dz+64iehLVZMxtl88e7Dsq1hF gjzPnGyEW5CYVRXB8lg+qQyuwfjblfppiYxcx0hrCp3eYDq9L+1rW1bjcnh/Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtqkS46thzdw9; Fri, 09 May 2025 00:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5490Y8n8029886; Fri, 9 May 2025 00:34:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5490Y8OH029883; Fri, 9 May 2025 00:34:08 GMT (envelope-from git) Date: Fri, 9 May 2025 00:34:08 GMT Message-Id: <202505090034.5490Y8OH029883@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 04421fda140b - main - krb5: Fix handling of transient crypto request failures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 04421fda140b92eb0d22bc4c0f81b6de05f21225 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=04421fda140b92eb0d22bc4c0f81b6de05f21225 commit 04421fda140b92eb0d22bc4c0f81b6de05f21225 Author: Mark Johnston AuthorDate: 2025-05-09 00:16:53 +0000 Commit: Mark Johnston CommitDate: 2025-05-09 00:29:15 +0000 krb5: Fix handling of transient crypto request failures - Instead of using CRYPTO_F_DONE to decide whether a request has completed, use a custom protocol of setting crp_opaque = NULL in the callback and checking that instead. CRYPTO_F_DONE is set independent of whether an error occurred, but for transient errors signaled by EAGAIN, we want to simply retry the request. - Clear CRYPTO_F_DONE before retrying the request. - Panic if the request truly failed, as we currently have no way to pass hard errors back up. Reviewed by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50238 --- sys/kgssapi/krb5/kcrypto_aes.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/sys/kgssapi/krb5/kcrypto_aes.c b/sys/kgssapi/krb5/kcrypto_aes.c index ddaf1cec5b45..6761b7c815ad 100644 --- a/sys/kgssapi/krb5/kcrypto_aes.c +++ b/sys/kgssapi/krb5/kcrypto_aes.c @@ -116,19 +116,24 @@ aes_random_to_key(struct krb5_key_state *ks, const void *in) static int aes_crypto_cb(struct cryptop *crp) { - int error; struct aes_state *as = (struct aes_state *) crp->crp_opaque; - if (CRYPTO_SESS_SYNC(crp->crp_session)) + if (CRYPTO_SESS_SYNC(crp->crp_session)) { + KASSERT(crp->crp_etype == 0, + ("%s: callback with error %d", __func__, crp->crp_etype)); return (0); + } - error = crp->crp_etype; - if (error == EAGAIN) - error = crypto_dispatch(crp); - mtx_lock(&as->as_lock); - if (error || (crp->crp_flags & CRYPTO_F_DONE)) + if (crp->crp_etype == EAGAIN) { + crp->crp_etype = 0; + crp->crp_flags &= ~CRYPTO_F_DONE; + (void)crypto_dispatch(crp); + } else { + mtx_lock(&as->as_lock); + crp->crp_opaque = NULL; wakeup(crp); - mtx_unlock(&as->as_lock); + mtx_unlock(&as->as_lock); + } return (0); } @@ -164,11 +169,12 @@ aes_encrypt_1(const struct krb5_key_state *ks, int buftype, void *buf, if (!CRYPTO_SESS_SYNC(as->as_session_aes)) { mtx_lock(&as->as_lock); - if (!error && !(crp->crp_flags & CRYPTO_F_DONE)) + if (error == 0 && crp->crp_opaque != NULL) error = msleep(crp, &as->as_lock, 0, "gssaes", 0); mtx_unlock(&as->as_lock); } - + if (crp->crp_etype != 0) + panic("%s: crypto req failed: %d", __func__, crp->crp_etype); crypto_freereq(crp); } @@ -334,11 +340,13 @@ aes_checksum(const struct krb5_key_state *ks, int usage, if (!CRYPTO_SESS_SYNC(as->as_session_sha1)) { mtx_lock(&as->as_lock); - if (!error && !(crp->crp_flags & CRYPTO_F_DONE)) + if (error == 0 && crp->crp_opaque != NULL) error = msleep(crp, &as->as_lock, 0, "gssaes", 0); mtx_unlock(&as->as_lock); } + if (crp->crp_etype != 0) + panic("%s: crypto req failed: %d", __func__, crp->crp_etype); crypto_freereq(crp); } From nobody Fri May 9 00:34: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 4ZtqkV2JqJz5vqJT; Fri, 09 May 2025 00:34: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZtqkT4my3z3HMH; Fri, 09 May 2025 00:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746750849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7tqCaUvAkbefBdrgfZNySBWa3id2m8Kso2PXWvPmUI=; b=ByauOgPYl8WLYUgCexiYAZuzvlQOzF8Y39CZV8VP3PqqIS/3X3AIvN8+lOubRvWBfwTjDT OqBNy5UU27Wkik6PZxjbshTiXc9P1j5oD33SujJPIrHoMI92eHuf7S69UX49jAD1+4BKfw 14NwzJ2upRj4LzlgcS70k/oFpDrwu0kaKCp6tS0xarDuldPR3Pm1K0Y+KS/Wk1HccpeXqM Aj9i9R1fQ6y9EPdrgJdiIFLWN7XiQ3v6BhtVoBfkSqEtJpwk4kgWM/fBJIp9wKvDZ9FHim y3LM1TrLfD6aX8pOxw2aj7ohVgtwOjqFbIZZgTA0RrNvj+grgLYwMX2WmNeOlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746750849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7tqCaUvAkbefBdrgfZNySBWa3id2m8Kso2PXWvPmUI=; b=QVk0LxKdiNFegq2Hl4A1alceVYgAjK45FLsF/q20mmMOdPhE+D16EcgCPdv2B2yzess4Ad n8DBQVqPPhdL5sH1eSFQXmJeTmK4fzzq/bn3/V5tluvJbraEx+24kv8jEWFTU1LI7AhjUx QWy363mqt7d8Zb4H3TbBY++CDQ8Egw1DSHg7OfXsCxaAPb04Y2S7WMDAkyOKcuSVYd1nRs L9BAaQK83djmEV2gYJXE1Pzbnq7qA1ItrJ6QC9VQLYQtu0gi+22lG+87k8QM6PMJN/+kEP B1a6gFXt+KGmP3lYKhcMAE0mZ2U+pTW0hk64ZwKpdSYcCcSc0pXehCNJlQw4bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746750849; a=rsa-sha256; cv=none; b=KSGpCTHthhh13JOGE2i8FelaMHd0h7ugOhhxyG7hCIGNWP1BM45ehwtRZmfnjS5HmhLObx M1uJLwf90rpVijbL2piUBbIG0bA0rIlDxvORAlZCrqUYab4VUMQWRxE9ZV8txJVbFdVLwJ pQEnWI702Lpr6rVg2kIC58Bu1/9F4NF02Nw5IxTdkKz4VhvYt8kOI/fQiXC0jLmZa61QY+ zrIphRoT0H8J55oU2ae0w5v0jyvbvDJwJjYkO2UJd8nqEVzzO4nj28hrBoBg/01H+SAHZ4 YyLG8aPxSGh57zVCkhBMV1+7hCsLyI7HY4toVMfR19P7Qf+LIXy6ANksK9Y/UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtqkT4NWxzdmG; Fri, 09 May 2025 00:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5490Y9FB029922; Fri, 9 May 2025 00:34:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5490Y9xS029919; Fri, 9 May 2025 00:34:09 GMT (envelope-from git) Date: Fri, 9 May 2025 00:34:09 GMT Message-Id: <202505090034.5490Y9xS029919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2fa185f9bf59 - main - crypto: Remove uses of CRYPTO_F_DONE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 2fa185f9bf5948ead9c3920d452ddd6bcad8f569 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2fa185f9bf5948ead9c3920d452ddd6bcad8f569 commit 2fa185f9bf5948ead9c3920d452ddd6bcad8f569 Author: Mark Johnston AuthorDate: 2025-05-09 00:23:40 +0000 Commit: Mark Johnston CommitDate: 2025-05-09 00:29:23 +0000 crypto: Remove uses of CRYPTO_F_DONE Previously OCF set CRYPTO_F_DONE prior to invoking the completion callback, even if the request failed. This isn't particularly useful and leads to bugs when consumers retry a failed request, since OCF also asserts that CRYPTO_F_DONE is clear in crypto_dispatch(). (Really, OCF should retry requests that fail with EAGAIN, but that's a larger change.) For now, just stop setting CRYPTO_F_DONE to simplify consumers (and fix those which fail to clear the flag before retrying a request). PR: 286321 Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D50104 --- share/man/man9/crypto_request.9 | 13 +------------ sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c | 1 - sys/kgssapi/krb5/kcrypto_aes.c | 1 - sys/opencrypto/crypto.c | 6 ------ sys/opencrypto/cryptodev.c | 2 -- sys/opencrypto/cryptodev.h | 2 +- sys/opencrypto/ktls_ocf.c | 2 -- sys/sys/param.h | 2 +- 8 files changed, 3 insertions(+), 26 deletions(-) diff --git a/share/man/man9/crypto_request.9 b/share/man/man9/crypto_request.9 index 45c3b62eea26..af62b9089561 100644 --- a/share/man/man9/crypto_request.9 +++ b/share/man/man9/crypto_request.9 @@ -28,7 +28,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd November 2, 2022 +.Dd May 8, 2025 .Dt CRYPTO_REQUEST 9 .Os .Sh NAME @@ -466,17 +466,6 @@ Set by drivers prior to completing a request via .Fn crypto_done . .It Fa crp_flags A bitmask of flags. -The following flags are available in addition to flags discussed previously: -.Bl -tag -width CRYPTO_F_DONE -.It Dv CRYPTO_F_DONE -Set by -.Fa crypto_done -before calling -.Fa crp_callback . -This flag is not very useful and will likely be removed in the future. -It can only be safely checked from the callback routine at which point -it is always set. -.El .It Fa crp_cipher_key Pointer to a request-specific encryption key. If this value is not set, diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c index a4bf3fb6490f..0fc2697717af 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c @@ -196,7 +196,6 @@ zfs_crypto_dispatch(freebsd_crypt_session_t *session, struct cryptop *crp) break; } crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; session->fs_done = false; } return (error); diff --git a/sys/kgssapi/krb5/kcrypto_aes.c b/sys/kgssapi/krb5/kcrypto_aes.c index 6761b7c815ad..5675b7e25b93 100644 --- a/sys/kgssapi/krb5/kcrypto_aes.c +++ b/sys/kgssapi/krb5/kcrypto_aes.c @@ -126,7 +126,6 @@ aes_crypto_cb(struct cryptop *crp) if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; (void)crypto_dispatch(crp); } else { mtx_lock(&as->as_lock); diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index 3c7299780a38..c3ae5e8a9ff8 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -1263,8 +1263,6 @@ crp_sanity(struct cryptop *crp) crp->crp_obuf.cb_type <= CRYPTO_BUF_LAST, ("incoming crp with invalid output buffer type")); KASSERT(crp->crp_etype == 0, ("incoming crp with error")); - KASSERT(!(crp->crp_flags & CRYPTO_F_DONE), - ("incoming crp already done")); csp = &crp->crp_session->csp; cb_sanity(&crp->crp_buf, "input"); @@ -1653,7 +1651,6 @@ crypto_clonereq(struct cryptop *crp, crypto_session_t cses, int how) { struct cryptop *new; - MPASS((crp->crp_flags & CRYPTO_F_DONE) == 0); new = crypto_getreq(cses, how); if (new == NULL) return (NULL); @@ -1669,9 +1666,6 @@ crypto_clonereq(struct cryptop *crp, crypto_session_t cses, int how) void crypto_done(struct cryptop *crp) { - KASSERT((crp->crp_flags & CRYPTO_F_DONE) == 0, - ("crypto_done: op already done, flags 0x%x", crp->crp_flags)); - crp->crp_flags |= CRYPTO_F_DONE; if (crp->crp_etype != 0) CRYPTOSTAT_INC(cs_errs); diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c index 9341dd60d47e..85b350ca2998 100644 --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -823,7 +823,6 @@ again: if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; cod->done = false; goto again; } @@ -1026,7 +1025,6 @@ again: if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; cod->done = false; goto again; } diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h index 1e0024407246..71e9c5ac4c0a 100644 --- a/sys/opencrypto/cryptodev.h +++ b/sys/opencrypto/cryptodev.h @@ -433,7 +433,7 @@ struct cryptop { int crp_flags; #define CRYPTO_F_CBIMM 0x0010 /* Do callback immediately */ -#define CRYPTO_F_DONE 0x0020 /* Operation completed */ +#define CRYPTO_F_DONE 0x0020 /* Deprecated, do not use */ #define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ #define CRYPTO_F_ASYNC_ORDERED 0x0100 /* Completions must happen in order */ #define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 74b48f2366c1..ece509f5f969 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -224,7 +224,6 @@ ktls_ocf_dispatch(struct ktls_ocf_session *os, struct cryptop *crp) } crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; oo.done = false; counter_u64_add(ocf_retries, 1); } @@ -240,7 +239,6 @@ ktls_ocf_dispatch_async_cb(struct cryptop *crp) state = crp->crp_opaque; if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; counter_u64_add(ocf_retries, 1); error = crypto_dispatch(crp); if (error != 0) { diff --git a/sys/sys/param.h b/sys/sys/param.h index f2dd148fcd84..88edc92e65e7 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500041 +#define __FreeBSD_version 1500042 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Fri May 9 03:53: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 4Ztw8f0HxQz5w2Nf; Fri, 09 May 2025 03:53: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ztw8d57VYz4GTD; Fri, 09 May 2025 03:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746762817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fMxQg1eJ+AwmCPBG+5VLjxRdZ+CMVGTvAgbNNY/dh+I=; b=mLa3H1uu82KZHtYsxtUq5NVQPGdewzVByRCbyqbDVzKnoWbnS8EwnKvCMP3nU7DpAVUtrf EPhenxO4aoCs6PMxPFb31C8ViavvwdRGfAjH14lBbsvbRSLlY9D8gSWdZm55CitZgnFmRS go67iDCR8TAl7V0JB8bglkGDOv5yEDSZPvA7DE+s9j53jUqrz2eMsRjqdwsAI+8fEtpyA2 3JOCS49t+qk6mqAkGm6kwNP9vB2KxhDHJrNu2AygWVEkAQ36HV9xzJXeJ1Z3R1kd8sXGjD fQ44H6EWVL+ZbFGJajKfHYIDM87rCS0Hy/o7xNs7gLQz4Fjt/9UaUQnMCXxzjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746762817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fMxQg1eJ+AwmCPBG+5VLjxRdZ+CMVGTvAgbNNY/dh+I=; b=ikCPUYnHCF3Xi/1aCoz0JQRtEOqigePTFEY4SGJEamjsZVEuQyuE29Kb4QjOGkoTBMeJM8 qcstB2SIvvFbF9yOtWmXpR5Z9AntWTb3ps0ESRZOXY66/dlXM5bOL4C/KormLCKVMXQMym Kd5P9NfFYqPYFabNzMa6bW4kPVmM1W8w0QbydW9frAM2KijjmZP+lUP0Wjka8ofu3OYSOh wkfK0OrAn1VTh8sqGNYaW8YMn/EyuCi4gCesRzox+WL7IW0qiUyeW53jk6g/FVWtHoYTRp F2S0A8qMFfzLTeukb3XqCk7/tD1T4kZKvxyEgkJB8jBhwprwxEDKuu06RHn9ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746762817; a=rsa-sha256; cv=none; b=W/bDcKcgntkS6o3IvqxBFD6BrAoTGaoBrq5zYvdJ/V0lXGw0mY+k9/JJERY0apwov4A6Kp iH+hu5Ora57d5r8Ifz9LzpgDPFnUzBbb92ykowCDBJhTRivkkYPxHrbCSXXJB+45xr7AU3 bXEP7aj1OKPC0fuRjtryNe/7WF21Wg0qOblLPExr4rmYD3ShRksteLZlO6NPkoKzaUQqB2 mASXZwScLkETf9VKqwEmdLYZVQ4GE1MyDOIqJJslz4ICV5kDVr0VkkBZkJ6H4OpXwI8ZBL +odsbpJ+tMGF2Qbj0Py0/tgfy6QXHj6Gp0IoR3MIrI0iZk8P9wrl+TlcCtd9Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ztw8d4krczl0r; Fri, 09 May 2025 03:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5493rbwk004285; Fri, 9 May 2025 03:53:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5493rbr9004282; Fri, 9 May 2025 03:53:37 GMT (envelope-from git) Date: Fri, 9 May 2025 03:53:37 GMT Message-Id: <202505090353.5493rbr9004282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 8703b572b9f6 - main - vm_page_grab_pages: fetch page ranges List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8703b572b9f6fa37018485e0188473f6097b5740 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=8703b572b9f6fa37018485e0188473f6097b5740 commit 8703b572b9f6fa37018485e0188473f6097b5740 Author: Doug Moore AuthorDate: 2025-05-09 03:51:58 +0000 Commit: Doug Moore CommitDate: 2025-05-09 03:51:58 +0000 vm_page_grab_pages: fetch page ranges Define an iterator based function for reading a range of consecutive, non-NULL leaves from a pctrie. Adapt it to vm pages. Use it in vm_page_grab_pages to fetch more than one page at a time. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50253 --- sys/kern/subr_pctrie.c | 31 ++++++++++++++++++++++++------- sys/sys/pctrie.h | 16 +++++++++++++++- sys/vm/vm_page.c | 14 ++++++++++---- sys/vm/vm_radix.h | 11 +++++++++++ 4 files changed, 60 insertions(+), 12 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index be1d57b4931f..e91966652f80 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -612,13 +612,14 @@ pctrie_iter_prev(struct pctrie_iter *it) * array, starting at index. */ static __always_inline int -_pctrie_lookup_range(struct pctrie *ptree, uint64_t index, uint64_t *value[], - int count, smr_t smr, enum pctrie_access access) +_pctrie_lookup_range(struct pctrie *ptree, struct pctrie_node *node, + uint64_t index, uint64_t *value[], int count, + struct pctrie_node **parent_out, smr_t smr, enum pctrie_access access) { - struct pctrie_node *parent, *node; + struct pctrie_node *parent; int base, end, i; - parent = NULL; + parent = node; for (i = 0; i < count;) { node = _pctrie_lookup_node(ptree, parent, index + i, &parent, smr, access); @@ -641,6 +642,8 @@ _pctrie_lookup_range(struct pctrie *ptree, uint64_t index, uint64_t *value[], if (i < end) break; } + if (parent_out != NULL) + *parent_out = parent; return (i); } @@ -653,8 +656,8 @@ int pctrie_lookup_range(struct pctrie *ptree, uint64_t index, uint64_t *value[], int count) { - return (_pctrie_lookup_range(ptree, index, value, count, NULL, - PCTRIE_LOCKED)); + return (_pctrie_lookup_range(ptree, NULL, index, value, count, NULL, + NULL, PCTRIE_LOCKED)); } /* @@ -671,11 +674,25 @@ pctrie_lookup_range_unlocked(struct pctrie *ptree, uint64_t index, int res; smr_enter(smr); - res = _pctrie_lookup_range(ptree, index, value, count, smr, PCTRIE_SMR); + res = _pctrie_lookup_range(ptree, NULL, index, value, count, NULL, + smr, PCTRIE_SMR); smr_exit(smr); return (res); } +/* + * Returns the number of contiguous, non-NULL entries read into the value[] + * array, starting at index, assuming access is externally synchronized by a + * lock. Uses an iterator. + */ +int +pctrie_iter_lookup_range(struct pctrie_iter *it, uint64_t index, + uint64_t *value[], int count) +{ + return (_pctrie_lookup_range(it->ptree, it->node, index, value, count, + &it->node, NULL, PCTRIE_LOCKED)); +} + /* * Find first leaf >= index, and fill iter with the path to the parent of that * leaf. Return NULL if there is no such leaf less than limit. diff --git a/sys/sys/pctrie.h b/sys/sys/pctrie.h index 0ccd4ec1e42e..3ff11f2c79ae 100644 --- a/sys/sys/pctrie.h +++ b/sys/sys/pctrie.h @@ -217,7 +217,7 @@ name##_PCTRIE_LOOKUP(struct pctrie *ptree, uint64_t key) \ \ static __inline __unused int \ name##_PCTRIE_LOOKUP_RANGE(struct pctrie *ptree, uint64_t key, \ - struct type *value[], int count) \ + struct type *value[], int count) \ { \ uint64_t **data = (uint64_t **)value; \ \ @@ -227,6 +227,18 @@ name##_PCTRIE_LOOKUP_RANGE(struct pctrie *ptree, uint64_t key, \ return (count); \ } \ \ +static __inline __unused int \ +name##_PCTRIE_ITER_LOOKUP_RANGE(struct pctrie_iter *it, uint64_t key, \ + struct type *value[], int count) \ +{ \ + uint64_t **data = (uint64_t **)value; \ + \ + count = pctrie_iter_lookup_range(it, key, data, count); \ + for (int i = 0; i < count; i++) \ + value[i] = name##_PCTRIE_NZVAL2PTR(data[i]); \ + return (count); \ +} \ + \ static __inline __unused struct type * \ name##_PCTRIE_LOOKUP_LE(struct pctrie *ptree, uint64_t key) \ { \ @@ -399,6 +411,8 @@ int pctrie_lookup_range(struct pctrie *ptree, uint64_t index, uint64_t *value[], int count); int pctrie_lookup_range_unlocked(struct pctrie *ptree, uint64_t index, uint64_t *value[], int count, smr_t smr); +int pctrie_iter_lookup_range(struct pctrie_iter *it, uint64_t index, + uint64_t *value[], int count); uint64_t *pctrie_iter_lookup(struct pctrie_iter *it, uint64_t index); uint64_t *pctrie_iter_stride(struct pctrie_iter *it, int stride); uint64_t *pctrie_iter_next(struct pctrie_iter *it); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 5ed1879c6a34..9ef9da737ded 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -5150,7 +5150,7 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, struct pctrie_iter pages; vm_page_t m; int pflags; - int i; + int ahead, i; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT(((u_int)allocflags >> VM_ALLOC_COUNT_SHIFT) == 0, @@ -5163,9 +5163,15 @@ vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int allocflags, i = 0; vm_page_iter_init(&pages, object); retrylookup: + ahead = 0; for (; i < count; i++) { - m = vm_radix_iter_lookup(&pages, pindex + i); - if (m != NULL) { + if (ahead == 0) { + ahead = vm_radix_iter_lookup_range( + &pages, pindex + i, &ma[i], count - i); + } + if (ahead > 0) { + --ahead; + m = ma[i]; if (!vm_page_tryacquire(m, allocflags)) { if (vm_page_grab_sleep(object, m, pindex + i, "grbmaw", allocflags, true)) { @@ -5185,6 +5191,7 @@ retrylookup: break; goto retrylookup; } + ma[i] = m; } if (vm_page_none_valid(m) && (allocflags & VM_ALLOC_ZERO) != 0) { @@ -5193,7 +5200,6 @@ retrylookup: vm_page_valid(m); } vm_page_grab_release(m, allocflags); - ma[i] = m; } return (i); } diff --git a/sys/vm/vm_radix.h b/sys/vm/vm_radix.h index 1e9115f1a6ba..6359373305e1 100644 --- a/sys/vm/vm_radix.h +++ b/sys/vm/vm_radix.h @@ -113,6 +113,17 @@ vm_radix_lookup_range_unlocked(struct vm_radix *rtree, vm_pindex_t index, ma, count)); } +/* + * Returns the number of contiguous, non-NULL pages read into the ma[] + * array, without requiring an external lock. + */ +static __inline int +vm_radix_iter_lookup_range(struct pctrie_iter *pages, vm_pindex_t index, + vm_page_t ma[], int count) +{ + return (VM_RADIX_PCTRIE_ITER_LOOKUP_RANGE(pages, index, ma, count)); +} + /* * Initialize an iterator for vm_radix. */ From nobody Fri May 9 04: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 4Ztwcr3WJcz5w3KV; Fri, 09 May 2025 04: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ztwcr1q31z3H6Y; Fri, 09 May 2025 04: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=1746764076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JqTBZMoEhGQKmu9lUT9JkhUkhKSypMHUxbV+vr54l8=; b=Z9iRmrbMHZE1OkW/KJInZf/sZ6Cf107x6Ak4mHYo/CJ13hRHNRYPfrlEaodhKAyGejuWLw Y96DGbApQtRZ8Qey9WAIisvehkVH60lt23wSYO/lF2PF4XWbOk3VlXUr6oszamHw+swn8q oqQ+B7ksevSLg4PPCXjDUu7xbhDK3fFVwr1umlziG6dsJha3bxMuOGqw+MUYk71YPmrSbw /xeVihpwvl1iNTNS1PdnHbzkbg4zE0VW7y7i3cByOHKdeCsX/ZIk4AlAHnTvYCFhG0CBbP oc1OsM35LkzZiVs94am4p9ceDkcCKn+g3jTM5PZjywt7p2z2etSQVpVSE8Kcmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746764076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1JqTBZMoEhGQKmu9lUT9JkhUkhKSypMHUxbV+vr54l8=; b=ZYyfXHJ9egif67lb2LQR/JGZWcrxfQW2d1l53//AWmdgQpnxItOuNMeRULczeM6oUNDDzS H0qDoVa/2BJQxTd4QDxlc/W9ee3Z6xR1LB5VACE6Ft1T/Q9soIM3jookv4xyvznLqm7PyD aquB3MrLqnt15jtJaUpz/3K+c03/v8fyuE8KwAdk2r02jwF1Qte1TNEjIDJoQ4LLPA1B9D DC/m/tKrhplSCGIuxrpNy6nQ/8O/txv0F3MgJGwBH3rhiyboSXirOA54ZR/yxWutwlrWdj FN6Yvsc/eFcbwqhtiDtfKgyzP1cbbNFWdbUrAL7/amnn1vkFvIhx/4mWQGvRUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746764076; a=rsa-sha256; cv=none; b=Nt4D6iD/gFltMwT1v0XrbcxrathCY+1E4hORROUvACG+lDo2QtAsxexob9pHM0u2CDvk0z O3LnK4n31fxyleI8XfAJldB6zpvpALXPS+FmFb7YeUyrP6qTbZYybZaczejuh5Xqzst3JJ D72bc6pghMzNw3BB7dWR8P3+bmimDinA6xyTnPkbufYSzd8vvJvlZmjYZOaBjkQwlHU0Qx ekUQMX1k7OlsvD0JbXUNkHrHwqHX97nM0PB67nGx6vG+KQGUYCw9QWZDwix+nZ+9uQxhtl PepK1cjfudWDblJyW0Zq177tcBwcnL15PU+IJ37ZnBpyxWHcsboHcfsDkwEVew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ztwcr1KC8zllV; Fri, 09 May 2025 04:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5494EaDa043012; Fri, 9 May 2025 04:14:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5494EaW1043009; Fri, 9 May 2025 04:14:36 GMT (envelope-from git) Date: Fri, 9 May 2025 04:14:36 GMT Message-Id: <202505090414.5494EaW1043009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: bcd85e0150c9 - main - vm_page: make iter_insert() public List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bcd85e0150c903848f6e0d54f5428931c2f2d575 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=bcd85e0150c903848f6e0d54f5428931c2f2d575 commit bcd85e0150c903848f6e0d54f5428931c2f2d575 Author: Doug Moore AuthorDate: 2025-05-09 04:13:32 +0000 Commit: Doug Moore CommitDate: 2025-05-09 04:13:32 +0000 vm_page: make iter_insert() public In places where vm_page_insert() is used after lookups, or for consecutive pages, use vm_page_iter_insert instead, to exploit locality. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D50248 --- sys/amd64/sgx/sgx.c | 62 ++++++++++++++--------------- sys/arm/nvidia/drm2/tegra_bo.c | 4 +- sys/compat/linuxkpi/common/src/linux_page.c | 11 +++-- sys/dev/drm2/ttm/ttm_bo_vm.c | 9 +++-- sys/vm/vm_page.c | 2 +- sys/vm/vm_page.h | 2 + 6 files changed, 50 insertions(+), 40 deletions(-) diff --git a/sys/amd64/sgx/sgx.c b/sys/amd64/sgx/sgx.c index af8adb763214..60209b04f31f 100644 --- a/sys/amd64/sgx/sgx.c +++ b/sys/amd64/sgx/sgx.c @@ -191,9 +191,20 @@ sgx_put_epc_page(struct sgx_softc *sc, struct epc_page *epc) vmem_free(sc->vmem_epc, addr, PAGE_SIZE); } +static void +sgx_insert_epc_page_by_index(vm_page_t page, vm_object_t object, + vm_pindex_t pidx, struct pctrie_iter *pages) +{ + + VM_OBJECT_ASSERT_WLOCKED(object); + + page->valid = VM_PAGE_BITS_ALL; + vm_page_iter_insert(page, object, pidx, pages); +} + static int sgx_va_slot_init_by_index(struct sgx_softc *sc, vm_object_t object, - uint64_t idx) + uint64_t idx, struct pctrie_iter *pages) { struct epc_page *epc; vm_page_t page; @@ -202,7 +213,7 @@ sgx_va_slot_init_by_index(struct sgx_softc *sc, vm_object_t object, VM_OBJECT_ASSERT_WLOCKED(object); - p = vm_page_lookup(object, idx); + p = vm_radix_iter_lookup(pages, idx); if (p == NULL) { ret = sgx_get_epc_page(sc, &epc); if (ret) { @@ -216,20 +227,16 @@ sgx_va_slot_init_by_index(struct sgx_softc *sc, vm_object_t object, mtx_unlock(&sc->mtx_encls); page = PHYS_TO_VM_PAGE(epc->phys); - - page->valid = VM_PAGE_BITS_ALL; - vm_page_insert(page, object, idx); + sgx_insert_epc_page_by_index(page, object, idx, pages); } return (0); } static int -sgx_va_slot_init(struct sgx_softc *sc, - struct sgx_enclave *enclave, - uint64_t addr) +sgx_va_slot_init(struct sgx_softc *sc, struct sgx_enclave *enclave, + vm_pindex_t pidx, struct pctrie_iter *pages) { - vm_pindex_t pidx; uint64_t va_page_idx; uint64_t idx; vm_object_t object; @@ -239,12 +246,10 @@ sgx_va_slot_init(struct sgx_softc *sc, VM_OBJECT_ASSERT_WLOCKED(object); - pidx = OFF_TO_IDX(addr); - va_page_idx = pidx / SGX_VA_PAGE_SLOTS; idx = - SGX_VA_PAGES_OFFS - va_page_idx; - ret = sgx_va_slot_init_by_index(sc, object, idx); + ret = sgx_va_slot_init_by_index(sc, object, idx, pages); return (ret); } @@ -614,19 +619,8 @@ static struct cdev_pager_ops sgx_pg_ops = { }; static void -sgx_insert_epc_page_by_index(vm_page_t page, vm_object_t object, - vm_pindex_t pidx) -{ - - VM_OBJECT_ASSERT_WLOCKED(object); - - page->valid = VM_PAGE_BITS_ALL; - vm_page_insert(page, object, pidx); -} - -static void -sgx_insert_epc_page(struct sgx_enclave *enclave, - struct epc_page *epc, uint64_t addr) +sgx_insert_epc_page(struct sgx_enclave *enclave, struct epc_page *epc, + uint64_t addr, struct pctrie_iter *pages) { vm_pindex_t pidx; vm_page_t page; @@ -636,12 +630,13 @@ sgx_insert_epc_page(struct sgx_enclave *enclave, pidx = OFF_TO_IDX(addr); page = PHYS_TO_VM_PAGE(epc->phys); - sgx_insert_epc_page_by_index(page, enclave->object, pidx); + sgx_insert_epc_page_by_index(page, enclave->object, pidx, pages); } static int sgx_ioctl_create(struct sgx_softc *sc, struct sgx_enclave_create *param) { + struct pctrie_iter pages; struct sgx_vm_handle *vmh; vm_map_entry_t entry; vm_page_t p; @@ -712,8 +707,9 @@ sgx_ioctl_create(struct sgx_softc *sc, struct sgx_enclave_create *param) } enclave->secs_epc_page = epc; + vm_page_iter_init(&pages, object); VM_OBJECT_WLOCK(object); - p = vm_page_lookup(object, SGX_SECS_VM_OBJECT_INDEX); + p = vm_radix_iter_lookup(&pages, SGX_SECS_VM_OBJECT_INDEX); if (p) { VM_OBJECT_WUNLOCK(object); /* SECS page already added. */ @@ -722,7 +718,7 @@ sgx_ioctl_create(struct sgx_softc *sc, struct sgx_enclave_create *param) } ret = sgx_va_slot_init_by_index(sc, object, - - SGX_VA_PAGES_OFFS - SGX_SECS_VM_OBJECT_INDEX); + - SGX_VA_PAGES_OFFS - SGX_SECS_VM_OBJECT_INDEX, &pages); if (ret) { VM_OBJECT_WUNLOCK(object); dprintf("%s: Can't init va slot.\n", __func__); @@ -762,7 +758,7 @@ sgx_ioctl_create(struct sgx_softc *sc, struct sgx_enclave_create *param) page = PHYS_TO_VM_PAGE(epc->phys); sgx_insert_epc_page_by_index(page, enclave->object, - SGX_SECS_VM_OBJECT_INDEX); + SGX_SECS_VM_OBJECT_INDEX, &pages); VM_OBJECT_WUNLOCK(object); @@ -786,6 +782,7 @@ static int sgx_ioctl_add_page(struct sgx_softc *sc, struct sgx_enclave_add_page *addp) { + struct pctrie_iter pages; struct epc_page *secs_epc_page; struct sgx_enclave *enclave; struct sgx_vm_handle *vmh; @@ -857,8 +854,9 @@ sgx_ioctl_add_page(struct sgx_softc *sc, addr = (addp->addr - vmh->base); pidx = OFF_TO_IDX(addr); + vm_page_iter_init(&pages, object); VM_OBJECT_WLOCK(object); - p = vm_page_lookup(object, pidx); + p = vm_radix_iter_lookup(&pages, pidx); if (p) { VM_OBJECT_WUNLOCK(object); /* Page already added. */ @@ -866,7 +864,7 @@ sgx_ioctl_add_page(struct sgx_softc *sc, goto error; } - ret = sgx_va_slot_init(sc, enclave, addr); + ret = sgx_va_slot_init(sc, enclave, pidx, &pages); if (ret) { VM_OBJECT_WUNLOCK(object); dprintf("%s: Can't init va slot.\n", __func__); @@ -898,7 +896,7 @@ sgx_ioctl_add_page(struct sgx_softc *sc, goto error; } - sgx_insert_epc_page(enclave, epc, addr); + sgx_insert_epc_page(enclave, epc, addr, &pages); VM_OBJECT_WUNLOCK(object); diff --git a/sys/arm/nvidia/drm2/tegra_bo.c b/sys/arm/nvidia/drm2/tegra_bo.c index 8952d09eec3d..73ba82f2f883 100644 --- a/sys/arm/nvidia/drm2/tegra_bo.c +++ b/sys/arm/nvidia/drm2/tegra_bo.c @@ -133,6 +133,7 @@ retry: static int tegra_bo_init_pager(struct tegra_bo *bo) { + struct pctrie_iter pages; vm_page_t m; size_t size; int i; @@ -143,6 +144,7 @@ tegra_bo_init_pager(struct tegra_bo *bo) if (vmem_alloc(kernel_arena, size, M_WAITOK | M_BESTFIT, &bo->vbase)) return (ENOMEM); + vm_page_iter_init(&pages, bo->cdev_pager); VM_OBJECT_WLOCK(bo->cdev_pager); for (i = 0; i < bo->npages; i++) { m = bo->m[i]; @@ -159,7 +161,7 @@ tegra_bo_init_pager(struct tegra_bo *bo) */ m->oflags &= ~VPO_UNMANAGED; m->flags |= PG_FICTITIOUS; - if (vm_page_insert(m, bo->cdev_pager, i) != 0) + if (vm_page_iter_insert(m, bo->cdev_pager, i, &pages) != 0) return (EINVAL); } VM_OBJECT_WUNLOCK(bo->cdev_pager); diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index b5a0d34a6ad7..93aaea01f0df 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -296,23 +296,27 @@ vm_fault_t lkpi_vmf_insert_pfn_prot_locked(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, pgprot_t prot) { + struct pctrie_iter pages; vm_object_t vm_obj = vma->vm_obj; vm_object_t tmp_obj; vm_page_t page; vm_pindex_t pindex; VM_OBJECT_ASSERT_WLOCKED(vm_obj); + vm_page_iter_init(&pages, vm_obj); pindex = OFF_TO_IDX(addr - vma->vm_start); if (vma->vm_pfn_count == 0) vma->vm_pfn_first = pindex; MPASS(pindex <= OFF_TO_IDX(vma->vm_end)); retry: - page = vm_page_grab(vm_obj, pindex, VM_ALLOC_NOCREAT); + page = vm_page_grab_iter(vm_obj, pindex, VM_ALLOC_NOCREAT, &pages); if (page == NULL) { page = PHYS_TO_VM_PAGE(IDX_TO_OFF(pfn)); - if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) + if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) { + pctrie_iter_reset(&pages); goto retry; + } if (page->object != NULL) { tmp_obj = page->object; vm_page_xunbusy(page); @@ -336,10 +340,11 @@ retry: vm_page_remove(page); } VM_OBJECT_WUNLOCK(tmp_obj); + pctrie_iter_reset(&pages); VM_OBJECT_WLOCK(vm_obj); goto retry; } - if (vm_page_insert(page, vm_obj, pindex)) { + if (vm_page_iter_insert(page, vm_obj, pindex, &pages) != 0) { vm_page_xunbusy(page); return (VM_FAULT_OOM); } diff --git a/sys/dev/drm2/ttm/ttm_bo_vm.c b/sys/dev/drm2/ttm/ttm_bo_vm.c index 38575fc8a74b..b10c5f87a394 100644 --- a/sys/dev/drm2/ttm/ttm_bo_vm.c +++ b/sys/dev/drm2/ttm/ttm_bo_vm.c @@ -100,7 +100,7 @@ static int ttm_bo_vm_fault(vm_object_t vm_obj, vm_ooffset_t offset, int prot, vm_page_t *mres) { - + struct pctrie_iter pages; struct ttm_buffer_object *bo = vm_obj->handle; struct ttm_bo_device *bdev = bo->bdev; struct ttm_tt *ttm = NULL; @@ -114,6 +114,7 @@ ttm_bo_vm_fault(vm_object_t vm_obj, vm_ooffset_t offset, if (*mres != NULL) { (void)vm_page_remove(*mres); } + vm_page_iter_init(&pages, vm_obj); retry: VM_OBJECT_WUNLOCK(vm_obj); m = NULL; @@ -234,10 +235,12 @@ reserve: ttm_bo_unreserve(bo); goto retry; } - m1 = vm_page_lookup(vm_obj, OFF_TO_IDX(offset)); + pctrie_iter_reset(&pages); + m1 = vm_radix_iter_lookup(&pages, OFF_TO_IDX(offset)); /* XXX This looks like it should just be vm_page_replace? */ if (m1 == NULL) { - if (vm_page_insert(m, vm_obj, OFF_TO_IDX(offset))) { + if (vm_page_iter_insert( + m, vm_obj, OFF_TO_IDX(offset), &pages) != 0) { vm_page_xunbusy(m); VM_OBJECT_WUNLOCK(vm_obj); vm_wait(vm_obj); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 9ef9da737ded..8e32da5ea610 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1532,7 +1532,7 @@ vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) * * The object must be locked. */ -static int +int vm_page_iter_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex, struct pctrie_iter *pages) { diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 3d7257644ef6..6c1826bc68e6 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -653,6 +653,8 @@ int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_invalid(vm_page_t m); void vm_page_iter_free(struct pctrie_iter *pages, vm_page_t m); void vm_page_iter_init(struct pctrie_iter *, vm_object_t); +int vm_page_iter_insert(vm_page_t m, vm_object_t, vm_pindex_t, + struct pctrie_iter *); void vm_page_iter_limit_init(struct pctrie_iter *, vm_object_t, vm_pindex_t); bool vm_page_iter_remove(struct pctrie_iter *pages, vm_page_t m); bool vm_page_iter_rename(struct pctrie_iter *old_pages, vm_page_t m, From nobody Fri May 9 09:43: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 4Zv3ws56m6z5vQkH; Fri, 09 May 2025 09:43: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zv3ws2wLqz3cVN; Fri, 09 May 2025 09:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746783837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U9irgCqJ+waDLMvgDhSR+3xG+6iEdYXh1o80nPp+X+c=; b=ilUFojim1Gp2NkVLgeNC8X/ysaEEM5gnpN6prDutZbmwR3Au1htOsihFME01Y3lbcOVAVB qn42JUu8PBVQvV7UUAhy2HFzwjT064i9YsZsxrthRUt4Qb7BKgHofwLuFZqaL0vozFRrAJ kzU2ou8vQqyy8fcKMYNSz8GvRqEdRVcXdqtYeQXekC7QuO0utf5ay26WKVVzjuDWzLw5s8 +UZn/XNcTcBpUm7gV/gmFsv/ugjGTXJPiofkZtXBo7l8lzXJGvQ7yZtzTgnQCpBwukqAVG T5inOb8+sKqtOqofvH7lW5J9iE5BoYjogF/yiiuF9j/7auFO27vWatzSYoPGrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746783837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U9irgCqJ+waDLMvgDhSR+3xG+6iEdYXh1o80nPp+X+c=; b=fB5flMHUgPj9A7m95Qa//xmcHmpVTNqGIJ2chKBwbFIEkQP9RWSKictCgV4qBSFNvF/Z1l 7gFZ6n70OLZjUzxaDPNOTPGo8B1wOAZQno0ZQxBF1NDgaxy7P2M5oJejEIPJszyLQ08JNQ VNLvplms8YrZMgccctmgeiXAGjUywvpLL49d4P8Jq4u6wqy0WmiHyJuf08WEaefplxhbVC SIcLhAf926qe4oH6jyBr+5iUnZ4bhY3eONvvcppuA82hMfbFZ2dOjBWc8OQcUrxgnXzEU+ YTJo70SZP3uZawhZ5mSTOra88gBBqnemuAQuUgbceOrVeih2Wq0YZLOBD9RJEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746783837; a=rsa-sha256; cv=none; b=BTpsMz/SU+SOZU801YSnC0NHripsE3rodqZL7lVbhvbzP1JK9vIosNt3Z3/Z/H6txji3sx XzPot5OiKXK6ORtyepZogmsrzicJWuq43g11yzPCMe7MGACDqKeKkNlWTh7+JjrHm7oYig 3nM/K7GroXzeetM/kQGGXBPkpad9pCMidhaVYDx7Z8AKAdKBC0tYgihCMM3B/pManEdtUG JReObs+9ik3Stria833XapxHTudyGY6QEg/FZtge1VuiSvyxU/2tSVWBMK7wcSd8+2OozK jN+eWC1kyn5Zmf9Mx1xhVSPK2983KcvIAsmhtkGmVVfN0w4pX9cE4msWAWvDYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zv3ws1qFYzvpD; Fri, 09 May 2025 09:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5499hvmA058528; Fri, 9 May 2025 09:43:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5499hv62058525; Fri, 9 May 2025 09:43:57 GMT (envelope-from git) Date: Fri, 9 May 2025 09:43:57 GMT Message-Id: <202505090943.5499hv62058525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: de121c54781b - main - jail: copy MTU settings to vnet interface List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de121c54781b92d4287277eefa8fd3eb783c8290 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=de121c54781b92d4287277eefa8fd3eb783c8290 commit de121c54781b92d4287277eefa8fd3eb783c8290 Author: Mariusz Zaborski AuthorDate: 2025-05-09 09:42:07 +0000 Commit: Mariusz Zaborski CommitDate: 2025-05-09 09:42:07 +0000 jail: copy MTU settings to vnet interface Reported by: Arne Steinkamm Reviewed by: bapt, thj Differential Revision: https://reviews.freebsd.org/D48334 --- share/examples/jails/jng | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/examples/jails/jng b/share/examples/jails/jng index 610b08f96840..53dc680e6312 100755 --- a/share/examples/jails/jng +++ b/share/examples/jails/jng @@ -314,6 +314,8 @@ jng_bridge() ngctl name $iface:lower ${iface}bridge || return fi + mtu=$(ifconfig ${iface} | sed -n '1s/^.*mtu //p;') || return + # Optionally create a secondary bridge if [ "$bridge" != "bridge" ] && ! ngctl info "$iface$bridge:" > /dev/null 2>&1 @@ -346,6 +348,7 @@ jng_bridge() echo $2 ) || return ngctl name "$iface$bridge:link$num" $eiface || return ifconfig $new name $eiface || return + ifconfig $eiface mtu $mtu || return ifconfig $eiface up || return # From nobody Fri May 9 11:08:46 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 4Zv5pl1HvJz5vWc9; Fri, 09 May 2025 11:08: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zv5pk73G4z4L2B; Fri, 09 May 2025 11:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746788927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UcQGsStxV7WqVy3r8zwRVMA8+V91xp2CempC91DzN0M=; b=Kr3A0pRwvZA5Eo4Po2m+EnfwGwOHH78g2tRDcUXsOK4ffQk/OP3swy7H8+xtwFjDPN4XUM k8j0HN/XS12cVuKwJcdXi5LSaMoy2xye6SU7CHKe5H+kysBOr83lzrt+KVmHp0NZKf4M2c cNGXyIntOoBhtdRHyfq74VrdL+sXrHr1fRc2KAdq6gS5MJQE4dnS6+sBOb5rHt3OGgbqKZ R/uUQxK9lnIdUVQSji4Su8XhIvO4FQgr+lNZ8FzR+eM5/zPgwnZmDhlK2JBy2MRBIWK8h+ EqmNSH+h+zGRp4G1ov4fWQmMBmyLi2F8PDkTm13X9VZ3L6pEhlM0DSyNgFON/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746788927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UcQGsStxV7WqVy3r8zwRVMA8+V91xp2CempC91DzN0M=; b=K6dvDa6Je6iNi0oyH3DzQ6EJbZJuijn7eCT42TMjtheqYMHBIpALE+bqPsB0jvI+rOmp/u 8w9gV9anjFTFUaRVHWI0qQTgmKJKymCwNWQFMNZ79V1Z8xRKpfy3M7Ml2bgDyXy2qU9NWc Y4uE1VXaApmYeM0ZkeU44glesSHfTm3uicBbvWAFl9baRQlw1Cw88xR3BQsikr6grgeXxJ FQA3QcX51YAqlMEyMv6b2mcUmLoscO6klQ8kFOO1diHNbq4w2Tv7GnMdTALR9J/pBx7Xeu lGXmGl7Gift1JKkxy99SlEbvdz9D7iKszyhUOMddTZmz0vlS1jG2kiATwm/k9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746788927; a=rsa-sha256; cv=none; b=tBRDtgVZh0L0NUDMCgxs4Ofew3ITttUdP0sAZd//DHjkPEW6hIfIUIl8QqzFiZdCI05hQ3 2dHAzwzyJBO3b/7XbQ2C1eyKe0w5Uo4dt7RVaWxtv+v8b4KnczCZxhO7PolE7ZkZFaY4UD xwpXdjpIjPjErc6TR20kTYY4l3qcye0qNBYECAnMvk63NwwGcUFwOfvfvTAnNGI/h6e1d3 vL0mYIwGaolsWjFxJmoG/87P5zpOefYsM8VFvEWrnxuWR6YUvvU/1BVZsJ257FktaXYptx dT/G2JvCWW8r4n/sNavXDC7rBOEbMTP3n2bBEtSSLbHNux+d0StPolYhXfAiLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zv5pk6NLVzxtP; Fri, 09 May 2025 11:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549B8kOc010937; Fri, 9 May 2025 11:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549B8kd1010934; Fri, 9 May 2025 11:08:46 GMT (envelope-from git) Date: Fri, 9 May 2025 11:08:46 GMT Message-Id: <202505091108.549B8kd1010934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 4a38527105d5 - main - pci: Ignore PCRx devices resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a38527105d551d4ed3f8d8b51e055cc79be7c1b Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4a38527105d551d4ed3f8d8b51e055cc79be7c1b commit 4a38527105d551d4ed3f8d8b51e055cc79be7c1b Author: Andrew Turner AuthorDate: 2025-05-03 05:59:45 +0000 Commit: Andrew Turner CommitDate: 2025-05-08 18:38:36 +0000 pci: Ignore PCRx devices resources Some systems provide two PCI root complex devices in the ACPI tables. Allow us to skip known pci-like devices even if they aren't detected as a PCI root complex. Reviewed by: cognet, jhb Co-authored-by: cognet Differential Revision: https://reviews.freebsd.org/D49709 --- sys/dev/acpica/acpi_resource.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index 8c5a3ed57f32..8ced9b32cb22 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -67,6 +67,16 @@ struct lookup_irq_request { static char *pcilink_ids[] = { "PNP0C0F", NULL }; +/* + * Devices with invalid memory resources + */ +static char *bad_memresource_ids[] = { + /* PRCx on Radxa Orion O6 conflicts with the PCI resource range */ + "CIXH2020", + NULL +}; + + static ACPI_STATUS acpi_lookup_irq_handler(ACPI_RESOURCE *res, void *context) { @@ -620,6 +630,11 @@ acpi_res_ignore(device_t dev, int type, rman_res_t start, rman_res_t count) * access. */ if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + if (type == SYS_RES_MEMORY && + ACPI_ID_PROBE(device_get_parent(dev), dev, bad_memresource_ids, + NULL) <= 0) + return (true); + if (ACPI_SUCCESS(AcpiGetObjectInfo(ad->ad_handle, &devinfo))) { if ((devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) { #if defined(__i386__) || defined(__amd64__) From nobody Fri May 9 14:59: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 4ZvBwV0fX9z5vmqJ; Fri, 09 May 2025 14:59: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvBwT4VKmz3nyM; Fri, 09 May 2025 14:59:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746802745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=suffmhzofC9CwAMDW9Grxf4t6M6ye9A3tG9CzJ8qmxk=; b=quwVeC7LYCr3Q/bphwOIl/eJ5/nrlSPLgNidBIqNTKIty5VZZAqUUH+neBmcDfjNvh8I+Q hVqRNrTCvvSQDSJ85bLe9/jR+CKQYmMxChR+22VH8DmOBXKwLewjO7OU1aw78V5blb5W42 k9oc68tmWS/rEHD+et1QzGvtKfhqxKDjqEcO9WkSFbZ+Q6kFi2JDtCaUQZYj7XHg/qRWSl tJDMgfHSdzpieHQgwAtFjum8EivFYa/Q5NOOnB+k1UqJO8J8TJAsviuvxJ7oYKl2s7qf// KOFV7w6bU7Y9R2qHzWbN71Kptc9i/Vq3RbOkvWtC0bPCkLYAnPI2XEnTPMEicA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746802745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=suffmhzofC9CwAMDW9Grxf4t6M6ye9A3tG9CzJ8qmxk=; b=wu2O+MZQGIWZeh+VfuZjypYymCwYwWvCqa2My720eAtAPrAQWEMvwJk7gd4P8zmNiFpkJL k6kiL6homIDDnqNRBhBFTIwNL5wqgSDy3kzWQUEDzGaJiN6QNNFNj6EwV1mXShSwDZoAKD cWg8LKiUkDOIq5RY2rFZJ1p90zp9a72LUiliC4U5rrIaoeVAterBaAVHqN5oThXYqUsgbf xFJgKXqNlBV8CuyrlgdyxOqo9PmDlhSjDQCWQQq2HdEZWui1O1eeg6yZGjZQxJ2cBTFX3y q5a+E9CagEyWMfJgt2Eb3E0Gg3Bq3UYDEGe6zi4hNOPRnaWwOm/V9SGLO1CC+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746802745; a=rsa-sha256; cv=none; b=fi16wFbxPRu5CgMyi5hxuD+xmTboWzl5nhVuPxP7iXn/cQCtBp/XANllGKsiziH3NH3MzE YQPsWYItec9jjLidv7ch3uxaufqavNzWeAjbtdBbNjuRdAFCrPNt/quU7hZVLvhgmeNm/h sc2ezum6btrYcb7MvKQoVSXc2gTcA1O8yqYjmySVA4KbO+Wn/VajXSLutXnuzBYIwvAVBX S6aFyrGSBI/Au1zzcuO6nKxyvfhFpVd3FmsswZg5+6mIceETosytZWypNFYOUSRsDT0npa JdMRL0FiUJMYXM4YsvQKL+rMr7rmqkLxyEMU92PeQWYcSsE1K43Y+MWYBW+Lqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvBwT3c5gz14qh; Fri, 09 May 2025 14:59:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549Ex5ND041363; Fri, 9 May 2025 14:59:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549Ex5IX041360; Fri, 9 May 2025 14:59:05 GMT (envelope-from git) Date: Fri, 9 May 2025 14:59:05 GMT Message-Id: <202505091459.549Ex5IX041360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 7ffedfe14ca8 - main - service(8): Allow for passing no arguments to the service script List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ffedfe14ca85aa3474980092a732d4e49309c62 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=7ffedfe14ca85aa3474980092a732d4e49309c62 commit 7ffedfe14ca85aa3474980092a732d4e49309c62 Author: sd@mostnet.ru AuthorDate: 2025-05-09 14:48:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-05-09 14:56:58 +0000 service(8): Allow for passing no arguments to the service script Currently, service(8) requires the user to provide a command to the rc service script. For example, service cron does not even run the cron rc service script but instead shows the usage message of service(8). This patch makes it so running the rc service script with no arguments via service(8) is closer to running the rc service script directly (e.g., /etc/rc.d/cron). Long story short, for most of the rc service scripts this change means that running "service FOO" now shows the usage message of FOO instead of the usage message of service(8). PR: 255115 Reviewed by: bnovkov, christos, imp, lme, markj Approved by: bnovkov (mentor), christos (mentor), markj (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47328 --- usr.sbin/service/service.8 | 4 ++-- usr.sbin/service/service.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/service/service.8 b/usr.sbin/service/service.8 index 1adff6a0de49..a8f1a509885f 100644 --- a/usr.sbin/service/service.8 +++ b/usr.sbin/service/service.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 19, 2025 +.Dd May 9, 2025 .Dt SERVICE 8 .Os .Sh NAME @@ -48,7 +48,7 @@ .Op Fl v .Op Fl E Ar var=value .Ar script -.Ar command +.Op Ar command .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index 245430107277..8b7aa937967b 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -162,7 +162,7 @@ if [ -n "$RCORDER" ]; then exit 0 fi -if [ $# -gt 1 ]; then +if [ $# -gt 0 ]; then script=$1 shift else From nobody Fri May 9 18:53: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 4ZvJ7V2Nd4z5w1pj; Fri, 09 May 2025 18:53: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvJ7V1qsLz3fGP; Fri, 09 May 2025 18:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746816838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QY1KjyC0GbqV8NR4bOsU1iwq53ScsEwG2tuZy5CJEPw=; b=xU95cYuX2PNm9oBSw47TJkWK1PV11EiEE+KD8ZpEwIXjzT0G0oBnHVjTcvD7DA3QZ3PJVX hyDvxjVVNNstMrAXrFr7y1Zwr1yJcGXaYMjA3qB+EzD4NRxAMlaftQVFuaa9YU87SsGTTj 9U5VgmmUwVrHKwuOjrdYnUrWcq8wpx3aXynNyXPhZw6yqMm3fUHFvtds63563lPJcvBRq3 ZJz0Hg60M02eo54+TQHIXA75m++W1W8zXZ3qJxMsArxLN8svF6Txl332SCDLj39Y6yLjso Y9ocrmglOZ+fgkRoekgz+dISIatFRAimgBnLbydICFrFLpWTj0OyP7ZXYdhKFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746816838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QY1KjyC0GbqV8NR4bOsU1iwq53ScsEwG2tuZy5CJEPw=; b=ugLsrXTUzjWjNkUwvXk425r+y38DGwFbW82yOZn9ICs8tBmmziL4Tn/qn5eVU7yXbKCUCB oBR9cUuOY6JkvpFftn61NTYC9FAaylTqkmA/86/rVaJiP94ISd0w0IC2Ua0NWGkbYjxz6x AFZePxszMy8DJDWdmLd98QhpwcQGRr9jO7cdcbS8s+t59C40wa46hETWuNjny17kXzD6RS n81uYlbreFo7StqMNfGYQBVL2sUZuYNbyfU3eLTcMaIQ/jTJfoE9L9CtCMLWzfxNyJtDSK EX8PTP/lEUR9MGNSBVUESk099xEofMqaccAXZLtr9nfu5dlbakORhq8eXQYlzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746816838; a=rsa-sha256; cv=none; b=qyY/k9K9+RGRIuzWr8TwbMkf+Zft7FhRofc7wuMa/ERX1tgwEaH1TjJ0pt8CJkvzKenYZD u0QH9qg7RadGvvY5rtvLxTmGvfJbl+8SYSjes3KDccNtiTLehtxqyqz/TOt28fv7vdWeur JHrT55fm8EY72qkYQg1VICKnlHsJ7NNciD6epDUxEVhPAOxh9gC8z5a9liYBUwDstld/+E hM0gHHF8CE1+v76SngS508uG9dWZnfSyAeXfhf75C8S4lPozpSxsWqY3y628IPgvg+uzDN jHlh8zq8Rbep4048PV5r1NG31mXac4ABlZhoilVyt2zPPgCNRtH1zM6Kg9/EqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvJ7V1PpWz1BHs; Fri, 09 May 2025 18:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549IrweZ087489; Fri, 9 May 2025 18:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549IrwDU087486; Fri, 9 May 2025 18:53:58 GMT (envelope-from git) Date: Fri, 9 May 2025 18:53:58 GMT Message-Id: <202505091853.549IrwDU087486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: 5d50c2397a96 - main - src.conf.5: Add WITH_ZONEINFO_LEAPSECONDS_SUPPORT 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d50c2397a96c2b24219df53c7e94c5d512d65e1 Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=5d50c2397a96c2b24219df53c7e94c5d512d65e1 commit 5d50c2397a96c2b24219df53c7e94c5d512d65e1 Author: Andrew Gierth AuthorDate: 2025-05-09 18:04:17 +0000 Commit: Joseph Mingrone CommitDate: 2025-05-09 18:53:42 +0000 src.conf.5: Add WITH_ZONEINFO_LEAPSECONDS_SUPPORT warning People are turning on the option and then tripping over weird consequences. See bugs 248338 and 271170 as examples. Approved by: cy, imp, philip Differential Revision: https://reviews.freebsd.org/D25902 Co-authored-by: Joseph Mingrone --- share/man/man5/src.conf.5 | 7 ++++++- tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index b3a327069393..ba88b995e51d 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 May 5, 2025 +.Dd May 9, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1896,6 +1896,11 @@ When set, it enforces these options: .El .It Va WITH_ZONEINFO_LEAPSECONDS_SUPPORT Build leapsecond information in to the timezone database. +This option violates +.St -p1003.1 +and all other applicable standards, and is known to cause unexpected +issues with date/time handling in many applications and programming +languages. .El .Pp The following options accept a single value from a list of valid values. diff --git a/tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT b/tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT index f3d97df2fb89..32aadf6d46c9 100644 --- a/tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT +++ b/tools/build/options/WITH_ZONEINFO_LEAPSECONDS_SUPPORT @@ -1 +1,6 @@ Build leapsecond information in to the timezone database. +This option violates +.St -p1003.1 +and all other applicable standards, and is known to cause unexpected +issues with date/time handling in many applications and programming +languages. From nobody Fri May 9 19:06: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 4ZvJQQ69rqz5w20K; Fri, 09 May 2025 19:06:54 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvJQQ1ytlz3nWC; Fri, 09 May 2025 19:06:54 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108160.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 549FK4dh023838; Fri, 9 May 2025 12:06:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h= cc:content-id:content-type:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=PPS1017; bh=ZWppJ30ssJYJb AzBTInxTnUuuLK9BdNJSlvQ06I45Gg=; b=bv/M50xac8GZfMDJ2sjdcfv7NH1iF TVODY4BNGbonPeb/SBBVPwXyYDALxNHgKijZrcx/2/Ig++RNUdU0lQKkfC49xjzw AURCnmeEqBd5D2eWGvcU6d2aRxuTheake6sGz8RZbdmW525snNiy9OZzZV0oOPFi 25vmAOmTcX+/cC/jKGHgwMDCGeQLijUWe1y8tcHYnbs/hntNvAeKV7Bm9qhGPSM0 D6qAYwRmPlqC5JjEVqAPtsoK08SjD/e2FQqXDjXv3MfIgVbM56g2QO2kLkLpU8lM vLVRsBZW7Pp0oHU8QkCa9UHwWyeU+rz/9NFu/Tu+Z+QNPIDnqs88XOfXQ== Received: from bn1pr04cu002.outbound.protection.outlook.com (mail-eastus2azlp17010019.outbound.protection.outlook.com [40.93.12.19]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 46h2p12k3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 May 2025 12:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eQtCQXmQjssju2ETcfVer8EzKG9wA53jJX8CAOwcuNXu6WA5jZhRqvNMjHck4M5V7VF7GW0DI8GSJNYMsCnO4YQEliNrASXcD5IPaQkiFCgVSDDToJqxD131crClNt5yEUYWcC1jy/uHlvXlUrbSFB3ErL52ZwZs8O7GundYkuRHm00iMQmdgtQ/DAw9OZEU4mlsgnk8KnpQV9fb9rtE2pdonjxZYpfEmaWDkRwbSsgg/Anm/Dxjw22yPwpI5n+vMgdIoUrnyQltEaeVD42/KAEdu7/u4Fob1mwvi7ij4RWwueethoyR3VPyTmtvVvnfJj0c4GACUT3XY57HE23aOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZWppJ30ssJYJbAzBTInxTnUuuLK9BdNJSlvQ06I45Gg=; b=yhgUkCm6xi25r8nAhwoX61adG2S4SH5JYjhQqpoQ5/HrRCDHjy3blfVeTVpd4p1JzWScJLfEr/mGQhoYInrRAjbpi37uXNfaea6gzCV403tiu5ICyBWrWl7PvKZOTgCyBEWWU2HBUGL+Bn4l8yCHXQjaExYIqIM/A2sFGkYuHM8UG6vpra6Bl73VUnxA9ZYQl084/ewtaZ+1I91k7cwMo1cHWF0eoYoPdabimh4yeQi2Ovpg1f3Xcm3zvTAc2MQ5+PiLpjZGpHQ/ohcOZaVUAhugO00xP9e9fbfGuzDDCYnx6hu8spvrpzNtcRCcVw7z8cgOWh+0wfJgNlYDw3gsQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.15) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZWppJ30ssJYJbAzBTInxTnUuuLK9BdNJSlvQ06I45Gg=; b=KJrEIokj5r33qgTSr63KnjbDS92j5HmTTrs5h5pdcrpPI9mguGVC4UGl5gXy8y7G+SA01Sylu2IsG7eFpiDM4b6nPmmTW3z+WMxdOm3dFY2UHrMuwI6PwpfUfSmeg5Q2alCfbMUDjmex8KcyxXfNNfiAAVhfkl2o/uOF6oDKSgI= Received: from SJ0PR03CA0153.namprd03.prod.outlook.com (2603:10b6:a03:338::8) by PH0PR05MB8042.namprd05.prod.outlook.com (2603:10b6:510:a0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.23; Fri, 9 May 2025 19:06:50 +0000 Received: from CO1PEPF000066E7.namprd05.prod.outlook.com (2603:10b6:a03:338:cafe::d0) by SJ0PR03CA0153.outlook.office365.com (2603:10b6:a03:338::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8699.30 via Frontend Transport; Fri, 9 May 2025 19:06:50 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.15) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.15 as permitted sender) Received: from p-exchfe-eqx-02.jnpr.net (66.129.239.15) by CO1PEPF000066E7.mail.protection.outlook.com (10.167.249.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.18 via Frontend Transport; Fri, 9 May 2025 19:06:48 +0000 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchfe-eqx-02.jnpr.net (10.104.9.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 9 May 2025 14:06:48 -0500 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 9 May 2025 14:06:47 -0500 Received: from kaos.jnpr.net (10.104.20.6) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server id 15.2.1544.14 via Frontend Transport; Fri, 9 May 2025 14:06:47 -0500 Received: by kaos.jnpr.net (Postfix, from userid 1377) id 5338FDCDDF; Fri, 09 May 2025 12:06:11 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 08B38DD633; Fri, 09 May 2025 12:06:11 -0700 (PDT) To: Kyle Evans CC: Brooks Davis , , , , Subject: Re: git: 78661696e639 - main - loader: i386: use -z nostart-stop-gc for bfd as well In-Reply-To: References: <202505081947.548JlM93086830@gitrepo.freebsd.org> Comments: In-reply-to: Kyle Evans message dated "Thu, 08 May 2025 19:08:09 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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-ID: <31838.1746817571.1@kaos.jnpr.net> Date: Fri, 9 May 2025 12:06:11 -0700 Message-ID: <34618.1746817571@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000066E7:EE_|PH0PR05MB8042:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ced7f0a-e048-4229-abc0-08dd8f2ca668 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Wmq6HMQXLkKAV42bXeALP0J8bVmjghmJH653x7Rrjw0pVDkzVH+PwrQ9x4dj?= =?us-ascii?Q?+P6PFwJIrwDwIaCjHEsuXxDYX5oI/S4VVzwtmm2BssjV/j+mNwH1pLnGVXyK?= =?us-ascii?Q?SkSzlw1JzULAhONOZhZx6vxEb7mbOLBfGVf2J6JTpXtF75IUyLiaG5wIZhI5?= =?us-ascii?Q?Pvj1X4JqYKj8TbTPg5XJP9q1fmykKzFAzk6ZKQQVAfTxL4CLev9K5Bu+0OEc?= =?us-ascii?Q?SuwFZqxmZPQXxabodZ2TM8dq8dmwbXcO6u1a1I96g/pZS2yEmv9rqPHTgrwy?= =?us-ascii?Q?HjxIMvCebTi+SdqKhlJdMgPxXilxU9nCFdgQFp2eIABNFdEKehyMxHT4Cp72?= =?us-ascii?Q?GVKJnzN4f0mwSuY+VJHNn0UrnBrG5ZD19q8bvrlf1JItVBHpzK50vg7eFccw?= =?us-ascii?Q?R+TOgpGYjL7FFqyc6Q9oMFW7vRxJGaeG4LZhWSeKqC1DjucV1nlCVMq0rQ+P?= =?us-ascii?Q?4Vqt4iq/OEROnmQ1VuPAIW8K3S9UVx+vt4+oXQOk/453i74IrEEKZ1M4db0/?= =?us-ascii?Q?Xn2R4zgGEcHO+MZ2j/N6g269FL4pTpCghDGzRfVxdYQU/7vEy9iQ0OZJZtd/?= =?us-ascii?Q?FfsLeG7eUj8bpUkMzKiyslywQ/7Yb3if+s3JFWJXltHZbptcP9/hoM6oUTph?= =?us-ascii?Q?wqf5N9FzoGAjSiJMEGDPj/7tocSo/kv15E4z0mKbUh2bddHbHJBWsvgXDTN9?= =?us-ascii?Q?Ct0W7lGFhOUMdPIa3X8nxqRXfdsX7K/sdUQPaG5URB4+NMnqxb9fJduc5MFw?= =?us-ascii?Q?Mm/2sfznMCY9fnIOg1njDU2faCySb4d9LFoYg6sgxX5tl2ggwCe5AdN0DCfu?= =?us-ascii?Q?ZEKnKll8Z+bCt9ja8lkdEPzTuryYxzJ5GAPFSkLt426oVNCRo5gx/AlRFEH1?= =?us-ascii?Q?FhxI4whEjbauwMeKa0KYOfMZ5cOgyclmv3+D8MhP3JmIawlc14aI3avd2ope?= =?us-ascii?Q?nxDtfhmAlNJ7Oo8johYtYk+8RaNMOltBQCMUckHodQFYr/WbTA2MgQVjTEdd?= =?us-ascii?Q?jtRPihMBp0DIXBNjd7KGKCEM+y0sXo4oN1MTRspFvGFyRgR1uHWCFaWtN5co?= =?us-ascii?Q?EvTI/HJ1Onk2sNQF3iTaJiCff3gJU6L+rz5E1j3NMWdn06QglSRT2WuyTzWj?= =?us-ascii?Q?jQ534wuuZ2tt5YwHCaDL7WBBnX8F5P5ifh+b3fc1WITC7zs11TOm8lMIrnJj?= =?us-ascii?Q?KMcEA+oCad7MsbxNZVEKKFQF3D2dQgX63ATx4yPx8zuF1lubK81efefDETac?= =?us-ascii?Q?qsmGfTV9BeTR+jfpogjKbg2qZCdI+schs+qYjMv58KaLLTQYVufP/oci2q4q?= =?us-ascii?Q?w8nIAMB0OZcUCtbC7jH8+bCOdv9XTbCkT8X4ZAGcr9yXB54ZfsJlJuFsptQQ?= =?us-ascii?Q?XvE7ntcNanQXnPjY3vc2Q6Tu8EiwhxORu/8MI48DKium9e5TKu9yqmbXiHuH?= =?us-ascii?Q?iENPhQKK8W3Na6TeSGYggWxS8W6iaY+DWJSzj7awhX+BRofqE6qjc+FANOfU?= =?us-ascii?Q?B9NLPc9NINij00fQRxHpMR6JKlS6289WzrB/?= X-Forefront-Antispam-Report: CIP:66.129.239.15;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-02.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2025 19:06:48.9105 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ced7f0a-e048-4229-abc0-08dd8f2ca668 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.15];Helo=[p-exchfe-eqx-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000066E7.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR05MB8042 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTA5MDE5MSBTYWx0ZWRfXyYGP/dEXH0ww PXHRsFEgu78HJ+M5VONWROwFhlhTY4lg+vs5OEVoeXGX2ZI8aXg8capRs98VnbOavjEYxVRDu1I /Gj9ernWZ4ZBQSsc6oFm3T79h71h7ZJhpoz8LglhUYeeL5feGGTXH1KdzyV9I20+Q39itVSyNMd eLLl6UkHg4XQgFCMK1nYu+/eh0PuBptwAoQi6GWW2GtTXG/sUbvlof2BXKEgjOebdRgfobW94RI VvVLVcm5ew5t65aUkM/ftHRsT/KMxHSzJZ+y2ytRZCFQzE+gpXdMKBN+GxNwunIvbEGgWMkwm15 iqjOHOvE1CTSrNrtxEgJPHVz36u681ZVCyW7hhzPvWlBLKz87sPBEGXAgoTWU74abK2bKxXt6y7 h1qKDcwieJPJatJrvZB/eYIHfy45gbKJAHI85BULVKkNH/7CMVIjqxS+Quj85x1Qt8TElv/0 X-Proofpoint-GUID: uCo8avslbvv07f5zgxq-_1kcc6ptaeLC X-Proofpoint-ORIG-GUID: uCo8avslbvv07f5zgxq-_1kcc6ptaeLC X-Authority-Analysis: v=2.4 cv=e9cGSbp/ c=1 sm=1 tr=0 ts=681e524d cx=c_pps a=b4GTUaH8bIYRMqSiyTmTYA==:117 a=YQU41r7WENJiSYrYYNJVsQ==:17 a=h8e1o3o8w34MuCiiGQrqVE4VwXA=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=s63m1ICgrNkA:10 a=rhJc5-LppCAA:10 a=pPU5mn3-0iH7owQRWggA:9 a=CjuIK1q_8ugA:10 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-09_07,2025-05-09_01,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 adultscore=0 mlxlogscore=999 malwarescore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 mlxscore=0 phishscore=0 suspectscore=0 bulkscore=0 clxscore=1011 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2505090191 X-Rspamd-Queue-Id: 4ZvJQQ1ytlz3nWC X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US] X-Spamd-Bar: ---- > Apparently it did not become the default, so it's not clear how Simon's > build was different. OTOH, I'm not sure if that really changes anything My issue was /usr/local/bin/ld (bfd) vs /usr/bin/ld (lld) stand/i386/loader/Makefile was only adding -Wl,-z,nostart-stop-gc for lld and that loader does not work without it. > (except that the mystery isn't fully solved)- if it's possible to > configure such a bfd, IMO it doesn't hurt to use it since these > sections/symbols being retained is critical. > > I don't see any reason not to drop the version bits. Ubuntu 22.04 seems > to have binutils 2.38, so that's good at least -- I wasn't sure if the > timing on 2.37 was right for that (or even what Ubuntu's policy is there). > > Thanks, > > Kyle Evans From nobody Fri May 9 19:09: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 4ZvJVh3ydFz5w21H; Fri, 09 May 2025 19:10:36 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvJVh1Pvmz3rGX; Fri, 09 May 2025 19:10:36 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108157.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 549INTkS008691; Fri, 9 May 2025 12:10:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h= content-id:content-type:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=PPS1017; bh=+tKGXsBDQtwxu pylCgMS4Ydy0+TTQb4VvmDJEQkd8sY=; b=Pgut02yVCmmH5WqqxLmY3vm8Sj1Jt 1H0QRPvEAQk8BJ34TpRoRwHVPvpd1LiYKVVTYHMXm3zJFH3zpzYVDKT44ogAv3BM Jw69COgx6WZq2B09NyF+VbZvRmmUZuZN3QEfRxB/dLwbcXqp0oWhlWJZWoH2ON51 aRuu5slfmQUZOW/NFLq9x0maJqXjIrO1yaRTmHOikrDnQ74y8e7P8jQK4zBaWI6K lpwkBPKu4TiAGzEy8rDHpB8XWgAb8Qiunv/rGHfK/w5FT1NXf9NUVzuOuOrQ8gZq zb9N1nXaEYHYIKsLeBzZPkvYLBI/zblmhH/Wq5XwbyeqP0YKpSpCX99rA== Received: from ch4pr04cu002.outbound.protection.outlook.com (mail-northcentralusazlp17013061.outbound.protection.outlook.com [40.93.20.61]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 46hpxk02j2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 May 2025 12:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eJdNQoGRl/PHzi+P7dU5cnQoQvOl5WXQeGmhWLa3HDzH1mdcmPt/GYvW9J7vXg//8MXgEoBvLsr3Aqjzm8B6QdvReK/o7XX31rn/w3KD8INNwise/bpQnh/9G9ADZ0OgTWMaQModAIjkamndtgEYAUVI0i88AvZiH7i3P4zFDX3DICLHz5IzAvOttYHfyWw2DDE+fX9C/gOru0qXqB92aROjg8xuqDXlYwufqatub1JWQ2fPHgqcojdSnDpi670erZw7peEcXdshATyXKp4gIOzQPQn9VY1/lxS60U+jJ/RuWUVNN8tp9Kjjap5kIPksnTaiBLxvj0V88jSfgv4X4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+tKGXsBDQtwxupylCgMS4Ydy0+TTQb4VvmDJEQkd8sY=; b=XkegJ8GEVlpz1vv8lIcVdPXTMnxO1xQC4DTtzTgQqiX3EqrOS+37OPyOR+ZEWAb5KBznXcgZoq7jF0fsUMkjMJOsjx+NGq5J7/3nXbVJ62Q21zAmOcVTCnLXCin1In0/ekwQAYmrZznstb0GNJBLkckm32zBK2VszVLCfC4H2vlg4us6eUnikK6PNH147BWC+bdc/N7VwswlTFQ3rUqtuDqKoyV4f0o+PyhKEoJ+mrXQkS+Pa6Enqv1LdYISXa/rHi/d1niXIHoZImD9A/T3AQ3xB52XoVIxpCGVDEjF3eKOYYLnXbED6l08BlKZohf3QN5Izo3Xb2H8Kog17FYS2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.15) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+tKGXsBDQtwxupylCgMS4Ydy0+TTQb4VvmDJEQkd8sY=; b=Trdopbmx4vtociCl7M2IEkEHvmt4EALaLAv9Dipj6/Sm0Cvwx0BO7VXMw+8cQRCsco9NtT4sp15L0bUMLQPObiz0MYVWw8F1pH0JI65NOhGc9vM10wk2OJKlkatXqoU1QWpTXHsgvL05LQu772x4cAoQMSuAbGNBEr55Da5pp5E= Received: from MN2PR12CA0034.namprd12.prod.outlook.com (2603:10b6:208:a8::47) by SN7PR05MB7742.namprd05.prod.outlook.com (2603:10b6:806:10b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.25; Fri, 9 May 2025 19:10:31 +0000 Received: from BL6PEPF0001AB4F.namprd04.prod.outlook.com (2603:10b6:208:a8:cafe::56) by MN2PR12CA0034.outlook.office365.com (2603:10b6:208:a8::47) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8699.29 via Frontend Transport; Fri, 9 May 2025 19:10:30 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.15) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.15 as permitted sender) Received: from p-exchfe-eqx-02.jnpr.net (66.129.239.15) by BL6PEPF0001AB4F.mail.protection.outlook.com (10.167.242.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.18 via Frontend Transport; Fri, 9 May 2025 19:10:30 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-02.jnpr.net (10.104.9.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 9 May 2025 14:10:29 -0500 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 9 May 2025 14:10:29 -0500 Received: from kaos.jnpr.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server id 15.2.1544.14 via Frontend Transport; Fri, 9 May 2025 14:10:29 -0500 Received: by kaos.jnpr.net (Postfix, from userid 1377) id 9CC6DDD6A9; Fri, 09 May 2025 12:09:52 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 9B722DD5D1; Fri, 09 May 2025 12:09:52 -0700 (PDT) To: Kyle Evans , Brooks Davis , , , , Subject: Re: git: 78661696e639 - main - loader: i386: use -z nostart-stop-gc for bfd as well In-Reply-To: <34618.1746817571@kaos.jnpr.net> References: <202505081947.548JlM93086830@gitrepo.freebsd.org> <34618.1746817571@kaos.jnpr.net> Comments: In-reply-to: "Simon J. Gerraty" message dated "Fri, 09 May 2025 12:06:11 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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-ID: <48352.1746817792.1@kaos.jnpr.net> Date: Fri, 9 May 2025 12:09:52 -0700 Message-ID: <53287.1746817792@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB4F:EE_|SN7PR05MB7742:EE_ X-MS-Office365-Filtering-Correlation-Id: 1dbdc2f0-0832-4be1-0580-08dd8f2d2aaa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?iRJQtm5Yqfn5TvKhjn5pYE80zaclOXGHRyj705BDFx7MlaV//rtS7gOdHIZG?= =?us-ascii?Q?IiDrHyVF16iNE+h3yPH71ERNryeItpgBf9jIQV1TotiREohcSF7DuPGHjYVH?= =?us-ascii?Q?D8v6EiwwBBLODLHToERXmTsZn8G9pkchc2+4s68c7RP1Hc853g1R+zo2evXx?= =?us-ascii?Q?SF0drHPF1LSSBapUe3YOZdAVLnYHw7PdYB7cDWB+VglDea9oA8Ia9zO0u3Io?= =?us-ascii?Q?sm1zi4Gm/nyJf5KLvqUPFhFW5KrmcuOOlDi1hAmFq/PuUPev2d0BGEtp3YR6?= =?us-ascii?Q?A2I1DEdxCuiNmBniWkYbJcrJNMK25DOnnMWE1C1s/R4lzi5LF8h11zgx4UOH?= =?us-ascii?Q?8Y2fEaQJB9QVpqUQM8hAzvy5m34l00QobhXuKwayEzf5YRtEGhxI3toc+M4X?= =?us-ascii?Q?FNWf8SP3nD5lcGaZi3rgQujtcX9SS2XEo675y6sGN5JDQ2LK3irmiqGBAx52?= =?us-ascii?Q?R+cjlG3MaMcVuJy1a6VXpIoTMqvOvhUZYWrNknNOvmQhwUL4jnw0XdfzMEWj?= =?us-ascii?Q?1dY/zF5Ws7soGMLt6YWwms459CBnto4WsqTWAFTiHIxtzmBuOSALwzSzLbCG?= =?us-ascii?Q?avowJ4B8RaY2S0XcfwaIu9U0m8InhpSrin0O3Vhvfzv13yUk6p8G4Oziwp1b?= =?us-ascii?Q?2UuVUmGeP3tlNarZwDh6LplxQouYSGGbDYtcr3lhqKCA4LWUfFDG8TIHwVLC?= =?us-ascii?Q?TZX5VnxWZLEXw+5cjR/7CpXO06FRiIFnhG5u2geoNmu4hvI2h+6MTPh+U57+?= =?us-ascii?Q?ZcR8imhVudxIv9THGJk00RHteAi+GtyR0TvOz+Jtl1g8LLVbE2rok3o/txby?= =?us-ascii?Q?xWCEYqgR9zguJEnqZOvWsa6lof943YLmwnpEseHW9EtDxkBE1sgzqMZi4lX2?= =?us-ascii?Q?hJUYpkByGc7VVLS/2x7hGG6BaqQhRHIFgZI6e2szC9FZTab8b3B7yqK0wwyn?= =?us-ascii?Q?VpKgnUwi5422A3f/XQjgpFRGZcPz2+k92MM2Vu1novJheULm8/BM5/qy7v11?= =?us-ascii?Q?4aaGlzOxB2hQ6Evp6YSsiFTJXffs2VG4oG6Z6eUi6Hesl36ZFer42dWBvy6Y?= =?us-ascii?Q?fzCpkQEWiVqFrQfOUIcDsGvLKWsC1bSG0S31R+4pRfEpymsXU1EYzhgpxDgI?= =?us-ascii?Q?epz13yV1go80eyLkR8QjV/pp6mfrSlDjPFfhsyB6B497CbO404db7StaZcup?= =?us-ascii?Q?tf4L1quzRfxgSaA1++6lbEkz+oM0rzW67n7R8emNvUXaWIArTs3lXVCrtsJB?= =?us-ascii?Q?es3qy50oLDqiMFTNj6CkcwFVFPUG5YCuQd9mjKtVYkNSfMuFgAh52MgvhbLz?= =?us-ascii?Q?jJXfy56M9c700XixRr3g77ZS9nhA9w+17u3sI8qMcg4EmHhNKYOqMQhFh41R?= =?us-ascii?Q?WG4Uh5Z7M9Cg6Q33XjJ7R2/mPAVvpwlLrZY/Xs4ACTE3y5cPJuynWN/6muX1?= =?us-ascii?Q?7AjttRX4iwKLJ3kehv3IPPegLn3zuo2is0ysWTytYjd5zDpGUIIPcdTAP49j?= =?us-ascii?Q?9u1vypRvdBCWLE7DTWXV1UWwPg3Jc36qOagc?= X-Forefront-Antispam-Report: CIP:66.129.239.15;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-02.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2025 19:10:30.7084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1dbdc2f0-0832-4be1-0580-08dd8f2d2aaa X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.15];Helo=[p-exchfe-eqx-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB4F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR05MB7742 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTA5MDE5MiBTYWx0ZWRfXwlKK0IJiMmR+ aJFuC92ZRZcUPzsgaiMoKZokIXQrKHR4uliETtaJDPNvsvCWaBl4KF6bdXbfBXFvh6kEbZ76mC+ I2dWwrEtmS8DYU13KJu2NRjN9e0Bdm3bv/lc1rDIa1ILLEwlnLfxGrR7TGbnxk4ENuKXl0MQnSU rY/L74Is1Be/JOA4/fLuO17p2Ehd8LttuVzq/7mmMrTrXAWYkQaEGx4oM294jUuUmCQvEo5iVgY v0HnN8slIRI6wnJaYvQbQQbM/aXOkaV0NfAPK0dpMLvkDRtel55MNS1RswIo29rTGVEPgnmE4m0 IoBBiZ6XxPfTui4W+luo+58hBDgu7HBjpHQVsC3AmOPH4yHDnFgEr0Ao7cDpmriFGuJQ/m1a4jt vJOIGNeHOMtwMu1sitDKK3C6iWRwi1oYDyfK3kipg/VP9QTXXrZeYjcnTnU3N/+L6Byha+mq X-Authority-Analysis: v=2.4 cv=PaD/hjhd c=1 sm=1 tr=0 ts=681e532a cx=c_pps a=Fcp+KkUxEAj3pI5yN7qTmg==:117 a=YQU41r7WENJiSYrYYNJVsQ==:17 a=h8e1o3o8w34MuCiiGQrqVE4VwXA=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=s63m1ICgrNkA:10 a=rhJc5-LppCAA:10 a=OUXY8nFuAAAA:8 a=RCY_MWVfNfPU9ElfGfgA:9 a=CjuIK1q_8ugA:10 a=cAcMbU7R10T-QSRYIcO_:22 X-Proofpoint-GUID: NI6zYaYcPPdG6JTVLuoB1DkitTvOSI0V X-Proofpoint-ORIG-GUID: NI6zYaYcPPdG6JTVLuoB1DkitTvOSI0V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-09_07,2025-05-09_01,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=860 impostorscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 mlxscore=0 clxscore=1011 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2505090192 X-Rspamd-Queue-Id: 4ZvJVh1Pvmz3rGX X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US] X-Spamd-Bar: ---- Simon J. Gerraty wrote: > > Apparently it did not become the default, so it's not clear how Simon's > > build was different. OTOH, I'm not sure if that really changes anything > > My issue was /usr/local/bin/ld (bfd) vs /usr/bin/ld (lld) Oh and I have WITH_SYSTEM_COMPILER set by default, which might be what you wanted to know. > stand/i386/loader/Makefile was only adding -Wl,-z,nostart-stop-gc > for lld and that loader does not work without it. From nobody Fri May 9 19:43: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 4ZvKDr2rMZz5w4R3; Fri, 09 May 2025 19:43: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvKDr2Gr6z4Jwx; Fri, 09 May 2025 19:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88TXKA6vSnHpYtCIrosKD7j9zdKgpL0Q2GZ5+LvgH9M=; b=ZlNGUQDP/VuMKMfDs7ZphrLjIl7R8QKG5mEoe3t2qe4lpifOoYPLVG5fP8i9wIN3FaNzY5 9cfH5cb3b9eseJeqUN1ictVZQXowAp/ZjZcNb5JRROG2aVCchU8LgtfCw1FBKfcxKsLv0Z UrlrerdQFl8ZUgHTV4Bbs/v3Lu7iTzkSeI+P3Wy02mUz7oF1VNrHOLkcxPzyTnssUQ6Exz XaMddv7TGpCLsJymLBipqyZVQ5Nf3q0+qXPFeq+BeMkFQ7j6aWDHTmsGC4sEoFv8CB1Ryq zVQOMkzGyajybGKB/9XxGzRPvn0Z5BbneJr6UlgCUVJ05qD8sGiRK93f7p+BaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88TXKA6vSnHpYtCIrosKD7j9zdKgpL0Q2GZ5+LvgH9M=; b=kcZGRkGIMWzQrqVPQOH+y2oAMun3OfpRGYe0PHOLL57R91VvSajcNx+XGKXHPAZYTNVYbL qb/zaOCZQbGIhn0sY0Io32bS146qE1xWP8sTx7rAEEBthPzw6Q9kPfpNEtkcdK3WAyiIzi KFK+Jk3sX79cCxOAz9YAYQqPhssSc5N+Xb93S2j3w7HrEz1g45YQrLPanTSXXmEHyalv9f MGv1TlkJVehG7ijYQ8K3A+L2Ja5nCDa3lbRzF8GdTYdUE99YQ/rDVnZ2qaUcYBdexPiLs1 kJIBM8bm+4J0jUG4XGOW52HedfUeNlo+9UKk3gJ9E/CGPHXgr/95HQht5WE/rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746819820; a=rsa-sha256; cv=none; b=mdqCGB8QHXAvjmz6knCVgmBewbvSd1stgGzUsQWoT9erwKL38jkxFEKSBjE+wLR+Fwi9hH uhYqTgUaoZ+javV6bBlUKYk5lNwDF2LxUOsvgGT8Gi5ydG6HFw7zf6No5Mk644E6+MjkJU jVdr5Up5vkve2+TjkvR+MWbkfviLlDBr5ty9+MfM6xcw+WNYfbdnpSFBG/57CfHNH2TA19 /IUL51Zm8DlBdq/eJZpQEi1nSQqsgHYhlMdZmv5k8UeTRl7Xcb6xpUKAvmtNAMyUEHC98D uxI5nDo756Zeka212Cjl+ytje7JOmGjvYLY/C/a/KGTw7UdYqUeCgmHwvOpMKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvKDr1tH4zBT; Fri, 09 May 2025 19:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549JheGl080981; Fri, 9 May 2025 19:43:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549JheOD080978; Fri, 9 May 2025 19:43:40 GMT (envelope-from git) Date: Fri, 9 May 2025 19:43:40 GMT Message-Id: <202505091943.549JheOD080978@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pierre Pronchery Subject: git: 8414a2e9caa0 - main - committers-src: add myself (khorben@) with philip@ as mentor List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: khorben X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8414a2e9caa0f07780c3f20ce072f86fcc8482be Auto-Submitted: auto-generated The branch main has been updated by khorben: URL: https://cgit.FreeBSD.org/src/commit/?id=8414a2e9caa0f07780c3f20ce072f86fcc8482be commit 8414a2e9caa0f07780c3f20ce072f86fcc8482be Author: Pierre Pronchery AuthorDate: 2025-05-08 01:55:40 +0000 Commit: Pierre Pronchery CommitDate: 2025-05-09 19:43:26 +0000 committers-src: add myself (khorben@) with philip@ as mentor Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D50255 --- 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 3bd9c5dfaad3..3154b124b514 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -252,6 +252,7 @@ kensmith [label="Ken Smith\nkensmith@FreeBSD.org\n2004/01/23"] kevans [label="Kyle Evans\nkevans@FreeBSD.org\n2017/06/20"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2006/07/23"] khng [label="Ka Ho Ng\nkhng@FreeBSD.org\n2021/03/15"] +khorben [label="Pierre Pronchery\nkhorben@FreeBSD.org\n2025/05/06"] kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"] kibab [label="Ilya Bakulin\nkibab@FreeBSD.org\n2017/09/02"] kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"] @@ -848,6 +849,7 @@ philip -> donner philip -> ed philip -> jls philip -> khng +philip -> khorben philip -> matteo philip -> uqs philip -> kp From nobody Fri May 9 19:45: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 4ZvKHW6HyQz5w42H; Fri, 09 May 2025 19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvKHW5dGrz4Lrr; Fri, 09 May 2025 19:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRs5YZmD593uH7EalMBUC4eiWmSyZoydgv8x7mU2zdU=; b=xOR8a4cUssRAFu6atrdTn9IbzeGwh3ZfrYfDg6v84NJ8TEw4Y7pN1yYewgk8+0IX1CKYg+ sDPfFIg5ILueAnzf7P057b0u0z3wtnAkqGggavO1zYmRBJKK73dJk0+69jq/dHglSGbwwM GvByaAYexfpSmFuGhfdVvhkfQiVhvFwOfqUhrPpoP1SbimcnGU9XpIxuCHO58l06y1rUn5 s5dC13Q9HI+HjdD5FHZg5WPgJpS27qaPmwlekQKHeh0OQBRRKVNmQYmOXn3ydWG6XnzUCF q4dVtLNPBhB7g4fID5YsqnVp8DbxQk9uy6D4i9QcbdIb3OP/ZIOJBuP0p+50rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mRs5YZmD593uH7EalMBUC4eiWmSyZoydgv8x7mU2zdU=; b=tHkD+iIeJayetGBUos/3DocRJ+yXZoY2v32mrAxBzaK12kfRsFs4Y7vqbxlKEI9ZETEe2B cRoMpp7Wwrbv4eYkrioDtPsN/Egz4SeNx4L1eKgxGe7bhEb0iSFqohpAO7P9ywVS2ZzvzH OIF1oTMP9QQIGRB29syg4DfgLuqCfbnAp5EWhZPdZWpANfF9VL5hKHiMBouRt2FniHE8gd QtuVn4tjKFJr9ziLg/xIbmqSFpiHkUcTbrLzgemDPdHmxEuSFA9q/iIwh45dxsR/ZXJL7d x+DsM8h/NT2KOw2lnwKJmtkhjQpd/hfj7buHe8hf5Q1TF8AjXxjKJ1HL6yz/CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746819959; a=rsa-sha256; cv=none; b=MjYeaakgANqPBqjWF1RqYfWLH2NHqxtGRqMLTpdKDuPCmfYpuQs+30vV4HMc6Ke06W1QnF e5KtGspCTZnZbymmGv2c2tDNQoYPmwUwPOToOLhPJIZlNszVVnksSpeARpJGPQWYBvs0NG lTDAgTTRucuWHoh+ebQMuHPzCYEpWaocR8DFadmCPCY2FPXb7aehFpGVbDr+gLkOix4LQA xRPOvgL9whEx3NKrGfHJIjPOCWhjfDFnUCxvGMcGYRblaEt/qj9uvKYhv1ot2Wch6uhD4v ls5FMolNgY/0/Tgz/UB9FKc7lwQTTkmoCg+fWImadvwaAcuFOzm60dJgGGt5CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvKHW4r6Nz81; Fri, 09 May 2025 19:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549Jjxkc081805; Fri, 9 May 2025 19:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549Jjx0x081802; Fri, 9 May 2025 19:45:59 GMT (envelope-from git) Date: Fri, 9 May 2025 19:45:59 GMT Message-Id: <202505091945.549Jjx0x081802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 96e86aa6faa6 - main - LinuxKPI: pci: deal with kobject_add() being able to fail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 96e86aa6faa6fde4ff75fd757db55afe9e4be132 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=96e86aa6faa6fde4ff75fd757db55afe9e4be132 commit 96e86aa6faa6fde4ff75fd757db55afe9e4be132 Author: Bjoern A. Zeeb AuthorDate: 2025-05-04 19:58:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-09 19:45:09 +0000 LinuxKPI: pci: deal with kobject_add() being able to fail lkpifill_pci_dev() uses a sequene of kobject_init/set_name/add. The problem is that kobject_add could fail. Move the entire logic to the beginning of the function, switch to kobject_init_and_add() and check the return code. Make lkpifill_pci_dev() return the error and deal in the callers with a possible error accordingly. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50154 --- sys/compat/linuxkpi/common/src/linux_pci.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index fa5e3c71fad0..3651946c6ee5 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -309,9 +309,18 @@ lkpi_pci_dev_release(struct device *dev) spin_lock_destroy(&dev->devres_lock); } -static void +static int lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) { + int error; + + error = kobject_init_and_add(&pdev->dev.kobj, &linux_dev_ktype, + &linux_root_device.kobj, device_get_nameunit(dev)); + if (error != 0) { + printf("%s:%d: kobject_init_and_add returned %d\n", + __func__, __LINE__, error); + return (error); + } pdev->devfn = PCI_DEVFN(pci_get_slot(dev), pci_get_function(dev)); pdev->vendor = pci_get_vendor(dev); @@ -341,12 +350,10 @@ lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) pdev->msi_desc = malloc(pci_msi_count(dev) * sizeof(*pdev->msi_desc), M_DEVBUF, M_WAITOK | M_ZERO); - kobject_init(&pdev->dev.kobj, &linux_dev_ktype); - kobject_set_name(&pdev->dev.kobj, device_get_nameunit(dev)); - kobject_add(&pdev->dev.kobj, &linux_root_device.kobj, - kobject_name(&pdev->dev.kobj)); spin_lock_init(&pdev->dev.devres_lock); INIT_LIST_HEAD(&pdev->dev.devres_head); + + return (0); } static void @@ -374,9 +381,14 @@ struct pci_dev * lkpinew_pci_dev(device_t dev) { struct pci_dev *pdev; + int error; pdev = malloc(sizeof(*pdev), M_DEVBUF, M_WAITOK|M_ZERO); - lkpifill_pci_dev(dev, pdev); + error = lkpifill_pci_dev(dev, pdev); + if (error != 0) { + free(pdev, M_DEVBUF); + return (NULL); + } pdev->dev.release = lkpinew_pci_dev_release; return (pdev); @@ -525,7 +537,10 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, device_set_ivars(dev, dinfo); } - lkpifill_pci_dev(dev, pdev); + error = lkpifill_pci_dev(dev, pdev); + if (error != 0) + return (error); + if (isdrm) PCI_GET_ID(device_get_parent(parent), parent, PCI_ID_RID, &rid); else From nobody Fri May 9 19:46: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 4ZvKHY2lwsz5w4NN; Fri, 09 May 2025 19:46:01 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvKHX5knYz4MD0; Fri, 09 May 2025 19:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5k97KaSJ4m6bLWF+fdSVza7IpG2jZnbCSM9SiWiGGw=; b=na2btAzAItkKLLbymnhBBWXlsJ1VMReWY3IU2TqF7IrJz4qTz7bb9HP3w8NhS03FkLG3cO YbyQWqhSNIiRvbsp8eORXZRVt1Bb0dPs7lz8WANK7TaJZn9cQHTNcLMzVA3Oo5EXUv2eF2 KqEWPtBdDkVZEJ6bgcnc/S0EhuZYJ7gzqhmPm2bLovoqBlPkBIISYCPpBg/Y1CE/2kLN2p Ff21vBwU9zcm8SMJDdjls33ieKk+zoOb1iteknLWZjzD5Wx+lEn/1wNfoW8PTh0TgDykyz czxB82MpqbP58fchBjIHr1efyu5m9CIGfjSEIsQOqbaZRMb3zGAURljPHY7zkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5k97KaSJ4m6bLWF+fdSVza7IpG2jZnbCSM9SiWiGGw=; b=acTL5LTZm/k4l6HYbX3tnZjbeku892jSrZ7O3AY9gHymfvTFk5qpyRuQKrkxUdrJyPnq8M K1cV0u9/3HAqSu0ycv1/Q+oI3NmAkis6Hwgod9IqP/HLtx82E9zBuW3j+Wqivr4gV9a1SV wsJGHDouzbK45mLcW80AbBdj3UebcNlZDIejVP+KHRQaTwb+Zmv2w2xTh8zctS+eth8hLj uAT0TBVPTWVJtnsrrl/Ybn1xjiHzMa/+nT2RqvM2lP98pnI9/F9Avi97jkLbKhPxG/IUci 7NnorWVywOtPN9dtzl6VDV8aEgoc6qyqgduYlh5/lPmaswD29WtKBmBs3Zv7dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746819960; a=rsa-sha256; cv=none; b=KQYN1VfRGNtwXLVBVY1HYLhZpLceTMzN7tmUUwxfk9nSFp2XK97ZXPemcEhvF9JGHQ0S/d GI4MNsTMtKtuwDRZ5Ym5vUosLhtWDFacnFHHeDjrgvEYkl8Zjkz4rq1TBYuETUB68BG2Eb ON9S8IPUQ44Blj0h/3mAKUVe7+5bG/rGqjdJsDoFxv7ZEZyq+wuPU3EHVqr4FsPIYOsqNO qqgfvgGjL60rhxUt82gwEyUvAK8J3LlNUXedwwqw0S7SUvPjrDMOz6LG3MFBnpYF0kHt6Y WPZkDN9fn/X/IXyIVkKNJc9rgcDBlKeWp2ZUm5mkRSgsRXnVtfWr/hOrEhqWzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvKHX59gDz1Cbc; Fri, 09 May 2025 19:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549Jk0q4081848; Fri, 9 May 2025 19:46:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549Jk0AB081845; Fri, 9 May 2025 19:46:00 GMT (envelope-from git) Date: Fri, 9 May 2025 19:46:00 GMT Message-Id: <202505091946.549Jk0AB081845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2c65f965146a - main - LinuxKPI: pci: fix two errors in lkpi_pci_get_device() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 2c65f965146a7f822302715a439e17996d17453c Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2c65f965146a7f822302715a439e17996d17453c commit 2c65f965146a7f822302715a439e17996d17453c Author: Bjoern A. Zeeb AuthorDate: 2025-05-04 20:02:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-09 19:45:10 +0000 LinuxKPI: pci: fix two errors in lkpi_pci_get_device() On any result we need to acquire a reference. pci_dev_get() deals with a NULL argument so we can simply pass what we "found" at the end. This will avoid reference count problems. If the iteration on the linux list in lkpi_pci_get_device() does not find a match pdev will still be defined at the end of the loop but not pointing to a valid pdev. Store the found entry in a 2nd variable which otherwise will be NULL. This will avoid random panics, usually in sysfs_remove_dir() when the reference gets released. Found during mt76 bringup. Sponsored by: The FreeBSD Foundation MFC after: 3 days Fixes: 8f61992d7cc11 Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50153 --- sys/compat/linuxkpi/common/src/linux_pci.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 3651946c6ee5..5cf7c601d615 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -287,18 +287,22 @@ linux_pci_find(device_t dev, const struct pci_device_id **idp) struct pci_dev * lkpi_pci_get_device(uint16_t vendor, uint16_t device, struct pci_dev *odev) { - struct pci_dev *pdev; + struct pci_dev *pdev, *found; KASSERT(odev == NULL, ("%s: odev argument not yet supported\n", __func__)); + found = NULL; spin_lock(&pci_lock); list_for_each_entry(pdev, &pci_devices, links) { - if (pdev->vendor == vendor && pdev->device == device) + if (pdev->vendor == vendor && pdev->device == device) { + found = pdev; break; + } } + pci_dev_get(found); spin_unlock(&pci_lock); - return (pdev); + return (found); } static void From nobody Fri May 9 19:46: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 4ZvKHZ0XfKz5w4DD; Fri, 09 May 2025 19:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvKHY6fshz4MGD; Fri, 09 May 2025 19:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XJ52ZWXmsUJjG5QQGroE4gFzSDxrRNoe9xocIFzRRYU=; b=cnS+9xvY3kTxVZoZ4767F5iMMTw+75q4hQwB+iMGHXCDp8MRGQppzbYEInoEYLJRksjN5L NNjqpzZVldf8qoc6TRmY4ux1Z/y8ebb2LF22FDpcv0khJUxxg+U/7WNCeWy8LIuPoQvLvt fa6Sa1TLlUC0bydPxq13U1lHcETqBgB122phsBfWGGbSYbGuCvz/veXHesvWAIEfwQfUiR DIDzuUpzWMYO720h5L5ngOUjs5g4d00tiiRr4GslxaUa2UrU3oZPXInTTyNmRfphUcT+nI 8xQgjdMvZrK7kxTyCEBLe9A28zi1DjYLvXpIGF5ZoDE6rA+f8ggsFZFnn9X/CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XJ52ZWXmsUJjG5QQGroE4gFzSDxrRNoe9xocIFzRRYU=; b=xRMJyMWkLnD9vrvRuGP5A3CoWAlkBiPncN/UqIB0sHIi+9PHV7wcwudroU25+WaqflmVCW 4GJWq+HhOAQj9CzJKMJ7TAtAYdDOXR3Qu1s2693oQqj6+T4kYy0HURIH3DUZQL9FMw/+GU HCLTo9a3J1tRYkm7Qa1JVgmHiHZiGquCmdQdMHXJ07D4IlUBUkYQmBs3t7abn+IyCRkZJP UMuHnMsEOV8NIr7wm8RR7n9ZAS4Iuxzp42yjXpq6886AQhMKuGDDoAekWOQ6ad/lEdOhBU AsSccvz+hjWUZ9tEZH0f9/vs9cfbW9Vxk5bMcwTka+3U2t0C3Wpdvunivd2mzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746819961; a=rsa-sha256; cv=none; b=FkVCbK7dyD+aNA16ks9GFjlONk1yxdyU+2nOmHaK4DJbqPBJ9ZBpX+EBj10HCpJEHZzTLD rKENtjuH+I5XC1vAdvDbrbe7ilN/gPeNaXYetfoXFxf2a7MmyI0L1zwCzvGI0/HRZ1QeWg tJ+6TnJCeZo4V/IClw2AUVzl6IV+A94YTnryTz59uP8hKI54Li6hz+yS6P/8hZrPEGRN/A 41EKpyRZj/dgS5HzjVASEqtXL01ViHzYfapinwEC7zzIHA3yjvPM00zqi7jvxllzlNTktr zYwhSl1Ei626Sl7cmcgLjvzkHAsWJGSCSSp0qy8OV0aYlXo+kDz/doA7YCMnhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvKHY67ZBz82; Fri, 09 May 2025 19:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549Jk1L4081885; Fri, 9 May 2025 19:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549Jk12Y081882; Fri, 9 May 2025 19:46:01 GMT (envelope-from git) Date: Fri, 9 May 2025 19:46:01 GMT Message-Id: <202505091946.549Jk12Y081882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 71576ed24b56 - main - LinuxKPI: add _devcd_free_sgtable() to devcoredump.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 71576ed24b56143429a3b6774a7862965c2dea88 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=71576ed24b56143429a3b6774a7862965c2dea88 commit 71576ed24b56143429a3b6774a7862965c2dea88 Author: Bjoern A. Zeeb AuthorDate: 2025-04-24 11:13:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-09 19:45:10 +0000 LinuxKPI: add _devcd_free_sgtable() to devcoredump.h It may be that once we implement freeing of chained tables _devcd_free_sgtable() will become our _lkpi_dev_coredumpsg_free() but further investigations need to happen. For now make an updated iwlwifi driver happy which should not need more. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50006 --- sys/compat/linuxkpi/common/include/linux/devcoredump.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/devcoredump.h b/sys/compat/linuxkpi/common/include/linux/devcoredump.h index b58c490615ad..5fa06c6595a8 100644 --- a/sys/compat/linuxkpi/common/include/linux/devcoredump.h +++ b/sys/compat/linuxkpi/common/include/linux/devcoredump.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2025 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -71,4 +71,11 @@ dev_coredumpsg(struct device *dev __unused, struct scatterlist *table, _lkpi_dev_coredumpsg_free(table); } +static inline void +_devcd_free_sgtable(struct scatterlist *table) +{ + /* UNIMPLEMENTED */ + _lkpi_dev_coredumpsg_free(table); +} + #endif /* _LINUXKPI_LINUX_DEVCOREDUMP_H */ From nobody Fri May 9 19:46: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 4ZvKHb5PzQz5w4Yx; Fri, 09 May 2025 19:46: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvKHb0lv7z4M2l; Fri, 09 May 2025 19:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hj8QYESdjDnqjoYh26pE4ZS6BZ9EdCprwkqIHDVq45k=; b=vhKITNLAKSlYZ46hifmqRBuEhGRry6tLTDyZHfb/BTqJOUxUpXpsOmwcePnewwkRAWvaRs o74LKR9a4FAEw00wKFDQaC9b9sU5TFFD7md8a6ryBkqbcH8kkYk4JLZu7FRN5ruwGisN8I Z+NytJ+lufKHA9MogI6bUQe5isXwXJngw6iVK7TdZVuRjDlQyNn03nPkldmEhxLHyvv57e VWvHHKv6ivWE3/eW6xIMQFEkjvuluZT6rFvYqT3hmz4MD5P+EKN9zbzdAGFY4pmZnlN3/E zM8xHVOCpPFwGQ4iuYge3JpoZpzVbYJ3yuLCXgP2DGoqD6Vp9Jvca3tk2Ga4FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746819963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hj8QYESdjDnqjoYh26pE4ZS6BZ9EdCprwkqIHDVq45k=; b=Y9Rr+5qYy2QX2uYlatHoqD0vrioT63IVQSt95IWtvk03be75NYbN0VpPyKTxiyXfeTfGn0 Ef5g22hdK1lB69OTTGlQGRN8XNGG0Jr4Ez1id/pG/QzHlo3g4PehHqDunwyhciMwI47JVL 7VMnKP8goISXaEIv2Zgl0k3hN3YdQmQ7eqlADv9qvtv6u8HpvwlNrSHKc2LTjdH7UGuRmF QqTZU8dMsV7+y6SZQMMW/09Rj/JJFK3jCwVGLlkddYOEoU1liMH9OiAdIqxB3iP86b360Y o9SU6pCjTbkq66mUXa4RikV2lnuJuMO4n8yRVerksSnd0F5T3fjMod78zAEj5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746819963; a=rsa-sha256; cv=none; b=cDOhwQLvf1+HEVQtM8pLxHYPpkRLex3VXk+J/v6fWMlc3WveYoTjjCLlB9cENaK5LxQM9w HNpteks9Sz0mQkN6dYRz2G0gig6OYFmfa6U4P74KG6+OiiZN4/BMd+txvcoyPT6FF0Gynt LBOSCLi+LR6J91qme/VjA9olrutT3Jevk/LLQSZDXou3S1XctPtwUSEwKaZDWUkq/x7/6U r+pPJnT16k8ozAKnR6gB0sMD4imBajjFWc6nDgBhr3nIt5K33keQ+bUwvxSEX/miwEMe84 k1Asd2/0uWZ11mY9USXcZQtlWb/xYAoSZDNpu9BBad5Uh5S1oPs61Do76m7KXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvKHZ6b6Gz3n; Fri, 09 May 2025 19:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549Jk2wV081922; Fri, 9 May 2025 19:46:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549Jk2Xc081919; Fri, 9 May 2025 19:46:02 GMT (envelope-from git) Date: Fri, 9 May 2025 19:46:02 GMT Message-Id: <202505091946.549Jk2Xc081919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 93b82146c43b - main - LinuxKPI: add ktime_get_boottime_seconds() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 93b82146c43b8ecad4fd7694ec1daf6d79cca65c Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=93b82146c43b8ecad4fd7694ec1daf6d79cca65c commit 93b82146c43b8ecad4fd7694ec1daf6d79cca65c Author: Bjoern A. Zeeb AuthorDate: 2025-04-24 11:12:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-05-09 19:45:10 +0000 LinuxKPI: add ktime_get_boottime_seconds() ktime_get_boottime_seconds() is needed by an updated iwlwifi driver. Sposored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50005 --- sys/compat/linuxkpi/common/include/linux/ktime.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h index 53c2abd64fc6..6a2f04f3d789 100644 --- a/sys/compat/linuxkpi/common/include/linux/ktime.h +++ b/sys/compat/linuxkpi/common/include/linux/ktime.h @@ -232,6 +232,13 @@ ktime_get_boottime_ns(void) return (ktime_to_ns(ktime_get_boottime())); } +static inline uint64_t +ktime_get_boottime_seconds(void) +{ + + return (ktime_divns(ktime_get_boottime(), NSEC_PER_SEC)); +} + static inline ktime_t ktime_get_real(void) { From nobody Fri May 9 21:25: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 4ZvMTx274zz5w9CJ; Fri, 09 May 2025 21:25:09 +0000 (UTC) (envelope-from kevans@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvMTx0n1Xz3bQ4; Fri, 09 May 2025 21:25:09 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746825909; 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=0f53YBQDGeVZadD9gb6KxBtWZSENuqxIJmGZQ9A/a5A=; b=gMdNDqjP6F7mlhIgm764PbCopbvtnd6yyQvZzRRP6f03cwgKPNMSysEEJTcQYtRmAvvbBU zi+9ciQysuirdv+sd9ev9+6cCD1tSQXhxyABcAF+/prRO23Y+3KMwWgwuSeey5vLkUzryZ l4g4vlYKE1VHo/X4zlgP6SoEo+siZtU1DQGfygCgI51klthrn60jrUOH79u5dDCX/B068W n8Gk06+yJXRu4WCmCWSJVHoC81Vy8nltbBWUn9R5oPQ+atNN9NeZVXmBF2bXt0fqGhC7Kk 9QeTUJTrZTZBLQg765UU1ioEDVtME/nnuY0+aWxOL0Cfp8hE/aHCzjcTFbOvxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746825909; 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=0f53YBQDGeVZadD9gb6KxBtWZSENuqxIJmGZQ9A/a5A=; b=bA0wPk/IhaWQ35jd3sXRbxz3jVUxKw6W/m0iOmRxXtA0KPN12mT8qKBpsBqoKeXB4NBZjG pkXCtWDJc791jMKkifLytaGFgqwHrAoc3RQKnKBW2ASuavlmuQMTXwPUjceEz1vqMFQYlx OtpWA8jZN/8zYATzrTs9Pxp8i64JRW/TkW0mwWtX1FTFGcrCTIXdKENF+K42QxblbjbeOK Cx7FwdpXad62PRK9Zd/ARMvXzowPoRVbHkJywJnWLQzPu7lfk0kpGVmz9CfmJqRV+UElqt 2uS9Cxvgx/0huBjREss72179LHoZ+Us39YEnM9r+HwPmQEA7ztmiFOd/IxzLUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746825909; a=rsa-sha256; cv=none; b=J3U719+2cCQ66OxlUBhIBkO23SSoE3olYesRLGletzEmaoEzd6D005ejjkY5AI2oR9wWxk Pg/TC4CPgMtBABHb6KHI1qUDfplB5sB0tISfaBV/MU/qw+PQ554XNjsqXnNKR/XtuPrQgo QSsBJM0I6L6+bAqcBJX4FpPiGXCuizgH//LwYVTUBQH7vGtdR8ZaIa4eZqLiFl0zBKQR8n BxTt16n55HLILb+Iyml/XufpNKIYy/75leMqreg36qpNaobc4DjjwsIT90G8sZ4MX6zwtM JDgIACmp9EvE4UGKmwxBAVqEl5reITkL8/rdLS1almhvSD75x4iKDhyTvx+dEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (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: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ZvMTw46hTzLsc; Fri, 09 May 2025 21:25:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <33227b4e-a061-4bfb-833b-a9b513ce59c8@FreeBSD.org> Date: Fri, 9 May 2025 16:25:07 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: 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: 78661696e639 - main - loader: i386: use -z nostart-stop-gc for bfd as well To: "Simon J. Gerraty" Cc: Brooks Davis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202505081947.548JlM93086830@gitrepo.freebsd.org> <34618.1746817571@kaos.jnpr.net> Content-Language: en-US From: Kyle Evans In-Reply-To: <34618.1746817571@kaos.jnpr.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/9/25 14:06, Simon J. Gerraty wrote: >> Apparently it did not become the default, so it's not clear how Simon's >> build was different. OTOH, I'm not sure if that really changes anything > > My issue was /usr/local/bin/ld (bfd) vs /usr/bin/ld (lld) > stand/i386/loader/Makefile was only adding -Wl,-z,nostart-stop-gc > for lld and that loader does not work without it. > Right, so Jessica's observation is that bfd hasn't actually made start-stop-gc the default as of yet, so we shouldn't have needed the knob. Is your /usr/local/bin/ld just devel/binutils as it would appear upstream, or something special produced at Juniper? Thanks, Kyle Evans From nobody Fri May 9 22:16: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 4ZvNcx6hpPz5wCgl; Fri, 09 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNcx5h2Pz3RKQ; Fri, 09 May 2025 22:16:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c+onh/glvkRNq1BYU2W7OJkOLdzX9djhhup7ahT+mgI=; b=Y3RMp2vQH4IB+brzqzOIbfpfwddtCf/rziaEJTbsihMOtDoBpHkgk2OQveAol86iLQXul2 s+GFU9GLABlKBvmV5dKjL9i+pI1dKRbfUfi6mi8b1brinejmNkDzdhxmvDtbpNPWI3iLV3 mCbuMS/37yyK8LNewbi9hAzO3fYwvh51JPAFbDLCpVQ0xgyH63e+ufnuUIIvKWxePLJCfQ YBnSSjaNMOYPoD7re2hINEMSV6Wkfn4H1vp34gKplTuW2/p5Y8/dGZhkA/YpjX3SC+8y91 5RPzsTBHMx8EkOM/IFAs8bOBXcAOZBkzuwH8u//gRNqjhvyQXaO7hH/YVXQmvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c+onh/glvkRNq1BYU2W7OJkOLdzX9djhhup7ahT+mgI=; b=jAfKu/kP2flqO3X4tr5SiVbjxDdUhgH6LzKchA4u8pNawv9gk4SjVsQIsObsZj1f0kFjZ1 t4R+acuwM2+7+ZZiejtLbD3VGgGMKjpkIBqYyt/+LH2IubCOceH3vBDLTZrrhnOdiwBeGJ h0mQ8odoZUZyjlm3vb7Ux/l65iGSVhTIkRvfkH0gPeyhDGg6z+GWY5J4ySn1biYujqbb7/ Q32dlzHglxT+p2YILPyle6OUYLJfniNTORe+uCmIBECDoN2C+Q40rW7LTtR3tCXkpozAnT Ywi6dJVJJ4PrNX7iVFBEYubV4NGzEK01j3jLa5gjocQ7Nm3KTrnGfxS+TRCnkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828977; a=rsa-sha256; cv=none; b=V5+YE60fgP3s0VzAtfhrPUijP5FxTUyvOhW9cPEZSMBzd0umsoZscvHdsIrKs6oGam+Fiz vxNx/eR7MhIbv67nmqZxvyhGqjH+k9ZO/SUKT7kZC8nUULGP9+VEGTUtPO7gViV4cSQbQV yc4L1tu/fVZaPDUFF3LbglZL8ToBYQvR3zxbikl+KDgs51McCr0NSCYNunGU9/Z6CGlmpW 0iRkRXZiaPO+pTyPVRYb6CmRC+ZpHrbOwtfH1L5ESZX1vAkgweqnDu7Bw8JgAFrjcpzAd7 Tke0hbahrl5FHwFnaW3QB3aBbRKgqNp2Az1yLZfLRfq851wskPl06Xd6RzNjGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNcx51DPz3YN; Fri, 09 May 2025 22:16:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGHkJ062916; Fri, 9 May 2025 22:16:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGHhp062913; Fri, 9 May 2025 22:16:17 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:17 GMT Message-Id: <202505092216.549MGHhp062913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 130b5e3f536e - main - pf: be more strict about IPv6 fragments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 130b5e3f536e322f3e96ad1d786cbac3592f10c3 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=130b5e3f536e322f3e96ad1d786cbac3592f10c3 commit 130b5e3f536e322f3e96ad1d786cbac3592f10c3 Author: Kristof Provost AuthorDate: 2025-05-08 14:52:53 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:28 +0000 pf: be more strict about IPv6 fragments Follow RFC 5722 more strictly when handling overlapping fragments in pf. Drop the whole fragment state if IPv6 fragments appear which have invalid length or fragment-offset or more-fragment-bit. In IPv4 they are considered invalid and just dropped like before. Found by Antonios Atlasis; OK sashan@ sthen@ Obtained from: OpenBSD, bluhm , f0f63321f2 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_norm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index c77895d1829d..8157ea556591 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -603,16 +603,16 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, /* Non terminal fragments must have more fragments flag. */ if (frent->fe_off + frent->fe_len < total && !frent->fe_mff) - goto bad_fragment; + goto free_ipv6_fragment; /* Check if we saw the last fragment already. */ if (!TAILQ_LAST(&frag->fr_queue, pf_fragq)->fe_mff) { if (frent->fe_off + frent->fe_len > total || (frent->fe_off + frent->fe_len == total && frent->fe_mff)) - goto bad_fragment; + goto free_ipv6_fragment; } else { if (frent->fe_off + frent->fe_len == total && !frent->fe_mff) - goto bad_fragment; + goto free_ipv6_fragment; } /* Find neighbors for newly inserted fragment */ @@ -680,6 +680,9 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, return (frag); +free_ipv6_fragment: + if (frag->fr_af == AF_INET) + goto bad_fragment; free_fragment: /* * RFC 5722, Errata 3089: When reassembling an IPv6 datagram, if one From nobody Fri May 9 22:16: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 4ZvNcz1RNbz5wCkb; Fri, 09 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNcy6dN8z3RPm; Fri, 09 May 2025 22:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fUrLZb9uhH4VFe+trEAGxKa9t+a6Zyhz0fOwwVF1G2A=; b=YJSIVYOz4/01J0XPDR37/OarnsBWlkRvlKEWgnEJ9bAnu7RdcO9B2XsyA0KYyzmzltVDkd fplCEw5HTiVu+Pt0jXbOG8nJb3gr7mkn8DTNHW7P7cxIXlsT2iySqNgSOJllZDNnjhFWzh cr1fHSdOGNBEVykrCyv7WCT3CpJnQM8luJoEqO1yp7jmxzPBTR72yT5M6vy0zuT4drDmlM I2sTI+4/bPw8Okuw7Crvt01uXrmPUZDVKZciT2mDNmqNTd4tD+qWBhAnpKkyma2IuHf7gw NuU5kHvmCu7qdyem9bOPz286Y3Yef1sGiFZFVdM4kooilJOkKapgi6OLJd+zhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fUrLZb9uhH4VFe+trEAGxKa9t+a6Zyhz0fOwwVF1G2A=; b=hf+ExT2zBnXYJefviGRNF0LynVJIeTX7Y5syowMVeGPchx60bLBTTxjexBpMN6LcMxI47Y UBd7UE27c7P1C5lmsJnFJ2+WcdMV+yItKlQFnUktCSIFZYyToAXlafrT3TODxJRahze0Qk m5WdrrHAKAaD2Fl8feeVNKUtpz1l9IsV7KeqWysnR6bqRApod4pSN53VBRBPW0ZJB1MWjj RnIyxD5h5yc94XfswcmV3w5s/ef3Vcbd7zVWyhca2/jr7lZsxS2QIoNn1+FmNPxVEKwNwm e3fbl/5/BzqQNpnbzamhSc8x7i3kotbdZ5PEFltsQIboD2rtulWGQGVEZcOkug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828978; a=rsa-sha256; cv=none; b=ddzHe5Xkn27wKkhuqe71/+FsvkUZhzqpxK9glZOiDHy/b/IfdytMGaQ/0MuaUpG8WXdo8o 0u8ebeikYMValDw547N2WaPYGzXaVT8u9hxQ7ytTE9ObtSoSNJXlS+4VJv+ECu2/mamCsK qwfUbvG9Gf+WzyaE6wElVIamFrWDbWczaNs1PLa0ci/bqNFo5zDEeSIsUeC5K2oXOJlv7k OhFzFZuTUZdmgsRHEt+QNJngVC8qcltW2OjS3MO6IYYdrUp5sVFuMDlqt2d47mSbbRF9o2 KlLHFR6gkPqPYfIjLXBNf+Cve0LbHzxmez5RgqmQ1PqIdi244aXemtt1up/lHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNcy68SNz3YP; Fri, 09 May 2025 22:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGIrF062948; Fri, 9 May 2025 22:16:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGIGp062945; Fri, 9 May 2025 22:16:18 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:18 GMT Message-Id: <202505092216.549MGIGp062945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 94db776fa234 - main - pf: use __func__ rather than hardcoded function names List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 94db776fa2346e4bce082a481760fcc2cdb3660a Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=94db776fa2346e4bce082a481760fcc2cdb3660a commit 94db776fa2346e4bce082a481760fcc2cdb3660a Author: Kristof Provost AuthorDate: 2025-05-08 15:04:08 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:29 +0000 pf: use __func__ rather than hardcoded function names Replace function names with __func__ in debug prints to make grep happy. Obtained from: OpenBSD, bluhm , 68d5ab4417 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 20 +++++++++++--------- sys/netpfil/pf/pf_ioctl.c | 23 ++++++++++++----------- sys/netpfil/pf/pf_ruleset.c | 8 ++++---- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2f69f36e2db3..e9082da193e6 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4597,7 +4597,7 @@ pf_match_rcvif(struct mbuf *m, struct pf_krule *r) if (kif == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test_via: kif == NULL, @%d via %s\n", r->nr, + ("%s: kif == NULL, @%d via %s\n", __func__, r->nr, r->rcv_ifname)); return (0); } @@ -5255,8 +5255,8 @@ pf_test_eth_rule(int dir, struct pfi_kkif *kif, struct mbuf **m0) if (__predict_false(m->m_len < sizeof(struct ether_header)) && (m = *m0 = m_pullup(*m0, sizeof(struct ether_header))) == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test_eth_rule: m_len < sizeof(struct ether_header)" - ", pullup failed\n")); + ("%s: m_len < sizeof(struct ether_header)" + ", pullup failed\n", __func__)); return (PF_DROP); } e = mtod(m, struct ether_header *); @@ -6133,8 +6133,8 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, &s->src, &s->dst, rewrite)) { /* This really shouldn't happen!!! */ DPFPRINTF(PF_DEBUG_URGENT, - ("pf_normalize_tcp_stateful failed on first " - "pkt\n")); + ("%s: tcp normalize failed on first " + "pkt\n", __func__)); goto csfailed; } } else if (pd->proto == IPPROTO_SCTP) { @@ -9935,7 +9935,8 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, if (__predict_false((*m0)->m_len < sizeof(struct ip)) && (pd->m = *m0 = m_pullup(*m0, sizeof(struct ip))) == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test: m_len < sizeof(struct ip), pullup failed\n")); + ("%s: m_len < sizeof(struct ip), pullup failed\n", + __func__)); *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); return (-1); @@ -9984,8 +9985,8 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, if (__predict_false((*m0)->m_len < sizeof(struct ip6_hdr)) && (pd->m = *m0 = m_pullup(*m0, sizeof(struct ip6_hdr))) == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test6: m_len < sizeof(struct ip6_hdr)" - ", pullup failed\n")); + ("%s: m_len < sizeof(struct ip6_hdr)" + ", pullup failed\n", __func__)); *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); return (-1); @@ -10333,7 +10334,8 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 if (__predict_false(kif == NULL)) { DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test: kif == NULL, if_xname %s\n", ifp->if_xname)); + ("%s: kif == NULL, if_xname %s\n", + __func__, ifp->if_xname)); PF_RULES_RUNLOCK(); return (PF_DROP); } diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index bd3c2b93c954..cfa17b9925aa 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -6391,9 +6391,9 @@ shutdown_pf(void) for (rs_num = 0; rs_num < PF_RULESET_MAX; ++rs_num) { if ((error = pf_begin_rules(&t[rs_num], rs_num, anchor->path)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: " + DPFPRINTF(PF_DEBUG_MISC, ("%s: " "anchor.path=%s rs_num=%d\n", - anchor->path, rs_num)); + __func__, anchor->path, rs_num)); goto error; /* XXX: rollback? */ } } @@ -6415,8 +6415,9 @@ shutdown_pf(void) eth_anchor->refcnt = 1; if ((error = pf_begin_eth(&t[0], eth_anchor->path)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: eth " - "anchor.path=%s\n", eth_anchor->path)); + DPFPRINTF(PF_DEBUG_MISC, ("%s: eth " + "anchor.path=%s\n", __func__, + eth_anchor->path)); goto error; } error = pf_commit_eth(t[0], eth_anchor->path); @@ -6425,27 +6426,27 @@ shutdown_pf(void) if ((error = pf_begin_rules(&t[0], PF_RULESET_SCRUB, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: SCRUB\n")); + DPFPRINTF(PF_DEBUG_MISC, ("%s: SCRUB\n", __func__)); break; } if ((error = pf_begin_rules(&t[1], PF_RULESET_FILTER, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: FILTER\n")); + DPFPRINTF(PF_DEBUG_MISC, ("%s: FILTER\n", __func__)); break; /* XXX: rollback? */ } if ((error = pf_begin_rules(&t[2], PF_RULESET_NAT, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: NAT\n")); + DPFPRINTF(PF_DEBUG_MISC, ("%s: NAT\n", __func__)); break; /* XXX: rollback? */ } if ((error = pf_begin_rules(&t[3], PF_RULESET_BINAT, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: BINAT\n")); + DPFPRINTF(PF_DEBUG_MISC, ("%s: BINAT\n", __func__)); break; /* XXX: rollback? */ } if ((error = pf_begin_rules(&t[4], PF_RULESET_RDR, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: RDR\n")); + DPFPRINTF(PF_DEBUG_MISC, ("%s: RDR\n", __func__)); break; /* XXX: rollback? */ } @@ -6464,7 +6465,7 @@ shutdown_pf(void) break; if ((error = pf_begin_eth(&t[0], &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: eth\n")); + DPFPRINTF(PF_DEBUG_MISC, ("%s: eth\n", __func__)); break; } error = pf_commit_eth(t[0], &nn); @@ -6472,7 +6473,7 @@ shutdown_pf(void) #ifdef ALTQ if ((error = pf_begin_altq(&t[0])) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: ALTQ\n")); + DPFPRINTF(PF_DEBUG_MISC, ("%s: ALTQ\n", __func__)); break; } pf_commit_altq(t[0]); diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c index fc0651f8a0e8..6fd92201439d 100644 --- a/sys/netpfil/pf/pf_ruleset.c +++ b/sys/netpfil/pf/pf_ruleset.c @@ -336,7 +336,7 @@ pf_kanchor_setup(struct pf_krule *r, const struct pf_kruleset *s, strlcpy(path, s->anchor->path, MAXPATHLEN); while (name[0] == '.' && name[1] == '.' && name[2] == '/') { if (!path[0]) { - DPFPRINTF("pf_anchor_setup: .. beyond root\n"); + DPFPRINTF("%s: .. beyond root\n", __func__); rs_free(path); return (1); } @@ -358,7 +358,7 @@ pf_kanchor_setup(struct pf_krule *r, const struct pf_kruleset *s, ruleset = pf_find_or_create_kruleset(path); rs_free(path); if (ruleset == NULL || ruleset->anchor == NULL) { - DPFPRINTF("pf_anchor_setup: ruleset\n"); + DPFPRINTF("%s: ruleset\n", __func__); return (1); } r->anchor = ruleset->anchor; @@ -643,7 +643,7 @@ pf_keth_anchor_setup(struct pf_keth_rule *r, const struct pf_keth_ruleset *s, strlcpy(path, s->anchor->path, MAXPATHLEN); while (name[0] == '.' && name[1] == '.' && name[2] == '/') { if (!path[0]) { - DPFPRINTF("pf_anchor_setup: .. beyond root\n"); + DPFPRINTF("%s: .. beyond root\n", __func__); rs_free(path); return (1); } @@ -665,7 +665,7 @@ pf_keth_anchor_setup(struct pf_keth_rule *r, const struct pf_keth_ruleset *s, ruleset = pf_find_or_create_keth_ruleset(path); rs_free(path); if (ruleset == NULL || ruleset->anchor == NULL) { - DPFPRINTF("pf_anchor_setup: ruleset\n"); + DPFPRINTF("%s: ruleset\n", __func__); return (1); } r->anchor = ruleset->anchor; From nobody Fri May 9 22: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 4ZvNd02DGvz5wCY9; Fri, 09 May 2025 22: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNd00NW5z3RGx; Fri, 09 May 2025 22: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=1746828980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nRPvk5GDMyJ5C5uTlwu4R6jlC/Vb1Yd0c8qjzO8yDpQ=; b=jG+Btvtult4ziCA3JlbAEb6a8RFN55vqDhBm9/kM78MulA8uVkNdN3SM634Y21FdEoK/oT dkGuMaN2b6wqLKOA75OAjiHTJzU8Tufm1tuov4JD4uorty750rcsoM2CNVTxRWeSkFXT3Q Dm2kHxUIy/Ukg58TZe/9TRsAtGBmJI8ufZ+lMHDiZ0tuqfjz6O8O/VQMh6JM7frHCgY+E7 7+otR3WIsh8LMtuMJrNRpzi/SZzvhSCRIKeU+w+woLh5VYu5QXeHnfnNrsjtILRFI5aKqC 268W2jD2YoZLJV9C00ByyW/kqOzd6pZCh/xEtz94aji6NQfTGqt7l1f8XiUZbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nRPvk5GDMyJ5C5uTlwu4R6jlC/Vb1Yd0c8qjzO8yDpQ=; b=kybQo0Z0tzx1LHLZLc2nn6v9cNNEadX90HhqdkDbY4ihK22Oe5gei3iyQlRQDWtK+snqPp I3qMAE/VCeNJAa5r+jLhit40J1vohvey+0rD9IXP45fTjPbn+/2n7yidmP/yh6PZpA9TgJ n81K6LkEd2NvzouMkKzFeX1slWLaPBtMFsGLMFkROQbX0s6XLS2HG3UtCh/WzoUCNWetdw Mac6VrEljq2M8reBTy1AxRePGE4As+RNS45W3C40LmpCpM9S49LFXoJ3O5TEIzbyBW8wzI Uu3oC74xneS0KVEoRwPrc9vdIsjs2MsGZcJvKu6WTHxalggB7B6x3TUWwV+DoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828980; a=rsa-sha256; cv=none; b=hD52CiTLveUU931jkCUQ7oFTXOCP1jZap2jDMRP+HQudaOeDzmrosELtd3mUggLB+Psvxh RnZpPQVIguOtneT+ZzkLIzSdY2s/817+rU91pfpMx+kHB0dwfvsbwzklZLZRDOxFXGgpto o8kBlTcBYVpgOeWa6QLY41xS02a2uE5dgteXtJA3ydSw2rS8Tbk5Si9s6IS6qZon8rogdJ FZKneoo/cvqfwT58ZiFKiQ9wFr4clU+4frjEGzHcW/i8VmHtAd9JOlC+VL5cNsKwc/4rQc OBtX0EMVi1jb6zYUBM2PMgQtu0Uuq9UKBIobm6/5ojyslMNcVrkSmVVmbDsvCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNcz6wdjz3c5; Fri, 09 May 2025 22:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGJi5062985; Fri, 9 May 2025 22:16:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGJJY062982; Fri, 9 May 2025 22:16:19 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:19 GMT Message-Id: <202505092216.549MGJJY062982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a451bdf25b53 - main - pfctl: clean up TAILQ use in symset()/symget() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a451bdf25b534130d7ec5a6e3ef8e7b33fc6bdd5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a451bdf25b534130d7ec5a6e3ef8e7b33fc6bdd5 commit a451bdf25b534130d7ec5a6e3ef8e7b33fc6bdd5 Author: Kristof Provost AuthorDate: 2025-05-08 15:14:18 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:29 +0000 pfctl: clean up TAILQ use in symset()/symget() Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQ with more modern TAILQ_FOREACH(). This what symget() was already doing. Add paranoia '{}' around body of symget()'s TAILQ_FOREACH(). No intentional functional change. ok bluhm@ otto@ Obtained from: OpenBSD, krw , 54c95b7a05 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index f1ed5444cadd..befa5a9b0d39 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -7178,9 +7178,10 @@ symset(const char *nam, const char *val, int persist) { struct sym *sym; - for (sym = TAILQ_FIRST(&symhead); sym && strcmp(nam, sym->nam); - sym = TAILQ_NEXT(sym, entry)) - ; /* nothing */ + TAILQ_FOREACH(sym, &symhead, entry) { + if (strcmp(nam, sym->nam) == 0) + break; + } if (sym != NULL) { if (sym->persist == 1) @@ -7237,11 +7238,12 @@ symget(const char *nam) { struct sym *sym; - TAILQ_FOREACH(sym, &symhead, entry) + TAILQ_FOREACH(sym, &symhead, entry) { if (strcmp(nam, sym->nam) == 0) { sym->used = 1; return (sym->val); } + } return (NULL); } From nobody Fri May 9 22: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 4ZvNd16NG0z5wCZb; Fri, 09 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNd10shMz3RF3; Fri, 09 May 2025 22:16:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TaLPJkHqqVoQB7G54SUtfE2Yf6PkEN6dNsdxJu1emTI=; b=rX62Y+gN0A5yisC0mjxAHcivbK4cjQoG4KRgF6yc/IjtfbQnE3RhdRZqDsGeA8IEBi3HJ+ hD14Sk2oYpIjnqxyOJJUrVNHg3OybKK2G42ho59gd5uhMMaXu0CBsym6AmbLyVMuXWz1Rd lZ+zUZFmjY9etq8Vn68CehW9vY19Aaoj0zfNL2vULkACekz+2qe0Q9dzohEE9Fm2nCJngU z7oGSa/BbX43Y7LyGXwHFsRuq6JpIWC9uwccs/yZpVWs6rfug1tYd70H4GzWm+Yu3Y91fM n94/Xg35JklZb9LdPlyPzCIby5O3Ezge9g9+Ftc90cQQe0KfApkbfuQBpbveLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TaLPJkHqqVoQB7G54SUtfE2Yf6PkEN6dNsdxJu1emTI=; b=AFhABKSGolqbop5cZk1xwKqVwkbbearI7+w/A8x4QAzGOnOwnw77m0sFBunEUsHUTA13Qx 43WTO7vejm84fQb2xgwLIiw2XAcHX1pYisRWbfh4ofcciKRem6lAaO2bIQ/72uUNqijNxv ifGQQN2ATAuCCSssSNAkIPaRrLO8HjLXongSANpbPZt0scloOS9XE6pMkK+gfF/MQzpZQ0 gRM0WKs7r6nULdkmrianwF5DNcLISUlSlSQgw/9pJO9nhMwfrqI/mBCImn/2TSrOk0gcSL 4OWOgVnhuMbsFDOOiD6hlaM7Fz/ZoF64f5gCc03r6BQI0UfxUrfYKaM/dDUJRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828981; a=rsa-sha256; cv=none; b=GBmI84wKEq8S0Z8FMeLyYN/7FOoYGVEpiPYtaigcnkvli3Np+TyIF/qj1gX6MYaCOidEW8 53nTiX446BxlGhFRy05EzKgVnppWFIFEVqzmjycli4gIFp7xZCp+X5dE/iN5cePPlZqJZk MGeWj87Y82XwoAdp5hUi0RKgKvJGLNsR47Ar+gReWo8o+zOBVMT1YKe4teuaEbrQzy2bwa lNRiEfDk12hP5toQeXvea3EQG7V4XNbj/EAoGOGoBR1yFTww+l747Sldo9JDOEsQxv7oop 0V6tbThSRrri/MNZ6149BOFe7iMCni8b5T5OtDYAJNWpvp4Uk5vbdJlNFi85Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNd10SYPz3c6; Fri, 09 May 2025 22:16:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGKbt063020; Fri, 9 May 2025 22:16:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGKw4063017; Fri, 9 May 2025 22:16:20 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:20 GMT Message-Id: <202505092216.549MGKw4063017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a5e04964e80c - main - pf.conf.5: "hosts" is optional List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a5e04964e80cdd8c4203c1fb63ca6c1b7fe5b2e8 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a5e04964e80cdd8c4203c1fb63ca6c1b7fe5b2e8 commit a5e04964e80cdd8c4203c1fb63ca6c1b7fe5b2e8 Author: Kristof Provost AuthorDate: 2025-05-08 15:16:26 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:29 +0000 pf.conf.5: "hosts" is optional from matthew martin ok henning Obtained from: OpenBSD, jmc , 737fae0517 Sponsored by: Rubicon Communications, LLC ("Netgate") --- share/man/man5/pf.conf.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index b5e3e1126978..b75143f81b4b 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 27, 2025 +.Dd May 8, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -3355,13 +3355,13 @@ option = "set" ( [ "timeout" ( timeout | "{" timeout-list "}" ) ] | ether-rule = "ether" etheraction [ ( "in" | "out" ) ] [ "quick" ] [ "on" ifspec ] [ "bridge-to" interface-name ] - [ etherprotospec ] etherhosts [ "l3" hosts ] + [ etherprotospec ] [ etherhosts ] [ "l3" hosts ] [ etherfilteropt-list ] pf-rule = action [ ( "in" | "out" ) ] [ "log" [ "(" logopts ")"] ] [ "quick" ] [ "on" ifspec ] [ route ] [ af ] [ protospec ] - hosts [ filteropt-list ] + [ hosts ] [ filteropt-list ] logopts = logopt [ "," logopts ] logopt = "all" | "matches" | "user" | "to" interface-name From nobody Fri May 9 22:16: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 4ZvNd23Pgcz5wCrr; Fri, 09 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNd21w1xz3RN3; Fri, 09 May 2025 22:16:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m0QH7JD91oswwEr8m5vZrpEDzommpLcVQre+FGmhrWo=; b=qoAITRopjA/W6lbjWxex5Z7l9ZzM4pO/MbBfOGJrcFiJLsiPT/YaMWoxqbYJJzSOqoGvOM 2UuPFsqGWKWXbJvOJ2vJXcjAH+Z1PZjoHeCUT1/pq90BSzm51lX5Pd6B5B4RfI4ex4R6n2 thjFPj3rXG/FBa4UpkyHfH9O02pHzHY5Bxi/+b/YTOfd2Uhy+vPDdNLc+B/oJrfwuyM069 1axXyTwppryd9OiYT/x9+LskLUzy+p4dvQqhEPYw2fPU3TE5n580JnJ6oePX6RkeloAWSe KU5vj/CKDeVEXnKOq9mTMG0LEyE++ie0F+ePbqu2gmMZ58lBI20qPvIsJ7f/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m0QH7JD91oswwEr8m5vZrpEDzommpLcVQre+FGmhrWo=; b=BJvcQLlmV9hKz5WQ8d5rXzZPsyaSQqvnAuptwjPzUWIkXGiP0S+RgfF8O3s+GgwZcLwDw0 7Rl+RoS7O+JD54kwh91JQ4QNgWIdUnT5Bl6fOAYjoXgea8o9BpJO7axQAbd8aOR9KzRMvg 7IyMJ7osYutVum+Lbg3Ee/Xf/pUg6jZXhgK9WeRnNjTpgEaPDItlKWkWIK9BCXBnoQSe9h KbdwYBviWnRo8e/X8eap0Tltv1vI99e6oFg8jylToHUtyMP/6v5oiy7jyz0eoZx1Vd+VYl DH+Tpwa+j78PzeVneKSPPGz6SdODRKHMWqxhzCGjTbkSkmmPlmmVubAuwFPj/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828982; a=rsa-sha256; cv=none; b=m3ppihrpmpksmEsN+IO3Rp2fbn9MVHsfeWXd0sOvSJztGktJ9M5pWn7zWCoaXLjgmumvkB /VaLs/artR3R+sMXJ97LqzNVteZB4tZubBmcMHsJI8fQt0ARUupXavLSIZYJbY/ebRJ336 ehjNEVWCQmP7czar0vssG0mOCEGIsqtcTe3PzbL9uaqQ7xc7jSu1EQ8HiJ9FTjS74lnxvo 5KSzzodDEhhxBvO8pEi0u9qgY7bcSh9mC/js9HAfc5ekSjMLbvvfLYG3iU4rRnUZivecg2 ttbFKk0r/iwNDCLRm3qrlyyS7bgN7fQw56KxeTFtxQ31/fd8AddAKqCQsxo+Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNd21QWHz3c7; Fri, 09 May 2025 22:16:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGM3x063053; Fri, 9 May 2025 22:16:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGM5o063050; Fri, 9 May 2025 22:16:22 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:22 GMT Message-Id: <202505092216.549MGM5o063050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 138e34cffe3e - main - pfctl: rather than printing the wrong function name, dont print it at all List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 138e34cffe3e611634efc8b92ddb8b9709cc106b Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=138e34cffe3e611634efc8b92ddb8b9709cc106b commit 138e34cffe3e611634efc8b92ddb8b9709cc106b Author: Kristof Provost AuthorDate: 2025-05-08 15:21:42 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:29 +0000 pfctl: rather than printing the wrong function name, dont print it at all found by Klemens Nanni Obtained from: OpenBSD, benno , 20d6a6e4d2 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 6e0be926eff0..595f688d6139 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1126,7 +1126,7 @@ pfctl_show_eth_rules(int dev, char *path, int opts, enum pfctl_show format, if (anchorname[0] == '/') { if ((npath = calloc(1, MAXPATHLEN)) == NULL) - errx(1, "pfctl_rules: calloc"); + errx(1, "calloc"); snprintf(npath, MAXPATHLEN, "%s", anchorname); } else { if (path[0]) @@ -1242,7 +1242,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, if (anchorname[0] == '/') { if ((npath = calloc(1, MAXPATHLEN)) == NULL) - errx(1, "pfctl_rules: calloc"); + errx(1, "calloc"); strlcpy(npath, anchorname, MAXPATHLEN); } else { if (path[0]) @@ -1461,7 +1461,7 @@ pfctl_show_nat(int dev, const char *path, int opts, char *anchorname, int depth, } if ((npath = calloc(1, MAXPATHLEN)) == NULL) - errx(1, "pfctl_rules: calloc"); + errx(1, "calloc"); if (anchorname[0] == '/') { snprintf(npath, MAXPATHLEN, "%s", anchorname); From nobody Fri May 9 22:16: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 4ZvNd46blmz5wCV1; Fri, 09 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNd35g3Nz3RVg; Fri, 09 May 2025 22:16:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OCfXDstlJTiY+1uhnsqLhkAZJm7dpq9FB97IjyoN4MU=; b=QFBYV3/vf90lTCBSqXp4SSXMFoe7hyzlQLn/d8z1IPcGOtL4UgKfYAQW95GhVxY74gKdsj TgipiuurhyeGqIcqbp/f49HQ8okG9H+uKIyVjOXcIcqAW0IX5EyumJlhhhDRCFsPtS5gdr 8iIeLw2IEez1xjaoSdPoUz2WwVR/0JHhJ4+wWXmy6cAj6MU4UcFYQasJpQKuobwSoyKTw2 JPu4C8s2BcLM8pDrso+yanZwF3k1BOD43en5wMV1LfPjZQMMWg0gqR1RVNKBg+zHcNW9DL LZLGB36IqBFP5YT5OBoavrqK4le8eLwPgjqCk2Aw/tWhveL4ZT2EmZab+Krdtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OCfXDstlJTiY+1uhnsqLhkAZJm7dpq9FB97IjyoN4MU=; b=Jzk7NxAsOfViPFzvODALfxGNOs1c3ImhgQl8GE+jEhPMKVYL9fBgpU6LWHbV1QWRdjj35B bM5BpqRlwofrQ5gWVbVdsTiLRNF50BFG3Y/XrZU60uHJKsuWZ/7f8cjPFF56YIecsTd9+a +ighccRlh7rrPIfPo6kgUxZGkxkIAX8rvk6yC0GR6gGnLhII+Q67FV2sQ8UqsSPEZ2CL69 PMqjkd7RwAsc8MCO0bjyefYhJG2mf1847tOV63a8+hkSTzDNCgPTc1mRUBZT1MGGotUOAW mzU+P0XqKXMpwH5NeE6D712rCX/euBDU+YD/RskGjn5oyxwDHFCzqfB5ht/yKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828983; a=rsa-sha256; cv=none; b=iZzrYouJFWcYDi2E6vZN7t3Ktux/c4wkJQQWYLyq0MGQMHb+5jBPqsaa7RAHP4VDubeEYK 0XGfH0FHZe0LqAkmaKO06TigUdtznGkDN4H4jruXbuT2RSxueuWq9uidLIKcxOMFZdCa3t a1WgUc+7P87LuSZBpCZtkgtQ88EWiIBfEq/2lgN9W8rtAFxlt6GIUu3D7yeNjCfPVRgYmv /elNTkcAqEAp1tSxpOf3vLeNos0Iu7c5CLwh2N/W9ThcGWdHvJAKbJXgmO1akEmXqAn1Qt NPqoqnyEXaUrpWxrdpI91SBFkCGvSOkIeRDbnJ3KdvPVDrHYL/ZoHHK0NnZ01w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNd32BWwz40b; Fri, 09 May 2025 22:16:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGNOi063087; Fri, 9 May 2025 22:16:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGNWc063085; Fri, 9 May 2025 22:16:23 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:23 GMT Message-Id: <202505092216.549MGNWc063085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: be0e5f0221dc - main - pfctl: support killing states by key List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: be0e5f0221dc2875c6a832f8c285d6afff4e94bb Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=be0e5f0221dc2875c6a832f8c285d6afff4e94bb commit be0e5f0221dc2875c6a832f8c285d6afff4e94bb Author: Kristof Provost AuthorDate: 2025-05-09 13:29:12 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:30 +0000 pfctl: support killing states by key Add "key" modifier for -k to make pfctl can kill a state by specifying the key of the state. ok sasha Obtained from: OpenBSD, yasuoka , c42801d935 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.8 | 18 ++++++-- sbin/pfctl/pfctl.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 3 deletions(-) diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8 index 5029d8438ed7..acf1bacee08f 100644 --- a/sbin/pfctl/pfctl.8 +++ b/sbin/pfctl/pfctl.8 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 10, 2025 +.Dd May 9, 2025 .Dt PFCTL 8 .Os .Sh NAME @@ -254,13 +254,14 @@ option may be specified, which will kill all the source tracking entries from the first host/network to the second. .It Xo .Fl k -.Ar host | network | label | id | gateway | nat +.Ar host | network | label | id | key | gateway | nat .Xc Kill all of the state entries matching the specified .Ar host , .Ar network , .Ar label , .Ar id , +.Ar key , .Ar gateway, or .Ar nat. @@ -293,7 +294,7 @@ To kill all states with the target .Pp .Dl # pfctl -k 0.0.0.0/0 -k host2 .Pp -It is also possible to kill states by rule label or state ID. +It is also possible to kill states by rule label, state key or state ID. In this mode the first .Fl k argument is used to specify the type @@ -304,6 +305,17 @@ from rules carrying the label .Pp .Dl # pfctl -k label -k foobar .Pp +To kill one specific state by its key +(protocol, host1, port1, direction, host2 and port2 in the same format +of pfctl -s state), +use the +.Ar key +modifier and as a second argument the state key. +To kill a state whose protocol is TCP and originating from +10.0.0.101:32123 to 10.0.0.1:80 use: +.Pp +.Dl # pfctl -k key -k 'tcp 10.0.0.1:80 <- 10.0.0.101:32123' +.Pp To kill one specific state by its unique state ID (as shown by pfctl -s state -vv), use the diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 595f688d6139..c540a62f0409 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -83,6 +83,8 @@ int pfctl_net_kill_states(int, const char *, int); int pfctl_gateway_kill_states(int, const char *, int); int pfctl_label_kill_states(int, const char *, int); int pfctl_id_kill_states(int, const char *, int); +int pfctl_key_kill_states(int, const char *, int); +int pfctl_parse_host(char *, struct pf_rule_addr *); void pfctl_init_options(struct pfctl *); int pfctl_load_options(struct pfctl *); int pfctl_load_limit(struct pfctl *, unsigned int, unsigned int); @@ -954,6 +956,123 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) return (0); } +int +pfctl_key_kill_states(int dev, const char *iface, int opts) +{ + struct pfctl_kill kill; + char *s, *token, *tokens[4]; + struct protoent *p; + u_int i, sidx, didx; + int ret, killed; + + if (state_killers != 2 || (strlen(state_kill[1]) == 0)) { + warnx("no key specified"); + usage(); + } + memset(&kill, 0, sizeof(kill)); + + if (iface != NULL && + strlcpy(kill.ifname, iface, sizeof(kill.ifname)) >= + sizeof(kill.ifname)) + errx(1, "invalid interface: %s", iface); + + s = strdup(state_kill[1]); + if (!s) + errx(1, "%s: strdup", __func__); + i = 0; + while ((token = strsep(&s, " \t")) != NULL) + if (*token != '\0') { + if (i < 4) + tokens[i] = token; + i++; + } + if (i != 4) + errx(1, "%s: key must be " + "\"protocol host1:port1 direction host2:port2\" format", + __func__); + + if ((p = getprotobyname(tokens[0])) == NULL) + errx(1, "invalid protocol: %s", tokens[0]); + kill.proto = p->p_proto; + + if (strcmp(tokens[2], "->") == 0) { + sidx = 1; + didx = 3; + } else if (strcmp(tokens[2], "<-") == 0) { + sidx = 3; + didx = 1; + } else + errx(1, "invalid direction: %s", tokens[2]); + + if (pfctl_parse_host(tokens[sidx], &kill.src) == -1) + errx(1, "invalid host: %s", tokens[sidx]); + if (pfctl_parse_host(tokens[didx], &kill.dst) == -1) + errx(1, "invalid host: %s", tokens[didx]); + + if ((ret = pfctl_kill_states_h(pfh, &kill, &killed)) != 0) + errc(1, ret, "DIOCKILLSTATES"); + + if ((opts & PF_OPT_QUIET) == 0) + fprintf(stderr, "killed %d states\n", killed); + + return (0); +} + +int +pfctl_parse_host(char *str, struct pf_rule_addr *addr) +{ + char *s = NULL, *sbs, *sbe; + struct addrinfo hints, *ai; + struct sockaddr_in *sin4; + struct sockaddr_in6 *sin6; + + s = strdup(str); + if (!s) + errx(1, "pfctl_parse_host: strdup"); + + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_DGRAM; /* dummy */ + hints.ai_flags = AI_NUMERICHOST; + + if ((sbs = strchr(s, '[')) != NULL && (sbe = strrchr(s, ']')) != NULL) { + hints.ai_family = AF_INET6; + *(sbs++) = *sbe = '\0'; + } else if ((sbs = strchr(s, ':')) != NULL) { + hints.ai_family = AF_INET; + *(sbs++) = '\0'; + } else + goto error; + + if (getaddrinfo(s, sbs, &hints, &ai) != 0) + goto error; + + switch (ai->ai_family) { + case AF_INET: + sin4 = (struct sockaddr_in *)ai->ai_addr; + addr->addr.v.a.addr.v4 = sin4->sin_addr; + addr->port[0] = sin4->sin_port; + break; + + case AF_INET6: + sin6 = (struct sockaddr_in6 *)ai->ai_addr; + addr->addr.v.a.addr.v6 = sin6->sin6_addr; + addr->port[0] = sin6->sin6_port; + break; + } + freeaddrinfo(ai); + free(s); + + memset(&addr->addr.v.a.mask, 0xff, sizeof(struct pf_addr)); + addr->port_op = PF_OP_EQ; + addr->addr.type = PF_ADDR_ADDRMASK; + + return (0); + +error: + free(s); + return (-1); +} + int pfctl_get_pool(int dev, struct pfctl_pool *pool, u_int32_t nr, u_int32_t ticket, int r_action, const char *anchorname, int which) @@ -3282,6 +3401,8 @@ main(int argc, char *argv[]) pfctl_id_kill_states(dev, ifaceopt, opts); else if (!strcmp(state_kill[0], "gateway")) pfctl_gateway_kill_states(dev, ifaceopt, opts); + else if (!strcmp(state_kill[0], "key")) + pfctl_key_kill_states(dev, ifaceopt, opts); else pfctl_net_kill_states(dev, ifaceopt, opts); } From nobody Fri May 9 22:16: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 4ZvNd60kYvz5wCh2; Fri, 09 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNd50dZ3z3RHK; Fri, 09 May 2025 22:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V1KD8xWE2cLtRcw2rDiPIltP5qag0n39RffKmo9PLY=; b=DT5f+XlsCduE5DMVd5sB3EzDnbk5KXzYT5jhO4Sn5Yzd+0rJPqUQT58vUijx7SaraIryyB f9gBftIEg6dPd/An5+T/vmBYfy4ZOduyL21CNOCcfBmbebz1CfH72TPoBvBkASrj7AhzJW rR13ydcq9ABGuykH6I2QpUd0QXxcsGw9eG6Cm17fTPKkwswBnncc6ejUUMH5embImankpa WuxvuY1Zg4mMtlerOJhGDIyQADj2UOxY4Aj9fZJbRX7SaL7TbzjYxK6jw4RHQwFil2mMcj 1IJQYplM21S2hnl8dnM754SvJi47qUqzrQtqdwaBkA3hXPMeRbHA5nUwON33TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V1KD8xWE2cLtRcw2rDiPIltP5qag0n39RffKmo9PLY=; b=K300idUOlQekFfZ5XSeKnPDxTAKFpV6W50+EY9XWlAVo+eO3e3XBFar9Oif+x4EefWfTD5 t2/o1fvLY62w/0xdyFyR2X0yCqwgcSTTHngxvr2/YB1wZgrygHIbO6zZMoWGV00Bjqnrs5 5iVTdTzMlrw/IOTJglbAxsWSULxxHGZjIBOXOlnWbz3NjEZ3Ihnqr/4kX9KCrfBlpucRzt vgBFHwvSenkJD29OdfOSnoNGvugm5QbZI0Y3Ly7CA8xk4HM2IPweR/AaDoqdWlxtBeqe1C Aj+S1g2c9H3AmorWw2dI0oFdDJGzx/7ZVNwRCI263lyC3U7nsK3FQMHsXYqH8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828985; a=rsa-sha256; cv=none; b=G0m8s1G00pfnKAb+m74ERTNzkCOmc85XwIAXJkhRYk8E8EM/ylX2zz2DSzY3zSN6tbvNiQ W/LAUcTRSFl33ShIehksqefe1ESCzeY1tRg0sXTxemel0nB+d/vjlMJc4z8EYQm/vaRhhV aOU6i+N3i0+wssD8H1jugynFvpLViQp3Uh9RVTrvm5xbM6+izhgutigRkF5WYS+G7TTB8p Y5Dzp357OFHAiRgLb4Ua8u64WZXaD9HNrOzUGQCNwtW/5Z5sbrKFP48JTLMxpd5o13NQda xjUvB8C7m+EscJE48RiZHTxTS/Qljzr9A/8qHuZ6gjk7lFD2BMuzLm8rN1WzHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNd43PFXz3YQ; Fri, 09 May 2025 22:16:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGO0Z063120; Fri, 9 May 2025 22:16:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGOKC063117; Fri, 9 May 2025 22:16:24 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:24 GMT Message-Id: <202505092216.549MGOKC063117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f5f71f729a5f - main - pfctl: don't require port numbers when killing by key List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: f5f71f729a5fe029fdb029c2bbed35f88d44ab15 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f5f71f729a5fe029fdb029c2bbed35f88d44ab15 commit f5f71f729a5fe029fdb029c2bbed35f88d44ab15 Author: Kristof Provost AuthorDate: 2025-05-09 15:21:18 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:30 +0000 pfctl: don't require port numbers when killing by key If the port number is zero (e.g. for ICMP echo request states) we don't print it. Accept this when killing states by key. Assume port number 0 if not specified. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index c540a62f0409..94aaaa315639 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1040,8 +1040,9 @@ pfctl_parse_host(char *str, struct pf_rule_addr *addr) } else if ((sbs = strchr(s, ':')) != NULL) { hints.ai_family = AF_INET; *(sbs++) = '\0'; - } else - goto error; + } else { + /* Assume that no ':' means port 0 */ + } if (getaddrinfo(s, sbs, &hints, &ai) != 0) goto error; From nobody Fri May 9 22:16: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 4ZvNd63c5Bz5wCpv; Fri, 09 May 2025 22:16: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvNd60KKSz3RQc; Fri, 09 May 2025 22:16:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uwrgmZiIal5fRdhAURu8TP0XqA34h1z/8XyZBZ/ry+0=; b=F0clK4nSuSCSJeJVBi/Exz/wyF3VXznlO9OfA79/aZNYaphQiDsFOeybLNWm4pNtb9imib pGtR5fPbIkCY4PD9eidKug/qnHCaNEe0LGJUBxap9Q8HDcNl+wBYpM+NFNvEIkcbK2RGEr vDAMTgbtU2EMDpTtJN8oC3T0Uq7wnCSUNI9jY7NXygwUUEwPVsmho/WJTKcXeMvZH9G78Q 87Z2XEZiX1+JHEGK1o9+q1qjTicBdNKwfbjfwIcTXoU5MZL8ZZ3ihBDBTlz5yw5iYYl+s1 77L87ha14xqQu7Vyy1GpU+6fMyj1Fpd2TrP2V9QI/A3zVx916TxEQJnV1FviaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746828986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uwrgmZiIal5fRdhAURu8TP0XqA34h1z/8XyZBZ/ry+0=; b=f91JarPQ4QhsIKz/AfdqYs5b7GXYCtONbBDK6kODldEoqCH6uUkvvl3BY9k2bvVka/ptK1 NlDY3SyYx1s9rVH0n0n/tPMlXB/qs54+bRkrRFfRUwLCKlMrDIYbWEJEWAMytdIwZN0YpF KUJmX+q9jJ04dqLwCidz5wj6g0yCSm7NRCjL4izwHJCz8x5lxHdxXXUyWZjcu3k6RhTLJD hf/hnekyfAl4TZgrAnfqj6X/GdQGanYd7O2fmgwrr0bqj5GDY0Lf1y4kz3WcWOBN8zhxmY /nkxBBTpFridS0C5qYRZwgpRL5OxZH00W1qH8mcNIKelUiagpHG52NxWoNeHJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746828986; a=rsa-sha256; cv=none; b=HdVZ+1fiXnY/D0FL5cBItZXafJBZZZD9OuLly0a0qlHNP8Mw2N/BTB8paI7sgG3URHWIjR KbQokUcMHzRZC3pUJM05njbthdgobpcjERX+wnLK27mVavQrNS7q9gs/KOAZxyv8pmXliz rmXN5r6wW8R2J+Et97cNVjVXNd06anYr9YVWaFwM3ZsoChkpqOI96jE7RqAH0jtVNmGZwC UitrGRhjeMAxLMltLDXTollNPnFwKaMqoDZCPeVga9Whdr5tpNh4SWXZ63VpDeyLFP20wG fC5NQKsQn8viaHRY6qvcCk27tPKtdc2Nyva0AlvyBoouwPSMkZmi2wdb71tNQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvNd53zPCz40c; Fri, 09 May 2025 22:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MGPBu063153; Fri, 9 May 2025 22:16:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MGPlM063150; Fri, 9 May 2025 22:16:25 GMT (envelope-from git) Date: Fri, 9 May 2025 22:16:25 GMT Message-Id: <202505092216.549MGPlM063150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6b78da357ddc - main - pf tests: test killing states by key List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 6b78da357ddc22a1cfda217948e70d7d26c98828 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6b78da357ddc22a1cfda217948e70d7d26c98828 commit 6b78da357ddc22a1cfda217948e70d7d26c98828 Author: Kristof Provost AuthorDate: 2025-05-09 15:25:35 +0000 Commit: Kristof Provost CommitDate: 2025-05-09 20:49:30 +0000 pf tests: test killing states by key Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/killstate.sh | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tests/sys/netpfil/pf/killstate.sh b/tests/sys/netpfil/pf/killstate.sh index 5d8e040d3cbb..59db93276d58 100644 --- a/tests/sys/netpfil/pf/killstate.sh +++ b/tests/sys/netpfil/pf/killstate.sh @@ -574,6 +574,61 @@ id_cleanup() pft_cleanup } +atf_test_case "key" "cleanup" +key_head() +{ + atf_set descr 'Test killing states by their key' + atf_set require.user root +} + +key_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "block all" \ + "pass in proto tcp" \ + "pass in proto icmp" + + # Sanity check & establish state + atf_check -s exit:0 -o ignore ${common_dir}/pft_ping.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --replyif ${epair}a + + # Get the state key + key=$(jexec alcatraz pfctl -ss -vvv | awk '/icmp/ { print($2 " " $3 " " $4 " " $5); }') + bad_key=$(echo ${key} | sed 's/icmp/tcp/') + + # Kill the wrong key + atf_check -s exit:0 -e "match:killed 0 states" \ + jexec alcatraz pfctl -k key -k "${bad_key}" + if ! find_state; + then + atf_fail "Killing a different ID removed the state." + fi + + # Kill the correct key + atf_check -s exit:0 -e "match:killed 1 states" \ + jexec alcatraz pfctl -k key -k "${key}" + if find_state; + then + atf_fail "Killing the state did not remove it." + fi +} + +key_cleanup() +{ + pft_cleanup +} + atf_test_case "nat" "cleanup" nat_head() { @@ -653,5 +708,6 @@ atf_init_test_cases() atf_add_test_case "match" atf_add_test_case "interface" atf_add_test_case "id" + atf_add_test_case "key" atf_add_test_case "nat" } From nobody Fri May 9 22:50: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 4ZvPNW4cMKz5wFM2; Fri, 09 May 2025 22:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvPNW3pxXz42fS; Fri, 09 May 2025 22:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746831035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKjxTRqcYK/kZ9vQb3AqQrjDfTfixiJZ3HTFojVrIyQ=; b=jyRYb6tU49OMDdofAZIElqhxA4s1YhmN24rmnuJmg7Pvn0IXlY7ygbrbaKAhxfOlmKITrz tN+D2IfliS4UI/pEiSlWkzZsf6PZce6WvnifERBQFXidtdxb2MYi7ymjvDUXPUTVOkk5d9 Qz4LXi8/umjliLkIYd6d0o8zeoZrV5Dzssw7lkn6R81Hb5yXXaFveLPEQSqmwXU5IL9+0d Jv7QCrRmkvuw2y3YPMmeH9ZUqzNIl7zXdG72kyu3Jer1iWkuSfo6FNye8t6tqbKQmqpcGZ kWY09hjhgVBzOlGbk6qQ5VLDDRiaob+FwKgbRExOAO+ypAmMfGhR6STHRNwhEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746831035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKjxTRqcYK/kZ9vQb3AqQrjDfTfixiJZ3HTFojVrIyQ=; b=QfGxuA6Kxpdnkc/Ymtb242VnAGE18jNZPs8G96beMrGmcM56z2T0ekfKO/58GnuQaC7YZZ BjEjvzYjRyvZmwI/42HEDYZAu31e1G3fCBX4RmzitUGa/nLekjKScruK6VgYXdK2W0HHRP 1VNbJTbxgXRq+wfdKRz6zH+vAOWZFRp3oifYibJLuiI9u/uel3lUTuqdHsL0y7daVVMVFl t/tmLvE+qoPK3yr2LU5W7W61RhKZ7vmNkKFEmAzMK31MJmsR0GvOTIEG8MREJLaaBl15ik W+CR0urOxX2JAZ8ulLfMtkYfDSJP3lbTNjcTysyfIBOY/tepCY4yFOT0x54G0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746831035; a=rsa-sha256; cv=none; b=qF+F/lDm+TcMfNZBILGk/XNN966UcLCryymvFnk0gy6dRQGrMR4vK5Vc2tKcKMFN0Kh8KS EGDBZlfSqZlXU4MJK/jbBAw2r6X11u7Jdk/EVqDDirv+UUuiEUWumvYWRy7UtpuYnUku0r 9nCjCuMsn4+bMWzMPPox37Zv+9SuQSqgBf/tmuSGALiqku5ivbbuZAr8bk9c1Y1vpDPGys l57ftjcirUkW5aowm6gJLQ4krYEsoS7MjcJflDd/2R6jcFiHjz1o4IwhFVjFOi5SkNcizE bRD8lgygkdcEgzBCuFTyBuVnLa3ZU6YJhQwk9sYjCOsQ0grFpU7qm1h7KUFrtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvPNW37z9z4CJ; Fri, 09 May 2025 22:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MoZQe028154; Fri, 9 May 2025 22:50:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MoZsx028151; Fri, 9 May 2025 22:50:35 GMT (envelope-from git) Date: Fri, 9 May 2025 22:50:35 GMT Message-Id: <202505092250.549MoZsx028151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 7e0c5e0128c4 - main - sys/cdefs.h: add __nodiscard annotation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e0c5e0128c43bbae78190911aead8e1d9475ba5 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=7e0c5e0128c43bbae78190911aead8e1d9475ba5 commit 7e0c5e0128c43bbae78190911aead8e1d9475ba5 Author: Lexi Winter AuthorDate: 2025-05-09 21:28:14 +0000 Commit: Lexi Winter CommitDate: 2025-05-09 22:50:23 +0000 sys/cdefs.h: add __nodiscard annotation __nodiscard adds the [[nodiscard]] attribute to a function, type or constructor in C or C++, causing a value so marked to issue a compiler warning if it is discarded (i.e., not used or assigned) other than by casting it to void. this replaces the existing __result_use_or_ignore_check, which has a similar purpose but different semantics. since __nodiscard provides more functionality (at least in GCC) and __result_use_or_ignore_check only had a single user, remove __result_use_or_ignore_check. [[nodiscard]] has been supported in C++ since C++17, but only in C since C23; however, both LLVM and GCC implement it even in older language versions, so it should always be available with a relatively modern compiler. for Clang, [[nodiscard]] in C is only available since LLVM 17, but we can fall back to __attribute__((__warn_unused_result__)) which has the same semantics and provides support back to (at least) LLVM 11. GCC supports [[nodiscard]] in both C and C++ since at least GCC 11. for GCC, we can't provide a fallback as the semantics of its warn_unused_result are different, but since __result_use_or_ignore_check isn't defined for GCC anyway, we don't lose anything here. MFC after: 2 weeks Reviewed by: des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50217 --- share/man/man9/cdefs.9 | 19 +++++++++++++++---- sys/sys/cdefs.h | 50 ++++++++++++++++++++++++++++++++++++++------------ sys/sys/systm.h | 14 +++++++------- 3 files changed, 60 insertions(+), 23 deletions(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 4efce132d393..397ddb0891bb 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd January 6, 2025 +.Dd May 9, 2025 .Dt CDEFS 9 .Os .Sh NAME @@ -118,9 +118,20 @@ family of functions. .It Sy __fastcall Ta Use the .Dq fastcall ABI to call and name mangle this function. -.It Sy __result_use_check Ta Warn if function caller does not use it's return value -.It Sy __result_use_or_ignore_check Ta Warn if function caller does not use it's return value. -Allows the value to be explicitly ignored with a (void) cast. +.It Sy __result_use_check Ta Warn if function caller does not use its return value +.It Sy __nodiscard Ta Equivalent to the standard +.Dq [[nodiscard]] +attribute. +If applied to a function, warn if function caller does not use its +return value. +The warning may be silenced using a cast to +.Vt void , +or in C++, using an assignment to +.Va std::ignore . +If applied to a struct, C++ class or enum, this applies to all functions +returning values of that type. +If applied to a C++ constructor, this applies to creating instances of +the class using that constructor. .It Sy __returns_twice Ta Returns multiple times, like .Xr fork 2 .It Sy __unreachable Ta This code is not reachable at runtime diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index c46be9f35842..e79cf2972f3f 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -253,18 +253,6 @@ #define __noinline __attribute__ ((__noinline__)) #define __fastcall __attribute__((__fastcall__)) #define __result_use_check __attribute__((__warn_unused_result__)) -#ifdef __clang__ -/* - * clang and gcc have different semantics for __warn_unused_result__: the latter - * does not permit the use of a void cast to suppress the warning. Use - * __result_use_or_ignore_check in places where a void cast is acceptable. - * This can be implemented by [[nodiscard]] from C23. - */ -#define __result_use_or_ignore_check __result_use_check -#else -#define __result_use_or_ignore_check -#endif /* !__clang__ */ - #define __returns_twice __attribute__((__returns_twice__)) #define __unreachable() __builtin_unreachable() @@ -295,6 +283,44 @@ #define __noexcept_if(__c) #endif +/* + * nodiscard attribute added in C++17 and C23, but supported by both LLVM and + * GCC in earlier language versions, so we use __has_c{,pp}_attribute to test + * for it. + * + * __nodiscard may be used on a function: + * __nodiscard int f(); + * + * or on a struct, union or enum: + * struct __nodiscard S{}; + * struct S f(); + * + * or in C++, on an object constructor. + */ + +#if defined(__cplusplus) && defined(__has_cpp_attribute) +#if __has_cpp_attribute(nodiscard) +#define __nodiscard [[nodiscard]] +#endif +#elif defined(__STDC_VERSION__) && defined(__has_c_attribute) +#if __has_c_attribute(__nodiscard__) +#define __nodiscard [[__nodiscard__]] +#endif +#endif + +#ifndef __nodiscard +/* + * LLVM 16 and earlier don't support [[nodiscard]] in C, but they do support + * __warn_unused_result__ with the same semantics, so fall back to that. + * We can't do this for GCC because the semantics are different. + */ +#ifdef __clang__ +#define __nodiscard __attribute__((__warn_unused_result__)) +#else +#define __nodiscard +#endif +#endif + /* * We use `__restrict' as a way to define the `restrict' type qualifier * without disturbing older software that is unaware of C99 keywords. diff --git a/sys/sys/systm.h b/sys/sys/systm.h index f542a9a86018..7cc02c77bea4 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -309,9 +309,9 @@ int __result_use_check copyin(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); int __result_use_check copyin_nofault(const void * __restrict udaddr, void * _Nonnull __restrict kaddr, size_t len); -int __result_use_or_ignore_check copyout(const void * _Nonnull __restrict kaddr, +__nodiscard int copyout(const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); -int __result_use_or_ignore_check copyout_nofault( +__nodiscard int copyout_nofault( const void * _Nonnull __restrict kaddr, void * __restrict udaddr, size_t len); @@ -334,11 +334,11 @@ int64_t fuword64(volatile const void *base); int __result_use_check fueword(volatile const void *base, long *val); int __result_use_check fueword32(volatile const void *base, int32_t *val); int __result_use_check fueword64(volatile const void *base, int64_t *val); -int __result_use_or_ignore_check subyte(volatile void *base, int byte); -int __result_use_or_ignore_check suword(volatile void *base, long word); -int __result_use_or_ignore_check suword16(volatile void *base, int word); -int __result_use_or_ignore_check suword32(volatile void *base, int32_t word); -int __result_use_or_ignore_check suword64(volatile void *base, int64_t word); +__nodiscard int subyte(volatile void *base, int byte); +__nodiscard int suword(volatile void *base, long word); +__nodiscard int suword16(volatile void *base, int word); +__nodiscard int suword32(volatile void *base, int32_t word); +__nodiscard int suword64(volatile void *base, int64_t word); uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval); u_long casuword(volatile u_long *p, u_long oldval, u_long newval); int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, From nobody Fri May 9 22:50: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 4ZvPNX6rbkz5wFV1; Fri, 09 May 2025 22:50: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvPNX4l7gz42bh; Fri, 09 May 2025 22:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746831036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irhQIsmcBLymiVwNm61NFhmTTb3abLwf/XGtIxIx3MQ=; b=yQ+XG5NacXrPNNa6sW3jKTVwKxl8d8kceaNNmJcN0RAP+Jzk5xUgwwcnntwCaps14G2YV3 O4SZUWsHTkmqsHxF0HkqP2hOwn5SfOwzlXFsoGoVo4dzy9icZ+4rpZGPjLXOHmgNeUvaOW 5jvooyVeEWyhzqcIXHDOWajFoijT5WOKMv3vIcDOkDXCCgIyTCWF7rj0emsqu/wLbHKswL z28n1tX93zgJDc3ajrIdUdGHLSQviSEvBdlyh9nHF6dXa4Z9oQDJ7fvJRRUo5uqu/Oh7OW O62nphFMw8UCiZV8ko/W42HalbSq086rM++FdP3FvIt+pKV+HBVipeouYscwQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746831036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irhQIsmcBLymiVwNm61NFhmTTb3abLwf/XGtIxIx3MQ=; b=M6trPDMBGlKizs2YaEQYZDrcUVs7n5DK6+eONhmOhUqx7FQBo5haWqq0ymssjwAr58Fzu7 aIgLkaj8bLjfRlR0j/QMRrEsOtRRcdj9yv+WCuPnboqN83HmWQQKVknbXmSVeTXfBomtmc 0rJ3LZE4LkrmItcl14pf96A3rBA4ZBrerZ3NppSMWKEXoMz4kn2APP4pQIpH84IZIvyEf2 62w3CLezBSPoFdNf6bBhXtA26sO7K4vt4Wv2XnXnnL8JbKsbf2f8hWfS5NDFhBgQIsR+zx Ibz/6LGjwz0AS+FoUoYJPTVtwmNPPANiWhwSZ6t71ydz6LJngbuSs2TvJhgENg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746831036; a=rsa-sha256; cv=none; b=hd+zMYtmXHZa5Vi6fic/Jnz+HDbyF8JZmH7Dviq21j0rIg6WWNhVGCQlQ3E9+o4jJIlC0l fiZmCnHFUY8OgOH4YSglYVZWQ3AEZJie4LB9fiYH0tGEkey3if/F8TlRxApzZaJjSbxOO7 NzP3yDt4E3ESke0VWshwkiCwl++mW87g3PWqmLKxrH/GfHUehTeex0XB0FK91wpSidzKcl 0PBGOF0gW5+fk1eAWXw9TplU5axsWPZj54fhJCkJ9Zn9Cd5VaECv6xGitQlZm/Jto+589n Ts0oAWfImm3ZjbmWQg1w2WzWW/iOWB2hNNg8tI6aXYmfgR944MRgLzqCfx95pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvPNX44pCz4cN; Fri, 09 May 2025 22:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 549MoaHm028191; Fri, 9 May 2025 22:50:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 549MoaKO028188; Fri, 9 May 2025 22:50:36 GMT (envelope-from git) Date: Fri, 9 May 2025 22:50:36 GMT Message-Id: <202505092250.549MoaKO028188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 8c7d193e3cbe - main - net/if_dl.h: add param names in prototypes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c7d193e3cbe3d1c9a7f7869f1748bebefabaccf Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=8c7d193e3cbe3d1c9a7f7869f1748bebefabaccf commit 8c7d193e3cbe3d1c9a7f7869f1748bebefabaccf Author: Lexi Winter AuthorDate: 2025-05-09 21:34:16 +0000 Commit: Lexi Winter CommitDate: 2025-05-09 22:50:23 +0000 net/if_dl.h: add param names in prototypes previously these _KERNEL functions were inconsistent, with some having parameter names and some not. fix this by giving them all names, per style(9). Reviewed by: thj, des Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50219 --- sys/net/if_dl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h index 683f298f5463..74089277291c 100644 --- a/sys/net/if_dl.h +++ b/sys/net/if_dl.h @@ -73,9 +73,10 @@ struct sockaddr_dl { #ifdef _KERNEL struct ifnet; -struct sockaddr_dl *link_alloc_sdl(size_t, int); +struct sockaddr_dl *link_alloc_sdl(size_t size, int flags); void link_free_sdl(struct sockaddr *sa); -struct sockaddr_dl *link_init_sdl(struct ifnet *, struct sockaddr *, u_char); +struct sockaddr_dl *link_init_sdl(struct ifnet *ifp, struct sockaddr *paddr, + u_char iftypes); #else /* !_KERNEL */ From nobody Sat May 10 00:01: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 4ZvQzZ4dx6z5wK9s; Sat, 10 May 2025 00:02:34 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvQzZ2D2Kz41jt; Sat, 10 May 2025 00:02:34 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108159.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 549Lp7J6027795; Fri, 9 May 2025 17:02:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h= cc:content-id:content-type:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=PPS1017; bh=3WjqzKa7d7HW9 6NUlxB42/NXl0Aq6vq7xcyp750FFS0=; b=wJrnLy3jJTiABHB4JvmQtRkfEujYV BhxbgaC5UfFNuSQKBqV4TUE0om/+IeQVGR6Xs9Z8Rw84JIPbf2HvYgmcaolsFXm0 FLaGugJLVSzUeeeKNrnf9OaPQTyQE9a6EYjbZF04iv0cFfIRBBblYzaZTj4+nzxN Xih61Inw8LLIsg1aVaPaRh0kBstNCohHGMkUCQHiE0TVApkUZ3a7Y2tWcbWKAM/l 13mTfE7EPJjshuQUODAa+TOI7CoVplTFydbiDJlB8PU9mK0ds1nmcPghhSPiIb6u mL6Pu+IIMb1e1H/UVLwPB4rvlPEZ4QroThkV7bLhnRRNExHUUX+fgIDzg== Received: from bn1pr04cu002.outbound.protection.outlook.com (mail-eastus2azlp17010019.outbound.protection.outlook.com [40.93.12.19]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 46gpt34ct0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 May 2025 17:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wer0GcOy2Q7T/si2ylbbpTF+ZBRg1MRgNavtVHk/L/rB5Nhw7amR4oqPoYQuT65Cjy1RRXzupja+Pk5z8z+Jjtylth0akLTN//LsUr1gbVAZDoUjw7mZ489rpYX3f3hPe7RLdEyrM89AcP7F8VnKnIS3H+Z7odIj77aDyLmnx8ZlPNf1ze+u6n30/EyW/lSYWYUFlbZ0t8ifXWwQVV4737J+sgCScNUus/4HHyX5dFhx3abPAgUXIALXTHLyzD1rsGDv492BIaZPpkWvAPrD4JFy7LO0/5mNxFUWxgPyh6M8DM9k3Bi5DHzHeAdIWu8+JUyzr+f4QsTqMvoZZSR1wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3WjqzKa7d7HW96NUlxB42/NXl0Aq6vq7xcyp750FFS0=; b=MegkAyRhZjnnc2Fp0NTj0vMLDAOj6RNSGFAY1jEim6zrJl/UD4xrBdaqn6LRTxVkOaWIGw04R7BS6LPQIEPBLf/M1/xOw099vS6TZbCPMvyROY5t6z4WgLxCdIL9tFqT7GehdglXUnyObStXdHXBe7lEAOapLkzc8lFbvmRSBG0STjJtholGYQT9zFrvgRyMz60LI6N/gDuVKtd8K8hkb02/jbJzNRzjiG49TZpm6AG+tFcF7o88zqs7ABw4vjOFP6vNuiFdN1Pt5IVsynAr97IJZNhiY+VnHa9WvdLIkns7zfRhViXILOlzyh4AyY+h5MrG2iv6nEriY1wJwM7usQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.14) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3WjqzKa7d7HW96NUlxB42/NXl0Aq6vq7xcyp750FFS0=; b=EgENxqrblRvbkkMSRKxCnTVaqfj77b6Lc87nZeke7SFGkTkwAaomiRcu/1A9yByS3V5FiS/XeCZsi1E6Gr2vBKpfB6UKsTdyqQNIPQfkos3gnqHmc7mCULGIBXZdJQugniU4cdkVGSVoTWrM+qvzqr8p3JihTLI5rIYxrfi6AGQ= Received: from SJ0PR05CA0056.namprd05.prod.outlook.com (2603:10b6:a03:33f::31) by CO6PR05MB7602.namprd05.prod.outlook.com (2603:10b6:5:34c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.24; Sat, 10 May 2025 00:02:28 +0000 Received: from MWH0EPF000989EA.namprd02.prod.outlook.com (2603:10b6:a03:33f:cafe::55) by SJ0PR05CA0056.outlook.office365.com (2603:10b6:a03:33f::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8746.9 via Frontend Transport; Sat, 10 May 2025 00:02:28 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.239.14) by MWH0EPF000989EA.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.18 via Frontend Transport; Sat, 10 May 2025 00:02:28 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 9 May 2025 19:02:27 -0500 Received: from kaos.jnpr.net (10.104.20.6) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server id 15.2.1544.14 via Frontend Transport; Fri, 9 May 2025 19:02:27 -0500 Received: by kaos.jnpr.net (Postfix, from userid 1377) id 23743DD6CA; Fri, 09 May 2025 17:01:51 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 2217FDD5F7; Fri, 09 May 2025 17:01:51 -0700 (PDT) To: Kyle Evans CC: Brooks Davis , , , , Subject: Re: git: 78661696e639 - main - loader: i386: use -z nostart-stop-gc for bfd as well In-Reply-To: <33227b4e-a061-4bfb-833b-a9b513ce59c8@FreeBSD.org> References: <202505081947.548JlM93086830@gitrepo.freebsd.org> <34618.1746817571@kaos.jnpr.net> <33227b4e-a061-4bfb-833b-a9b513ce59c8@FreeBSD.org> Comments: In-reply-to: Kyle Evans message dated "Fri, 09 May 2025 16:25:07 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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-ID: <46773.1746835311.1@kaos.jnpr.net> Date: Fri, 9 May 2025 17:01:51 -0700 Message-ID: <47110.1746835311@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EA:EE_|CO6PR05MB7602:EE_ X-MS-Office365-Filtering-Correlation-Id: 6328a0f8-3fcf-4fcb-2ecc-08dd8f55f3e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?IPWptDJrBrKGLsFMX0N/bEAVrZ36H4gSAolltpblNIWWpiAoRn5k73peKd18?= =?us-ascii?Q?usLnJSIhHyCoA1twQ9/N6mMZEzUvAfqlH3/2ehhe3It0PqLziE408jxAfDrt?= =?us-ascii?Q?4vN5KdUa/PROZAYMG7ydtphFCVJ+bhypPaGcYs9jIN/j0Kdh92QDcL5UeGZY?= =?us-ascii?Q?zWhI1GKwsJ8TpilFIDen807dIDM8Uv3JQv5qhZVOVpiM9G4Su9VUCckvL3RX?= =?us-ascii?Q?0GoIUy278IsWNEUsbffSQwlpsG6YlgU6yQLLoMXCnsoOfiwKtLmE85j2+xul?= =?us-ascii?Q?lpJTLprlbJmBxDtkDWqG6GtfKJjab1DIjx6ROS3i9RP+sJ2OGLoHE6zCX57F?= =?us-ascii?Q?vfCG/onD7+23/kKDuM9v0WOP6dp82FRxTdsX6c8tNi6zIi1iT8adZex2F5iu?= =?us-ascii?Q?KQ7Ryaakc3KrF/xBpzcfQ09+M7Y8XX7q3nTTeHZRN2qQL0sUIzzqwP4QkazJ?= =?us-ascii?Q?EPCVtPcKa/atnlFArswEOX5j7PQFwLku0PU6gmxSKS+gmnyvgX6vL+WIv7MP?= =?us-ascii?Q?DhryDFAOX7hUAihDHRc1UvLnGH41yrmj/oKvmUF+6lM28SC3O/h4cwnXCrpk?= =?us-ascii?Q?+F6R1OdVok6jNGnFMo2sLm0uxE3VZQBf5eOoBHnAwKTFQZgS0DYVAImx+Wg7?= =?us-ascii?Q?EYduozSvtb25k02w+ceDTInN0062WBpy7SKQzyzh9SA5qOYUF2aEkjtNrqQ9?= =?us-ascii?Q?OUA63bHITOHMB7ZQmHFNtzeAG5vAVZc7E3idwBtIzO7ny+m8rp9abAhNSeX0?= =?us-ascii?Q?jIfKmiyWUXUUKWsxXZDydOeGQJizCrGayeLGIcLI4WQDhVxoByI8KDnO7Jjm?= =?us-ascii?Q?rjgrm5gRSo14pipL5UdDFkaMZqN70bkmjpixVh44qYtoT82hqyj/zld5O185?= =?us-ascii?Q?7d/ZuTE21C181Zsn3u6YEq6y1uLTGhrT9/IWipTbjzpO/ESQcBmXnIXxHvlC?= =?us-ascii?Q?KbTeQV/JWNdJ89HJMaGCwIHMYnSiWldooTewojg48WH1MgtT4MnNTHIwZ+NL?= =?us-ascii?Q?FVyae9arvPeVFaWXLfHlAbKm7HOndw2pO9HcYR+wR+ZZpong0UGZ/H/p4ntm?= =?us-ascii?Q?tLNL9PGBh5btfVvdKF4DscrFJIDRIzl1CgQcSgAKdekOLBZGKilbihOfoeX9?= =?us-ascii?Q?inATzGzuHCqRI/3Rr9aSDdPbh2BjjCbuymcpRSe6J5GRk4n3N6x+4RmKuXHE?= =?us-ascii?Q?9wP6IpsvQel2YyWEIjieTTH6hKlLpLbxV/ksFhtbCkTGld3Nr6C9L5Q+U9J1?= =?us-ascii?Q?CfQN5f0IZ19DElSKI1jsqKJBSPkaBk40mcoTQpH3NavtfkzYPaCWJ78R847h?= =?us-ascii?Q?Pk2ZMYo+9NRJHgxi1oUaKNFCaDWxe6ASSPdnvO9TyrnHATP9/Z4O2z6K0mx9?= =?us-ascii?Q?tyflkcibyhXhSw2SvUf/eK5gOOQ4vdfu0qzPB/qEYTe8oqw3ZrI9EBjfDjOF?= =?us-ascii?Q?wgtGAmdKNMFd4sWjL4Wzf7qAD8CT4E/XXu1A98/OKjq8e0Y3bR2P1L2oT395?= =?us-ascii?Q?ivI6banViVqlqv3AcehRCHUKsI2MdwHs02ua?= X-Forefront-Antispam-Report: CIP:66.129.239.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2025 00:02:28.2930 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6328a0f8-3fcf-4fcb-2ecc-08dd8f55f3e7 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989EA.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR05MB7602 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTA5MDI0MiBTYWx0ZWRfX16WWEiDcVipT 2ETETn50fPqfCIb75x8mD7l4lWcEkzkhx8qg21bZp1n4jnCWF8kIPpAqHu2KhkqOoDVUxzeK3LB tAvIqOdYMHS5BU3gh3D7sy7ynbdfwUbCq65nIWPu35kf1XNEjaCRH5IbBgHDka4eP8NrVvsgEEa N397QEoEES4CKiZMjfJyPO209yktzK5I6jpYpwz9nvc+ko1R9JLz+2bPALIIbQhFanpydTBzgim Mv0wla3QnHtUayDyNvKdL11hwuB6UXcWM0/C+kq+whuXfgKiD5y4MlL9bW+utcaEGo+YdbJ0y4R 3Qye7PnhZVGxrot+wH2NRnwNyXhA0S3sbos0ev4gHJf3Ic/+A+xsuU44Ygpjp+qfKqLNNnYE0Es FjA9ebNN2t5CjLKWzW4JXX964vUY2JfQ8kuXzd+9MqAvzsCnfexTBaV7mVcZSQZpcrzC9qmP X-Proofpoint-ORIG-GUID: edcFPG7-CeTBCs7JE2wMz7pn7V0DYih1 X-Proofpoint-GUID: edcFPG7-CeTBCs7JE2wMz7pn7V0DYih1 X-Authority-Analysis: v=2.4 cv=VbP3PEp9 c=1 sm=1 tr=0 ts=681e9798 cx=c_pps a=b4GTUaH8bIYRMqSiyTmTYA==:117 a=f/rncuQqEjTEF/G1odkJ9w==:17 a=h8e1o3o8w34MuCiiGQrqVE4VwXA=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=s63m1ICgrNkA:10 a=rhJc5-LppCAA:10 a=6I5d2MoRAAAA:8 a=Qpa-eWoAVWhScli6-H8A:9 a=CjuIK1q_8ugA:10 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-09_09,2025-05-09_01,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 impostorscore=0 bulkscore=0 adultscore=0 malwarescore=0 mlxscore=0 clxscore=1015 spamscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=951 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2504070000 definitions=main-2505090242 X-Rspamd-Queue-Id: 4ZvQzZ2D2Kz41jt X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US] X-Spamd-Bar: ---- Kyle Evans wrote: > Right, so Jessica's observation is that bfd hasn't actually made > start-stop-gc the default as of yet, so we shouldn't have needed the > knob. Is your /usr/local/bin/ld just devel/binutils as it would appear > upstream, or something special produced at Juniper? All packages are stock from freebsd.org /usr/local/bin/ld was installed by package binutils-2.44,1 Just repeating what I said on IRC for anyone following along; stand/i386/loader/Makefile was using 'cc' (I have WITH_SYSTEM_COMPILER stet), the filemon data shows '/usr/bin/cc' ran '/usr/bin/ld' but bsd.linker.mk was looking at ${LD} (ld) which was found via $PATH as '/usr/local/bin/ld' (bfd). From nobody Sat May 10 08:57: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 4ZvfrT1DBzz5w62M; Sat, 10 May 2025 08:57: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvfrT0ThRz3bGh; Sat, 10 May 2025 08:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746867433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=idAzz+C9S7ukN3ej/idndLAsFL9UE7wn9GhLJSHAvGs=; b=w0nMlatMtx+bjrcLggt7He0mwCFKgj5l+EGS3UVFuFG875VVUsyBTRiKpQhD6wdcFRYvvd xb291pNP0sbWSyVhhFh33wyGezL1FViS8nQ8J5ZFjtuAAL7jh6H35yJxglLKQYV2fppvG1 WXgb3TlAdWkkQt/EFpAADexkqyYdDKybJ3vBIrvT5M2CLqbO/lC6hwEVXGK6Oe2bad+UFG 9xVnC3t2tP7nwfe+baL37wLwH/wpHdX7RtICy1xPGq/O9jQQmDWUfd48EW0M+q/69IIBaA xy1r0d5/WV2iyRZBithCKamVfwM7Z8LGa51zFH77npKqPN4Ji8pO5/x/W25coA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746867433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=idAzz+C9S7ukN3ej/idndLAsFL9UE7wn9GhLJSHAvGs=; b=jnf98My6aAuhNaRWATQnLe3Cg95oUyo3MlGGqfl4Z+FGbK5O9/SQENL/BYampPxer3UZPd 7TsHKC6i7cdYZU4YubdJ8G+H94Aj92HRepgYmBV6h+ULurR8Ugp/EXQ8CMw/5l6g02Tu+O fOIA9U2CZyxgB7gkYyLqhrIUQ9gm7J6jCT5wgO3SvOLCtcZr8HntiZHhmQcJbP7Q1dLaMS G3p6ZlYd4/ft2KL6wYFI4R4DQD0p2mYb9Ed6q0I7yPiPIyTOgHXlGY7hpRwUzDWi/qVlrM vwa7k3XAhfrN29l990txF+NBNMsJCvcwfSNly4bmSueAunngculEG5m2lWEOsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746867433; a=rsa-sha256; cv=none; b=a/Yi+bU062nGUKB0vnCCjxQXRo1e/i/+Jqh02ne8Yw1LYpVnZDr8QaY+qbxcbeyuDHYDsz ExIwGjUb/DL+7c5mALzlIPXTdySTgCUygCOI+QeoOIdXk/4iET5SypfuovZ49yL2RIw9R9 lDWdp/4cOuFxyfNgV/KCDkAC6/VjEf4syqrtvGqpm1oQ3+J++eNpbt04sKBIsdIwEdvqA/ wQz+PiGfnRfLxHDbsyV1r5gOspUZubQvcq7cfO+hBXZj9pmwIzs6XSNNJoCZzTnYDXeMo7 UGTalYfftCPBJ5ghLC7gIVTKj8nm6HU3qHWfTBx1lrEWzM1v7hTEcKYbCLP3Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvfrT02tJzg6d; Sat, 10 May 2025 08:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54A8vCde059694; Sat, 10 May 2025 08:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54A8vCEi059691; Sat, 10 May 2025 08:57:12 GMT (envelope-from git) Date: Sat, 10 May 2025 08:57:12 GMT Message-Id: <202505100857.54A8vCEi059691@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: a4f6317bb64b - main - cp: Address style issues from external review. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: a4f6317bb64b8eb6a61c51c49811101fe74e8a9e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a4f6317bb64b8eb6a61c51c49811101fe74e8a9e commit a4f6317bb64b8eb6a61c51c49811101fe74e8a9e Author: Dag-Erling Smørgrav AuthorDate: 2025-05-10 08:55:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-10 08:55:03 +0000 cp: Address style issues from external review. * Correctly indent some comment blocks. * Avoid using strcpy(), even when we know it's safe. * Drop the (void) casts from fts_set() calls which can never fail. Fixes: 82fc0d09e862 Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D50256 --- bin/cp/cp.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 62cc2abc3654..f1cfde7e5008 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -280,7 +280,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) if (type == FILE_TO_FILE) { to.dir = AT_FDCWD; to.end = to.path + strlcpy(to.path, to.base, sizeof(to.path)); - strcpy(to.base, dot); + strlcpy(to.base, dot, sizeof(to.base)); } else if (type == FILE_TO_DIR) { to.dir = open(to.base, O_DIRECTORY | O_SEARCH); if (to.dir < 0) @@ -333,7 +333,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) mode = curr_stat->st_mode | S_IRWXU; if (mkdir(to.base, mode) != 0) { warn("%s", to.base); - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; continue; } @@ -341,7 +341,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) if (to.dir < 0) { warn("%s", to.base); (void)rmdir(to.base); - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; continue; } @@ -349,7 +349,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) warn("%s", to.base); (void)close(to.dir); (void)rmdir(to.base); - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); to.dir = -1; badcp = rval = 1; continue; @@ -371,33 +371,33 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) to.end += len; } skipdp = false; - /* - * We're on the verge of recursing on ourselves. - * Either we need to stop right here (we knowingly - * just created it), or we will in an immediate - * descendant. Record the path of the immediate - * descendant to make our lives a little less - * complicated looking. - */ + /* + * We're on the verge of recursing on ourselves. + * Either we need to stop right here (we knowingly + * just created it), or we will in an immediate + * descendant. Record the path of the immediate + * descendant to make our lives a little less + * complicated looking. + */ if (type != FILE_TO_FILE && root_stat->st_dev == curr_stat->st_dev && root_stat->st_ino == curr_stat->st_ino) { assert(recpath == NULL); if (root_stat == &created_root_stat) { - /* - * This directory didn't exist - * when we started, we created it - * as part of traversal. Stop - * right here before we do - * something silly. - */ - (void)fts_set(ftsp, curr, FTS_SKIP); + /* + * This directory didn't exist + * when we started, we created it + * as part of traversal. Stop + * right here before we do + * something silly. + */ + fts_set(ftsp, curr, FTS_SKIP); continue; } if (asprintf(&recpath, "%s/%s", to.path, rootname) < 0) { warnc(ENOMEM, NULL); - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; continue; } @@ -476,9 +476,9 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) /* * This can happen in two cases: * - DIR_TO_DNE; we created the directory and - * populated root_stat earlier. + * populated root_stat earlier. * - FILE_TO_DIR if a source has a trailing slash; - * the caller populated root_stat. + * the caller populated root_stat. */ dne = false; to_stat = *root_stat; @@ -497,7 +497,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) to.base, to.path, curr->fts_path); badcp = rval = 1; if (S_ISDIR(curr_stat->st_mode)) - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); continue; } @@ -524,7 +524,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) if (!Rflag) { warnx("%s is a directory (not copied).", curr->fts_path); - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; break; } @@ -540,13 +540,13 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) mode = curr_stat->st_mode | S_IRWXU; if (mkdirat(to.dir, to.path, mode) != 0) { warn("%s/%s", to.base, to.path); - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; break; } } else if (!S_ISDIR(to_stat.st_mode)) { warnc(ENOTDIR, "%s/%s", to.base, to.path); - (void)fts_set(ftsp, curr, FTS_SKIP); + fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; break; } From nobody Sat May 10 08:57: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 4ZvfrV3kL7z5w62Q; Sat, 10 May 2025 08:57: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvfrV1brsz3bKH; Sat, 10 May 2025 08:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746867434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q3/OErK9oZeN2jOi9p8T6SSJFqupac5sDZr/2UBTjhY=; b=mMpjINfswOEm++kvKwh+vnI2icO36gLLoaZEF8akdakVA09upJ28a5/XgVQxRMoHAYnC5m FXz2p7TsDPgSZzEvG/yjMsu+grd+enyrq5v93D/fc4zAjPxnCJkjnSvJh6/gGn2fzjhGjX /74qqx31FEgMyfshsmXku+OxEs0ED9Knyjw/TS/3HLeucrq9lniy8JNRdwF/UtQVnxnLX4 4U2+8GSLl1iOYQOpLx2239ra3MyRGDUjUEL80EW31jUrRvn72iZCUXSBGYVXHlBNjh4JDQ QOpKVJXLtHffra45uJNMA8BkcXx5BnrN34/QmUmkjHy6jF3jZpmDURbkcBt+fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746867434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q3/OErK9oZeN2jOi9p8T6SSJFqupac5sDZr/2UBTjhY=; b=XbkZpRIE7uSSRLSUUckUUbTHYIiawfonHdERC1uWhPIvHbIuNxMa/IyXVUgEBICNEb5ZRE iTBysbKMazh6KDJmkESgMDF9/OgqT+6qIphE7tp3u8ZW5hf9C+V+ko9Rl7a1EmRgmTsp6W jEZ9h37IdWBCfzMtfpQlYrSEIqiP+C0RFVslGCMExFhPqCzlB461lrDXARlgggCx2pXRNH c+IC/ZSvOtxNJfsRHtVzvzSO9t/yLkAEX5w3NhOwfrlszslXmtggvtLWIY49WxqFqUvg1l WXYI4e1LSfEAcGcgJpAuAkT9JaQ5x8PCZkxm43Ncp8smPXEgKf6k0wOGFxTq6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746867434; a=rsa-sha256; cv=none; b=Ao0WW3zg27nI8jnJf/0sTO8cKx6R/oLl0VMZ+VGQPstqp7sIsK/1h8foXy8vNrN9UIg8M/ ujI7t45pS2QsgK1AzpX3EPaeevelfbp42hV0jADqMcr0tmY6sAma5rsDBuiBXs0B18Zsj4 1yCJg5F9dcGcpgsrH0SBcb9tLvzy8fn/8xaAActqP1+ue9z7t9ebGF8WtKyvLDYh2VX+N5 mdN7cxCsrT9/xqWsgue1pNHWIZiPbqFG3RCovhpVF2abZ63xHvUAsTujNK/ObKIED3DtT/ FNag7PWlQozTT3WCTrB7HHjL0EjMPH/BjnW9o91g43KywYAN+yzhZf+cu2IHsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvfrV13kBzg7p; Sat, 10 May 2025 08:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54A8vE4a059729; Sat, 10 May 2025 08:57:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54A8vEjq059726; Sat, 10 May 2025 08:57:14 GMT (envelope-from git) Date: Sat, 10 May 2025 08:57:14 GMT Message-Id: <202505100857.54A8vEjq059726@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: be7839151cc9 - main - cp: Fix dead link case. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: be7839151cc9e3dfc428933d5f2705b32cdf4b86 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=be7839151cc9e3dfc428933d5f2705b32cdf4b86 commit be7839151cc9e3dfc428933d5f2705b32cdf4b86 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-10 08:55:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-10 08:55:35 +0000 cp: Fix dead link case. The test case was a) not doing what I intended it to do and b) missing a third possible configuration. Fix the test case, and fix the code by not setting the beneath flag (which restricts operations to the destination tree) unless we are recursing. Fixes: 82fc0d09e862 Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D50257 --- bin/cp/cp.c | 2 +- bin/cp/tests/cp_test.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index f1cfde7e5008..a3c8d910639c 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -267,7 +267,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) char *recpath = NULL; int atflags, dne, badcp, len, rval; mode_t mask, mode; - bool beneath = type != FILE_TO_FILE; + bool beneath = Rflag && type != FILE_TO_FILE; bool skipdp = false; /* diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index 6644588f1ce8..bfc4009580cb 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -479,10 +479,15 @@ to_deadlink_append_body() mkdir bar ln -s baz bar/foo atf_check cp foo bar - atf_check cmp -s foo bar/foo - rm -f bar/foo + atf_check cmp -s foo bar/baz + rm -f bar/foo bar/baz + ln -s baz bar/foo + atf_check cp foo bar/ + atf_check cmp -s foo bar/baz + rm -f bar/foo bar/baz + ln -s $PWD/baz bar/foo atf_check cp foo bar/ - atf_check cmp -s foo bar/foo + atf_check cmp -s foo baz } atf_test_case to_dirlink From nobody Sat May 10 08:57: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 4ZvfrW4qPpz5w6P8; Sat, 10 May 2025 08:57: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvfrW2cD6z3bST; Sat, 10 May 2025 08:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746867435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuUenWuRvxQDjexYXTOg/8v+EZoGBijmVJu6L8HtTvk=; b=nmnHWKh3A+vkg0mm6VzOvvSY/onRx0Wh6qQSZj5hYUVjP9lZgT6MBFLSDJrSkM6kp/RItR BWhXwM5ILws9J2/e3uUszcVit6naAkcqQjlR02FTyTLXAUriQXn5Ut81uuUuuWPt+Hyie8 QV9/ZZaeWUG7wp3iM4aou2A5H7nkhHsxX7WF5iDzq8K3FIEL50KiAqOYMDijShRLtUQAr5 Iz5npw1K1vCfSzyT5qvGehaehc3B2OULireHbwNP3BvJk/ncbMv9gIWtfKR++b1vs05tBt uKgFzJ4vQM8wugWrz0QA1WRhpUvSQaqG7Y7l0XZi/IaGCCQxpWwczonCggzQoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746867435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuUenWuRvxQDjexYXTOg/8v+EZoGBijmVJu6L8HtTvk=; b=R907h2/8RJcZSsOCbl8rqz2DzLyNnf+bMVfJg1TYPFnLDxkqs61ygkqPGMHa9s84aOwjLj rtpb0SzknGmoxEAeg9ANwKQuXtpWigbEG0RLWwhMzEHAjm1S39Xn5clIg1LEJ2PvV2O9u7 DVjhTqCCY/z8DI6UfuHNRRfSL7niRoFVu3wI1dzQmE7t5mogIYVlyi8mjBKf+iUFoaY665 Px/0iCddmUqk3N9pMoOSV2puaqQlgHsx53AFDOmU8XXE10RRis1zZqYjYM4z9/+9Xv0qdR PQmRmzKBcsDas8PfiE9RZ+ApuDZnogW1dt/zqEZpgT12r1MjlLLvVYYfIzPO/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746867435; a=rsa-sha256; cv=none; b=vtd+WbSGm9g3IHYNk9Mt5+HWVRuGWgC7GMArLoGhuwMtRwDgl6dd1qLJm0lEqckb3kxuXB bqHYutsjKOku2y0GHCmRXtNONeD/RfZaCWvlscvAtV5VRihQStf6UeXYatfokxAYX/4mkS YxljndFXCDY8u1ORxTKbVzdP+2N6pwGer5BZ7TdGt0X8UpPxuwywNF0IaD06VUKMFo5eTS CfyRaKxXU4waI7seT0NT8uoGZ/7p2KCeo6pbD4biPzPJHD7KU/ls7DDHgupVQ3nhl9WEhY FBCcOxBXAErF1ujByVf5Y0QaL+rmdgwA0tD6Au8x2o/JR9NHUTxnqoUVVRhn0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvfrW1vw3zgPK; Sat, 10 May 2025 08:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54A8vFMm059764; Sat, 10 May 2025 08:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54A8vFOZ059761; Sat, 10 May 2025 08:57:15 GMT (envelope-from git) Date: Sat, 10 May 2025 08:57:15 GMT Message-Id: <202505100857.54A8vFOZ059761@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 48578dcb6b7e - main - cp: Fix issues with destination directory 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48578dcb6b7ea14e095bf783152b5bc66c045a10 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=48578dcb6b7ea14e095bf783152b5bc66c045a10 commit 48578dcb6b7ea14e095bf783152b5bc66c045a10 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-10 08:55:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-10 08:55:41 +0000 cp: Fix issues with destination directory mode. Ensure that we are able to enter the destination directory after we create it, even if the current umask would normally prevent it, and that it has the expected permissions once we are done, even if we had to tweak them to be able to enter it. Fixes: 82fc0d09e862 Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50266 --- bin/cp/cp.c | 33 +++++++++++++++++++++++++++++---- bin/cp/tests/cp_test.sh | 23 +++++++++++++++++++++++ 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index a3c8d910639c..c6b34198f20a 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -331,10 +331,18 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) assert(to.dir < 0); assert(root_stat == NULL); mode = curr_stat->st_mode | S_IRWXU; + /* + * Will our umask prevent us from entering + * the directory after we create it? + */ + if (~mask & S_IRWXU) + umask(~mask & ~S_IRWXU); if (mkdir(to.base, mode) != 0) { warn("%s", to.base); fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; + if (~mask & S_IRWXU) + umask(~mask); continue; } to.dir = open(to.base, O_DIRECTORY | O_SEARCH); @@ -343,6 +351,8 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) (void)rmdir(to.base); fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; + if (~mask & S_IRWXU) + umask(~mask); continue; } if (fstat(to.dir, &created_root_stat) != 0) { @@ -352,9 +362,14 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) fts_set(ftsp, curr, FTS_SKIP); to.dir = -1; badcp = rval = 1; + if (~mask & S_IRWXU) + umask(~mask); continue; } + if (~mask & S_IRWXU) + umask(~mask); root_stat = &created_root_stat; + curr->fts_number = 1; } else { /* entering a directory; append its name to to.path */ len = snprintf(to.end, END(to.path) - to.end, "%s%s", @@ -432,9 +447,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) } else if (curr->fts_number) { const char *path = *to.path ? to.path : dot; mode = curr_stat->st_mode; - if (((mode & (S_ISUID | S_ISGID | S_ISTXT)) || - ((mode | S_IRWXU) & mask) != (mode & mask)) && - fchmodat(to.dir, path, mode & mask, 0) != 0) { + if (fchmodat(to.dir, path, mode & mask, 0) != 0) { warn("chmod: %s/%s", to.base, to.path); rval = 1; } @@ -538,12 +551,22 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) */ if (dne) { mode = curr_stat->st_mode | S_IRWXU; + /* + * Will our umask prevent us from entering + * the directory after we create it? + */ + if (~mask & S_IRWXU) + umask(~mask & ~S_IRWXU); if (mkdirat(to.dir, to.path, mode) != 0) { warn("%s/%s", to.base, to.path); fts_set(ftsp, curr, FTS_SKIP); badcp = rval = 1; + if (~mask & S_IRWXU) + umask(~mask); break; } + if (~mask & S_IRWXU) + umask(~mask); } else if (!S_ISDIR(to_stat.st_mode)) { warnc(ENOTDIR, "%s/%s", to.base, to.path); fts_set(ftsp, curr, FTS_SKIP); @@ -554,8 +577,10 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) * Arrange to correct directory attributes later * (in the post-order phase) if this is a new * directory, or if the -p flag is in effect. + * Note that fts_number may already be set if this + * is the newly created destination directory. */ - curr->fts_number = pflag || dne; + curr->fts_number |= pflag || dne; break; case S_IFBLK: case S_IFCHR: diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh index bfc4009580cb..29dce783ffe2 100755 --- a/bin/cp/tests/cp_test.sh +++ b/bin/cp/tests/cp_test.sh @@ -557,6 +557,28 @@ to_link_outside_body() cp -r dir dst } +atf_test_case dstmode +dstmode_body() +{ + mkdir -m 0755 dir + echo "foo" >dir/file + umask 0177 + #atf_check cp -R dir dst +#begin + # atf-check stupidly refuses to work if the current umask is + # weird, instead of just dealing with the situation + cp -R dir dst >stdout 2>stderr + rc=$? + umask 022 + atf_check_equal 0 $rc + atf_check cat stdout + atf_check cat stderr +#end + atf_check -o inline:"40600\n" stat -f%p dst + atf_check chmod 0750 dst + atf_check cmp dir/file dst/file +} + atf_init_test_cases() { atf_add_test_case basic @@ -593,4 +615,5 @@ atf_init_test_cases() atf_add_test_case to_dirlink atf_add_test_case to_deaddirlink atf_add_test_case to_link_outside + atf_add_test_case dstmode } From nobody Sat May 10 14:48: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 4Zvpdw16g4z5wRCg; Sat, 10 May 2025 14:48: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zvpdv5XTBz3YQG; Sat, 10 May 2025 14:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746888515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fmlsuyw27jBv64yUjKWrvUX2cgYRhizISd5jgRW34l4=; b=yHyiV/1aEPKM+r+DGdHZvOs7VfPRV2hM0jga3Fjr44oXqqYCWlz3g+5BvI+vs8KRZ/6QS7 SGFt8Aw1UVkLfTEjp/40KgyzPvjYCaWxeT/OuSMaXE3jDvt8OkVG06AK8vYHlufeQwL3kn aRjAJROw4GPUianqPT7gpCh17itW3bKyx2uwouahnE4G37Aoq1LrVuxNVrYCXIIt5b1olm SgZfs8hVimN+9JmQvIM98NFsFWEb73O0606o3w0b7uFrrGgKG02vUXD5MLPw/tnnLCJuJA erWNYQwANiHMKslgrVCWQ7o+U05nh8gfB3EMUusBIIW5uPaxk716B0owdom0iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746888515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fmlsuyw27jBv64yUjKWrvUX2cgYRhizISd5jgRW34l4=; b=wJh+5v14WSRluE4Et98g+tJgLoC6rxTpVzzDGtJ2Z7qVNDzGCXGmogq370hPGDGbylXUV1 JMBNLfv5+s1ADBWAAcGCsY7Jkb6zBD5GTbxnkcFRrD9sEo6Bw4iLknCEudAPLzkhJDWVl8 UQyp8qKMemlEoD3OXH10uISTOhMv0Sw80EgZ4H4djvIwLDtNdjTFT8foq4BIubXABcpkZV 05ETVRUqqlLsXsyQrdbS2mETzmtXUXvbZ+CrLwudbHg846sB4g6r1itqr6Vdc8xk1Ws3w7 dxr1iG1VyNt1NVhpYKAEz0Z3+uAsCl+Yz8FZHsGTOValfeqrawaQ2iTX4Upo/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746888515; a=rsa-sha256; cv=none; b=T7cBJvc036CDa4ktm0bmdGcxc5a4/XQZ5//ohitKRpPloOF1NQMdPmQWEabJEaGDbpxhTu 5caih37WwfDqvdELunD6xmrr2gipFcH2lk+lAD7iDXyEfaH3roXohEH+kvTrmuaQuTdC4m igKnYY25d6uB2r0JPl6eirJSRhPLC4WaLKl8grDDIDvGcPNbSD+ayD0eJBvLc20PQV35mn 9Mb83TpYj4+KwdsWXSx3969lP2icOWid30gBP0uQ7mbXan1e5gmnG/lgBRP6Imkcyuk1z7 fXN43uUbnnKb8zy9tZf/zpJqCWE2Kj46/mUlc2WcNeUyIhNmt8rCocQhu6msCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zvpdv40TYzqkp; Sat, 10 May 2025 14:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54AEmZ1x014940; Sat, 10 May 2025 14:48:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54AEmZVh014937; Sat, 10 May 2025 14:48:35 GMT (envelope-from git) Date: Sat, 10 May 2025 14:48:35 GMT Message-Id: <202505101448.54AEmZVh014937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 511de5b1430e - main - runat.c: Add an explicit check for snprintf() failure List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 511de5b1430ea974b3dc6fcb2af28d2e10b2b25e Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=511de5b1430ea974b3dc6fcb2af28d2e10b2b25e commit 511de5b1430ea974b3dc6fcb2af28d2e10b2b25e Author: Rick Macklem AuthorDate: 2025-05-10 14:44:38 +0000 Commit: Rick Macklem CommitDate: 2025-05-10 14:46:17 +0000 runat.c: Add an explicit check for snprintf() failure The check for "outsiz" too large was probably sufficient to catch failures, since it was cast to an unsigned (size_t). However, it seems appropriate to add an explicit check for a failed case (returning -1). Discussed with: oshogbo Fixes: 0660de8172cd ("runat: Add a runat(1) utility similar to the Solaris one") --- usr.bin/runat/runat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/runat/runat.c b/usr.bin/runat/runat.c index 66f4ebadd180..99437f3472f4 100644 --- a/usr.bin/runat/runat.c +++ b/usr.bin/runat/runat.c @@ -52,6 +52,8 @@ main(int argc, char *argv[]) pos = 0; for (i = 1; i < argc; i++) { outsiz = snprintf(&buf[pos], siz, "%s ", argv[i]); + if (outsiz <= 0) + errx(1, "snprintf failed: returned %d", outsiz); if ((size_t)outsiz > siz) errx(1, "Arguments too large"); pos += outsiz; From nobody Sat May 10 19:21: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 4ZvwhV1pWdz5vkCT; Sat, 10 May 2025 19:21: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZvwhT5p1Zz3G6n; Sat, 10 May 2025 19:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746904873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZMCCIlgC0mtI04cGXHbEiXYAuHXW3V8EOVVtCCsr3K8=; b=qJW9jvFBX60pl/69OXHGN8uosASkoVRWdqCgFr87HNxvMvN2UQLKtSow6zomPHiwido5sY rHaU/Y9RGcTx4TIPRw6UDkjk0XpDjBjP1x2PThdI8mJOKnkPH/PtKIWnX6qf5d/q91ZYje vIhvK3KyeLHWBCuRhDexhha6kpzASv+ElLOxzPm1bidKKBbk7xCSqoaRBZ1GdUYvztDdWT MJHAHSQ2n0wpGSBFQWADilGA04eJoxNxrECYHQMX/ENKV6/VmEWzmUuAa2cVrR1jCmhkUZ UdO9k54fQucKec889IAiTK2w06WUMsflcTJESfwaqRuoQ5ID4ij6gK1DvkJOiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746904873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZMCCIlgC0mtI04cGXHbEiXYAuHXW3V8EOVVtCCsr3K8=; b=nTHxas2YLSozu6zFEFv3CxrKVrDYcRGdLVACqar3X2yp+MLsdsOOe2i5vnaXHVSOeIY5RB Qwxv/k4v2HgvB9P77CWKxLDDtqYzesCRpDvYfw5sB9CV0+oQMUXNPlRU1j0aJFesN67YlN 1/RUcNXrnvcu76QocqfDHzYdzqLPjm/skGdwIfhYuvLylrWUNWeP/HqH7eW2MLMW3SFPRd jeJErqJdkXKv33IWARwO/I8o+cZY0lIZnCZ7f5Mn8nDrjbZG7GgqhLp8rZgVr2mJ4+8m7P quO84QZAFBSAGdQgLwezQbc5OOl3BU6p8n+WdCAw8bwIAS8ge6Sof012t1hICw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746904873; a=rsa-sha256; cv=none; b=eT3Dm/kuFNcsbxk3vENb6omFFj6yEPd3J6pCVSFSuR6ddCGecf2Lo78knqpEe1lcycvuVu GZAI002fqkaO41VlEASw64AxitCOAOaXv9OpIz3bNUf7f0scuOHjB+ALI7JxsY1smB368O 7z8+9fRWKjobC5dIdTqUlwVF0Y0O7t9AciyZRqGIx6UjXHTLh17khshoTulwLShjWFPvBC iK98QujmgvNP3QMdOmTwbcYDywbnNB+S0sixGYjlTMyANFdgGCSaIgCLHaXagmGZk9QFV+ S8kcMJP0sjy3BP9DNk5GktrXKNb6YGmpvOWx/SxL6lT8PkDXbO9LqQekCd7diA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZvwhT5DnWzyJq; Sat, 10 May 2025 19:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54AJLD6S028438; Sat, 10 May 2025 19:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54AJLDc5028435; Sat, 10 May 2025 19:21:13 GMT (envelope-from git) Date: Sat, 10 May 2025 19:21:13 GMT Message-Id: <202505101921.54AJLDc5028435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ravi Pokala Subject: git: 2a042fab4f91 - main - amdsmn(4), amdtemp(4): Add support for AMD Family 1Ah (Zen5) CPUs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a042fab4f91a525daa6255b69892fb434c62831 Auto-Submitted: auto-generated The branch main has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=2a042fab4f91a525daa6255b69892fb434c62831 commit 2a042fab4f91a525daa6255b69892fb434c62831 Author: Ravi Pokala AuthorDate: 2025-05-10 06:26:42 +0000 Commit: Ravi Pokala CommitDate: 2025-05-10 19:20:37 +0000 amdsmn(4), amdtemp(4): Add support for AMD Family 1Ah (Zen5) CPUs I found the '1AH_MxxH_ROOT' PCI device IDs in the Linux "AMD K8 Northbridge" driver [1][5]. Since Family 19h (Zen3, Zen4) uses the same registers as Family 17h (Zen1, Zen2), I tried using those same registers for Family 1Ah (Zen5) as well, and they worked. I pulled the 1Ah model ranges from Linux as well [2][3][4][6]. Added some additional logging under 'bootverbose', and used a local variable and macro for the stepping, rather than repeatedly using the mask directly. Consistently report the CPUID (family, model, stepping) using two, zero-padded, un-prefixed, uppercase nybbles, with an 'h' suffix. This is the format used in documentation and in Linux. My own testing with various models of Zen4 EPYC 9xx4 ("Genoa") shows that their CPUID models are in the range 0x10 .. 0x1f. Similar testing with various models of Zen5 EPYC 9xx5 ("Turin") shows that their CPUID models are in the range 0x00 ... 0x2f. [1] 2023-08-10: https://github.com/torvalds/linux/commit/c640166 [2] 2024-01-23: https://github.com/torvalds/linux/commit/3e4147f [3] 2024-01-25: https://github.com/torvalds/linux/commit/b9328fd [4] 2024-04-24: https://github.com/torvalds/linux/commit/2718a7f [5] 2024-07-28: https://github.com/torvalds/linux/commit/59c3400 [6] 2024-07-30: https://github.com/torvalds/linux/commit/bf5641e Sponsored by: Vdura MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D50278 --- sys/dev/amdsmn/amdsmn.c | 26 +++++++++++++++++++++++-- sys/dev/amdtemp/amdtemp.c | 49 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 59 insertions(+), 16 deletions(-) diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c index 1fc93a68fbf3..803491e9b0f5 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -25,7 +25,7 @@ */ /* - * Driver for the AMD Family 15h and 17h CPU System Management Network. + * Driver for the AMD Family 15h, 17h, 19h, 1Ah CPU System Management Network. */ #include @@ -62,6 +62,10 @@ #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT 0x14b5 #define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 /* Also F1AH M40H */ #define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8 +#define PCI_DEVICE_ID_AMD_1AH_M00H_ROOT 0x153a +#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507 +#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122 + struct pciid; struct amdsmn_softc { @@ -129,6 +133,24 @@ static const struct pciid { .amdsmn_addr_reg = F17H_SMN_ADDR_REG, .amdsmn_data_reg = F17H_SMN_DATA_REG, }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_1AH_M00H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_1AH_M20H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_1AH_M60H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, }; /* @@ -216,7 +238,7 @@ amdsmn_probe(device_t dev) default: return (ENXIO); } - device_set_descf(dev, "AMD Family %xh System Management Network", + device_set_descf(dev, "AMD Family %02Xh System Management Network", family); return (BUS_PROBE_GENERIC); diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c index b609c0944499..3ce826a2c0ec 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -117,6 +117,9 @@ struct amdtemp_softc { #define DEVICEID_AMD_HOSTB19H_M40H_ROOT 0x14b5 #define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 /* Also F1AH M40H */ #define DEVICEID_AMD_HOSTB19H_M70H_ROOT 0x14e8 +#define DEVICEID_AMD_HOSTB1AH_M00H_ROOT 0x153a +#define DEVICEID_AMD_HOSTB1AH_M20H_ROOT 0x1507 +#define DEVICEID_AMD_HOSTB1AH_M60H_ROOT 0x1122 static const struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -145,6 +148,9 @@ static const struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M40H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M60H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M70H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB1AH_M00H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB1AH_M20H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB1AH_M60H_ROOT, false }, }; /* @@ -166,7 +172,7 @@ static const struct amdtemp_product { #define AMDTEMP_15H_M60H_REPTMP_CTRL 0xd8200ca4 /* - * Reported Temperature, Family 17h + * Reported Temperature, Family 17h - 1Ah * * According to AMD OSRR for 17H, section 4.2.1, bits 31-21 of this register * provide the current temp. bit 19, when clear, means the temp is reported in @@ -294,21 +300,33 @@ amdtemp_identify(driver_t *driver, device_t parent) static int amdtemp_probe(device_t dev) { - uint32_t family, model; + uint32_t family, model, stepping; - if (resource_disabled("amdtemp", 0)) + if (resource_disabled("amdtemp", 0)) { + if (bootverbose) + device_printf(dev, "Resource disabled\n"); return (ENXIO); - if (!amdtemp_match(device_get_parent(dev), NULL)) + } + if (!amdtemp_match(device_get_parent(dev), NULL)) { + if (bootverbose) + device_printf(dev, "amdtemp_match() failed\n"); return (ENXIO); + } family = CPUID_TO_FAMILY(cpu_id); model = CPUID_TO_MODEL(cpu_id); + stepping = CPUID_TO_STEPPING(cpu_id); switch (family) { case 0x0f: - if ((model == 0x04 && (cpu_id & CPUID_STEPPING) == 0) || - (model == 0x05 && (cpu_id & CPUID_STEPPING) <= 1)) + if ((model == 0x04 && stepping == 0) || + (model == 0x05 && stepping <= 1)) { + if (bootverbose) + device_printf(dev, + "Unsupported (Family=%02Xh, Model=%02Xh, Stepping=%02Xh)\n", + family, model, stepping); return (ENXIO); + } break; case 0x10: case 0x11: @@ -323,7 +341,8 @@ amdtemp_probe(device_t dev) default: return (ENXIO); } - device_set_desc(dev, "AMD CPU On-Die Thermal Sensors"); + device_set_descf(dev, "AMD Family %02Xh CPU On-Die Thermal Sensors", + family); return (BUS_PROBE_GENERIC); } @@ -484,7 +503,7 @@ amdtemp_attach(device_t dev) needsmn = true; break; default: - device_printf(dev, "Bogus family 0x%x\n", family); + device_printf(dev, "Bogus family %02Xh\n", family); return (ENXIO); } @@ -493,7 +512,7 @@ amdtemp_attach(device_t dev) device_get_parent(dev), "amdsmn", -1); if (sc->sc_smn == NULL) { if (bootverbose) - device_printf(dev, "No SMN device found\n"); + device_printf(dev, "No amdsmn(4) device found\n"); return (ENXIO); } } @@ -509,7 +528,7 @@ amdtemp_attach(device_t dev) device_printf(dev, "Erratum 319: temperature measurement may be inaccurate\n"); if (bootverbose) - device_printf(dev, "Found %d cores and %d sensors.\n", + device_printf(dev, "Found %d cores and %d sensors\n", sc->sc_ncores, sc->sc_ntemps > 1 ? sc->sc_ntemps * sc->sc_ncores : 1); @@ -857,7 +876,7 @@ amdtemp_probe_ccd_sensors17h(device_t dev, uint32_t model) break; default: device_printf(dev, - "Unrecognized Family 17h Model: %02xh\n", model); + "Unrecognized Family 17h Model: %02Xh\n", model); return; } @@ -877,7 +896,7 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) maxreg = 8; _Static_assert((int)NUM_CCDS >= 8, ""); break; - case 0x10 ... 0x1f: + case 0x10 ... 0x1f: /* Zen4 EPYC "Genoa" */ sc->sc_temp_base = AMDTEMP_ZEN4_10H_CCD_TMP_BASE; maxreg = 12; _Static_assert((int)NUM_CCDS >= 12, ""); @@ -891,7 +910,7 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) break; default: device_printf(dev, - "Unrecognized Family 19h Model: %02xh\n", model); + "Unrecognized Family 19h Model: %02Xh\n", model); return; } @@ -905,14 +924,16 @@ amdtemp_probe_ccd_sensors1ah(device_t dev, uint32_t model) uint32_t maxreg; switch (model) { + case 0x00 ... 0x2f: /* Zen5 EPYC "Turin" */ case 0x40 ... 0x4f: /* Zen5 Ryzen "Granite Ridge" */ + case 0x60 ... 0x7f: /* ??? */ sc->sc_temp_base = AMDTEMP_ZEN4_CCD_TMP_BASE; maxreg = 8; _Static_assert((int)NUM_CCDS >= 8, ""); break; default: device_printf(dev, - "Unrecognized Family 1ah Model: %02xh\n", model); + "Unrecognized Family 1Ah Model: %02Xh\n", model); return; } From nobody Sun May 11 13:11: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 4ZwNQx0r3Rz5vscJ; Sun, 11 May 2025 13:11: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwNQx09dJz3RJj; Sun, 11 May 2025 13:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746969065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EJ+D8lcv7+TK+Unhxp7TU9a1xBdU9KUVY69A0ukS0P4=; b=Dvl4YuYSE+53LPScYDSNIM0bDJjwMi1uax7x4t4/aZm2hPjXECs50klR6gngvowp4fylMC bRBgp1+RhTOq8h3cnil6FH3BGJYBkf5SwhjVc6kNXusT1CFeU1VAmos04IaRXdvxikd/A4 lyU6Lx9V/Ws08IGOhyZCcDNWs5UfFATbOWnhkm5jtxvXpoZKJ4kxAfflbhDrPMHVnIBEEA 27fh4FdD3rTdwaPjEUfuEglS22xCxASmvrE0JQ0rgfQweLuX0Jv4bl/brNhKbWjWMQ/7qj rd6mimTU+O2/myCwaOCQt14dNUqDbmDl6gj9EJC3F84IRRvAZBrj9uS4DEzNvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746969065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EJ+D8lcv7+TK+Unhxp7TU9a1xBdU9KUVY69A0ukS0P4=; b=quO/UGL3IIIZ8Fz3ApcVevVO6RnceLJ+155sb3VXNP4jS8/CbddY9lExTXCPN1FgJkdW/y 9BdJrT+MmjQeL/3/Yh7YnKrkKuYk7Gj+7lGlMzZdtXM54T2ntnB9klgcTjARVFFhhvqKIF /RBN2viyX8VIn1pTqSjfe5NjPu+tbk+SzkZ7xkyXwleV9WOUYqWxBXubtDAmac1fmtE618 DF0V3lRIj/CN1QKjjeq5uMWEsuYdJ5kQfQytW9Mvxpe69dIwjMXC5epUC+nBHpCC7rmX0Q syDIJ61pb6P0tXG3ZsnPW5zdgSIXR9fzZUyHVCfB2A2DrPid4sHHlvcnF89MEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746969065; a=rsa-sha256; cv=none; b=TaPnSzj1WVgvvRWkARiOjSO+OK99kr2V0K1ozDg3ALXTZ2oPAqTHxyhtkOtWvbBSBmyzcg ge3CXSeLOBxKLBXEpz/AwVFiN5pudQJYqdytg+nqsuBht4sBjDcbVICm6fMDXG9+S/V9R3 DPY0qUAvhav93TR66gx+yhB7IUtgvJYTzwIbQ0EW6OAl/y+n4Ulq49viWcUtbAMzf6lz/I EL96xDIXvj82mWzBlZZJMaY8vja6KXSDzzUBJ75/ZMUSVwfNuZbvWwqo8KXtCcVKmzzO6V FCIclYvka9rxXtcLmIFauZAgLC7ZiBAZ+RAoId/t7L8DcIwAGvGMOotX2HoTGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZwNQw6sMDzYmk; Sun, 11 May 2025 13:11:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BDB4m6027804; Sun, 11 May 2025 13:11:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BDB4Jh027801; Sun, 11 May 2025 13:11:04 GMT (envelope-from git) Date: Sun, 11 May 2025 13:11:04 GMT Message-Id: <202505111311.54BDB4Jh027801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3a58c266e2e6 - main - random(9): bump removal to FreeBSD 16.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a58c266e2e6201a3aebbb52311f38ccf3323e3b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3a58c266e2e6201a3aebbb52311f38ccf3323e3b commit 3a58c266e2e6201a3aebbb52311f38ccf3323e3b Author: Ed Maste AuthorDate: 2025-05-11 13:08:16 +0000 Commit: Ed Maste CommitDate: 2025-05-11 13:10:54 +0000 random(9): bump removal to FreeBSD 16.0 It has not yet been removed, and still has some in-tree consumers. PR: 277655 Sponsored by: The FreeBSD Foundation --- share/man/man9/random.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man9/random.9 b/share/man/man9/random.9 index 7fc721564897..f1833c63a2ff 100644 --- a/share/man/man9/random.9 +++ b/share/man/man9/random.9 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" " -.Dd March 18, 2024 +.Dd May 11, 2025 .Dt RANDOM 9 .Os .Sh NAME @@ -133,7 +133,7 @@ The deprecated .Fn random function will return a 31-bit value. It is obsolete and scheduled to be removed in -.Fx 15.0 . +.Fx 16.0 . Consider .Xr prng 9 instead and see From nobody Sun May 11 13:47: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 4ZwPFF3QW4z5vvm0; Sun, 11 May 2025 13:47: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwPFF2qKPz3s1P; Sun, 11 May 2025 13:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746971265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvVhBAhJxI446gMaiBqm+Rkqam/vj52lsSQCUNojwHo=; b=GHBL+5yjOXx/phYDB3LBqu9TRuECwYWaO1/rSEoEZlXlAxi9BZjHGBLElyG2HrC2MVa2N0 4pHxAmXJZtieXTpYCc7HGUClsyg0ZuunnHClr4HUl0aTFpm9pb7S9O4nJmlIWsP25fENbr 81denK6nVr1Z1sDMprhtsKcs+3/3IQwDPQhIHNxVbOT1e8MnUtVfurpxBbwrHWchUJw03q uilort2BEapehLt9t+nQEad4C49F2S39BkMrPlErNZOsIUHapKkW6NrrQS7rJyGmHcRiKo Jx3dMHrOOMjOR8mPImw1X3jTBkoZjG/8KCvcP00mmNwn1hnjtURA1ZRRLtWmsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746971265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qvVhBAhJxI446gMaiBqm+Rkqam/vj52lsSQCUNojwHo=; b=w2g1ZoS72qzbzn0CGWMquv1eNo9JGSfTwdl6gkKNiqZ3QrjiqTgp11FzG7WhRIljKs8NjS GO9xchNyuL5J+rs5EtigpKCmw8pQu/rXRFBGDR2hvP5suzXpqSdG5eePhZ+udnWPyn2VzV Q142R49mLwAYoJIyinGQ6LrZ0tG2ozE1Y3KZ2ShYJwnkFZeM+vupNKJtZ5hUt3E8chgsdP EEZoBmNzxj1drcMLkGFYfNBRuZyoR8P+InoHgsSrrAbK84mInT2/bwPxSaUEWWzBqR94Gm gbhPSlxsUFYH2vLO3A1Ow9yKE3dWJZAd0Ee98D9hWsTnHNOXYnnl69pTN0E7Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746971265; a=rsa-sha256; cv=none; b=yR+bZTaqab4tTX7MMOjActAVnEqJ+oLg4rILh5DNGr6Cs/KRF+drhznoIBCxHgdc1ske2E L3nzaBdsBvNNH/7oE+JHD9NxCzDPagoJTp+RtNm5ZigGi9bkEGD/UBFHuSISXfUUSEvKjl b7G0FS7zk9zEQCRHqyyIgc4/yupEySDuKj9JDk5T+hS9eY98gkyMXL9Un1RZexeISbruSt 3i2pxFYOYkiZv2k9hlg7HbRwzudI/ci5D3ywf9avmglfmiitdjV2AlLqaIdwdsoU2k24Gy JgBvFJl2hlUSpI5MVNu4qbDElk9rf0f+M4hgdZrFHK5AjDBJvyNDu9YW+9KZYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZwPFF2HnLzZRL; Sun, 11 May 2025 13:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BDlj7P090990; Sun, 11 May 2025 13:47:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BDljYx090987; Sun, 11 May 2025 13:47:45 GMT (envelope-from git) Date: Sun, 11 May 2025 13:47:45 GMT Message-Id: <202505111347.54BDljYx090987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5437b0ff6d55 - main - flua: clean up lposix argument checking List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 5437b0ff6d557daf6c35e1307a5737139bc12f9a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5437b0ff6d557daf6c35e1307a5737139bc12f9a commit 5437b0ff6d557daf6c35e1307a5737139bc12f9a Author: Isaac Freund AuthorDate: 2025-05-09 14:29:37 +0000 Commit: Ed Maste CommitDate: 2025-05-11 13:46:20 +0000 flua: clean up lposix argument checking The key insight here is that the luaL_check*() and luaL_opt*() functions will happily take indexes that are larger than the stack top and print a useful error message. This means that there is no need to check if too few arguments have been received prior to checking the types of individual arguments. This patch also replaces a couple reimplementations of luaL_opt*() functions with the luaL helpers. References: https://www.lua.org/manual/5.4/manual.html#4.1.2 Reviewed by: emaste, kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50273 --- libexec/flua/modules/lposix.c | 111 ++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 68 deletions(-) diff --git a/libexec/flua/modules/lposix.c b/libexec/flua/modules/lposix.c index 0f3ea7722d4d..d69f1aa546c1 100644 --- a/libexec/flua/modules/lposix.c +++ b/libexec/flua/modules/lposix.c @@ -21,18 +21,26 @@ #include "lauxlib.h" #include "lposix.h" +static void +enforce_max_args(lua_State *L, int max) +{ + int narg; + + narg = lua_gettop(L); + luaL_argcheck(L, narg <= max, max + 1, "too many arguments"); +} + /* * Minimal implementation of luaposix needed for internal FreeBSD bits. */ static int lua__exit(lua_State *L) { - int code, narg; - - narg = lua_gettop(L); - luaL_argcheck(L, narg == 1, 1, "_exit takes exactly one argument"); + int code; + enforce_max_args(L, 1); code = luaL_checkinteger(L, 1); + _exit(code); } @@ -40,10 +48,8 @@ static int lua_basename(lua_State *L) { char *inpath, *outpath; - int narg; - narg = lua_gettop(L); - luaL_argcheck(L, narg > 0, 1, "at least one argument required"); + enforce_max_args(L, 1); inpath = strdup(luaL_checkstring(L, 1)); if (inpath == NULL) { lua_pushnil(L); @@ -61,15 +67,13 @@ lua_basename(lua_State *L) static int lua_chmod(lua_State *L) { - int n; const char *path; mode_t mode; - n = lua_gettop(L); - luaL_argcheck(L, n == 2, n > 2 ? 3 : n, - "chmod takes exactly two arguments"); + enforce_max_args(L, 2); path = luaL_checkstring(L, 1); mode = (mode_t)luaL_checkinteger(L, 2); + if (chmod(path, mode) == -1) { lua_pushnil(L); lua_pushstring(L, strerror(errno)); @@ -83,14 +87,12 @@ lua_chmod(lua_State *L) static int lua_chown(lua_State *L) { - int n; const char *path; uid_t owner = (uid_t) -1; gid_t group = (gid_t) -1; - n = lua_gettop(L); - luaL_argcheck(L, n > 1, n, - "chown takes at least two arguments"); + enforce_max_args(L, 3); + path = luaL_checkstring(L, 1); if (lua_isinteger(L, 2)) owner = (uid_t) lua_tointeger(L, 2); @@ -139,11 +141,9 @@ lua_chown(lua_State *L) static int lua_pclose(lua_State *L) { - int error, fd, n; + int error, fd; - n = lua_gettop(L); - luaL_argcheck(L, n == 1, 1, - "close takes exactly one argument (fd)"); + enforce_max_args(L, 1); fd = luaL_checkinteger(L, 1); if (fd < 0) { @@ -169,14 +169,13 @@ static int lua_fnmatch(lua_State *L) { const char *pattern, *string; - int flags, n; - - n = lua_gettop(L); - luaL_argcheck(L, n == 2 || n == 3, 4, "need 2 or 3 arguments"); + int flags; + enforce_max_args(L, 3); pattern = luaL_checkstring(L, 1); string = luaL_checkstring(L, 2); flags = luaL_optinteger(L, 3, 0); + lua_pushinteger(L, fnmatch(pattern, string, flags)); return (1); @@ -186,10 +185,9 @@ static int lua_uname(lua_State *L) { struct utsname name; - int error, n; + int error; - n = lua_gettop(L); - luaL_argcheck(L, n == 0, 1, "too many arguments"); + enforce_max_args(L, 0); error = uname(&name); if (error != 0) { @@ -219,11 +217,9 @@ static int lua_dirname(lua_State *L) { char *inpath, *outpath; - int narg; - narg = lua_gettop(L); - luaL_argcheck(L, narg > 0, 1, - "dirname takes at least one argument (path)"); + enforce_max_args(L, 1); + inpath = strdup(luaL_checkstring(L, 1)); if (inpath == NULL) { lua_pushnil(L); @@ -242,10 +238,8 @@ static int lua_fork(lua_State *L) { pid_t pid; - int narg; - narg = lua_gettop(L); - luaL_argcheck(L, narg == 0, 1, "too many arguments"); + enforce_max_args(L, 0); pid = fork(); if (pid < 0) { @@ -262,10 +256,8 @@ lua_fork(lua_State *L) static int lua_getpid(lua_State *L) { - int narg; + enforce_max_args(L, 0); - narg = lua_gettop(L); - luaL_argcheck(L, narg == 0, 1, "too many arguments"); lua_pushinteger(L, getpid()); return (1); } @@ -273,10 +265,9 @@ lua_getpid(lua_State *L) static int lua_pipe(lua_State *L) { - int error, fd[2], narg; + int error, fd[2]; - narg = lua_gettop(L); - luaL_argcheck(L, narg == 0, 1, "too many arguments"); + enforce_max_args(L, 0); error = pipe(fd); if (error != 0) { @@ -297,12 +288,9 @@ lua_read(lua_State *L) char *buf; ssize_t ret; size_t sz; - int error, fd, narg; - - narg = lua_gettop(L); - luaL_argcheck(L, narg == 2, 1, - "read takes exactly two arguments (fd, size)"); + int error, fd; + enforce_max_args(L, 2); fd = luaL_checkinteger(L, 1); sz = luaL_checkinteger(L, 2); @@ -343,10 +331,8 @@ lua_realpath(lua_State *L) { const char *inpath; char *outpath; - int narg; - narg = lua_gettop(L); - luaL_argcheck(L, narg > 0, 1, "at least one argument required"); + enforce_max_args(L, 1); inpath = luaL_checkstring(L, 1); outpath = realpath(inpath, NULL); @@ -367,17 +353,12 @@ lua_wait(lua_State *L) { pid_t pid; int options, status; - int narg; - narg = lua_gettop(L); - - pid = -1; - status = options = 0; - if (narg >= 1 && !lua_isnil(L, 1)) - pid = luaL_checkinteger(L, 1); - if (narg >= 2 && !lua_isnil(L, 2)) - options = luaL_checkinteger(L, 2); + enforce_max_args(L, 2); + pid = luaL_optinteger(L, 1, -1); + options = luaL_optinteger(L, 2, 0); + status = 0; pid = waitpid(pid, &status, options); if (pid < 0) { lua_pushnil(L); @@ -419,13 +400,9 @@ lua_write(lua_State *L) size_t bufsz, sz; ssize_t ret; off_t offset; - int error, fd, narg; + int error, fd; - narg = lua_gettop(L); - luaL_argcheck(L, narg >= 2, 1, - "write takes at least two arguments (fd, buf, sz, off)"); - luaL_argcheck(L, narg <= 4, 5, - "write takes no more than four arguments (fd, buf, sz, off)"); + enforce_max_args(L, 4); fd = luaL_checkinteger(L, 1); if (fd < 0) { @@ -435,13 +412,11 @@ lua_write(lua_State *L) buf = luaL_checkstring(L, 2); - bufsz = sz = lua_rawlen(L, 2); - if (narg >= 3 && !lua_isnil(L, 3)) - sz = luaL_checkinteger(L, 3); + bufsz = lua_rawlen(L, 2); + sz = luaL_optinteger(L, 3, bufsz); + + offset = luaL_optinteger(L, 4, 0); - offset = 0; - if (narg >= 4 && !lua_isnil(L, 4)) - offset = luaL_checkinteger(L, 4); if ((size_t)offset > bufsz || offset + sz > bufsz) { lua_pushnil(L); From nobody Sun May 11 14:52: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 4ZwQgm3QPBz5w0NW; Sun, 11 May 2025 14:52: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwQgm02hRz3Tdk; Sun, 11 May 2025 14:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746975140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grnuzVpsrEhf8LPSVFpEIuIizPpz4Cb8QeMaPaa/5ms=; b=AO7x6rOZ4LIvy/CjKLkU3585ZpwktIGkHOMyITX1ho9/7bqRNhhY9jXmF2yfp0toJ5gyMS +ifM8lzqyNy4lR+A8Vm1e58AyRA2zpD/lnKTPQyGidf/m8I9xS7/WOQLILj8eVL/52z9oF omdf8ACu4ovMyt+KGQxxEbnFjlwhIQ615VFBcclLqztVRXFAnp0DCeptSL1PLIzf0hVLZp 2qsBRJ+TMXavmapnJ5hUPk12j/R3nlgVLpfx05/gfw+VhkX5CmEmMRQiASw5uQQXiiZP+v pI7ZNQwGofkyN3lUNyD6QDU8OzACC5cAktOVB3Bqy3Riksa5iLzVLOdfShlxmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746975140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grnuzVpsrEhf8LPSVFpEIuIizPpz4Cb8QeMaPaa/5ms=; b=orwQSXr33rVDEZT4UM4xdO/gHM//WX4Ueqf4N42vMXkgpgrN9GpwlTyRGvpfLqM5MGEd5L WVMGZ7og+M4W3exfOfAWkiTINZxVr9aC5UbX9Ld7HTyvxU02ZzMMuiiukDC+obd+bOzh0u FdeTHwj1AMifvFxwUBncQwrsDh9CT5tevEE3Et1eW4Og+7hE/OfYUX49xjvYcEFQrnxNrr uuCAlGNh3hO3HcOaLxiyvju1sxXrxGuEgeyj72+no7zVlFiIUPqOprvOaishdntPfuKdUk 74vENfR/hnxW5ioIaB2AXY535uzkjP05Q5SnLDwUd8+FWZc0uYW7l1W1P1br2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746975140; a=rsa-sha256; cv=none; b=Y4mGj7IVFf/oRtIbpSGNQiwYfIlzakxrQisvrjEZF9dJbmRZk6u3MuOiKE1V93fVtiRC+/ ACCf7DoeCgw8dH4pU5s672Je+k+ebri1NJ8xDRm14Zwhq5C2vviy5fBTd9JF80Abh2+1tB /WI6eMrnQtx+FYb5sHYkEfpZRej13Njn6eoUXKIHqu5CVA1AR9Ez+Z/7+vTt5j47zotI9Z S2pm1GrDafqcLG4dWqC1SmQ8uU2CEL7Suq+t6SHZtXbehtwPZe2jcBiI6NbBZYA4I10PaC +Ohv5v//OuA3d9kTxAQUZy91TiTnUA0nN0ajpHfD/kGajS2OVvNPzQy+y9T1aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZwQgl5JX4zcZr; Sun, 11 May 2025 14:52:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BEqJOF019791; Sun, 11 May 2025 14:52:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BEqJ73019788; Sun, 11 May 2025 14:52:19 GMT (envelope-from git) Date: Sun, 11 May 2025 14:52:19 GMT Message-Id: <202505111452.54BEqJ73019788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b0dd1a604810 - main - vm_page: Don't create a cache zone for the lazyinit freepool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: b0dd1a604810c1d96f625d7d1d3c8722a4d19db6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b0dd1a604810c1d96f625d7d1d3c8722a4d19db6 commit b0dd1a604810c1d96f625d7d1d3c8722a4d19db6 Author: Mark Johnston AuthorDate: 2025-05-09 19:15:27 +0000 Commit: Mark Johnston CommitDate: 2025-05-11 14:51:44 +0000 vm_page: Don't create a cache zone for the lazyinit freepool By design, it'll never be used, so there's no sense in allocating memory for it. Reviewed by: kib, dougm Fixes: b16b4c22d2d1 ("vm_page: Implement lazy page initialization") Differential Revision: https://reviews.freebsd.org/D50275 --- sys/vm/vm_page.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 8e32da5ea610..681846f8c71a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -215,6 +215,10 @@ vm_page_init_cache_zones(void *dummy __unused) for (domain = 0; domain < vm_ndomains; domain++) { vmd = VM_DOMAIN(domain); for (pool = 0; pool < VM_NFREEPOOL; pool++) { +#ifdef VM_FREEPOOL_LAZYINIT + if (pool == VM_FREEPOOL_LAZYINIT) + continue; +#endif pgcache = &vmd->vmd_pgcache[pool]; pgcache->domain = domain; pgcache->pool = pool; From nobody Sun May 11 18:59: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 4ZwX9M3kWhz5wGcm; Sun, 11 May 2025 18:59: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwX9M3Bthz3j46; Sun, 11 May 2025 18:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746989991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LDOktreSKL450x//wfEKkzRm6Rj2qRIs/uvqFzSgjUY=; b=rTj00efCtnjBFQCitLBCxe9SXnzyTYCr5ENxhj0BaATUsHOkqjKy24ObA9RQIAazXu9F22 exuxplsSVBPGjG3J8oZB/RYX+Zpzph6PWi1LlYJgPaZmREabnjngDpj8W48nKES0tQ8GTj P7qTNFJR0KBci4E5l6bnTTq1j05fNzyHe71NupxybZHMxSP0z4r/BksvCSS0jnbVNYEudh e8dpQ/QDqmT28KAgQKKu3s2k4p8FO8G/qPmcUPC401QqKUvdjO4kEk4qRpi1CQra453u6r goYt8MzHkb0i7QjPAXHB6FwCyJz6ya6SLGIZSeT3CAIxllzefxwQAiItOcnorQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746989991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LDOktreSKL450x//wfEKkzRm6Rj2qRIs/uvqFzSgjUY=; b=LTZGjz3ck8QbGrPUbmlHIdXIlbCvPkJ1TKDeKYXP8soA21wqZsJ/yjgHDkV1puVL8vnnk8 DhT16ftQXOVr2JfuSkL4ySzBbYH6qlBbNxTtKG0S0ikQbRJkgCPu/1hL04YjAEw6N0eekc ty89NBueGNE3dGbLvCuPWDVZ51bz7rig2+AU/6SNRrM0pviKv1d6KQyXrZlDwoy37Wm0o1 jym4k+VJRTVmpzxmiFP9QTzj3kHOghC+yoXev9+laOgPl86bU2LiCyPSxng2cNIdU2VeH2 6V+BxvfIATswRyuqcOgeakyNb6T0gDyejk6p4ix+T8tSjOvdu0+gK1l2ceQSvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746989991; a=rsa-sha256; cv=none; b=ijFJJYMxXvFngsqIxs0tKyxhdViwaP532LcSBZCFtwaB4O0yc9ANeHORrgqEL8e/jg94Jj rLdiPxaKtzVKBNH1x53IOTqiqB5RXJjaxibGl6ppwXIEHsZeqHkSjdcpMoC47I2pAnqgyE /3o5uYF0dgkpcWwTvhlsN2Lw1u/6qix9FGMikSt5yg07TjxAVp5j8phGYZTr4hoxH3hT4h VOqeR6FDYKalzc4XxXN/Bdy/c2NWKGH6Tj3Olq0TBdtIOQTJkuPGFQUuE57JCIYNq1Q5ez +SxEoub6JkIbyZLW4lBsQ08bI+Wxup4pX90zw82IUROxp/MISmJ/u+0T8io26w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZwX9M2Ml6zkTj; Sun, 11 May 2025 18:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BIxpkG073018; Sun, 11 May 2025 18:59:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BIxpLP073015; Sun, 11 May 2025 18:59:51 GMT (envelope-from git) Date: Sun, 11 May 2025 18:59:51 GMT Message-Id: <202505111859.54BIxpLP073015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 62f55b34ec42 - main - sched: mark several kern.sched.* sysctls as CTLFLAG_RWTUN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62f55b34ec42750adb1833414de07e88e5148899 Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=62f55b34ec42750adb1833414de07e88e5148899 commit 62f55b34ec42750adb1833414de07e88e5148899 Author: Ka Ho Ng AuthorDate: 2025-05-11 18:59:10 +0000 Commit: Ka Ho Ng CommitDate: 2025-05-11 18:59:30 +0000 sched: mark several kern.sched.* sysctls as CTLFLAG_RWTUN The following sysctls which are not touched during boot time initialization are marked as CTLFLAG_RWTUN so they can be set by loader tunables as well: - kern.sched.interact - kern.sched.preempt_thresh - kern.sched.static_boost - kern.sched.idlespins - kern.sched.balance - kern.sched.steal_idle - kern.sched.steal_thresh - kern.sched.trysteal_limit - kern.sched.always_steal MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50279 --- sys/kern/sched_ule.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 39cb648c2216..b29a37aa1026 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -3309,14 +3309,14 @@ SYSCTL_PROC(_kern_sched, OID_AUTO, quantum, "Quantum for timeshare threads in microseconds"); SYSCTL_INT(_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, "Quantum for timeshare threads in stathz ticks"); -SYSCTL_UINT(_kern_sched, OID_AUTO, interact, CTLFLAG_RW, &sched_interact, 0, +SYSCTL_UINT(_kern_sched, OID_AUTO, interact, CTLFLAG_RWTUN, &sched_interact, 0, "Interactivity score threshold"); -SYSCTL_INT(_kern_sched, OID_AUTO, preempt_thresh, CTLFLAG_RW, +SYSCTL_INT(_kern_sched, OID_AUTO, preempt_thresh, CTLFLAG_RWTUN, &preempt_thresh, 0, "Maximal (lowest) priority for preemption"); -SYSCTL_INT(_kern_sched, OID_AUTO, static_boost, CTLFLAG_RW, &static_boost, 0, +SYSCTL_INT(_kern_sched, OID_AUTO, static_boost, CTLFLAG_RWTUN, &static_boost, 0, "Assign static kernel priorities to sleeping threads"); -SYSCTL_INT(_kern_sched, OID_AUTO, idlespins, CTLFLAG_RW, &sched_idlespins, 0, +SYSCTL_INT(_kern_sched, OID_AUTO, idlespins, CTLFLAG_RWTUN, &sched_idlespins, 0, "Number of times idle thread will spin waiting for new work"); SYSCTL_INT(_kern_sched, OID_AUTO, idlespinthresh, CTLFLAG_RW, &sched_idlespinthresh, 0, @@ -3324,18 +3324,19 @@ SYSCTL_INT(_kern_sched, OID_AUTO, idlespinthresh, CTLFLAG_RW, #ifdef SMP SYSCTL_INT(_kern_sched, OID_AUTO, affinity, CTLFLAG_RW, &affinity, 0, "Number of hz ticks to keep thread affinity for"); -SYSCTL_INT(_kern_sched, OID_AUTO, balance, CTLFLAG_RW, &rebalance, 0, +SYSCTL_INT(_kern_sched, OID_AUTO, balance, CTLFLAG_RWTUN, &rebalance, 0, "Enables the long-term load balancer"); SYSCTL_INT(_kern_sched, OID_AUTO, balance_interval, CTLFLAG_RW, &balance_interval, 0, "Average period in stathz ticks to run the long-term balancer"); -SYSCTL_INT(_kern_sched, OID_AUTO, steal_idle, CTLFLAG_RW, &steal_idle, 0, +SYSCTL_INT(_kern_sched, OID_AUTO, steal_idle, CTLFLAG_RWTUN, &steal_idle, 0, "Attempts to steal work from other cores before idling"); -SYSCTL_INT(_kern_sched, OID_AUTO, steal_thresh, CTLFLAG_RW, &steal_thresh, 0, +SYSCTL_INT(_kern_sched, OID_AUTO, steal_thresh, CTLFLAG_RWTUN, &steal_thresh, 0, "Minimum load on remote CPU before we'll steal"); -SYSCTL_INT(_kern_sched, OID_AUTO, trysteal_limit, CTLFLAG_RW, &trysteal_limit, - 0, "Topological distance limit for stealing threads in sched_switch()"); -SYSCTL_INT(_kern_sched, OID_AUTO, always_steal, CTLFLAG_RW, &always_steal, 0, +SYSCTL_INT(_kern_sched, OID_AUTO, trysteal_limit, CTLFLAG_RWTUN, + &trysteal_limit, 0, + "Topological distance limit for stealing threads in sched_switch()"); +SYSCTL_INT(_kern_sched, OID_AUTO, always_steal, CTLFLAG_RWTUN, &always_steal, 0, "Always run the stealer from the idle thread"); SYSCTL_PROC(_kern_sched, OID_AUTO, topology_spec, CTLTYPE_STRING | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", From nobody Sun May 11 21:05: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 4ZwZyT33QTz5wPjm; Sun, 11 May 2025 21:05: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwZyT1DFCz3nZT; Sun, 11 May 2025 21:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746997537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QU1xB9jbGIGzY1ZUtmGEx52L9pp/5hOkhEQ++N3YxE=; b=jDvrCR5ZtQDqnYrz7EcYxor3ILYkG704Vr7Oit1lxgwddHgUo1f+6DG2/ulOhDEkpmJT0G w8moXutb73nsFati0MLZ/Y9x4mXEAxJHlzvR2a2q9HZgKNtnfdUzlRsfkloh+g8JyJdM7O rtsA4xARjgSKOpBfXibFR5KPf8acxVo/rofeAJ3INqw7i/UgCQ+p6fAiVD4WdmUZ9Wdjvo z2hYX4m1dgzXpHDHrfDWpD5WFDLaJ67wYLyLe7n2xaBUb2NOx/DQPLUQFTpRk6xyAiwQOo DwSA4ZTw+v+Bu5OnOkCnv6UGc1NpCIS6SFZBpv5oHfGIiEezkKWYQNSD5OdViA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746997537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QU1xB9jbGIGzY1ZUtmGEx52L9pp/5hOkhEQ++N3YxE=; b=XfjnH7YyCgWUYzmoZAnoPE7PKwzCUIHFZfJmZmToqXrfokyRRL8aCZj4QAm68CQYTj6T09 c4xIPC1WGX1wRd6X2t/XUabn6Zsi8a+QTOiJXC+jkoapKNMsd/ZKJ9D6LrP+rjC8wbuYSO ebKHolJYEfRbZ4CoRPE9O5D7iGhu2BjDsviZizf5uOl5qKg+HJYwznSbnM/WlcW8+bkX0E zxeFp8XSOZFocxgJ4ztcHMoZUFM35hakB+1FLhzQMwxQk0mv7EN9GlKFPFmjptfP5h4hAM Abc0X1F/Am2hW91nvipCm6kKZMvmOFgF3PoA/eCL/BOVvRYbK7dTqzh0wjnCSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746997537; a=rsa-sha256; cv=none; b=hyTep+W6xGV1WYad1ws3e6mxdTcb/0gWbLgq1hCO49Nr6RCKrQHzCLnzuW7eQIZN4PPlVh 9xMsAJWxaVe5jcDdJuvO3YQeLFoHyxISDqNG5RN78dL+hN8RfOL6aouloE09i0hb9ww8CJ hAnAY6Ov9gZd4hwYqL6pQI65aIePByFazYnTo2U9xpb4W4GUyPZfPsxpDJv5WOs7leXnkq FaWwS1j+hjLSNitEKjd+DtMl+6FfJWlcLDDB5qxNLTeKkfhFnz1RWRzp+RMmDiKxCwcwp2 yzl9KOzcxQskLjKUjF6L3B7wgTlwsa1Swo8PHZID5/nAZCMKUD1aAHFXAs3P5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZwZyT04hxzp4T; Sun, 11 May 2025 21:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BL5afO015475; Sun, 11 May 2025 21:05:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BL5aP8015472; Sun, 11 May 2025 21:05:36 GMT (envelope-from git) Date: Sun, 11 May 2025 21:05:36 GMT Message-Id: <202505112105.54BL5aP8015472@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 5870d6a1ef4e - main - bsdinstall: Use a login shell for final configuration. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: 5870d6a1ef4ec5d6fc91d0f1635bca59e09a040d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5870d6a1ef4ec5d6fc91d0f1635bca59e09a040d commit 5870d6a1ef4ec5d6fc91d0f1635bca59e09a040d Author: Dag-Erling Smørgrav AuthorDate: 2025-05-11 21:00:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-11 21:04:55 +0000 bsdinstall: Use a login shell for final configuration. If the user accepts our offer of a shell to perform final configuration tasks before rebooting, start a login shell. This ensures it will have the correct PATH and be able to install packages without issues. PR: 286722 MFC after: 3 days Reviewed by: jrtc27, allanjude, emaste Differential Revision: https://reviews.freebsd.org/D50297 --- usr.sbin/bsdinstall/scripts/auto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 339c9da433b2..75bff522a63f 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -409,7 +409,7 @@ if [ -z "$BSDINSTALL_SKIP_MANUAL" ]; then clear echo This shell is operating in a chroot in the new system. \ When finished making configuration changes, type \"exit\". - chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 + chroot "$BSDINSTALL_CHROOT" /bin/sh -l 2>&1 fi fi From nobody Sun May 11 22:19: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 4Zwcc44DJ0z5wV5l; Sun, 11 May 2025 22:19:48 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zwcc41WhRz3n0H; Sun, 11 May 2025 22:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747001988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nfXmZzU0M25lbCeeHQz5OYNidH0praUAwwenGQ9Lsx0=; b=Irr5neuLf7bQA90VUPqznG3QC1Fo1pt66JpKZGO9NjPDY4rp0fNSyYLyPQ1IW+PUg80qkN 2NCzvoG1UMOFVx28DsXskQ+ZUp73fzRbl1Eo3C9S/so7tZ7KcwQMyL+tUwP8OBwhyvwoW/ EcEh7zYvN3u8QAfvh1fLSD+4XiPnOYsNVbepZipTHcEcL+LeFGyOCcFGaatWTw5b3Sx8hj biSFRzuXZyH6mRo2gEsGVrzRwWDyCP4ac2joGuQcMec81uWBhtXLiwCYtrrjrufD+IVsNw VpqqsOPqKyVp13+hmYRW8KK3rqpItZjbpFVx6QpEuCQ5eB6Ezs63u+JF7cfPAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747001988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nfXmZzU0M25lbCeeHQz5OYNidH0praUAwwenGQ9Lsx0=; b=BiMcQlxQf4rSPhMylLaLjGoJHCLm4ZuAjAT7WY8okMOIsGSJ0CsA8xHREbpnLVZgrfOLMv 53Qd8trBko9qfXV1z9PG9WYWK2BpSuLyVWN/wzx9tQ8xZYnywYPBOrcFLoMHVb0Ypn66vn 9Xn16opYtdFefpRVGNtgalWBQnZzGGX0fA3dA1H+cQ1vAYemiYpHQIemHTutfARzaVpJjv oO5WYU+iG8VYmtEFrXC2sZ0kZOjiAEOPLw1DLNz+g1lcPXjmJfv10GW0T7aSBHgy4pAl9W NQF83ZkUnHbZHdrAqWQ2eyO5rwEefz2RM2+3RZ2bSSLe6cAJW4sv+ePFLCHnJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747001988; a=rsa-sha256; cv=none; b=qN4X2CpzDbLv/UCFiHvIlkTl6yisKG0HY20cKeBLUTnh3dWYz7Oi96amhOERQGvddXjfz+ REViEe7jzmJB6vuxUQsoZlaTLTqMSGltCuvB7qQ9zbYY4e7mW8HnbOlQoLYD6YXi8obCP2 k10VAL90rSYY3IA5CGW9qSvUKS6kJgu+TMn6gQOfYpWBXSSo9wuhhmwOOIySil6XmOjTe4 LlOFe5mAFLrHJaFD+d5t0zxxFiD4hTc9kDNV6h/J1JXOTZJai0FCMxPmxF5qDHIZqIVhHE 2DPWWYrExQBksJ+7G0T3TDDXCi14lkeNlxHTN/cDIjGm+PpNFTuue8KYhH4JAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zwcc412WLzqp9; Sun, 11 May 2025 22:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BMJmpt046930; Sun, 11 May 2025 22:19:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BMJmqN046927; Sun, 11 May 2025 22:19:48 GMT (envelope-from git) Date: Sun, 11 May 2025 22:19:48 GMT Message-Id: <202505112219.54BMJmqN046927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 94e44a074e52 - main - release: Don't put drm-kmod package onto DVD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94e44a074e5212cc3459e360a9de55500f7c41d0 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=94e44a074e5212cc3459e360a9de55500f7c41d0 commit 94e44a074e5212cc3459e360a9de55500f7c41d0 Author: Colin Percival AuthorDate: 2025-05-11 22:10:48 +0000 Commit: Colin Percival CommitDate: 2025-05-11 22:19:33 +0000 release: Don't put drm-kmod package onto DVD The X.Y-RELEASE DVDs use a quarterly package set which was built on X.(Y-1)-RELEASE, and those kernel modules are never going to be useful. MFC after: 30 seconds Sponsored by: Amazon --- release/scripts/pkg-stage.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index ba6edf2eee07..f9216b52b088 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -15,9 +15,6 @@ export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES=" devel/git@lite -graphics/drm-kmod -graphics/drm-510-kmod -graphics/drm-515-kmod misc/freebsd-doc-all net/mpd5 net/rsync From nobody Sun May 11 22:19: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 4Zwcc55fhvz5wV3P; Sun, 11 May 2025 22:19: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zwcc52Dgjz3msH; Sun, 11 May 2025 22:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747001989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NAxL1oGDpsIze0sjJwingSCjPSvLQwzDZ3dW6Oq19nQ=; b=NZP2jluPt64xB/gjks2DPQYo6bHlG46OduNTzppRemFKVXRGxSkoGE3DrSLMBUT+oz4xOY tqnbLn69DlgOZZiFIJoF6ZpR8sUTqSMzWGe9xAj1o2evWLmcZibtR8blXhsV2/LWFah3qo GVK3T4QqVu2vxC/xASLGuIxEehmEwFMcnnM8+IZ7Xd26BS/lYxmBhvI70Hy7AUJ1uWvoSv qgMBVCC0p/gRIwrkA9zdPh5HAq1CxwRF7g3VTMd9ryqCW0D+Wv4HF/4a+JvRdW1OG7SP2C KjNFCxRNp+d+TcyJ0B5UddLMhwGs7BSd1hLtnUn+Nm3/w10Lc6uL+G+MI/DtXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747001989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NAxL1oGDpsIze0sjJwingSCjPSvLQwzDZ3dW6Oq19nQ=; b=EDv8c4VdQgdsB8BL78el3qhYWtCaLmkCHxZV/XnlqBJqx4AeWCDgSi4DXxGhGYdUTNMafI LstmFI9Pu4rtkDyCzQLfu0lU1+Gof6hcSHrz4jtd/s+IENsWN9zVBJ8VaJcsXCldKkn+SQ PELd8z44GZlrgkGXsE250zX6zYznhbCF5oDI37jyUKSZK9M6O5Mn7tIrjXH58nUFn3juVi 8/Y26pi5HJeifum5Q739+8X5PmR9faNbcZsEij7tvOWH2Cc+xH64vwYGwVGLQS7TC+eWO1 JvsRM45b8w15L8BsIv6pR9eASjqYvdQlifN/jfQLy1kOJT9oqVXJOO2jOS4DVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747001989; a=rsa-sha256; cv=none; b=vcFp40zEiEVGmKhSIz5dlvyJsYRiqr2GK84a942qDBErIhhvZB0iDq0LUDWnyXwWfsePsQ Fslv9nMuvNSfW2uqcQZO4hCdTVd6bKiKDEeLd9NuOL/p3JtidIdsalITMmcEFeTjWSmoQ6 k4IgcyT5AJD6uCLbfnlncEKNO2uzl486Vg4ajn8cI9uVpGPlrJaWHoddUJ1jdXTSpECUQb +P3674BmrgpZFdm/o62n+D32OVCew98pPUtWZweyiOq71lBAhWZUjuLs+vcgobVbo12shB zwNYYGq6lWJIUf0aW1oiANoGjlzK0R1q3K+K+x5+i4rKw1kohlmVkUivX9NR3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zwcc51fyVzqqh; Sun, 11 May 2025 22:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BMJn2p046963; Sun, 11 May 2025 22:19:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BMJnn8046960; Sun, 11 May 2025 22:19:49 GMT (envelope-from git) Date: Sun, 11 May 2025 22:19:49 GMT Message-Id: <202505112219.54BMJnn8046960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 206198289eb3 - main - loader: Instrument gfx_fb_fill with tslog List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 206198289eb3fa7beb9661a0233f1c8972f60d20 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=206198289eb3fa7beb9661a0233f1c8972f60d20 commit 206198289eb3fa7beb9661a0233f1c8972f60d20 Author: Colin Percival AuthorDate: 2025-05-11 22:13:02 +0000 Commit: Colin Percival CommitDate: 2025-05-11 22:19:34 +0000 loader: Instrument gfx_fb_fill with tslog Some systems boot absurdly slowly, apparently due to problems with UEFI framebuffer accesses being sluggish. This does not fix the problem, but at least makes gfx_fb_fill show up as a large block in boot flamecharts, which will save time when the next user needs to identify why their system is booting slowly. PR: 284595 Tested by: Peter Miller --- stand/common/gfx_fb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 395332af9990..efb210dff210 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -1001,6 +1001,8 @@ gfx_fb_fill(void *arg, const teken_rect_t *r, teken_char_t c, teken_pos_t p; struct text_pixel *row; + TSENTER(); + /* remove the cursor */ if (state->tg_cursor_visible) gfx_fb_cursor_draw(state, &state->tg_cursor, false); @@ -1026,6 +1028,8 @@ gfx_fb_fill(void *arg, const teken_rect_t *r, teken_char_t c, c = teken_get_cursor(&state->tg_teken); gfx_fb_cursor_draw(state, c, true); } + + TSEXIT(); } static void From nobody Sun May 11 23:09: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 4ZwdjT11XXz5wXnd; Sun, 11 May 2025 23:09: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZwdjS5rpcz3hTN; Sun, 11 May 2025 23:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747004972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FE7SFPpOHZVmiqqALqUuPO5MSoPhKYb4WRrVKALczw=; b=B8n57Pe5YPedtE3PY/zkla0+PfKpch0xK13QncO5U1n8NUBrnVrfnvq5WJxxgN9O9DoNuQ E4DfV9VLBqyMNtFKSwpK9mEd3ApUFosKdF2HE6Bq75xdETXDuwZb8vpcwgP4opuAgDcITD 25leHfieQpi2ei5FC6RcYGYOVYEjDZ21SEgHAw/VhwLC6Lbdwo5m17E1RdCELv80xfXW+N W7FpTWj8TdLEaR49ujSldJ3AO1N/Q2v9lFLj9J4tRkckvxP4PJIwWSkWrwuGxnogJdHvEC SClzdMWIDlzC1dtFWbKB42Xughw+bfRiOoK5HazWBfgvPlFfz27HI2tP9DPdXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747004972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FE7SFPpOHZVmiqqALqUuPO5MSoPhKYb4WRrVKALczw=; b=f6wJDiXn/68A2iH6oPGF1kP2Vucr3yBLN/FNbsOhjENp3h/Pcfmpa2u17INNYdnSMBINSP uwaeg64iBsU+vm9S2TsWgiDvFVnEXsThis4+uDhWJCP6ZRaHFHlKG8O+0o90G+uP8Wjlu/ raqDZmFnfIYLsZhFSFMdvSZ8D/9hw2s9x54VwHTwhh5rW/6ilHlL2K63SXly+qRGy77ufK lnWL2/tsWY1gwdcf1IlwzhcnM0D5XE1fMqBLfZMyAxmvIamLYS8ZJqXGulN2yhvMW0UQvn jW9Lz5rj4qGoUERYCPMSCO24W+mTvMVFdE2BmmYtQbiqHGJqW269ShOCHmzOhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747004972; a=rsa-sha256; cv=none; b=xzRAV4bDFJV8RJa4msT4VXG6aI47uyWYQ7r+PPQ3uHhB39zOtu5aFykERymP/obI58TJxr U40mO0DLb/57HdPll+QCejf0AyA88N4S8YPaiP25v+H5qfp+Kv/4ZzYKy6tWL55YA1ZxvB 8TVFXyVliMvCDy5KPvAad9b6NGcWHvozS9T620RCUSmOdhix1iARsIz+tfqqDipHSIujJ5 tCVnp1zIQVYLJTnjXzLhAfh9cIfKRjAly1Abj8eMAiiKsM3BnjQouSq3NRd+7bnvwOKG/2 hg4zR4hIByCWbPg4mQirx6ontVrYJI7aFkjFZO4soA1zo9UHD/GKzxLsyxIk2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZwdjS4zf0zrSS; Sun, 11 May 2025 23:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54BN9W6D041502; Sun, 11 May 2025 23:09:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54BN9WSo041499; Sun, 11 May 2025 23:09:32 GMT (envelope-from git) Date: Sun, 11 May 2025 23:09:32 GMT Message-Id: <202505112309.54BN9WSo041499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 5e25f7b09977 - main - loader: loader can pick too large font List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-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: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e25f7b09977002b069946e82055f26e0f4aec8d Auto-Submitted: auto-generated The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=5e25f7b09977002b069946e82055f26e0f4aec8d commit 5e25f7b09977002b069946e82055f26e0f4aec8d Author: Toomas Soome AuthorDate: 2025-05-11 23:07:15 +0000 Commit: Toomas Soome CommitDate: 2025-05-11 23:07:15 +0000 loader: loader can pick too large font While calculating font size based on EDID data, we can end up selecting too large font and too small terminal. Add check to prevent it. Tested by: bz, ziaee Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50258 --- stand/common/gfx_fb.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index efb210dff210..ad38a657e233 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -2054,7 +2054,8 @@ gfx_get_ppi(void) * not smaller than calculated size value. */ static vt_font_bitmap_data_t * -gfx_get_font(void) +gfx_get_font(teken_unit_t rows, teken_unit_t cols, teken_unit_t height, + teken_unit_t width) { unsigned ppi, size; vt_font_bitmap_data_t *font = NULL; @@ -2077,6 +2078,14 @@ gfx_get_font(void) size = roundup(size * 2, 10) / 10; STAILQ_FOREACH(fl, &fonts, font_next) { + /* + * Skip too large fonts. + */ + font = fl->font_data; + if (height / font->vfbd_height < rows && + width / font->vfbd_width < cols) + continue; + next = STAILQ_NEXT(fl, font_next); /* @@ -2084,7 +2093,6 @@ gfx_get_font(void) * we have our font. Make sure, it actually is loaded. */ if (next == NULL || next->font_data->vfbd_height < size) { - font = fl->font_data; if (font->vfbd_font == NULL || fl->font_flags == FONT_RELOAD) { if (fl->font_load != NULL && @@ -2093,6 +2101,7 @@ gfx_get_font(void) } break; } + font = NULL; } return (font); @@ -2123,7 +2132,7 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) } if (font == NULL) - font = gfx_get_font(); + font = gfx_get_font(*rows, *cols, h, w); if (font != NULL) { *rows = height / font->vfbd_height;