From nobody Mon May 20 00:25:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjJHv5Cvsz5LKCh; Mon, 20 May 2024 00:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjJHv3kzCz4mCx; Mon, 20 May 2024 00:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vt/TEog0k462/HBIS19VngfIyjhZkRdLFpD+z7pUEn4=; b=iaeVCzSI3zevfX0Gs1rOkfAsSO2F6YUQDVLeE28FlHpyqzxcgqxsWR/4xp4a8XqEDohMTZ bXsVcGvQPIfoVc+iR/TUroPZk0Xnl9DNinSpTYO88Eiz+ErEk8r1zp6grR5MaMSMDBp2AI s4t8RjFrVtZJY+CrkaPu3YVtinvJvV7wnYb8uYU7OuVJJ3HmOVTy71oM6PChnfrqxyj1HK tGTVJy6MAUHoNvPfCi2mRjPCbKlhoXlFlffhwTiOwyUcQ+wEMitHAGIU0+dU50zDluxgJY YMeHz3huJtFz0lisWm2gmjljzfSD0RB2/ikgEC0vxDhyvOds9cgOqMssZdvOLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716164731; a=rsa-sha256; cv=none; b=fFMET4BudTtM4Dq8kFOmkXU7V7AhbIF3pa52HzuPGznDEadjJxK3WUXwMEl0y3GBPqcMJp OXRe9TTFjtkIjcwouzAv7dLbXLlm1wdJMaxBvH2k2QVUl9+wqT19IdAA6VuXACZIoh5+kz FzoQMFOvXs4SHgLn9nhDnPg5UPDH+UDKzC38Jvo8JcwzIGomC/O4sQMADHlnXoMF7oES3k NRJEoYiNiLS43mjG5/kEgS1EMufWlOzKGIIT+7xCx4G+43Zq8suNiM+rwrYt/zEjJTUldY gwMGwx32xiE9nFrhbPjTjNixGtGieZ+3HA4pIJe0hLiXKr+QQZcGQej4YPBYLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vt/TEog0k462/HBIS19VngfIyjhZkRdLFpD+z7pUEn4=; b=x3bdfGY4QGc46lEIlD1rOG1ip7Q5vcWAEikjROHNg0kSbty/k9+qW+/3umYYH54JQY7nnH 8KfYqc2jfoZPFLWS8bIyCErt4e8a4klTccZOuC4mdoCkdmKVrIEP3Y33znLYcVqBTJoySy IWNt1FsVJg9MrnZlb49/WArVfkIRIATfZ9SZ7O7i+KEe9g7RfRJRTLTNbzDN7/6gUZNqzn J82lvnJdsZQ+ZPXQK34qtMZZ2G2dhoxAF00qBxsx9fOCMKM5jY9avLeimYYj0uqmqiMiKd w59FB6VWC9UQdu5ZyGGUo6fHDLI76+GVNa5GFLUUbbEp1x1wjM4OsMWQW3PhGg== 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 4VjJHv17tczGrg; Mon, 20 May 2024 00:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K0PUPY008317; Mon, 20 May 2024 00:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K0PUiT008314; Mon, 20 May 2024 00:25:30 GMT (envelope-from git) Date: Mon, 20 May 2024 00:25:30 GMT Message-Id: <202405200025.44K0PUiT008314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2ecfb14781cb - stable/14 - tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ecfb14781cb28e359623ffe6e2421b1abe03231 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2ecfb14781cb28e359623ffe6e2421b1abe03231 commit 2ecfb14781cb28e359623ffe6e2421b1abe03231 Author: Konstantin Belousov AuthorDate: 2024-05-06 18:31:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-19 00:57:54 +0000 tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode (cherry picked from commit 58d7ac11e77db28640b8e47f9f9c1fe81d15baf5) --- sys/fs/tmpfs/tmpfs_subr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index ef7fca2ae185..13323d50228a 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1053,15 +1053,19 @@ loop: KASSERT((object->flags & OBJ_TMPFS_VREF) == 0, ("%s: object %p with OBJ_TMPFS_VREF but without vnode", __func__, object)); - KASSERT(object->un_pager.swp.writemappings == 0, - ("%s: object %p has writemappings", - __func__, object)); VI_LOCK(vp); KASSERT(vp->v_object == NULL, ("Not NULL v_object in tmpfs")); vp->v_object = object; vn_irflag_set_locked(vp, (tm->tm_pgread ? VIRF_PGREAD : 0) | VIRF_TEXT_REF); VI_UNLOCK(vp); + VNASSERT((object->flags & OBJ_TMPFS_VREF) == 0, vp, + ("leaked OBJ_TMPFS_VREF")); + if (object->un_pager.swp.writemappings > 0) { + vrefact(vp); + vlazy(vp); + vm_object_set_flag(object, OBJ_TMPFS_VREF); + } VM_OBJECT_WUNLOCK(object); break; case VDIR: From nobody Mon May 20 00:25:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjJHy0tkzz5LKFx; Mon, 20 May 2024 00:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjJHx2qxmz4mMX; Mon, 20 May 2024 00:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgW1LIukD3EYk0yugicYGQAAfvMnl0R/HUwdkDExWBk=; b=svFfxBxrFoQCT8LsRA2X7UQHzH8AXSQrl+H5i9Wl03bf4YwYcmn3PCLYoQZTHTJl91NbBh vD69/sroCIdda42zN6k2kEHtrtWizfclJ3eWs6FMKxorYJ6A/o6HLZ2iIrJ6RSIHGsoG2c HYXKaMQcYIGwkOnVugQB10mTFWlCiS74sT30x7iuQOZZlqnffFrTvUY6v3r6St09BLYRMp p/wY6f09opFVzaiCZN/aKnY9KdQtkFUC+LqSDVOELALxkCI31xeu17ovs7jtktbAsAYten RdbYMvFyYOouB1AxFImRaAy0iXwR/u8EgyDTUn3LVQZOTVFrc6mnIx7XdrGh6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716164733; a=rsa-sha256; cv=none; b=xnfRR9w+T0z8v3GEUOKj196vb/pjsasHWyEMvVNEpNqpHcDwDfi+Wj2KMAO4ISRf3gSAxT lMVjVpKpxxbUoEBo8xsx8sJdHx1HQFiLxTLj4fs9NZzNEhmsN/NKZjfUYetTq5PgydG2fB fEblHFwUE4G38JZ2NmYyWyDj/8ZbI6fxsJ9oUlxYndeVVP9yFsQn/7BWQHLRP0XcTflXjr Z1N/HzzkC/rR6NPsF0MWVzTSmkay3OI36jVkRcRoyLNelJRSfIoKm3hxbG4yaHDEHyyspZ YEQg5+mi81WCO42WmAoZysg+mHHkksv5274wJMjuxGv33EIJFKy4ASEVlHupMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgW1LIukD3EYk0yugicYGQAAfvMnl0R/HUwdkDExWBk=; b=eX7WAMp3CzZSKWOn+qV12lix/I6r+JX102G6t2pA+cTmC8NGNKDq/603YqAFsUJ+jYMCU3 8iU3fgxC/iFh4XSRg7Zpzp6ELbysH8pTTcbuKhSiwKxyGd8xdKNUM4Qrd1HQOqzYsY32re ebw+MgzjjxSheLBo9Q7s5mDK1xauDSJVnPGjaEg8IfXPlBW52v46LFc9uuK0812Lln83MI bb14T149VrrsG+LN8u7jWjpCGiB3saib/af32TA2oN3AzrqqPzK+zNXeb1tNulya55O2Mp 3F23eZjrcJ/Y4u6ZUnpoMtN2Ko3fwCUd0UlPGVWIztbQN+RdxT9w8Qmu8qHwWw== 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 4VjJHx24ByzGjY; Mon, 20 May 2024 00:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K0PXYg008425; Mon, 20 May 2024 00:25:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K0PXiZ008422; Mon, 20 May 2024 00:25:33 GMT (envelope-from git) Date: Mon, 20 May 2024 00:25:33 GMT Message-Id: <202405200025.44K0PXiZ008422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ab135e19f70a - stable/14 - tmpfs_destroy_vobject(): clear v_object under the object lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ab135e19f70a517c41de30e89f18441c0134af22 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ab135e19f70a517c41de30e89f18441c0134af22 commit ab135e19f70a517c41de30e89f18441c0134af22 Author: Konstantin Belousov AuthorDate: 2024-05-12 01:26:32 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-19 00:57:54 +0000 tmpfs_destroy_vobject(): clear v_object under the object lock (cherry picked from commit 46811949797b7e44521cd56cfa61b6c8378c4600) --- sys/fs/tmpfs/tmpfs_subr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index b12e9b91fabc..de2c342e41c4 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -116,7 +116,7 @@ tmpfs_pager_writecount_recalc(vm_object_t object, vm_offset_t old, /* * Forced unmount? */ - if (vp == NULL) { + if (vp == NULL || vp->v_object == NULL) { KASSERT((object->flags & OBJ_TMPFS_VREF) == 0, ("object %p with OBJ_TMPFS_VREF but without vnode", object)); @@ -916,6 +916,8 @@ tmpfs_destroy_vobject(struct vnode *vp, vm_object_t obj) VM_OBJECT_WLOCK(obj); VI_LOCK(vp); + vp->v_object = NULL; + /* * May be going through forced unmount. */ From nobody Mon May 20 00:25:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjJHw2q0Dz5LKNX; Mon, 20 May 2024 00:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjJHw1rGZz4mNy; Mon, 20 May 2024 00:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+figa2fC++hXuq7E6jzIUwCx7wNzxOYhcktwyRLrO4=; b=yTvouN/dyQQTJjhYhvJBpSMU15yPeYXQV9HaUjyCq+xGBrls3mvEXVTsMwj/4jrzpdf/Qv KcLBNXA601rQDxt7XXoLB1s/kkFpmO6kd1oT/+BfTvsmV6J1a++CupDmJZgbZ5MolE7mWC gZw8OFJwTrKMEPnHgcxqIGU1S/F7zYgRfftUnLMhIQlz3ocSEG7zD48NxBHRsD69Pte1JR L1Ru0DtmUq4Mfe4pcC4wmWO5010t/RQhoUxBCDAQ1YUm2f2j78mSV54g3y9i/zBm9Xpgin 9HHFwekoDZboktGdhtib0LVy3KzfZ2YaTYRXJpLvsZUadJZfdUUOvhZEvclgFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716164732; a=rsa-sha256; cv=none; b=twVGBw2xLZ1S8SV2SauAOE8gbNabwtMJsXfBuJRryPLR29zbzR5/M0NWNGh4C8QPr4vLnZ Hz/nYwvLufsQDuqrpkEjtLbSLKNNyKOzj+kT2rw/mW6k4UyXb/Is5ufeDQ2TKeno/QJQN/ FGXfba2DPrNwCmiEr36jAR2+P3bCi5KxHLM9ppCdpHgoWNwV64x+t6WOCmMLCp7utZzz/J mOj0j0uFeu4V5qbVnkakNKBhDKtP3tZlDSeJZhKYrxLYIAl1KFKdxYtXqnq7C9H3YiasVZ nRkVHbjFkXbe/fPJZYEXftEosRfmwdoqHXeRBo43QivipStoj6wI/3y6dfkT/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+figa2fC++hXuq7E6jzIUwCx7wNzxOYhcktwyRLrO4=; b=osQwBHKDEL9fUhDxQyiAtLi6w1bCs3V3TDtZ0SFIFv/fdAOJ6hWuPxGzcRtmAkLoqiRNXh KXgSav7bZdNIEgDpn/yU9kD0xLRGV98Ka2qb1NG3fgMU4fzuRaSaWng1Dt8bquI2cmaDLn 0lOFMcTmjWS+CSgUGGtZ1Oi4bIapRm93Oix2NI3cTJhD1H7ZCEFvO2MoQ2QdFg38THwLL1 9lmY//0jHlN3qzu2yMHMGDJCYCgTm9aRx2Wyy1+oQhYX+mlk6skagy7Gile/FQboWHNVKS BUS8trweWIpx9vMWpz/3IT9VWFoH5GvvUo5ER3RKMDAO1kEL6CNFabvgkjPgWw== 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 4VjJHw020VzGrh; Mon, 20 May 2024 00:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K0PVf6008374; Mon, 20 May 2024 00:25:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K0PV4A008371; Mon, 20 May 2024 00:25:31 GMT (envelope-from git) Date: Mon, 20 May 2024 00:25:31 GMT Message-Id: <202405200025.44K0PV4A008371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f0d6377a3eab - stable/14 - swap-like pagers: assert that writemapping decrease does not pass zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f0d6377a3eab6d07f73d5b34922c2b3d9019554c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f0d6377a3eab6d07f73d5b34922c2b3d9019554c commit f0d6377a3eab6d07f73d5b34922c2b3d9019554c Author: Konstantin Belousov AuthorDate: 2024-05-08 13:58:52 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-19 00:57:54 +0000 swap-like pagers: assert that writemapping decrease does not pass zero (cherry picked from commit 6ada4e8a0ae901f0012015c8d277d80aad7d8f37) --- sys/fs/tmpfs/tmpfs_subr.c | 3 +++ sys/vm/swap_pager.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 13323d50228a..b12e9b91fabc 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -179,6 +179,9 @@ tmpfs_pager_release_writecount(vm_object_t object, vm_offset_t start, KASSERT((object->flags & OBJ_ANON) == 0, ("%s: object %p with OBJ_ANON", __func__, object)); old = object->un_pager.swp.writemappings; + KASSERT(old >= (vm_ooffset_t)end - start, + ("tmpfs obj %p writecount %jx dec %jx", object, (uintmax_t)old, + (uintmax_t)((vm_ooffset_t)end - start))); object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start; new = object->un_pager.swp.writemappings; tmpfs_pager_writecount_recalc(object, old, new); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index c8b08e0e8315..ce578cc4fd8b 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3161,6 +3161,10 @@ swap_pager_release_writecount(vm_object_t object, vm_offset_t start, VM_OBJECT_WLOCK(object); KASSERT((object->flags & OBJ_ANON) == 0, ("Splittable object with writecount")); + KASSERT(object->un_pager.swp.writemappings >= (vm_ooffset_t)end - start, + ("swap obj %p writecount %jx dec %jx", object, + (uintmax_t)object->un_pager.swp.writemappings, + (uintmax_t)((vm_ooffset_t)end - start))); object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start; VM_OBJECT_WUNLOCK(object); } From nobody Mon May 20 00:26:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjJJX2FmGz5LKT0; Mon, 20 May 2024 00:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjJJW3lVsz4nG3; Mon, 20 May 2024 00:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LHThmjhbrRp1y19V1YkSx9x4FFS/dSjC1Be5lEjr5h8=; b=ju+LkkEaihdeyml0mtn5QT/GrSGpxwq0OZvmthu9V88grC+5v0vgq4p+MbYMve0TgoSrgV cKcP3QA5TN3J4tJb7wwkWyVfR1A4noib07e6alL2DBCWrgnD1t5/zIdVfj37OjQ6UEFEiE xhn5/awp5UuTY1s2IK7tM7uN1iUwKZPUPGYv/zXQs/QXmGXsSbgKwc9D0zaiuDqQmkrrFR v3wPhuhQ50L23TXLi+1KBoqtMU/79qXpMcdNtFGCzPF94TypJcLcAThoEVRhMyXZv31icJ 9Ik2Zcm4d9cjffMdTlG9Fk5WJ/yfKYRRaRMMCoX+2KCeIKJQ65QSDeSTkkNo9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716164763; a=rsa-sha256; cv=none; b=iisDfZUFaBi6WLMtlJ0qwWLmoO1DAIYHJAZmSgrL33PIUeczPeNj0jvpzc2IOLeCQxvJth YiznFNZfMHP/jQj6J36yjTW8nIGJ1JjMCxwvrMrgdkODlc6cLXWlZtdfChGOAZKzBIPisT 0xeVYuqJfLvaLCkcI9xinrVp3unWXaqFH0PeTlEMZwiCdAXQVY/bAGQ6yK+uBJA6WajaXq DXWWHeqislRKwvXo2nXxf01WfXWEvyT4Qr86xQsvQhYw130h1Ul+vKrBSt11bjUH5EXwXZ XGFWn0g7vxKxpYZ9bEPrt2PKd2EsdqKYGNe9G4NwNXDvCOeV3mxaTs7ukx3dxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LHThmjhbrRp1y19V1YkSx9x4FFS/dSjC1Be5lEjr5h8=; b=rDCSBCYJNt/3p3qAL3jkwQGwXZcaeyLKxmY/R7+nfXPyh0T4dM8lSpB/uU5ZiQvTqnT3J7 kfuA7bppo8jyZugEVme03q2cdDNmojrFyVdBN9MfBy9+wJJAPgkpvZtGp3+14+LFDeiieg 4Jb4xksr9N87ASjOFfnv+aV10GODyepexfbq+AP6eAIe+eMNKMtskeG4+fDZmD1KA7Tztj AFBxdyBVrSKWMnMM3HEoMyIhaR39hp+Qp3NFmSXT2aoU0ESLxyD0wkJTgBdlhA7mzQdZ+W ZRiAu+cthVfiUjoJ19RiWEgOruN588rCol+ql5qM7zzG1vZCcf2Q9ophIc0tJQ== 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 4VjJJW2lx0zGrk; Mon, 20 May 2024 00:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K0Q3Dv008653; Mon, 20 May 2024 00:26:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K0Q3A2008650; Mon, 20 May 2024 00:26:03 GMT (envelope-from git) Date: Mon, 20 May 2024 00:26:03 GMT Message-Id: <202405200026.44K0Q3A2008650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e95708d7a1bf - stable/13 - tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e95708d7a1bf70d555da498eedc1a030a9106096 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e95708d7a1bf70d555da498eedc1a030a9106096 commit e95708d7a1bf70d555da498eedc1a030a9106096 Author: Konstantin Belousov AuthorDate: 2024-05-06 18:31:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-19 00:59:13 +0000 tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode (cherry picked from commit 58d7ac11e77db28640b8e47f9f9c1fe81d15baf5) --- sys/fs/tmpfs/tmpfs_subr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index d1aff2397cc4..a69e0357bc59 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1061,14 +1061,18 @@ loop: KASSERT((object->flags & OBJ_TMPFS_VREF) == 0, ("%s: object %p with OBJ_TMPFS_VREF but without vnode", __func__, object)); - KASSERT(object->un_pager.swp.writemappings == 0, - ("%s: object %p has writemappings", - __func__, object)); VI_LOCK(vp); KASSERT(vp->v_object == NULL, ("Not NULL v_object in tmpfs")); vp->v_object = object; vn_irflag_set_locked(vp, (tm->tm_pgread ? VIRF_PGREAD : 0)); VI_UNLOCK(vp); + VNASSERT((object->flags & OBJ_TMPFS_VREF) == 0, vp, + ("leaked OBJ_TMPFS_VREF")); + if (object->un_pager.swp.writemappings > 0) { + vrefact(vp); + vlazy(vp); + vm_object_set_flag(object, OBJ_TMPFS_VREF); + } VM_OBJECT_WUNLOCK(object); break; case VDIR: From nobody Mon May 20 00:26:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjJJZ2BcZz5LKQX; Mon, 20 May 2024 00:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjJJY61KRz4n5F; Mon, 20 May 2024 00:26:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sfdlGrTr5Mlvv1NjRtRuvleTg5QWwmrIao9gktDRxVo=; b=vp+0Y8ABqqq0UQ4NGx5hOIawc3NxDDrSbTkiyyFz7wgcG+trj+XZHPV2FnJ7e6QAN+VpPu 53TURfoV5amozdZscUY//RZfSiUTsL3//hAeIc+HU1mnCBup1W7D2vtRJkzRdbIDxcJYm6 s4vjKkSxw7PUwfbvkIawKvuZZ93a8JPKfcH6Oq/joNrib59mAy0ezy2J4/A8/olWUoKiPu yn4rUIlE/xrsYMxmj+VnjHBhYBnm/VvwEVv5Bs4ZERJO7w6Wr1F72uWQ7zSoaDkyyuAyGN 9shr7p0GfONPBS3VXap5K8z2XVz6Sk56QWdedszAKpLnjfhfnPkYPtmQi5orlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716164765; a=rsa-sha256; cv=none; b=q6F/lVZlApVwwvF8ID7gyBy1Qc7PQjVnOzdwpgLgPylSdu+Y5BPahHHr8veNs8oGQ8QixK rrsuk/x1NK+YnBQcTBNMX5ZCtkCMCsCUT1UMwPhTbgZaopjs4nVlbxzCuwwMDLKMypQ+pG FMl3+yV8NVPDrwOl0rwpU218WD9CXdJHB4BsTG4rzQlSAht29/b//Udd7drwNVpQz0lHyW stimcfAXzjfHEG7vA8/CCLRZz1rRhmlxibGiZzejHNfGjIaHlurH7cE/fJFK8iAYijZ4Os EwBdkfqqEyXMXuqK4d3iXz/+1wkgt1iWesu/+RowQVpgzekVKSxOhWVrcENebg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sfdlGrTr5Mlvv1NjRtRuvleTg5QWwmrIao9gktDRxVo=; b=tRPYmWO4czdrabN2Z32Lq+yzoZOWBt6xN3mcxRdGtjznRZvB19p6l7IWfRhN+o7qcOUiOk oTXna0gGrBn3/PnD6V+ieE0Y+qZIU4iOztGDjIzD0z3sLLxY+sRm8Jo2AJ6XRCNeI1+mMt /gIrfzrtEgVgBXI24FFg4YVzq7RMF5g0LTyDoTW6A0OWzk/sNj6bs28MEPrnjIGxiU4zf1 YA6VfgeIJnkfSH5o97fUzuRCpAlZuE3/L+G1VQY4tTdajTZwpaRvjEo9e/LEp9edXtSJ2K NbeGjvg+CADRwBcy5g5MWbM/L0teck+yNbjiDbYsi1hkfx7CCHG2v1bwgJjZtw== 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 4VjJJY4JN2zGxg; Mon, 20 May 2024 00:26:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K0Q5nA008758; Mon, 20 May 2024 00:26:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K0Q5u4008755; Mon, 20 May 2024 00:26:05 GMT (envelope-from git) Date: Mon, 20 May 2024 00:26:05 GMT Message-Id: <202405200026.44K0Q5u4008755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e45c358ec663 - stable/13 - tmpfs_destroy_vobject(): clear v_object under the object lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e45c358ec6639209c748f6ad0dd2f89ebedfa91e Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e45c358ec6639209c748f6ad0dd2f89ebedfa91e commit e45c358ec6639209c748f6ad0dd2f89ebedfa91e Author: Konstantin Belousov AuthorDate: 2024-05-12 01:26:32 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-19 00:59:13 +0000 tmpfs_destroy_vobject(): clear v_object under the object lock (cherry picked from commit 46811949797b7e44521cd56cfa61b6c8378c4600) --- sys/fs/tmpfs/tmpfs_subr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 90fffb11e4c6..54d28edb10b5 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -116,7 +116,7 @@ tmpfs_pager_writecount_recalc(vm_object_t object, vm_offset_t old, /* * Forced unmount? */ - if (vp == NULL) { + if (vp == NULL || vp->v_object == NULL) { KASSERT((object->flags & OBJ_TMPFS_VREF) == 0, ("object %p with OBJ_TMPFS_VREF but without vnode", object)); @@ -909,6 +909,8 @@ tmpfs_destroy_vobject(struct vnode *vp, vm_object_t obj) VM_OBJECT_WLOCK(obj); VI_LOCK(vp); + vp->v_object = NULL; + /* * May be going through forced unmount. */ From nobody Mon May 20 00:26:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjJJY2W3Zz5LKLL; Mon, 20 May 2024 00:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjJJX4bRDz4nDP; Mon, 20 May 2024 00:26:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZMYNdAxu9gt8ZYqVKFnk9Qr1MQH5iPyKDlja2VJ6c0=; b=RJVE7Pw95JzWjlgm9yr08kWZNnyENQXsX1o6ubpcdN1inodryhHpqLSkP/laUIw4FzsAaC dt9OLwt6LgGl2UNcyXVzQ6YekjbbLFQu8gOqvjKTtwcEKBMZ1PtuJm0l1k8MAuohgeSXDe BYSJk9RONUTjMqt0jpqYRU3lYfhx2TlGXoA7xdbPr3yp9Dfop8azRZDlfFcw68wccnKCWB coN1+UWrAo3S3DbQChLxfEMLZxvpW5OmvYzQ0G5FFOnf+OFa/Uc8u6aaUbg0nXyMg+IeYr a9/14UXcdmKvT4icnJ/K6TKc6htfdtjetcB+TZqwSsbqtMBtQQdkZCl7lseyGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716164764; a=rsa-sha256; cv=none; b=ERP6AR4HAJCMAW/khBt660mxMFxO8SP7g9EzMyRhA8c6IQ3f5qPEjn51JdeZS5HlCCGjh1 bGh3KhWN7k2A6wH1afYbJSd7jU34j3sUDWIbVwu1QTrX1tsu+GO3zBynj22CmM3o2mb3pD L3IgUet5RVDSRwbw4F8wQImsK55L13EfQIE6kNyG/TvWpDIyDoUEXXt5xLEPNVy28FpnFd ukSBsNc13Q8tNu3N6UX8fztc1WwqNQj4eUg9jm624hff0tLW3J3brF1idyTXfzqFY+fCel QrEnTHUk58nSPESPka0WDuIzEod0SryPK2t4TzJNueo1c1JsUwBW+dUi0mtW5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716164764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZMYNdAxu9gt8ZYqVKFnk9Qr1MQH5iPyKDlja2VJ6c0=; b=iIh8dcPFOFOKk7JjYL/k9SH33KxmH973ovBvaRi355h2ZXksRnxiinHwe2wxdGUPfhFZsS 4EJVDPkaZsxzjxzFWykxe4dIfMKYZFaYfFO1gtPZATxscqML1Y4x3UxW5pFyJyrjZQaidV O1jcgBzrGqBZxXflTwczOJrLwtqJTHIt3++YVuMiJE0dSFlbVBljclAmulinmaEM3TnXiK Fz23uRX0UVWL6bCNO/uGCVCSjZIwHyfCx1tVAdPMdy2PWUV7o1nYAZkaAO6VL7LCjiTMK3 plPr0g49cdQpLMOM1uK2/bmIhOtv1OD9HF6yB7BOkMa6jxfp5rFnerJi9AYt7A== 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 4VjJJX3jhCzGxf; Mon, 20 May 2024 00:26:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K0Q48h008710; Mon, 20 May 2024 00:26:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K0Q4pX008707; Mon, 20 May 2024 00:26:04 GMT (envelope-from git) Date: Mon, 20 May 2024 00:26:04 GMT Message-Id: <202405200026.44K0Q4pX008707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 156b5b7bf44f - stable/13 - swap-like pagers: assert that writemapping decrease does not pass zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 156b5b7bf44fd7be5d745accea741527c46532cc Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=156b5b7bf44fd7be5d745accea741527c46532cc commit 156b5b7bf44fd7be5d745accea741527c46532cc Author: Konstantin Belousov AuthorDate: 2024-05-08 13:58:52 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-19 00:59:13 +0000 swap-like pagers: assert that writemapping decrease does not pass zero (cherry picked from commit 6ada4e8a0ae901f0012015c8d277d80aad7d8f37) --- sys/fs/tmpfs/tmpfs_subr.c | 3 +++ sys/vm/swap_pager.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index a69e0357bc59..90fffb11e4c6 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -179,6 +179,9 @@ tmpfs_pager_release_writecount(vm_object_t object, vm_offset_t start, KASSERT((object->flags & OBJ_ANON) == 0, ("%s: object %p with OBJ_ANON", __func__, object)); old = object->un_pager.swp.writemappings; + KASSERT(old >= (vm_ooffset_t)end - start, + ("tmpfs obj %p writecount %jx dec %jx", object, (uintmax_t)old, + (uintmax_t)((vm_ooffset_t)end - start))); object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start; new = object->un_pager.swp.writemappings; tmpfs_pager_writecount_recalc(object, old, new); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index dd7fecc066c4..a3e312af2ed9 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -3183,6 +3183,10 @@ swap_pager_release_writecount(vm_object_t object, vm_offset_t start, VM_OBJECT_WLOCK(object); KASSERT((object->flags & OBJ_ANON) == 0, ("Splittable object with writecount")); + KASSERT(object->un_pager.swp.writemappings >= (vm_ooffset_t)end - start, + ("swap obj %p writecount %jx dec %jx", object, + (uintmax_t)object->un_pager.swp.writemappings, + (uintmax_t)((vm_ooffset_t)end - start))); object->un_pager.swp.writemappings -= (vm_ooffset_t)end - start; VM_OBJECT_WUNLOCK(object); } From nobody Mon May 20 04:04:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjP820b7sz5LhKB; Mon, 20 May 2024 04:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjP815qzKz4BNl; Mon, 20 May 2024 04:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5FWSOLQ6u8siNOge4Zr4KqIN8v4/HVTzUr8kin8kMs=; b=e0K29B0LpdBTCTrrgsnLKvxHldrdZYRK7NJeODsYiBurPvY19E3MYux0f+f0F/0mkAmr6H Ta5pl3OV+alNQi4CU75dx9IMbHQYn33VM3+jn2bJShg3AIAhYmz69XdDs/YVIZyhqi4a3w 0vFNbcMMVpG/SraJqPcCcfcV5uwd4dNyIM9nwUDgBwVFZRng6CROZQFzHFlKuS8FSsVQAE sS9WNXthdDKISXXLEjY3fzbFA1tnPhV+TzjovZI4NkpABpP3oshDxJP3QGvYmxg2Mcpvqc SGeybMtb3+q+jex7I2ZpJosBF7li2r9M01kAhpF/eIMutGMNOLamtDs2TSlD5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716177841; a=rsa-sha256; cv=none; b=SyRw7JEgM8K2gPCh9+XvLjv6s/3R/JQgq9wSL69+uFYf8ZDNs4bVmUrH4FCwF8fQKE9tNv 955hfvYsLhI28C2nyC/rurekkaNRWKlMRSHKNzsKK3ZeIMtSUrsXiTirfW8F5f/uIwfb8U tycYFNxjcwVPgkvUE/3GXkg4ejznGMvAfsTb9E4bu1aCf6/Otj1oVlu5nm1ghmjDQcStTG 3tqotO0+dD5oBTIIIUpaTamVK2W0EctsL4kLIjIYy0m5tEYwsndWGWleFhdSXzg8Otdn6l Pmf8InXjJlNQNjt8tBxpqEqOZ+h49T8fa0ym+VIKDuQKnXRdWvJacW8bWzlUjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5FWSOLQ6u8siNOge4Zr4KqIN8v4/HVTzUr8kin8kMs=; b=ftDRvS8Xfrym0ZxJNxvFRlvNcyCOc2cC4FVY2nBIwJMEbnQUVLD8n6tCiikJanjWn+hyTT wzTwvJL7YtrSe0yZOLFlWbRMaVf2U1hBYdc+ZVQnS7KGp4Mb1La0AS9uknbj/DC2szoLS9 JzgOXf7E4+D2KX5jk8/AUpZoMfDyk5qGkYrAOsByxSi4bJKWb0HVUxySAWHmcGS5ouaS26 KiD8FjdjgAkcof1zmdHalBDIgDjmchBG+kvXeOA/DSRqHzmrtL+9rKyJV4wOCWKVZuimgo g94p0x9y2OA4rQCHClzE27fsqlgLfpSxTN6kS4yA+hIGXxBRIxca5mSEVBXrtg== 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 4VjP814rnPzNHD; Mon, 20 May 2024 04:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K441XT080253; Mon, 20 May 2024 04:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K441cq080250; Mon, 20 May 2024 04:04:01 GMT (envelope-from git) Date: Mon, 20 May 2024 04:04:01 GMT Message-Id: <202405200404.44K441cq080250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 92f2a4c820fe - main - compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92f2a4c820fea9efcb6ee6a7029495c8152958c1 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=92f2a4c820fea9efcb6ee6a7029495c8152958c1 commit 92f2a4c820fea9efcb6ee6a7029495c8152958c1 Author: Zhenlei Huang AuthorDate: 2024-05-20 04:02:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-20 04:02:32 +0000 compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname() This local variable s is for iterating characters of global variable `version`. The content of `version` is not going to be altered by function freebsd4_uname(). MFC after: 1 week --- sys/kern/kern_xxx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index 46155cf6a73e..fb76d420df7c 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -315,7 +315,8 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) { int name[2], error; size_t len; - char *s, *us; + const char *s; + char *us; name[0] = CTL_KERN; name[1] = KERN_OSTYPE; From nobody Mon May 20 04:04:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjP82745Mz5Lh84; Mon, 20 May 2024 04:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjP826KRpz4Bnt; Mon, 20 May 2024 04:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIle0se6l54NXswkCt0biVsZva0j6lvggLD71a8MMBE=; b=KTTNTejCY4iA8EtYzmQE1oAucGPbnSU0TxJftInRJtnYq0cwMmUMeKFduD/MsySKKO09K2 7TaDT6XpJ4j+3SqLe+PSvhU0eGx03/1RxI9OdoBeae/0flF1tIv1K71dYfbhWrN1sVJ9C8 gWHYSBvxCV3Jx0h/qmwlBKdk4DDxltypRPtxJJIlwLdtlmBMJHadO0yKBzs9O3mhjQXSoC HchUEQgrjL6Vh/gF0Rmz9aJ9SyiGJBg7d0aXHvq5Ep0/ei0dPA+A9uQfM0rE/cT6WPA9z5 t8lGqQYBO4ltRBNMi1ENiQaVD2uNTzdT4XSuJtWHntNAx6sHoB1AqZFDzSaeLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716177842; a=rsa-sha256; cv=none; b=JcLT+9POubykTUwLgqF5sP5qjrqiUskSq/6idOhvOEsXUyo1xRsbgSss/p6Rrr+ZMPToZ2 14BNslaz9aMUZUAvvqvPgmQLcu1Zt3lzKMtELSZkIH7T/Q56NgsfiOyp68wUdhf3KUIvW6 mepT6xHMXF47smM3MOvTLsg64+uapddOOvkalEWH4Fopd9Au+6YfQP3exlcH5xwzHRksxF nggl2vVNezezSRGBcT8vOJXsb0NK0fmheycqcngrMiFaxzXu8vGKUUuxQpYOOviE+SC2QP biVXn39CoR7kFuNuuOFXWcZWFIiKrnHtAtJ2cRbcySos80mCewvloPTITse3cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uIle0se6l54NXswkCt0biVsZva0j6lvggLD71a8MMBE=; b=Dnp3jvEdkqJ+DFeLE3QIgnkKcfIlQpS+lAK2ns4YOnm7CaPYgJee9P13esHRmHWqM/gnns 6li0l/whXTqiE1DDJ7drewGzCSF4WXKXJSzxgpznUnPuwl1e//JQaTFKdPDQQU3rl+PmeQ zPT1EKdRcCKAG7jfDaDdqljLZzBNZSMtk2pxKFoTtFbnACap8LCHue6GPv+rvjZcxGJ07v 0fWG5RAIlUUbT+R5Eisk7onkutlADCvT/jJogNA+rn+wywpa4M8bmm51Fs9Fsg7ajKWdZq yT752go3IkNOQBcnbxr++oD4eOQRH0WdTslzJQMNh1idGHcwiqJ4Ut1koTrLxA== 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 4VjP825wbCzNDb; Mon, 20 May 2024 04:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K442At080315; Mon, 20 May 2024 04:04:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K442BH080312; Mon, 20 May 2024 04:04:02 GMT (envelope-from git) Date: Mon, 20 May 2024 04:04:02 GMT Message-Id: <202405200404.44K442BH080312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 68c890b4433d - main - linux(4): Add const qualifier to the value parameter of function handle_string() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68c890b4433d3655c7df91cc43f89f4d6a8b35e4 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=68c890b4433d3655c7df91cc43f89f4d6a8b35e4 commit 68c890b4433d3655c7df91cc43f89f4d6a8b35e4 Author: Zhenlei Huang AuthorDate: 2024-05-20 04:02:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-20 04:02:33 +0000 linux(4): Add const qualifier to the value parameter of function handle_string() The content that `value` point to is not going to be altered by function handle_string(). MFC after: 1 week --- sys/compat/linux/linux_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c index 65c64a7ba563..97341c051af7 100644 --- a/sys/compat/linux/linux_sysctl.c +++ b/sys/compat/linux/linux_sysctl.c @@ -74,7 +74,7 @@ LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, unsupported_sysctl, "char *"); #ifdef LINUX_LEGACY_SYSCALLS static int -handle_string(struct l___sysctl_args *la, char *value) +handle_string(struct l___sysctl_args *la, const char *value) { int error; From nobody Mon May 20 04:08:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFF70Jkz5LhH9; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFF6Fblz4CpB; Mon, 20 May 2024 04:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DI6nN52cr09OdW82vCXN1gT6cIksfPDnf2g+job65W8=; b=rzBc/NaY1CDCB2rHxDNJYn4LSIjL1LCPC6d5LJB+PmNqx7LVBsCoSBfRyGQk//0pSpgo7S jb7NyBL7aYXj9H1LhWMWXvaeiivMWczEwxr8cWpRpD/rIRsu1ZJxSImY/NkwIERn2Gi+Ql 2ZOP9yAlACFPfzdEDWSx5C20Sz8ilTS8+iGQXOrmZ7EDuUPS8CqgMna6OiD7IH9l3Pf1or iUIjLsfW2GAHMEw5AA0AxQkv5N06XjUtylxLszDTDtnIfZpL8C6D7XaIvJmTO2pxgreT6l YRyE5BkZCt0dX2UKPN8faRT8Je7jI9Prue1MQ21bChOXXA2gJNXIFgE73pUgFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178113; a=rsa-sha256; cv=none; b=yAFiX2CODov2XmJ8PzibTbrEwLF0dCtnB5G/iZgOdV/lxDQPo5wJhb79C+slkVlYIFXhml 52XeMlLXyf4UkiabTWvIj2IymH059nlCj3kzop6IIhSwpMf7y0iTCzN+1DTUqBibLHmCs7 HP3dLjZ8NFc+IfXtjvKL6vpmSAbUEW6ZEhbk3zIuZwAYRMhy9hQEBTN4DLjf9kPi7IyvEA OKZLBk/Y1ri93RNeqPstoGcI54JAiSGSNUTrvCHqCGPh2pG9pd5+KoULP68zrLRzOUBlcM W8PwggElx/HeuiDJgBeDcqxn3tEt1tKGPiSvl5JkSL/ddQvWsa9A3EXxPtG/6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DI6nN52cr09OdW82vCXN1gT6cIksfPDnf2g+job65W8=; b=sVVHgrd7XoQVpESPs6LlhVf0Ocvq0cpJuZhK4kPVm54FzCeUxocfWUNa67es4e5lt10l6e /GguQp4IxNqsF5kesSlCjkIPwO70eQXWdmO9MzPkkDslVtjXwdo+JsSxPS36pxRhufSZMU wn37dIYvX1TXgXiQsjxkZAbwh9rDrco+CMl0CSFsftTvPDRfvpT757XdoECk2TFMsCrRBa NypKGvwvPX79p0J9mRZQAlr/qg/ct8Nve7PhuPH+4yi6BnK0vWKifIWxDNrdIihiI/9OoQ d2a+nDSIMbA/j80G0t6DBmKIzc5iJmW4WZUXCFwk9suRboDq9dZSgGuUl3MZaw== 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 4VjPFF5rZwzNbh; Mon, 20 May 2024 04:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48Xv9081049; Mon, 20 May 2024 04:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48XEa081046; Mon, 20 May 2024 04:08:33 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:33 GMT Message-Id: <202405200408.44K48XEa081046@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: 1d7bdae9ca3c - main - kboot: Move console, acpi and smbios init List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1d7bdae9ca3ca821e93386d85e87de491471cad7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d7bdae9ca3ca821e93386d85e87de491471cad7 commit 1d7bdae9ca3ca821e93386d85e87de491471cad7 Author: Warner Losh AuthorDate: 2024-05-19 16:41:52 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:40 +0000 kboot: Move console, acpi and smbios init Move the console probing to as early as possible. There's no real support for anything but hostcons, and setting it up early will show other error messages. ACPI and SMBIOS probing can be done just after we have the console, so move it there. This allows other parts of the early code to use info from that, as well as overriding and env vars set by these things on the command line (smbios data may be wrong during initial development phases as the automated way to populate per-board data may not be established, etc). Sponsored by: Netflix --- stand/kboot/kboot/main.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c index e57446baa47d..ed5cad450000 100644 --- a/stand/kboot/kboot/main.c +++ b/stand/kboot/kboot/main.c @@ -342,16 +342,23 @@ main(int argc, const char **argv) heapbase = host_getmem(heapsize); setheap(heapbase, heapbase + heapsize); + /* + * Set up console so we get error messages. + */ + cons_probe(); + + /* + * Find acpi and smbios, if they exists. This allows command line and + * later scripts to override if necessary. + */ + find_acpi(); + find_smbios(); + /* Parse the command line args -- ignoring for now the console selection */ parse_args(argc, argv); parse_file("host:/kboot.conf"); - /* - * Set up console. - */ - cons_probe(); - /* Initialize all the devices */ devinit(); @@ -394,13 +401,6 @@ main(int argc, const char **argv) memory_limits(); enumerate_memory_arch(); - /* - * Find acpi, if it exists - */ - find_acpi(); - - find_smbios(); - interact(); /* doesn't return */ return (0); From nobody Mon May 20 04:08:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFH256gz5LhG1; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFH0Dsjz4ClW; Mon, 20 May 2024 04:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178115; h=from:from:reply-to:subject:subject: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+gaWZu9nIV2fCRR4XJou4su42oPaYW3F+0tiexcdac=; b=KzBN0jhhyrr8D5gYC784vUFXqYLBXO8/+VI1GqkNRwSbzMkmQqMnZlxrO3UWSmbfmjS9+k lsGtlvvu7PCvzmltPkV2bxGnphghNme7RlqEMfbYQCSVx27e+q6CECQHezPQLnqXTaEyLx o1xeMSIWOQWt1nCxcf1I+EAMHjYybcX6BbGHfSG8egVlJjpySGag5F7Zm/nP/ZPWP4/B8B qHmUKm9b9kkmIYayDsBK0OQPKDFxL0Zac6qj3mwaPL7Gs6osAo8UNF/z99XGRjYeYHvQtL rErgwCmK8gqG9+tSabFFmw1hP97lLAcDjmSa3Ovwy0pfbmNBOkI6tRzaUZVS0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178115; a=rsa-sha256; cv=none; b=XmAccClcqMm6OCukjU3rLyrKOrz5xHYshy+oqKdoWVpcF/+7hx5cL5TjeccDFQwdV1n1qk ZE0taAQuRKqKhVmebCxct4Yfgnz1oAaiKdHC1wbMaAtRzCKknhbHw+SQpKj+tnTSdieH/1 Wcpj3Je19V6mV0QGfqKcGX14Xpv/z+yI3QzeHn8o8lvB4B/CmbtQOfdVrZX2ROD9X66fxj 6EppqdknSRkK9O3LKMZ8juXqNuYMXJtNkgXBekR/NxoUGpe6+VmpWpZyRc+fLkFH4Iwhzk 5M4rdIsd8vSby8d83B3EiKOljWzyH/5Z3rc01h+Woolq96TLowNvmmTrWKHXQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178115; h=from:from:reply-to:subject:subject: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+gaWZu9nIV2fCRR4XJou4su42oPaYW3F+0tiexcdac=; b=h5dJiiSs2VT4Y9BUmwCVbiECqqwMQRi7OZcQj+ffKViyZ/ScLn8JXsx/8di5uSJ5J76hKP 4TB1Qguw34MBNf8dZEmScH3hDGTHbFLzPzbzme0+eeLkhdfWUsh74pOj4aq0U097JfPV4O Rvk3JaUrXkv8l8nXSRFM/QC2dJVmTF4s76xeh+OT3yJlhsI2VFbPE5CGiDzaTMKGZ4+Kbn d0vL7fjmqwtvdDoyKpNW2PgJoWjaAZQOiy76wXsPjy8ehf/xO0FDVpA845WWMN0gUlLRm+ 0IQxXQFzBEId0y+6f51V1tn27YsrgTGFuDvyXEJzviYvrJ23SrI6l1h7O5a2qQ== 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 4VjPFG6y0hzNHH; Mon, 20 May 2024 04:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48YXJ081098; Mon, 20 May 2024 04:08:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48Yaa081095; Mon, 20 May 2024 04:08:34 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:34 GMT Message-Id: <202405200408.44K48Yaa081095@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: 68344c9c6c69 - main - loader: separate lang init from scripting init List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 68344c9c6c69fc604b402eee420285356f7a677f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=68344c9c6c69fc604b402eee420285356f7a677f commit 68344c9c6c69fc604b402eee420285356f7a677f Author: Warner Losh AuthorDate: 2024-05-19 17:48:14 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:40 +0000 loader: separate lang init from scripting init Create interp_preinit() to initialize the scripting language to run scripts. Make sure you can call it multiple times, but only the first one has effect, After it's call, you can run scripts in the scripting language. At the moment, no functional change. Sponsored by: Netflix --- stand/common/bootstrap.h | 3 ++- stand/common/interp.c | 1 + stand/common/interp_forth.c | 13 +++++++++++-- stand/common/interp_lua.c | 23 +++++++++++++++++++++-- stand/common/interp_simple.c | 5 +++++ 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index b7d6e538f9be..79ce0b023b7a 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -54,7 +54,8 @@ bool interp_has_builtin_cmd(const char *cmd); /* Called by interp.c for interp_*.c embedded interpreters */ int interp_include(const char *); /* Execute commands from filename */ -void interp_init(void); /* Initialize interpreater */ +void interp_preinit(void); /* Initialize interpreater execution engine */ +void interp_init(void); /* Initialize interpreater and run main script */ int interp_run(const char *); /* Run a single command */ /* interp_backslash.c */ diff --git a/stand/common/interp.c b/stand/common/interp.c index c6ac01ea099b..5d20822e037d 100644 --- a/stand/common/interp.c +++ b/stand/common/interp.c @@ -60,6 +60,7 @@ interact(void) * we need to switch interpreters. */ interp_identifier = bootprog_interp; + interp_preinit(); interp_init(); printf("\n"); diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c index 854addb22d5c..388a20e319b3 100644 --- a/stand/common/interp_forth.c +++ b/stand/common/interp_forth.c @@ -337,12 +337,21 @@ bf_run(const char *line) return (result); } +static bool preinit_run = false; + void -interp_init(void) +interp_preinit(void) { - + if (preinit_run) + return; setenv("script.lang", "forth", 1); bf_init(); + preinit_run = true; +} + +void +interp_init(void) +{ /* Read our default configuration. */ interp_include("/boot/loader.rc"); } diff --git a/stand/common/interp_lua.c b/stand/common/interp_lua.c index aa759aa99ec1..2a61bb9d04af 100644 --- a/stand/common/interp_lua.c +++ b/stand/common/interp_lua.c @@ -96,17 +96,21 @@ static const luaL_Reg loadedlibs[] = { {NULL, NULL} }; +static bool preinit_done = false; + void -interp_init(void) +interp_preinit(void) { lua_State *luap; struct interp_lua_softc *softc = &lua_softc; - const char *filename; const luaL_Reg *lib; lua_init_md_t **fnpp; TSENTER(); + if (preinit_done) + return; + setenv("script.lang", "lua", 1); LDBG("creating context"); @@ -126,6 +130,21 @@ interp_init(void) LUA_FOREACH_SET(fnpp) (*fnpp)(luap); + preinit_done = true; + + TSEXIT(); +} + +void +interp_init(void) +{ + lua_State *luap; + struct interp_lua_softc *softc = &lua_softc; + const char *filename; + + TSENTER(); + + luap = softc->luap; filename = getenv("loader_lua"); if (filename == NULL) filename = LOADER_LUA; diff --git a/stand/common/interp_simple.c b/stand/common/interp_simple.c index d675da0aa61e..437739a3bcc4 100644 --- a/stand/common/interp_simple.c +++ b/stand/common/interp_simple.c @@ -34,6 +34,11 @@ INTERP_DEFINE("simp"); +void +interp_preinit(void) +{ +} + void interp_init(void) { From nobody Mon May 20 04:08:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFJ61LWz5LhC2; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFJ0pZ0z4CtG; Mon, 20 May 2024 04:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sgjtmUhDr6VgrkcT0oweZuL6QVyOJA6b6zKoaDFmgtk=; b=WUcqii5j+eKMdMC07NlkhMcIlIFfq/+XPwQGita3udFQMdIH6GTqaYT+nePZjeqeesuSd8 ycg/NfchRrMS3q5cUYq6TU9H3i21j67pRBexBMa/7mQmFh+2722mSd6J+OLHlnTIqkuXv6 DJtkIapPbeDjWRB0txmIDMIxkmwmYS+0szH62etaV0W4VKv3aAGncmVFeoVRLHuPm9JbV0 tjkaGJyweX8cjSazNTH8SbpNu3SmJLW62+5Gf43wrPnOoyx9Jh9lDQLstNHOmxyrCFrOt5 3kzhzrRyYN5y56KXRtjcEg/yB6siOCUrdv4hbccfzPb8SokxmKtCCcofymZAwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178116; a=rsa-sha256; cv=none; b=WEJpRc0eETIbwKkbO19IfYPLPS+PhLZNEG8/bkCmOXaIntzQkfWrAQJDJY4ECdd6s4dOdg AFjd7d2F2h5jAXudQVqXpcS0DC/Uoc36UPFrB6nDfNVTSCYUbXsrvjckFcJcarvndFrbAW m2D5ystAAZxP96wpI1iveRU67LqK4Zdc2tENDx/eV2vdy69cmtdxHp0LONHSSMizfErtA/ TMjHEE/Yf/9AbfUa93ZfIer/U38XRqA8ftrqmdWaCG9fpmHY5gp9J+w+1lwFBsABdft/NF 9IrdbWLNo41ndHLBm7fzqjtEwJbXc0MZejJTig4MbBXQzfUXs9sy1ngvEz5YWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sgjtmUhDr6VgrkcT0oweZuL6QVyOJA6b6zKoaDFmgtk=; b=qA/8vDj39TJxi5H8ir/ZKHJZbEzyTHzcsBFkv6jC9Xs/CAhwENRJzEbgmFnHeks7OEVCK6 fpNHGcQ5pmlit1KxlfUFmDVBdWsL31WFCdjWLqB8fpBdE75DciFUaqStOSjtso0d9P+TSa NAgV+g7Rts6MDrAO4E1H7kUSkpxKPaIEg1ydOx1bX2FDpkm8jXP3IwaK0RrdnYp9C6J6Ju op3qRtd0gN5pqm1FWa382PA8GT4Kn5KSWGxRLMryZ1bD82gsI4TZ0C97Xv2AfIF3zAtamx 10XP9lokndG64fkl2j9r1fO3/Qu6drr6+pxgK4QjygyNGRasv5f6ob429C++RQ== 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 4VjPFJ0Qt5zNHJ; Mon, 20 May 2024 04:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48aJc081155; Mon, 20 May 2024 04:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48ZVH081152; Mon, 20 May 2024 04:08:35 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:35 GMT Message-Id: <202405200408.44K48ZVH081152@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: 0111f09ca670 - main - kboot: Initialize hostfs_root sooner (and remove kboot.conf) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0111f09ca67070271e43655db2e4989cf2d64f88 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0111f09ca67070271e43655db2e4989cf2d64f88 commit 0111f09ca67070271e43655db2e4989cf2d64f88 Author: Warner Losh AuthorDate: 2024-05-19 17:05:48 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 kboot: Initialize hostfs_root sooner (and remove kboot.conf) Move the initialization of hostfs_root to be a bit sooner. While it doesn't matter for the default case, we may want to use hostfs files sooner. Also, while we're here, remove kboot.conf. It duplicates the command line and has proven difficult to use. It will be replaced by an early script that can influence the state of the boot loader before we select a device to boot from (including strongly suggesting which one to boot from). Sponsored by: Netflix --- stand/kboot/kboot/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c index ed5cad450000..994df1ec9fa1 100644 --- a/stand/kboot/kboot/main.c +++ b/stand/kboot/kboot/main.c @@ -357,17 +357,17 @@ main(int argc, const char **argv) /* Parse the command line args -- ignoring for now the console selection */ parse_args(argc, argv); - parse_file("host:/kboot.conf"); + hostfs_root = getenv("hostfs_root"); + if (hostfs_root == NULL) + hostfs_root = "/"; /* Initialize all the devices */ devinit(); + /* Figure out where we're booting from */ bootdev = getenv("bootdev"); if (bootdev == NULL) bootdev = hostdisk_gen_probe(); - hostfs_root = getenv("hostfs_root"); - if (hostfs_root == NULL) - hostfs_root = "/"; #if defined(LOADER_ZFS_SUPPORT) if (bootdev == NULL || strcmp(bootdev, "zfs:") == 0) { /* From nobody Mon May 20 04:08:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFK4QWbz5LhT1; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFK1s9Cz4Ccc; Mon, 20 May 2024 04:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jCRt0RqzQxofSGaFHaZAd0xGEa3LEHIX4OEhtihoebI=; b=La3LhFj3zPQ7IQOO7fYV/bGdo6VawsHvukdngmpaOWqyreU0+uWaKKX/NdUo7n490Jci3V eT7thVooXFosNEt8MDiSrNIWByMbh4uV28qbHEwAgqTh36xI8iyg7N8OXVjkFu1hEeP+8z PoKdbBAaV6fM7QrhFcRGS4kT7ntcgf4jwATDN8AWQspOweBJnnb7eL8NB0LoHRkKS4RlKf R3kt9Bo9K/3zCf+c0sRINCwE84+M/c5X9p/8AXhTiNXREQgePU+BXwRxzPWlgZ2ZMyRjY6 fngGW6a9QVoIwvqUepDN/ZEQvkS5/YGP+x5EGCeD5HJCYhdKMr3SN30iP1Pr6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178117; a=rsa-sha256; cv=none; b=PAU55xAGmMlrgo6wm1EjyZ6Gcv7+e6YsCP4t37iqCfDAz3J/z2teqfH1JJjalZ9RImgnWz dBg91EeuANS+tHEx95wuA3p5e5hjCKomGTCZWlgdqADLW/Jn1uYXZRWK0s0tXBq2hL/MxN vOxIx3ResfZLkf/phH9pr7J0zxcYf4cLBhfxLJObtU+rCUQt/hFWQ06fAqf2vSXzMrCSJC u5thMH6pa8NgSpxnDfyszw6YNXtqzuu1x45txLWgSPE6NSzXRYu7vEYDJt7uZyjflim300 RW5T8HEHmt2wispvEbimCQvx/YFlHvQNxsFY/D10WiPGbAeiTSY0mUEjjw9rGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jCRt0RqzQxofSGaFHaZAd0xGEa3LEHIX4OEhtihoebI=; b=Na8cWrSRMprlNRlkW3lDahrxD4HTfHRwRY8e3v8DbLDEC2B9OnAuG3iLDq/mIR1hZMIXGq +1CGl1lc4MulwYOzXl2nD1BL2v0SA1n+nM3DdGlLx1envKOVhMUyjmYvHjFQ6M0gFPuIUP 5a3WJR2fRx/hK2eXpypSSle4uzne1DsmKpVVchNBdqlxPavyL+Mh1sxw0MAfYf6UaPzifX RBEHdqM89l+x4y5MVs7qh1YnzgJyHi5q126i41Q14lwKcc2h6kYRm8+SqOY4n5+qdNX6sS tw7MXlhac9BtjwS2Hbm+r3GzTJErxhIWtD1dhHmx4u8eXrxPo4IpE7JTB/Vc4w== 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 4VjPFK1TCKzNbj; Mon, 20 May 2024 04:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48bWC081200; Mon, 20 May 2024 04:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48boO081197; Mon, 20 May 2024 04:08:37 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:37 GMT Message-Id: <202405200408.44K48boO081197@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: f989ebd4dea2 - main - kboot: Use C99 initialiers for hostconsole. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f989ebd4dea2ad45f3dd491d86f821a524a0360f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f989ebd4dea2ad45f3dd491d86f821a524a0360f commit f989ebd4dea2ad45f3dd491d86f821a524a0360f Author: Warner Losh AuthorDate: 2024-05-19 20:47:20 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 kboot: Use C99 initialiers for hostconsole. Sponsored by: Netflix --- stand/kboot/kboot/hostcons.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/kboot/kboot/hostcons.c b/stand/kboot/kboot/hostcons.c index 114188adcff2..9c09a2721891 100644 --- a/stand/kboot/kboot/hostcons.c +++ b/stand/kboot/kboot/hostcons.c @@ -35,14 +35,13 @@ static int hostcons_getchar(void); static int hostcons_poll(void); struct console hostconsole = { - "host", - "Host Console", - 0, - hostcons_probe, - hostcons_init, - hostcons_putchar, - hostcons_getchar, - hostcons_poll, + .c_name = "host", + .c_desc = "Host Console", + .c_probe = hostcons_probe, + .c_init = hostcons_init, + .c_out = hostcons_putchar, + .c_in = hostcons_getchar, + .c_ready = hostcons_poll, }; static struct host_termios old_settings; From nobody Mon May 20 04:08:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFL4Vpgz5LhC3; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFL2sMXz4Cpm; Mon, 20 May 2024 04:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IB75wKn5wCg8i8ZcuRvahzM3svpEnCt89MPNYRtBmgQ=; b=kGE/dyGFtM5VKY1WOdsqkOflYv0VDMhZ16CabXcG2v6m/qXWEUmjwT7NM+8/NnjLrMwjGh KHBJs2xSC7zAyO1JbAf4EK6OKXKlA3bhXHWou0tFTAnJVNznnYbjBD6uJUBqGx2AqAE4wU owL9BNqUA0+/cH+HhQrccQ13kyt7JlNCWPfpEUEnCxBGjbKCih2MLKBYouRfz9xBho/kBV ewRsyMjaZCf/6PfcephTBrJELeCtkvkXFaOyCA+HaQlbVU12rU0a6Xu5T2QfqqnhOF3vS6 DM5N+eDCpwfH2j5wF76yVk5YzVcadujVZdDC/pEaBd4Uf3e/D3+fJovEmRCH5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178118; a=rsa-sha256; cv=none; b=A1J6f1YaOFuZizFl/Akr6s0kbfUeDTXXwfFnclITDFVxFt3DSVJmaf/BWnM3XkMnt8d5Fy hmEdDO1nrr4S7XneKrq9WM3A0F1HdgA0qeDZzAyfGYd9LYTNbMwnuuXDKtylz5B7jWup68 ouZjpuJOI7FrvMqjdMyI4gYbyyzo8xiwpSLG7eGSAXZV7jii7PBh9Qh63dwM+eGLQyZErg zW8eHFCLdqSz6965zpSa2n/Ms+MaauVihmEDz0VMUj23/KTllL7ik2JcfyQivm2DZI02Hf bxf+ZiHOlFmRat5/Pjf7hHblHJmpgpadQij315vyjTlQFdpqM550ioRFJmFtbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IB75wKn5wCg8i8ZcuRvahzM3svpEnCt89MPNYRtBmgQ=; b=wZ1Prii6ZAo0YJC5Q6MBuWdQSNv7Z1LwA3kggnDiJivx/2A/SEbAeIgg/p6wS5JkywX0wk 6wGmtFdU09XMZE872ry7gf/S2+T5m8SrXfj8YZg/cHw91inreHnJXM70dBplwhZi9uKM0h 6I52Ex9xV3Ig8NuAmvJUAFUDSTR0vtAlafQZa6dPGcjkWthFw/gDTcELtowiEpPIuAWwSO PDA5+mlZHhUqd4TOOjQ1Y9aLkFhp3geXMpy5ZxzSNS6e+rYZ6XSD/DBY2WvJqNJtCn9wQA 2LaEPln7XorNoMWvyekAprFIBNaQxUBTBcrBSKLoL4BQXIBnfv9XKSCRQMZAhQ== 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 4VjPFL2Rt4zNDd; Mon, 20 May 2024 04:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48cVK081245; Mon, 20 May 2024 04:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48cix081242; Mon, 20 May 2024 04:08:38 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:38 GMT Message-Id: <202405200408.44K48cix081242@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: a578e2b896d9 - main - boot/i386: Use C99 initializer for textvidc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a578e2b896d9e6803a830c99fb486fa60ceac33f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a578e2b896d9e6803a830c99fb486fa60ceac33f commit a578e2b896d9e6803a830c99fb486fa60ceac33f Author: Warner Losh AuthorDate: 2024-05-19 20:49:02 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 boot/i386: Use C99 initializer for textvidc Sponsored by: Netflix --- stand/i386/libi386/textvidc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/i386/libi386/textvidc.c b/stand/i386/libi386/textvidc.c index 4b79f9fc66b3..75d498930119 100644 --- a/stand/i386/libi386/textvidc.c +++ b/stand/i386/libi386/textvidc.c @@ -70,14 +70,13 @@ static int esc; struct console textvidc = { - "vidconsole", - "internal video/keyboard", - 0, - vidc_probe, - vidc_init, - vidc_putchar, - vidc_getchar, - vidc_ischar + .c_name = "vidconsole", + .c_desc = "internal video/keyboard", + .c_probe = vidc_probe, + .c_init = vidc_init, + .c_out = vidc_putchar, + .c_in = vidc_getchar, + .c_ready = vidc_ischar }; static void From nobody Mon May 20 04:08:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFM66sjz5LhC4; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFM4dCsz4Cm6; Mon, 20 May 2024 04:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cxGwQ3NDOc1b33h4wR5b76XwcoQRd869M8CrNIPAmFM=; b=bVW227U7qbbkeiBW3CXV0AnHk2Jr3wXoTxRxtHqThEmJD8eIEPi80ODulGRuCJq6KEWgH0 DnpM0xHjw5obrwYfVmdFaoYKha4R6OkBec6s/0euE1UCbqDrAPGTcye4gjFZ7MTNLU1QjQ fq+hwLSqCCyOEKjoq71hdogs3/H0uPRcvSu1H/2oKlypC56++8R2PugNMdnjFr3krNlM+Z M55ad4xrLztjp9dJBZB0F7nyWj1KJtXfnEBO8U0uF/FYv9L15DsIYTFPnxMate+dWKlE5N PbGnbrB7oMwp8ENA6R/EbPaDKVQY/+7VGyLM1aWCxTxKxiym6LNlj7sCQ6LIQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178119; a=rsa-sha256; cv=none; b=CZP8RylXzW2Iq7h2K50gUPYkxtSEn44C2b9rfzHlfK3deI9nrZsb0bZj0slOUnuqDZ5fCQ gpgiMHBUa1ZKQMlrNUqRit02rkk3RyGQPhfRItFCJbkZ67WOOq+AerG8RUlcQlcoCtCa23 e0nS3ktLl2V01yLhfvbi7/zuR0xpSgrDkGzYXURUkSIi/vQHUexVNcRlI/5bdYuBr1I7uL 4lz05vy4ucY8DnzHBfxgBM0W+Zq8fcw00u7PaBoQSxlcaJI4uKCgzqpWQT0pH6DGtQBABb 33nq6jHa6DZIi62U3VKWezrp8F7BLzPQkeOCNu5gYSCzMkQDfYl0wbE7ILSBQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cxGwQ3NDOc1b33h4wR5b76XwcoQRd869M8CrNIPAmFM=; b=y0Zsuduvaf13te0VtHMt9tmKYtRzT3A0YG5OmNPmGgMG7BAjN22eYAz73OC6QjFoXwafFs P2moflk7oc+Vr1PFcBPDe/4pAzPAqm7FSgabXqddzFKpQaG/blnK5OhqoLmG3YdHjPVLUi StkVQNlO8YfoPIi8XUF7XrjkSbhe4YZ5ROXp1f35Q+at2oIA9NhDsN6ScOP7TzmbHcYZgj muttNA9pVEv1SEfGuSS5sC92jg0Zk7+bVoGiZ9ZEfAPVLe+O/BTeVHdCyiwVU1BmMjWcBu AJh3+bCif2dwu2p6wVkFyWryrp+Z7V+4kIJEM+UN9QjziPZGjrKWOay5AsEUTg== 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 4VjPFM3PDNzNQ9; Mon, 20 May 2024 04:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48dM2081290; Mon, 20 May 2024 04:08:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48d9b081287; Mon, 20 May 2024 04:08:39 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:39 GMT Message-Id: <202405200408.44K48d9b081287@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: 803060b21799 - main - i386/spinconsole: Use C99 initializers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 803060b21799664ba2fd8d9d9890aaaf57421a5f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=803060b21799664ba2fd8d9d9890aaaf57421a5f commit 803060b21799664ba2fd8d9d9890aaaf57421a5f Author: Warner Losh AuthorDate: 2024-05-19 20:52:53 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 i386/spinconsole: Use C99 initializers Sponsored by: Netflix --- stand/i386/libi386/spinconsole.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/i386/libi386/spinconsole.c b/stand/i386/libi386/spinconsole.c index 156eaf35e1c0..67561ff03bbd 100644 --- a/stand/i386/libi386/spinconsole.c +++ b/stand/i386/libi386/spinconsole.c @@ -47,14 +47,13 @@ static int spinc_ischar(void); extern struct console *consoles[]; struct console spinconsole = { - "spinconsole", - "spin port", - 0, - spinc_probe, - spinc_init, - spinc_putchar, - spinc_getchar, - spinc_ischar + .c_name = "spinconsole", + .c_desc = "spin port", + .c_probe = spinc_probe, + .c_init = spinc_init, + .c_out = spinc_putchar, + .c_in = spinc_getchar, + .c_ready = spinc_ischar }; static struct console *parent = NULL; From nobody Mon May 20 04:08:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFN6jwfz5LhC6; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFN4p2Wz4D7X; Mon, 20 May 2024 04:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7Lt6AW6XxvT24Q38criV+t5CgRusaufBPoZASvhV+g=; b=p3HvNaEEH8y+LV04LqpqCgkKVr7NYSrPuPuES3XXpG6Glnz30XxOmILZ48s4aoxH+3jlBd N1oQGb2ZQKUKyg3iSkBV1yPmec32Ogc5eEiCIJ5+73YL3vMluuxwBAo7qY7LQ8nhBTWZYs n48mTUJkgtJUjb/toTKwaAhZMMNVHAdRCwNVuAfZ+LdRpnKaCQGX1K944PF+HaTW6qSmLs 0kUKte1PnIcCj70D68UKVsMeFz1d2h/rB5SkwbvIeaKMcZ6Bkyxik0CZJSTSc9IMj1PXhX IFoq/+pvsA52y0G0hJK6AicOFFUSxb6BTBOBrSrFlJoJ92DOIL+4ZlGfkz9KXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178120; a=rsa-sha256; cv=none; b=h5RdWKe4kmEfPGwZx8XjUVTZBjbfp6Mmsd6WlxYRHZYMFvGpsSqaSqvU/gzDS9zTDmTLSn mfdpo62TOqpKsoadp32TQel5SZZZcuA9gPUK27bhtSaiw6euue0g3YOm95V4KZoF4tb3rP pu1EjxGJoh9+MFhITJCdrlG9ODcpJBQNCB62SOzaGeJmWX+UMsO3/duy0LIufGhKwDqwZ9 hcFF6eo2WY77Cdi9yAy+5zE2IU0xnKcFhb9ACLVAwDUZ5jCBjqLo0bprmxesQl8l4QpHXn eybdDWZq36uNVD1E6/jBVoVugJVogr/h1u/ys/rN74pInMEQa7wVW8M7bCoKYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W7Lt6AW6XxvT24Q38criV+t5CgRusaufBPoZASvhV+g=; b=kEmGAw2W6VNx+oH7d27bvq0JV52bao/Yv7pD5iCg2yRYWygNdl67wv+4AI3LdeHJZWhcLX aEIf3OwPS82+tKPkiFKzQMVIRzuWFBTHghVDI7yU5B3GRAjEaU2mrM62D0CKBmVlXWofz6 BuJlfAhn1X3mdayeZC/Z6/JYderv7aSNJgHpfnykckOTL2U5IA55MkPr3vMZkZa/EPZrML ihypENHh6Zy8gofZLx1sbH9Me5Y0DRs71Y4fFXkDoXC3UFmUvCGhg5eEmxupNSHKwKPSWR OWAk2uPA3GxBOnXPMiod7UkqbPSc84mW9UD3935nmxkL0IYuL/SyXn1wixcT8Q== 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 4VjPFN4NVCzNQB; Mon, 20 May 2024 04:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48eTJ081330; Mon, 20 May 2024 04:08:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48evY081327; Mon, 20 May 2024 04:08:40 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:40 GMT Message-Id: <202405200408.44K48evY081327@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: 5e7b0cd93a95 - main - i386/nullconsole: Use C99 initializers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 5e7b0cd93a950033b1ab69f21a030ae39efc64f4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e7b0cd93a950033b1ab69f21a030ae39efc64f4 commit 5e7b0cd93a950033b1ab69f21a030ae39efc64f4 Author: Warner Losh AuthorDate: 2024-05-19 20:55:09 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 i386/nullconsole: Use C99 initializers Sponsored by: Netflix --- stand/i386/libi386/nullconsole.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/i386/libi386/nullconsole.c b/stand/i386/libi386/nullconsole.c index b4ffd3e30789..1cd6cd096f27 100644 --- a/stand/i386/libi386/nullconsole.c +++ b/stand/i386/libi386/nullconsole.c @@ -45,14 +45,13 @@ static int nullc_getchar(void); static int nullc_ischar(void); struct console nullconsole = { - "nullconsole", - "null port", - 0, - nullc_probe, - nullc_init, - nullc_putchar, - nullc_getchar, - nullc_ischar + .c_name = "nullconsole", + .c_desc = "null port", + .c_probe = nullc_probe, + .c_init = nullc_init, + .c_out = nullc_putchar, + .c_in = nullc_getchar, + .c_ready = nullc_ischar }; static void From nobody Mon May 20 04:08:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFP6cfXz5Lh8Z; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFP5Ggxz4D51; Mon, 20 May 2024 04:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YI9fhQR6/qyQBLhqWbT56TIMxcI7JL0xYNeNguy9u8=; b=CtKLKDXOrRVgejzubvysMg5amtHfGQCo+36T/6EB6w5Zsy0Sq6Gq6rEPDNTTLpOLXZALvW pAXxDi8d/oseaFNiX6Z8iwCg+cWjE6ldLQ1wnQZfxzMdbsY05BEAflpRQ4UXFgZ2VAuBpa YtH4Z/iN0AHu6dpbl4BSZXlxzhMtmUziNU621oOItuRWU5gfAm9hi+RJtvCosgX2ijHjZj RdecpfdAiwl/1mkYxXIupY8tPY9PnZM26+xBxZ7MIA2OVAozKcP8o8leatV7E8ZXl9uoio kmqQYHQhUJTfoaXjdsZf6nV9Xe5VldBkGRmz9DEBd0HICe4IBEG8NDo0Bx4lhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178121; a=rsa-sha256; cv=none; b=Wlj2K7+uXVdSYRz9LfNKvBBybTilH+Aq2ZHK248DHUH9yJFxEUcMBfT3l99hz7TrX5ZkyH KNTiw3NPwy9XWXcVVLSctzX97jVLTh9VQcRkjepZbv7krqvC29MtYcGuhvomy4EoqCgM+Y VqU9Z5mpWESoeHTJEV9kzvF2jbY0du6UJ0ofqS9eKx/euqm7EVWT2hnMQOtuBHVlSYnpW1 yr4Pdv7uNXA3wHfRdY6Z2qGGqsTigbPWwrti/PghdRwlvMVoxa6++LSHfCuc/6W2yCYla2 /drk/p0s99QJ8M0OWX7ef0xYDtv9dmsYJcaroOBc4Tgax+f4l1RszPjcXXB/Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1YI9fhQR6/qyQBLhqWbT56TIMxcI7JL0xYNeNguy9u8=; b=tifIQ9rOqH0bYegdMS6aJDUigIXedHtk3y2fZ7QMAtEE7rpb4qPF/L28acrlTwps9Ugfp6 h3qjLAe62ObmRvhmomr1GNvN8BBGzCjSuP4/cFVfQjG2bQIQB3cK33XEVN8nmpFzkWhOh/ N/4JcG9hW0SkhPWN4JrWgvUc/+aro/TFFuSRdAIOGZzQs1+DJZG7KRolKwfpXJErXF3+QG OqOBXm6A1LhRFcO0MFhRJfK6wJgWlvFovAhY1hHnXXf7iCHuKcpWsmr4IlkykF58J/eyNI e4BG3Heuuav9/O/8n1DMri6KKiFwD7k2M+kFNQzVKZrNTJ8rK0SbmLHNP5AUQQ== 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 4VjPFP4vDgzNMl; Mon, 20 May 2024 04:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48fXn081370; Mon, 20 May 2024 04:08:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48fVX081367; Mon, 20 May 2024 04:08:41 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:41 GMT Message-Id: <202405200408.44K48fVX081367@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: b3551da9cd3d - main - efi_console: Use c99 initializers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b3551da9cd3dacbc7242c3be6fefe234784645fe Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b3551da9cd3dacbc7242c3be6fefe234784645fe commit b3551da9cd3dacbc7242c3be6fefe234784645fe Author: Warner Losh AuthorDate: 2024-05-19 20:57:16 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 efi_console: Use c99 initializers Sponsored by: Netflix --- stand/efi/libefi/efi_console.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 4a3219ef3017..2e28cf1ec460 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -126,14 +126,14 @@ int efi_cons_poll(void); static void cons_draw_frame(teken_attr_t *); struct console efi_console = { - "efi", - "EFI console", - C_WIDEOUT, - efi_cons_probe, - efi_cons_init, - efi_cons_putchar, - efi_cons_getchar, - efi_cons_poll + .c_name = "efi", + .c_desc = "EFI console", + .c_flags = C_WIDEOUT, + .c_probe = efi_cons_probe, + .c_init = efi_cons_init, + .c_out = efi_cons_putchar, + .c_in = efi_cons_getchar, + .c_ready = efi_cons_poll }; /* From nobody Mon May 20 04:08:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFR1wwpz5LhKr; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFQ6BbPz4Cvc; Mon, 20 May 2024 04:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILhPSXsJR8HntEiAU9UnS80b150kq8JOdGAkqRRBFqM=; b=dibIHPbnkY2pRM7cpz1BaEzuxrUqi2zfEdkGPkwtd+oowY6zeAJdRIc8e3v7GgwRBHa+xh +oH3cT6LdbS/NorPh2n3TTjaC6Jd//y3ZKfKqiaUuL83V1Trilbrex/GNGD1kl3EOjzKyo RXUrNJpSyE5KriF6GqXN916uGb4+W2pl14H6EIGX4fuSxuoAky2vRIvL+WxYjYBs50vibw jFMZXkJ2jUICfTFDLVF6seaoHd9z3BbC3o0htMIfGhWlTDsjfdWFeFKeyXCH4HmhgqpmkH 6qRUGVxLYXyOBaLvq0nM671Zc+t9fmNRr1DRYK/Es6Fi7qA2vRJQcOKt1TAncw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178122; a=rsa-sha256; cv=none; b=F8+HYkjR5UTgWEFKkmUN8p3oM7YGBqpNmcIndLvIWW2QnYt8vy1a1+/MuQNzYfKkSBKrvV /dX1pSjvscN2aZWd1xyzQnZoNUe59Y/Rw2vOl6fmITaPV/l+6f2dvBjGmNhdClUZw0ek+D h6U7WAk5QoiP1AnzT65Y5v8hV1ZPpaif5/vqo8IlAV/Zm8lZezNhVL2HG64gXi8MVzSOjt 8/0Xut5GXKEJfQRKNCEL/B3fn8Sk0Nzg9ini4ZH8VFzEn3J4YKHLZp421jcki9v3J1LH5b MkJ8FLxz2EEwUpKejRahlGo6md72VsF5C/pnBiOmW/7spTZStwBNkYAZotN11g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILhPSXsJR8HntEiAU9UnS80b150kq8JOdGAkqRRBFqM=; b=tibo8IsOkcozMEwrEHyY8YoDlxZgdp98XTIliBFPEFRuOuOAp6q5F3t5rOddKfPJHWDxX5 YH+s5AMlS66SOYIIH00SOhl7o8eRB5gn39Ibi3igNwQs8tw3v2197ywU+gj7eP3voYh6GM 06QSHuvDz0GslY8IANclDoEPWp1xD1t9y3cWgiUlGd2qK8fwSz4D7E6YX22LplZQfXzjHm sh9fQVAG7JRshqv5k3X27APaNdu/JVJqPJSg5O/K/4ysF2Y9ljKSnHrdpHNy4/xcjv/e5r 2XWqN98rSj2yhWx8KATPaJWKFxqSj07BNs32Yq8fh5qbWE7cS02/1l0dh7et0Q== 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 4VjPFQ5m14zNbk; Mon, 20 May 2024 04:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48ggi081421; Mon, 20 May 2024 04:08:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48gFK081418; Mon, 20 May 2024 04:08:42 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:42 GMT Message-Id: <202405200408.44K48gFK081418@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: 6e28b4aa15e0 - main - uboot: Use c99 initializers for the console struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6e28b4aa15e057f59c0e022094c3f82f3062c2a3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6e28b4aa15e057f59c0e022094c3f82f3062c2a3 commit 6e28b4aa15e057f59c0e022094c3f82f3062c2a3 Author: Warner Losh AuthorDate: 2024-05-19 20:58:42 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 uboot: Use c99 initializers for the console struct Sponsored by: Netflix --- stand/uboot/uboot_console.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/uboot/uboot_console.c b/stand/uboot/uboot_console.c index 60d6ccaf4417..c02ba9aba5f0 100644 --- a/stand/uboot/uboot_console.c +++ b/stand/uboot/uboot_console.c @@ -37,14 +37,13 @@ static int uboot_cons_getchar(void); static int uboot_cons_poll(void); struct console uboot_console = { - "uboot", - "U-Boot console", - 0, - uboot_cons_probe, - uboot_cons_init, - uboot_cons_putchar, - uboot_cons_getchar, - uboot_cons_poll, + .c_name = "uboot", + .c_desc = "U-Boot console", + .c_probe = uboot_cons_probe, + .c_init = uboot_cons_init, + .c_out = uboot_cons_putchar, + .c_int = uboot_cons_getchar, + .c_ready = uboot_cons_poll, }; static void From nobody Mon May 20 04:08:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFS339dz5LhG9; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFS04jQz4D3D; Mon, 20 May 2024 04:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uc0Pt8qa55POHJ0XaeRuGN1caRpnp5fg8eWNhb+VuUE=; b=rArzXegibMGRE0rGPvLF2d/aP/yvukbp53umaJNoEmzh7RwkF2n2zyDR2M44ZIMHwE5emX 2fQv2cS03NI3ayQ9XMX/4S6fobI6CctPM/54bGUOwZ/UoPl4bZe+d+TIWYoQaMuab0beSt 0Nt24UmenzUf3tN69BVrYOfVl1e7zDxcz0gaEJjHwsIy1mAr7wTU8VqrWPRZ7JvmjQKS0h YsiRMLRC4osPMQLC+MfFnqdT0eS/jKEaBypGfIKh8zkSL3THPZdhMs/fDkKkiVWCYMgSTv erLjR7tYZ7uWeJlEF2iNcHqKL4zEnQSl9KJ16tL9oBhvED66pBLZgffO0s71NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178124; a=rsa-sha256; cv=none; b=O5IcKDZYr0mR9aQwFvkobLhipCRt3WfN9PvocJop31nQl4zNTlixTtci8zF2XRaTbz1DZa aaeOKD7HKJ9ch32rl+SOsJx3avf8Y9JB37cgPSnE595ZKcWKc+MSSbeC+62gYN1/tGQQGP q6zGZK/AfjBloRUD2LZiTk6JVmce6L4WZfAyzG7Opc3sKL6YR2J9tqsrgRfwzY+sJnf0XZ CVG4CbAbAAsyN1pxIL94BxFHT5KXT7zxjMlFJkQSF8IirOllU3hhk+KBy1NlTBJDmvLwcj OV3CGZ+m18HQS7oMkwpz7FLQfPHw+LfbSL3yw6Ke+rxEeaXggnSc0fkGlEpW3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uc0Pt8qa55POHJ0XaeRuGN1caRpnp5fg8eWNhb+VuUE=; b=uqf98fDP/iz974/XI8990tahATRNr12ENC5qGaC5FS0ndw8v255BybFmWFQ+zG59tIEpkw rpCv1cDS9U+qQy3otVjB5T/+lkjgenKVQG0kAygp0KSq7MQ2SZmasE+3+JU4gCJjmcEOAv YVbue/b2JS0oAHCDlUj8470/thYm+p6q+Os4v/5UHPhvBEpRkIn8bGDpHhyurcDuYeodvb uiOd4rHPlMw/gHsJkDBuJYrrKuKpzjzL06pEizNMf4bZkNmIpHKE3K2knlFGENHX8dLkJn vkapOgkhvgHtAG9YmojN/+Y/rqN15WxBimjYgNmLBRksCG2TS3M4ppgl8eyOPg== 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 4VjPFR6nnTzNHK; Mon, 20 May 2024 04:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48hxa081476; Mon, 20 May 2024 04:08:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48hA6081473; Mon, 20 May 2024 04:08:43 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:43 GMT Message-Id: <202405200408.44K48hA6081473@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: 1f180d0a404a - main - ofw: Use C99 initializers for the console struct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1f180d0a404a700889e40a91bbe21c20f310da4a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1f180d0a404a700889e40a91bbe21c20f310da4a commit 1f180d0a404a700889e40a91bbe21c20f310da4a Author: Warner Losh AuthorDate: 2024-05-19 21:01:23 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 ofw: Use C99 initializers for the console struct Sponsored by: Netflix --- stand/libofw/ofw_console.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index b0ead0aba198..4fbd43d3f612 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -41,14 +41,13 @@ static ihandle_t stdin; static ihandle_t stdout; struct console ofwconsole = { - "ofw", - "Open Firmware console", - 0, - ofw_cons_probe, - ofw_cons_init, - ofw_cons_putchar, - ofw_cons_getchar, - ofw_cons_poll, + .c_cname = "ofw", + .c_desc = "Open Firmware console", + .c_probe = ofw_cons_probe, + .c_init = ofw_cons_init, + .c_out = ofw_cons_putchar, + .c_in = ofw_cons_getchar, + .c_ready = ofw_cons_poll, }; static void From nobody Mon May 20 04:08:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFT2gh9z5LhND; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFT0XwMz4D3V; Mon, 20 May 2024 04:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8K4Ku9XrLPieB5Dgii060+Pb9U8F1RJqMhtD2z5CCA=; b=r1/1Vm3H02n8d2hlf70YVorYFboirN9iw+xGQzKtWODYZNQnUxtOsRsklDGeMRlRnDLqKk NswOYyQnOj1ne0At4et6Jfs+icOszyx/kdxBHhZ0I0VrJqD5+CXOTuXBUHbMjpu5GOjAlM nzLsFqEekZTBYS1dD7NrUIneLI8OtgOA7ivFYuV06eNoN3NifxESG+R/djTeIWLiSz9z59 d+2BBFOXRZxuOlwdr9gFdTeJZo9sKsKlIb3skdalwdAFN2x0iMoBrUWY8DZQn+R+Kq/LJY rf+HbSar6097mf2XpXIE2aaMdNTdVhs1lqIfCxYoz+5RDYTB8O9ds9+x7muM1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178125; a=rsa-sha256; cv=none; b=u9zYyQUmeQi8JmBPVErda/AgNm0FD/GZpATO7s5rB0WfrM8FHA48zaUj1dXMS7JYgXzS4a ZmqhVhRMdcy0NHxy2sP8dkEHA5aj8ZIJ/pUMf0+SRCwO/G2bFWsLnxeUHIGz2dm/ISswqd EmySauvGiZ8V87tM5pQqbPNRSqGcDyT3u6BENZcf+2Mq/ET0HTQIIztngusdGrldVYJdfz SGU+7u2cQJPVxco7I4dMYBdfg699Paldk0dLsgEyXVs58ysrxG1RV+Aboh+aST1x7CkCgi lXobc2R5EOVocCj76zCz6IByr63kFfZ/QdRws9tQShhYs0Wy/rSjymWDEQP8mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8K4Ku9XrLPieB5Dgii060+Pb9U8F1RJqMhtD2z5CCA=; b=uxJMAiSXsUq0dwip8CA7Y9lFf4dstmAV6s2Tf3E+KVZRMkEuAYSBS+4jpnPGBiG1dq5iu6 TyYKDlPu9vZdc2DWXgZ1MU/VZ3KHnXRnyda1Tm+0j2Q2c9qFLQoWsuX6S8EcLILj7vfTsH n3x+h+PATHHYMnjwwGUGvRGZcQCF3fBGRTSWzfBtmZ+mHIAlsDkASZ8qVC5VURTSp1DKop 5SMs7V94qkj5LZXConO/OBMlL8aL0g8Dhp92287rn/apUTYO+XjurDKRxrcU71tuQLuPfJ 6RrEiwGMeY+93/NGnMohLJ7m5+A4S2ww7ESCiAiRqIGRPU7EdfCjQSoBkHIquw== 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 4VjPFT08d9zNK4; Mon, 20 May 2024 04:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48iFW081538; Mon, 20 May 2024 04:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48i8Z081535; Mon, 20 May 2024 04:08:44 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:44 GMT Message-Id: <202405200408.44K48i8Z081535@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: 125b181674e8 - main - userboot: Use C99 Initializers for each of the consoles here List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 125b181674e894baebfe463ed097305329427a2e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=125b181674e894baebfe463ed097305329427a2e commit 125b181674e894baebfe463ed097305329427a2e Author: Warner Losh AuthorDate: 2024-05-19 21:03:34 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 userboot: Use C99 Initializers for each of the consoles here Sponsored by: Netflix --- stand/userboot/userboot/userboot_cons.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/stand/userboot/userboot/userboot_cons.c b/stand/userboot/userboot/userboot_cons.c index a905f1397232..26c89dc2a37e 100644 --- a/stand/userboot/userboot/userboot_cons.c +++ b/stand/userboot/userboot/userboot_cons.c @@ -42,14 +42,13 @@ static int userboot_cons_getchar(void); static int userboot_cons_poll(void); struct console userboot_console = { - "userboot", - "userboot", - 0, - userboot_cons_probe, - userboot_cons_init, - userboot_cons_putchar, - userboot_cons_getchar, - userboot_cons_poll, + .c_name = "userboot", + .c_desc = "userboot", + .c_probe = userboot_cons_probe, + .c_init = userboot_cons_init, + .c_out = userboot_cons_putchar, + .c_in = userboot_cons_getchar, + .c_ready = userboot_cons_poll, }; /* @@ -57,14 +56,13 @@ struct console userboot_console = { * console to comconsole without resulting in an error */ struct console userboot_comconsole = { - "comconsole", - "comconsole", - 0, - userboot_comcons_probe, - userboot_comcons_init, - userboot_cons_putchar, - userboot_cons_getchar, - userboot_cons_poll, + .c_name = "comconsole", + .c_desc = "comconsole", + .c_probe = userboot_comcons_probe, + .c_init = userboot_comcons_init, + .c_out = userboot_cons_putchar, + .c_in = userboot_cons_getchar, + .c_ready = userboot_cons_poll, }; static void From nobody Mon May 20 04:08:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFV4cvzz5LhTF; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFV201Yz4DBw; Mon, 20 May 2024 04: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=1716178126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3kNsEMVhlDlDBdLpeFp4cluhMZp8tBgGZBSBWDZcBg=; b=bIj0mYV37o4dR+A3BKc5HFgeu8AiaRs6om+BU8JJhMmuuAJTgZcIoh03EHVY/4uuGFkVI3 b+jLrsKkon8WSjsmqUywLnMPjQ1qaHnz/KCXwtYxP/eQ2Du/b17zdzqgsPFY9B237i/BT5 nYw+kNZQ+BNdlBxvZq0/q8rQO5/bnU0F3W0w++KM6fjf18v4UtaauTSGkShXFf87Sn+Lbj VfeUsQtlqPtleKI/qyfTZG8g9yCeQy3yjkPIpD6UlHHH2gKfFIc2DwfYlAye376WTrf1Hv bDYh8shggS34UMACEhP4ZPro9HARzTstNLaLswtDezCSxQgsPhyzdSDFPeRogQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178126; a=rsa-sha256; cv=none; b=uiOAjPdnxd6/wzhLPt62PxF6sIcdtuPzt5iTWGiRB52zniv02a016Xts2LVP+fQWlWTY29 x7h2edC+6sWc8I31SokG5rz7hOIR6D09HDOriP1mSqWsyiujWvePSZIO0atuCZl+N/LKHN Qj3hribWD3Pt25BMDqCZ4dJCHaPYz6JDFJ1cjRwhYrcvwmeYsvaynLZ/J68r+BqYKlz8aY lo7lsFJGGAWia4w2092uCl2GWnao6gG28swgWiMFccWezDB1yvOFr30qI/tud6WEBFaZ2S tePiireZgSE1s5cRSV/ryEFT+kM8MT/XXKy+xdhAcBGy6K3Zzyxo2Y5j80azOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3kNsEMVhlDlDBdLpeFp4cluhMZp8tBgGZBSBWDZcBg=; b=fAtWRFbFRVen3yrtKJBBNnxL+Hp+tM4V3E50Ek1L49MgJlaBESKz3hWyZRTWlBUlbIrjNh YKOsRkoMgC6WzU+XAYAG1u6E8pyQJI/PYRThFER8tezJwb2bqocpIs1DWY8CrdQGz4U+nK S0PpFKzJ2JXbXHAB0a80jTuJ/8jv9NHY4R+RcDu48QdzzXHj6et6kErXgg7ne2+yFlD2l1 X6jL7OJEOHpJhfhqgFG3wFfnDUboVsXaXWF6FgNk7wKQaNVZgurAiUF9fwrsKwjWYR+IHs Fgcppi634mi5Chos/6+epjL4cukRMIqJSbjy3qWRsYrb8ibXAr0ODU8qWZC9+Q== 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 4VjPFV1QWCzNHL; Mon, 20 May 2024 04:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48kTa081585; Mon, 20 May 2024 04:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48k6Z081582; Mon, 20 May 2024 04:08:46 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:46 GMT Message-Id: <202405200408.44K48k6Z081582@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: 2d425b634f74 - main - loader: c_init returns 0 or 1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2d425b634f742ca7a803ab678ad9226607335161 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2d425b634f742ca7a803ab678ad9226607335161 commit 2d425b634f742ca7a803ab678ad9226607335161 Author: Warner Losh AuthorDate: 2024-05-19 21:08:40 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:42 +0000 loader: c_init returns 0 or 1 c_init returns 0 (success) or 1 (failure). Don't return other values. Sponsored by: Netflix --- stand/efi/libefi/eficom.c | 4 ++-- stand/i386/libi386/comconsole.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/efi/libefi/eficom.c b/stand/efi/libefi/eficom.c index d5f3f07e083f..f1ce14eb50f8 100644 --- a/stand/efi/libefi/eficom.c +++ b/stand/efi/libefi/eficom.c @@ -390,10 +390,10 @@ static int comc_init(int arg __unused) { if (comc_setup()) - return (CMD_OK); + return (0); eficom.c_flags &= ~(C_ACTIVEIN | C_ACTIVEOUT); - return (CMD_ERROR); + return (1); } static void diff --git a/stand/i386/libi386/comconsole.c b/stand/i386/libi386/comconsole.c index b2d48b13a9f4..dc6bbcfe9806 100644 --- a/stand/i386/libi386/comconsole.c +++ b/stand/i386/libi386/comconsole.c @@ -140,8 +140,8 @@ comc_init(int arg) if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) == (C_PRESENTIN | C_PRESENTOUT)) - return (CMD_OK); - return (CMD_ERROR); + return (0); + return (1); } static void From nobody Mon May 20 04:08:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFX0YMNz5LhQt; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFW2v64z4D63; Mon, 20 May 2024 04:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwblnS7F/nEEoMuovJKB4U/hj5XUnpUOJCK0OJzDi54=; b=LUgjCPJF+CQBjeN0ZG51QpsnaqiMafuZ6T3iwnXlIAG0KwK7p30OSG1mGvLFvFACev7FN5 AxIiJSuizKo3mQzbkaXkbTbSZ4qD3GfR9b3d+0DZyY/v0F0vFnmI3YhleE6qx2YiLwX3jQ 3aNkBDvi/1osxUj92+YCsWTlIhyj8DJmhbvVkXkHF+7YP/bwjt0HTC13pBHDoTOAoAZR8i JKVt+/TLDqQUnk8L/wvcpAD9DAwB/ZLc8qw4FgX5qaIaEYxZMKnbKds0Bp011RkCd+KeRn WoViYm0zx7gJt75Kiapu/56ctkCCYovkasAsp1MKL7wo4a03Us4G5a8LnUNigw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178127; a=rsa-sha256; cv=none; b=cIaE/y257a6WfHDoMAs+o2c2dwhP7PbHyLwYDenrP/k3W5kzUMv8qVsdXGgyTr9SZtr2DP u616hU8tPQnn/jOd1SLqM0oCO/VomNBLpO/8PYFvV/868BrLM+eorZ8hMo5Rz3FTQjMD0B RGKkcgml9mR5O02NqGoI6YUteM4+jO6u28pBWTITxjnuo2zWFsWi3YsFOtl1pe/zqKDx3n witbOUdP5Wg8ESvZKjLUaTovqKVqd+r1LeVNV09JdGnHlkhfxphslHPcDgYLnICtguqsUX eSnKGnV5HBDwCNCMIw6689wBvnAdcHW60+lOkgtmFQAZ+5issQ7YBOrQGv+vQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwblnS7F/nEEoMuovJKB4U/hj5XUnpUOJCK0OJzDi54=; b=avGWk+6HEvRRxPzhEkwnpr8SDzytsYiK5dF0KRYkYm2lsmkdFpOrf1TCsERjdTGu5GMwGz 0bSUCOqaaxHcRR7kR56GIIAEyNaJ2fAVBW+3T9xSEgqkW5RxFy5s3c6TOFQl7Rn8QfXrTw S9EnWzMRER5SkKq0me2hrF/ZsqvrSYAXJB684Gx+avaWA0cV1Xx3iRImgSaomYHNdxnVxT E013rorbHqhn5sdcDJ9PbsYEDzC3bun2TpfopS4lDZLovSdjJfmptNjgkhB5REW6NtgBli v9XPxy6KeqgTODC5gOyFNnAHkoma0CBKf61rZ4wxZseHWJXfuZiSeMGQuGTE/w== 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 4VjPFW2TjBzNB8; Mon, 20 May 2024 04:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48lZI081643; Mon, 20 May 2024 04:08:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48lL8081640; Mon, 20 May 2024 04:08:47 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:47 GMT Message-Id: <202405200408.44K48lL8081640@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: 3f012b9508c8 - main - loader: stlye(9) nit: Space between return and the value List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 3f012b9508c8a4d7874f114e76ebccd80c78e890 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f012b9508c8a4d7874f114e76ebccd80c78e890 commit 3f012b9508c8a4d7874f114e76ebccd80c78e890 Author: Warner Losh AuthorDate: 2024-05-19 21:10:32 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:43 +0000 loader: stlye(9) nit: Space between return and the value Sponsored by: Netflix --- stand/i386/libi386/nullconsole.c | 6 +++--- stand/i386/libi386/spinconsole.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stand/i386/libi386/nullconsole.c b/stand/i386/libi386/nullconsole.c index 1cd6cd096f27..2878512071ad 100644 --- a/stand/i386/libi386/nullconsole.c +++ b/stand/i386/libi386/nullconsole.c @@ -63,7 +63,7 @@ nullc_probe(struct console *cp) static int nullc_init(int arg) { - return(0); + return (0); } static void @@ -74,11 +74,11 @@ nullc_putchar(int c) static int nullc_getchar(void) { - return(-1); + return (-1); } static int nullc_ischar(void) { - return(0); + return (0); } diff --git a/stand/i386/libi386/spinconsole.c b/stand/i386/libi386/spinconsole.c index 67561ff03bbd..d4c22bdbb1c3 100644 --- a/stand/i386/libi386/spinconsole.c +++ b/stand/i386/libi386/spinconsole.c @@ -71,7 +71,7 @@ static int spinc_init(int arg) { - return(parent->c_init(arg)); + return (parent->c_init(arg)); } static void @@ -97,12 +97,12 @@ static int spinc_getchar(void) { - return(-1); + return (-1); } static int spinc_ischar(void) { - return(0); + return (0); } From nobody Mon May 20 04:08:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFX5B2qz5LhL9; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFX3jSGz4D1X; Mon, 20 May 2024 04:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yybiQK/VyqCQH/q2XhClgotq42C2VULSofqOayRiHDU=; b=ussRVE7D1HYwbnXjNR3Y/aXKhbXhv5tNBi6Lpw3Z8ALv4Ozb/coJIbWy69d7Ba8rQHc4Mm ymqb4YeFWEmXV8+vlVGLXoXOlHF2bvzsDVSEw4LG/AcNjHw8K5qBBo/IjKNzGWBvQ6ypF3 /BEu9NUBcpy6zThfUpqTNUpkt4BfU0DWJHVVcn5plqP/u0dKvYxScZjQpgLpFWHqR53r/n zZhnYD+tlQSnjBpc6bI5GNy+fWAyktoQLvkdU0NP0aQlW1KVWNWRaIrYS1xLTJ667d3Ll1 R3rWbtczHCvqn9fevBBlCxvSzkFhsXw3bzOEbd6Ypu0StDdYg0n7ALim8r1DQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178128; a=rsa-sha256; cv=none; b=cZG4LCO8Zp4XpP9/cSbHE7whGO0/oMupggzc4fcJYyTEHtO1P2mTilC14vmlF4o/BCKKUn 7K+oT4+wRAQoQTIKw2Sx3g7mamZqouub+JQL5gqEWuI6deJ14PNBsS+3ExJPznZF8dqa9O PUi+vvY09yMS8Uv8PlloksKRXEfL/VD/aJ/10Ay+kEeCVjzsipJPsxWtHTaIAmIRRjcbOz jarHWsu/IC2HNO3lk/q8sURxhjueD6MTBR/a1DckNCditP+7fRwEk8wLYnSbSMi+1wsaDa NOJXC081ozR1w/hKGCz+9ANegPev2xIg2N2kGUq10Kwnx25wceBtboTCExtSlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yybiQK/VyqCQH/q2XhClgotq42C2VULSofqOayRiHDU=; b=VOLIpvpLvfcxcBF7KwEMjwseK6ES527qfUCMMdyWFJ7nRBrg8G963tvjR+uC7FkrD4ce0A uHIxZ0mLTKY0RaIgR2cgakIbj33SbqAHZ5GiWcuHckp9Cse7tJxMOeLAMA0nGABvY1qXI2 QnlLQzdW3u3/gqJjPPGDmXPSKSwgo9qBcXAJrkxSalKUESvsu26YQZg3DP6y0pVx15Hemu 5p5hvuOsva7sFkrSHF+uvDrDXlulqrUltALh2paOdsCLv3oD+HC/gY/fDMtRT+eUftB2CH C1wa6xyG01S+5htIWpUcOBL0mvmc341R0Z2WKYq07JAnxuNmhBB+g2mDlIH73A== 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 4VjPFX3K9VzNDf; Mon, 20 May 2024 04:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48mSF081690; Mon, 20 May 2024 04:08:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48mqg081687; Mon, 20 May 2024 04:08:48 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:48 GMT Message-Id: <202405200408.44K48mqg081687@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: 4cddd20e1ea8 - main - loader/ofw: Style(9) pass over return statements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4cddd20e1ea8b9c622c72edfad3e64f70e9d56a9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4cddd20e1ea8b9c622c72edfad3e64f70e9d56a9 commit 4cddd20e1ea8b9c622c72edfad3e64f70e9d56a9 Author: Warner Losh AuthorDate: 2024-05-19 21:14:43 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:43 +0000 loader/ofw: Style(9) pass over return statements Make these consistent. Some files weren't even consistent with themselves. Make them all either return ( ); or return; Sponsored by: Netflix --- stand/libofw/devicename.c | 4 ++-- stand/libofw/ofw_console.c | 10 +++++----- stand/libofw/ofw_copy.c | 8 ++++---- stand/libofw/ofw_module.c | 2 +- stand/libofw/ofw_net.c | 12 ++++++------ stand/libofw/ofw_time.c | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/stand/libofw/devicename.c b/stand/libofw/devicename.c index 5e3a789c13db..f6419632c6bc 100644 --- a/stand/libofw/devicename.c +++ b/stand/libofw/devicename.c @@ -101,12 +101,12 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path idev = malloc(sizeof(struct ofw_devdesc)); if (idev == NULL) { printf("ofw_parsedev: malloc failed\n"); - return ENOMEM; + return (ENOMEM); }; strlcpy(idev->d_path, devspec, min(rem_path - devspec + 1, sizeof(idev->d_path))); *dev = &idev->dd; if (path != NULL) *path = rem_path; - return 0; + return (0); } diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index 4fbd43d3f612..75f9bfba0968 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -62,7 +62,7 @@ ofw_cons_probe(struct console *cp) static int ofw_cons_init(int arg) { - return 0; + return (0); } void @@ -90,7 +90,7 @@ ofw_cons_getchar(void) if (saved_char != -1) { l = saved_char; saved_char = -1; - return l; + return (l); } /* At least since version 4.0.0, QEMU became bug-compatible @@ -109,12 +109,12 @@ ofw_cons_poll(void) unsigned char ch; if (saved_char != -1) - return 1; + return (1); if (OF_read(stdin, &ch, 1) > 0) { saved_char = ch; - return 1; + return (1); } - return 0; + return (0); } diff --git a/stand/libofw/ofw_copy.c b/stand/libofw/ofw_copy.c index b855a5b41d96..17a46fe4e480 100644 --- a/stand/libofw/ofw_copy.c +++ b/stand/libofw/ofw_copy.c @@ -119,14 +119,14 @@ ofw_copyin(const void *src, vm_offset_t dest, const size_t len) } bcopy(src, (void *)dest, len); - return(len); + return (len); } ssize_t ofw_copyout(const vm_offset_t src, void *dest, const size_t len) { bcopy((void *)src, dest, len); - return(len); + return (len); } ssize_t @@ -143,7 +143,7 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len) buf = malloc(chunk); if (buf == NULL) { printf("ofw_readin: buf malloc failed\n"); - return(0); + return (0); } if (ofw_mapmem(dest, len)) { @@ -166,5 +166,5 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len) } free(buf); - return(len - resid); + return (len - resid); } diff --git a/stand/libofw/ofw_module.c b/stand/libofw/ofw_module.c index 8d56f6debbb6..4c1fe9cd279d 100644 --- a/stand/libofw/ofw_module.c +++ b/stand/libofw/ofw_module.c @@ -42,5 +42,5 @@ int ofw_autoload(void) { /* XXX Call some machdep autoload routine? */ - return(0); + return (0); } diff --git a/stand/libofw/ofw_net.c b/stand/libofw/ofw_net.c index b4bcb7a00fe2..3418216a9836 100644 --- a/stand/libofw/ofw_net.c +++ b/stand/libofw/ofw_net.c @@ -80,13 +80,13 @@ static void *dmabuf; static int ofwn_match(struct netif *nif, void *machdep_hint) { - return 1; + return (1); } static int ofwn_probe(struct netif *nif, void *machdep_hint) { - return 0; + return (0); } static ssize_t @@ -123,7 +123,7 @@ ofwn_put(struct iodesc *desc, void *pkt, size_t len) printf("netif_put: OF_write returned %d\n", rv); #endif - return rv; + return (rv); } static ssize_t @@ -256,13 +256,13 @@ ofwn_getunit(const char *path) for (i = 0; i < nofwninfo; i++) { printf(">>> test =\t%s\n", ofwninfo[i].ofwn_path); if (strcmp(path, ofwninfo[i].ofwn_path) == 0) - return i; + return (i); if (strcmp(newpath, ofwninfo[i].ofwn_path) == 0) - return i; + return (i); } - return -1; + return (-1); } #endif diff --git a/stand/libofw/ofw_time.c b/stand/libofw/ofw_time.c index c2da603bb52e..48372428ae29 100644 --- a/stand/libofw/ofw_time.c +++ b/stand/libofw/ofw_time.c @@ -35,7 +35,7 @@ time(time_t *tloc) secs = OF_milliseconds() / 1000; if (tloc) *tloc = secs; - return secs; + return (secs); } time_t @@ -43,7 +43,7 @@ getsecs(void) { time_t n = 0; time(&n); - return n; + return (n); } void From nobody Mon May 20 04:08:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFZ092jz5LhQx; Mon, 20 May 2024 04:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFY4PBgz4D6L; Mon, 20 May 2024 04:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXTGZsUyL6UQIRWta+luiDoqz38a+V9p/xUveJlm+z0=; b=rPHpcGl1Ps8wKX/Yu/G2fD7E+FPFtWiX584tlp+M9EbZpAzgS4SEJOTeN0A1J3gr6O4mJ8 F5ywiffXYJfZDQ6AN2rclXwo/NyZW9IeQws0AlAPFDx3y+Al0JbbH3HWWla45jE23XVv2t KfiBZf3zpeaD9bv6QMxdgfA1HP1iQr2ve8OAfnznLSsNLJ3HkW7SlWl8urKBSk6og+GfkN 8SRFhPcOrvy5zSrgWgkMyZgQ6m552RE+lCmZkXCLcowoGkdnBa2UX6OA3cuUxCU80TD1AK 1oaLIlyiJyajGrMxJWMne4wml33m2riOSYlFGE6lasAQpRy/K+aoT5hRqFQXLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178129; a=rsa-sha256; cv=none; b=q5gIs/gI+yj22rHHNa8Fm5+wjfERvP/EJ/A9XySD+MpcP2jqRKSig8QBmJrlC2xtLL+6Iw BQq6mN1T/mn4h0u6cG9T5p/9wAIfz3qCeG5tyrbKT1DB4IeW+spMCwPKUtJ0UOS2r4odjb g2Uvdp7+EZJjgESaYc+kWETLT3gQhUBEdW3ERYMsiXCH8pxyAEnmD7Atev8ZSGSD4Z69Mq 2uBGneGOM5w4TAO/UPeS65qYOlg2/1OKx24iIzfHmcdkx0u0xCJOcsVy+ch1DalipN7Qki S5btbnfaDwM7fc1jHaKv9Jl5nR1Qjz0Y6xJUft/x9xtLo6Pa1PhiZR6gZG6GUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXTGZsUyL6UQIRWta+luiDoqz38a+V9p/xUveJlm+z0=; b=CobJfdheyn9k9/rPRO2SQHXY+1AggkteA6AokWQnoOKe68Td5GimmIQkWNhNnAeYg8TDzw HuJL9hsb8S7zUQXt1ORsK4XXewZLykkKcDheinTi8oY5NGzgSVn5BJeA7uhgm7aEGre23h QAD0NYf+Btf0TE24r3iXEOWytM7d8abGE92v3EdPyF4H0fAAQlpL60/dwzKpDLJIT3Xeyw lG2KdzrCQMd3JG/lGeqIbgMctLS90sIpwgd4WVjtd5Jl0AT8CQEOetim2sAMBvr6NFYMPj IXrYfZIYuRjXV5sc6MaWppzxn+teqJqrrArU63CitN/GdvFXQzb0uqL/SRMx6w== 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 4VjPFY3zyZzNB9; Mon, 20 May 2024 04:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48noB081723; Mon, 20 May 2024 04:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48n1f081720; Mon, 20 May 2024 04:08:49 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:49 GMT Message-Id: <202405200408.44K48n1f081720@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: 861f802b3eba - main - textvidc: Reindent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 861f802b3ebaf05075c6dd8be25f802c3e6527b6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=861f802b3ebaf05075c6dd8be25f802c3e6527b6 commit 861f802b3ebaf05075c6dd8be25f802c3e6527b6 Author: Warner Losh AuthorDate: 2024-05-19 21:18:58 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:43 +0000 textvidc: Reindent Since this is now 'new code' go ahead and reindent for modern project preferences. Sponsored by: Netflix --- stand/i386/libi386/textvidc.c | 683 +++++++++++++++++++++--------------------- 1 file changed, 343 insertions(+), 340 deletions(-) diff --git a/stand/i386/libi386/textvidc.c b/stand/i386/libi386/textvidc.c index 75d498930119..1dd950bc4021 100644 --- a/stand/i386/libi386/textvidc.c +++ b/stand/i386/libi386/textvidc.c @@ -82,112 +82,112 @@ struct console textvidc = { static void vidc_probe(struct console *cp) { - /* look for a keyboard */ + /* look for a keyboard */ #if KEYBOARD_PROBE - if (probe_keyboard()) + if (probe_keyboard()) #endif - { - cp->c_flags |= C_PRESENTIN; - } + { + cp->c_flags |= C_PRESENTIN; + } - /* XXX for now, always assume we can do BIOS screen output */ - cp->c_flags |= C_PRESENTOUT; + /* XXX for now, always assume we can do BIOS screen output */ + cp->c_flags |= C_PRESENTOUT; } static int vidc_init(int arg) { - int i; + int i; - if (vidc_started && arg == 0) - return (0); - vidc_started = 1; + if (vidc_started && arg == 0) + return (0); + vidc_started = 1; #ifdef TERM_EMU - /* Init terminal emulator */ - end_term(); - get_pos(&curx, &cury); - curs_move(&curx, &cury, curx, cury); - fg_c = DEFAULT_FGCOLOR; - bg_c = DEFAULT_BGCOLOR; + /* Init terminal emulator */ + end_term(); + get_pos(&curx, &cury); + curs_move(&curx, &cury, curx, cury); + fg_c = DEFAULT_FGCOLOR; + bg_c = DEFAULT_BGCOLOR; #endif - for (i = 0; i < 10 && vidc_ischar(); i++) - (void)vidc_getchar(); - return (0); /* XXX reinit? */ + for (i = 0; i < 10 && vidc_ischar(); i++) + (void)vidc_getchar(); + return (0); /* XXX reinit? */ } static void vidc_biosputchar(int c) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0xe00 | (c & 0xff); - v86.ebx = 0x7; - v86int(); + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0xe00 | (c & 0xff); + v86.ebx = 0x7; + v86int(); } static void vidc_rawputchar(int c) { - int i; + int i; - if (c == '\t') { - int n; + if (c == '\t') { + int n; #ifndef TERM_EMU - int curx, cury; + int curx, cury; - get_pos(&curx, &cury); + get_pos(&curx, &cury); #endif - n = 8 - ((curx + 8) % 8); - for (i = 0; i < n; i++) - vidc_rawputchar(' '); - } else { + n = 8 - ((curx + 8) % 8); + for (i = 0; i < n; i++) + vidc_rawputchar(' '); + } else { #ifndef TERM_EMU - vidc_biosputchar(c); + vidc_biosputchar(c); #else - /* Emulate AH=0eh (teletype output) */ - switch(c) { - case '\a': - vidc_biosputchar(c); - return; - case '\r': - curx = 0; - curs_move(&curx, &cury, curx, cury); - return; - case '\n': - cury++; - if (cury > 24) { - scroll_up(1, fg_c, bg_c); - cury--; - } else { - curs_move(&curx, &cury, curx, cury); - } - return; - case '\b': - if (curx > 0) { - curx--; + /* Emulate AH=0eh (teletype output) */ + switch(c) { + case '\a': + vidc_biosputchar(c); + return; + case '\r': + curx = 0; + curs_move(&curx, &cury, curx, cury); + return; + case '\n': + cury++; + if (cury > 24) { + scroll_up(1, fg_c, bg_c); + cury--; + } else { + curs_move(&curx, &cury, curx, cury); + } + return; + case '\b': + if (curx > 0) { + curx--; + curs_move(&curx, &cury, curx, cury); + /* write_char(' ', fg_c, bg_c); XXX destructive(!) */ + return; + } + return; + default: + write_char(c, fg_c, bg_c); + curx++; + if (curx > 79) { + curx = 0; + cury++; + } + if (cury > 24) { + curx = 0; + scroll_up(1, fg_c, bg_c); + cury--; + } + } curs_move(&curx, &cury, curx, cury); - /* write_char(' ', fg_c, bg_c); XXX destructive(!) */ - return; - } - return; - default: - write_char(c, fg_c, bg_c); - curx++; - if (curx > 79) { - curx = 0; - cury++; - } - if (cury > 24) { - curx = 0; - scroll_up(1, fg_c, bg_c); - cury--; - } - } - curs_move(&curx, &cury, curx, cury); #endif - } + } } /* Get cursor position on the screen. Result is in edx. Sets @@ -197,13 +197,13 @@ void get_pos(int *x, int *y) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0300; - v86.ebx = 0x0; - v86int(); - *x = v86.edx & 0x00ff; - *y = (v86.edx & 0xff00) >> 8; + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0300; + v86.ebx = 0x0; + v86int(); + *x = v86.edx & 0x00ff; + *y = (v86.edx & 0xff00) >> 8; } #ifdef TERM_EMU @@ -213,26 +213,26 @@ void curs_move(int *_x, int *_y, int x, int y) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0200; - v86.ebx = 0x0; - v86.edx = ((0x00ff & y) << 8) + (0x00ff & x); - v86int(); - *_x = x; - *_y = y; - /* If there is ctrl char at this position, cursor would be invisible. - * Make it a space instead. - */ - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0800; - v86.ebx = 0x0; - v86int(); + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0200; + v86.ebx = 0x0; + v86.edx = ((0x00ff & y) << 8) + (0x00ff & x); + v86int(); + *_x = x; + *_y = y; + /* If there is ctrl char at this position, cursor would be invisible. + * Make it a space instead. + */ + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0800; + v86.ebx = 0x0; + v86int(); #define isvisible(c) (((c) >= 32) && ((c) < 255)) - if (!isvisible(v86.eax & 0x00ff)) { - write_char(' ', fg_c, bg_c); - } + if (!isvisible(v86.eax & 0x00ff)) { + write_char(' ', fg_c, bg_c); + } } /* Scroll up the whole window by a number of rows. If rows==0, @@ -243,15 +243,15 @@ void scroll_up(int rows, int fgcol, int bgcol) { - if (rows == 0) - rows = 25; - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0600 + (0x00ff & rows); - v86.ebx = (bgcol << 12) + (fgcol << 8); - v86.ecx = 0x0; - v86.edx = 0x184f; - v86int(); + if (rows == 0) + rows = 25; + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0600 + (0x00ff & rows); + v86.ebx = (bgcol << 12) + (fgcol << 8); + v86.ecx = 0x0; + v86.edx = 0x184f; + v86int(); } /* Write character and attribute at cursor position. */ @@ -259,12 +259,12 @@ void write_char(int c, int fgcol, int bgcol) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0900 + (0x00ff & c); - v86.ebx = (bgcol << 4) + fgcol; - v86.ecx = 0x1; - v86int(); + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0900 + (0x00ff & c); + v86.ebx = (bgcol << 4) + fgcol; + v86.ecx = 0x1; + v86int(); } /**************************************************************/ @@ -279,28 +279,28 @@ void CD(void) { - get_pos(&curx, &cury); - if (curx > 0) { + get_pos(&curx, &cury); + if (curx > 0) { + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0x0600; + v86.ebx = (bg_c << 4) + fg_c; + v86.ecx = (cury << 8) + curx; + v86.edx = (cury << 8) + 79; + v86int(); + if (++cury > 24) { + end_term(); + return; + } + } v86.ctl = 0; v86.addr = 0x10; v86.eax = 0x0600; v86.ebx = (bg_c << 4) + fg_c; - v86.ecx = (cury << 8) + curx; - v86.edx = (cury << 8) + 79; + v86.ecx = (cury << 8) + 0; + v86.edx = (24 << 8) + 79; v86int(); - if (++cury > 24) { - end_term(); - return; - } - } - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0x0600; - v86.ebx = (bg_c << 4) + fg_c; - v86.ecx = (cury << 8) + 0; - v86.edx = (24 << 8) + 79; - v86int(); - end_term(); + end_term(); } /* Absolute cursor move to args[0] rows and args[1] columns @@ -310,12 +310,12 @@ void CM(void) { - if (args[0] > 0) - args[0]--; - if (args[1] > 0) - args[1]--; - curs_move(&curx, &cury, args[1], args[0]); - end_term(); + if (args[0] > 0) + args[0]--; + if (args[1] > 0) + args[1]--; + curs_move(&curx, &cury, args[1], args[0]); + end_term(); } /* Home cursor (left top corner) */ @@ -323,9 +323,9 @@ void HO(void) { - argc = 1; - args[0] = args[1] = 1; - CM(); + argc = 1; + args[0] = args[1] = 1; + CM(); } /* Clear internal state of the terminal emulation code */ @@ -333,162 +333,162 @@ void end_term(void) { - esc = 0; - argc = -1; + esc = 0; + argc = -1; } /* Gracefully exit ESC-sequence processing in case of misunderstanding */ void bail_out(int c) { - char buf[16], *ch; - int i; - - if (esc) { - vidc_rawputchar('\033'); - if (esc != '\033') - vidc_rawputchar(esc); - for (i = 0; i <= argc; ++i) { - sprintf(buf, "%d", args[i]); - ch = buf; - while (*ch) - vidc_rawputchar(*ch++); + char buf[16], *ch; + int i; + + if (esc) { + vidc_rawputchar('\033'); + if (esc != '\033') + vidc_rawputchar(esc); + for (i = 0; i <= argc; ++i) { + sprintf(buf, "%d", args[i]); + ch = buf; + while (*ch) + vidc_rawputchar(*ch++); + } } - } - vidc_rawputchar(c); - end_term(); + vidc_rawputchar(c); + end_term(); } static void get_arg(int c) { - if (argc < 0) - argc = 0; - args[argc] *= 10; - args[argc] += c - '0'; + if (argc < 0) + argc = 0; + args[argc] *= 10; + args[argc] += c - '0'; } /* Emulate basic capabilities of cons25 terminal */ void vidc_term_emu(int c) { - static int ansi_col[] = { - 0, 4, 2, 6, 1, 5, 3, 7, - }; - int t; - int i; - - switch (esc) { - case 0: - switch (c) { + static int ansi_col[] = { + 0, 4, 2, 6, 1, 5, 3, 7, + }; + int t; + int i; + + switch (esc) { + case 0: + switch (c) { + case '\033': + esc = c; + break; + default: + vidc_rawputchar(c); + break; + } + break; + case '\033': - esc = c; - break; - default: - vidc_rawputchar(c); - break; - } - break; + switch (c) { + case '[': + esc = c; + args[0] = 0; + argc = -1; + break; + default: + bail_out(c); + break; + } + break; - case '\033': - switch (c) { case '[': - esc = c; - args[0] = 0; - argc = -1; - break; - default: - bail_out(c); - break; - } - break; - - case '[': - switch (c) { - case ';': - if (argc < 0) /* XXX */ - argc = 0; - else if (argc + 1 >= MAXARGS) - bail_out(c); - else - args[++argc] = 0; - break; - case 'H': - if (argc < 0) - HO(); - else if (argc == 1) - CM(); - else - bail_out(c); - break; - case 'J': - if (argc < 0) - CD(); - else - bail_out(c); - break; - case 'm': - if (argc < 0) { - fg_c = DEFAULT_FGCOLOR; - bg_c = DEFAULT_BGCOLOR; - } - for (i = 0; i <= argc; ++i) { - switch (args[i]) { - case 0: /* back to normal */ - fg_c = DEFAULT_FGCOLOR; - bg_c = DEFAULT_BGCOLOR; - break; - case 1: /* bold */ - fg_c |= 0x8; - break; - case 4: /* underline */ - case 5: /* blink */ - bg_c |= 0x8; - break; - case 7: /* reverse */ - t = fg_c; - fg_c = bg_c; - bg_c = t; - break; - case 22: /* normal intensity */ - fg_c &= ~0x8; - break; - case 24: /* not underline */ - case 25: /* not blinking */ - bg_c &= ~0x8; - break; - case 30: case 31: case 32: case 33: - case 34: case 35: case 36: case 37: - fg_c = ansi_col[args[i] - 30]; - break; - case 39: /* normal */ - fg_c = DEFAULT_FGCOLOR; - break; - case 40: case 41: case 42: case 43: - case 44: case 45: case 46: case 47: - bg_c = ansi_col[args[i] - 40]; - break; - case 49: /* normal */ - bg_c = DEFAULT_BGCOLOR; - break; + switch (c) { + case ';': + if (argc < 0) /* XXX */ + argc = 0; + else if (argc + 1 >= MAXARGS) + bail_out(c); + else + args[++argc] = 0; + break; + case 'H': + if (argc < 0) + HO(); + else if (argc == 1) + CM(); + else + bail_out(c); + break; + case 'J': + if (argc < 0) + CD(); + else + bail_out(c); + break; + case 'm': + if (argc < 0) { + fg_c = DEFAULT_FGCOLOR; + bg_c = DEFAULT_BGCOLOR; + } + for (i = 0; i <= argc; ++i) { + switch (args[i]) { + case 0: /* back to normal */ + fg_c = DEFAULT_FGCOLOR; + bg_c = DEFAULT_BGCOLOR; + break; + case 1: /* bold */ + fg_c |= 0x8; + break; + case 4: /* underline */ + case 5: /* blink */ + bg_c |= 0x8; + break; + case 7: /* reverse */ + t = fg_c; + fg_c = bg_c; + bg_c = t; + break; + case 22: /* normal intensity */ + fg_c &= ~0x8; + break; + case 24: /* not underline */ + case 25: /* not blinking */ + bg_c &= ~0x8; + break; + case 30: case 31: case 32: case 33: + case 34: case 35: case 36: case 37: + fg_c = ansi_col[args[i] - 30]; + break; + case 39: /* normal */ + fg_c = DEFAULT_FGCOLOR; + break; + case 40: case 41: case 42: case 43: + case 44: case 45: case 46: case 47: + bg_c = ansi_col[args[i] - 40]; + break; + case 49: /* normal */ + bg_c = DEFAULT_BGCOLOR; + break; + } + } + end_term(); + break; + default: + if (isdigit(c)) + get_arg(c); + else + bail_out(c); + break; } - } - end_term(); - break; + break; + default: - if (isdigit(c)) - get_arg(c); - else bail_out(c); - break; + break; } - break; - - default: - bail_out(c); - break; - } } #endif @@ -496,9 +496,9 @@ static void vidc_putchar(int c) { #ifdef TERM_EMU - vidc_term_emu(c); + vidc_term_emu(c); #else - vidc_rawputchar(c); + vidc_rawputchar(c); #endif } @@ -506,26 +506,26 @@ static int vidc_getchar(void) { - if (vidc_ischar()) { - v86.ctl = 0; - v86.addr = 0x16; - v86.eax = 0x0; - v86int(); - return (v86.eax & 0xff); - } else { - return (-1); - } + if (vidc_ischar()) { + v86.ctl = 0; + v86.addr = 0x16; + v86.eax = 0x0; + v86int(); + return (v86.eax & 0xff); + } else { + return (-1); + } } static int vidc_ischar(void) { - v86.ctl = V86_FLAGS; - v86.addr = 0x16; - v86.eax = 0x100; - v86int(); - return (!V86_ZR(v86.efl)); + v86.ctl = V86_FLAGS; + v86.addr = 0x16; + v86.eax = 0x100; + v86int(); + return (!V86_ZR(v86.efl)); } #if KEYBOARD_PROBE @@ -550,13 +550,16 @@ vidc_ischar(void) static void delay7(void) { - /* - * I know this is broken, but no timer is available yet at this stage... - * See also comments in `delay1ms()'. - */ - inb(IO_DUMMY); inb(IO_DUMMY); - inb(IO_DUMMY); inb(IO_DUMMY); - inb(IO_DUMMY); inb(IO_DUMMY); + /* + * I know this is broken, but no timer is available yet at this stage... + * See also comments in `delay1ms()'. + */ + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); + inb(IO_DUMMY); } /* @@ -571,9 +574,9 @@ delay7(void) static void delay1ms(void) { - int i = 800; - while (--i >= 0) - (void)inb(0x84); + int i = 800; + while (--i >= 0) + (void)inb(0x84); } /* @@ -587,55 +590,55 @@ delay1ms(void) static int probe_keyboard(void) { - int retry = PROBE_MAXRETRY; - int wait; - int i; - - while (--retry >= 0) { - /* flush any noise */ - while (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) { - delay7(); - inb(IO_KBD + KBD_DATA_PORT); - delay1ms(); - } + int retry = PROBE_MAXRETRY; + int wait; + int i; + + while (--retry >= 0) { + /* flush any noise */ + while (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) { + delay7(); + inb(IO_KBD + KBD_DATA_PORT); + delay1ms(); + } - /* wait until the controller can accept a command */ - for (wait = PROBE_MAXWAIT; wait > 0; --wait) { - if (((i = inb(IO_KBD + KBD_STATUS_PORT)) - & (KBDS_INPUT_BUFFER_FULL | KBDS_ANY_BUFFER_FULL)) == 0) - break; - if (i & KBDS_ANY_BUFFER_FULL) { - delay7(); - inb(IO_KBD + KBD_DATA_PORT); - } - delay1ms(); - } - if (wait <= 0) - continue; + /* wait until the controller can accept a command */ + for (wait = PROBE_MAXWAIT; wait > 0; --wait) { + if (((i = inb(IO_KBD + KBD_STATUS_PORT)) + & (KBDS_INPUT_BUFFER_FULL | KBDS_ANY_BUFFER_FULL)) == 0) + break; + if (i & KBDS_ANY_BUFFER_FULL) { + delay7(); + inb(IO_KBD + KBD_DATA_PORT); + } + delay1ms(); + } + if (wait <= 0) + continue; - /* send the ECHO command */ - outb(IO_KBD + KBD_DATA_PORT, KBDC_ECHO); + /* send the ECHO command */ + outb(IO_KBD + KBD_DATA_PORT, KBDC_ECHO); - /* wait for a response */ - for (wait = PROBE_MAXWAIT; wait > 0; --wait) { - if (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) - break; - delay1ms(); - } - if (wait <= 0) - continue; + /* wait for a response */ + for (wait = PROBE_MAXWAIT; wait > 0; --wait) { + if (inb(IO_KBD + KBD_STATUS_PORT) & KBDS_ANY_BUFFER_FULL) + break; + delay1ms(); + } + if (wait <= 0) + continue; - delay7(); - i = inb(IO_KBD + KBD_DATA_PORT); + delay7(); + i = inb(IO_KBD + KBD_DATA_PORT); #ifdef PROBE_KBD_BEBUG - printf("probe_keyboard: got 0x%x.\n", i); + printf("probe_keyboard: got 0x%x.\n", i); #endif - if (i == KBD_ECHO) { - /* got the right answer */ - return (1); + if (i == KBD_ECHO) { + /* got the right answer */ + return (1); + } } - } - return (0); + return (0); } #endif /* KEYBOARD_PROBE */ From nobody Mon May 20 05:06:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjQWd5YSZz5LnSw; Mon, 20 May 2024 05:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjQWd51tjz4Nlf; Mon, 20 May 2024 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=1716181565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5E47zfedlGKDQtQ8wPjIdMFCSydoIhN63NPTzhgrBv8=; b=aXPmooT1kp7utYGjVuTUo0x3lnQ4qGCpkE3W1cToU9Dh+J9L5R1CKZkGjE6i5hTG0R81TM 2kH9gA43+RKLAfIttAHc+lPqNxv/FIOiTXpYMsCzq8BvwXFB58w5SqC4I96lmp62Q5iXre jPhK6/bCoCnIr6FGhJj7xLE3wiOt4v4x8wai3bd0gr1Qf7SXaV9A2KtVvFlCOzVGwJSPfA hIv+A0fXU7yQBoddcT4bB9uYpsU9gQaXrZ4NwfVhouEZ5+Z94uBVsrW/sJTxDwsYChq1ex gxNV5UleD+a1qXPq+u9NIWAVeTrFB3ci3qUDd7ARptA+JE/v8alTM5OWBRZNfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716181565; a=rsa-sha256; cv=none; b=OwawiAbXw6V2tUrqqLAcX5mKh5vFB6j0+t37rE7lFo2Cc3Mi/srqArLaTi4KjA9SZpCyI8 7PZJcZ5QmKyCcQVBrWtgVU4wJqf3belpNtKLyBaXkH8d9iI6DOTyzeSeYx8e8/Jivj0Vb0 835CMhbiX7dDeKrx/IJ2nGYAT7/Szq7OggOLgXXmSPY46IX5mMhHz/T9QonjzyLLwC0sm2 esBQiKHnQ3HRup+FOOeJNrjrWXrkdID9xNwCUDxsdmdSigxiO7q2DMahsSxW/cIKM8tXjj 7JcUZk9Xm6pj6e/rf0yGWPnMOVELPtI39ji8fStuOxvWOD2xOvpCLgVljNskHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716181565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5E47zfedlGKDQtQ8wPjIdMFCSydoIhN63NPTzhgrBv8=; b=CaqsIVW0+WHOLw2ZfwyTeoRqkzouUdU2EA0MqSDN0/knO/HpAMbOtVYWNhxDVPuwRn5Cu9 gN2bKQj6yZVQ8Pv7HuLkOZboemfF/yNeukvP4DE+aFz5v+MTMZgCZodo2n8+VQZQ3tr176 svzRL4Bp01eG6JQoBTZu4/QR2vuHdBzqtqX5lWuHtNgKXkhFPrTc8K/Km7OgiOcQiBp/jo 0yFJ84FtY/Or8f5jhf8TXBiUzAZidY099t36zTqZclRBmAwlNS0nOgR4TB+t3YgKYCHooc p8I19EnB7hq/aK1MpUs+VKVbvLeCEv00BMwch7AD7qKpIdfKnufZ9ngGZG4g6g== 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 4VjQWd4cvBzP8B; Mon, 20 May 2024 05:06:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K565NZ083320; Mon, 20 May 2024 05:06:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K565id083317; Mon, 20 May 2024 05:06:05 GMT (envelope-from git) Date: Mon, 20 May 2024 05:06:05 GMT Message-Id: <202405200506.44K565id083317@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: c7581d76a1e4 - main - loader: fix stupid typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: c7581d76a1e46a925bba59d3e18394908f65c907 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c7581d76a1e46a925bba59d3e18394908f65c907 commit c7581d76a1e46a925bba59d3e18394908f65c907 Author: Warner Losh AuthorDate: 2024-05-20 05:04:18 +0000 Commit: Warner Losh CommitDate: 2024-05-20 05:04:18 +0000 loader: fix stupid typos Sponsored by: Netflix --- stand/libofw/ofw_console.c | 2 +- stand/uboot/uboot_console.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index 75f9bfba0968..6925641eb606 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -41,7 +41,7 @@ static ihandle_t stdin; static ihandle_t stdout; struct console ofwconsole = { - .c_cname = "ofw", + .c_name = "ofw", .c_desc = "Open Firmware console", .c_probe = ofw_cons_probe, .c_init = ofw_cons_init, diff --git a/stand/uboot/uboot_console.c b/stand/uboot/uboot_console.c index c02ba9aba5f0..b850a88c4018 100644 --- a/stand/uboot/uboot_console.c +++ b/stand/uboot/uboot_console.c @@ -42,7 +42,7 @@ struct console uboot_console = { .c_probe = uboot_cons_probe, .c_init = uboot_cons_init, .c_out = uboot_cons_putchar, - .c_int = uboot_cons_getchar, + .c_in = uboot_cons_getchar, .c_ready = uboot_cons_poll, }; From nobody Mon May 20 07:39:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjTwR14CYz5JbtS; Mon, 20 May 2024 07:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjTwR0KW0z4d2h; Mon, 20 May 2024 07:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716190759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4n3X0i2iHaAvEcY6UFedUuowNo2rABaChiISlD7YPK8=; b=j2yWN6d7VXImr464zSWzeAmClM3wjoRPXGYUa/iwxxdOJjjXSBi1+/YwytCdQeU2hD25s7 t6SZzsaxrgZwC/f6QLuL21XJqWPQ6IlYghEOxTL7sfCMmjyr3IiquUqfO8QyPRgIqFrSLX 9b40oHJLLSkZpUPPbLHQyjhu8bAh9yDgY+uIUqq0wU+Hdalajm8lqW5F9atKyf/vFHRUgj joHchAriMF8Szbv5Uft8dmxKxRHH1hI8XmAObLBEDj4z55GkVkmek+ZL1sq3+04cVZzdY7 kkdWSGHIx7pf+dEv+AQlpoB8jr4JyIJzEWefERFJSHyZ3a/FP9FtUIuQ+BpvXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716190759; a=rsa-sha256; cv=none; b=GfFKlgKNhx0d31qodJWjuT3bVhCAGFPoj1gvz2uDrdJJ2epIjnQslBSxe6TDCFhPLgGbGe DC/roN54OlOuAPqbqOTCI6dGRFR1un+E1BVjD2e1brGOlXWoskkPeq+Sak/59t72wMcvJl gb2GqpWqHACrW0tkzxBEAvb9FXTeXFn7F63kb1XsHhqfLmERVYI8oA/Q/L/4Hcd7qmhoXc L68ey6H01Db47x6XHZc3G4G74kg60YWEUxkuK29j+2S+yhYlec+ymLH2F6H8Ea1KbJSwdG UZ2ZNtF+j+7m2BpWICR3U+4bow8wtotFR/MKJjuK/SoqkxRQfx/d5CgZ76elXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716190759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4n3X0i2iHaAvEcY6UFedUuowNo2rABaChiISlD7YPK8=; b=BtvGQ+gQ3PIGqsROKYuJoLcmKI52e+jISniJyPDDLzZSeDYRULtstHVCqUVlDeOIEZjZOY GVCnmBSs7vtUZpAZvYCPKLYX3kdv7GZdwQuitCkZ7g5+JkSzlQ08vH3AhlMANCMi+HGoVM gLjWSTIn7WWyW4SiYbIeERoMgB7K2AOo0xtfL2oplRxfsJNm1Xi/nYw+GXNgT2sCCoM6Xs ZH2S9/hoqikuhkjKbuaqrmcSZy3iEGUQCL3XNgehTJN4NPHZMmOsknlKX65V2adHN+9VX1 0CDliDy8Y/m7lEg/vAOqm4N5smeGK/9OaQfbsvizhwOCuqLG5p+DlSBrFyZtUA== 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 4VjTwQ6VC6zV9P; Mon, 20 May 2024 07:39:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K7dIgr037661; Mon, 20 May 2024 07:39:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K7dInS037658; Mon, 20 May 2024 07:39:18 GMT (envelope-from git) Date: Mon, 20 May 2024 07:39:18 GMT Message-Id: <202405200739.44K7dInS037658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: fecd30388256 - releng/14.1 - if: guard against if_ioctl being NULL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: fecd303882565954f58d984e4a13735e080b5263 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fecd303882565954f58d984e4a13735e080b5263 commit fecd303882565954f58d984e4a13735e080b5263 Author: Kristof Provost AuthorDate: 2024-05-06 09:39:08 +0000 Commit: Kristof Provost CommitDate: 2024-05-20 07:38:40 +0000 if: guard against if_ioctl being NULL There are situations where an struct ifnet has a NULL if_ioctl pointer. For example, e6000sw creates such struct ifnets for each of its ports so it can call into the MII code. If there is then a link state event this calls do_link_state_change() -> rtnl_handle_ifevent() -> dump_iface() -> get_operstate() -> get_operstate_ether(). That wants to know if the link is up or down, so it tries to ioctl(SIOCGIFMEDIA), which doesn't go well if if_ioctl is NULL. Guard against this, and return EOPNOTSUPP. PR: 275920 MFC ater: 3 days Approved by: re (cperciva) Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 43387b4e574043b78a58c8bcb7575161b055fce1) (cherry picked from commit 9a8a26aefb366ef6f497d48547a1562a1de566c1) --- sys/net/if.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index 0128fb8039ee..1ca0893eb724 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4873,6 +4873,9 @@ if_resolvemulti(if_t ifp, struct sockaddr **srcs, struct sockaddr *dst) int if_ioctl(if_t ifp, u_long cmd, void *data) { + if (ifp->if_ioctl == NULL) + return (EOPNOTSUPP); + return (ifp->if_ioctl(ifp, cmd, data)); } From nobody Mon May 20 07:57:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjVKf55mkz5Jdf6; Mon, 20 May 2024 07:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjVKf42jRz4gy8; Mon, 20 May 2024 07:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716191862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7y/MgFo+4LG56nUH6PihukC4o58jRuYezxtPrJ5fg4w=; b=JIaBiocUGainJaJqt813mRzQiu0LFiHiKgQxs1V87OAf5BbxKauZ1twCu7P34vaBjMt+k9 QFRXgK1VLqJX42PuVCafQRZ+2pX0ati9OeIp0VLVDvcmOX6nE1p0Rig8tKTR4VQF4LNsv/ dPxZIX4T63lXgOikoNdT7OqZ1b7rZ9bymhl5KfgdGOlnFsU5mqxgwsvkQmnjvX7z2rIoin beSSoOqjfe3R+GDhEOLe7to7uvFM/8tbEeuqzwObxW3DL+s7IFBYv+yLXXwPup6RpxVMwF 2sJMWrkNKSUwGIuNhKV3uWoyDf1qI5nrKOFGg5npiXGJULHlJalLlHHA9rn1LQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716191862; a=rsa-sha256; cv=none; b=hc2BY75zvWZy3bT4pEFOV3xtDmeApLH1SYiHYANhWuHzYbgLQ7SCaokCBY7UX1rqs7vVXl X+YduUTRWyADwdKHxEpYeF4ih8Xg69bT6dCfdxnnIU6pPvjs2wYcPWeXK6fByZoXknXH2g XzpdNlRmNI656BAE6rU9EiAz6OZpaXjmoQZCAWk9YMKOYUpwXetNLaLNBkxYjHcFCo4iyJ R3ySkdp3vclW/TrFXF1up4rLIVvOa9XAey50bS4N+x1YZtkasYGxDfTztwGJFcWuSyjTdt sUu6jtJniKjDXKwYh3Vm85nkIKPiqE73zL8zWuaXwzMsyo3HwJm6C4PiQkrn8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716191862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7y/MgFo+4LG56nUH6PihukC4o58jRuYezxtPrJ5fg4w=; b=MYywbFfZ4lF3m6XdLKw68ynE9lbvQqD1550NmOuIiIYWYSjJmyKsTfemGnS3zpBujfw0W7 jih0pWJDv84yLCs5ggQcgs/Zj4VaMBkdnVEgXKOVJ6AGYjJw1XmBTcxNvcIJVSUi+7ZL8e jCPBXvrY9X8d9hb2KF/UMBCVNzAr3DI7vDhFLoJDX21OA3JTAz55RjjXWUmKjeLqyMdsES 0K0cVAJFhKBrhZEoVnrdlj7QjR+/yv4v43SCdILqUTKgneFuJ83J936FeC9tIJq18X6LON /zzffLYBIC1+FWyjXzNy1RHojFraMzgpw9akxXk4czG3e3S/VHQmUWhz2j2jdw== 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 4VjVKf3WG4zVyn; Mon, 20 May 2024 07:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K7vgSm070658; Mon, 20 May 2024 07:57:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K7vgxM070655; Mon, 20 May 2024 07:57:42 GMT (envelope-from git) Date: Mon, 20 May 2024 07:57:42 GMT Message-Id: <202405200757.44K7vgxM070655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 18c38eda39bb - stable/14 - if_ovpn: cope with loops List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 18c38eda39bb8162ddce9acc4de4d6e4bbf48ef0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=18c38eda39bb8162ddce9acc4de4d6e4bbf48ef0 commit 18c38eda39bb8162ddce9acc4de4d6e4bbf48ef0 Author: Kristof Provost AuthorDate: 2024-05-13 10:06:47 +0000 Commit: Kristof Provost CommitDate: 2024-05-20 07:39:52 +0000 if_ovpn: cope with loops User misconfiguration may lead to routing loops where we try to send the tunnel packet into the tunnel. This eventually leads to stack overflows and panics. Avoid this using if_tunnel_check_nesting(), which will drop the packet if we're looping or we hit three layers of nested tunnels. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 59a6666ec91d71f97aaae5195bbfafd9d422db2e) --- sys/net/if_ovpn.c | 9 +++++++++ tests/sys/net/if_ovpn/if_ovpn.sh | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 1b5d419fe58b..7af669c69511 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -255,6 +255,7 @@ static const char ovpnname[] = "ovpn"; static const char ovpngroupname[] = "openvpn"; static MALLOC_DEFINE(M_OVPN, ovpnname, "OpenVPN DCO Interface"); +#define MTAG_OVPN_LOOP 0x6f76706e /* ovpn */ SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_OTHER, openvpn, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, @@ -1858,6 +1859,14 @@ ovpn_transmit_to_peer(struct ifnet *ifp, struct mbuf *m, if (af != 0) BPF_MTAP2(ifp, &af, sizeof(af), m); + if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_OVPN_LOOP, 3))) { + if (_ovpn_lock_trackerp != NULL) + OVPN_RUNLOCK(sc); + OVPN_COUNTER_ADD(sc, lost_data_pkts_out, 1); + m_freem(m); + return (ELOOP); + } + len = m->m_pkthdr.len; MPASS(len <= ifp->if_mtu); diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index bbaffa0bce73..88df430aead6 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -95,6 +95,10 @@ atf_test_case "4in4" "cleanup" echo 'foo' | jexec b nc -u -w 2 192.0.2.1 1194 atf_check -s exit:0 -o ignore jexec b ping -c 3 198.51.100.1 + + # Test routing loop protection + jexec b route add 192.0.2.1 198.51.100.1 + atf_check -s exit:2 -o ignore jexec b ping -t 1 -c 1 198.51.100.1 } 4in4_cleanup() @@ -386,6 +390,10 @@ atf_test_case "6in6" "cleanup" atf_check -s exit:0 -o ignore jexec b ping6 -c 3 2001:db8:1::1 atf_check -s exit:0 -o ignore jexec b ping6 -c 3 -z 16 2001:db8:1::1 + + # Test routing loop protection + jexec b route add -6 2001:db8::1 2001:db8:1::1 + atf_check -s exit:2 -o ignore jexec b ping6 -t 1 -c 3 2001:db8:1::1 } 6in6_cleanup() From nobody Mon May 20 08:13:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjVgd2tphz5Jg4j; Mon, 20 May 2024 08:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjVgd2Ntsz4jgF; Mon, 20 May 2024 08:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716192797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z5uf+ODNLclOPwL8slFxazUWBc36ENbCLlDX6NrO0+Y=; b=dTcLETc+WRGQSZklEFysC2epb2oCgCS41RrdBkHZXh6fVx5Nx+L92In1yySfA4RJxYhqNb xiMqum0d0c4ZhapAvprgXnx9qc3Ul7dKe10oqko5CRROCl9c0u8cZH5dWbpmAMpDGdIseG +wzSz5Y51wua6gVyWnGVRbudwq/0vvhSQCmCqMMkBdivHBj79S+IEg4XRqg8FK1jWGQllI Guqv/6et5CY82ig2p91sBp3i8VvLfHdvsp/lYs3oWzHhKrg02pqJbugH2BWstIm3ZwaO6/ sJlEd6aaiRtf6jJq5prsb7AUyOmdzwAPV/GfUog/u2N+cSaGavtY/CNHYThX6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716192797; a=rsa-sha256; cv=none; b=IvgC5ZQli819Q1NGX2EkLH4LexRkSUQ8fPTTNaCW11NoqPqgVejKztFDk6zJE9YDwab60h OMfQEi4s1y8/fMwDJd6dotW9bQWzfSYABitD9PL9moJkcine3bUnS42vNmw74sXlkOdDtl YpxZCh+AOcftsMUNrabNWhA2yOiJHViRH7ZdPK3jrmb/ayWNTiFWTOwyFUPf6pItknZLSV fJzUWp9XapD1sF83FomLx7LVB5m8qrErkayIeNU/fHzzMDSQfdjv+aWI3YfIhMfiOaKH4E etmx9EPFDA6vSsTveZZ6Q2bUyJ4c2UF9ezHL1bg4OGu5P2yvBbVtFYdG4P5hhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716192797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z5uf+ODNLclOPwL8slFxazUWBc36ENbCLlDX6NrO0+Y=; b=dhyHz7CRZntYa6ZVx877dF6wi33suukzjIlTmb55do26EwbK943Wz3z95kyhnX7lnnQEIJ ZNjaDwFXeq4OUVgNFJaW0afy3/hnAgGxOQAeVewRsapT1bU6zoiN9huFqCxQRLVJMelWgh VwI80LR/iDbh1Fe3caOuHt69fAxovggBtMfddOiu7c19EJ2YAyAlHWivJ1MwE8zg89PD7V 3ARTt1ftSSZVp+kYUKdUVubtgukzR4ckdLUVMZDoi3rLFmZYhA7LeFdq7jacOgAJL7gZq5 qagH8YXUbD6VmotSkibK7NfMM+64fxcB7yhz9UH5iVwj3hFo1DlnC+8TTkqVGQ== 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 4VjVgd1gmgzWwv; Mon, 20 May 2024 08:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K8DHCX004414; Mon, 20 May 2024 08:13:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K8DHal004411; Mon, 20 May 2024 08:13:17 GMT (envelope-from git) Date: Mon, 20 May 2024 08:13:17 GMT Message-Id: <202405200813.44K8DHal004411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 14efb9bb7104 - stable/14 - Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 14efb9bb710486a6fba349ec1b4b1b94a9a5a089 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=14efb9bb710486a6fba349ec1b4b1b94a9a5a089 commit 14efb9bb710486a6fba349ec1b4b1b94a9a5a089 Author: Dimitry Andric AuthorDate: 2024-05-16 18:21:45 +0000 Commit: Dimitry Andric CommitDate: 2024-05-20 08:12:56 +0000 Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang): [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (#91694) This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like: /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust. (For rust itself there is also a similar issue reported at https://github.com/rust-lang/rust/pull/121088). PR: 276104 Reported by: netchild MFC after: 3 days (cherry picked from commit fcfb2d6393712dee3f1f8f0c3840d14817dea416) --- contrib/llvm-project/llvm/lib/TargetParser/Host.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp index 1adef15771fa..848b531dd8dd 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp @@ -1774,7 +1774,8 @@ bool sys::getHostCPUFeatures(StringMap &Features) { Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1); // AVX512 is only supported if the OS supports the context save for it. Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save; - Features["evex512"] = Features["avx512f"]; + if (Features["avx512f"]) + Features["evex512"] = true; Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save; Features["rdseed"] = HasLeaf7 && ((EBX >> 18) & 1); Features["adx"] = HasLeaf7 && ((EBX >> 19) & 1); From nobody Mon May 20 08:13:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjVgy6HWFz5Jg3T; Mon, 20 May 2024 08:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjVgy1b5Xz4jvY; Mon, 20 May 2024 08:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716192814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8wuoTB0YX+/xXMj2/vsT/oQ7atqRIT796DOYalHlZlA=; b=jytGM7o0dRHhqCY4OM3IU2QI3A/RNew0WPnXzkfb+jt8BXimOKIyvhB0NP6Bnri+s92pgG Hfo1zrAQ4NXJ0vQDeyVw7UHqobj6ZHm8AllzlDwp0LNDYgM+4+qc+C3MprsuHVjohcDI+Q lqMvRoeGXnzqm3MuAI0wGsFUhtcjy80K4G3wkUC6bhMUHndTHsN1EfEuPEUQMQa+KxVVy3 AlbdKWtjmFSwXNSQaY+tYRkhZipEDRj03yL1ez/XwUFIwX8IX6oj9WHlreOdzP/PhfHpkV SLPFXJMwkHzAKc05CkWq98Bvo73SDYsZm8iiPi/94WCU3kJj1H5GI7o6v/OFCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716192814; a=rsa-sha256; cv=none; b=V+2tsxR3EAxYeQu7Pt0cnK1eMclHLZ7O9zwTSvR/s7mLCNaNFTnyfO6T1E4GEuEI1afqaG E49vjt3yknaXByY7CDQd/U38kqfysZY80PdgDLrIfbPwsIprsCDUFefLJKLmHs6fPVrpiy KuFy4xs7xGOJijLSrWN7fej8pZ/V9eKk353hSJDXNOV8umm/mgxkmCq21bIBXBXeo1JoHM 8P8Q/J+6pJ1ocFmU+nTzmizdkeanlz93qWQmRBEHnbVqbFqedGl0/u/E/xzJvIClTdM0hJ Idl/NEBW2qTWb22eUppDSwOHkYfUBfSUv4/PzWFguPsztz1hZcJ0FtH5lKEejQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716192814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8wuoTB0YX+/xXMj2/vsT/oQ7atqRIT796DOYalHlZlA=; b=Y5Sb+JTj0dpdWHDHXDnOAbcPxb0BQQEyTbqnmwQpyv+5bipO7iYoe7D/HDx6Io5W0HJrTW I5Bckw5kV4zVsTUIKm9hhUUxcFtBnK8eFphogz1LupC1VI7qe0cJgSZ84dSX24PF3jQTID JSd33Rd2DdY2YP+OLxWBMyurpkELQrvJITjiQHJgaZ7WJrLPuGKtr/Jmq0K2eEbtNHVeUf 00kOru3BXfKc+Q136dbkJx1tUaO7mc/3EBRyzlGunRghnIpSVKlwM9aFXM2Rqm8VQH//88 oGBJ0cOaE6wDJgGeDp89vdt2juznvto8zk3pUozt9XGd8aYb/urB73+6sMI0Zw== 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 4VjVgy16j7zX0W; Mon, 20 May 2024 08:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K8DYdr004598; Mon, 20 May 2024 08:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K8DYEd004595; Mon, 20 May 2024 08:13:34 GMT (envelope-from git) Date: Mon, 20 May 2024 08:13:34 GMT Message-Id: <202405200813.44K8DYEd004595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b6011652be32 - stable/13 - Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b6011652be3240e9d702f28e572ea7993226aa23 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b6011652be3240e9d702f28e572ea7993226aa23 commit b6011652be3240e9d702f28e572ea7993226aa23 Author: Dimitry Andric AuthorDate: 2024-05-16 18:21:45 +0000 Commit: Dimitry Andric CommitDate: 2024-05-20 08:13:00 +0000 Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang): [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (#91694) This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like: /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust. (For rust itself there is also a similar issue reported at https://github.com/rust-lang/rust/pull/121088). PR: 276104 Reported by: netchild MFC after: 3 days (cherry picked from commit fcfb2d6393712dee3f1f8f0c3840d14817dea416) --- contrib/llvm-project/llvm/lib/TargetParser/Host.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp index 1adef15771fa..848b531dd8dd 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp @@ -1774,7 +1774,8 @@ bool sys::getHostCPUFeatures(StringMap &Features) { Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1); // AVX512 is only supported if the OS supports the context save for it. Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save; - Features["evex512"] = Features["avx512f"]; + if (Features["avx512f"]) + Features["evex512"] = true; Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save; Features["rdseed"] = HasLeaf7 && ((EBX >> 18) & 1); Features["adx"] = HasLeaf7 && ((EBX >> 19) & 1); From nobody Mon May 20 09:08:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjWv72W8Mz5KWV3; Mon, 20 May 2024 09:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjWv71lBCz4qwQ; Mon, 20 May 2024 09:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716196099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21WeJxEhr6k5HmMEJFxmaxPzXr3EAWcERN/3qY5Ci5U=; b=gAolrZB1dRhHwt71WnpTjIY272XzPmM5JrmEutCWM+881iwxUXah5+47apmobOKIiCuVGT Bso+otBEzzxEY+HDXNNVHmJ+gLN7rmEYf8EW1v5CVPe1cF5zd3tolo7yaLOt5zw/JTdnsc cUnwXs9K/0mGkO7CN9L+QyPVgV0UzKi7wVFgxJjLp0ukLHEP4l1RYuVwu06S9w0lY/6HL6 yyRfZYMZ57YK4DuW3jcBfMKjHyz78jSCLEt2ssA0lFvgB49PgKNaLPH0ee9ZIMRYT0e02J mZEctFkqPJgxnCIumdYlM/VqxM+uWh3kF5f7OK6ulAugPM5Xs8Qw1Nhe0CaWFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716196099; a=rsa-sha256; cv=none; b=Vi/ZgM1VA/qMnmj5ygsQ6pPgmWFnuKGNjlhE/qWgTSvuIRHOKCPPXAXMOE3/iZ4nj+3g+0 PwaeI6EQxYw7OFLd9Rn4WXu4lT6SzTM2yXW5m9nskAqu7Wq8ZpdxqPSr/xnzb2o6peWKCy 88kQtvZUTik2mxK7NSlJ1UcrnnQK1ZcEBdLdnFN4DJ8wC7G6177wGzq4c8vKMBi965AOhH nWotIY9qnLfhjNUX4wkL1I1SeIl/5+rvE45rysq0cKYLbelnDYbXIcpF9f5D6iV09ihhz5 xAuWPS0Hjtg+uloiL1PCHKPBqLGzNLAbnPz9h1mNpp9NSWEywJb68bX2BsnM5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716196099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21WeJxEhr6k5HmMEJFxmaxPzXr3EAWcERN/3qY5Ci5U=; b=Zy6pZB6Byj0QzVGSapVYGL/UqptbLrrSsHs9Bn7XMEMW/4/5W2X3/y5K6tiXTBcJZdRjrp 4cZNDB0l6q4yRzOAeIxEHK6oFs848Kg/d6OFMoUs4aEX/X3xj7ebQMvljZV1lqxj28SHgF BCUv04sfyPzMbrgKc/+OHdI/iFBu32i+Lg1zWRyifJn3YipRwMOgo6Odaz2uFHL/hXE5J5 8AFVD7poA9um5sTx9UChoQb6mHkc5k2aZxv7yIBQ031Hv+x9CCHWybzytaZApO3yD8PXi2 1xSagDnhNQAkt0adXJkUv6reZfforKP5Cw5TLvARrJCUi7UjLI5EklJor+dj3A== 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 4VjWv71GmFzXwq; Mon, 20 May 2024 09:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K98JH1090577; Mon, 20 May 2024 09:08:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K98J5E090574; Mon, 20 May 2024 09:08:19 GMT (envelope-from git) Date: Mon, 20 May 2024 09:08:19 GMT Message-Id: <202405200908.44K98J5E090574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: dd1a16c9e2c1 - stable/14 - ifconfig: Add format shortcuts. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dd1a16c9e2c1c95d9ac7ad0b082248e60ede0e99 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dd1a16c9e2c1c95d9ac7ad0b082248e60ede0e99 commit dd1a16c9e2c1c95d9ac7ad0b082248e60ede0e99 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-14 06:51:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:54 +0000 ifconfig: Add format shortcuts. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45166 (cherry picked from commit 847ef59d4b5eab234bd1f8eb947ad74bdab5614e) ifconfig: Markup nits. MFC after: 3 days Reviewed by: imp, allanjude Differential Revision: https://reviews.freebsd.org/D45209 (cherry picked from commit 42b28f815214aa582fe4ca707687d3af47850230) --- sbin/ifconfig/ifconfig.8 | 32 +++++++++++++++++++++++--------- sbin/ifconfig/ifconfig.c | 42 +++++++++++++++++++++++++----------------- 2 files changed, 48 insertions(+), 26 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index a538981608cd..471d37ac1779 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" -.Dd November 08, 2023 +.Dd May 12, 2024 .Dt IFCONFIG 8 .Os .Sh NAME @@ -137,7 +137,7 @@ and their associated .Ar format strings are: .Pp -.Bl -tag -width ether +.Bl -tag -width default .It Cm addr Adjust the display of inet and inet6 addresses: .Pp @@ -202,6 +202,16 @@ Integer format, for example: .Ql prefixlen 64 .El .El +.Pp +In addition, the following shortcuts are accepted: +.Bl -tag -width default +.It Cm default +Resets all formats to their default values. +.It Cm cidr +Shortcut notation for +.Cm inet:cidr,inet6:cidr . +.El +.Pp .It Fl G Ar groupname Exclude members of the specified .Ar groupname @@ -464,13 +474,17 @@ sending out requests and listening for replies. .It Cm stickyarp Enable the so-called sticky ARP mode for the interface. If this option is enabled on the given interface, any resolved address is -marked as a static one and never expires. This may be used to increase +marked as a static one and never expires. +This may be used to increase security of the network by preventing ARP spoofing or to reduce latency for high-performance Ethernet networks where the time needed for ARP resolution is -too high. Please note that a similar feature is also provided for bridges. See +too high. +Please note that a similar feature is also provided for bridges. +See the sticky option in the .Sx Bridge Interface Parameters -section. Enabling this +section. +Enabling this option may impact techniques which rely on ARP expiration/overwriting feature such as load-balancers or high-availabity solutions such as .Xr carp 4 . @@ -1227,8 +1241,8 @@ Set the interval at which beacon frames are sent when operating in ad-hoc or ap mode. The .Ar interval -parameter is specified in TU's (1024 usecs). -By default beacon frames are transmitted every 100 TU's. +parameter is specified in TUs (1024 usecs). +By default beacon frames are transmitted every 100 TUs. .It Cm bmissthreshold Ar count Set the number of consecutive missed beacons at which the station will attempt to roam (i.e., search for a new access point). @@ -1885,8 +1899,8 @@ Use .Fl powersave to disable powersave operation when operating as a client. .It Cm powersavesleep Ar sleep -Set the desired max powersave sleep time in TU's (1024 usecs). -By default the max powersave sleep time is 100 TU's. +Set the desired max powersave sleep time in TUs (1024 usecs). +By default the max powersave sleep time is 100 TUs. .It Cm protmode Ar technique For interfaces operating in 802.11g, use the specified .Ar technique diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 7a78e9a934f7..402967d405fd 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -322,14 +322,10 @@ cmpifaddrs(struct ifaddrs *a, struct ifaddrs *b, struct ifa_queue *q) static void freeformat(void) { - if (f_inet != NULL) - free(f_inet); - if (f_inet6 != NULL) - free(f_inet6); - if (f_ether != NULL) - free(f_ether); - if (f_addr != NULL) - free(f_addr); + free(f_inet); + free(f_inet6); + free(f_ether); + free(f_addr); } static void setformat(char *input) @@ -339,9 +335,18 @@ static void setformat(char *input) formatstr = strdup(input); while ((category = strsep(&formatstr, ",")) != NULL) { modifier = strchr(category, ':'); - if (modifier == NULL || modifier[1] == '\0') { - warnx("Skipping invalid format specification: %s\n", - category); + if (modifier == NULL) { + if (strcmp(category, "default") == 0) { + freeformat(); + } else if (strcmp(category, "cidr") == 0) { + free(f_inet); + f_inet = strdup(category); + free(f_inet6); + f_inet6 = strdup(category); + } else { + warnx("Skipping invalid format: %s\n", + category); + } continue; } @@ -349,14 +354,19 @@ static void setformat(char *input) modifier[0] = '\0'; modifier++; - if (strcmp(category, "addr") == 0) + if (strcmp(category, "addr") == 0) { + free(f_addr); f_addr = strdup(modifier); - else if (strcmp(category, "ether") == 0) + } else if (strcmp(category, "ether") == 0) { + free(f_ether); f_ether = strdup(modifier); - else if (strcmp(category, "inet") == 0) + } else if (strcmp(category, "inet") == 0) { + free(f_inet); f_inet = strdup(modifier); - else if (strcmp(category, "inet6") == 0) + } else if (strcmp(category, "inet6") == 0) { + free(f_inet6); f_inet6 = strdup(modifier); + } } free(formatstr); } @@ -621,8 +631,6 @@ main(int ac, char *av[]) .io_s = -1, }; - f_inet = f_inet6 = f_ether = f_addr = NULL; - lifh = ifconfig_open(); if (lifh == NULL) err(EXIT_FAILURE, "ifconfig_open"); From nobody Mon May 20 09:08:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjWv849QCz5KWQ5; Mon, 20 May 2024 09:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjWv82RQQz4qwR; Mon, 20 May 2024 09:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716196100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uPyro+lygMklKOj0BZpiWk4a5rozG7ePItiWM1TBn/M=; b=irOE1HYJIAN+RlExIjDwpgTDHF2VHC2t/Zti6kGrUU0RhYc42EZPVd8qnoPXB8IouRTg6n dvA45+lNxMIdwdHEm1KyD5lc6K4n9Y7CgiquEDf9xOURcyXYeh9DgTPcYRfVMDbtcpKCJA cPPQt6YAwscVKvDMYlKhOdCcwcfbOWQ92mddNkiTpyRrcBCLC9GYIbp1mgSTJhPnuixvKQ vDhrjXbQE+aN5kBK+uXAbLOagwBlFtR2ET0Bz3xDCfTXt6mnfW/8a4EQgp5Qf1dxpPg4e8 bDxx2SKfrjireVqv8r6Lpkhlab+ZGa/YFbGf/RA7hDM0G07yT66OinJMdimYqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716196100; a=rsa-sha256; cv=none; b=KeRjY6BsLyqSUK+HT33N4+lrD4U73yBUapAYyPyKaeCF18q54YNTmJlg7agDUKJc699pl4 rF8WFsWrSlHI6KazzOyVSrrYNgp2eb7joPm4+ph6fLio1MrGtm23sx5sXt4Ccd2BOQGDqx zAvCwYYr9vS/KybuTxpqgdcrjER1z2EavB8tUVb1Ex4VMPhgWkZqvUjsTCkUm+gtlZYcVD zcS+UuYyX9K88ppC2mdxNSqjah9dh+0j7kfpvkrkvPT+sLJL+ZXWEmpXkXFA/KTHFTeztY 9U1NfdnA9ThLMQfVBWYqEfHVqrhhU4zBxuPV3J/rvqov4LBs+n+mKJxwmKSTIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716196100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uPyro+lygMklKOj0BZpiWk4a5rozG7ePItiWM1TBn/M=; b=d8+mssiOQmhnQjEbU2rmiOLEBfUPE9gCqhabluX3lmtlyc5M+4GfF/MQzWJG+KrXITrhuO phBCJGBMxHXdMGdsg2+A/qPElDB321YSGxnULU0Py4x4bOVPi+vdjN5hXxmwivfchEA0rW iDabBjRdau2AD85RWAZjO2trOHMpSQvqFBTrhES5XTyonmbwT8pWoIPtn7X9pGF2Wn0TqS hxyWD9sJ+cvxjf2W+myn+RIXarf2cGH157sFbopr/BwBh23IKQCDKUHhkay3+BxcwSUFgC jp7FqQzReJ8xLPlPYZGfJEP+vVmPxU6s4Epj8mcUkTD6ZjIZkMebGq6COeNKrQ== 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 4VjWv81r2JzY7N; Mon, 20 May 2024 09:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K98KwE090628; Mon, 20 May 2024 09:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K98KQY090625; Mon, 20 May 2024 09:08:20 GMT (envelope-from git) Date: Mon, 20 May 2024 09:08:20 GMT Message-Id: <202405200908.44K98KQY090625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 745ee870031e - stable/14 - atf: Guard against multiple evaluation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 745ee870031e3b35141fe720bdebe9baa234e942 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=745ee870031e3b35141fe720bdebe9baa234e942 commit 745ee870031e3b35141fe720bdebe9baa234e942 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-15 10:08:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:54 +0000 atf: Guard against multiple evaluation. Note that the ATF-C++ macros have the same issue, but they are not as easily fixed. MFC after: 3 days Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D45148 (cherry picked from commit a7beca6fb113986839de73b7cf73d933464898c6) --- contrib/atf/atf-c/macros.h | 151 ++++++++++++++++++++++++++++----------------- 1 file changed, 95 insertions(+), 56 deletions(-) diff --git a/contrib/atf/atf-c/macros.h b/contrib/atf/atf-c/macros.h index 1784fc47435d..abcb9f697907 100644 --- a/contrib/atf/atf-c/macros.h +++ b/contrib/atf/atf-c/macros.h @@ -167,65 +167,104 @@ ATF_CHECK_MSG((expected) == (actual), "%s != %s: " fmt, \ #expected, #actual, ##__VA_ARGS__) -#define ATF_REQUIRE_STREQ(expected, actual) \ - ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ - #expected, #actual, expected, actual) - -#define ATF_CHECK_STREQ(expected, actual) \ - ATF_CHECK_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ - #expected, #actual, expected, actual) - -#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) \ - ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, \ - "%s != %s (%s != %s): " fmt, \ - #expected, #actual, expected, actual, ##__VA_ARGS__) - -#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) \ - ATF_CHECK_MSG(strcmp(expected, actual) == 0, \ - "%s != %s (%s != %s): " fmt, \ - #expected, #actual, expected, actual, ##__VA_ARGS__) - -#define ATF_REQUIRE_INTEQ(expected, actual) \ - ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd)", \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual)) - -#define ATF_CHECK_INTEQ(expected, actual) \ - ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd)", #expected, \ - #actual, (intmax_t)(expected), (intmax_t)(actual)) - -#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) \ - ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual), ##__VA_ARGS__) - -#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) \ - ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual), ##__VA_ARGS__) - -#define ATF_REQUIRE_MATCH(regexp, string) \ - ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s'", regexp, string); - -#define ATF_CHECK_MATCH(regexp, string) \ - ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s'", regexp, string); - -#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) \ - ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s': " fmt, regexp, string, \ - ##__VA_ARGS__); - -#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) \ - ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s': " fmt, regexp, string, \ - ##__VA_ARGS__); +#define ATF_REQUIRE_STREQ(expected, actual) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_CHECK_STREQ(expected, actual) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_REQUIRE_INTEQ(expected, actual) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_CHECK_INTEQ(expected, actual) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_CHECK_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_CHECK_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_REQUIRE_MATCH(regexp, string) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s'", _atf_regexp, _atf_string); \ + } while (0) + +#define ATF_CHECK_MATCH(regexp, string) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s'", _atf_regexp, _atf_string); \ + } while (0) + +#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \ + ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \ + ##__VA_ARGS__); \ + } while (0) #define ATF_CHECK_ERRNO(exp_errno, bool_expr) \ - atf_tc_check_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr) + atf_tc_check_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr)) #define ATF_REQUIRE_ERRNO(exp_errno, bool_expr) \ - atf_tc_require_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr) + atf_tc_require_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr)) #endif /* !defined(ATF_C_MACROS_H) */ From nobody Mon May 20 09:08:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjWv96Txjz5KWKQ; Mon, 20 May 2024 09:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjWv945Hbz4r24; Mon, 20 May 2024 09:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716196101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4cx/ipxUwend4+5NOjq9RLK45hx8ZkKic8GGQ/0VtCk=; b=dSlqTdOLfd0NCWuPozwKHuxYThytg2/8IMm7a/4iY3VZOQZKiqICprQLh0dYdHhGK+k5sy 4Itg3+oWvSWRZ2I1t23y1dRy5kA8kRKYoMDgGpKTSq7Re9lZdhAUJJCpKYg/KF+/gJziUB 8bU7otGnMJI1s4OM1X8KdxqI9Vq3yAldf/gwyhnNdncVBE7JwelkY92b4kyHewj83Soc+u TZ5fS+AKlc6QhBhixaxZNn8eApUcW5Dbz3Fb63PvUEg3S23BUH0Os71OjJo2Eq3YXn26D9 Gj32NpwpW6nfMQjb3gFVhCy81vOdKpMGtQd3v0pX690eM0ocliVB7Vmj1YQyZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716196101; a=rsa-sha256; cv=none; b=Qo8w3CaW8i2VxTjf/3+ndMUjdosWcq9n0Ayo8Kf5jrmghritDJqWmUFa2c6CCT+/bw79Lw L+6YDvKjyrjFr+xTNbOIbvFyrT+kuC3pbHWQX/z/8EAfviSsu9XY3hXPVvVHHublTsPn19 K7BHHv4Ba5Dz85vFRP3f3HM9NSLSZX+pw4/f5pq23s3ty5GzzXCIfryQzelORCQTEItZfc 3dQceip/w/8pRFIddrL4QfDNyVtwYZ6h1eDhEEr2snvbxkTOMkLjyMozkSAk6AAHmfn7xK K4YLKMJHZoIo4T8XbwGhqu4Vv0OatwIPTYBl9xhasPigH1jHFclDorhgKmq+XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716196101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4cx/ipxUwend4+5NOjq9RLK45hx8ZkKic8GGQ/0VtCk=; b=WdZk27k4CGsUPOyqygEXYQZOW1MKCZIbw96jcbulmKrcbFHZuGDSgdxrnJvuZ5ZZOhKWvl e+0iVizZH0W6kdkFEB8Ow8Noi1Hi3g2vIrsd2F3v400xlWrDPjPgQLpxRTrZkz7B1nL2st 399CIsv7LIVkYf3QnCNPkwMR/zso10S3p/4C4/AuYRtthfX4IkTE5T2BYZ6+1++Q21VH9R pfzCJeVB2XkQrO5yetxncB14tDLDQBtfTTqLPngibjh8IQw7i78yBHsnPK93OkOquCBWxm C1nbLZOqUXcskHnONwjaXv4DC5vNTL2vyQxG11/Q9o7FuS3Xdkdx0x4oLvMwvQ== 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 4VjWv92PLgzYCq; Mon, 20 May 2024 09:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K98LSt090686; Mon, 20 May 2024 09:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K98LUv090683; Mon, 20 May 2024 09:08:21 GMT (envelope-from git) Date: Mon, 20 May 2024 09:08:21 GMT Message-Id: <202405200908.44K98LUv090683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 7daf36028411 - stable/14 - ldns: Ignore commented-out lines in resolv.conf. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7daf36028411c3a9c73e0c75732f9cbcbf66362e Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7daf36028411c3a9c73e0c75732f9cbcbf66362e commit 7daf36028411c3a9c73e0c75732f9cbcbf66362e Author: Dag-Erling Smørgrav AuthorDate: 2024-05-15 10:16:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:54 +0000 ldns: Ignore commented-out lines in resolv.conf. This merges upstream PR 238 + an additional bug fix. PR: 278721 MFC after: 1 week (cherry picked from commit 3b092e4936c433889cc668ea9563c8fd437d1a3e) --- contrib/ldns/ldns/parse.h | 2 ++ contrib/ldns/parse.c | 35 +++++++++++++++++++++++++++---- contrib/ldns/resolver.c | 53 ++++++++--------------------------------------- 3 files changed, 42 insertions(+), 48 deletions(-) diff --git a/contrib/ldns/ldns/parse.h b/contrib/ldns/ldns/parse.h index ba7edf5679d8..6130dae32bd2 100644 --- a/contrib/ldns/ldns/parse.h +++ b/contrib/ldns/ldns/parse.h @@ -95,6 +95,8 @@ ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, */ ldns_status ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed, const char *delim, int *line_nr); +ssize_t ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, size_t limit, int *line_nr); + /** * returns a token/char from the buffer b. * This function deals with ( and ) in the buffer, diff --git a/contrib/ldns/parse.c b/contrib/ldns/parse.c index 9698ba71e881..af8b2c1321b2 100644 --- a/contrib/ldns/parse.c +++ b/contrib/ldns/parse.c @@ -27,9 +27,14 @@ ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit) return ldns_fget_token_l(f, token, delim, limit, NULL); } -ldns_status -ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed - , const char *delim, int *line_nr) +enum file_type2parse { + zone_file_type, resolv_conf_file_type +}; + +static ldns_status +ldns_fget_token_l_st_file_type(FILE *f, char **token, size_t *limit, + bool fixed, const char *delim, int *line_nr, + enum file_type2parse file_type) { int c, prev_c; int p; /* 0 -> no parentheses seen, >0 nr of ( seen */ @@ -98,7 +103,9 @@ ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed } /* do something with comments ; */ - if (c == ';' && quoted == 0) { + if ((c == ';' + || (c == '#' && file_type == resolv_conf_file_type)) + && quoted == 0) { if (prev_c != '\\') { com = 1; } @@ -215,6 +222,26 @@ tokenread: return i == 0 ? LDNS_STATUS_SYNTAX_EMPTY : LDNS_STATUS_OK; } +ldns_status +ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed + , const char *delim, int *line_nr) +{ + return ldns_fget_token_l_st_file_type( + f, token, limit, fixed, delim, line_nr, zone_file_type); +} + +ssize_t +ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, + size_t limit, int *line_nr) +{ + if (limit == 0) + limit = LDNS_MAX_LINELEN; + if (ldns_fget_token_l_st_file_type(f, &token, &limit, true, delim, + line_nr, resolv_conf_file_type)) + return -1; + else + return (ssize_t)strlen(token); +} ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr) diff --git a/contrib/ldns/resolver.c b/contrib/ldns/resolver.c index f9ec65a55966..a426b82c034e 100644 --- a/contrib/ldns/resolver.c +++ b/contrib/ldns/resolver.c @@ -775,7 +775,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) #endif ssize_t gtr, bgtr; ldns_buffer *b; - int lnr = 0, oldline; + int lnr = 0; FILE* myfp = fp; if(!line_nr) line_nr = &lnr; @@ -809,36 +809,18 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) gtr = 1; word[0] = 0; - oldline = *line_nr; expect = LDNS_RESOLV_KEYWORD; while (gtr > 0) { - /* check comments */ - if (word[0] == '#') { - word[0]='x'; - if(oldline == *line_nr) { - /* skip until end of line */ - int c; - do { - c = fgetc(myfp); - } while(c != EOF && c != '\n'); - if(c=='\n') (*line_nr)++; - } - /* and read next to prepare for further parsing */ - oldline = *line_nr; - continue; - } - oldline = *line_nr; switch(expect) { case LDNS_RESOLV_KEYWORD: /* keyword */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr != 0) { - if(word[0] == '#') continue; for(i = 0; i < LDNS_RESOLV_KEYWORDS; i++) { if (strcasecmp(keyword[i], word) == 0) { /* chosen the keyword and * expect values carefully - */ + */ expect = i; break; } @@ -856,16 +838,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_DEFDOMAIN: /* default domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { if(!fp) fclose(myfp); @@ -879,16 +857,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_NAMESERVER: /* NS aaaa or a record */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } if(strchr(word, '%')) { /* snip off interface labels, * fe80::222:19ff:fe31:4222%eth0 */ @@ -911,7 +885,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_SEARCH: /* search list domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); b = LDNS_MALLOC(ldns_buffer); if(!b) { ldns_resolver_deep_free(r); @@ -929,10 +903,6 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) bgtr = ldns_bget_token(b, word, LDNS_PARSE_NORMAL, (size_t) gtr + 1); while (bgtr > 0) { gtr -= bgtr; - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - break; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { ldns_resolver_deep_free(r); @@ -954,28 +924,23 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) } break; case LDNS_RESOLV_SORTLIST: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* sortlist not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_OPTIONS: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* options not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_ANCHOR: /* a file containing a DNSSEC trust anchor */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { ldns_resolver_deep_free(r); if(!fp) fclose(myfp); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } - #ifdef HAVE_SSL tmp_rr = ldns_read_anchor_file(word); (void) ldns_resolver_push_dnssec_anchor(r, tmp_rr); From nobody Mon May 20 09:35:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjXV05QXGz5KZVw; Mon, 20 May 2024 09:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjXV04lcyz4t4M; Mon, 20 May 2024 09:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Uz7lnOXG481NMh4ETQqmgh930TDZkoYSbUlZyWnf50=; b=r4Fofp+WCnJbHl/YLR5S233vI5dVYMhqjIzZmlIQl8fx1onl8r6QXSNtzPm7K+hGZ75PJj tfQ0b7DX/cuNrXslgJsaQYkwk93US3iG2Omaw5p/DhtVr+r2qK3JtcCrfpC+FKBH0aAzqq 4Z8fTVpxhEBu81HgFrLI4z6LQgf23RMXmbcf/7jEVtCjcI9YBf092EsUFbtXLAq08g2I44 5ZZA7ze/sW8SIxjOwCvBlnVWJlZ9nZEJvgQ9US8nBlJXqgcjz6U/XIQy2AMOTmQa+kVsDU u8AjCfcMMzZwbXAwA5apWnd7z2eg1tWnszTjpoDP+3Cu+08vumzmH+XNEhUrUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716197704; a=rsa-sha256; cv=none; b=MKfDDkERFrmyOYgk/tgPRmepEmmubuhwfTpWooVpi9ER4ozfCmnuu0Q9LQle6g9huTMczB UMQOjNzekqUNBSqtB7XxHLqheaXqWMw/cCB/A3seqXw2DJviYMvnwuLtyNtTEGr3dy6kpQ HmXLhuF+Rd3rUek9VyvJKZv25ZA0A/fuDnwxHvX4Q2DBpH6jStZBAosMfHyKV6ibf0/xry Xl9ZLXJMSy6bl8AR/vRNEqvOEdlFk6FOtXYn+w3ibYNIo0rvCUfDdAxMHYRyjeNQRVRcMJ 4YealxbGlPj8y/UBkJy9bhIoViJchaz/P/RevLcT7dRUhrAzAdjTuia/x7T0RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Uz7lnOXG481NMh4ETQqmgh930TDZkoYSbUlZyWnf50=; b=UfxuTZjXPNudRa2luDLy3NGeqKaeP6AnI+GiAREXUzslOGvGgKdPXwTfInaoR1owZMKty8 trxhnnPmFyVKNDs82yTAbHwIvV64DPcvccsndTgwXdOGYo+NTxosO+hDm88dalUWeXONwL AnNT5W/Fhl1hQNUpU9xu8SSXE+XGolzg0uB4KTl6TIk01ON7lCwqdXD2drNk5MLExrwpI8 OalB7QSv7N08ZEtxXLVTOgVlIEcdf7Htw1DFjZV1Kaj3dpHJooQj06+q1rEVUzYd6uAALV 6Q37iwaZ1+MBJNrFBF6vId6MaT1uC9elqQMlIdmAIpoQM6eNOkYoxtPY8CkYLQ== 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 4VjXV04M3lzYHx; Mon, 20 May 2024 09:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K9Z4Pf039691; Mon, 20 May 2024 09:35:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K9Z4O3039688; Mon, 20 May 2024 09:35:04 GMT (envelope-from git) Date: Mon, 20 May 2024 09:35:04 GMT Message-Id: <202405200935.44K9Z4O3039688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 54290c48db65 - stable/13 - ifconfig: Add format shortcuts. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 54290c48db65986b9953e27420c86a18c3bb21f7 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=54290c48db65986b9953e27420c86a18c3bb21f7 commit 54290c48db65986b9953e27420c86a18c3bb21f7 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-14 06:51:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:58 +0000 ifconfig: Add format shortcuts. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45166 (cherry picked from commit 847ef59d4b5eab234bd1f8eb947ad74bdab5614e) --- sbin/ifconfig/ifconfig.8 | 14 ++++++++++++-- sbin/ifconfig/ifconfig.c | 41 +++++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index f280a263cb51..28b6f2dfb72e 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" -.Dd February 1, 2023 +.Dd May 12, 2024 .Dt IFCONFIG 8 .Os .Sh NAME @@ -131,7 +131,7 @@ and their associated .Ar format strings are: .Pp -.Bl -tag -width ether +.Bl -tag -width default .It Cm addr Adjust the display of inet and inet6 addresses: .Pp @@ -193,6 +193,16 @@ Integer format, for example: .Ql prefixlen 64 .El .El +.Pp +In addition, the following shortcuts are accepted: +.Bl -tag -width default +.It Cm default +Resets all formats to their default values. +.It Cm cidr +Shortcut notation for +.Cm inet:cidr,inet6:cidr . +.El +.Pp .It Fl G Ar groupname Exclude members of the specified .Ar groupname diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 1537edfc5ea2..74dfb73f565f 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -303,14 +303,10 @@ cmpifaddrs(struct ifaddrs *a, struct ifaddrs *b, struct ifa_queue *q) static void freeformat(void) { - if (f_inet != NULL) - free(f_inet); - if (f_inet6 != NULL) - free(f_inet6); - if (f_ether != NULL) - free(f_ether); - if (f_addr != NULL) - free(f_addr); + free(f_inet); + free(f_inet6); + free(f_ether); + free(f_addr); } static void setformat(char *input) @@ -320,9 +316,18 @@ static void setformat(char *input) formatstr = strdup(input); while ((category = strsep(&formatstr, ",")) != NULL) { modifier = strchr(category, ':'); - if (modifier == NULL || modifier[1] == '\0') { - warnx("Skipping invalid format specification: %s\n", - category); + if (modifier == NULL) { + if (strcmp(category, "default") == 0) { + freeformat(); + } else if (strcmp(category, "cidr") == 0) { + free(f_inet); + f_inet = strdup(category); + free(f_inet6); + f_inet6 = strdup(category); + } else { + warnx("Skipping invalid format: %s\n", + category); + } continue; } @@ -330,14 +335,19 @@ static void setformat(char *input) modifier[0] = '\0'; modifier++; - if (strcmp(category, "addr") == 0) + if (strcmp(category, "addr") == 0) { + free(f_addr); f_addr = strdup(modifier); - else if (strcmp(category, "ether") == 0) + } else if (strcmp(category, "ether") == 0) { + free(f_ether); f_ether = strdup(modifier); - else if (strcmp(category, "inet") == 0) + } else if (strcmp(category, "inet") == 0) { + free(f_inet); f_inet = strdup(modifier); - else if (strcmp(category, "inet6") == 0) + } else if (strcmp(category, "inet6") == 0) { + free(f_inet6); f_inet6 = strdup(modifier); + } } free(formatstr); } @@ -427,7 +437,6 @@ main(int argc, char *argv[]) #endif all = downonly = uponly = namesonly = noload = verbose = 0; - f_inet = f_inet6 = f_ether = f_addr = NULL; matchgroup = nogroup = NULL; lifh = ifconfig_open(); From nobody Mon May 20 09:35:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjXV2032Yz5KZ4L; Mon, 20 May 2024 09:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjXV15mWxz4tMx; Mon, 20 May 2024 09:35:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSIE3yzHQvXkshHz0eDF3TRkv8Gw8FFtlxp6ZE8yBeI=; b=hvAMLTZZTOWdVTYkkwXRr6xtmqElwEUjpk87AGqIPo4CoauxwK4S0BJjFH4ZRut0ABJaDB psmc9de6e8bT66VP1/H3lUDbNkeoyko34QFGxmKXNICaqH0HwF+Boq6NsBtAq1hhETsI5U /il/2TPtTmETEtFFddJt8gaWOuju9q9IaHWYdz2HYFfvoPbz1O8popL4dCpaBjFpOGVqO4 CHRjrtbzXM081LMU540W4kGkLkfHvDo0toVPgRNiCUktnwjcrAqAiTSatb4DuyA747JFRw 6d6Z4mzAOCu8knN41zYGjdF7HghkfM8OeDGT50OqMWLcobmBYitC4Xr15+h13Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716197705; a=rsa-sha256; cv=none; b=lm+4B8P3a5sGRl7zMBMwWWz4/K+mRJCSme8tWAROYOQqNoXBAb4WAm8dXRqeygr7SugG0U O/fwl/5wllhfvJ7sDBCV6TkZQvvP0AWQssJXl2PkazMj4P/O3Fi3sV+QWMqkgZQ+WGWVm2 SRKsFMYJndHyO5j1DcTCw52r7tu08vNvbraWX492wGYTA2nndAvzOmPOOMkktkk3YMDMb5 wunhozp804eZ5PTKFB+uLL+CuixdQo94EdW5ms0w55RgxZ5cf7yTDQ3HKvGi2QX0DQMIBg G26H8XawZlbKhvN9VA1EjDidJ1RSjj0hizTy7/RvbDOeLwU1WWDIyF1v8zqQuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSIE3yzHQvXkshHz0eDF3TRkv8Gw8FFtlxp6ZE8yBeI=; b=Ul6Wpn/u6S52dLk/QY6xAkyeDVfTs54IDBhNW5sxkG22NWv2UfIoRe/4RzwpkpxThGrJJq 40Ja3tQdDTxEWASPXNvtoQzPIrsxR5h8oTsSYWbhDOPzeG3jWblcrjsaM75fLuZFKOwQ54 LrVU84Ai7lo9iGbVO1yrAFudS3c4GA+N/DTayWtDkbEAxyDMfwa0tQYWRcMQiCQcMm9znj EHyIcVW+QqgFjaD70adMys9fE+r+3z6JgBgZLEesMZLOajhBwbqyTPnVyXdNqWq9IaqUQc wGeNiIPeGIPs/eTWW6Z/UKgCNV4EUjsGIV9Bet6f/mMS18UPMmxySYRyGznJ6g== 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 4VjXV15MQVzYXq; Mon, 20 May 2024 09:35:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K9Z5lf039737; Mon, 20 May 2024 09:35:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K9Z5PY039734; Mon, 20 May 2024 09:35:05 GMT (envelope-from git) Date: Mon, 20 May 2024 09:35:05 GMT Message-Id: <202405200935.44K9Z5PY039734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: fe623d689bd7 - stable/13 - Import atf 0.22 snapshot 55c21b2c5fb189bbdfccb2b297bfa89236502542 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: fe623d689bd7dc3bb6f5418e53fac454999e8dce Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fe623d689bd7dc3bb6f5418e53fac454999e8dce commit fe623d689bd7dc3bb6f5418e53fac454999e8dce Author: Alan Somers AuthorDate: 2021-09-10 23:08:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:59 +0000 Import atf 0.22 snapshot 55c21b2c5fb189bbdfccb2b297bfa89236502542 The main improvement is the ability to skip a test that is expected to fail. (cherry picked from commit 71a1ae7cebd3791d4d18ac9620a7a4ce8cf15819) --- contrib/atf/atf-c/atf-c.3 | 27 ++++++++++++++++++++++----- contrib/atf/atf-c/macros.h | 19 +++++++++++++++++++ contrib/atf/atf-c/tc.c | 12 +++--------- contrib/atf/atf-sh/atf-check.cpp | 4 ++-- contrib/atf/atf-sh/atf-sh.3 | 12 ++++++------ 5 files changed, 52 insertions(+), 22 deletions(-) diff --git a/contrib/atf/atf-c/atf-c.3 b/contrib/atf/atf-c/atf-c.3 index d7aa8c382dff..c38e068bb380 100644 --- a/contrib/atf/atf-c/atf-c.3 +++ b/contrib/atf/atf-c/atf-c.3 @@ -22,7 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd April 5, 2017 +.Dd February 23, 2021 .Dt ATF-C 3 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm ATF_CHECK_MATCH_MSG , .Nm ATF_CHECK_STREQ , .Nm ATF_CHECK_STREQ_MSG , +.Nm ATF_CHECK_INTEQ , +.Nm ATF_CHECK_INTEQ_MSG , .Nm ATF_CHECK_ERRNO , .Nm ATF_REQUIRE , .Nm ATF_REQUIRE_MSG , @@ -44,6 +46,8 @@ .Nm ATF_REQUIRE_MATCH_MSG , .Nm ATF_REQUIRE_STREQ , .Nm ATF_REQUIRE_STREQ_MSG , +.Nm ATF_REQUIRE_INTEQ , +.Nm ATF_REQUIRE_INTEQ_MSG , .Nm ATF_REQUIRE_ERRNO , .Nm ATF_TC , .Nm ATF_TC_BODY , @@ -96,8 +100,10 @@ .Fn ATF_CHECK_EQ_MSG "expected_expression" "actual_expression" "fail_msg_fmt" ... .Fn ATF_CHECK_MATCH "regexp" "string" .Fn ATF_CHECK_MATCH_MSG "regexp" "string" "fail_msg_fmt" ... -.Fn ATF_CHECK_STREQ "string_1" "string_2" -.Fn ATF_CHECK_STREQ_MSG "string_1" "string_2" "fail_msg_fmt" ... +.Fn ATF_CHECK_STREQ "expected_string" "actual_string" +.Fn ATF_CHECK_STREQ_MSG "expected_string" "actual_string" "fail_msg_fmt" ... +.Fn ATF_CHECK_INTEQ "expected_int" "actual_int" +.Fn ATF_CHECK_INTEQ_MSG "expected_int" "actual_int" "fail_msg_fmt" ... .Fn ATF_CHECK_ERRNO "expected_errno" "bool_expression" .Fn ATF_REQUIRE "expression" .Fn ATF_REQUIRE_MSG "expression" "fail_msg_fmt" ... @@ -107,6 +113,8 @@ .Fn ATF_REQUIRE_MATCH_MSG "regexp" "string" "fail_msg_fmt" ... .Fn ATF_REQUIRE_STREQ "expected_string" "actual_string" .Fn ATF_REQUIRE_STREQ_MSG "expected_string" "actual_string" "fail_msg_fmt" ... +.Fn ATF_REQUIRE_INTEQ "expected_int" "actual_int" +.Fn ATF_REQUIRE_INTEQ_MSG "expected_int" "actual_int" "fail_msg_fmt" ... .Fn ATF_REQUIRE_ERRNO "expected_errno" "bool_expression" .\" NO_CHECK_STYLE_END .Fn ATF_TC "name" @@ -494,7 +502,7 @@ and .Fn ATF_REQUIRE_EQ_MSG take two expressions and fail if the two evaluated values are not equal. The common style is to put the expected value in the first parameter and the -actual value in the second parameter. +observed value in the second parameter. .Pp .Fn ATF_CHECK_MATCH , .Fn ATF_CHECK_MATCH_MSG , @@ -513,7 +521,16 @@ and .Fn ATF_REQUIRE_STREQ_MSG take two strings and fail if the two are not equal character by character. The common style is to put the expected string in the first parameter and the -actual string in the second parameter. +observed string in the second parameter. +.Pp +.Fn ATF_CHECK_INTEQ , +.Fn ATF_CHECK_INTEQ_MSG , +.Fn ATF_REQUIRE_INTEQ +and +.Fn ATF_REQUIRE_INTQ_MSG +take two integers and fail if the two are not equal. +The common style is to put the expected integer in the first parameter and the +observed integer in the second parameter. .Pp .Fn ATF_CHECK_ERRNO and diff --git a/contrib/atf/atf-c/macros.h b/contrib/atf/atf-c/macros.h index 485a159acecb..1784fc47435d 100644 --- a/contrib/atf/atf-c/macros.h +++ b/contrib/atf/atf-c/macros.h @@ -185,6 +185,25 @@ "%s != %s (%s != %s): " fmt, \ #expected, #actual, expected, actual, ##__VA_ARGS__) +#define ATF_REQUIRE_INTEQ(expected, actual) \ + ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd)", \ + #expected, #actual, (intmax_t)(expected), \ + (intmax_t)(actual)) + +#define ATF_CHECK_INTEQ(expected, actual) \ + ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd)", #expected, \ + #actual, (intmax_t)(expected), (intmax_t)(actual)) + +#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) \ + ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ + #expected, #actual, (intmax_t)(expected), \ + (intmax_t)(actual), ##__VA_ARGS__) + +#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) \ + ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ + #expected, #actual, (intmax_t)(expected), \ + (intmax_t)(actual), ##__VA_ARGS__) + #define ATF_REQUIRE_MATCH(regexp, string) \ ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ "'%s' not matched in '%s'", regexp, string); diff --git a/contrib/atf/atf-c/tc.c b/contrib/atf/atf-c/tc.c index 69b31123f3a3..84a8beb4fa13 100644 --- a/contrib/atf/atf-c/tc.c +++ b/contrib/atf/atf-c/tc.c @@ -381,15 +381,9 @@ pass(struct context *ctx) static void skip(struct context *ctx, atf_dynstr_t *reason) { - if (ctx->expect == EXPECT_PASS) { - create_resfile(ctx, "skipped", -1, reason); - context_close_resfile(ctx); - exit(EXIT_SUCCESS); - } else { - error_in_expect(ctx, "Can only skip a test case when running in " - "expect pass mode"); - } - UNREACHABLE; + create_resfile(ctx, "skipped", -1, reason); + context_close_resfile(ctx); + exit(EXIT_SUCCESS); } /** Formats a failure/skip reason message. diff --git a/contrib/atf/atf-sh/atf-check.cpp b/contrib/atf/atf-sh/atf-check.cpp index 38ab527aab54..4cb1e33a005a 100644 --- a/contrib/atf/atf-sh/atf-check.cpp +++ b/contrib/atf/atf-sh/atf-check.cpp @@ -501,7 +501,7 @@ compare_files(const atf::fs::path& p1, const atf::fs::path& p2) std::ifstream f2(p2.c_str()); if (!f2) - throw std::runtime_error("Failed to open " + p1.str()); + throw std::runtime_error("Failed to open " + p2.str()); for (;;) { char buf1[512], buf2[512]; @@ -512,7 +512,7 @@ compare_files(const atf::fs::path& p1, const atf::fs::path& p2) f2.read(buf2, sizeof(buf2)); if (f2.bad()) - throw std::runtime_error("Failed to read from " + p1.str()); + throw std::runtime_error("Failed to read from " + p2.str()); if ((f1.gcount() == 0) && (f2.gcount() == 0)) { equal = true; diff --git a/contrib/atf/atf-sh/atf-sh.3 b/contrib/atf/atf-sh/atf-sh.3 index 5d1119b2b5dc..c3080c296826 100644 --- a/contrib/atf/atf-sh/atf-sh.3 +++ b/contrib/atf/atf-sh/atf-sh.3 @@ -22,7 +22,7 @@ .\" 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 June 08, 2017 +.Dd January 27, 2021 .Dt ATF-SH 3 .Os .Sh NAME @@ -361,21 +361,21 @@ This example demonstrates the use of the very useful function: .Bd -literal -offset indent # Check for silent output -atf_check -s exit:0 -o empty -e empty 'true' +atf_check -s exit:0 -o empty -e empty true # Check for silent output and failure -atf_check -s exit:1 -o empty -e empty 'false' +atf_check -s exit:1 -o empty -e empty false # Check for known stdout and silent stderr echo foo >expout -atf_check -s exit:0 -o file:expout -e empty 'echo foo' +atf_check -s exit:0 -o file:expout -e empty echo foo # Generate a file for later inspection -atf_check -s exit:0 -o save:stdout -e empty 'ls' +atf_check -s exit:0 -o save:stdout -e empty ls grep foo ls || atf_fail "foo file not found in listing" # Or just do the match along the way -atf_check -s exit:0 -o match:"^foo$" -e empty 'ls' +atf_check -s exit:0 -o match:"^foo$" -e empty ls .Ed .Sh SEE ALSO .Xr atf-check 1 , From nobody Mon May 20 09:35:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjXV34tcYz5KZWX; Mon, 20 May 2024 09:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjXV30T6pz4tQZ; Mon, 20 May 2024 09:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0q4MObuoZFHZ2tn/4aiO6Oprq5124GVsCb56Y3hmhc=; b=O0bVoCSFEvPWrB6xusOnmI1Q+6F+ECwZiXyX2GSjNaOSe4BycJqk+sG0KxSJAl0bBMsHLJ YUQBl0Q+1jcXPg8UGWKf/BGPFFRQ4EVO7EqUR1rnPw/n/6ti/uuuj0Pb7gy3xt6t9YKD2m kOllB7c1vczzstEHXGeS2GuuiSPqtfoNNAo6gO2JXHpgKoJkqorlniumL9bXYUZexltSnF 9rM2mBcilDIZVqwYQEiD/ygiWK/XDkGhVrj/8w5XOes5A8AsuoLmgoy9H40gb/oBrp2aNb rGLV1dP4iUHn+6v2Mk6dg9TkanDQDjGEpMsJJZMrlGj3aD0GL6bCMIt5K36oYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716197707; a=rsa-sha256; cv=none; b=sataKIa9dWRnRbSTWDXPGViHdVamTkOslxNRlucGvO6HJrbqjUKK3a19KDjMETmBTzluN6 VFdUGyGB/Dfheqq2Lqf0PJL4lnX7AFG4+0dhrZnWo+9cOxg3Td0ntcW3DJNI38G+qhWHh9 z5p/pNcAqr+9vyWVQTkAMQCy6mJJJjdjJfHtfNijwP3G2LydFTyKXdgE0VYBfsH4rV6K67 ke5DuvaaWg8SMmNvyyEfpXbQqke3GiIwDVmPvQNqml2B94vitmrkks1IMnIfETC9HkuR0o Rj6Pal69PLycXqwC2esL+4CxuXZ70akHKALjnya+nya7wznj5foCzPSu8TYImA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0q4MObuoZFHZ2tn/4aiO6Oprq5124GVsCb56Y3hmhc=; b=TiuC95PA2jQgTzQBrunpuu009IM++lIZomz4whZGgESlNsi8nS5tR0uTjLD8xxWnBadxIi c+HskDybzxY0Os2kPLpCBkhv+jv7Q5i8fxipwYvkEySQhjSXpmJ7vxFc2DYVIdeR+da2Si EGzSyX6re/3j8mOKPWi1oOFMQyDv6UR3sluas1lS5dSq0x5K248veSge1j4r9r5kB0n52j aSLA605M1tdQIStq8ZeG5WfdQ1yDV0sOg4lVqWdB4SldGJHbTtpDELUUGgQpnWi7Ux+JI/ 40HwU6CdL6c18eENR85/Dj24wXM6cRkHEjCwL2aXd2ay7tU9wpph0gEc/a0L8g== 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 4VjXV25vCczYXr; Mon, 20 May 2024 09:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K9Z6S9039779; Mon, 20 May 2024 09:35:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K9Z6Hc039776; Mon, 20 May 2024 09:35:06 GMT (envelope-from git) Date: Mon, 20 May 2024 09:35:06 GMT Message-Id: <202405200935.44K9Z6Hc039776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a8177d8f570f - stable/13 - atf-sh: fix comment typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a8177d8f570f52b60fc8af6926f9f5db69334239 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a8177d8f570f52b60fc8af6926f9f5db69334239 commit a8177d8f570f52b60fc8af6926f9f5db69334239 Author: Igor Ostapenko AuthorDate: 2023-12-26 23:21:54 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:59 +0000 atf-sh: fix comment typo Signed-off-by: Igor Ostapenko Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/895 (cherry picked from commit d4d14d965fb92d2bceb744be41310dc47f27ab80) --- contrib/atf/atf-sh/libatf-sh.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/atf/atf-sh/libatf-sh.subr b/contrib/atf/atf-sh/libatf-sh.subr index a2478b6a9be1..af2b75e5fe34 100644 --- a/contrib/atf/atf-sh/libatf-sh.subr +++ b/contrib/atf/atf-sh/libatf-sh.subr @@ -358,7 +358,7 @@ atf_require_prog() # # Sets the test case's variable 'varname' to the specified values # which are concatenated using a single blank space. This function -# is supposed to be called form the test case's head only. +# is supposed to be called from the test case's head only. # atf_set() { From nobody Mon May 20 09:35:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjXV50VTpz5KZCv; Mon, 20 May 2024 09:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjXV40DN0z4t4f; Mon, 20 May 2024 09:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uF3jUX02zaqmUh6j0iPFkKscVhb91CiTDjIb4IdAPqg=; b=T8TgTWRSwgZOWQ9Xnispg683/W5+s7NH0PgsOH71yHXF/qwjeAHthRu75n2tYVdNAdZkty trpaeHmXq9Xx3Qqe7Puw6XV0u4CAKCMY3+arwhIBEHCKGiy7QzPlKR1D6p+zkYyIYD4Oip 5VeeLYFvc5fK408TWT9qNyEB2INkNNH7QTxnQPi9P01hrjEeC1Gz9HvPtYEWoD3t/7YpdV /DUt1PHHV8WDnZwydFQcZHypAuPZWZbBFLMcK/xBN6/SKrPzxOX7Ifl2iDELp4KVPDcuG8 V/fteBJRvQ+AQyFRTBzfmYtyDf6/R6I3nNokRQ8+pSREM3nZ7CLP5IndWueUUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716197708; a=rsa-sha256; cv=none; b=Z3NYsR6J6oGX6OZBS1TM9GlfR7DHqC43+0kegakzrf0WwbN7sOvye8wUHCs718toHz2d+g suYuiHGx1bFlBHBnKuuN24GYKNuaYd0eRcoz6KDIfp+woYkUxmAi87ULVCKlbW0ItLui+1 ns54kKzBfHxP+q/XfK2Pv0OyVPqZe2Z4wejpS+R28TRC2kqomhYAm5M48ggWG9ThVeAi6D M07IuuQLvIE1nW4KEPA0AD88hKuWr5FAEFXnKIFUk0z2qBSsOZimHy86G4Ax6wPvWWWV6z 2tzHewbDhk6aCxuEGESbEgun6n9RtoGjW7w5TsM+2Dy2MkZcFTKJmYJ0GhyR1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uF3jUX02zaqmUh6j0iPFkKscVhb91CiTDjIb4IdAPqg=; b=pelSDDTICzU5Nne6h1wY6XxFt6Upsy78sSSiBJWiFXIagXo3zP7q37U7iSL+oX+2ciZyBK +igrJnGPtRe8WMiZ0EJYI/UZJVrJTJWZ0I5u+DLrGBvsEahBY4xdamW14UzVTptTzYR0kX va3aAPuWq/7K4pUTEbbWVig5Pi5qPgyoJQL/G5CA0fDufgpr4xIUz+FcG8/n0WXkn2C258 Tq2et94RPsua3XbBlTfoHdF+O3RmHWee6bL88nqrZ6zeZ/uh6MsPY7UlTyE60YgOczcxJy 9XrIXZiYUlAzasuQOQENtkgEoPX7vrp6r7Gvt1hZye83Qb6y2obQCvu4gtnhQw== 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 4VjXV36v8WzYT3; Mon, 20 May 2024 09:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K9Z72R039824; Mon, 20 May 2024 09:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K9Z7of039821; Mon, 20 May 2024 09:35:07 GMT (envelope-from git) Date: Mon, 20 May 2024 09:35:07 GMT Message-Id: <202405200935.44K9Z7of039821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d16bc4fda821 - stable/13 - atf: Guard against multiple evaluation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d16bc4fda8215adab6b1c219ec2edd862fd757ac Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d16bc4fda8215adab6b1c219ec2edd862fd757ac commit d16bc4fda8215adab6b1c219ec2edd862fd757ac Author: Dag-Erling Smørgrav AuthorDate: 2024-05-15 10:08:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:59 +0000 atf: Guard against multiple evaluation. Note that the ATF-C++ macros have the same issue, but they are not as easily fixed. MFC after: 3 days Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D45148 (cherry picked from commit a7beca6fb113986839de73b7cf73d933464898c6) --- contrib/atf/atf-c/macros.h | 151 ++++++++++++++++++++++++++++----------------- 1 file changed, 95 insertions(+), 56 deletions(-) diff --git a/contrib/atf/atf-c/macros.h b/contrib/atf/atf-c/macros.h index 1784fc47435d..abcb9f697907 100644 --- a/contrib/atf/atf-c/macros.h +++ b/contrib/atf/atf-c/macros.h @@ -167,65 +167,104 @@ ATF_CHECK_MSG((expected) == (actual), "%s != %s: " fmt, \ #expected, #actual, ##__VA_ARGS__) -#define ATF_REQUIRE_STREQ(expected, actual) \ - ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ - #expected, #actual, expected, actual) - -#define ATF_CHECK_STREQ(expected, actual) \ - ATF_CHECK_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ - #expected, #actual, expected, actual) - -#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) \ - ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, \ - "%s != %s (%s != %s): " fmt, \ - #expected, #actual, expected, actual, ##__VA_ARGS__) - -#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) \ - ATF_CHECK_MSG(strcmp(expected, actual) == 0, \ - "%s != %s (%s != %s): " fmt, \ - #expected, #actual, expected, actual, ##__VA_ARGS__) - -#define ATF_REQUIRE_INTEQ(expected, actual) \ - ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd)", \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual)) - -#define ATF_CHECK_INTEQ(expected, actual) \ - ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd)", #expected, \ - #actual, (intmax_t)(expected), (intmax_t)(actual)) - -#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) \ - ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual), ##__VA_ARGS__) - -#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) \ - ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual), ##__VA_ARGS__) - -#define ATF_REQUIRE_MATCH(regexp, string) \ - ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s'", regexp, string); - -#define ATF_CHECK_MATCH(regexp, string) \ - ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s'", regexp, string); - -#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) \ - ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s': " fmt, regexp, string, \ - ##__VA_ARGS__); - -#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) \ - ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s': " fmt, regexp, string, \ - ##__VA_ARGS__); +#define ATF_REQUIRE_STREQ(expected, actual) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_CHECK_STREQ(expected, actual) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_REQUIRE_INTEQ(expected, actual) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_CHECK_INTEQ(expected, actual) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_CHECK_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_CHECK_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_REQUIRE_MATCH(regexp, string) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s'", _atf_regexp, _atf_string); \ + } while (0) + +#define ATF_CHECK_MATCH(regexp, string) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s'", _atf_regexp, _atf_string); \ + } while (0) + +#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \ + ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \ + ##__VA_ARGS__); \ + } while (0) #define ATF_CHECK_ERRNO(exp_errno, bool_expr) \ - atf_tc_check_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr) + atf_tc_check_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr)) #define ATF_REQUIRE_ERRNO(exp_errno, bool_expr) \ - atf_tc_require_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr) + atf_tc_require_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr)) #endif /* !defined(ATF_C_MACROS_H) */ From nobody Mon May 20 09:35:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjXV52qDWz5KZg9; Mon, 20 May 2024 09:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjXV51Kgbz4tKG; Mon, 20 May 2024 09:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dlkMbBSU3qWhHGsJbLRrWuPdL+yxKp/gKeTNrXVAUnc=; b=CJAuRdlU9hBHGbNErLbEBWr47a0H1HqrmLsTeX6XP3Jt8QTkFjMB3WdCCXsHBagjznPXUE llIBt8iEsJlWOYoyAvBnW8wKzh3AeskKjWkE5Nokv5h5YEedAhsMoPF0OmLXpKizFPOgYe Zkbob8MUaW8ZOrZMxTr9Lg+i5ALc0zWWEH2jYOeE3AXo+GiI82BhTBm73KeBQlsBAb+EdI Ll3/S0tIFSWV+2dv/bBM8D+iUnz0JX1HNP3AXmrO5i1sPsZc9YTs/j5FSJUkWFUfN1OjXs fR6Nr3DavH2oQzDq4hSST8KakhiRbE9f6IqbfEs2LF/8hEAwdeIAIbxTQTlmSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716197709; a=rsa-sha256; cv=none; b=vgxxSPIvAeBCiNdJYfidZ5cBrDR9PdO4BqfuR0VMI83o/SsRVCyNtRABSfTeW5090QKlw4 uSyc5hKn12J+GnoSWkPdkn473R97cgEicqYjKFX9H1oHqrdY8BGVCi2/5gduG78z3tsw6w OBdbncKfodLHUs5F3ZWjFunCFH3RumlSv6HvrIhUmN+xmLGPe9U6PIMu+J5+4zRXStn/sT 27ak9O1TeU115TW4vdl/Xh5UxhvQ96WR2HHYzEYASYENdTAOqF83tlkSqS13VmGQwzgl95 25Y/eyoiXdMi23uKGoifAc0wh9IMj4VexEA63fB5lKMDioBGeQMtE3FlMaI6Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716197709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dlkMbBSU3qWhHGsJbLRrWuPdL+yxKp/gKeTNrXVAUnc=; b=QNPE3s+MXMq5X+bSDLqwUPsXBGsQ9hi8OTId0cvre87MkTltR6SMWJZn/81/JVX/i4RwqE azh+wvfHE5fe1uoWl9IcFPZWSog3Oez0yAYVsycNOZCkkgM1iBmkHGTPQ03Wre3IagpmH9 OxQ4tCMDtPKg6KhSYXJL29363CA80ziUrI3a8LL6oKrnPRvpJi0QHpndU9p/QgxCe8gtFf Us/i7D/myp8QMuD/DZNw7EY9Fr39YV2505WKaLP+3HmYkYzBOSpPouDOwVLI63Q/Sk8Wvb +kCWke6k9rn1PFVFq4gQ5pxzCFiUSzSCRBiCImyXGqOCiGvRoOVUX9Uh8IFNDg== 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 4VjXV50jgMzYjL; Mon, 20 May 2024 09:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K9Z8Jw039875; Mon, 20 May 2024 09:35:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K9Z82g039872; Mon, 20 May 2024 09:35:08 GMT (envelope-from git) Date: Mon, 20 May 2024 09:35:08 GMT Message-Id: <202405200935.44K9Z82g039872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: e95e16191f63 - stable/13 - ldns: Ignore commented-out lines in resolv.conf. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e95e16191f63240971687634a23c2defed64d713 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e95e16191f63240971687634a23c2defed64d713 commit e95e16191f63240971687634a23c2defed64d713 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-15 10:16:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 09:04:59 +0000 ldns: Ignore commented-out lines in resolv.conf. This merges upstream PR 238 + an additional bug fix. PR: 278721 MFC after: 1 week (cherry picked from commit 3b092e4936c433889cc668ea9563c8fd437d1a3e) --- contrib/ldns/ldns/parse.h | 2 ++ contrib/ldns/parse.c | 35 +++++++++++++++++++++++++++---- contrib/ldns/resolver.c | 53 ++++++++--------------------------------------- 3 files changed, 42 insertions(+), 48 deletions(-) diff --git a/contrib/ldns/ldns/parse.h b/contrib/ldns/ldns/parse.h index ba7edf5679d8..6130dae32bd2 100644 --- a/contrib/ldns/ldns/parse.h +++ b/contrib/ldns/ldns/parse.h @@ -95,6 +95,8 @@ ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, */ ldns_status ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed, const char *delim, int *line_nr); +ssize_t ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, size_t limit, int *line_nr); + /** * returns a token/char from the buffer b. * This function deals with ( and ) in the buffer, diff --git a/contrib/ldns/parse.c b/contrib/ldns/parse.c index 9698ba71e881..af8b2c1321b2 100644 --- a/contrib/ldns/parse.c +++ b/contrib/ldns/parse.c @@ -27,9 +27,14 @@ ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit) return ldns_fget_token_l(f, token, delim, limit, NULL); } -ldns_status -ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed - , const char *delim, int *line_nr) +enum file_type2parse { + zone_file_type, resolv_conf_file_type +}; + +static ldns_status +ldns_fget_token_l_st_file_type(FILE *f, char **token, size_t *limit, + bool fixed, const char *delim, int *line_nr, + enum file_type2parse file_type) { int c, prev_c; int p; /* 0 -> no parentheses seen, >0 nr of ( seen */ @@ -98,7 +103,9 @@ ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed } /* do something with comments ; */ - if (c == ';' && quoted == 0) { + if ((c == ';' + || (c == '#' && file_type == resolv_conf_file_type)) + && quoted == 0) { if (prev_c != '\\') { com = 1; } @@ -215,6 +222,26 @@ tokenread: return i == 0 ? LDNS_STATUS_SYNTAX_EMPTY : LDNS_STATUS_OK; } +ldns_status +ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed + , const char *delim, int *line_nr) +{ + return ldns_fget_token_l_st_file_type( + f, token, limit, fixed, delim, line_nr, zone_file_type); +} + +ssize_t +ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, + size_t limit, int *line_nr) +{ + if (limit == 0) + limit = LDNS_MAX_LINELEN; + if (ldns_fget_token_l_st_file_type(f, &token, &limit, true, delim, + line_nr, resolv_conf_file_type)) + return -1; + else + return (ssize_t)strlen(token); +} ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr) diff --git a/contrib/ldns/resolver.c b/contrib/ldns/resolver.c index f9ec65a55966..a426b82c034e 100644 --- a/contrib/ldns/resolver.c +++ b/contrib/ldns/resolver.c @@ -775,7 +775,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) #endif ssize_t gtr, bgtr; ldns_buffer *b; - int lnr = 0, oldline; + int lnr = 0; FILE* myfp = fp; if(!line_nr) line_nr = &lnr; @@ -809,36 +809,18 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) gtr = 1; word[0] = 0; - oldline = *line_nr; expect = LDNS_RESOLV_KEYWORD; while (gtr > 0) { - /* check comments */ - if (word[0] == '#') { - word[0]='x'; - if(oldline == *line_nr) { - /* skip until end of line */ - int c; - do { - c = fgetc(myfp); - } while(c != EOF && c != '\n'); - if(c=='\n') (*line_nr)++; - } - /* and read next to prepare for further parsing */ - oldline = *line_nr; - continue; - } - oldline = *line_nr; switch(expect) { case LDNS_RESOLV_KEYWORD: /* keyword */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr != 0) { - if(word[0] == '#') continue; for(i = 0; i < LDNS_RESOLV_KEYWORDS; i++) { if (strcasecmp(keyword[i], word) == 0) { /* chosen the keyword and * expect values carefully - */ + */ expect = i; break; } @@ -856,16 +838,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_DEFDOMAIN: /* default domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { if(!fp) fclose(myfp); @@ -879,16 +857,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_NAMESERVER: /* NS aaaa or a record */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } if(strchr(word, '%')) { /* snip off interface labels, * fe80::222:19ff:fe31:4222%eth0 */ @@ -911,7 +885,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_SEARCH: /* search list domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); b = LDNS_MALLOC(ldns_buffer); if(!b) { ldns_resolver_deep_free(r); @@ -929,10 +903,6 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) bgtr = ldns_bget_token(b, word, LDNS_PARSE_NORMAL, (size_t) gtr + 1); while (bgtr > 0) { gtr -= bgtr; - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - break; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { ldns_resolver_deep_free(r); @@ -954,28 +924,23 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) } break; case LDNS_RESOLV_SORTLIST: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* sortlist not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_OPTIONS: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* options not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_ANCHOR: /* a file containing a DNSSEC trust anchor */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { ldns_resolver_deep_free(r); if(!fp) fclose(myfp); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } - #ifdef HAVE_SSL tmp_rr = ldns_read_anchor_file(word); (void) ldns_resolver_push_dnssec_anchor(r, tmp_rr); From nobody Mon May 20 11:25:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjZxC55y0z5L36X; Mon, 20 May 2024 11:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjZxC4Xy8z45yY; Mon, 20 May 2024 11:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716204319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dIJJDMGZPhIbjs8/n+iJprLpl1U4ky7tP0q0/IOLfs4=; b=aDrQCyj6+RWtY2wJ/sYli/2dFhcG+RoMlCgAYJlLa5i3n3oizosaoaerphlwaHX5NV6Pdu npx194i8gjyYLrwxdSpgpwo0SNrNqhXxakMZAOeHdGID6CDSTT/vFIZdaci0bj3bTA7UVU 3xaX+sO2VaRCcxY6g0MyVIRLMTUfpVxZGg18gESfrD9J2hP4MhbwGbN5d/TfYK19glNPT1 vFI76Eq+hDQ2zF6SYUHZvHofLi8M4Z/57LUhmcq+gu790CIsdRo6AHKcMnan8rDaIj29Hu IE5Sphlf1zLewm6MGbs1DLYNYzlbMrVQ+MuITNjh5laimK/bnO4Uew9oZ5akwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716204319; a=rsa-sha256; cv=none; b=atI4P6qRCT0DJd+bjOddhCeTGgQwsQQC6EMudB0CBNAIhWcqDfEivSHBTA9bIujz26bbf3 VtGC0VR4gH3D8q+vChr9ZcTt35xutbtqKXQpqOhaGxmJlpJuenePud8DSKMMYFwczczZ/Z zb90qF5ylwsiu5Yv3T6qj9VKWtccze/AczEo3Brg1TDB42Ql2bzuPzC/itxZoXMKm5hT6T hLLIJrkLDD1S6RB8pt3y8IBqbIHyX/ZsRiT0TzgxFdtc0jF38nntJ72UreIK4zukphJBcI mnhutQuUPOMDAuZMZoB1NpvVhcbV+ZFBRbtXQjjH7/JWu34/Vr2s8uzw3nRifQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716204319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dIJJDMGZPhIbjs8/n+iJprLpl1U4ky7tP0q0/IOLfs4=; b=tpPD3McuJRWRvqH6pWeZ/uwnERskijqcJIhChtmXDjC2065oIXk2m0xKx9/B9RGL8ArWmj ebg2PwnP7l2yQguUDmYhiB8FYa6XwBNfVyp3fw2UIkkvReNzJLbdxGiIOgg8XOS0UyJsH/ ftWzOSAoXbB0wc9O3Jz6VXkgyQyreg5dVQpfZXREerfTYjCoHK/qPzwmv+IByNAeq8sFsC oKE3ib34M0ADRRAee2Qtz7K2v06lZdYCjWFQDsusGlCy0NhkCfrOtTUFAOE+UQQG4jm5iF s2RLJT0kFL2+BL+PuFeEl5BHIg/S4f5dU0SzvIdD2tETU4ImLhQAzpYJj7LYdg== 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 4VjZxC482tzby7; Mon, 20 May 2024 11:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KBPJeE025731; Mon, 20 May 2024 11:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KBPJsk025728; Mon, 20 May 2024 11:25:19 GMT (envelope-from git) Date: Mon, 20 May 2024 11:25:19 GMT Message-Id: <202405201125.44KBPJsk025728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 2c5c85cbcfac - stable/14 - nuageinit: by default to not enable nuageinit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2c5c85cbcfac0037aaafff130d9c4bdb5d341fe8 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=2c5c85cbcfac0037aaafff130d9c4bdb5d341fe8 commit 2c5c85cbcfac0037aaafff130d9c4bdb5d341fe8 Author: Baptiste Daroussin AuthorDate: 2024-05-14 12:15:43 +0000 Commit: Baptiste Daroussin CommitDate: 2024-05-20 11:24:38 +0000 nuageinit: by default to not enable nuageinit MFC After: 1 day Reported by: karels@ (cherry picked from commit 5681636ead6790d5ad2c24a4712f010fcdfc926c) --- libexec/rc/rc.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 831ef202219c..7f9e67981eec 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -725,6 +725,7 @@ newsyslog_enable="YES" # Run newsyslog at startup. newsyslog_flags="-CN" # Newsyslog flags to create marked files mixer_enable="YES" # Run the sound mixer. opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off +nuageinit_enable="NO" # Run nuageinit at startup # rctl(8) requires kernel options RACCT and RCTL rctl_enable="YES" # Load rctl(8) rules on boot From nobody Mon May 20 11:25:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjZxD5kLKz5L322; Mon, 20 May 2024 11:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjZxD5JZxz461y; Mon, 20 May 2024 11:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716204320; h=from:from:reply-to:subject:subject: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+08uNoFeH6nL4pZxnYVZcnTp1t8W9zSPuD4ky295YI=; b=aYSsd15k6luWa54NPpQc9NmLrMuYH111BdKCfBHx1f+gVa3Q0eapX6IHugCxNTA3dt1Fuq 0PMS40+KBku0yrvWIHLQJTSZH8nAxzweiMhN0EYD4paZFEr3Y3OOTvOgbnPcP6huZc4wvz QkHgtGqJJ5x9iBl3dTpQWhA4ofhlA3vkcv3haqk5j7t5EBjkjBXmP6VOLl3BjV2xvmN+fn 1oMoX2BmW2Sdk4aDItd5CTYgWNXyK7DdhK7v8w1nt4J4QkycZT3F+FUrr5fJU3B1Dz8rRq c7Pmmt2OhW9bh2BRuyyrG1xK8+cHGKTnfOCFePTpB4/jIX1TRjEyZuAebgWmlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716204320; a=rsa-sha256; cv=none; b=wSoG3F8KaTVDR4+vlnCg5J50vT4WXvuKEe5t7FYwfJ0H17+q8zzwxhswa8UsL6S+ewFTbF f6xNdCUVdEy7bMmQlr1+nU/WFFoN9epbDgJnMSO73JNpt6KmSSVIePCxcjodxU6Do2JHMn 14Z69SmEdNjijHoFzOhCeUNGNqZwyEprdkimKq3eBvPWkXLoxQM4yoob+NN226qui2FJ9/ cVHQXhWKWHyiVqvd/jAaEjSLySRyABFr+pjpIS8pTWgFv8DXAl0HATLVdoXfgxoFYjGlaX Gb2WPd18NhnMM12N2WJT1r5Zc5UCXrlqhHD8fBKUsgqC4bJyaaPcz05zVKLwaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716204320; h=from:from:reply-to:subject:subject: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+08uNoFeH6nL4pZxnYVZcnTp1t8W9zSPuD4ky295YI=; b=HoOnpik0XO6/FkTZ2rrZC9z4TtKwJ3kVi3xRxRfjwJkHDEUto7fzLcpK+wTZ81aJ4aGSHG Sfkl/kFip4sI1eNeCEjqPBHf1dxvPa36EGzoOOwFxGzQazFOL5YvhVGuvNol051po+uzuD BQ/r9biBo0QWXHcy5AaqLZEE1Hze3fj6UC24H8KzvTeChN6Tj0Amg6WO4rIciZd1NbrHXY Fb1F14x9LURMr9Caml8fbZy+jxWWzVZ+rYrgddPtATHt9CnisQr3ztvWiBOF19g/Oyjq2y EThGT0HyZ/4BmRyoI7BlaP4n5xYneFDaJyYtBNzDkEB3lyZlvKeYwmuF2vlrdw== 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 4VjZxD4wT2zby8; Mon, 20 May 2024 11:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KBPKJG025770; Mon, 20 May 2024 11:25:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KBPKoo025767; Mon, 20 May 2024 11:25:20 GMT (envelope-from git) Date: Mon, 20 May 2024 11:25:20 GMT Message-Id: <202405201125.44KBPKoo025767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 5b609bbf91a3 - stable/14 - pci_vendors: update to 2024.05.14 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5b609bbf91a308bb7a17c2b2527e0a012d49de19 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5b609bbf91a308bb7a17c2b2527e0a012d49de19 commit 5b609bbf91a308bb7a17c2b2527e0a012d49de19 Author: Baptiste Daroussin AuthorDate: 2024-05-14 12:18:20 +0000 Commit: Baptiste Daroussin CommitDate: 2024-05-20 11:24:43 +0000 pci_vendors: update to 2024.05.14 (cherry picked from commit b0b9435ef1ec64c21f7243dbd02ad10e7f612149) --- share/misc/pci_vendors | 501 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 449 insertions(+), 52 deletions(-) diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors index ca3e5af4c97c..df152a4e97e0 100644 --- a/share/misc/pci_vendors +++ b/share/misc/pci_vendors @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2024.02.02 -# Date: 2024-02-02 14:41:33 +# Version: 2024.05.14 +# Date: 2024-05-14 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -454,6 +454,7 @@ 1028 1f07 SAS 5/iR Integrated RAID Controller 1028 1f08 SAS 5/iR Integrated RAID Controller 1028 1f09 SAS 5/iR Adapter RAID Controller + 103c 3228 SAS3080X-HP 8-port PCI-X 133MHz Host Bus Adapter with 2xSFF-8484 15ad 1976 SAS Controller 0055 SAS1068 PCI-X Fusion-MPT SAS 1033 8336 SAS1068 @@ -764,7 +765,7 @@ 1bd4 0026 12G SAS3008IT RACK 1bd4 0027 12G SAS3008IMR RACK 1bd4 0028 12G SAS3008IR RACK - 00a5 Fusion-MPT 24GSAS/PCIe SAS40xx + 00a5 Fusion-MPT 24GSAS/PCIe SAS40xx/41xx 1000 4600 MegaRAID 9670W-16i Tri-Mode Storage Adapter 1000 4610 MegaRAID 9670-24i Tri-Mode Storage Adapter 1000 4620 MegaRAID 9660-16i Tri-Mode Storage Adapter @@ -3779,6 +3780,7 @@ 699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] 1028 1720 Radeon RX 550X 148c 2380 Lexa XL [Radeon RX 550] + 17aa 5069 Thinkpad E480/E580 1da2 e367 Lexa PRO [Radeon RX 550] 69a0 Vega 12 69a1 Vega 12 @@ -3960,6 +3962,8 @@ 73a3 Navi 21 GL-XL [Radeon PRO W6800] 73a4 Navi 21 USB 73a5 Navi 21 [Radeon RX 6950 XT] +# Reference + 1002 0e3a Radeon RX 6950 XT 1849 5230 Navi 21 [ASRock OC Forumla Radeon RX 6950XT] 1da2 441d Navi 21 [Sapphire Nitro+ Radeon RX 6950 XT] 1eae 6950 Navi 21 [XFX Speedster MERC319 Radeon RX 6950 XT] @@ -3990,6 +3994,7 @@ 1da2 465e Radeon RX 6750 XT PULSE OC 1da2 e445 Sapphire Radeon RX 6700 1eae 6601 Speedster QICK 319 RX 6700 XT + 1eae 661a Radeon RX 6700 [SPEEDSTER SWFT 309] 73e0 Navi 23 73e1 Navi 23 WKS-XM [Radeon PRO W6600M] 73e3 Navi 23 WKS-XL [Radeon PRO W6600] @@ -5642,6 +5647,8 @@ 9609 RS780/RS880 PCI to PCI bridge (PCIE port 5) 960a RS780 PCI to PCI bridge (NB-SB link) 960b RS780 PCI to PCI bridge (ext gfx port 1) +# Takes over NVMe PCI ID when RAID is enabled + b000 RAID Bottom Device 1023 Trident Microsystems 0194 82C194 2000 4DWave DX @@ -9193,6 +9200,7 @@ 87d0 PEX PCI Express Switch DMA interface 9016 PLX 9016 8-port serial controller 9030 PCI9030 32-bit 33MHz PCI <-> IOBus Bridge + 10b5 1205 Becker & Hickl MSA-1000 10b5 2695 Hilscher CIF50-PB/DPS Profibus 10b5 2862 Alpermann+Velte PCL PCI LV (3V/5V): Timecode Reader Board 10b5 2906 Alpermann+Velte PCI TS (3V/5V): Time Synchronisation Board @@ -9228,7 +9236,13 @@ 10b5 1067 IXXAT CAN i165 10b5 114e Wasco WITIO PCI168extended 10b5 1169 Wasco OPTOIO32standard 32 digital in, 32 digital out + 10b5 1171 Becker & Hickl PMS-400 10b5 1172 IK220 (Heidenhain) + 10b5 1201 Becker & Hickl SPC-6x0 + 10b5 1202 Becker & Hickl SPC-7x0 + 10b5 1203 Becker & Hickl MSA-300 + 10b5 1206 Becker & Hickl DCC-100 + 10b5 120a Becker & Hickl STP-340 10b5 2036 SatPak GPS 10b5 2221 Alpermann+Velte PCL PCI LV: Timecode Reader Board 10b5 2273 SH ARC-PCI SOHARD ARCNET card @@ -9276,6 +9290,11 @@ d84d 4078 EX-4078 2S(16C552) RS-232+1P 9052 PCI9052 PCI <-> IOBus Bridge 9054 PCI9054 32-bit 33MHz PCI <-> IOBus Bridge + 10b5 1171 Becker & Hickl PMS-400A + 10b5 1208 Becker & Hickl SPC-830 + 10b5 120e Becker & Hickl SPC-930 + 10b5 120f Becker & Hickl SPC-150 + 10b5 1210 Becker & Hickl DPC-230 10b5 2455 Wessex Techology PHIL-PCI 10b5 2696 Innes Corp AM Radcap card 10b5 2717 Innes Corp Auricon card @@ -11734,6 +11753,9 @@ 0f02 GF108 [GeForce GT 730] 0f03 GF108 [GeForce GT 610] 0f06 GF108 [GeForce GT 730] + 0fa0 GK11x [GK11x_FPGA] + 0fa5 GK11x + 0fa7 GK11x [Tegra on x86 (PEATRANS)] 0fb0 GM200 High Definition Audio 0fb8 GP108 High Definition Audio Controller 0fb9 GP107GL High Definition Audio Controller @@ -11743,13 +11765,18 @@ 0fc0 GK107 [GeForce GT 640 OEM] 0fc1 GK107 [GeForce GT 640] 0fc2 GK107 [GeForce GT 630 OEM] + 0fc4 GK107 [D14P1-15] 0fc5 GK107 [GeForce GT 1030] 0fc6 GK107 [GeForce GTX 650] 1043 8428 GTX650-DC-1GD5 0fc8 GK107 [GeForce GT 740] 0fc9 GK107 [GeForce GT 730] + 0fcb GK107 [EXK107] + 0fcc GK107 [GeForce GT 720] 0fcd GK107M [GeForce GT 755M] 0fce GK107M [GeForce GT 640M LE] + 0fcf GK107 [GEN3 ESI] + 0fd0 GK107 [NB1G] 0fd1 GK107M [GeForce GT 650M] 1043 1597 GeForce GT 650M 1043 15a7 GeForce GT 650M @@ -11764,10 +11791,15 @@ 0fd3 GK107M [GeForce GT 640M LE] 0fd4 GK107M [GeForce GTX 660M] 0fd5 GK107M [GeForce GT 650M Mac Edition] - 0fd6 GK107M + 0fd6 GK107M [N13P-GS-W] + 0fd7 GK107 [GK107-GTX] 0fd8 GK107M [GeForce GT 640M Mac Edition] 0fd9 GK107M [GeForce GT 645M] - 0fdb GK107M + 0fda GK107 [GK107-ES-A1] + 0fdb GK107 [GK107-ESP-A1] + 0fdc GK107 [GK107-INT22-A1] + 0fdd GK107 [GK107-INT11-A1] + 0fde GK107 [GK107-ES-KA-E1] 0fdf GK107M [GeForce GT 740M] 0fe0 GK107M [GeForce GTX 660M Mac Edition] 0fe1 GK107M [GeForce GT 730M] @@ -11788,6 +11820,7 @@ 0fed GK107M [GeForce 820M] 0fee GK107M [GeForce 810M] 0fef GK107GL [GRID K340] + 0ff0 GK107 [NB1Q] 0ff1 GK107 [NVS 1000] 0ff2 GK107GL [GRID K1] 0ff3 GK107GL [Quadro K420] @@ -12307,9 +12340,13 @@ 11a2 GK104M [GeForce GTX 675MX Mac Edition] 11a3 GK104M [GeForce GTX 680MX] 106b 010d iMac 13,2 + 11a4 GK104 [GK104-ESA] + 11a5 GK104 [GK104-ESA] 11a7 GK104M [GeForce GTX 675MX] 11a8 GK104GLM [Quadro K5100M] 11a9 GK104M [GeForce GTX 870M] + 11aa GK104 [GK104-INT] + 11ac GK104 [GK104-CS] 11af GK104GLM [GRID IceCube] 11b0 GK104GL [GRID K240Q / K260Q vGPU] 10de 101a GRID K240Q @@ -12327,6 +12364,7 @@ 11be GK104GLM [Quadro K3000M] 11bf GK104GL [GRID K2] 11c0 GK106 [GeForce GTX 660] + 11c1 GK106 [D14P2-30] 11c2 GK106 [GeForce GTX 650 Ti Boost] 1043 845b GeForce GTX 650 Ti Boost DirectCU II OC 1462 2874 GeForce GTX 650 Ti Boost TwinFrozr II OC @@ -12342,6 +12380,10 @@ 11c7 GK106 [GeForce GTX 750 Ti] 11c8 GK106 [GeForce GTX 650 OEM] 11cb GK106 [GeForce GT 740] + 11d0 GK106 [GK106-INT353] + 11d1 GK106 [GK106-INT343] + 11d2 GK106 [GK106-INT232] + 11d3 GK106 [GK106-ES] 11e0 GK106M [GeForce GTX 770M] 11e1 GK106M [GeForce GTX 765M] 11e2 GK106M [GeForce GTX 765M] @@ -12350,6 +12392,7 @@ 11e7 GK106M 11fa GK106GL [Quadro K4000] 11fc GK106GLM [Quadro K2100M] + 11ff GK106 [NB1Q] 1200 GF114 [GeForce GTX 560 Ti] 1201 GF114 [GeForce GTX 560] 1202 GF114 [GeForce GTX 560 Ti OEM] @@ -12397,7 +12440,9 @@ 1280 GK208 [GeForce GT 635] 1281 GK208 [GeForce GT 710] 1282 GK208 [GeForce GT 640 Rev. 2] + 1283 GK208 [D15M2-10] 1284 GK208 [GeForce GT 630 Rev. 2] + 1285 GK208 [GK208-100] 1286 GK208 [GeForce GT 720] 1287 GK208B [GeForce GT 730] 1288 GK208B [GeForce GT 720] @@ -12437,8 +12482,14 @@ 17aa 36af GeForce 920M 129a GK208BM [GeForce 910M] 12a0 GK208 + 12ad GK208 [GK208-ES] + 12ae GK208 [GK208-CS1-C] + 12af GK208 [GK208-INT] + 12b0 GK208 [GK208-CS-Q] + 12b1 GK208 [GK208 INT] 12b9 GK208GLM [Quadro K610M] 12ba GK208GLM [Quadro K510M] + 130b GK110 [Q12U-1] 1340 GM108M [GeForce 830M] 103c 2b2b GeForce 830A 1341 GM108M [GeForce 840M] @@ -12483,6 +12534,8 @@ 103c 2b4c GeForce GTX 960A 139c GM107M [GeForce 940M] 139d GM107M [GeForce GTX 750 Ti] + 13ad GM204 [GM107 INT52] + 13ae GM204 [GM107 CS1] 13b0 GM107GLM [Quadro M2000M] 13b1 GM107GLM [Quadro M1000M] 13b2 GM107GLM [Quadro M600M] @@ -12497,15 +12550,19 @@ 10de 110a GRID M40 10de 1160 Tesla M10 10de 11d2 GRID M10-8Q + 13be GM204 [GM107 CS1] + 13bf GM204 [GM107 INT52] 13c0 GM204 [GeForce GTX 980] 1043 8504 GTX980-4GD5 13c1 GM204 13c2 GM204 [GeForce GTX 970] 13c3 GM204 + 13c4 GM204 [D17U-20] 13d7 GM204M [GeForce GTX 980M] 13d8 GM204M [GeForce GTX 960 OEM / 970M] 13d9 GM204M [GeForce GTX 965M] 13da GM204M [GeForce GTX 980 Mobile] + 13e4 GM204 [Graphics Device ES-A] 13e7 GM204GL [GeForce GTX 980 Engineering Sample] 13f0 GM204GL [Quadro M5000] 13f1 GM204GL [Quadro M4000] @@ -12531,6 +12588,7 @@ 1430 GM206GL [Quadro M2000] 1431 GM206GL [Tesla M4] 1436 GM206GLM [Quadro M2200 Mobile] + 15c2 GP100 [CMP 100-100] 15f0 GP100GL [Quadro GP100] 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] @@ -12538,6 +12596,7 @@ 15f9 GP100GL [Tesla P100 SXM2 16GB] 15fa GP100GL [DGX Station / PH402 SKU 200] 15fb GP100GL [GP100 SKU 200] + 15fc GP100GL [Tesla P100-DGXS-16GB] 15ff GP100GL [GP100 SKU 15ff] 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] @@ -12697,6 +12756,7 @@ 1d81 GV100 [TITAN V] 1d83 GV100 [CMP 100-200] 1d84 GV100 [CMP 100-210] + 1db0 GV100GL [Tesla GV100 SXM2-16GB SKU 890] 1db1 GV100GL [Tesla V100 SXM2 16GB] 1db2 GV100GL [Tesla V100 DGXS 16GB] 1db3 GV100GL [Tesla V100 FHHL 16GB] @@ -12713,6 +12773,7 @@ 1dc1 GV100 [CMP 100-200] 1df0 GV100GL [Tesla PG500-216] 1df2 GV100GL [Tesla PG503-216] + 1df4 GV100 [CMP 100-210] 1df5 GV100GL [Tesla V100 SXM2 16GB] 1df6 GV100GL [Tesla V100S PCIe 32GB] 1e02 TU102 [TITAN RTX] @@ -12726,6 +12787,7 @@ 1e30 TU102GL [Quadro RTX 6000/8000] 10de 129e Quadro RTX 8000 10de 12ba Quadro RTX 6000 + 1e35 TU102GL [Tesla T10] 1e36 TU102GL [Quadro RTX 6000] 1e37 TU102GL [Tesla T10 16GB / GRID RTX T10-2/T10-4/T10-8] 10de 1304 Tesla T10 16GB @@ -12823,7 +12885,7 @@ 1fd9 TU117BM [GeForce GTX 1650 Mobile Refresh] 1fdd TU117BM [GeForce GTX 1650 Mobile Refresh] 1ff0 TU117GL [T1000 8GB] - 1ff2 TU117GL [T400 4GB] + 1ff2 TU117GL [T400 4GB / T400E] 1ff9 TU117GLM [Quadro T1000 Mobile] 2080 GA100 2081 GA100 @@ -12902,8 +12964,10 @@ 2321 GH100 [H100L 94GB] 2322 GH100 [H800 PCIe] 2324 GH100 [H800] + 2329 GH100 [H20] 2330 GH100 [H100 SXM5 80GB] 2331 GH100 [H100 PCIe] + 2335 GH100 [H200 SXM 141GB] 2336 GH100 [H100] 2337 GH100 [H100 SXM5 64GB] 2338 GH100 [H100 SXM5 96GB] @@ -12932,6 +12996,9 @@ 2488 GA104 [GeForce RTX 3070 Lite Hash Rate] 2489 GA104 [GeForce RTX 3060 Ti Lite Hash Rate] 248a GA104 [CMP 70HX] + 248c GA104 [GeForce RTX 3070 Ti] + 248d GA104 [GeForce RTX 3070] + 248e GA104 [GeForce RTX 3060 Ti] 249c GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] 249d GA104M [GeForce RTX 3070 Mobile / Max-Q] 249f GA104M @@ -12991,6 +13058,8 @@ 25ac GN20-P0-R-K2 [GeForce RTX 3050 6GB Laptop GPU] 25ad GA107 [GeForce RTX 2050] 25af GA107 [GeForce RTX 3050 Engineering Sample] + 25b0 GA107GL [RTX A1000] + 25b2 GA107GL [RTX A400] 25b5 GA107GLM [RTX A4 Mobile] # A16 - 25B6 10DE 14A9 / A2 - 25B6 10DE 157E 25b6 GA107GL [A2 / A16] @@ -13024,6 +13093,7 @@ 2703 AD103 [GeForce RTX 4080 SUPER] 2704 AD103 [GeForce RTX 4080] 2705 AD103 [GeForce RTX 4070 Ti SUPER] + 2709 AD103 [GeForce RTX 4070] 2717 GN21-X11 [GeForce RTX 4090 Laptop GPU] 2730 AD103GLM [RTX 5000 Ada Generation Laptop GPU] 2757 GN21-X11 @@ -13032,6 +13102,7 @@ 2783 AD104 [GeForce RTX 4070 SUPER] 2785 AD104 [AC AD104 20GB] 2786 AD104 [GeForce RTX 4070] + 2788 AD104 [GeForce RTX 4060 Ti] 27a0 AD104M [GeForce RTX 4080 Max-Q / Mobile] 27b0 AD104GL [RTX 4000 SFF Ada Generation] 27b1 AD104GL [RTX 4500 Ada Generation] @@ -13046,6 +13117,7 @@ 27fb AD104GLM [RTX 3500 Ada Generation Embedded GPU] 2803 AD106 [GeForce RTX 4060 Ti] 2805 AD106 [GeForce RTX 4060 Ti 16GB] + 2808 AD106 [GeForce RTX 4060] 2820 AD106M [GeForce RTX 4070 Max-Q / Mobile] 2838 AD106GLM [RTX 3000 Ada Generation Laptop GPU] 2860 AD106M [GeForce RTX 4070 Max-Q / Mobile] @@ -13053,7 +13125,11 @@ 2882 AD107 [GeForce RTX 4060] 28a0 AD107M [GeForce RTX 4060 Max-Q / Mobile] 28a1 AD107M [GeForce RTX 4050 Max-Q / Mobile] + 28b0 AD107GL [RTX 2000 / 2000E Ada Generation] 28b8 AD107GLM [RTX 2000 Ada Generation Laptop GPU] + 28b9 AD107GLM [RTX 1000 Ada Generation Laptop GPU] + 28ba AD107GLM [RTX 500 Ada Generation Laptop GPU] + 28bb AD107GLM [RTX 500 Ada Generation Laptop GPU] 28e0 AD107M [GeForce RTX 4060 Max-Q / Mobile] 28e1 AD107M [GeForce RTX 4050 Max-Q / Mobile] 28f8 AD107GLM [RTX 2000 Ada Generation Embedded GPU] @@ -13308,6 +13384,7 @@ 5762 RTS5762 NVMe SSD Controller 5763 RTS5763DL NVMe SSD Controller (DRAM-less) 5765 RTS5765DL NVMe SSD Controller (DRAM-less) + 5770 RTS5770DL NVMe SSD Controller (DRAM-less) 5772 RTS5772DL NVMe SSD Controller (DRAM-less) 8029 RTL-8029(AS) 10b8 2011 EZ-Card (SMC1208) @@ -13317,6 +13394,7 @@ 1259 2400 AT-2400 1af4 1100 QEMU Virtual Machine 8125 RTL8125 2.5GbE Controller + 4c52 2022 LRES2022PT Single-port 2.5Gb Ethernet Network Adapter 8129 RTL-8129 10ec 8129 RT8129 Fast Ethernet Adapter 11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured) @@ -13416,7 +13494,7 @@ 1043 8505 P8 series motherboard 1043 8554 H81M-C Motherboard 1043 859e AM1I-A Motherboard - 1043 8677 PRIME B450M-A Motherboard + 1043 8677 Onboard RTL8111H Ethernet 105b 0d7c D270S/D250S Motherboard 10ec 8168 RTL8111/8168 PCI Express Gigabit Ethernet controller 144d c652 RTL8168 on a NP300E5C series laptop @@ -13432,6 +13510,7 @@ 17aa 3098 ThinkCentre E73 17aa 3814 Z50-75 17aa 3823 Lenovo V130-15IGM Laptop - Type 81HL + 17aa 5068 Thinkpad E480/E580 17aa 5124 ThinkPad E595 1849 8168 Motherboard (one of many) 7470 3468 TG-3468 Gigabit PCI Express Network Adapter @@ -16401,6 +16480,38 @@ 11e2 Samsung Information Systems America 11e3 Quicklogic Corporation 0001 COM-ON-AIR Dosch&Amand DECT + 0010 QL5032 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0011 QL5032 (PBGA256) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0012 QL5232 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 11e3 1204 Becker & Hickl SPC-130 + 11e3 1207 Becker & Hickl DDG-200 + 11e3 1209 Becker & Hickl SHM-180 + 11e3 120c Becker & Hickl PMM-428 + 0013 QL5232 (PBGA456) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0014 QL5030 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM + 0015 QL5130 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM + 0016 QL5130 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM + 11e3 120b Becker & Hickl DEL-350 + 0017 QL5130 (PBGA256) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM + 0019 QL5332 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 001a QL5332 (PBGA256) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 001b QL5432 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 11e3 120d Becker & Hickl SPC-140 + 11e3 1211 Becker & Hickl GVD-120 + 11e3 1212 Becker & Hickl DDG-210 + 001c QL5432 (PBGA456) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 001d QL5632 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 001e QL5632 (PBGA280) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 001f QL5632 (PBGA484) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0020 QL5632 (PBGA516) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0021 QL5732 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0022 QL5732 (PBGA280) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0023 QL5732 (PBGA484) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 0024 QL5732 (PBGA516) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 002d QL5022 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 002e QL5022 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Master/Target with Embedded Programmable Logic and Dual Port SRAM + 002f QL5020 (TQFP144) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM + 0030 QL5020 (PQFP208) [QuickPCI] 33 MHz/32-bit PCI Target with Embedded Programmable Logic and Dual Port SRAM 0560 QL5064 Companion Design Demo Board 5030 PC Watchdog 8417 QL5064 [QuickPCI] PCI v2.2 bridge for SMT417 Dual TMS320C6416T PMC Module @@ -16649,6 +16760,7 @@ 8331 O2 Flash Memory Card 8520 SD/MMC Card Reader Controller 8621 SD/MMC Card Reader Controller + 17aa 5068 Thinkpad E480/E580 8760 FORESEE E2M2 NVMe SSD 1218 Hybricon Corp. 1219 First Virtual Corporation @@ -17009,6 +17121,7 @@ 0820 SM820 Lynx3D 0910 SM910 2260 SM2260 NVMe SSD Controller + 2261 SM2261XT x2 NVMe SSD Controller (DRAM-less) 2262 SM2262/SM2262EN SSD Controller 2263 SM2263EN/SM2263XT (DRAM-less) NVMe SSD Controllers 2269 SM2269XT (DRAM-less) NVMe SSD Controller @@ -17498,6 +17611,7 @@ 8152 PI7C8152A/PI7C8152B/PI7C8152BI PCI-to-PCI Bridge 8154 PI7C8154A/PI7C8154B/PI7C8154BI PCI-to-PCI Bridge 8619 PI7C9X2G1616PR PCIe2 16-Port/16-Lane Packet Switch + b404 PI7C9X2G404 EV/SV PCIe2 4-Port/4-Lane Packet Switch e110 PI7C9X110 PCIe- to-PCI bridge 1775 11cc CC11/CL11 CompactPCI Bridge e111 PI7C9X111SL PCIe-to-PCI Reversible Bridge @@ -17848,8 +17962,25 @@ 1344 5000 6.4 TB U.2 1344 6000 12.8TB U.2 51b7 7500 PRO NVMe SSD + 1028 22e7 DC NVMe 7500 U.2 SED RI 15.36TB + 1028 22e8 DC NVMe 7500 U.2 SED RI 7.68TB + 1028 22e9 DC NVMe 7500 U.2 SED RI 3.84TB + 1028 22ea DC NVMe 7500 U.2 SED RI 1.92TB + 1028 22eb DC NVMe 7500 U.2 SED RI 960GB + 1028 22ec DC NVMe 7500 U.2 ISE RI 15.36TB + 1028 22ed DC NVMe 7500 U.2 ISE RI 7.68TB + 1028 22ee DC NVMe 7500 U.2 ISE RI 3.84TB + 1028 22ef DC NVMe 7500 U.2 ISE RI 1.92TB + 1028 22f0 DC NVMe 7500 U.2 ISE RI 960GB 51b8 7500 MAX NVMe SSD + 1028 22f1 DC NVMe 7500 U.2 ISE MU 12.8TB + 1028 22f2 DC NVMe 7500 U.2 ISE MU 6.4TB + 1028 22f3 DC NVMe 7500 U.2 ISE MU 3.2TB + 1028 22f4 DC NVMe 7500 U.2 ISE MU 1.6TB + 1028 22f5 DC NVMe 7500 U.2 ISE MU 800GB 51b9 6500 ION NVMe SSD + 1028 22e6 Ent NVMe 6500 RI 30.72TB + 1028 22f6 Ent NVMe 6500 RI FIPS 30.72TB 51c0 7400 PRO NVMe SSD 1028 2162 EC NVMe OPAL 7400 RI M.2 480GB 1028 2163 EC NVMe OPAL 7400 RI M.2 960GB @@ -17887,7 +18018,38 @@ 1344 4000 U.3 3200GB 1344 5000 U.3 6400GB 51c3 7450 PRO NVMe SSD + 1028 226b EC NVMe FIPS 7450 RI M.2 110 960GB + 1028 226c EC NVMe ISE 7450 RI M.2 80 480GB + 1028 226d EC NVMe ISE 7450 RI M.2 80 960GB + 1028 226e EC NVMe SED 7450 RI M.2 80 480GB + 1028 226f EC NVMe SED 7450 RI M.2 80 960GB + 1028 2270 EC NVMe FIPS 7450 RI M.2 80 480GB + 1028 2271 EC NVMe FIPS 7450 RI M.2 80 960GB + 1028 2273 EC NVMe ISE 7450 RI M.2 110 960GB + 1028 2274 EC NVMe ISE 7450 RI M.2 110 1920GB + 1028 2275 EC NVMe ISE 7450 RI M.2 110 3840GB + 1028 2278 DC NVMe ISE 7450 RI U.2 960GB + 1028 2279 DC NVMe ISE 7450 RI U.2 1.92TB + 1028 227a DC NVMe ISE 7450 RI U.2 3.84TB + 1028 227b DC NVMe ISE 7450 RI U.2 7.68TB + 1028 227c DC NVMe ISE 7450 RI U.2 15.36TB + 1028 227d DC NVMe SED 7450 RI U.2 960GB + 1028 227e DC NVMe SED 7450 RI U.2 1.92TB + 1028 227f DC NVMe SED 7450 RI U.2 3.84TB + 1028 2280 DC NVMe SED 7450 RI U.2 7.68TB + 1028 2281 DC NVMe SED 7450 RI U.2 15.36TB 51c4 7450 MAX NVMe SSD + 1028 2272 EC NVMe ISE 7450 MU M.2 80 800GB + 1028 228b DC NVMe SED 7450 MU U.2 800GB + 1028 228c DC NVMe ISE 7450 MU U.2 800GB + 1028 228d DC NVMe SED 7450 MU U.2 1.6TB + 1028 228e DC NVMe ISE 7450 MU U.2 1.6TB + 1028 228f DC NVMe SED 7450 MU U.2 3.2TB + 1028 2290 DC NVMe ISE 7450 MU U.2 3.2TB + 1028 2291 DC NVMe SED 7450 MU U.2 6.4TB + 1028 2292 DC NVMe ISE 7450 MU U.2 6.4TB + 1028 2293 DC NVMe SED 7450 MU U.2 12.8TB + 1028 2294 DC NVMe ISE 7450 MU U.2 12.8TB 1344 3000 U.3 1600GB [MTFDKCB1T6TFS/MTFDKCC1T6TFS] 5404 2210 NVMe SSD [Cobain] 5405 2300 NVMe SSD [Santana] @@ -19493,14 +19655,14 @@ 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller 6004 T6425-SO-CR Unified Wire Ethernet Controller - 6005 T6225-OCP-SO Unified Wire Ethernet Controller - 6006 T62100-OCP-SO Unified Wire Ethernet Controller + 6005 T6225-SO-OCP3 Unified Wire Ethernet Controller + 6006 T6225-OCP3 Unified Wire Ethernet Controller 6007 T62100-LP-CR Unified Wire Ethernet Controller 6008 T62100-SO-CR Unified Wire Ethernet Controller 6009 T6210-BT Unified Wire Ethernet Controller 600d T62100-CR Unified Wire Ethernet Controller 6011 T6225-LL-CR Unified Wire Ethernet Controller - 6014 T61100-OCP-SO Unified Wire Ethernet Controller + 6014 T62100-SO-OCP3 Unified Wire Ethernet Controller 6015 T6201-BT Unified Wire Ethernet Controller 6080 T6225-6080 Unified Wire Ethernet Controller 6081 T62100-6081 Unified Wire Ethernet Controller @@ -19519,14 +19681,14 @@ 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller 6404 T6425-SO-CR Unified Wire Ethernet Controller - 6405 T6225-OCP-SO Unified Wire Ethernet Controller - 6406 T62100-OCP-SO Unified Wire Ethernet Controller + 6405 T6225-SO-OCP3 Unified Wire Ethernet Controller + 6406 T6225-OCP3 Unified Wire Ethernet Controller 6407 T62100-LP-CR Unified Wire Ethernet Controller 6408 T62100-SO-CR Unified Wire Ethernet Controller 6409 T6210-BT Unified Wire Ethernet Controller 640d T62100-CR Unified Wire Ethernet Controller 6411 T6225-LL-CR Unified Wire Ethernet Controller - 6414 T61100-OCP-SO Unified Wire Ethernet Controller + 6414 T62100-SO-OCP3 Unified Wire Ethernet Controller 6415 T6201-BT Unified Wire Ethernet Controller 6480 T6225-6080 Unified Wire Ethernet Controller 6481 T62100-6081 Unified Wire Ethernet Controller @@ -19545,14 +19707,14 @@ 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller 6504 T6425-SO-CR Unified Wire Storage Controller - 6505 T6225-OCP-SO Unified Wire Storage Controller - 6506 T62100-OCP-SO Unified Wire Storage Controller + 6505 T6225-SO-OCP3 Unified Wire Storage Controller + 6506 T6225-OCP3 Unified Wire Storage Controller 6507 T62100-LP-CR Unified Wire Storage Controller 6508 T62100-SO-CR Unified Wire Storage Controller 6509 T6210-BT Unified Wire Storage Controller 650d T62100-CR Unified Wire Storage Controller 6511 T6225-LL-CR Unified Wire Storage Controller - 6514 T61100-OCP-SO Unified Wire Storage Controller + 6514 T62100-SO-OCP3 Unified Wire Storage Controller 6515 T6201-BT Unified Wire Storage Controller 6580 T6225-6080 Unified Wire Storage Controller 6581 T62100-6081 Unified Wire Storage Controller @@ -19570,14 +19732,14 @@ 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller 6604 T6425-SO-CR Unified Wire Storage Controller - 6605 T6225-OCP-SO Unified Wire Storage Controller - 6606 T62100-OCP-SO Unified Wire Storage Controller + 6605 T6225-SO-OCP3 Unified Wire Storage Controller + 6606 T6225-OCP3 Unified Wire Storage Controller 6607 T62100-LP-CR Unified Wire Storage Controller 6608 T62100-SO-CR Unified Wire Storage Controller 6609 T6210-BT Unified Wire Storage Controller 660d T62100-CR Unified Wire Storage Controller 6611 T6225-LL-CR Unified Wire Storage Controller - 6614 T61100-OCP-SO Unified Wire Storage Controller + 6614 T62100-SO-OCP3 Unified Wire Storage Controller 6615 T6201-BT Unified Wire Storage Controller 6680 T6225-6080 Unified Wire Storage Controller 6681 T62100-6081 Unified Wire Storage Controller @@ -19595,14 +19757,14 @@ 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] 6804 T6425-SO-CR Unified Wire Ethernet Controller [VF] - 6805 T6225-OCP-SO Unified Wire Ethernet Controller [VF] - 6806 T62100-OCP-SO Unified Wire Ethernet Controller [VF] + 6805 T6225-SO-OCP3 Unified Wire Ethernet Controller [VF] + 6806 T6225-OCP3 Unified Wire Ethernet Controller [VF] 6807 T62100-LP-CR Unified Wire Ethernet Controller [VF] 6808 T62100-SO-CR Unified Wire Ethernet Controller [VF] 6809 T6210-BT Unified Wire Ethernet Controller [VF] 680d T62100-CR Unified Wire Ethernet Controller [VF] 6811 T6225-LL-CR Unified Wire Ethernet Controller [VF] - 6814 T61100-OCP-SO Unified Wire Ethernet Controller [VF] + 6814 T62100-SO-OCP3 Unified Wire Ethernet Controller [VF] 6815 T6201-BT Unified Wire Ethernet Controller [VF] 6880 T6225-6080 Unified Wire Ethernet Controller [VF] 6881 T62100-6081 Unified Wire Ethernet Controller [VF] @@ -19847,6 +20009,7 @@ 1028 225d NVMe PM1745 MU U.2 6.4TB 1028 225e NVMe FIPS PM1745 MU U.2 12.8TB 1028 225f NVMe PM1745 MU U.2 12.8TB + a900 NVMe SSD Controller PM9DXa ecec Exynos 8895 PCIe Root Complex 144e OLITEC 144f Askey Computer Corp. @@ -20434,6 +20597,7 @@ 193d 1003 530F-B 193d 1006 530F-L 193d 100f NIC-ETH522i-Mb-2x10G + 4c52 9812 LREC9812AF Dual-port 10Gb Ethernet Server Adapter 1690 NetXtreme BCM57760 Gigabit Ethernet PCIe 1691 NetLink BCM57788 Gigabit Ethernet PCIe 1028 04aa XPS 8300 @@ -20461,6 +20625,7 @@ 16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet 1043 866e PEB-10G/57840-2T 10GBase-T Network Adapter 193d 100b NIC-ETH521i-Mb-4x10G + 4c52 9814 LREC9814AF Quad-port 10Gb Ethernet Server Adapter 16a2 BCM57840 NetXtreme II 10/20-Gigabit Ethernet 103c 1916 FlexFabric 20Gb 2-port 630FLB Adapter 103c 1917 FlexFabric 20Gb 2-port 630M Adapter @@ -20680,7 +20845,7 @@ 14e4 5425 NetXtreme-E Quad-port 25G SFP28 Ethernet OCP 3.0 Adapter (BCM957504-N425G) 14e4 d142 NetXtreme-E P425D BCM57504 4x25G SFP28 PCIE 1752 BCM57502 NetXtreme-E 10Gb/25Gb/40Gb/50Gb Ethernet - 1760 BCM57608 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb/400Gb Ethernet + 1760 BCM57608 10Gb/25Gb/50Gb/100Gb/200Gb/400Gb Ethernet 14e4 d125 BCM57608 2x200G PCIe Ethernet NIC 1800 BCM57502 NetXtreme-E Ethernet Partition 1801 BCM57504 NetXtreme-E Ethernet Partition @@ -21508,6 +21673,7 @@ 9290 FPGA Card 9300 Universal Exhaust Gas Oxygen Sensor Simulator 9310 Digital Programmable Resistor + 9320 Arria 10 FPGA Card 9350 Analog Input Card 1543 SILICON Laboratories 3052 Intel 537 [Winmodem] @@ -21719,6 +21885,10 @@ 021f CX8 Family [ConnectX-8 Secure Flash Recovery] 0220 BF4 Family Flash Recovery [BlueField-4 SoC Flash Recovery] 0221 BF4 Family Secure Flash Recovery [BlueField-4 Secure Flash Recovery] + 0222 CX8 PCIe Switch Family [ConnectX-8 PCIe Switch Flash Recovery] + 0223 CX8 PCIe Switch Family [ConnectX-8 PCIe Switch Secure Flash Recovery-RMA] + 0224 CX9 Family [ConnectX-9 Flash Recovery] + 0225 CX9 Family [ConnectX-9 Secure Flash Recovery-RMA] 024e MT53100 [Spectrum-2, Flash recovery mode] 024f MT53100 [Spectrum-2, Secure Flash recovery mode] 0250 Spectrum-3, Flash recovery mode @@ -21750,6 +21920,9 @@ 0285 Sagitta RMA 0286 LibraE Flash Recovery 0287 LibraE RMA +# Flash recovery + 0288 Arcus2 + 0289 Arcus2 RMA 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] 1014 04b5 PCIe3 40GbE RoCE Converged Host Bus Adapter for Power @@ -21850,6 +22023,8 @@ 1020 MT28860 1021 MT2910 Family [ConnectX-7] 1023 CX8 Family [ConnectX-8] + 1024 CX8 PCIe Switch Family [ConnectX-8 PCIe Switch] + 1025 CX9 Family [ConnectX-9] 1974 MT28800 Family [ConnectX-5 PCIe Bridge] 1975 MT416842 Family [BlueField SoC PCIe Bridge] 1976 MT28908 Family [ConnectX-6 PCIe Bridge] @@ -21859,11 +22034,14 @@ 197a MT43162 Family [BlueField-3 Lx SoC PCIe Bridge] 197b MT43244 Family [BlueField-3 SoC PCIe Bridge] 197c ConnectX/BlueField Family mlx5Gen PCIe Bridge [PCIe Bridge] + 197d CX8 Family [ConnectX-8 PCIe Bridge] + 197e CX9 Family [ConnectX-9 PCIe Bridge] 2020 MT2892 Family [ConnectX-6 Dx Emulated PCIe Bridge] 2021 MT42822 Family [BlueField-2 SoC Emulated PCIe Bridge] 2023 MT2910 Family [ConnectX-7 Emulated PCIe Bridge] 2024 MT43244 Family [BlueField-3 SoC Emulated PCIe Bridge] 2025 ConnectX/BlueField Family mlx5Gen Emulated PCIe Bridge [Emulated PCIe Bridge] + 2100 CX8 Family [CX8 Data Direct Interface] 4117 MT27712A0-FDCF-AE 1bd4 0039 SN10XMP2P25 1bd4 003a 25G SFP28 SP EO251FM9 Adapter @@ -21929,6 +22107,7 @@ a2df BF4 Family integrated network controller [BlueField-4 integrated network controller] b200 ArcusE b201 LibraE + b202 Arcus2 c2d1 BlueField DPU Family Auxiliary Communication Channel [BlueField Family] c2d2 MT416842 BlueField SoC management interfac c2d3 MT42822 BlueField-2 SoC Management Interface @@ -21995,12 +22174,14 @@ 5019 WD Green SN350 240GB (DRAM-less) / SN560E NVMe SSD 501a SanDisk Ultra 3D / WD Blue SN570 NVMe SSD (DRAM-less) 501d WD Blue SN550 NVMe SSD 2TB (DRAM-less) - 501e PC SN735 NVMe SSD (DRAM-less) + 501e PC SN735 / WD_BLACK SN750 SE NVMe SSD (DRAM-less) 501f WD PC SN735 NVMe SSD 512GB (DRAM-less) 5025 WD Blue SN570 NVMe SSD 2TB 5026 WD PC SN735 NVMe SSD 1TB (DRAM-less) 5028 WD CH SN560 NVMe SSD 5030 WD Black SN850X NVMe SSD + 5034 WD PC SN5000S M.2 2230 NVMe SSD (DRAM-less) + 5036 WD PC SN5000S M.2 2280 NVMe SSD (DRAM-less) 5041 WD Blue SN580 NVMe SSD (DRAM-less) 5042 WD Black SN770M NVMe SSD (DRAM-less) 15b8 ADDI-DATA GmbH @@ -23753,7 +23934,7 @@ 0100 A104d QUAD T1/E1 AFT card 0300 A101 single-port T1/E1 0400 A104u Quad T1/E1 AFT -1924 Solarflare Communications +1924 AMD Solarflare 0703 SFC4000 rev A net [Solarstorm] 10b8 0102 SMC10GPCIe-10BT (A2) [TigerCard] 10b8 0103 SMC10GPCIe-10BT (A3) [TigerCard] @@ -24070,8 +24251,11 @@ 196d Club-3D BV 196e PNY 1971 AGEIA Technologies, Inc. - 1011 Physics Processing Unit [PhysX] + 0000 Physics Processing Unit [PhysX] 100 Series PCI Express Card +# The PCI and PCIe versions have a different PID + 1011 Physics Processing Unit [PhysX] 100 Series PCI Card 1043 0001 PhysX P1 + 1021 Physics Processing Unit [PhysX] 200 Series PCI Express Card # nee Eberspaecher Electronics 1974 Star Electronics GmbH & Co. KG 0009 FlexCard PMC-II @@ -24727,6 +24911,7 @@ 1b96 4000 WD_BLACK AN1500 NVMe SSD 1d49 0306 ThinkSystem M.2 NVMe 2-Bay RAID Enablement Kit 1d49 0307 ThinkSystem 7mm NVMe 2-Bay Rear RAID Enablement Kit + 2b42 88W8997 2.4/5 GHz Dual-Band 2x2 Wi-Fi® 5 (802.11ac) + Bluetooth® 5.3 Solution 2b43 NXP 88W9098 Wi-Fi 6 (ax) MAC #1 2b44 NXP 88W9098 Wi-Fi 6 (ax) MAC #2 2b45 NXP 88W9098 Bluetooth 5.3 @@ -24775,6 +24960,7 @@ # 2xHDMI and 2xHD-SDI inputs e5f4 MPEG2 and H264 Encoder-Transcoder f1c4 Dual ASI-RX/TX-CI card +1b61 Byd Precision Manufacture Co.,Ltd 1b66 DELTACAST 0007 DELTA-3G-elp-d 1b6f Etron Technology, Inc. @@ -25005,6 +25191,21 @@ 1bee IXXAT Automation GmbH 0002 CAN-IB100/PCIe 0003 CAN-IB200/PCIe + 0004 CAN-IB120/PCIe Mini + 0005 CAN-IB130/PCIe 104 + 0006 CAN-IB230/PCIe 104 + 000e CAN-IB500/PCIe + 000f CAN-IB600/PCIe + 0010 CAN-IB300/PCI + 0011 CAN-IB400/PCI + 0012 CAN-IB520/PCIe Mini + 0016 CAN-IB410/PMC + 001c CAN-IB810/PMC + 001e INpact PCIe + 001f INpact PCIe Mini + 0029 INpact M.2 + 002d CAN-IB630/PCIe 104 + 002e CAN-IB640/PCIe 1bef Lantiq 0011 MIPS SoC PCI Express Port 1bf4 VTI Instruments Corporation @@ -25133,6 +25334,7 @@ 2429 PE6011 NVMe Solid State Drive 243b PE6110 NVMe Solid State Drive 1c5c 0100 PE6110 NVMe Solid State Drive + 2527 PE4010 NVMe Solid State Drive 2839 PE8000 Series NVMe Solid State Drive 1028 2143 DC NVMe SED PE8010 RI U.2 960GB 1028 2144 DC NVMe PE8010 RI U.2 960GB @@ -25259,6 +25461,14 @@ 1c5f 5445 NVMe SSD PBlaze7 7946 6400G E1.S 1c5f 5450 NVMe SSD PBlaze7 7946 12800G AIC 1c5f 5451 NVMe SSD PBlaze7 7946 12800G 2.5" U.2 + 1ea0 2100 TP2510 Series U.2 NVMe Datacenter SSD(3.84TB) + 1ea0 2101 TP2511 Series U.2 NVMe Datacenter SSD(3.84TB) + 1ea0 2110 TP2510 Series E3.S NVMe Datacenter SSD(3.84TB) + 1ea0 2111 TP2511 Series E3.S NVMe Datacenter SSD(3.84TB) + 1ea0 2200 TP2510 Series U.2 NVMe Datacenter SSD(7.68TB) + 1ea0 2201 TP2511 Series U.2 NVMe Datacenter SSD(7.68TB) + 1ea0 2210 TP2510 Series E3.S NVMe Datacenter SSD(7.68TB) + 1ea0 2211 TP2511 Series E3.S NVMe Datacenter SSD(7.68TB) 0540 PBlaze4 NVMe SSD 0550 PBlaze5 700/900 0555 PBlaze5 510/516 @@ -25373,6 +25583,10 @@ 1cc4 2213 NVMe SSD UH832a E3.S 3.2TB 1cc4 2214 NVMe SSD UH832a E3.S 6.4TB 1cc4 2215 NVMe SSD UH832a E3.S 12.8TB + 1cc4 3122 NVMe SSD UH712a U.2 1.92TB + 1cc4 3123 NVMe SSD UH712a U.2 3.84TB + 1cc4 3124 NVMe SSD UH712a U.2 7.68TB + 1cc4 3125 NVMe SSD UH712a U.2 15.36TB 1cc5 Embedded Intelligence, Inc. 0100 PCIe-CAN-02 Dual CAN bus (9-pin male). PCI Express x1. 0101 PCIe-CAN-01 Single CAN bus (9-pin male). PCI Express x1. @@ -25571,14 +25785,18 @@ 2440 CL2440 1d6a Aquantia Corp. 0001 AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] + 4c52 6880 LREC6880BT Single-port 10Gb Ethernet Network Adapter 00b1 AQtion AQC100 NBase-T/IEEE 802.3an Ethernet Controller [Atlantic 10G] 00c0 Antigua NBase-T/IEEE 802.3an Ethernet Controller - Engineering Sample 04c0 AQtion AQC113 NBase-T/IEEE 802.3an Ethernet Controller [Antigua 10G] + 4c52 1053 LRES1053PT Quad-port 10Gb Ethernet Network Adapter + 4c52 2051 LRES2051PT Single-port 10Gb Ethernet Network Adapter 07b1 AQtion AQC107 NBase-T/IEEE 802.3an Ethernet Controller [Atlantic 10G] # Older revision of QNAP QM2 M.2 2280 PCIe SSD & 10GbE Expansion Card 1baa 07b1 QM2-2P10G1TA [QXG 10GbE Network Adapter] # Newer revision of QNAP QM2 M.2 2280 PCIe SSD & 10GbE Expansion Card 1baa 07b2 QM2-2P10G1TA [QM2 Expansion Adapter] + 4c52 6880 LREC6880BT Single-port 10Gb Ethernet Network Adapter 08b1 AQC108 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 11b1 AQC111 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] 12b1 AQC112 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] @@ -25701,7 +25919,7 @@ 2262 NVMe PCIe SSD 220S/MTE662T2 2263 NVMe PCIe SSD 110S/112S/120S/MTE300S/MTE400S/MTE652T2 (DRAM-less) 2264 NVMe PCIe SSD 250H - 2267 NVMe PCIe SSD 240S/MTE710T + 2267 NVMe PCIe SSD 220S/240S/MTE710T 5766 NVMe PCIe SSD 110Q (DRAM-less) 1d7c Aerotech, Inc. # Fiber-optic HyperWire motion control bus from Aerotech. @@ -26178,6 +26396,7 @@ 1df3 0001 ENA2100RN 1df5 Shenzhen TIGO Semiconductor 1202 kimtigo NVMe SSD (DRAM-less) + 2263 kimtigo MG931K NVMe SSD (DRAM-less) 1df7 opencpi.org 0001 ml605 0002 alst4 @@ -26286,6 +26505,7 @@ 1028 223c Ent NVMe CM7 U.2 MU 6.4TB 1028 223d Ent NVMe CM7 U.2 MU 3.2TB 1028 223e Ent NVMe CM7 U.2 MU 1.6TB + 002a Exceria Plus G3 NVMe SSD (DRAM-less) 002c NVMe SSD Controller CD8P EDSFF 1028 22bf DC NVMe CD8P E3.S 15.36TB 1028 22c0 DC NVMe CD8P E3.S 7.68TB @@ -26329,7 +26549,9 @@ # FHFL PCIe card, dual slot, 3rd generation from Enflame, 48GB device memory c032 S90 [Enflame] # FHFL PCIe card, dual slot, 3rd generation from Enflame, 48GB device memory - c033 S60 [Enflame] + c033 S60G [Enflame] +# FHFL PCIe card, dual slot, 3rd generation from Enflame, 48GB device memory + c035 S60 [Enflame] # nee Thinci, Inc 1e38 Blaize, Inc 0102 Xplorer X1600 @@ -26338,7 +26560,7 @@ 2263 270PM6, 270PM7 series NVMe SSD 1e3b DapuStor Corporation 0600 NVMe SSD Controller DP600 - 1e3b 0006 Enterprise NVMe SSD U.2 QDP 7.68TB (J5000) + 1e3b 0006 Enterprise NVMe SSD U.2 ODP 7.68TB (J5001) 1e3b 0010 Enterprise NVMe SSD U.2 3.84TB (R5102) 1e3b 0013 Enterprise NVMe SSD U.2 3.20TB (R5302) 1e3b 0030 Enterprise NVMe SSD U.2 3.84TB (J5100) @@ -26377,23 +26599,39 @@ 1e3b 00be Enterprise NVMe SSD U.2 QDP 30.72TB (R5100) 1e3b 00c1 Enterprise NVMe SSD U.2 QDP 25.60TB (R5300D) 1e3b 00c4 Enterprise NVMe SSD U.2 QDP 30.72TB (R5100D) - 1e3b 00c9 Enterprise NVMe SSD U.2 15.36TB (J5000) - 1e3b 00ca Enterprise NVMe SSD U.2 3.84TB (J5102) - 1e3b 00cb Enterprise NVMe SSD U.2 7.68TB (J5102) - 1e3b 00cc Enterprise NVMe SSD U.2 3.84TB (J5101) - 1e3b 00cd Enterprise NVMe SSD U.2 7.68TB (J5101) - 1e3b 00ce Enterprise NVMe SSD U.2 3.84TB (J5101D) - 1e3b 00cf Enterprise NVMe SSD U.2 7.68TB (J5101D) - 1e3b 00e8 Enterprise NVMe SSD U.2 3.20TB (J5301) - 1e3b 00e9 Enterprise NVMe SSD U.2 6.40TB (J5301) - 1e3b 00ea Enterprise NVMe SSD U.2 3.20TB (J5301D) - 1e3b 00eb Enterprise NVMe SSD U.2 6.40TB (J5301D) + 1e3b 00c9 Enterprise NVMe SSD U.2 ODP 15.36TB (J5001) + 1e3b 00ca Enterprise NVMe SSD U.2 ODP 3.84TB (J5102) + 1e3b 00cb Enterprise NVMe SSD U.2 ODP 7.68TB (J5102) + 1e3b 00cc Enterprise NVMe SSD U.2 QDP 3.84TB (J5101) + 1e3b 00cd Enterprise NVMe SSD U.2 ODP 7.68TB (J5101) + 1e3b 00ce Enterprise NVMe SSD U.2 QDP 3.84TB (J5101D) + 1e3b 00cf Enterprise NVMe SSD U.2 ODP 7.68TB (J5101D) + 1e3b 00dc Enterprise NVMe SSD U.2 ODP 30.72TB with SAMSUNG 32GB DRAM (J5001) + 1e3b 00dd Enterprise NVMe SSD U.2 ODP 30.72TB with MT 32GB DRAM(J5001) + 1e3b 00de Enterprise NVMe SSD U.2 ODP 15.36TB with SK 16GB DRAM(J5001D) + 1e3b 00df Enterprise NVMe SSD U.2 ODP 30.72TB with SAMSUNG 32GB DRAM(J5001D) + 1e3b 00e7 Enterprise NVMe SSD U.2 ODP 30.72TB with MT 32GB DRAM(J5001D) + 1e3b 00e8 Enterprise NVMe SSD U.2 QDP 3.20TB (J5301) + 1e3b 00e9 Enterprise NVMe SSD U.2 ODP 6.40TB (J5301) + 1e3b 00ea Enterprise NVMe SSD U.2 QDP 3.20TB (J5301D) + 1e3b 00eb Enterprise NVMe SSD U.2 ODP 6.40TB (J5301D) 1e3b 00f0 Enterprise NVMe SSD U.2 0.40TB (X2900) 1e3b 00f1 Enterprise NVMe SSD U.2 0.80TB (X2900) 1e3b 00f2 Enterprise NVMe SSD U.2 1.60TB (X2900) 1e3b 00f3 Enterprise NVMe SSD U.2 3.20TB (X2900) 1e3b 00f5 Enterprise NVMe SSD U.2 0.40TB (X2900P) 1e3b 00f6 Enterprise NVMe SSD U.2 0.80TB (X2900P) + 0800 DP800 + 1e3b 0001 Enterprise NVMe SSD U.2 QDP 3.84TB(R6100) + 1e3b 0007 Enterprise NVMe SSD U.2 ODP 15.36TB (R6100) + 1e3b 000a Enterprise NVMe SSD U.2 3.20TB (R6300) + 1e3b 000d Enterprise NVMe SSD U.2 6.40TB (R6300) + 1e3b 0010 Enterprise NVMe SSD U.2 12.80TB (R6300) + 1e3b 0018 Enterprise NVMe SSD U.2 QDP 3.84TB (R6100C) + 1e3b 0019 Enterprise NVMe SSD U.2 ODP 7.68TB (R6100C) + 1e3b 001a Enterprise NVMe SSD U.2 3.20TB (R6300C) + 1e3b 001b Enterprise NVMe SSD U.2 6.40TB (R6300C) + 1e3b 001c Enterprise NVMe SSD U.2 ODP 7.68TB (R6100) 1098 Haishen3 NVMe SSD 1e3b 0001 Enterprise NVMe SSD U.2 0.8TB (H2100) 1e3b 0002 Enterprise NVMe SSD U.2 0.96TB (H2200) @@ -26446,6 +26684,8 @@ 1011 PC210 NVMe SSD 1013 PC210 NVMe SSD 1031 PC300 NVMe SSD (DRAM-less) + 1033 PC300 NVMe SSD (DRAM-less) + 1071 PC411 NVMe SSD (DRAM-less) 1e4b MAXIO Technology (Hangzhou) Ltd. 1001 NVMe SSD Controller MAP1001 1002 NVMe SSD Controller MAP1002 (DRAM-less) @@ -26461,8 +26701,13 @@ 1e50 IP3 Tech (HK) Limited 1e52 Tenstorrent Inc 401e Wormhole + 1e52 0014 n300 + 1e52 0018 n150 b140 Blackhole faca Grayskull + 1e52 0003 e150 + 1e52 0007 e75 + 1e52 000a e300 1e57 Beijing Panyi Technology Co., Ltd 0100 The device has already been deleted. 0000 0100 PY8800 64GB Accelerator @@ -26526,6 +26771,7 @@ 2a16 Cloud Intelligent Inference Controller 2a18 Video Transcode Controller 2a20 Cloud Intelligent Inference and Training Controller + 2a22 Cloud Intelligent Inference Controller 1ea7 Intelliprop, Inc 223a Typhon+ PCIe to Gen-Z Bridge 224a IPA-PE224A CXL to Gen-Z Bridge [Sphinx] @@ -26585,6 +26831,10 @@ 1ed0 Hosin Global Electronics 1ed2 FuriosaAI, Inc. *** 739 LINES SKIPPED *** From nobody Mon May 20 11:25:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjZxG23jrz5L2sT; Mon, 20 May 2024 11:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjZxF6tbwz45yr; Mon, 20 May 2024 11:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716204322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uVrYn5+tG3dO+G41X/Dg8y4I2ekeUcheKf6rXoEAzRE=; b=OKRhlxxtn4sgB/RRN1ySxn/u6R6Oelvh0PFa06XPQks6Wm/evLfC7rU3k5hMsLn57tH1Jv +0hBb4achX68Q5XVETvtHzspRY9gcXW/etrc3SG41uMG2QHpP3neiVT/MVSWGEAURymIQQ TiOUiatZnt6p+bpH4qY9iLWClVRvUUagchocMOKxQEdfyz+1V9/S2X4VR+yAJ+C6FuCksy +zG7QYcAHiCstWbaWZzO3XJpPJhlrEn0pCvHVHgwMNuHxvYcnYtJmoCM6conjNb2oPH8Ga bv51ueNxTgXSIZCOHUt0dnJWkuYoTTLbE5SxTPQ32Hj9Ryqr9+9mGWuwvhiUxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716204322; a=rsa-sha256; cv=none; b=gM9smreWexfqrKnAsBtUf8aw1pxYfZuggctxDyudXKjufby3cAdwnWa+sPmx/zFsMPbirE JpXDDor3g7EJ9qktIkULP9SkmPhwKA80hjXSXj0ld62D9Ac5U99UNKkGYPoFG5J9lrihwZ rRIypoh+/+19CXXJGQl1feE2dgrAUoN16zWydzEremvqTCOFgqOVuZ/wXXcrgco6yz6JCI KVYhNvdmOM9iLoF3Hvgo3spst+l+c9Mzu53mMQcPQ8r2oLwisgxtN+DjplMlICqapdFlpe jbK46XDVKTb8O5BzPGGjZxrfrFyy19rlF9tKpahFY+qvCASy/QhTST/vrDv5ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716204322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uVrYn5+tG3dO+G41X/Dg8y4I2ekeUcheKf6rXoEAzRE=; b=QXfmI1vi1R4fRRc++VPkFGZ1D4bayce0xLYTeJb8xQqRQCipxiXyZao+0VN4zWqJU3M1C+ 5sEu0YDmxwF9ohfgXfbjASN+FTl7vFCrXD8lrEtn2rgwEqGlk76Ymynqjv2jMR8WrLVsMq aQeVQcAnKuS959s4Zk4X5OWaGCowhWvilvmR/IiKkLLRl423cimbq3A7GLB567/vDysySF MMv6kcJgs0asoWtimgm/RxrCohndbhns0csx9GRhlo2Afwtn5Gd1QGTsI3SPiUCFN/ljhO mHcEqvvAw/40ZYR6CjWKYS5ShhbHrxzsNXWAYSpgv1VdN4VBNZpkIla6fKqjzQ== 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 4VjZxF6JlrzcL3; Mon, 20 May 2024 11:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KBPLNq025809; Mon, 20 May 2024 11:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KBPLNT025806; Mon, 20 May 2024 11:25:21 GMT (envelope-from git) Date: Mon, 20 May 2024 11:25:21 GMT Message-Id: <202405201125.44KBPLNT025806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: b454ede7524d - stable/14 - usb_vendors: update to 2024.03.18 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b454ede7524dae95d13ed570db886ca81060a9f5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=b454ede7524dae95d13ed570db886ca81060a9f5 commit b454ede7524dae95d13ed570db886ca81060a9f5 Author: Baptiste Daroussin AuthorDate: 2024-05-14 12:18:52 +0000 Commit: Baptiste Daroussin CommitDate: 2024-05-20 11:24:45 +0000 usb_vendors: update to 2024.03.18 (cherry picked from commit 79bffdf3f42e2e8e62223fcffd537d5d254ddbb7) --- share/misc/usb_vendors | 52 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/share/misc/usb_vendors b/share/misc/usb_vendors index 74a0cef04aa3..a1e3ea4acd1d 100644 --- a/share/misc/usb_vendors +++ b/share/misc/usb_vendors @@ -9,8 +9,8 @@ # The latest version can be obtained from # http://www.linux-usb.org/usb.ids # -# Version: 2024.01.30 -# Date: 2024-01-30 20:34:02 +# Version: 2024.03.18 +# Date: 2024-03-18 20:34:02 # # Vendors, devices and interfaces. Please keep sorted. @@ -209,6 +209,7 @@ 0012 DeskJet 1125C Printer Port 0024 KU-0316 Keyboard 002a LaserJet P1102 + 0036 CCID Smartcard Keyboard KUS0133 0053 DeskJet 2620 All-in-One Printer 0101 ScanJet 4100c 0102 PhotoSmart S20 @@ -2401,6 +2402,7 @@ 02ea Xbox One Controller 02fd Xbox One S Controller [Bluetooth] 02fe Xbox Wireless Adapter for Windows + 0306 Surface Pro 7 SD Card Reader 0400 Windows Powered Pocket PC 2002 0401 Windows Powered Pocket PC 2002 0402 Windows Powered Pocket PC 2002 @@ -5049,6 +5051,7 @@ 072d Revio KD410Z 04ca Lite-On Technology Corp. 0020 USB Keyboard + 003a Multimedia Keyboard 004b Keyboard 004f SK-9020 keyboard 008a Acer Wired Mouse Model SM-9023 @@ -8243,6 +8246,7 @@ 1093 Rugged 1094 Rugged THB 1095 Rugged + 1105 Mobile Drive (RLSD: 2022) a601 HardDrive a602 CD R/W 05a0 Vetronix Corp. @@ -9283,6 +9287,8 @@ # typo? 4004 Minolta Dimage Scan Elite II AF-2920 (2888) 0639 Chrontel, Inc. + 7213 CH7213 + 7231 CH7213 063a Techwin Corp. 063b Taugagreining HF 063c Yamaichi Electronics Co., Ltd (Sakura) @@ -11443,6 +11449,7 @@ 0826 Data Transit 0827 BroadLogic, Inc. 0828 Sato Corp. + a003 WS408 Label Printer 0829 DirecTV Broadband, Inc. (Telocity) 082d Handspring 0100 Visor @@ -12081,6 +12088,12 @@ 04b2 NC interface 04b3 keyboard front panel Cockpit 04b4 SCR_CCID + 04b5 Camera + 04b6 Cockpit Touchkeypad + 04b7 Cockpit Touchkeypad Bootloader + 04b8 MediSET USB4-W + 04b9 MediSET USB4-R + 04ba MediSET USB4-G 2701 ShenZhen SANZHAI Technology Co.,Ltd Spy Pen VGA 0909 Audio-Technica Corp. 001b ATR2100-USB @@ -12188,6 +12201,7 @@ 4cda Fenix 6 Sapphire 4cdb Fenix 6 0920 Echelon Co. + 5550 U60 FT Network Interface 7500 Network Interface 0921 GoHubs, Inc. 1001 GoCOM232 Serial @@ -12406,6 +12420,7 @@ 010f nanoKONTROL studio controller 0117 nanoKONTROL2 MIDI Controller 012f SQ-1 + 0203 KRONOS 0f03 K-Series K61P MIDI studio controller 0945 Pasco Scientific 0948 Kronauer music in digital @@ -12477,7 +12492,8 @@ 7140 T124 [Tegra K1/Logan 32-bit] 7210 SHIELD Controller 7321 Switch [Tegra Erista] recovery mode - 7423 T234 [Orin NX] recovery mode + 7323 T234 [Orin NX 16GB] recovery mode + 7423 T234 [Orin NX 8GB] recovery mode 7721 T210 [TX1 Tegra Erista] recovery mode 7820 T20 [Tegra 2] recovery mode 7c18 T186 [TX2 Tegra Parker] recovery mode @@ -12678,6 +12694,8 @@ 09d8 ELATEC GmbH 0320 TWN3 Multi125 0406 TWN4 MIFARE NFC + 0410 TWN4 HID + 0420 TWN4 CDC 09d9 KRF Tech, Ltd 09da A4Tech Co., Ltd. 0006 Optical Mouse WOP-35 / Trust 450L Optical Mouse @@ -12686,6 +12704,7 @@ 0018 Trust Human Interface Device 001a Wireless Mouse & RXM-15 Receiver 002a Wireless Optical Mouse NB-30 + 0103 Oscar X-710BK Gaming Mouse 022b Wireless Mouse (Battery Free) 024f RF Receiver and G6-20D Wireless Optical Mouse 0260 KV-300H Isolation Keyboard @@ -12693,12 +12712,16 @@ 09da Bloody V8 Mouse 1068 Bloody A90 Mouse 112c Bloody V5 Mouse + 2268 Keyboard (FK11) + 2690 PK-635G 3a60 Bloody V8M Core 2 Mouse 8090 X-718BK Oscar Optical Gaming Mouse 9033 X-718BK Optical Mouse 9066 F3 V-Track Gaming Mouse - 9090 XL-730K / XL-750BK / XL-755BK Mice + 9090 XL-730K / XL-747H / XL-750BK / XL-755BK Mice f613 Bloody V7M Mouse + f6cc B314 Light Strike Gaming Keyboard + fa44 B930 Light Strike RGB Mechanical Gaming Keyboard 09db Measurement Computing Corp. 0075 MiniLab 1008 0076 PMD-1024 @@ -12715,11 +12738,13 @@ 09e6 Silutia, Inc. 09e7 Real 3D, Inc. 09e8 AKAI Professional M.I. Corp. + 0029 APC40 mkII 0045 MPK Mini Mk II MIDI Controller 0062 MPD16 MIDI Pad Controller Unit 006d EWI electronic wind instrument 0071 MPK25 MIDI Keyboard 0076 LPK25 MIDI Keyboard + 007c MPK Mini MIDI Controller 09e9 Chen-Source, Inc. 09eb IM Networks, Inc. 4331 iRhythm Tuner Remote @@ -12783,6 +12808,9 @@ 1010 Bluetooth Device 1011 Bluetooth Device 1012 Bluetooth Device + 1243 CSRA64210 [TaoTronics Headset BH-22 in charging mode] + 4007 Mpow HC5 Headset in charging mode - HID / Mass Storage + 4010 Mpow HC5 Headset in charging mode - USB Hub ffff USB Bluetooth Device in DFU State 0a13 Telebyte, Inc. 0a14 Spacelabs Medical, Inc. @@ -12826,6 +12854,7 @@ 0a35 Radikal Technologies 002a SAC - Software Assigned Controller 008a SAC Hub +0a38 IRIS sa 0a39 Gilat Satellite Networks, Ltd 0a3a PentaMedia Co., Ltd 0163 KN-W510U 1.0 Wireless LAN Adapter @@ -12950,6 +12979,7 @@ 217f BCM2045B (BDC-2.1) 2198 Bluetooth 3.0 Device 219b Bluetooth 2.1 Device + 219c BCM2070 Bluetooth 21b1 HP Bluetooth Module 21b4 BCM2070 Bluetooth 2.1 + EDR 21b9 BCM2070 Bluetooth 2.1 + EDR @@ -12973,6 +13003,7 @@ 5802 BCM5880 Secure Applications Processor with fingerprint touch sensor 5803 BCM5880 Secure Applications Processor with secure keyboard 5804 BCM5880 Secure Applications Processor with fingerprint swipe sensor + 5832 BCM5880 Secure Applications Processor Smartcard reader 6300 Pirelli Remote NDIS Device 6410 BCM20703A1 Bluetooth 4.1 + LE bd11 BCM4320 802.11bg Wireless Adapter @@ -21442,6 +21473,8 @@ 20a0 Clay Logic 0006 flirc 4107 GPF Crypto Stick V1.2 + 4108 Nitrokey Pro + 4109 Nitrokey Storage 4123 IKALOGIC SCANALOGIC 2 414a MDE SPI Interface 415a OpenPilot @@ -21450,7 +21483,16 @@ 41e5 BlinkStick 4211 Nitrokey Start 4223 ATSAMD21 [castAR] + 4230 Nitrokey HSM + 4287 Nitrokey FIDO U2F 428d Electrosense wideband converter + 42b1 Nitrokey FIDO2 + 42b2 Nitrokey 3A Mini/3A NFC/3C NFC + 42b4 Nitrokey Pro Bootloader + 42da MuteMe + 42dd Nitrokey 3A NFC Bootloader/3C NFC Bootloader + 42e8 Nitrokey 3A Mini Bootloader + 42ec RP2040 [PicoWifi] 20b1 XMOS Ltd 10ad XUSB Loader f7d1 XTAG2 - JTAG Adapter @@ -22171,7 +22213,7 @@ 2581 Plug-up 1807 Generic HID Smartcard 1808 WinUSB Smartcard - f1d0 FIDO U2F Security Key + f1d0 Nitrokey U2F 258d Sequans Communications 259a TriQuint Semiconductor 25a7 Areson Technology Corp From nobody Mon May 20 12:15:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjc2l5bZgz5L7yw; Mon, 20 May 2024 12:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjc2l3vJ7z4Fg6; Mon, 20 May 2024 12:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716207311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TLij/l1vEELjeTm00Fd0tIxudMJb/vpHfjNKt2lQ21E=; b=bHyAuxvx5RyeejAMwiP/ejPX8LbPnRqpkAacvEEROuGKpNqIC6l7l5TJQxzWLrpL4c18Gx HakbFxCwQXkuolDSBMClsXBj+EM+4iRENqn02y/xIjXZHNrizyW9NklpUWmvffm+Rdtv6n 9Vy13dAJv+v8yzcDNYYDfd6b0+MOvL6PhqvFAlTvE7h4HH0R9j2JoRrDYlj0Epj31MEv+9 vnZ1aE8iy7Liufwh0WepEDKMtRY7bLaR+rrSPZwE2VxaSrDzUm0XX+d/wBlxPZyUHZs4bO UQGT10/f2L0bkA7WwULGgTI8tKlhzykGND0gSbS1no4FuxK04jUsguDyisrSmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716207311; a=rsa-sha256; cv=none; b=bljGBMCkY4NWUABx+4u+FPgwRW88IDlfEtV7mSqdtFW+xtuWFjLqg7ABAYJN+IAsTS5InV oSVaEFfr1JcjVXErE6q59GAmgb16DvKW8wzgTBZVPQkAeN7RfICBeemcmF0DbwzIFYInAy gNdfcAwJG6DbbC3+x8RbyI8hHFxEKScyXuTmF0j7Wcl/72yqUw12KN/hdBpG/ifOAc/vwv 7l13OCETd/bEWUkAOqM0/4oxPIDd52AWMhwHa1deLOD/DBT44oojcpPQ7Cf40ADGOr+z0U 6+RHx2uFhwLX35k37qEiyrsSEWToIfvCOnp7tqegCjS15SIZSBqJad2MzbOxCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716207311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TLij/l1vEELjeTm00Fd0tIxudMJb/vpHfjNKt2lQ21E=; b=xkTgU8Y1c2WUjx/yHdSIBFGte2VsqRvHphyz1KGy7cAlIwvKV6YZkz1eJ2oD2OQliGoDIB xcH6e2bvJ4vXCA9K4UdyqYTJEOaMGsg+/e+eRnD18Ym56xVS7gLdD72Hj7q0M+ADw79Cdc BEh2DzmPmYZrfqMCyPWSzSxMWYuLe9q6gvZEjT9iPn7+FjbOdTNi3/KQloEJGWjJHVok/s bH2BARvQHJcxgrv1xf2bTDJWN9GOSvu+y2Jf8KqoEFJGf6lLeiJxWooBjUafFI6DceL3Tu JZBi9lo2/7zZ18x3TE61OEuoujNBPqAuWsowPuPbx8y1r3XQQ7oStPgQYWxrmg== 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 4Vjc2l2Gv8zdLT; Mon, 20 May 2024 12:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KCFBZ3011724; Mon, 20 May 2024 12:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KCFBNZ011721; Mon, 20 May 2024 12:15:11 GMT (envelope-from git) Date: Mon, 20 May 2024 12:15:11 GMT Message-Id: <202405201215.44KCFBNZ011721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 93fbfef0b503 - main - if_vxlan(4): Add checking for loops and nesting of tunnels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93fbfef0b50354b7a1620822454ef29cd415cb2d Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=93fbfef0b50354b7a1620822454ef29cd415cb2d commit 93fbfef0b50354b7a1620822454ef29cd415cb2d Author: Zhenlei Huang AuthorDate: 2024-05-20 12:14:07 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-20 12:14:07 +0000 if_vxlan(4): Add checking for loops and nesting of tunnels User misconfiguration, either tunnel loops, or a large number of different nested tunnels, can overflow the kernel stack. Prevent that by using if_tunnel_check_nesting(). PR: 278394 Diagnosed by: markj Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45197 --- sys/net/if_vxlan.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index c6c3af57c78b..9153adf64cfc 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -432,6 +432,21 @@ TUNABLE_INT("net.link.vxlan.legacy_port", &vxlan_legacy_port); static int vxlan_reuse_port = 0; TUNABLE_INT("net.link.vxlan.reuse_port", &vxlan_reuse_port); +/* + * This macro controls the default upper limitation on nesting of vxlan + * tunnels. By default it is 3, as the overhead of IPv6 vxlan tunnel is 70 + * bytes, this will create at most 210 bytes overhead and the most inner + * tunnel's MTU will be 1290 which will meet IPv6 minimum MTU size 1280. + * Be careful to configure the tunnels when raising the limit. A large + * number of nested tunnels can introduce system crash. + */ +#ifndef MAX_VXLAN_NEST +#define MAX_VXLAN_NEST 3 +#endif +static int max_vxlan_nesting = MAX_VXLAN_NEST; +SYSCTL_INT(_net_link_vxlan, OID_AUTO, max_nesting, CTLFLAG_RW, + &max_vxlan_nesting, 0, "Max nested tunnels"); + /* Default maximum number of addresses in the forwarding table. */ #ifndef VXLAN_FTABLE_MAX #define VXLAN_FTABLE_MAX 2000 @@ -2721,6 +2736,7 @@ vxlan_encap6(struct vxlan_softc *sc, const union vxlan_sockaddr *fvxlsa, #endif } +#define MTAG_VXLAN_LOOP 0x7876706c /* vxlp */ static int vxlan_transmit(struct ifnet *ifp, struct mbuf *m) { @@ -2746,6 +2762,13 @@ vxlan_transmit(struct ifnet *ifp, struct mbuf *m) m_freem(m); return (ENETDOWN); } + if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_VXLAN_LOOP, + max_vxlan_nesting) != 0)) { + VXLAN_RUNLOCK(sc, &tracker); + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ELOOP); + } if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) fe = vxlan_ftable_entry_lookup(sc, eh->ether_dhost); From nobody Mon May 20 13:33:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjdmn0gBfz5LH5P; Mon, 20 May 2024 13:33: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjdmn08pdz4NmS; Mon, 20 May 2024 13:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7ahZmNLAHzE8IUqxP9PBNV29Kf15Je3UKwudAwrWuw=; b=i4O3c34KFwcGoiC0+jRMEK1cmBMfGZBmUPBs3apU4NcjdaEYfzYO++nAx+wEMUU0Rp76EF p6nuf6digM/z0M1Rvvw78hlss3PRP3FXmlv57Dd4qlQuGRAIz/xEsNgxcJze4giota6b9a J7mQU975DoaJzOoUS6IAR3Xo6krpKREIEt2vS2USKipWWg3Kjhkropn5mPV5ngM4I/HZVX XxA1dnGQafHzbFZ+ab3U1L8kJAf3IKYTLmwhbu+O5bs06+Ozc7UKZGnHGZw1B+Jx9TFOUo pC24o26TXYgOW1B55UYokf3ZSsX2WVEqmrAAW35MlnQioUa3r+HAjA9H9d3NbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716211993; a=rsa-sha256; cv=none; b=lTrBX3/Kfuu7Y0fMDch2YuXnLpMy1Erm7ay76ijEGQhCY0re5WZWS/5LDSVoq3OZMS9NSH tDgc/tVURmWBhYTrD5LEV/RRIJ3cwk5mUqS+L7mSnhmfGo2Ae0w4aPiUeRXhxp3x+qnCC2 uvnbzCrq3WQbb6YDAeFUal6Gtl2L1o428Vl1199toNGDVaj1D5eltmZh0VpJcExjoDYz3j HBHZN9HOgneIQtihaeXuTsFpQ+fhBawPo6Gzfy1YWAoy8hci+XszFlLR8fknbrp+W1CAMC sErJXsY5KeAK73oW84xAMulf+d37je31XdADpDTVGWbM8bWj4Q0IdSuyLDpI9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7ahZmNLAHzE8IUqxP9PBNV29Kf15Je3UKwudAwrWuw=; b=lk5zgA72AwWnuHzrnCpZQOJzyEUr9vEDH9eC6ADRwn/YfoP8T77ALpiZ7qO2dxKpaK/GyR Gc9+3BsTqKzOp5B9SiJku3WWGljcv3LrNyjqIpLdcX0ly/m+rP9X+AtcHKUJcbe9D9K+UE eZHFKtYwoBerdJmaFUaSuDWJLJ5y7L12mmfdrOBVWuewFWfOYNlLjucdlpqTaSoMqBl9+m JftmoyPT3iKC35gqFozc2p4ydgP3Sjo9wHzj7wiRB71EGIQjfc3VI48aw6D+5Yj2oYLJCe KaaIfRXc9tvAHvRmpyokbCSqUJq6CSgQgg+Fj4SnSK7cjt/XoNP/4SLoqPzxYg== 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 4Vjdmm6tgFzgll; Mon, 20 May 2024 13:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDXClO045747; Mon, 20 May 2024 13:33:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDXCLb045744; Mon, 20 May 2024 13:33:12 GMT (envelope-from git) Date: Mon, 20 May 2024 13:33:12 GMT Message-Id: <202405201333.44KDXCLb045744@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: 974ea6b297f8 - main - libdiff: Detect and recover from file truncation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 974ea6b297f8f9821bbb60670e2b90ba9989b283 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=974ea6b297f8f9821bbb60670e2b90ba9989b283 commit 974ea6b297f8f9821bbb60670e2b90ba9989b283 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 13:26:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 13:26:33 +0000 libdiff: Detect and recover from file truncation. If a memory-mapped file is truncated before we get to the end, the atomizer may catch SIGBUS. Detect that, reduce the input length to what we were actually able to read, and set a flag so the caller can take further action (e.g. warn the user and / or start over). Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45217 --- contrib/libdiff/include/diff_main.h | 1 + contrib/libdiff/lib/diff_atomize_text.c | 35 ++++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/contrib/libdiff/include/diff_main.h b/contrib/libdiff/include/diff_main.h index 04a6c6e748c9..11700580db4b 100644 --- a/contrib/libdiff/include/diff_main.h +++ b/contrib/libdiff/include/diff_main.h @@ -118,6 +118,7 @@ struct diff_data { /* Flags set by file atomizer. */ #define DIFF_ATOMIZER_FOUND_BINARY_DATA 0x00000001 +#define DIFF_ATOMIZER_FILE_TRUNCATED 0x00000002 /* Flags set by caller of diff_main(). */ #define DIFF_FLAG_IGNORE_WHITESPACE 0x00000001 diff --git a/contrib/libdiff/lib/diff_atomize_text.c b/contrib/libdiff/lib/diff_atomize_text.c index 32023105af94..d8a69733fc00 100644 --- a/contrib/libdiff/lib/diff_atomize_text.c +++ b/contrib/libdiff/lib/diff_atomize_text.c @@ -16,6 +16,8 @@ */ #include +#include +#include #include #include #include @@ -122,10 +124,18 @@ diff_data_atomize_text_lines_fd(struct diff_data *d) return DIFF_RC_OK; } +static sigjmp_buf diff_data_signal_env; +static void +diff_data_signal_handler(int sig) +{ + siglongjmp(diff_data_signal_env, sig); +} + static int diff_data_atomize_text_lines_mmap(struct diff_data *d) { - const uint8_t *pos = d->data; + struct sigaction act, oact; + const uint8_t *volatile pos = d->data; const uint8_t *end = pos + d->len; bool ignore_whitespace = (d->diff_flags & DIFF_FLAG_IGNORE_WHITESPACE); bool embedded_nul = false; @@ -136,8 +146,22 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d) ARRAYLIST_INIT(d->atoms, 1 << pow2); + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = diff_data_signal_handler; + sigaction(SIGBUS, &act, &oact); + if (sigsetjmp(diff_data_signal_env, 0) > 0) { + /* + * The file was truncated while we were reading it. Set + * the end pointer to the beginning of the line we were + * trying to read, adjust the file length, and set a flag. + */ + end = pos; + d->len = end - d->data; + d->atomizer_flags |= DIFF_ATOMIZER_FILE_TRUNCATED; + } while (pos < end) { - const uint8_t *line_end = pos; + const uint8_t *line_start = pos, *line_end = pos; unsigned int hash = 0; while (line_end < end && *line_end != '\r' && *line_end != '\n') { @@ -164,15 +188,16 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d) *atom = (struct diff_atom){ .root = d, - .pos = (off_t)(pos - d->data), - .at = pos, - .len = line_end - pos, + .pos = (off_t)(line_start - d->data), + .at = line_start, + .len = line_end - line_start, .hash = hash, }; /* Starting point for next line: */ pos = line_end; } + sigaction(SIGBUS, &oact, NULL); /* File are considered binary if they contain embedded '\0' bytes. */ if (embedded_nul) From nobody Mon May 20 13:33:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjdmq6lHYz5LGf2; Mon, 20 May 2024 13:33: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjdmq1wkXz4Nwc; Mon, 20 May 2024 13:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2UFTRig/9hy7rCWfAC5k+xMj8pTrKkn4hMbAB9MCIoA=; b=OaqcuQ4ml1uhZGWfMAPoSN9F6WMZ/t8dRQvErh1cSo/TL7zgBinFmr+ObYc8ndz28ndQLW UKIV5slwRZdl5yUjTUDG4Tv6VuTmH4iXdLRVaUMf8oAV5Qu5nvGQcWiQ/QWN5vah2kSoDb tBGfdJSSWYI2PGW4N1ICwyrOVKcdvK3XeI2Xn8yWB2zpVwQW31yrUxD/pAyTlZR21ICvAD JNA4l7co5a//jukqRaNaPwropk3fbVaEnXJJ4Ity4KlUveZWDCgeJplwlBRAnDFKUMAo2W pqJMXPE7OAJ1LlGpDCk8BLHoqusQOg6YaWmmbox3rljH52tb5sxVDTraZQ3TGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716211995; a=rsa-sha256; cv=none; b=gN45l+9eYkJVzsGdvGwoDKmpVNH9MmaMZDLubgF6egX2nxST3RcJxMUos7YDx2DknWuH0M Q1ZwIQGZyzHd6JQmW/nndyi5fSIBIq5ENHEP0YE6+Cxk5OwtPpjLVEQZeyVO/fWEy/Kgnc kdeG41JFW+YljPnxICVyshAAaKU4RdWpRWYaQwCccpTeUy/RDCCBJjh7ehSV5P6CJOdfT8 oi4KLKdHXWdZYEn0TzIEmASOnBnQWm6PLhW6k86LWieFgsHtnWKG/Mk2ZTtd5sxwdv55ll dD34wJ1i6rU8z0i9jPL+80PohWRghEv0gvhA4LkNc5avntqR+nvgu6QkedoP4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2UFTRig/9hy7rCWfAC5k+xMj8pTrKkn4hMbAB9MCIoA=; b=lwshz1Iv/F9i5Z1WMP3HxWxwMADVO6DuAB6bsOkrySifql7gFJeJ5x42YhlJvnRnjpdXMD i97+Acrmg/fSPboBV9S3NQ4vop6cLW8gJ1LR3E4f/DFngRCkBglfaNMGYfydFM9CE1PU7V GkflbHRqOJuJzj5EbPvQDtcBdE2RB8kLwbyQTNRW9rgeLRn7iSSq+Je9JYIThd9AeG1FcR DpnivErOMZpXHlvoQj1Yn7wPp2v+OzSZStHRbpO7ySkwixSn35FgRiHd+WQSe9uyVSob8W vZoEutN7YT7Y3MPLJ2Y9hpjeozmz/hm5wDXDXMKRX5bIbvDS9DwLiJHCelqDXg== 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 4Vjdmq1Y32zglb; Mon, 20 May 2024 13:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDXFTf045859; Mon, 20 May 2024 13:33:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDXFiO045856; Mon, 20 May 2024 13:33:15 GMT (envelope-from git) Date: Mon, 20 May 2024 13:33:15 GMT Message-Id: <202405201333.44KDXFiO045856@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: b780b6508b58 - main - diff: Warn if the atomizer detected truncation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b780b6508b586f52126037fd748fe74dbeb12495 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b780b6508b586f52126037fd748fe74dbeb12495 commit b780b6508b586f52126037fd748fe74dbeb12495 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 13:26:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 13:26:46 +0000 diff: Warn if the atomizer detected truncation. Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D45219 --- usr.bin/diff/diffreg_new.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/diff/diffreg_new.c b/usr.bin/diff/diffreg_new.c index 3b50dfd5940b..a7a40ec12ec9 100644 --- a/usr.bin/diff/diffreg_new.c +++ b/usr.bin/diff/diffreg_new.c @@ -218,10 +218,14 @@ diffreg_new(char *file1, char *file2, int flags, int capsicum) rc = D_ERROR; goto done; } + if (left.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED) + warnx("%s truncated", file1); if (diff_atomize_file(&right, cfg, f2, (uint8_t *)str2, st2.st_size, diff_flags)) { rc = D_ERROR; goto done; } + if (right.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED) + warnx("%s truncated", file2); result = diff_main(cfg, &left, &right); if (result->rc != DIFF_RC_OK) { From nobody Mon May 20 13:33:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjdmp3QQLz5LGvk; Mon, 20 May 2024 13:33: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjdmp0vFtz4Nwb; Mon, 20 May 2024 13:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpkUYWUzHhaPdfnTN/qjWdIM63B53FbAnNqmi478gMc=; b=jnFtBotsdLNiU8oya6DwsdjiHzG1G5ieZj2hWM8BdBw2VUr8pqdQkop6OUcuJtkVxeyOf2 jx3A3id27ybz6n1agH3EMewyzjddYWwxd86trHQguJFkGpQjW4BOx89dwxfL7xo/S4LVjl 7Vqr/ZepK6RPkdM3ia6Qzsp4aWoMrR7PIohfPtoIW1XObHlHNdMt4E09j6ql9ICZEhoKzI 4Ky996fuxmPKL0wKPBj92s8+YydtoWpA43qcU9X3u5n+Wya8ZSMhpJHcmbVs6YNAZfOtn9 NrTCsTr6hwS/KaIBNMb9SjgMo8kmIKly7dEOc5otHxELoHqEQe97Y9FPVCUCsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716211994; a=rsa-sha256; cv=none; b=Avkug74CyXYENTI8WXQneHBk3m37ukfLvMZEeexxzc5ytoYYGw4Q8l3sKzNAUzeLv+5UXv ZHHYpTwkWCkbxTphD598Uzl9MPca1NcE5vGbCOV83d0VA36b6nrX2VE/7wIqwXs3JexMQP JfxeSqZKS2E3oBIvqSywO3MOUoDd4dlrNwqkAqDGQwdBWp0kdHL5EF2UmHDfVWqHQDxqzi gs3NDT8qJEbpW7r2TlOo8Ru24zsHLUWh4kThBHl6xRQL4IgSfIC/BoGM1Qg4L8eNznt4i5 1k3pz5VRB8s/BuKE3VUKohk15qQlYJr+ssrWtWVy8czUVbArpy+AdKlK+lAFDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpkUYWUzHhaPdfnTN/qjWdIM63B53FbAnNqmi478gMc=; b=sZ+Sfk55vxCElPQvHm1nE7pGurCbgZxMp7TzQuwDVNC7uSnvYm2+YExKcE7Xumsk+aTq9Z kS2Ob43UYdHELDD1YPMWc6b9bsPtrPFTg9Hr1cTBJSPtNlTJYLqIcLXt70XAfmYa6En3KS wQQeyC23awsgxH0FmDVVCFSQ7rWV2refYFg1eHITeYGJUJc//WD0Dw8KoVUILw6WHRU4jG Lsj5gV880Nn54lN54Y7jf9uLv78HIiC7u0UWIXvbndWTVZwOdyaGF5pWHtJFCzYhcCfetc RUUEC8p/VHLoo9sepnTwAbbsL4hNxAU81YKptq9rzLqZTTpFLK7JL+cC9G369Q== 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 4Vjdmp0W0DzgL7; Mon, 20 May 2024 13:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDXDLq045803; Mon, 20 May 2024 13:33:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDXD6D045800; Mon, 20 May 2024 13:33:13 GMT (envelope-from git) Date: Mon, 20 May 2024 13:33:13 GMT Message-Id: <202405201333.44KDXD6D045800@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: 02d98d1850f8 - main - libdiff: Add a test for the truncation issue. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 02d98d1850f870e535b93dccb7284dffe81d65d7 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=02d98d1850f870e535b93dccb7284dffe81d65d7 commit 02d98d1850f870e535b93dccb7284dffe81d65d7 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 13:26:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 13:26:42 +0000 libdiff: Add a test for the truncation issue. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D45218 --- etc/mtree/BSD.tests.dist | 2 ++ lib/libdiff/Makefile | 5 ++++ lib/libdiff/tests/Makefile | 8 ++++++ lib/libdiff/tests/libdiff_test.c | 61 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index d0451081022b..3f447f9ec25e 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -419,6 +419,8 @@ .. libdevdctl .. + libdiff + .. libexecinfo .. libkvm diff --git a/lib/libdiff/Makefile b/lib/libdiff/Makefile index 3fa8e6b05d2d..8541ff424de2 100644 --- a/lib/libdiff/Makefile +++ b/lib/libdiff/Makefile @@ -1,3 +1,5 @@ +.include + LIB= diff INTERNALLIB= # API not published or supported. @@ -12,4 +14,7 @@ WARNS= CFLAGS+= -I${SRCTOP}/contrib/libdiff/compat/include CFLAGS+= -I${SRCTOP}/contrib/libdiff/include +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/lib/libdiff/tests/Makefile b/lib/libdiff/tests/Makefile new file mode 100644 index 000000000000..278ad7c95dcf --- /dev/null +++ b/lib/libdiff/tests/Makefile @@ -0,0 +1,8 @@ +PACKAGE= tests + +ATF_TESTS_C= libdiff_test + +CFLAGS = -I${SRCTOP}/contrib/libdiff/lib -I${SRCTOP}/contrib/libdiff/include +LIBADD = diff + +.include diff --git a/lib/libdiff/tests/libdiff_test.c b/lib/libdiff/tests/libdiff_test.c new file mode 100644 index 000000000000..f12717686721 --- /dev/null +++ b/lib/libdiff/tests/libdiff_test.c @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2024 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +ATF_TC_WITH_CLEANUP(diff_atomize_truncated); +ATF_TC_HEAD(diff_atomize_truncated, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verify that the atomizer " + "does not crash when an input file is truncated"); +} +ATF_TC_BODY(diff_atomize_truncated, tc) +{ + char line[128]; + struct diff_config cfg = { .atomize_func = diff_atomize_text_by_line }; + struct diff_data d = { }; + const char *fn = atf_tc_get_ident(tc); + FILE *f; + unsigned char *p; + size_t size = 65536; + + ATF_REQUIRE((f = fopen(fn, "w+")) != NULL); + line[sizeof(line) - 1] = '\n'; + for (unsigned int i = 0; i <= size / sizeof(line); i++) { + memset(line, 'a' + i % 26, sizeof(line) - 1); + ATF_REQUIRE(fwrite(line, sizeof(line), 1, f) == 1); + } + ATF_REQUIRE(fsync(fileno(f)) == 0); + rewind(f); + ATF_REQUIRE(truncate(fn, size / 2) == 0); + ATF_REQUIRE((p = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fileno(f), 0)) != MAP_FAILED); + ATF_REQUIRE(diff_atomize_file(&d, &cfg, f, p, size, 0) == 0); + ATF_REQUIRE((size_t)d.len <= size / 2); + ATF_REQUIRE((size_t)d.len >= size / 2 - sizeof(line)); + ATF_REQUIRE(d.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED); +} +ATF_TC_CLEANUP(diff_atomize_truncated, tc) +{ + unlink(atf_tc_get_ident(tc)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, diff_atomize_truncated); + return atf_no_error(); +} From nobody Mon May 20 13:44:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjf1m40t0z5LJHS; Mon, 20 May 2024 13:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjf1m2LxPz4QFL; Mon, 20 May 2024 13:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O92m/83AwjQxcMCZRUeYXKll791XU4gHHtX3UphlaG8=; b=WTG+/+bqnguHHAEdpa9wMzWq8UI6LyvUX2NfMIDTuvaAplRoPK1AR4QAafBm/Qf4cNtKVj 3fWV+Gsi4c1it+H1XPTCl9jn0d0d5QCE0JJC2n/LILjgKpLaLT5YuvLmaz2D3K+cn2OyRE t/LVB82JMbVaRb1FWKUZ/StfHYXA8kvcguntbWNoUUVlg9LS7t5Ksjz42xXd3/mgtgQblI A+Mi+GBZq+0ztxyj2haqcoQqRJZTaAJzBJzoEtt0k8IG66cWC48G+67suTLZ23ngXSBq4a OcQaqLaQ7nGvdNBRhvlA8KJCJnMKPn73JuAIqqwRIMSkbEHPrB3uVfE/z4426w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716212668; a=rsa-sha256; cv=none; b=M6ZjsCPu94Ox0K7zpaS/CWujRFYLlm/auZq/rymb6u4eQ518r/51K76Av5ywnPuwSgQDAk ttf3vr3QsAgu6KKDt3W++cHSae7Rr+7lXpSNfc4Q8umc6dsaA3gNe2QlYUAjmVk1QZWrfX vfPIMJLMvpjmEjVG4z8PrTKq9f2HTSDxbldvNBSTU8h0kNFUCnHeuA02dQZUnqPkD7X4AJ 7dIi44wRSGRtDHsx73LF1qYToftD1ucvnixhTJXbAPu1hEhWt7wLa6HGiDPGY18cBtL2ph 7Rf2TVLTnih4wRa+tOs+KJ1l3aQrdMt5LWVowwrIp66cNrCrxdP5IstjGsgZAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O92m/83AwjQxcMCZRUeYXKll791XU4gHHtX3UphlaG8=; b=ZaBm5y+Wi5wclg7imHusuMrXrZKg/GEqDYitIiLIjkYaI8Ld/ZI0WmFZgKuHCAZWnsBLyq hQ1bB3gzWuQANYref0dlT24u+fwnwxz07E+HI3ot1XmXjzXBXsWxDNBcqIQ6Rg/7uVy020 HHxfM5d6jVuYMczX1xBrBuN6XZ/RoHqFFMrK/XgXYI8fIQEKWLCmL08GLkdvJekX2tffyu HLVQ8+V/PKGyZAWaPeGztFD1wRrkGQRlT5O7HIRuBMvRayR0vUCZu0UXRSOKyaWWBWQoCE peeqkM6+Oz5TWPyQwNhUhQVOOXDWUbzxduapptV94/f837h0ziKSjpy0qXqIDQ== 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 4Vjf1m1fM0zh6J; Mon, 20 May 2024 13:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDiSLj062462; Mon, 20 May 2024 13:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDiSrg062458; Mon, 20 May 2024 13:44:28 GMT (envelope-from git) Date: Mon, 20 May 2024 13:44:28 GMT Message-Id: <202405201344.44KDiSrg062458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 0b39b2e2ddb2 - main - adduser: create dataset only if home is directly within dataset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e commit 0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e Author: Mike Karels AuthorDate: 2024-05-20 13:43:34 +0000 Commit: Mike Karels CommitDate: 2024-05-20 13:43:34 +0000 adduser: create dataset only if home is directly within dataset Currently, if the prefix of the new home directory is a subdirectory of a ZFS dataset, adduser will create a new dataset up one or more levels from the intended destination. "pw useradd" will then create a normal directory in the desired location, leaving an unused dataset. Check for this situation when determining whether to create a dataset, and let pw create the directory. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D45229 MFC after: 3 days --- usr.sbin/adduser/adduser.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh index 7c3fdb418179..ecac7478befd 100644 --- a/usr.sbin/adduser/adduser.sh +++ b/usr.sbin/adduser/adduser.sh @@ -474,7 +474,7 @@ get_homeperm() { # so, enable ZFS home dataset creation. # get_zfs_home() { - local _prefix= + local _prefix= _tmp= # check if zfs kernel module is loaded before attempting to run zfs to # prevent loading the kernel module on systems that don't use ZFS @@ -487,6 +487,13 @@ get_zfs_home() { Zcreate="no" return fi + # Make sure that _prefix is not a subdirectory within a dataset. If it + # is, the containing dataset will be the same for it and its parent. + _tmp=$(${ZFSCMD} list -Ho name "$(dirname "${homeprefix}")" 2>/dev/null) + if [ "${_tmp}" = "${_prefix}" ]; then + Zcreate="no" + return + fi zhome="${_prefix}/${username}" } From nobody Mon May 20 13:46:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjf4M15Crz5LJX1; Mon, 20 May 2024 13:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjf4M0RFtz4Qtv; Mon, 20 May 2024 13:46:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sjaGg01gUpHlc7vncrNFPldOofjs1sJ2BROmuvIh8Q=; b=sElQyStBX7NDTuSnGAtUad5rIvIxAQ4+4S6oxYMOZu8t+6cJprmlLFVA8iO8+qUid8e7uH fHMn3BafZB7Sj3J0ZlbSbMiEwkPIVbHOoJckVNigFrH2bUpj18WPaEYjMEZLtfz4gS9mkG /uefXXXxH9zAV7T7oHPwZ3xRe9LLX5c9cLFcHXM5e2YNqIQHUFPLef+rxnqy/XRbMnlerY sCS6m6dbC0MWB+C29Sb5s1kH6kqYoJvVVbUMFnQUSQjkPrhSBjk01SZkqQXG0OA36WF8kj K/Wju+AFT2Y58yVKiODae1wGHupZGID57BfQRZ2EI4v7zyHZejeMN2c2GoQf+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716212803; a=rsa-sha256; cv=none; b=qIkuX/151jtPX2DVGzzuZJnlyGly3hRjxPVou1n+bX66HvDBKR9jKqQfd8gT/wn1e6Sl9P FAmiyOHj//xNxk1Xfx96S2mHeAU80VUHieHJ8wpAP0EgX+n2+2kebD3KWnSi9z7QjlV5NE XHvs5MdknGxUJLACLQ3mnJ9kB9WD8dqHhZpdFrMyQ8Xdplz6a3t6vcOrJIAY849nbgl1iC VUQIj6SuARt5zI6pmnv+Mmb2VJO3FtyvXIbRndjnNWy1/qzkqRb8M1A+yFRSFHUCjdnEp8 2SxUwJ8YJY5YizosE3O4DUVYUWNTTnzJltALPZKFXH7qqbmLdS1lz5WwZ4fUTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9sjaGg01gUpHlc7vncrNFPldOofjs1sJ2BROmuvIh8Q=; b=I85DOKvDTkGefcnsdov+bb5/Cvg0OH/XAJqjAT+Qtt0UISXbb2+ZQr4GRNtE563gQhTvXi RN5SaOwSXTduuHyAYETlj9S8306oeOOrSRLagzt1rFGkjivP8VSaToN3UdIgVSzwt3xxCB r/PtNrLMp71JXQ1fWdXDmSGzXYIZB0hRAqQeN4yBkfSc7zWFttZTXF5Ibc8Rw/wjdD198w E0GJp+i6ajiMJR5WFUiby43VpzTKP19VJNFdryPoogRw4TO6EJtJRBzjJh2cswdRe7JHp3 /0HCR9igChq8GApYiSW5s3XRUbC+jSQQd3L2h8GDhQ3K5lKUxjJB3McMkV54YQ== 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 4Vjf4L72N4zgmr; Mon, 20 May 2024 13:46:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDkgHj062872; Mon, 20 May 2024 13:46:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDkgGk062869; Mon, 20 May 2024 13:46:42 GMT (envelope-from git) Date: Mon, 20 May 2024 13:46:42 GMT Message-Id: <202405201346.44KDkgGk062869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d27c35123b92 - stable/14 - clang-format: Minor tweaks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d27c35123b92a656170ebfc44383162812d79cd3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d27c35123b92a656170ebfc44383162812d79cd3 commit d27c35123b92a656170ebfc44383162812d79cd3 Author: Mark Johnston AuthorDate: 2024-04-30 21:32:38 +0000 Commit: Mark Johnston CommitDate: 2024-05-20 13:42:32 +0000 clang-format: Minor tweaks Invert KeepEmptyLinesAtTheStartOfBlocks. We used to require an empty line at the beginning of functions with no local variables, which I believe is the reason for this setting. Now it is discouraged in new code. Tell clang-format to align consecutive macros, since we tend to do that. clang-format's output isn't quite what we want here. Typically we have a tab after a #define for some reason, and clang-format doesn't appear to have an option for that. clang-format will also use a mix of tabs and spaces to minimize indentation, which is also against our convention. However, the result looks better with this setting than without. Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29870 (cherry picked from commit 2c18289b72c8594bb5dbe22d54ff3434a56ec6c6) --- .clang-format | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 6c541a571e1d..3d436fa0b35d 100644 --- a/.clang-format +++ b/.clang-format @@ -2,6 +2,7 @@ --- BasedOnStyle: WebKit AlignAfterOpenBracket: DontAlign +AlignConsecutiveMacros: AcrossEmptyLines AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left @@ -94,6 +95,7 @@ ForEachMacros: - TAILQ_FOREACH_SAFE - VM_MAP_ENTRY_FOREACH - VM_PAGE_DUMP_FOREACH +SpaceBeforeParens: ControlStatementsExceptForEachMacros IndentCaseLabels: false IndentPPDirectives: None Language: Cpp @@ -162,7 +164,7 @@ IncludeCategories: # http://llvm.org/docs/CodingStandards.html#include-style IncludeIsMainRegex: 'BLAH_DONT_MATCH_ANYTHING' SortIncludes: true -KeepEmptyLinesAtTheStartOfBlocks: true +KeepEmptyLinesAtTheStartOfBlocks: false TypenameMacros: - ARB_ELMTYPE - ARB_HEAD From nobody Mon May 20 13:46:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjf4N3FMYz5LJRM; Mon, 20 May 2024 13:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjf4N10Bdz4Qtw; Mon, 20 May 2024 13:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zthJzFAa8t2xDdvWv8ygnQbWttVsUo5NW48BsLSpWJ8=; b=muUUywWmI5yejyDZ1kYXMmwTjlQm9igYOttL8WVn68qI9D+WU6X1NoaSOGfr38G3GeL4A8 +2ENZb/ONSKSQn65DmtbDRMfDSe6rPKat9kcTYeVkmShVgdE8IqhSdmyUMi/riGXoP8X11 /jZCFu4i8Yst/ql4JXmbPiyg5awWMDqXlLbP4szMlYerN5pCjygeXfb4Fssx4OjjdjZwVR kkSW5DydbjQ4/+YCBpw+qLBs/RAkzGSM6Gd7OyCkeN17OlC2ScpvGPfkpJY+Sgy785s7AV BPH3B/NCN7KTE3fvI7R7EldE46I3fEQ2i8U66YZexyfUI/N69y81y/qFkGxeWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716212804; a=rsa-sha256; cv=none; b=lKGrq/xSKPyM0pRjxLSqQVH3/Y+d+tgEx22OERXX4C1S1bL36o6zc4DC2EIgMIm76hZ4b9 VWK3UAVMb9Aw4ma2XOQaJ8C1Sklc+IMbWyh3ZccnUFdWECECy+5wCJREPpc40gadWpD2fQ 4qWqmwTD9aUVRgOpqf6H1iVB6GHY9LhQce4X5aQLxSBOYmLq1RHG7yffKEzcbWIiXZyb4Y 94gisMQl31UP1713C5ds7YCBTIc103KrdOJGfuOQfGMHh+AkCgMUjPwgdP6z2u+/X5DJV7 P3e2aq48bb/Cs13NANZC5t4mhLnowFsY0OS7RjLuRBCu8UvWuE5PNZM65vdPxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zthJzFAa8t2xDdvWv8ygnQbWttVsUo5NW48BsLSpWJ8=; b=SDqqyqFfKpHSO9zzVbpGDHo/kW7LlttN+WmX2IzTcdoUzCRS1QrEEA5luxcYIYtOPeZaBa PA8Nx1xZ4y4ZwhzePKg13fBha/38QZRke0Yf/S17kpjXTfwvVRcsOU3af60rJIeZpY0bZH 87GPDx4kudZFf+zdagHUTT2wjJtNREXcXn46txA9hbn0i78uNFTYwsEag9OAvhqTCYBqBa AlK6PXF6op8j2VVl/jk4BU9hD3g2O74hbpei/nAfu/M2P1/hrjjLoNKtRIEjWahRwpGT/w WBRJvzV6ST3AtTwqTBgy/qIhN6i+P7s+IRuq4uKxmLox5FFsBXw5IjiwQ6Vflw== 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 4Vjf4N0c8mzh1g; Mon, 20 May 2024 13:46:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDkhZd062911; Mon, 20 May 2024 13:46:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDkhS8062908; Mon, 20 May 2024 13:46:43 GMT (envelope-from git) Date: Mon, 20 May 2024 13:46:43 GMT Message-Id: <202405201346.44KDkhS8062908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 160e7a4c16eb - stable/14 - wg: Add netmap support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 160e7a4c16ebbec4211a941a706778daf8ea62bd Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=160e7a4c16ebbec4211a941a706778daf8ea62bd commit 160e7a4c16ebbec4211a941a706778daf8ea62bd Author: Mark Johnston AuthorDate: 2024-04-20 16:01:28 +0000 Commit: Mark Johnston CommitDate: 2024-05-20 13:42:35 +0000 wg: Add netmap support When in netmap (emulated) mode, wireguard interfaces prepend or strip a dummy ethernet header when interfacing with netmap. The netmap application thus sees unencrypted, de-encapsulated frames with a fixed header. In this mode, netmap hooks the if_input and if_transmit routines of the ifnet. Packets from the host TX ring are handled by wg_if_input(), which simply hands them to the netisr layer; packets which would otherwise be tunneled are intercepted in wg_output() and placed in the host RX ring. The "physical" TX ring is processed by wg_transmit(), which behaves identically to wg_output() when netmap is not enabled, and packets appear in the "physical" RX ring by hooking wg_deliver_in(). Reviewed by: vmaffione MFC after: 1 month Sponsored by: Klara, Inc. Sponsored by: Zenarmor Differential Revision: https://reviews.freebsd.org/D43460 (cherry picked from commit bf454ca88bdf4acfa873386e876ff5e772e6a830) --- share/man/man4/wg.4 | 14 +++++ sys/dev/wg/if_wg.c | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 163 insertions(+), 6 deletions(-) diff --git a/share/man/man4/wg.4 b/share/man/man4/wg.4 index d0d871e52220..05d6961a9610 100644 --- a/share/man/man4/wg.4 +++ b/share/man/man4/wg.4 @@ -121,6 +121,19 @@ as follows: Although a valid Curve25519 key must have 5 bits set to specific values, this is done by the interface and so it will accept any random 32-byte base64 string. +.Sh NETMAP +.Xr netmap 4 +applications may open a WireGuard interface in emulated mode. +The netmap application will receive decrypted, unencapsulated packets prepended +by a dummy Ethernet header. +The Ethertype field will be one of +.Dv ETHERTYPE_IP +or +.Dv ETHERTYPE_IPV6 +depending on the address family of the packet. +Packets transmitted by the application should similarly begin with a dummy +Ethernet header; this header will be stripped before the packet is encrypted +and tunneled. .Sh EXAMPLES Create a .Nm @@ -183,6 +196,7 @@ is not assigned to the allowed IPs of Peer X. .Xr ip 4 , .Xr ipsec 4 , .Xr netintro 4 , +.Xr netmap 4 , .Xr ovpn 4 , .Xr ipf 5 , .Xr pf.conf 5 , diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 30429c3725cd..552f47f9645b 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -1672,6 +1672,31 @@ error: } } +#ifdef DEV_NETMAP +/* + * Hand a packet to the netmap RX ring, via netmap's + * freebsd_generic_rx_handler(). + */ +static void +wg_deliver_netmap(if_t ifp, struct mbuf *m, int af) +{ + struct ether_header *eh; + + M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT); + if (__predict_false(m == NULL)) { + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + return; + } + + eh = mtod(m, struct ether_header *); + eh->ether_type = af == AF_INET ? + htons(ETHERTYPE_IP) : htons(ETHERTYPE_IPV6); + memcpy(eh->ether_shost, "\x02\x02\x02\x02\x02\x02", ETHER_ADDR_LEN); + memcpy(eh->ether_dhost, "\xff\xff\xff\xff\xff\xff", ETHER_ADDR_LEN); + if_input(ifp, m); +} +#endif + static void wg_deliver_in(struct wg_peer *peer) { @@ -1680,6 +1705,7 @@ wg_deliver_in(struct wg_peer *peer) struct wg_packet *pkt; struct mbuf *m; struct epoch_tracker et; + int af; while ((pkt = wg_queue_dequeue_serial(&peer->p_decrypt_serial)) != NULL) { if (atomic_load_acq_int(&pkt->p_state) != WG_PACKET_CRYPTED) @@ -1705,19 +1731,25 @@ wg_deliver_in(struct wg_peer *peer) if (m->m_pkthdr.len == 0) goto done; - MPASS(pkt->p_af == AF_INET || pkt->p_af == AF_INET6); + af = pkt->p_af; + MPASS(af == AF_INET || af == AF_INET6); pkt->p_mbuf = NULL; m->m_pkthdr.rcvif = ifp; NET_EPOCH_ENTER(et); - BPF_MTAP2_AF(ifp, m, pkt->p_af); + BPF_MTAP2_AF(ifp, m, af); CURVNET_SET(if_getvnet(ifp)); M_SETFIB(m, if_getfib(ifp)); - if (pkt->p_af == AF_INET) +#ifdef DEV_NETMAP + if ((if_getcapenable(ifp) & IFCAP_NETMAP) != 0) + wg_deliver_netmap(ifp, m, af); + else +#endif + if (af == AF_INET) netisr_dispatch(NETISR_IP, m); - if (pkt->p_af == AF_INET6) + else if (af == AF_INET6) netisr_dispatch(NETISR_IPV6, m); CURVNET_RESTORE(); NET_EPOCH_EXIT(et); @@ -2162,13 +2194,36 @@ determine_af_and_pullup(struct mbuf **m, sa_family_t *af) return (0); } +#ifdef DEV_NETMAP +static int +determine_ethertype_and_pullup(struct mbuf **m, int *etp) +{ + struct ether_header *eh; + + *m = m_pullup(*m, sizeof(struct ether_header)); + if (__predict_false(*m == NULL)) + return (ENOBUFS); + eh = mtod(*m, struct ether_header *); + *etp = ntohs(eh->ether_type); + if (*etp != ETHERTYPE_IP && *etp != ETHERTYPE_IPV6) + return (EAFNOSUPPORT); + return (0); +} + +/* + * This should only be invoked by netmap, via nm_os_generic_xmit_frame(), to + * transmit packets from the netmap TX ring. + */ static int wg_transmit(if_t ifp, struct mbuf *m) { sa_family_t af; - int ret; + int et, ret; struct mbuf *defragged; + KASSERT((if_getcapenable(ifp) & IFCAP_NETMAP) != 0, + ("%s: ifp %p is not in netmap mode", __func__, ifp)); + defragged = m_defrag(m, M_NOWAIT); if (defragged) m = defragged; @@ -2178,14 +2233,94 @@ wg_transmit(if_t ifp, struct mbuf *m) return (ENOBUFS); } + ret = determine_ethertype_and_pullup(&m, &et); + if (ret) { + xmit_err(ifp, m, NULL, AF_UNSPEC); + return (ret); + } + m_adj(m, sizeof(struct ether_header)); + ret = determine_af_and_pullup(&m, &af); if (ret) { xmit_err(ifp, m, NULL, AF_UNSPEC); return (ret); } - return (wg_xmit(ifp, m, af, if_getmtu(ifp))); + + /* + * netmap only gets to see transient errors, since it handles errors by + * refusing to advance the transmit ring and retrying later. + */ + ret = wg_xmit(ifp, m, af, if_getmtu(ifp)); + if (ret == ENOBUFS) + return (ret); + return (0); } +/* + * This should only be invoked by netmap, via nm_os_send_up(), to process + * packets from the host TX ring. + */ +static void +wg_if_input(if_t ifp, struct mbuf *m) +{ + int et; + + KASSERT((if_getcapenable(ifp) & IFCAP_NETMAP) != 0, + ("%s: ifp %p is not in netmap mode", __func__, ifp)); + + if (determine_ethertype_and_pullup(&m, &et) != 0) { + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + m_freem(m); + return; + } + CURVNET_SET(if_getvnet(ifp)); + switch (et) { + case ETHERTYPE_IP: + m_adj(m, sizeof(struct ether_header)); + netisr_dispatch(NETISR_IP, m); + break; + case ETHERTYPE_IPV6: + m_adj(m, sizeof(struct ether_header)); + netisr_dispatch(NETISR_IPV6, m); + break; + default: + __assert_unreachable(); + } + CURVNET_RESTORE(); +} + +/* + * Deliver a packet to the host RX ring. Because the interface is in netmap + * mode, the if_transmit() call should pass the packet to netmap_transmit(). + */ +static int +wg_xmit_netmap(if_t ifp, struct mbuf *m, int af) +{ + struct ether_header *eh; + + if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_WGLOOP, + MAX_LOOPS))) { + printf("%s:%d\n", __func__, __LINE__); + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + m_freem(m); + return (ELOOP); + } + + M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT); + if (__predict_false(m == NULL)) { + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + return (ENOBUFS); + } + + eh = mtod(m, struct ether_header *); + eh->ether_type = af == AF_INET ? + htons(ETHERTYPE_IP) : htons(ETHERTYPE_IPV6); + memcpy(eh->ether_shost, "\x06\x06\x06\x06\x06\x06", ETHER_ADDR_LEN); + memcpy(eh->ether_dhost, "\xff\xff\xff\xff\xff\xff", ETHER_ADDR_LEN); + return (if_transmit(ifp, m)); +} +#endif /* DEV_NETMAP */ + static int wg_output(if_t ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro) { @@ -2204,6 +2339,11 @@ wg_output(if_t ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro return (EAFNOSUPPORT); } +#ifdef DEV_NETMAP + if ((if_getcapenable(ifp) & IFCAP_NETMAP) != 0) + return (wg_xmit_netmap(ifp, m, af)); +#endif + defragged = m_defrag(m, M_NOWAIT); if (defragged) m = defragged; @@ -2779,7 +2919,10 @@ wg_clone_create(struct if_clone *ifc, char *name, size_t len, if_setinitfn(ifp, wg_init); if_setreassignfn(ifp, wg_reassign); if_setqflushfn(ifp, wg_qflush); +#ifdef DEV_NETMAP if_settransmitfn(ifp, wg_transmit); + if_setinputfn(ifp, wg_if_input); +#endif if_setoutputfn(ifp, wg_output); if_setioctlfn(ifp, wg_ioctl); if_attach(ifp); From nobody Mon May 20 13:46:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjf4P4rKBz5LJTW; Mon, 20 May 2024 13:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjf4P229gz4Qgs; Mon, 20 May 2024 13:46:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZqvJn6c7MHjAqTjGUYzX+gpNp/eatE+o5EgFKmhaA8=; b=akSzzuuqrxalTeZZktAMk5oUE+ccMPlaSffy0APAma9EBFIfLXO5vWFlk08t1csRyVp4DF 1UPT+TlhMgOT60yvPZoVo7QO/Y6AXcMTUZQT+8ZRKPqA77iay+Wh+bPoOdFEbTJGZrXPpI SNWiidTwzpLG9N8tbxa2cjeKOqLurcAQ6o/RatR+UM2YF7cQS4IuM5A6++lwNj4+N8nz6u xNLkZxYWZjxsR/ep4g1BMPaMVfQN0d+gCM+IQ7CURvqUFzYJ74pP/S4H2ItVegXzC1EG13 /S/uoNTs2OsDz2/E57XauKcKrO1lHV6kXE4qk7uh4mkE/TpgfxDb2A8tqiZY7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716212805; a=rsa-sha256; cv=none; b=Zu9K/5IKa6hS18GSXjxFMPH07IlTdGrbZOusZ+Q0D8WLtvPNHFaUGSsg3j/O32dJIt4S16 WNfY3OhXjPuXk5NLwlHfVMN7CeFEokXtsDUfnw4qCTdUq6KXH3/V0QnFNFZdAEDS7c5Hid 44ja0RHj/VremFVFNrf5vlZjPfZ8q4ARL4jZeVQ1WOaQL4vzFpeGpVFE9Deoe2Wq9Wl1Vo pC63XX4zofT3PE8xCLZIZkv6EwwLmHtheIjBP8QSqjthMjCj4Q9jYtyXsncraxBitTmaDt OvJ6fZ7bsAq1YZ/ePI5gsD3tvnFGjCwR7wTXBwMSc7lXPZwfJCsNjtHwfKa5tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716212805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZqvJn6c7MHjAqTjGUYzX+gpNp/eatE+o5EgFKmhaA8=; b=y1sK31lff5P8gWyqcUQBOmWPnL79Wy5nEryGXMKu0MHglNl7ewkVPQw5jmP66EPxaRwQdI k6JChKzluFBv9nJetE9qzquHjPB/06i1FMjcjRp0rcSwHzqC/ijyCZzasHc7OQ/RngGzos O6vmHYn5KZ8HML1xegzka2x3VMMGvuFLqrOZ4LDl+GGCf+jAv3RAWQuLa/+RYoVdmrxmAg 4wYs6yX1xviEHWVE4cwwJ1ZaldslV8mubmTEgp/cVlV8USOWrqc4Vw0VkmSxJrTyxMWBpt ZkNk/Dnun8Nzo2VQsw0TSa+SdPSG8NBVe0mJp+AwQU16N7GkTDvH4+5R6RQaqQ== 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 4Vjf4P1fV0zh1h; Mon, 20 May 2024 13:46:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDkjZg062988; Mon, 20 May 2024 13:46:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDkjRV062985; Mon, 20 May 2024 13:46:45 GMT (envelope-from git) Date: Mon, 20 May 2024 13:46:45 GMT Message-Id: <202405201346.44KDkjRV062985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c39084799647 - stable/14 - wg tests: Add a simple regression test case for netmap support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c39084799647c0c085c6e3433a232c668d9447a9 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c39084799647c0c085c6e3433a232c668d9447a9 commit c39084799647c0c085c6e3433a232c668d9447a9 Author: Mark Johnston AuthorDate: 2024-04-20 16:01:53 +0000 Commit: Mark Johnston CommitDate: 2024-05-20 13:42:46 +0000 wg tests: Add a simple regression test case for netmap support MFC after: 1 month Sponsored by: Klara, Inc. Sponsored by: Zenarmor (cherry picked from commit c0f13232410cf881475d6e4dbd0ec28ab3476c59) --- tests/sys/net/Makefile | 6 +++- tests/sys/net/if_wg.sh | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile index 75596028688b..95ab86156a0a 100644 --- a/tests/sys/net/Makefile +++ b/tests/sys/net/Makefile @@ -1,4 +1,3 @@ - PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/net @@ -19,6 +18,11 @@ ATF_TESTS_SH+= if_wg TESTS_SUBDIRS+= if_ovpn TESTS_SUBDIRS+= routing +# The netmap bridge application is used by if_wg tests. +.PATH: ${SRCTOP}/tools/tools/netmap +PROGS+= bridge +LIBADD.bridge+= netmap + # The tests are written to be run in parallel, but doing so leads to random # panics. I think it's because the kernel's list of interfaces isn't properly # locked. diff --git a/tests/sys/net/if_wg.sh b/tests/sys/net/if_wg.sh index 1f2ea308853a..b43b40f25018 100644 --- a/tests/sys/net/if_wg.sh +++ b/tests/sys/net/if_wg.sh @@ -92,6 +92,97 @@ wg_basic_cleanup() vnet_cleanup } +atf_test_case "wg_basic_netmap" "cleanup" +wg_basic_netmap_head() +{ + atf_set descr 'Create a wg(4) tunnel over an epair and pass traffic between jails with netmap' + atf_set require.user root +} + +wg_basic_netmap_body() +{ + local epair pri1 pri2 pub1 pub2 wg1 wg2 + local endpoint1 endpoint2 tunnel1 tunnel2 tunnel3 tunnel4 + local pid status + + kldload -n if_wg || atf_skip "This test requires if_wg and could not load it" + kldload -n netmap || atf_skip "This test requires netmap and could not load it" + + pri1=$(wg genkey) + pri2=$(wg genkey) + + endpoint1=192.168.2.1 + endpoint2=192.168.2.2 + tunnel1=192.168.3.1 + tunnel2=192.168.3.2 + tunnel3=192.168.3.3 + tunnel4=192.168.3.4 + + epair=$(vnet_mkepair) + + vnet_init + + vnet_mkjail wgtest1 ${epair}a + vnet_mkjail wgtest2 ${epair}b + + jexec wgtest1 ifconfig ${epair}a ${endpoint1}/24 up + jexec wgtest2 ifconfig ${epair}b ${endpoint2}/24 up + + wg1=$(jexec wgtest1 ifconfig wg create) + echo "$pri1" | jexec wgtest1 wg set $wg1 listen-port 12345 \ + private-key /dev/stdin + pub1=$(jexec wgtest1 wg show $wg1 public-key) + wg2=$(jexec wgtest2 ifconfig wg create) + echo "$pri2" | jexec wgtest2 wg set $wg2 listen-port 12345 \ + private-key /dev/stdin + pub2=$(jexec wgtest2 wg show $wg2 public-key) + + atf_check -s exit:0 -o ignore \ + jexec wgtest1 wg set $wg1 peer "$pub2" \ + endpoint ${endpoint2}:12345 allowed-ips ${tunnel2}/32,${tunnel4}/32 + atf_check -s exit:0 \ + jexec wgtest1 ifconfig $wg1 inet ${tunnel1}/24 up + + atf_check -s exit:0 -o ignore \ + jexec wgtest2 wg set $wg2 peer "$pub1" \ + endpoint ${endpoint1}:12345 allowed-ips ${tunnel1}/32,${tunnel3}/32 + atf_check -s exit:0 \ + jexec wgtest2 ifconfig $wg2 inet ${tunnel2}/24 up + + atf_check -s exit:0 -o ignore \ + jexec wgtest1 sysctl net.inet.ip.forwarding=1 + atf_check -s exit:0 -o ignore \ + jexec wgtest2 sysctl net.inet.ip.forwarding=1 + + jexec wgtest1 $(atf_get_srcdir)/bridge -w 0 -i netmap:wg0 -i netmap:wg0^ & + pid=$! + + # Generous timeout since the handshake takes some time. + atf_check -s exit:0 -o ignore jexec wgtest1 ping -c 1 -t 5 $tunnel2 + atf_check -s exit:0 -o ignore jexec wgtest2 ping -c 1 $tunnel1 + + # Verify that we cannot ping non-existent tunnel addresses. In general + # the remote side should respond with an ICMP message. + atf_check -s exit:2 -o ignore jexec wgtest1 ping -c 1 -t 2 $tunnel4 + atf_check -s exit:2 -o ignore jexec wgtest2 ping -c 1 -t 2 $tunnel3 + + # Make sure that the bridge is still functional. + atf_check -s exit:0 -o ignore jexec wgtest1 ping -c 1 $tunnel2 + atf_check -s exit:0 -o ignore jexec wgtest2 ping -c 1 $tunnel1 + + atf_check -s exit:0 kill -TERM $pid + wait $pid + status=$? + + # Make sure that SIGTERM was received and handled. + atf_check_equal $status 143 +} + +wg_basic_netmap_cleanup() +{ + vnet_cleanup +} + # The kernel is expected to silently ignore any attempt to add a peer with a # public key identical to the host's. atf_test_case "wg_key_peerdev_shared" "cleanup" @@ -258,6 +349,7 @@ wg_vnet_parent_routing_cleanup() atf_init_test_cases() { atf_add_test_case "wg_basic" + atf_add_test_case "wg_basic_netmap" atf_add_test_case "wg_key_peerdev_shared" atf_add_test_case "wg_key_peerdev_makeshared" atf_add_test_case "wg_vnet_parent_routing" From nobody Mon May 20 13:50:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjf8c3qGhz5LJTT for ; Mon, 20 May 2024 13:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjf8c1qjyz4SJf; Mon, 20 May 2024 13:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716213024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dt7Vcty4MoxEPySpCKtMfs0tSsokJubiVla5XQth60w=; b=bThAYcOxK1XtrWPnBpOpxBxvqcScrzQKA5f0lVEG0rgmQ8lRRHlwuqTdrp7Yw6XzfR6MXn Yw+uagKHluKOF/13a+LyLncpUl7Rk30MPXQfNANF4TSxgDpyp05wvF4cEbNDyA0UYb5nHs vrPSgDn/D1ufag6vcJ9ASsow9cSlo4Epb/kpstDnTlVhoXRVPY1DtOHTaKUJwmynJ/tjSQ RTPNYoPNHWUkC9y1tkeVOl7LK8GX4KP2qOefVFjD/bR/Kly25ttMHzUD1R9CP9wIRkDMaA b3e+anc/exRSyi3JiNN/T4Tnz4yq/R/tAmi1BuPdtvkq7XLVb78m3PUOyTjS3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716213024; a=rsa-sha256; cv=none; b=lYCu9cMG0Saiz6OUuZKdOUPfTwf2N8PvGs4jTJX9U1aviJV4xVXeldKDPHuHqA8AbsEenz 7nPdBsuQntWpHTyYVoL019/GanmDPF9fQLLUG+TS3pU4It7pDmzL/nlngNorlaKxdyAMfA qEEX+wvuffmZNjKEj7hqsZyasN4T88s8mw/REWpXpuZV0wCEV4KuVg+/FnDaodXlhWujDJ 9FZApCq8HsyqZMDPEoVS/+GN1ppMDsmOtliLdVzoo/EIWBm9U/Pjb+KYEVmT/JmiRpM0aD thbITYAp4Ogo3p/ck86z0ccGXVtybfHEvVEJTThVjCYk/vQcIIM/Zulvp0Ds7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716213024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dt7Vcty4MoxEPySpCKtMfs0tSsokJubiVla5XQth60w=; b=eI1juwnfzdgAgs2DQ9YZqu3agN5vKHszt1/tRYLLxB5N/Dn0r4bg0IICxmW7dpNJsSsQ1R 5lmNwZE21jSTFNmuZF1FaBBFDbR6lFmxON+8/+mH1yCkYsLGW/+Bcb+Y4OVIJFUUXQpjzV fodHPLPNqq+tnnXjod8VJ65Xyv1Dz5dsQx1gLTTmR97v9TrhN+Hv0Wzwj02qDf/xV8l/Pg 251UfrNijsNcc8Fu535RgaQZS/lTrNHjfhBWvLYtI9z1TciZYuoFqhsy3NAlBpKlTnO/Er sXF+aUff++2g3dcDG2/sX7o/f06GwKCz87iX2InK3a2HTcvUHAVGYfGzyI4J3g== 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 4Vjf8c1S4nzh42; Mon, 20 May 2024 13:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KDoOHM072174; Mon, 20 May 2024 13:50:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDoOCG072171; Mon, 20 May 2024 13:50:24 GMT (envelope-from git) Date: Mon, 20 May 2024 13:50:24 GMT Message-Id: <202405201350.44KDoOCG072171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Mark Johnston Subject: git: 6d7d548cb32a - internal/admin - Restore rlibby's commit bit per his request List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/internal/admin X-Git-Reftype: branch X-Git-Commit: 6d7d548cb32a426778ce422bbad7bae238486ca1 Auto-Submitted: auto-generated The branch internal/admin has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6d7d548cb32a426778ce422bbad7bae238486ca1 commit 6d7d548cb32a426778ce422bbad7bae238486ca1 Author: Mark Johnston AuthorDate: 2024-05-20 13:49:41 +0000 Commit: Mark Johnston CommitDate: 2024-05-20 13:49:41 +0000 Restore rlibby's commit bit per his request Approved by: core --- access | 1 + 1 file changed, 1 insertion(+) diff --git a/access b/access index 76577f8c60dc..a74b2c079142 100644 --- a/access +++ b/access @@ -133,6 +133,7 @@ pstef ram rcm rew +rlibby rmacklem royger rpokala From nobody Mon May 20 14:14:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjfhg1T9zz5LLQ2; Mon, 20 May 2024 14:14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjfhg0x3Vz4W4f; Mon, 20 May 2024 14:14:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4iQoKYnRoAT4B9GCTpZnrY32E/z5YoJreyPGtbQDfQ=; b=f1mHoxdyO4uAUKm+92ZGm6tPgqhxM9vJLgQPsBzAkR8HuScuBzX+loLcfocJL12/GCzat8 Lcjz7sptRlSG/VEIXhIFMQNbzesIClKSgrSEbn+yQenM8VZ/varrLrUhiNL3CKeK0S4/i3 4GCqYGFqnvklqBY6IRhmFlHtuWxhF+lbVbV0o2K5DRY5+MkmkANEqFDTEikAHRktQG3ZSi olWCYK15dqv5hLqPRpjjeV8pbT+v+saPX0FPXYnsZD7Iz1JaFX5IIN8qNWu5bvMkmkcNpS 7m84igwaFBN4BPXuoozCbCeHJj7P/xddGKshMejToZOQwS6vW4H/yy7aPGQqqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214483; a=rsa-sha256; cv=none; b=NS8YM+rIpmN4g4AtWmkfMGxftZ8u8tN+ruNE3J6yI8rglRPQZlCYZbu0M8fD+rINsE53yK 6QQTbxdxNBPVwo4CWwmuF1tvxhEZCAVmeeTprVW5drOMMHmjZhVjYxNqXcNgf50SUzaIDi t4KUFn9spED0Xp8GHtpvWSJy01OEW5Ctz+Cd5FS7CZ7ixFDepXQSTCHr9LEVrRfOkNLLAa QOcq07DykepvqAgR9Se7zDImDkPuLVMLnIgSPPbiZ2/0OipCX7eu79rxi33JBfWU40FYq4 dA/AUZHD2UZqW8OY1xfXdYELAIBaiNML/c68Oni35rc4Lybf2ueKr9ftZya55A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4iQoKYnRoAT4B9GCTpZnrY32E/z5YoJreyPGtbQDfQ=; b=Gb0u7LaBu3rCzuYndpaNG4LecPYNcTBknq5YZG+lkHA3Qcif3qEyjC2B31WgdFOGJb2ElC MO8Hnm+6zSPdGxNgWhi5Q1H+m6gJ3xKFe+NVenHSgFyPTNSvaJHKgUorKUGdm45T3oSzjW RsCxOD0N1xu1HCeFcniPXSudU/hTzSK0FpX4oz6Qqa8GbDq/w1rtxo360rgk6/NxTZW15c HiDwQyvTwEDfBGxbxBGrLTuuQS0EoYPEaBPf8jvQJWDKeRkJntcF8Slh28dfHgJQaoeYvU gYc5nv1xJE/uU2waf7PQcPvdi0ygw6iDOO256oZVgPHoQYaWlukjtDDdmAfyng== 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 4Vjfhg0XSCzhL9; Mon, 20 May 2024 14:14:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KEEgun014282; Mon, 20 May 2024 14:14:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEEg71014279; Mon, 20 May 2024 14:14:42 GMT (envelope-from git) Date: Mon, 20 May 2024 14:14:42 GMT Message-Id: <202405201414.44KEEg71014279@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: 2db2292dac73 - main - sound: Get rid of redundant assignments in chn_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2db2292dac7331be5414f86c3ef7863c7b6a4ac6 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2db2292dac7331be5414f86c3ef7863c7b6a4ac6 commit 2db2292dac7331be5414f86c3ef7863c7b6a4ac6 Author: Christos Margiolis AuthorDate: 2024-05-20 14:14:17 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:14:17 +0000 sound: Get rid of redundant assignments in chn_init() c is allocated with M_ZERO. Reported by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45273 --- sys/dev/sound/pcm/channel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 846885b9d729..039d9abb9da2 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1261,8 +1261,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, bs = NULL; CHN_INIT(c, children); CHN_INIT(c, children.busy); - c->devinfo = NULL; - c->feeder = NULL; c->latency = -1; c->timeout = 1; From nobody Mon May 20 14:14:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjfhh2lD9z5LLd5; Mon, 20 May 2024 14:14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjfhh1yWJz4Vp3; Mon, 20 May 2024 14:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ltk0v2XuRTJn3PFr/ittL8wlvfFExaLq0lGiS2EQ/0Y=; b=mUhYjz1PIYLXiJbA9YUbYEzoz53GmidlJMoi5rus2dDRyVOlliRDwP/24AunshH+VTLQqc IYnejZhJioZE4A3m2YnUAN/3xUS0BI4Ec1pdmPUkQAvAOU61QFmh6HbhnKGH8dzqV1iVz3 xeIHtPR2Yeedw1RL2PQuEpc+tqKQFdFhx2EiPeAy7CV96WG4Zb3M9dVqHuxP0LN8AlxcDZ NsCwhCxYYt+zdzlD7PhzLUd4PRiHpBzYE+pHUg/FxZcv9zQa8GMsp114NBvDCR4PdQk9L9 6pyOTC4J5TPtDJWKz+/isHlZ2c9zPApI9ez9LcECBHhDp7P1C1A2FSzS3v6zvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214484; a=rsa-sha256; cv=none; b=ej+05j0sdvj7j2AB6iJJUemju9FhSO+Y46HZXUwwEmk4e7bhe9uJLQhd0b4Kr+0P0BdwbR ZmMUEP39xADiJVLrZyVROcLS5Z8AQZWan1M3mNIHbu8qkP91ElVx5u1v4Zv16MW6raMLFN C1OzKy0sCdvNh4Mi7MOvNWLw89uHbVI4NI8TI8v+YT3pTOB/fvTJRorpjqbfgB4TO3Eg6U /JmWanCm/swr1T5vbmmHtFZOoLDogKeYyjs8HdCS+tKOAmqqTSns6DMCnx4BeJ5BYJgzKx ZGH6X0R63GwHBJ68vro0nFbZtKIrZ28UhZp7O47f2ZIew7ant6zeYk4hzLMtxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ltk0v2XuRTJn3PFr/ittL8wlvfFExaLq0lGiS2EQ/0Y=; b=lg3CJDmFc6hZHKA5/NnYbP2bo1DNiQwN8ds84xS5M6yjJmP/GYYBD5eiDmY9sxC3YpNSv4 DC8rPshnJRSWrBh1DIplclSdANqpD0M5e9yxi69TgxeQ3OTkOoaOi+yhNAKhViOkxjhtiK hajsEYuMpj0LrZMvF1bXdTVJD7D35ujWtJYc5Vc0hVKzJcE13QcC86tN+ZQOOW+GahLOPZ cBo3/ZkLRGj89Ti1d0lfJmaaznEZbOUsEZiDsCrsUhHc5To33znCDWgM07XPOVyzETd/0h eKn+BdefcjNGcig4z5zkuEaCiONpqxwKXYLSxuYOPgaPP9iblt9I8iYEzfrf/g== 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 4Vjfhh1Yx8zhYd; Mon, 20 May 2024 14:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KEEiGt014332; Mon, 20 May 2024 14:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEEiQm014329; Mon, 20 May 2024 14:14:44 GMT (envelope-from git) Date: Mon, 20 May 2024 14:14:44 GMT Message-Id: <202405201414.44KEEiQm014329@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: 5d1a5d6f1f59 - main - sound: Prevent uninitialized variable destruction in chn_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d commit 5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d Author: Christos Margiolis AuthorDate: 2024-05-20 14:14:25 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:14:25 +0000 sound: Prevent uninitialized variable destruction in chn_init() If dsp_unit2name() fails, we'll get to out2 with b, bs and devinfo uninitialized, which will result in a panic. Reported by: Pierre Pronchery Reported by: Coverity Scan CID: 1545029, 1545025 Pull-request: https://github.com/freebsd/freebsd-src/pull/1240 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45272 --- sys/dev/sound/pcm/channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 039d9abb9da2..a18ef1cf4234 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1236,6 +1236,8 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, } PCM_UNLOCK(d); + b = NULL; + bs = NULL; c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK | M_ZERO); c->methods = kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO); c->type = type; @@ -1257,8 +1259,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, snprintf(c->name, sizeof(c->name), "%s:%s:%s", device_get_nameunit(c->dev), dirs, devname); - b = NULL; - bs = NULL; CHN_INIT(c, children); CHN_INIT(c, children.busy); c->latency = -1; From nobody Mon May 20 14:18:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjfnM5Ql4z5LM8q; Mon, 20 May 2024 14:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjfnM3B8pz4Wm2; Mon, 20 May 2024 14:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0JYeWCjSXQCLgGEzIxvIWjpzuhvJxUyVgqayv+lANY=; b=jzcCHjwA1l3jfbYxDKt+5C4wvxR+9Rzk1Jwe2ax4uv99UjEpYjWtlHKYYxNNjdhG1qiKZu t9Stt3xDGolAwXeri5RzwS726/PlVSeB3ZBc9Fuzlu9tTKRuMBJUzL2f2M7nwVDb8x+luH rq96D5pF7y1sECG5bXiVUI8I5kijardzeycdcTfLQtQ4soUCxBlaLoxlK8BknN5s+IlnA3 xmZyhdZjV8Ol+nTkccZm1Mv0otbqJm2726vVb7yQ0Qr7Ow3xXpJcxW29upsGuqFq0lSLK3 KjZFBG7zlEOb9TbBWKlHNB9rCfo2El8rNLC88wWQnEzQgnGRvQ2u9JCKqZtCUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214727; a=rsa-sha256; cv=none; b=U841UP4Ybt+w+3Mb+LKW7eKEngaCK3acWT/LTeMy4t023AqtlSrpVcp7x1oYQh9l2NNI/U gmxGnEevFEZASJD7jrstRFJ2unPrWkK0EB/tce3o2pEPvCnS6qXoYqilXSCl1SbtE1R5+k Hm7cDbnMBdKOR/niDejeR/Akn623ws5ZHUQrUWDLgkbIFvat8ruuyuV7TFjFQsKkLxv49A MNCZxed5n2J2JMnoyF12VBF/tfgHPdbyaJB9IP/GIs5sBcl0j58p9WzNwvN+fNWo+ptX7A WyB6zl1/k9tBF425Ipo3aYbVAWjwoBmKU6p1OpKbDylk8qvPJ189H6mAqqwoTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/0JYeWCjSXQCLgGEzIxvIWjpzuhvJxUyVgqayv+lANY=; b=UpXRPUOMJnaq0/GK6/fC366OpJD4kCDybjrZWEZQuY+caveyyW2q+7WrBol8k4YVXEbUK2 5HOpOcZc7fwVjY47My4HmnVVPSM7ukPOc318Wl0sYF5jherQN4VOdxvLrux99N16YfUNaE Wdg9EMNrppbmqzH0S3qtd6j5WW6vmuVZU1XS3gYkGhKJ8C1a5eCA5b64Z7+3VB8CUjH+hb 3IlvE2DPljmVrwnD5oNfFIro0BNQYoG4HfqE0yJwltVIB96cEHKBigU3FI2GZZSLBuJqRB osrBGBR5JKNWOZIDUeFGv+JWDcwXHSbiRXHN58sIoiYNOxPCjZ8eqM1nQGqqfw== 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 4VjfnM2nQ8zh5M; Mon, 20 May 2024 14:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KEIloP014999; Mon, 20 May 2024 14:18:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEIlfO014996; Mon, 20 May 2024 14:18:47 GMT (envelope-from git) Date: Mon, 20 May 2024 14:18:47 GMT Message-Id: <202405201418.44KEIlfO014996@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: 074d337ad618 - main - sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 074d337ad618f9cc2a1d5ab18b484928e57bd72b Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=074d337ad618f9cc2a1d5ab18b484928e57bd72b commit 074d337ad618f9cc2a1d5ab18b484928e57bd72b Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:28 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:18:28 +0000 sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* SNDSTIOC_ADD_USER_DEVS* expects a user-supplied sndstioc_nv_arg->nbytes, however we currently do not check whether this size is actually valid, which results in a panic when SNDSTIOC_ADD_USER_DEVS* is called with an invalid size. sndstat_add_user_devs() calls sndstat_unpack_user_nvlbuf(), which then calls malloc() with that size. PR: 266142 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45236 --- sys/dev/sound/pcm/sndstat.c | 5 +++++ sys/sys/sndstat.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index edb33e92ade9..f310d8f3bff3 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -864,6 +864,11 @@ sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data) goto done; } + if (arg->nbytes > SNDST_UNVLBUF_MAX) { + err = ENOMEM; + goto done; + } + err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl); if (err != 0) goto done; diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index f0e4d352242f..8a49042b0453 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -74,6 +74,11 @@ struct sndstioc_nv_arg { #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +/* + * Maximum user-specified nvlist buffer size + */ +#define SNDST_UNVLBUF_MAX 65535 + #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) #define SNDSTIOC_GET_DEVS \ From nobody Mon May 20 14:18:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjfnN4mRwz5LM4X; Mon, 20 May 2024 14:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjfnN48vMz4Wyp; Mon, 20 May 2024 14:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1LTbhjjqAWWKeM4naCzL6O4ixa/W54Ra15mLqT2RY0=; b=J7Miy9kvfeLYychPjoHWrxVW0SAuGDacqPxf0AW2QrF/ZLPEzNkMhtajBCCvEBKi6O9Cb4 Q845eLZSbItUufd0I1EFlAFjb3kErcNqdZ63sdg+VVgm68Kp5UP/eCnJ50ir+lRjyFQoOb vMCH2npKId8ZnmXg04/fhYkg0TDpW4UVbtwgjdw0VI9VHQiJxNPVSzI3cs+UsKS17Lk6ai yI9IQQqFZSOJOSXonZnJWb+zcE2Af86EeDYZYTlX9tVl71E7sAtJYxUPr41nPWPM8Fbnpl tn7JGyI1mWNIMLNoFl0ZH31x6dT+mhYsDCXXHQkEsj0MJO+Jof7BcYekLd9nZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214728; a=rsa-sha256; cv=none; b=mOR1Kz937SDxQKK55+cdf4mIfvQi24xoyFXZPhu8bMQWrSQ08mK10LttLSjZj6Zy0MrXVn FSdf/IRyJVOHIEIMNj1bjMe3U0d611zK5Lfy6Iewqg9D3LjZS6fA6c1s7sZKlolqufcLK5 AO35L6NtGR/F1dwFWYhKM03EUq2//JpoWVe54K2DFHgNB1Ues1tpTVyQZH8rT4FketQHjj 6kTxp5wcHHuz7Kd1UG5aiN6reGmmEsNOjJ+w607+VTzPYwmA9+yl5Ft9GDs/m3wRFuKEdR LJoDWSfYTWFnEHgu8xV+jLpP9GjbqL4+Go6Yx5zB3AV/yX9mpw/OPu2m2AlAzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1LTbhjjqAWWKeM4naCzL6O4ixa/W54Ra15mLqT2RY0=; b=mHzjq+CIzVL1Y+ebp/uv/GH5UcDF78Q0pY6i61s9Q7hXVLamZBu1Mytpiz0PyIA8xizQU7 oe6Al3XVpkHhY2b6iNa7zWfO57CDqYXj2PA8/7kPLxe/f45kN9UtG6QhmFtA5UrcAoWNAf GmotIhqXFwU223JqNIr3E6CstoWD+VDtRhS1gO+a8eqkqMhPPJI9hUy1WlmQg5uruMqyxM s+511wPwVemYWvcTPb0n4ZTX37XQww8ds9KMIiRr/IyKKSmXXaKCvJoB8XzLwfW9xR8ce4 x0tmbXd4hTbH4alPNfwnKw2Y/z18UFF/ln34A/kUJW72gBcuZ+HhE5sCf9o7dQ== 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 4VjfnN3lvVzhYf; Mon, 20 May 2024 14:18:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KEImHi015044; Mon, 20 May 2024 14:18:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEImbA015041; Mon, 20 May 2024 14:18:48 GMT (envelope-from git) Date: Mon, 20 May 2024 14:18:48 GMT Message-Id: <202405201418.44KEImbA015041@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: 64f4e2db6d19 - main - sound: Correctly check nvlist_unpack() error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a commit 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:33 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:18:33 +0000 sound: Correctly check nvlist_unpack() error The current check is never false and if nvlist_unpack() fails, we might panic later down the road. PR: 266144 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45237 --- sys/dev/sound/pcm/sndstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index f310d8f3bff3..bbcb2fda7c29 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -705,7 +705,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl) } *nvl = nvlist_unpack(nvlbuf, nbytes, 0); free(nvlbuf, M_DEVBUF); - if (nvl == NULL) { + if (*nvl == NULL) { return (EINVAL); } From nobody Mon May 20 14:29:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjg1d6DDwz5LN63; Mon, 20 May 2024 14:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjg1d4HTBz4Yxm; Mon, 20 May 2024 14:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716215365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIe5xG0z5+jxqrQyn/I3hC9MmT0hv94L6JSS1leXRB8=; b=CE3xkRrSNDE34kQi1RKmDXZop672j29rIq77Zrvw9OGn2kFzjbC12L3EA5h6vPRe1Ko2Bx hzVZz+NoCipK9GAKDwbW643kWTr8KSbYrxyIVHTpxay8rOeLawdXSXOhN0HsP5TqvGxLJX N3hWgQeYJGTF7IrR2FCTcxX990zYrx5A5nwnxrQ2ip/TwwhmQk75cxHvlF1M2aKF/RASm0 0vpU9BAAGNwjTnZJJxzBaweYT7eEVy0zAHJFLvRuGyi6G9qu30tkpsuFONjXaKRdUdS6M6 wKpEL8T4zUgugYWfcLp2LD/ZvvcIVKo9fHvx6GpD58z5rWyE7g4yaEjO8XiF7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716215365; a=rsa-sha256; cv=none; b=Fr2AmCBPkT2mFsrbsKS1+KXi+qeoGsKSYfSO1JbkNEaPhaXg05p/q5mlGN3cPIOvkjETXQ M0JoP9/wJriDP1HVDOfRCW2Vh61UCaznhhj2hStXosjbeSJF4FTRugyF2XZ4Ks0Y0nC0IH 2zpe7Lh4+AGbNyugSv8+knTt2OI8VYtAiG6Jn472l9CsLIJs8RVR4z6402PWe4GW6AT71a PEEGthj5puT5F2IYXYYEU45OngYUSJ5GKNPWGIGZQdKgizvQW1TBNsWVz+FjMyhPd0DNV5 vh3LdVrUrVE9TGbPwN03oBDpl9t5CxKZj4Vi/Mr256+Tpi+noxLsOqqi49JpyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716215365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIe5xG0z5+jxqrQyn/I3hC9MmT0hv94L6JSS1leXRB8=; b=yqTYHkPEiykIM3hDXFW5F8UAzL4jYMVeamkvJPw+nwTHmJcq4d401aC6UaKif+n6uRTUrr n98jl5UDNAZulfEF45lp8Z87LynIiBLe0P/EkdzyDye531UCJ08EPyQZ4b+YxopBPBJm6+ 5K74MkUXtyt07u1tOX7KjeVujQvzCjsQfcDKrwX2pEX4mDTi92d61Lg/sGltXMhAWrYXyL hl+dXOl6+Yd5Byv9zXVpwFaP5jcEqEBI/YnhjBPC9vuGdXkbaPRJtQCd1vwgG4engosSIE Sc9h6lYrREyPqCyRH+uNz/mk91uw0FbeSjG7qhPaaedcKc0BJ4roe8N6sRZXyg== 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 4Vjg1d3tl5zh5h; Mon, 20 May 2024 14:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KETPb6031588; Mon, 20 May 2024 14:29:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KETPgX031585; Mon, 20 May 2024 14:29:25 GMT (envelope-from git) Date: Mon, 20 May 2024 14:29:25 GMT Message-Id: <202405201429.44KETPgX031585@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: 9c7f83bbb4cd - main - diff: Nits in tests. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068 commit 9c7f83bbb4cd8c1241ca1d8a0742bbfec0ddb068 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 14:27:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 14:27:50 +0000 diff: Nits in tests. Sponsored by: Klara, Inc. --- lib/libdiff/tests/libdiff_test.c | 1 + usr.bin/diff/tests/diff_test.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libdiff/tests/libdiff_test.c b/lib/libdiff/tests/libdiff_test.c index f12717686721..e82a36f3d38a 100644 --- a/lib/libdiff/tests/libdiff_test.c +++ b/lib/libdiff/tests/libdiff_test.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 9a17d180da02..ab731fa32d26 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -96,7 +96,6 @@ b278988_body() printf 'a\n\nb\nn' > b278988.b.in atf_check -o empty -s eq:0 \ diff -Bw b278988.a.in b278988.b.in - } header_body() From nobody Mon May 20 14:48:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjgRw6ssgz5LQ1y; Mon, 20 May 2024 14:48: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjgRw6NF9z4dbb; Mon, 20 May 2024 14:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716216524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cW8b7/zNaY55Dtpw5XngowMhmK8VQlL+SLfzWPJ7v4Q=; b=Fp+uDlZA8dzppz+DsR7EPU8x6CrwK43rFb/1KL0zE4Nc1oKJiJ1mVXV75ClPYHnR7lCbm6 X/ftG6cBAzv9lmsNULyU/I7cJ9QrN7fPkVNSLZkCg1SSNWY4WIJ8Ba9ZcLmtSYFHGOMNXg 2Rzsw24OBcoDilcYMYlQApTzB75Esm0plWL2/axCyowsZCeBY7d69+m+2vDR1W+DHGZeHs dvKltlBLZ98VSfJaZh+3y4qbJQweuqNDYdEE6BFVBz9BLQNBKd8JxidSR0OT8iCdqZk6jN 94wTWlY0p25fAOmyB47/W3XKFv9bUyYrjVDsqFedgCqjjnF4TFSVglOQcDQOAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716216524; a=rsa-sha256; cv=none; b=SDpk49kXWIVN2b3fMULGyu04uLn+lg4b3FKMEMlZ4f4OOK1SsYQVksCKbAMOStrfy8k6Q5 1mvrmS3ltKV+wbVH8w1Jh2Kx988Ag97FffFGBPuHMwcMWS081i/w40NbS831a3lBhIwO/I yeCFocK9pfBfJ4xAqtBMGLYhzrnjvN5uzTyBsDDTbjZ1NgwH7fzUWKtCdlTY5jnps4W8RQ fgOf5YJ7kaxKN/FDL7e9K6n7jfiqP1z94VQyA33LvRq2AKRd+LBiSrjv3cXFv/2cPDtdMJ oM+IskqYYD4PhUhGkBqhO/brG3FQk+duQ7HznDxCvqhp6IOV3GQwbAvtk7ZuXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716216524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cW8b7/zNaY55Dtpw5XngowMhmK8VQlL+SLfzWPJ7v4Q=; b=LRZTk22JeiD6t/RAmp0MUv8YOabz8iDhq3xK2VkR/uh14l9KbXkWy/1x1luUX5byDuOQ1n urAuQjeSXxBrbrb0zLA/MzofL0yX5TLqgWkOjr/mAjlppomGUp9hbgs39HTYfhGGJh+Lp2 9JYVb/jYLhsayp+/ASV31n9pAA79+fnfgXpEzSBPiXtivXFjihl4pmdf8rotP88SCU9gMj OQD93PbcB9D2OpvQ0aEHypsBaFwD7GJacECmyslglRFZL3Q8LRjjHhIS65bpE63RO7259r z0llzERz3V6gUK0grgxSLPC8I/IgSx2efVlFv8oJPBcgA/Wze/M8asl/JLfIeQ== 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 4VjgRw5cSszhwK; Mon, 20 May 2024 14:48:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KEmiQ3066207; Mon, 20 May 2024 14:48:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KEmio6066204; Mon, 20 May 2024 14:48:44 GMT (envelope-from git) Date: Mon, 20 May 2024 14:48:44 GMT Message-Id: <202405201448.44KEmio6066204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6edb14c006f6 - main - Make WITHOUT_UNDEFINED_VERSION the default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6edb14c006f6eafe1f31f54ce7fe2158321fa18d Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6edb14c006f6eafe1f31f54ce7fe2158321fa18d commit 6edb14c006f6eafe1f31f54ce7fe2158321fa18d Author: Brooks Davis AuthorDate: 2024-05-02 17:13:39 +0000 Commit: Brooks Davis CommitDate: 2024-05-20 14:40:19 +0000 Make WITHOUT_UNDEFINED_VERSION the default Link with --no-undefined-version by default. Will detect and prevent the accidental removal of symbols from versioned libraries. (cherry picked from commit 4510f2ca9170927309a423274e03f1eb8e27da27) This reverts commit b25ceb97eddcd58cfb2b433fe301ab28c678c249. Reviewed by: arichardson, kib, dim, emaste Differential Revision: https://reviews.freebsd.org/D44216 --- share/man/man5/src.conf.5 | 8 +++++--- share/mk/bsd.opts.mk | 4 ++-- tools/build/options/WITHOUT_UNDEFINED_VERSION | 2 -- tools/build/options/WITH_UNDEFINED_VERSION | 4 ++++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index f3e45ca8a661..12f78e20085a 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1719,9 +1719,11 @@ and that the runtime support library is available Do not build .Xr unbound 8 and related programs. -.It Va WITHOUT_UNDEFINED_VERSION -Link libraries with --no-undefined-version to ensure all symbols are -provided. +.It Va WITH_UNDEFINED_VERSION +Link libraries with --undefined-version which permits version maps to +contain symbols that are not present in the library. +If this is necessicary to build a particular configuration, a bug is +present and the configuration should be reported. .It Va WITHOUT_UNIFIED_OBJDIR Use the historical object directory format for .Xr build 7 diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 38d53cc6bf30..65ae4f4cfa7c 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -68,7 +68,6 @@ __DEFAULT_YES_OPTIONS = \ SSP \ TESTS \ TOOLCHAIN \ - UNDEFINED_VERSION \ WARNS \ WERROR @@ -81,7 +80,8 @@ __DEFAULT_NO_OPTIONS = \ PROFILE \ RETPOLINE \ STALE_STAGED \ - UBSAN + UBSAN \ + UNDEFINED_VERSION __DEFAULT_DEPENDENT_OPTIONS = \ MAKE_CHECK_USE_SANDBOX/TESTS \ diff --git a/tools/build/options/WITHOUT_UNDEFINED_VERSION b/tools/build/options/WITHOUT_UNDEFINED_VERSION deleted file mode 100644 index 0e58eb00f3c1..000000000000 --- a/tools/build/options/WITHOUT_UNDEFINED_VERSION +++ /dev/null @@ -1,2 +0,0 @@ -Link libraries with --no-undefined-version to ensure all symbols are -provided. diff --git a/tools/build/options/WITH_UNDEFINED_VERSION b/tools/build/options/WITH_UNDEFINED_VERSION new file mode 100644 index 000000000000..71b048349a6f --- /dev/null +++ b/tools/build/options/WITH_UNDEFINED_VERSION @@ -0,0 +1,4 @@ +Link libraries with --undefined-version which permits version maps to +contain symbols that are not present in the library. +If this is necessicary to build a particular configuration, a bug is +present and the configuration should be reported. From nobody Mon May 20 15:48:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjhmc5Shnz5LWcH; Mon, 20 May 2024 15:48:16 +0000 (UTC) (envelope-from jhb@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjhmc51S2z4r40; Mon, 20 May 2024 15:48:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716220096; 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=Wc0jJXdJRJCfOh+9e+YdO+LwyFl4mxarwcEKHs8BFIc=; b=EENyhJKQSePa5dY5B4khV+X6K4CGYAQGCXyRgSXT2llQ6JcLCRWwgLtJfHqkrjHj5Dtnx7 6U+RVvxLM6wxA7kmhbK/M+VNHgHwYiFfJ/cVZWwXZx2JRBDJwNYJwnFQjn6+zfras6Oejb Pet1eO0ydcpXPpLFunZNBCvc5ZHf5TI1GbkXPBnDnDOC6Tb6/zeQ+iAzl9+FfPN3cC/UoC VwUoq7374uXivjUYci+JbFkYtrKfDE7FPXG0Dg9JQdcuqLA2V2At8EzDXvNTKjGpDuYES4 4vvs2RZO5U6nHxu7rdi8TdaIfdwZQHaBzo4QcY7troZ13Bba7WVXYnpo0tzAuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716220096; a=rsa-sha256; cv=none; b=Zr+IM6LlA9iGG0TwJ8BpcrvY5cE597Uf+JTq712/SMmhU20xbK3wRDB5SZKpJk2kZD1rbB HOIChN3cg/y+ltJ5SA6rbWWPy53+o0LqK76WZ7nWYwCImyXnQ0FK/bIcAFq9fm5lW399dN YbvB0V0iy7UDAPhuWD66yh3S6ANKxuCKJEKNWeJnxgvrvQlrZiEGWVnqtCdI0TnbRWjE0m H8AK6w/DqqBRSRMNLpl7ZCvUxpvVRPn5Ec7xfOKDc95LN7w/s/xHoMzgy0qqV+7z127ZUs +wPO81e75Yv/NNaYap829RYRzQLRwNxnzywl3QmQdz7yPVkoqMAmq9Hw+PxH6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716220096; 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=Wc0jJXdJRJCfOh+9e+YdO+LwyFl4mxarwcEKHs8BFIc=; b=VMuONNxD9nAkF8EGwvHvITQlKN1aZRloc3818HpFU3mZI2Lj06IdSZDTZaDlJO+NA5zkb+ nrIIsVpTnB5oGBRJxXwMhuBPXzgWpM1iNWqWEbC00sGug/afXO7pk4UBhnDahRnBIpB6RF XQPjr2VZYTUrrfek5h0uuOjCszPiekwBHrbCGFx02Pc63KZkIwXzwFmTXy2xoYizNPyM1N lvFBTw7yCxjmp8BMGruFuhLO1NvmsiVWvcXmpKWHE+T6kyH1YuLTdlLzs+0hMN6JrlhrM2 LsIq8lL3j+stMEg9761UpRUzA2ka70siptwDV7pWE+1ZFODGEc9at6QBqB4eaw== Received: from [IPV6:2601:644:937f:4c50:59bf:dc4e:16d3:ef1] (unknown [IPv6:2601:644:937f:4c50:59bf:dc4e:16d3:ef1]) (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: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vjhmb1hWNz1107; Mon, 20 May 2024 15:48:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 20 May 2024 08:48:13 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cff79fd02636 - main - linuxkpi: Fix spin_lock_init Content-Language: en-US To: "Bjoern A. Zeeb" Cc: Emmanuel Vadot , Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202405170559.44H5xD7d019861@gitrepo.freebsd.org> <2cd3e698-1b42-4e7f-93a0-aacccb55c8d6@FreeBSD.org> <20240517183350.e45f54df07f670980d5a51c3@bidouilliste.com> <0f2c4189-e259-4bd8-ad31-212a8df0e1b5@FreeBSD.org> <188o7q6o-n0rn-235r-76n4-779o555094r9@SerrOFQ.bet> From: John Baldwin In-Reply-To: <188o7q6o-n0rn-235r-76n4-779o555094r9@SerrOFQ.bet> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/17/24 2:36 PM, Bjoern A. Zeeb wrote: > On Fri, 17 May 2024, John Baldwin wrote: > >> On 5/17/24 9:33 AM, Emmanuel Vadot wrote: >>> On Fri, 17 May 2024 09:07:53 -0700 >>> John Baldwin wrote: >>> >>>> On 5/16/24 10:59 PM, Emmanuel Vadot wrote: >>>>> The branch main has been updated by manu: >>>>> >>>>> URL: >>>>> https://cgit.FreeBSD.org/src/commit/?id=cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>> >>>>> commit cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>> Author: Emmanuel Vadot >>>>> AuthorDate: 2024-05-17 04:52:53 +0000 >>>>> Commit: Emmanuel Vadot >>>>> CommitDate: 2024-05-17 05:58:59 +0000 >>>>> >>>>> linuxkpi: Fix spin_lock_init >>>>> Some linux code re-init some spinlock so add MTX_NEW to >>>>> mtx_init. >>>>> Reported by: David Wolfskill >>>>> Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code") >>>>> --- >>>>> sys/compat/linuxkpi/common/include/linux/spinlock.h | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> index 3f6eb4bb70f6..2992e41c9c02 100644 >>>>> --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>> @@ -140,7 +140,7 @@ typedef struct mtx spinlock_t; >>>>> #define spin_lock_name(name) _spin_lock_name(name, >>>>> __FILE__, __LINE__) >>>>> #define spin_lock_init(lock) mtx_init(lock, >>>>> spin_lock_name("lnxspin"), \ >>>>> - NULL, MTX_DEF | MTX_NOWITNESS) >>>>> + NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW) >>>>> #define spin_lock_destroy(_l) mtx_destroy(_l) >>>> >>>> This is only ok because of MTX_NOWITNESS. Reiniting locks without >>>> destroying >>>> them corrupts the internal linked lists in WITNESS for locks using >>>> witness. >>>> That may warrant a comment here explaining why we disable witness. >>> >>> I'll try to look at what linux expect for spinlocks, it could also be >>> that we need to do this because some drivers via linuxkpi does weird >>> things ... >>> >>>> It might be nice to add an extension to the various lock inits for code >>>> that >>>> wants to opt-int to using WITNESS where a name can be passed. Using those >>>> would >>>> be relatively small diffs in the client code and let select locks opt into >>>> using WITNESS. You could make it work by adding an optional second >>>> argument >>>> to spin_lock_init, etc. that takes the name. >>> >>> We can't change spin_lock_init, we need to follow linux api here. >> >> You can use macro magic to add support for an optional second argument. >> >> #define _spin_lock_init2(lock, name) mtx_init(lock, name, NULL, MTX_DEF) >> >> #define _spin_lock_init1(lock) mtx_init(lock, spin_lock_name("lnxspin"), ...) >> >> #define _spin_lock_init_macro(lock, name, NAME, ...) >> NAME >> >> #define spin_lock_init(...) \ >> _spin_lock_init_macro(__VA_ARGS__, _spin_lock_init2, >> _spin_lock_init1)(__VA_ARGS__) >> >> Then you can choose to specifically annotate certain locks with a name >> instead in which case they will use WITNESS. > > I think the real confusing here comes from the fact that FreeBSD has > spin_lock_destroy in LinuxKPI which I believe is a local addition > (though not documented as such) for semi-native drivers using parts of > LinuxKPI and in order to use spinlocks according to "FreeBSD > expectations". > > I believe (and still hope someone would correct me) that Linux has not > functions to destroy locks like we do? I believe for rwlocks I had left > that remark on the review: > https://reviews.freebsd.org/D45206#1031316 > > So if you use WITNESS anywhere you could only really do so for > "internal" parts but nowhere in Linux driver code as that will likely > simply break assumptions? You could only do it safely if you added local modifications to the driver, yes. My understanding is that while we aim for as little modifications to drivers as possible to permit merging in updates, we don't mandate absolutely zero local changes. The approach I described above would permit selectively using WITNESS at the expense of local diffs that would have to be maintained across updates. -- John Baldwin From nobody Mon May 20 16:08:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjjCw1pZGz5LYCx; Mon, 20 May 2024 16:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjjCv6ddxz4sw6; Mon, 20 May 2024 16:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716221307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kh5IZm9+wnDWvX6+VwyDteZEtn+dbRrMj4YpH4IzdnQ=; b=FhOOK7IlPuTGbG9hhJXZYEHd/J3UTynFtRLyhm6cAJBrMepkcEDOqgEWiDNuT5XDS54QE4 X1Stmt0yDzqDDwtFQuB0TDpgnHy8bNd6BfVJANCJfrDB/k3Dlf9m9e7Bq5TYvQH8d1F58f LRFk5MLqDtOFuR1FjjjCEdtZnkLxtcuIVJrB7gtokqL7d8TqvZjpVWx5hRQtNcjO+8Oz5T O/S+AdVi+10hjCaxEju3fmNwqU0MA26zvLqE/m9aKctQrJpUdO9yD1EGTZdlTAAddHxPDR WW+3M9kU/vz79/vZFih27w8zm5VRUQe8fYwtjLBMXgntxxmQ/C3oiwb1OwCPzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716221307; a=rsa-sha256; cv=none; b=xP3I7f8LkSbuYvzUBBEY1FsjqUy/IbI263szDLi76nlW+V+H2+NlSVKtFUH/3zUKmAIrbm OAHV7eF+sSIJYhSEY/8C6RdHiytFyMdiWkJO2mkoNNVBJrymCx8EJld1TlTFTNneJBFtVU 3Ijj+ONBpXLw8bbg22ykyuMJna/WOd9//J8O6A3wjDYY3PIHd8tSb9PbB2gNhTZeLBB3X6 66Mgffix71EpDeY7q6U3kVVOppKojTXwY8qF0hqQMACDIXOcoyMMNkl/wdzonHKzbjVa1s DAj0ulVaES5vn4fNnLiPRqE9fXLJEYPZbAI5g/5flgj1J43Tz/IKpYiUS+TCDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716221307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kh5IZm9+wnDWvX6+VwyDteZEtn+dbRrMj4YpH4IzdnQ=; b=yUUAG82ziW7cDff927HJMU6WqfUDsBsKM0oT81uKN6SJPgDxVops3prvPVgyOXRCSQujWY 9qwFacygUmFc4P3Sx+rkcj7Nhgbe/ABOZxxBip1248iKQks18F+QuqYv+mVd1BeED45/f1 mz1NK3BiWxavabMZy+CJSxNDC1hQP91oKmDI05DmSQryhuFmLsNHdGWFv3GqJTA5Bh2Rd1 xL1zIle/lkhDqK0IYhOBbfC0KqeQEoZX/oKemd/FCBkb7Iw5DpxG3bUsM9MrAQbso6W52G Ag3Zi14fUxJKIF9rTkiHGsJSbNn8pTf817k0+rUE1yivAp4ilvPwhF0o+rng7g== 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 4VjjCv6CrJzknS; Mon, 20 May 2024 16:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KG8R0T001725; Mon, 20 May 2024 16:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KG8R4k001722; Mon, 20 May 2024 16:08:27 GMT (envelope-from git) Date: Mon, 20 May 2024 16:08:27 GMT Message-Id: <202405201608.44KG8R4k001722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 37be4197f72a - main - man: the exists function needs to validate the first parameter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 commit 37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 Author: Wolfram Schneider AuthorDate: 2024-05-20 16:02:21 +0000 Commit: Wolfram Schneider CommitDate: 2024-05-20 16:02:21 +0000 man: the exists function needs to validate the first parameter This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion) --- usr.bin/man/man.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 03803b777463..af638527f497 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -201,6 +201,10 @@ decho() { # Returns true if glob resolves to a real file and store the first # found filename in the variable $found exists() { + if [ -z "$1" ]; then + return 1 + fi + local IFS # Don't accidentally inherit callers IFS (breaks perl manpages) From nobody Mon May 20 16:40:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjjx075bsz5Lcbn; Mon, 20 May 2024 16:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjjx06dffz40TD; Mon, 20 May 2024 16:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vUJLccYZszNZTf8dojLppLbD9AfHWm5mtQUvxEH5Z0w=; b=l7N3OWgGUqtS1JUw/xOXu36O+XoFoxCRuXNnlGeffSkXiF5Szww5Ji69LSXrHIWqQdqBh2 gOz2lr4MdKHSDtHBVsKvKs81hfTlB4AstFSoJuCkNbZLbSEfnz9CTGfVTsZ00p0F/Z29mR EtuPj+bhATtIGnr2lnS2OfeuxN274+Q9d0MygXbdW5u/NgwhKKNSjNueI++H+HPTzBUEVN 7gPqg3/D7f5IEN8pztGbbu6hkARVICQOUorvk8lxHReP1BVlSY2ffHFVJUT8dWZzqiTqpz +v6Qswww9iVsekLjbOjN1iYJRyr6IXZt8zexGcGjQsWAFmdrdTBkJIKviQydVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716223236; a=rsa-sha256; cv=none; b=OO/oUt3d+0vwM6nXcewCQmzvnMrUyDemzcZm3BtQBdC/2o6hltv5opkjpZuur7Rl5TGpnb MiIBaw0bokGy7Y5ox1bvsq9KMv5vi36Y+FYz0nNiDv3z8Snzb96Y+lnIAfAkz62l7YJajn UQ02Whf7dlwkZENZ9GFia2Hm7PK1xyXBMx0RGm3miyj/JmSR4IgullH5LuJPmaICHPwZeh FM/jTY0IbSOHtlCAGGcvZqXJfdc5PfX6qWZZ+t7tvUo8cQjEWOF7LjTryQFbvvi0f2OrYW sHQxOur2MBXODxNwURlOveyt3C4bAx6jHNHYh1MU1ZlDMgEwkD3P2EV4/8b9mA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vUJLccYZszNZTf8dojLppLbD9AfHWm5mtQUvxEH5Z0w=; b=oeNJKHyPnEg23Zb+AlpFx8zM1xnbpBEyCpAeT1YMk+sHuEHkjUG/5apcILYFmxQaLGK0qV u/E7sNASAkIsWXgE6dAiHufng5lWTq89cvNCvq6rjmPS65W0SmAzqQ2r7nVrt50Z0lKwWd M+uDTUkcg6v409WVoEV8Ou3oLaP3s3O+7zio1x1/hzhJJLqFy/zqh7beYBzFbiBJtDat11 3iWeSWB8DBCaz8aUl+24BTY+PTHG4AVv8b7jgPGYSj/RRfpn7EZCkkwFS3aVJLW/xTaTcq wyP9ylFYMEG8GrtSpJNwS11L7jVZOD83UzXKxkOcLkHpDuj6vwJjOJqxqhiB+A== 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 4Vjjx06FBbzm3X; Mon, 20 May 2024 16:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KGeaYT060835; Mon, 20 May 2024 16:40:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KGea7E060833; Mon, 20 May 2024 16:40:36 GMT (envelope-from git) Date: Mon, 20 May 2024 16:40:36 GMT Message-Id: <202405201640.44KGea7E060833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Renato Botelho Subject: git: 55d29905489c - main - bsdinstall: Fix wifi network selection size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: garga X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55d29905489c975ee33b86d34f38e78b5ba29817 Auto-Submitted: auto-generated The branch main has been updated by garga: URL: https://cgit.FreeBSD.org/src/commit/?id=55d29905489c975ee33b86d34f38e78b5ba29817 commit 55d29905489c975ee33b86d34f38e78b5ba29817 Author: Renato Botelho AuthorDate: 2024-05-20 13:43:35 +0000 Commit: Renato Botelho CommitDate: 2024-05-20 16:39:29 +0000 bsdinstall: Fix wifi network selection size Use correct variable while creating dialog used to select among available wireless networks Approved by: asiciliano Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D45271 --- usr.sbin/bsdinstall/scripts/wlanconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 338e4f0a4109..f044bc1cba98 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -216,7 +216,7 @@ while :; do f_dialog_title "Network Selection" prompt="Select a wireless network to connect to." f_dialog_menu_size height width rows "$DIALOG_TITLE" \ - "$DIALOG_BACKTITLE" "$prompt" "" $menu_list + "$DIALOG_BACKTITLE" "$prompt" "" $NETWORKS NETWORK=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ From nobody Mon May 20 16:50:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjk8w3PtJz5LdBZ; Mon, 20 May 2024 16:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjk8w2wZQz41Ms; Mon, 20 May 2024 16:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cX5yT7l9bQcMoZh0pjh6XLEGfQAD5+KFU5GmUkxqZmk=; b=KoEANUEbuwtNmfc8sf3rw8eHRL70+MVFBkda0bXcxZLm3ZSnt1pfHdH8OsCYK0r3/GvaWM jTCjkC8ptrv3S7h/FbTPZSGUyEjulrUdv55UQQvqGUA6fjCYlBXn9U3OAIaae9SnlH+PpL PAX+S1J5Bs17raMmeTPrzoPdFl9pvQL0v/Daf5oQwRSGu5EApuRsQEBhnzpkd2IB9REQ1s umGmabDuKLn+arDpoOeHPHE2Si97EaJbfJERU4wVWk4ggNDOZrcJalAnsBSNAyPSjUMbgJ Iod3J6cTl8zakYXpvAKkPnDSvOzSttycIUkZb2D/0zRNkTv+QtwWOySAQjtmEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716223856; a=rsa-sha256; cv=none; b=mhteqpbZ7TIvef4dqo4NFlY5Gg6fV0bV1Hn/QbTsHsfzCP/J6tjYT4JyWTMzJHvZg6dj2B uVXe2KOQaSdpMKiUbMb4gw28h0F1Wl2x3WvGB+O80+9HG5f0Z8jiPhEDxTtv7oKVhGXPRY rgzXYJreTM+uUgkjNz6wFw0i6vdiLQf5nko89t4cqfRpmOxMhQSqR8ZkGc5koVn3HyZ5Wu C87lsJDTTJVTMCTl5eT3MQ0ELuv678uZ4THcCv1qeEXttSil8f4brd8eDUhbzOZD7WSXvL 3iqeJkQSEPclBsKJn9u8LC2aAHshFpWFGsCpgIPtb+UkOU5wx9pueyO06TnLow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716223856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cX5yT7l9bQcMoZh0pjh6XLEGfQAD5+KFU5GmUkxqZmk=; b=JPHnTNqi6uGXoW279nfusw3KuP2BW7SKPQq5F7jPn9pCgCF5LF+DccSqS3VaIEdfrXjY94 wm++podKWeRl8obNRsAPi5Ue9LSCML2BbEEo5b41rZUWLOJlJB+/eW9Tsz9rANPn1dapF4 exDVS0gU1DqMCV01PtB88eqXCdoHtWJu5CA5yHeKcnVcXLcYt1UwNxwpTmeTykByS1Ynd7 t24MM1EJL9+1jAQTWsM3B/94zakGhIeGDsFVT1v/w9u4oIieOOg1d6gkCkJWT+y6HEAn5p Je+5SoepwFPD3vYjzloJZFcPK0MLkn/v8fWitNz0wzyaiBYnhbErQCW8LG5myQ== 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 4Vjk8w2WtYzm1b; Mon, 20 May 2024 16:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KGouFY079285; Mon, 20 May 2024 16:50:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KGouqJ079282; Mon, 20 May 2024 16:50:56 GMT (envelope-from git) Date: Mon, 20 May 2024 16:50:56 GMT Message-Id: <202405201650.44KGouqJ079282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: da590a3e18cb - main - lock.9: LK_TIMELOCK is a lockmgr flag, not lockinit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da590a3e18cb883ba0444b78deeca5a2ed0b042f Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=da590a3e18cb883ba0444b78deeca5a2ed0b042f commit da590a3e18cb883ba0444b78deeca5a2ed0b042f Author: Ryan Libby AuthorDate: 2024-05-20 16:48:32 +0000 Commit: Ryan Libby CommitDate: 2024-05-20 16:48:32 +0000 lock.9: LK_TIMELOCK is a lockmgr flag, not lockinit Reviewed by: imp, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45246 --- share/man/man9/lock.9 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9 index 110fdd68fda0..96f617a72123 100644 --- a/share/man/man9/lock.9 +++ b/share/man/man9/lock.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd November 17, 2017 +.Dd May 18, 2024 .Dt LOCK 9 .Os .Sh NAME @@ -108,10 +108,6 @@ should log messages about duplicate locks being acquired. Disable .Xr ktr 4 logging for this lock. -.It Dv LK_TIMELOCK -Use -.Fa timo -during a sleep; otherwise, 0 is used. .El .El .Pp @@ -182,6 +178,10 @@ Fail if operation has slept. .It Dv LK_NOWAIT Do not allow the call to sleep. This can be used to test the lock. +.It Dv LK_TIMELOCK +Use +.Fa timo +during a sleep; otherwise, 0 is used. .It Dv LK_NOWITNESS Skip the .Xr witness 4 From nobody Mon May 20 17:06:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjkWK34Mjz5LfR2; Mon, 20 May 2024 17:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjkWK2ZdWz42vC; Mon, 20 May 2024 17:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716224813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MmvBxwUq03por5hDYHyyuhWbVTjShZpM7nXtG5SdzPk=; b=TjUVzVcAsjW63RJUeljJ6pEfa0Vm+5PCQ76VHs1xNVidlcJKgQxF1yu/A01Z7zmoquWQJU iYw0vw6KmTg8X9lO0z2VLldrOmT+7PDi9F1QiLxFV2PdS08btomHVcIzAdHHK1YKLqgqvu 5196gHdOBCc0+EjTvYDruporbLnSJWrcwrpl7DNsRv7HbjZw/EI3oLIStXjUjaaXBPMYwK BEk4GAUZQQL7UsU4ipVU5NhqsdpdSMP7CFNlwoRpAHKoGzetYOo9Z2k/F8cWQQWs+tOa1t WVNkq/lVbYhhAEv/3lFg4mNC3E1LaqA8800YxVtMsTSxjzjOhw7WeSAk9NUVJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716224813; a=rsa-sha256; cv=none; b=nb3AaFu26FB0lYxZSxk89B36D8UPPB4wHr5p1p4HUZT0Nkj9CbBaZuOH0GpqHUb02HwXcQ tRjZt9+Eg6zE/O7U2LcVbdqCo5Y7Iq8ITtVgIGUY5O+RR+FirQsUStogxk+ITPUpJIJuMe NrEd9kN1qsb0OY+20SrjuBT+UrUlmfr6LbujyX5kgW9ePh53ofHu3EsHsm1yUhC6slzeBG SEJctg4OvcCSjkphwin2HK9j13YlroOlKKhOxrftpxBFcWcfKGvvlyB5vxfNLs/fi19dMu sk7E8j4hXSMxPHF58SnE/piI22A40N7Dw0pOwO9+6WQjJOEz8yQn9vbzdajLvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716224813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MmvBxwUq03por5hDYHyyuhWbVTjShZpM7nXtG5SdzPk=; b=OAw1eO+WHoLcw/VfFDXqTHDgCXt/8E39b1A92F21udnuxo9IS/WGjUc8Z2v/EN2QMb69Gh xulAiq1seKtOuQEF/KZ/8BoeYbNEUppPQw+iqSmMaz8nn1d+YTqKuaxafOabx5HR9b7jBF bcICYjn0WYD9zbGeT7TgyrmbsDknntrVaOfdNOjFhG4TSDH182Uln09a5PPK3lkKuut7OV boSe5xJcej+3gAem+P0HiMDhH/V/pK5vr2s4SFe+xo4wDh8BZuPmzldw9DQYPu81uTf+E1 9Yr3XwvDuKLnCN1fIqX9kKVcK0Kvphp7ELHJPKg/iMCqTQZKf8Sgq1fFsOs1rg== 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 4VjkWK23LCzm7T; Mon, 20 May 2024 17:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KH6rNg003397; Mon, 20 May 2024 17:06:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KH6rnP003394; Mon, 20 May 2024 17:06:53 GMT (envelope-from git) Date: Mon, 20 May 2024 17:06:53 GMT Message-Id: <202405201706.44KH6rnP003394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2f9bf48e797e - releng/14.1 - Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 2f9bf48e797e095df48d4668ab48347baaf9fc88 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2f9bf48e797e095df48d4668ab48347baaf9fc88 commit 2f9bf48e797e095df48d4668ab48347baaf9fc88 Author: Dimitry Andric AuthorDate: 2024-05-16 18:21:45 +0000 Commit: Dimitry Andric CommitDate: 2024-05-20 17:06:20 +0000 Merge commit 87f3407856e6 from llvm-project (by Phoebe Wang): [X86][Driver] Do not add `-evex512` for `-march=native` when the target doesn't support AVX512 (#91694) This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like: /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust. (For rust itself there is also a similar issue reported at https://github.com/rust-lang/rust/pull/121088). PR: 276104 Reported by: netchild Approved by: re (cperciva) MFC after: 3 days (cherry picked from commit fcfb2d6393712dee3f1f8f0c3840d14817dea416) (cherry picked from commit 14efb9bb710486a6fba349ec1b4b1b94a9a5a089) --- contrib/llvm-project/llvm/lib/TargetParser/Host.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp index 1adef15771fa..848b531dd8dd 100644 --- a/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp +++ b/contrib/llvm-project/llvm/lib/TargetParser/Host.cpp @@ -1774,7 +1774,8 @@ bool sys::getHostCPUFeatures(StringMap &Features) { Features["rtm"] = HasLeaf7 && ((EBX >> 11) & 1); // AVX512 is only supported if the OS supports the context save for it. Features["avx512f"] = HasLeaf7 && ((EBX >> 16) & 1) && HasAVX512Save; - Features["evex512"] = Features["avx512f"]; + if (Features["avx512f"]) + Features["evex512"] = true; Features["avx512dq"] = HasLeaf7 && ((EBX >> 17) & 1) && HasAVX512Save; Features["rdseed"] = HasLeaf7 && ((EBX >> 18) & 1); Features["adx"] = HasLeaf7 && ((EBX >> 19) & 1); From nobody Mon May 20 17:09:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjkZc0gTTz5Lg2x; Mon, 20 May 2024 17:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjkZb64jjz43S2; Mon, 20 May 2024 17:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716224983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CfW2W93HEanc4i59oyPIr1yRkLAWHSsv1rW0D2Pt9ks=; b=CxXoSCDA02zm8TUqAwAJ9vyiRuM6FtxHsEgXQ+hZklXfk4rR0h747RQnzd/+/q+AdA9Oyt 78XfhpkSBLMdZ+UEfs6X/uBuSrTaCUyhOKR6ZYa3PAXYt/uOMhzbqeaq07vvEpvCNvDCuV /PI7hntMXpduZvPyAEfizgsmkjsfRP6FfDJEdNeJJZDZ5Hw8U/QCNddTQ7fiILhG71iD4m rXqv1g71ySNxvYxRYa7p1jnc9nUxg42dOeIHlW3+kUxMpLd1otSNL2LDTEORzHEZRcocrV FszdvHSRrWT9DpVFFhFs1xJDKB5fgcVQZGmOGrqHnEDPxrtE/Vk7FeNRLd+s2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716224983; a=rsa-sha256; cv=none; b=fEaLRYEmqoLliGJBSmkJNS+l1XafT+j1vMQ6ntiX6Lm58HUVKvTY9km4wno+ttqdE03Fma t2MWJwUdBJsK+vNjlFFwfFgcVCGV7BLKZSHHExPuv4CjVwbLdtq1tp/eDMLXCfY+uTHKLp JCc2j7JFbPRqIe/l0uvdLYV4MYSadM4SMz71V46y4A2+zgup95PzQ3jkozj77kW9M9pKpj Fuy8q4Tj8GZIEuyJxCShnxmjcWBzyQFyWIgoOlgXzIcfQlc8we6hcluDwJBE0rXl5s4Dq3 BdIY8ntBddP3JXTNET/xO3UM/oBJmDWURr+LxM68WrE7asMnGLXt1wKvGbjM2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716224983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CfW2W93HEanc4i59oyPIr1yRkLAWHSsv1rW0D2Pt9ks=; b=ALDAa7+HO7fawBqTGT4COgWqerCAgqxE3ro+g+uV3tZewnad1x9wDkVLX71P8MHTTXHRUb kSmcqX/0oB+GFgAFOsZOaweY70Bl502uyaBsYHeEUGvD0q9J9ZZ9JRckMtNhSKcKr07/In Unar560QEFli4Ydg6NaBxPty2Torel2YjYGoczOx1un9qcxxX9HOoaRrn2qW8Cd9W5eWlX 0HLBuCKqmMewd6vCQN6XjHT9+qqWLz+AqnqixkhzuXwSmiBUZ5NNzbAFqEcZqXJMjZVLGZ wRfOPhLsV8TTx0aQLNIb1GLjQbcV5Baj6fUkaIom04dCmNmJo+NytXwLTVZK+Q== 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 4VjkZb5gwQzmtl; Mon, 20 May 2024 17:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KH9hI5003934; Mon, 20 May 2024 17:09:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KH9hML003931; Mon, 20 May 2024 17:09:43 GMT (envelope-from git) Date: Mon, 20 May 2024 17:09:43 GMT Message-Id: <202405201709.44KH9hML003931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 5dd6fb108dd9 - stable/14 - stand: Spell LUA_COMPILE_SET correctly. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5dd6fb108dd9f5abbacbdc73197ef8468b93b958 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5dd6fb108dd9f5abbacbdc73197ef8468b93b958 commit 5dd6fb108dd9f5abbacbdc73197ef8468b93b958 Author: Warner Losh AuthorDate: 2024-05-11 18:05:53 +0000 Commit: Dimitry Andric CommitDate: 2024-05-20 17:08:53 +0000 stand: Spell LUA_COMPILE_SET correctly. MFC After: 2 days Sponsored by: Netflix (cherry picked from commit e63d20b70ee1dbee9b075f29de6f30cdcfe1abe1) --- stand/liblua/lutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/liblua/lutils.h b/stand/liblua/lutils.h index ea715096df09..7fff8d3ae83d 100644 --- a/stand/liblua/lutils.h +++ b/stand/liblua/lutils.h @@ -34,7 +34,7 @@ int luaopen_pager(lua_State *); #include typedef void lua_init_md_t(lua_State *); -#define _LUA_COMPIE_SET Xlua_compile_set +#define _LUA_COMPILE_SET Xlua_compile_set #define LUA_COMPILE_SET(func) \ DATA_SET(_LUA_COMPILE_SET, func) #define LUA_FOREACH_SET(s) \ From nobody Mon May 20 17:41:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjlH96wb5z5L1wH; Mon, 20 May 2024 17:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjlH96QRSz47Ns; Mon, 20 May 2024 17:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716226885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TgJuvro6GBDnfxu1pbF+M12RZ3qWEq9YAG2cLVjJM1Q=; b=MWuDuvm1vDIHcIJetgR2L0rvE+l0NLcuSGcg52kaiFqdoflSENc87/CsB6WT9RD9qiIkL4 bOX/KDVkeynX4LnE0EWPFZ8m0YZD+YxV6XzQgIHcix7egAfJbITSya04tJc4Wx14E/zpfe yUKve4B4k0y4RtnIktAb95tj337CidPz2u9Q+oVIn8R5qfLu3KtrAGzlVqCzsRezX1c4i7 wsdd8PR7KLgiGg0cy+I8WPy5R8NIbL3U1y7blmU4i3tucSbuQhLpiN6EqzLXrAtOauVHKj VUYqaWP3PzscoFjDQEZc51Q/cRmy+dR2ivfPAzILEELo44xnzQCs82ARSqBbxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716226885; a=rsa-sha256; cv=none; b=dfC3P2NFEnDzNgEALO9H3D1XlGuoAhJXR+L6k7feYGFeYjtrfPalRkOJNeg79MiciXHL7r ixNjOVAbFhc6n09waNU+Gp74v33DzttZ3lzEMYr7hg17ZmhTSlNLRCqj6ySF64mkzXJLj0 AZK6NfVQXVPRtXtq/RqAiqw2ZwWalbNKSMW2gYh/+PQIkS7H66zPC2yDUGICUuf/PKzbay 0ILM8jViy0jIAKcrQG+JSfvwYrMm2/SFMTY5/pEAIuGZBiMSxFOv250OduZh06Z7gI9/zU PZ9vUB6d6yFcYDQ/o+YR9MycG5tsD2hqXM5q3YIEgWzqFRtGJFU04RRjvV/+bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716226885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TgJuvro6GBDnfxu1pbF+M12RZ3qWEq9YAG2cLVjJM1Q=; b=V6axSePkbT2V6Z51G48DssMfW0OiMMA6j0qPNwP4phEzN8PqJ0ss61aZleoEy5CBTC/kOf jaepNiS5HDWXi1SPY4uaLJx1fi3h+OjE69vMfgphkVRIrnnM55DDoGYJWSt4U9Qp1GvdpF 1iD3RIkXv9qqOEHiYgOqv/oYifd1uFbpGeMDApW+cm+yj3lG1FdSTbZuxeX/fx1MtcTBZv P3UF8ykiurl758Xfe5ndfKZTS2oZu+qpa6H2a+xT+7uypnjoEnmfCy1zlDmt+pxUwn/VUN W7065GKy0DsBEVyQdoTk8GnCnkx9Trs/cDI0WDn0akBG0BxL4Tk7nmv59SlG8w== 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 4VjlH962RsznCq; Mon, 20 May 2024 17:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KHfPVm069411; Mon, 20 May 2024 17:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KHfPB8069408; Mon, 20 May 2024 17:41:25 GMT (envelope-from git) Date: Mon, 20 May 2024 17:41:25 GMT Message-Id: <202405201741.44KHfPB8069408@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: d59058f3b313 - main - sound: Make SNDST_UNVLBUF_MAX a power of two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d59058f3b31353442497e728dd5beb80585ad8d2 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d59058f3b31353442497e728dd5beb80585ad8d2 commit d59058f3b31353442497e728dd5beb80585ad8d2 Author: Christos Margiolis AuthorDate: 2024-05-20 17:41:18 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 17:41:18 +0000 sound: Make SNDST_UNVLBUF_MAX a power of two Fixes: 074d337ad618 ("sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*") Reported by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45277 --- sys/sys/sndstat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 8a49042b0453..e0e403b1a72a 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -77,7 +77,7 @@ struct sndstioc_nv_arg { /* * Maximum user-specified nvlist buffer size */ -#define SNDST_UNVLBUF_MAX 65535 +#define SNDST_UNVLBUF_MAX 65536 #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) From nobody Mon May 20 20:06:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjpVm0tPxz5LKrS; Mon, 20 May 2024 20:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjpVm0QfHz4NB9; Mon, 20 May 2024 20:06:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3knuY0lqlMIt1jh4B4HM8m/Nf5QQzNTIvAGO7wsKlqc=; b=QlA+mKLcZhaODAhzz8S78WQVv7ud3Ksx0fJeRAoHr31uPP1+6BwxMBgjaO6W+/NrTDqx7+ P0stpJJqXvIuhwHTgbmJFB2dDFT9509e8418kVaKsAa/rxhLwL65tuppghkJo2DOW4Q1WI 7FOZ6WGPZZNoXXdQf9+QFjE8L8xvEkmj3r4+0yuWwHpcwO+0KFFR8wE+OelhDzwopQKGN5 COPc9Ugx4pP6/yj5g1HX4DjT78IOFOAOedDN0ohJ+ie4C3799iO5wPMyiKIQSha8j20+qn 7OJbgaJwUmSkT1WYwfmOmPul/wqF4B06woa0NTwBqSFen0uiQQzgEDzkHk66Jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716235600; a=rsa-sha256; cv=none; b=R25lZq00G1ri3QB3x97BwAmh+/6Mqqjy5Jt/YPwgpC6nMSlb7BjU0yp2yIRfh3RjaK/771 0k3NhfTOpMXNwhcYIz0trsiuxkx2F5CvffhO3ouHia4mvCXEafBjiS6nqVf00QOzTmz8lX qPAVhEUONT3YGPYlV7OMSIdZKer6+BOG465gVtwLOPtAFybSBO/KoGh6722/XaBlXfsFve yXDwI9zOTWlP4ZJLOiFSfEDrZdVWzxKzg0SdTCXdT058KnIZ1LCXAXpMisfojJA/Gy3X4K 56nPTpoUXAgDr/bq9P3gwqZoz/uPQj+oTSW8OwuTGLRfkxPDbMCmSLEa5i2Vlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3knuY0lqlMIt1jh4B4HM8m/Nf5QQzNTIvAGO7wsKlqc=; b=cD+JwlQUGmKZoogeCvLEUTf26Bgi1A/LNSn4S+3QvDfXzTxoot+MSZaPCwAwhGrm8E6z9q sjIUbsg0tT6B9ow2AhPDISmATkRC4AyodiV2S1iFX3Vxkcny0SbHJLaFbCsxxyuLde4saN l+wbO0Io2aOxIj90JZhQqiTxH3H95XjDX88ujUUgkF3DYARgi9l3mUqkJ9DL7frLEKxb6C XHEQx9OIzlTTt+Zj3nHjIaRvE68oYPehKinqaynTeTFLj+mPE1ldEGLfCQnS286Gs0H2ZM 4fw4Zjn2UlvIG8k5FGoekV7eyA1zuthfEelmJPytLmYvX7vr79o2Clzzgem52g== 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 4VjpVm01gczrvN; Mon, 20 May 2024 20:06:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KK6dNA007246; Mon, 20 May 2024 20:06:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KK6d0b007243; Mon, 20 May 2024 20:06:39 GMT (envelope-from git) Date: Mon, 20 May 2024 20:06:39 GMT Message-Id: <202405202006.44KK6d0b007243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4c2ea6e26d21 - stable/14 - da: Update trim stats for WRITE SAME and ATA TRIM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c2ea6e26d210d07d29c845addeb0c2a103f5904 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c2ea6e26d210d07d29c845addeb0c2a103f5904 commit 4c2ea6e26d210d07d29c845addeb0c2a103f5904 Author: Matthew Grooms AuthorDate: 2024-05-03 14:41:05 +0000 Commit: Warner Losh CommitDate: 2024-05-20 19:23:40 +0000 da: Update trim stats for WRITE SAME and ATA TRIM The scsi UNMAP path updated trim stats in the da sysctl, but the ATA TRIM passthru and WRITE SAME paths did not. Add code so they do. PR: 277637 Reviewed by: imp (tweaked WS path to update ranges) (cherry picked from commit 12117d0e9314d1706508386c1c49ace2de578b31) --- sys/cam/scsi/scsi_da.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index ae691520e157..5b1cc7314984 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -4209,6 +4209,9 @@ da_delete_trim(struct cam_periph *periph, union ccb *ccb, struct bio *bp) da_default_timeout * 1000); ccb->ccb_h.ccb_state = DA_CCB_DELETE; ccb->ccb_h.flags |= CAM_UNLOCKED; + softc->trim_count++; + softc->trim_ranges += ranges; + softc->trim_lbas += block_count; cam_iosched_submit_trim(softc->cam_iosched); } @@ -4269,6 +4272,9 @@ da_delete_ws(struct cam_periph *periph, union ccb *ccb, struct bio *bp) da_default_timeout * 1000); ccb->ccb_h.ccb_state = DA_CCB_DELETE; ccb->ccb_h.flags |= CAM_UNLOCKED; + softc->trim_count++; + softc->trim_ranges++; + softc->trim_lbas += count; cam_iosched_submit_trim(softc->cam_iosched); } From nobody Mon May 20 20:06:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjpVn27Rsz5LKnt; Mon, 20 May 2024 20:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjpVn1Qdfz4NHh; Mon, 20 May 2024 20:06:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DtrztrjsF/0HrqpLESjMXTtnpke3da1fPAjqTovvMN4=; b=Md9ih/BMfiAZZUGmOKL50xwE6xJ2A4Iu4ted2HefCTgUZzeutqicxVQmTDmwcSBfSfzAIv 2fbLENB9UAMGYePey3uj44oZkmyspvSP7/zVkriWVUlSIYaclxp2U0RY4UqW/MhYOTg+VS BRTRhFg+mmMLNXh8b0RT7hxXUv3v/chFwtVppQIIpnPTYwTK8YvnUJtMAeJb665hIzxkCF p7EnFxrquFoYnuv1jG4lPOiTDTwPpePzNHPwcsBkOEQ8aOPfnMF2aRUeTFwqenavk7B+pq wfOqhcVRc3jAqBvBNwO0fUcN+vwnmoxzkCO2pyQF6aOdwKR095bNtJIgntWZ9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716235601; a=rsa-sha256; cv=none; b=xahY8B/MfbjrgCzFhsbf9MOrqKAO9zi2AteypvLbIv113Zt6MiHe0I0UITkeWK0Xv47QUL G3m7sO5W4AYjA/1yO/47c4kCB0rGuWbniAvCgmnEBwHE7qIWDbCSvyIZFU3vnF8DhfbZ+S qQUtJJm+XCjQu270cvtJ56cTp/kiLVYOn11YhmkTrQMS7eSyexkO6/hIzkKOtSGpCSGVk/ Rs+m6EsyYhxqh2v6Blc+EtnI2HHfkMqsW6Pp9T+qNbUJqH2KCNcSFraOKvMkY5/0PX5icX Q9HY0cj6HYaKgml4PFSdbfBIW/Tty1ZVx9gZmA1qTvSSCv1HOFuGp2ZLfisyAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DtrztrjsF/0HrqpLESjMXTtnpke3da1fPAjqTovvMN4=; b=XSsgJCdSIeLUp3oDCph9KZQulvsUITiq4EzsT89fphIrGCcoriUzg1owzIQIovw7uwyJ8y BW3NV+4IVA4OQUwzoTXU9UBuYUtETMnmVFn9DvAluNK0B6/w6w0IsBvooblnbxVt1VNrBj KvaMtcAd77tvKreNRyIBPX4loxHUNAUTacJS8/iE7qjOReD9tR5ARdyCS63C8pkmU56mXo PKSXb8tFpd5iS9Exjp1geVJeFPQiML7x571Wd0QEnc1/giruN3TaCxlHeQ9hcxltmCE/F+ Vto+wN5AdrFp4K2QO2DunrZ8Gv2wJmZ0DUhIr0nEUkxPQK/PRQ13suh8LlblLQ== 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 4VjpVn12V1zrvP; Mon, 20 May 2024 20:06:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KK6fe7007300; Mon, 20 May 2024 20:06:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KK6f3l007297; Mon, 20 May 2024 20:06:41 GMT (envelope-from git) Date: Mon, 20 May 2024 20:06:41 GMT Message-Id: <202405202006.44KK6f3l007297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: f65f02ccf2a5 - stable/14 - geom_stripe: Cascade cantrim just like we do for gmirror List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f65f02ccf2a5656e96b32705bad52b11fbc3177c Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f65f02ccf2a5656e96b32705bad52b11fbc3177c commit f65f02ccf2a5656e96b32705bad52b11fbc3177c Author: Matthew Grooms AuthorDate: 2024-05-03 15:01:21 +0000 Commit: Warner Losh CommitDate: 2024-05-20 19:23:40 +0000 geom_stripe: Cascade cantrim just like we do for gmirror If any of the disks can support trim, cascade that up the stack. Otherwise, trims won't pass through striped raid setups. PR: 277673 Reviewed by: imp (minor style tweaks from bug report) (cherry picked from commit ea2d874cca7cdfe6133c1835dadd8f0672723fa6) --- sys/geom/stripe/g_stripe.c | 21 ++++++++++++++++++++- sys/geom/stripe/g_stripe.h | 3 +++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index ca3fbcbb30b2..2708284a8091 100644 --- a/sys/geom/stripe/g_stripe.c +++ b/sys/geom/stripe/g_stripe.c @@ -592,7 +592,12 @@ g_stripe_start(struct bio *bp) g_stripe_pushdown(sc, bp); return; case BIO_GETATTR: - /* To which provider it should be delivered? */ + if (!strcmp(bp->bio_attribute, "GEOM::candelete")) { + int val = (sc->sc_flags & G_STRIPE_FLAG_CANDELETE) != 0; + g_handleattr(bp, "GEOM::candelete", &val, sizeof(val)); + return; + } + /* otherwise: To which provider it should be delivered? */ default: g_io_deliver(bp, EOPNOTSUPP); return; @@ -795,6 +800,20 @@ g_stripe_add_disk(struct g_stripe_softc *sc, struct g_provider *pp, u_int no) } sc->sc_disks[no] = cp; + + /* cascade candelete */ + error = g_access(cp, 1, 0, 0); + if (error == 0) { + int can_delete; + + error = g_getattr("GEOM::candelete", cp, &can_delete); + if (error == 0 && can_delete != 0) + sc->sc_flags |= G_STRIPE_FLAG_CANDELETE; + G_STRIPE_DEBUG(1, "Provider %s candelete %i.", pp->name, + can_delete); + g_access(cp, -1, 0, 0); + } + G_STRIPE_DEBUG(0, "Disk %s attached to %s.", pp->name, sc->sc_name); g_stripe_check_and_run(sc); diff --git a/sys/geom/stripe/g_stripe.h b/sys/geom/stripe/g_stripe.h index 4c5430275350..1075a176b9b3 100644 --- a/sys/geom/stripe/g_stripe.h +++ b/sys/geom/stripe/g_stripe.h @@ -47,6 +47,8 @@ #define G_STRIPE_TYPE_MANUAL 0 #define G_STRIPE_TYPE_AUTOMATIC 1 +#define G_STRIPE_FLAG_CANDELETE 0x00000001UL + #define G_STRIPE_DEBUG(lvl, ...) \ _GEOM_DEBUG("GEOM_STRIPE", g_stripe_debug, (lvl), NULL, __VA_ARGS__) #define G_STRIPE_LOGREQ(bp, ...) \ @@ -62,6 +64,7 @@ struct g_stripe_softc { off_t sc_stripesize; uint32_t sc_stripebits; struct mtx sc_lock; + int sc_flags; }; #define sc_name sc_geom->name #endif /* _KERNEL */ From nobody Mon May 20 20:06:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjpVp3qxvz5LL2C; Mon, 20 May 2024 20:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjpVp2DqRz4N5C; Mon, 20 May 2024 20:06:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7RtncvVHOkLbKnD5IPi7naroNdGarh2HFo7ScyjDnWo=; b=Je6oOm+4b4aGLg3DArVuaoTrYLE7eCPRP7BMpfcI4BAxCtcrHPyVO6xZenSJ/bluBItTS+ wM3quSsbj0wgi/oOGZwgDNXb8g4zuseLlYJ2O0D0xrp5CCgI7bMEsXVdriwqX+pfIyU4tc VZO1REk0NL2SgmPbZiJp5pYRUJzvgconVXP9hNCiGdCMJ8S7KunpjXRlgihWHKzZ9fhlew 6iNJi0PXO8CdOXZk0747OLsNjQP+iJ14jjKp4/AiwoNroXW3K/mJnlFOdRQNRnhc/G/RqH GOuNbjwObdlsxGhRzYHeLM03I7BX4DQB+TRAYZ5Yxpw5cUbusNaUH/6LTsbCkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716235602; a=rsa-sha256; cv=none; b=xnMmmOzC1yz8g5vYTWoMe2XXwNsqNPmeOoAmUIRNV8Cd3EI17gjrDdaEYvj4nFQxYvGqnn GWjiJZwlb57v8xs7aupYn5m2SZimaZRbrfClqXqfAtzRoIO7qnR5KKWhVkZGZtPFQfF4Sn nMdGQZSQ087rHrIbwRXP08WJ6EA8zsG31M+OS6vOgvN/mV5ysOzpQnk+2z/88B5fnoyy8m 81GBflwAzGBnH8v+K8z/6eev/N0tAhnaUeLbgU6sEVIvRWiAOm3NLenjTedh2FS6Tr1U54 0scXeeZp4e0jg07GCFps6BHCITfSL1TffhsW00Ho5I8+VJVsS6ZkJWc9RFxy5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7RtncvVHOkLbKnD5IPi7naroNdGarh2HFo7ScyjDnWo=; b=NkvV0q14rMPg2V0qDkg0ujxzd5FmbR3HprKOFZ/aLmFW1bRiQAti5ceKSsDlEGoj9/+eGS OBHl2bHCtatDPDH5PeW+rtzSLvehovIzyPh7UDh/avd/6BSSMFUVg/c5W5S9eDGKlh2ki7 9G1+NPqlk/vwLncQNpG/G3aNBFfrKPPpGNS93W3a2aOFxwFzHFw7sMMBe+Pmw5GJkV+y64 8hqm7pZ47Vxt8SB/Z4L05OdigpboFelSV5DwdW8FkIFmbUKYxV1dTqrN2m665z71o8dMLj m0SM/vSriEk1e+5KR02eTPrUZGZepit1BxD7BO2DNd0qQcggdaA12mT2D0d9aw== 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 4VjpVp1s3XzrGK; Mon, 20 May 2024 20:06:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KK6gQ6007348; Mon, 20 May 2024 20:06:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KK6gQo007346; Mon, 20 May 2024 20:06:42 GMT (envelope-from git) Date: Mon, 20 May 2024 20:06:42 GMT Message-Id: <202405202006.44KK6gQo007346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 02cae85fdb9b - stable/14 - ota: Merge one true awk 20240422 (a3b68e649d2d) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 02cae85fdb9b4d959bad253ce3dbb03e554b6f40 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=02cae85fdb9b4d959bad253ce3dbb03e554b6f40 commit 02cae85fdb9b4d959bad253ce3dbb03e554b6f40 Author: Warner Losh AuthorDate: 2024-05-04 21:50:33 +0000 Commit: Warner Losh CommitDate: 2024-05-20 19:29:19 +0000 ota: Merge one true awk 20240422 (a3b68e649d2d) Apr 22, 2024: fixed regex engine gototab reallocation issue that was introduced during the Nov 24 rewrite. Thanks to Arnold Robbins. Fixed a scan bug in split in the case the separator is a single character. thanks to Oguz Ismail for spotting the issue. Mar 10, 2024: fixed use-after-free bug in fnematch due to adjbuf invalidating the pointers to buf. thanks to github user caffe3 for spotting the issue and providing a fix, and to Miguel Pineiro Jr. for the alternative fix. MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max. thanks to Miguel Pineiro Jr. Sponsored by: Netflix (cherry picked from commit 1023317ac491090f8d84a62999ffc303cf88528c) --- contrib/one-true-awk/ChangeLog | 24 --- contrib/one-true-awk/FIXES | 14 ++ contrib/one-true-awk/awk.1 | 52 ----- contrib/one-true-awk/awk.h | 8 - contrib/one-true-awk/awkgram.y | 20 +- contrib/one-true-awk/b.c | 34 +-- contrib/one-true-awk/bugs-fixed/REGRESS | 2 +- contrib/one-true-awk/bugs-fixed/system-status.ok2 | 3 + contrib/one-true-awk/lex.c | 9 - contrib/one-true-awk/main.c | 2 +- contrib/one-true-awk/maketab.c | 1 - contrib/one-true-awk/parse.c | 23 -- contrib/one-true-awk/proto.h | 3 - contrib/one-true-awk/run.c | 244 +--------------------- 14 files changed, 44 insertions(+), 395 deletions(-) diff --git a/contrib/one-true-awk/ChangeLog b/contrib/one-true-awk/ChangeLog index dea4ed7e3187..6ce9417c10da 100644 --- a/contrib/one-true-awk/ChangeLog +++ b/contrib/one-true-awk/ChangeLog @@ -47,30 +47,6 @@ * test/T.lilly: Remove gawk warnings from output, improves portability. -2019-10-17 Arnold D. Robbins - - Pull in systime() and strftime() from the NetBSD awk. - - * awk.1: Document the functions. - * run.c (bltin): Implement the functions. - * awk.h: Add defines for systime and strftime. - * lex.c: Add support for systime and strftime. - -2019-10-07 Arnold D. Robbins - - Integrate features from different *BSD versions of awk. - Gensub support from NetBSD. Bitwise functions from OpenBSD. - - * awk.h: Add defines for and, or, xor, compl, lshift and rshift. - * awkgram.y: Add support for gensub. - * maketab.c: Ditto. - * lex.c: Add support for gensub and bitwise functions. - * parse.c (node5, op5): New functions. - * proto.h (node5, op5): New declarations. - * run.c (bltin): Implement the bitwise functions. - (gensub): New function. - * awk.1: Document additional functions. - 2019-10-07 Arnold D. Robbins * b.c (fnematch): Change type of pbuf from unsigned char to char. diff --git a/contrib/one-true-awk/FIXES b/contrib/one-true-awk/FIXES index a043b356fafa..c4eef3bd8ea0 100644 --- a/contrib/one-true-awk/FIXES +++ b/contrib/one-true-awk/FIXES @@ -25,6 +25,20 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the second edition of the AWK book was published in September 2023. +Apr 22, 2024: + fixed regex engine gototab reallocation issue that was + introduced during the Nov 24 rewrite. Thanks to Arnold Robbins. + Fixed a scan bug in split in the case the separator is a single + character. thanks to Oguz Ismail for spotting the issue. + +Mar 10, 2024: + fixed use-after-free bug in fnematch due to adjbuf invalidating + the pointers to buf. thanks to github user caffe3 for spotting + the issue and providing a fix, and to Miguel Pineiro Jr. + for the alternative fix. + MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max. + thanks to Miguel Pineiro Jr. + Jan 22, 2024: Restore the ability to compile with g++. Thanks to Arnold Robbins. diff --git a/contrib/one-true-awk/awk.1 b/contrib/one-true-awk/awk.1 index 496a2a652379..ef40a0104468 100644 --- a/contrib/one-true-awk/awk.1 +++ b/contrib/one-true-awk/awk.1 @@ -305,25 +305,6 @@ and .B gsub return the number of replacements. .TP -\fBgensub(\fIpat\fB, \fIrepl\fB, \fIhow\fR [\fB, \fItarget\fR]\fB)\fR -replaces instances of -.I pat -in -.I target -with -.IR repl . -If -.I how -is \fB"g"\fR or \fB"G"\fR, do so globally. Otherwise, -.I how -is a number indicating which occurrence to replace. If no -.IR target , -use -.BR $0 . -Return the resulting string; -.I target -is not modified. -.TP .BI sprintf( fmt , " expr" , " ...\fB) the string resulting from formatting .I expr ... @@ -332,28 +313,6 @@ according to the format .IR fmt . .TP -.B systime() -returns the current date and time as a standard -``seconds since the epoch'' value. -.TP -.BI strftime( fmt ", " timestamp\^ ) -formats -.I timestamp -(a value in seconds since the epoch) -according to -.IR fmt , -which is a format string as supported by -.IR strftime (3). -Both -.I timestamp -and -.I fmt -may be omitted; if no -.IR timestamp , -the current time of day is used, and if no -.IR fmt , -a default format of \fB"%a %b %e %H:%M:%S %Z %Y"\fR is used. -.TP .BI system( cmd ) executes .I cmd @@ -413,17 +372,6 @@ In all cases, returns 1 for a successful input, 0 for end of file, and \-1 for an error. .PP -The functions -.BR compl , -.BR and , -.BR or , -.BR xor , -.BR lshift , -and -.B rshift -peform the corresponding bitwise operations on their -operands, which are first truncated to integer. -.PP Patterns are arbitrary Boolean combinations (with .BR "! || &&" ) diff --git a/contrib/one-true-awk/awk.h b/contrib/one-true-awk/awk.h index 740447ee2167..76180e47f16a 100644 --- a/contrib/one-true-awk/awk.h +++ b/contrib/one-true-awk/awk.h @@ -154,14 +154,6 @@ extern Cell *symtabloc; /* SYMTAB */ #define FTOUPPER 12 #define FTOLOWER 13 #define FFLUSH 14 -#define FAND 15 -#define FFOR 16 -#define FXOR 17 -#define FCOMPL 18 -#define FLSHIFT 19 -#define FRSHIFT 20 -#define FSYSTIME 21 -#define FSTRFTIME 22 /* Node: parse tree is made of nodes, with Cell's at bottom */ diff --git a/contrib/one-true-awk/awkgram.y b/contrib/one-true-awk/awkgram.y index 233253a4307b..db804e117e19 100644 --- a/contrib/one-true-awk/awkgram.y +++ b/contrib/one-true-awk/awkgram.y @@ -53,7 +53,7 @@ Node *arglist = 0; /* list of args for current function */ %token FINAL DOT ALL CCL NCCL CHAR OR STAR QUEST PLUS EMPTYRE ZERO %token AND BOR APPEND EQ GE GT LE LT NE IN %token ARG BLTIN BREAK CLOSE CONTINUE DELETE DO EXIT FOR FUNC -%token GENSUB SUB GSUB IF INDEX LSUBSTR MATCHFCN NEXT NEXTFILE +%token SUB GSUB IF INDEX LSUBSTR MATCHFCN NEXT NEXTFILE %token ADD MINUS MULT DIVIDE MOD %token ASSIGN ASGNOP ADDEQ SUBEQ MULTEQ DIVEQ MODEQ POWEQ %token PRINT PRINTF SPRINTF @@ -377,24 +377,6 @@ term: | INCR var { $$ = op1(PREINCR, $2); } | var DECR { $$ = op1(POSTDECR, $1); } | var INCR { $$ = op1(POSTINCR, $1); } - | GENSUB '(' reg_expr comma pattern comma pattern ')' - { $$ = op5(GENSUB, NIL, (Node*)makedfa($3, 1), $5, $7, rectonode()); } - | GENSUB '(' pattern comma pattern comma pattern ')' - { if (constnode($3)) { - $$ = op5(GENSUB, NIL, (Node *)makedfa(strnode($3), 1), $5, $7, rectonode()); - free($3); - } else - $$ = op5(GENSUB, (Node *)1, $3, $5, $7, rectonode()); - } - | GENSUB '(' reg_expr comma pattern comma pattern comma pattern ')' - { $$ = op5(GENSUB, NIL, (Node*)makedfa($3, 1), $5, $7, $9); } - | GENSUB '(' pattern comma pattern comma pattern comma pattern ')' - { if (constnode($3)) { - $$ = op5(GENSUB, NIL, (Node *)makedfa(strnode($3),1), $5,$7,$9); - free($3); - } else - $$ = op5(GENSUB, (Node *)1, $3, $5, $7, $9); - } | GETLINE var LT term { $$ = op3(GETLINE, $2, itonp($3), $4); } | GETLINE LT term { $$ = op3(GETLINE, NIL, itonp($2), $3); } | GETLINE var { $$ = op3(GETLINE, $2, NIL, NIL); } diff --git a/contrib/one-true-awk/b.c b/contrib/one-true-awk/b.c index 4c438fab4cd4..f650269753c7 100644 --- a/contrib/one-true-awk/b.c +++ b/contrib/one-true-awk/b.c @@ -651,8 +651,8 @@ static int set_gototab(fa *f, int state, int ch, int val) /* hide gototab implem if (tab->inuse + 1 >= tab->allocated) resize_gototab(f, state); - f->gototab[state].entries[f->gototab[state].inuse-1].ch = ch; - f->gototab[state].entries[f->gototab[state].inuse-1].state = val; + f->gototab[state].entries[f->gototab[state].inuse].ch = ch; + f->gototab[state].entries[f->gototab[state].inuse].state = val; f->gototab[state].inuse++; return val; } else { @@ -677,9 +677,9 @@ static int set_gototab(fa *f, int state, int ch, int val) /* hide gototab implem gtt *tab = & f->gototab[state]; if (tab->inuse + 1 >= tab->allocated) resize_gototab(f, state); - ++tab->inuse; f->gototab[state].entries[tab->inuse].ch = ch; f->gototab[state].entries[tab->inuse].state = val; + ++tab->inuse; qsort(f->gototab[state].entries, f->gototab[state].inuse, sizeof(gtte), entry_cmp); @@ -830,8 +830,6 @@ int nematch(fa *f, const char *p0) /* non-empty match, for sub */ } -#define MAX_UTF_BYTES 4 // UTF-8 is up to 4 bytes long - /* * NAME * fnematch @@ -868,16 +866,28 @@ bool fnematch(fa *pfa, FILE *f, char **pbuf, int *pbufsize, int quantum) do { /* - * Call u8_rune with at least MAX_UTF_BYTES ahead in + * Call u8_rune with at least awk_mb_cur_max ahead in * the buffer until EOF interferes. */ - if (k - j < MAX_UTF_BYTES) { - if (k + MAX_UTF_BYTES > buf + bufsize) { + if (k - j < awk_mb_cur_max) { + if (k + awk_mb_cur_max > buf + bufsize) { + char *obuf = buf; adjbuf((char **) &buf, &bufsize, - bufsize + MAX_UTF_BYTES, + bufsize + awk_mb_cur_max, quantum, 0, "fnematch"); + + /* buf resized, maybe moved. update pointers */ + *pbufsize = bufsize; + if (obuf != buf) { + i = buf + (i - obuf); + j = buf + (j - obuf); + k = buf + (k - obuf); + *pbuf = buf; + if (patlen) + patbeg = buf + (patbeg - obuf); + } } - for (n = MAX_UTF_BYTES ; n > 0; n--) { + for (n = awk_mb_cur_max ; n > 0; n--) { *k++ = (c = getc(f)) != EOF ? c : 0; if (c == EOF) { if (ferror(f)) @@ -914,10 +924,6 @@ bool fnematch(fa *pfa, FILE *f, char **pbuf, int *pbufsize, int quantum) s = 2; } while (1); - /* adjbuf() may have relocated a resized buffer. Inform the world. */ - *pbuf = buf; - *pbufsize = bufsize; - if (patlen) { /* * Under no circumstances is the last character fed to diff --git a/contrib/one-true-awk/bugs-fixed/REGRESS b/contrib/one-true-awk/bugs-fixed/REGRESS index acdbeebb6271..30bdc7cd5c0f 100755 --- a/contrib/one-true-awk/bugs-fixed/REGRESS +++ b/contrib/one-true-awk/bugs-fixed/REGRESS @@ -27,6 +27,6 @@ do then rm -f $OUT else - echo '++++ $i failed!' + echo "+++ $i failed!" fi done diff --git a/contrib/one-true-awk/bugs-fixed/system-status.ok2 b/contrib/one-true-awk/bugs-fixed/system-status.ok2 new file mode 100644 index 000000000000..f1f631e1cb33 --- /dev/null +++ b/contrib/one-true-awk/bugs-fixed/system-status.ok2 @@ -0,0 +1,3 @@ +normal status 42 +death by signal status 257 +death by signal with core dump status 262 diff --git a/contrib/one-true-awk/lex.c b/contrib/one-true-awk/lex.c index 141cc81d2b59..0473a338c906 100644 --- a/contrib/one-true-awk/lex.c +++ b/contrib/one-true-awk/lex.c @@ -47,11 +47,9 @@ const Keyword keywords[] = { /* keep sorted: binary searched */ { "BEGIN", XBEGIN, XBEGIN }, { "END", XEND, XEND }, { "NF", VARNF, VARNF }, - { "and", FAND, BLTIN }, { "atan2", FATAN, BLTIN }, { "break", BREAK, BREAK }, { "close", CLOSE, CLOSE }, - { "compl", FCOMPL, BLTIN }, { "continue", CONTINUE, CONTINUE }, { "cos", FCOS, BLTIN }, { "delete", DELETE, DELETE }, @@ -63,7 +61,6 @@ const Keyword keywords[] = { /* keep sorted: binary searched */ { "for", FOR, FOR }, { "func", FUNC, FUNC }, { "function", FUNC, FUNC }, - { "gensub", GENSUB, GENSUB }, { "getline", GETLINE, GETLINE }, { "gsub", GSUB, GSUB }, { "if", IF, IF }, @@ -72,30 +69,24 @@ const Keyword keywords[] = { /* keep sorted: binary searched */ { "int", FINT, BLTIN }, { "length", FLENGTH, BLTIN }, { "log", FLOG, BLTIN }, - { "lshift", FLSHIFT, BLTIN }, { "match", MATCHFCN, MATCHFCN }, { "next", NEXT, NEXT }, { "nextfile", NEXTFILE, NEXTFILE }, - { "or", FFOR, BLTIN }, { "print", PRINT, PRINT }, { "printf", PRINTF, PRINTF }, { "rand", FRAND, BLTIN }, { "return", RETURN, RETURN }, - { "rshift", FRSHIFT, BLTIN }, { "sin", FSIN, BLTIN }, { "split", SPLIT, SPLIT }, { "sprintf", SPRINTF, SPRINTF }, { "sqrt", FSQRT, BLTIN }, { "srand", FSRAND, BLTIN }, - { "strftime", FSTRFTIME, BLTIN }, { "sub", SUB, SUB }, { "substr", SUBSTR, SUBSTR }, { "system", FSYSTEM, BLTIN }, - { "systime", FSYSTIME, BLTIN }, { "tolower", FTOLOWER, BLTIN }, { "toupper", FTOUPPER, BLTIN }, { "while", WHILE, WHILE }, - { "xor", FXOR, BLTIN }, }; #define RET(x) { if(dbg)printf("lex %s\n", tokname(x)); return(x); } diff --git a/contrib/one-true-awk/main.c b/contrib/one-true-awk/main.c index 73af89ec1058..0e70288a92f3 100644 --- a/contrib/one-true-awk/main.c +++ b/contrib/one-true-awk/main.c @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20240122"; +const char *version = "version 20240422"; #define DEBUG #include diff --git a/contrib/one-true-awk/maketab.c b/contrib/one-true-awk/maketab.c index 3a80c87725ac..3747efa03702 100644 --- a/contrib/one-true-awk/maketab.c +++ b/contrib/one-true-awk/maketab.c @@ -104,7 +104,6 @@ struct xx { ARG, "arg", "arg" }, { VARNF, "getnf", "NF" }, { GETLINE, "awkgetline", "getline" }, - { GENSUB, "gensub", "gensub" }, { 0, "", "" }, }; diff --git a/contrib/one-true-awk/parse.c b/contrib/one-true-awk/parse.c index 2b7fd1928930..14608be7570a 100644 --- a/contrib/one-true-awk/parse.c +++ b/contrib/one-true-awk/parse.c @@ -93,20 +93,6 @@ Node *node4(int a, Node *b, Node *c, Node *d, Node *e) return(x); } -Node *node5(int a, Node *b, Node *c, Node *d, Node *e, Node *f) -{ - Node *x; - - x = nodealloc(5); - x->nobj = a; - x->narg[0] = b; - x->narg[1] = c; - x->narg[2] = d; - x->narg[3] = e; - x->narg[4] = f; - return(x); -} - Node *stat1(int a, Node *b) { Node *x; @@ -179,15 +165,6 @@ Node *op4(int a, Node *b, Node *c, Node *d, Node *e) return(x); } -Node *op5(int a, Node *b, Node *c, Node *d, Node *e, Node *f) -{ - Node *x; - - x = node5(a,b,c,d,e,f); - x->ntype = NEXPR; - return(x); -} - Node *celltonode(Cell *a, int b) { Node *x; diff --git a/contrib/one-true-awk/proto.h b/contrib/one-true-awk/proto.h index b44f9e7a5599..ed63e7875da3 100644 --- a/contrib/one-true-awk/proto.h +++ b/contrib/one-true-awk/proto.h @@ -73,14 +73,12 @@ extern Node *node1(int, Node *); extern Node *node2(int, Node *, Node *); extern Node *node3(int, Node *, Node *, Node *); extern Node *node4(int, Node *, Node *, Node *, Node *); -extern Node *node5(int, Node *, Node *, Node *, Node *, Node *); extern Node *stat3(int, Node *, Node *, Node *); extern Node *op2(int, Node *, Node *); extern Node *op1(int, Node *); extern Node *stat1(int, Node *); extern Node *op3(int, Node *, Node *, Node *); extern Node *op4(int, Node *, Node *, Node *, Node *); -extern Node *op5(int, Node *, Node *, Node *, Node *, Node *); extern Node *stat2(int, Node *, Node *); extern Node *stat4(int, Node *, Node *, Node *, Node *); extern Node *celltonode(Cell *, int); @@ -199,7 +197,6 @@ extern const char *filename(FILE *); extern Cell *closefile(Node **, int); extern void closeall(void); extern Cell *dosub(Node **, int); -extern Cell *gensub(Node **, int); extern FILE *popen(const char *, const char *); extern int pclose(FILE *); diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index ede3ba7d9827..99306992df41 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -1827,7 +1827,7 @@ Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */ for (;;) { n++; t = s; - while (*s != sep && *s != '\n' && *s != '\0') + while (*s != sep && *s != '\0') s++; temp = *s; setptr(s, '\0'); @@ -2062,14 +2062,12 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis { Cell *x, *y; Awkfloat u; - int t, sz; + int t; Awkfloat tmp; - char *buf, *fmt; + char *buf; Node *nextarg; FILE *fp; int status = 0; - time_t tv; - struct tm *tm; int estatus = 0; t = ptoi(a[0]); @@ -2111,64 +2109,6 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis nextarg = nextarg->nnext; } break; - case FCOMPL: - u = ~((int)getfval(x)); - break; - case FAND: - if (nextarg == 0) { - WARNING("and requires two arguments; returning 0"); - u = 0; - break; - } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) & ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; - break; - case FFOR: - if (nextarg == 0) { - WARNING("or requires two arguments; returning 0"); - u = 0; - break; - } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) | ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; - break; - case FXOR: - if (nextarg == 0) { - WARNING("xor requires two arguments; returning 0"); - u = 0; - break; - } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) ^ ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; - break; - case FLSHIFT: - if (nextarg == 0) { - WARNING("lshift requires two arguments; returning 0"); - u = 0; - break; - } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) << ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; - break; - case FRSHIFT: - if (nextarg == 0) { - WARNING("rshift requires two arguments; returning 0"); - u = 0; - break; - } - y = execute(a[1]->nnext); - u = ((int)getfval(x)) >> ((int)getfval(y)); - tempfree(y); - nextarg = nextarg->nnext; - break; case FSYSTEM: fflush(stdout); /* in case something is buffered already */ estatus = status = system(getsval(x)); @@ -2223,41 +2163,6 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis else u = fflush(fp); break; - case FSYSTIME: - u = time((time_t *) 0); - break; - case FSTRFTIME: - /* strftime([format [,timestamp]]) */ - if (nextarg) { - y = execute(nextarg); - nextarg = nextarg->nnext; - tv = (time_t) getfval(y); - tempfree(y); - } else - tv = time((time_t *) 0); - tm = localtime(&tv); - if (tm == NULL) - FATAL("bad time %ld", (long)tv); - - if (isrec(x)) { - /* format argument not provided, use default */ - fmt = tostring("%a %b %d %H:%M:%S %Z %Y"); - } else - fmt = tostring(getsval(x)); - - sz = 32; - buf = NULL; - do { - if ((buf = realloc(buf, (sz *= 2))) == NULL) - FATAL("out of memory in strftime"); - } while (strftime(buf, sz, fmt, tm) == 0 && fmt[0] != '\0'); - - y = gettemp(); - setsval(y, buf); - free(fmt); - free(buf); - - return y; default: /* can't happen */ FATAL("illegal function type %d", t); break; @@ -2501,7 +2406,7 @@ void backsub(char **pb_ptr, const char **sptr_ptr); Cell *dosub(Node **a, int subop) /* sub and gsub */ { fa *pfa; - int tempstat; + int tempstat = 0; char *repl; Cell *x; @@ -2637,147 +2542,6 @@ next_search: return x; } -Cell *gensub(Node **a, int nnn) /* global selective substitute */ - /* XXX incomplete - doesn't support backreferences \0 ... \9 */ -{ - Cell *x, *y, *res, *h; - char *rptr; - const char *sptr; - char *buf, *pb; - const char *t, *q; - fa *pfa; - int mflag, tempstat, num, whichm; - int bufsz = recsize; - - if ((buf = malloc(bufsz)) == NULL) - FATAL("out of memory in gensub"); - mflag = 0; /* if mflag == 0, can replace empty string */ - num = 0; - x = execute(a[4]); /* source string */ - t = getsval(x); - res = copycell(x); /* target string - initially copy of source */ - res->csub = CTEMP; /* result values are temporary */ - if (a[0] == 0) /* 0 => a[1] is already-compiled regexpr */ - pfa = (fa *) a[1]; /* regular expression */ - else { - y = execute(a[1]); - pfa = makedfa(getsval(y), 1); - tempfree(y); - } - y = execute(a[2]); /* replacement string */ - h = execute(a[3]); /* which matches should be replaced */ - sptr = getsval(h); - if (sptr[0] == 'g' || sptr[0] == 'G') - whichm = -1; - else { - /* - * The specified number is index of replacement, starting - * from 1. GNU awk treats index lower than 0 same as - * 1, we do same for compatibility. - */ - whichm = (int) getfval(h) - 1; - if (whichm < 0) - whichm = 0; - } - tempfree(h); - - if (pmatch(pfa, t)) { - char *sl; - - tempstat = pfa->initstat; - pfa->initstat = 2; - pb = buf; - rptr = getsval(y); - /* - * XXX if there are any backreferences in subst string, - * complain now. - */ - for (sl = rptr; (sl = strchr(sl, '\\')) && sl[1]; sl++) { - if (strchr("0123456789", sl[1])) { - FATAL("gensub doesn't support backreferences (subst \"%s\")", rptr); - } - } - - do { - if (whichm >= 0 && whichm != num) { - num++; - adjbuf(&buf, &bufsz, (pb - buf) + (patbeg - t) + patlen, recsize, &pb, "gensub"); - - /* copy the part of string up to and including - * match to output buffer */ - while (t < patbeg + patlen) - *pb++ = *t++; - continue; - } - - if (patlen == 0 && *patbeg != 0) { /* matched empty string */ - if (mflag == 0) { /* can replace empty */ - num++; - sptr = rptr; - while (*sptr != 0) { - adjbuf(&buf, &bufsz, 5+pb-buf, recsize, &pb, "gensub"); - if (*sptr == '\\') { - backsub(&pb, &sptr); - } else if (*sptr == '&') { - sptr++; - adjbuf(&buf, &bufsz, 1+patlen+pb-buf, recsize, &pb, "gensub"); - for (q = patbeg; q < patbeg+patlen; ) - *pb++ = *q++; - } else - *pb++ = *sptr++; - } - } - if (*t == 0) /* at end */ - goto done; - adjbuf(&buf, &bufsz, 2+pb-buf, recsize, &pb, "gensub"); - *pb++ = *t++; - if (pb > buf + bufsz) /* BUG: not sure of this test */ - FATAL("gensub result0 %.30s too big; can't happen", buf); - mflag = 0; - } - else { /* matched nonempty string */ - num++; - sptr = t; - adjbuf(&buf, &bufsz, 1+(patbeg-sptr)+pb-buf, recsize, &pb, "gensub"); - while (sptr < patbeg) - *pb++ = *sptr++; - sptr = rptr; - while (*sptr != 0) { - adjbuf(&buf, &bufsz, 5+pb-buf, recsize, &pb, "gensub"); - if (*sptr == '\\') { - backsub(&pb, &sptr); - } else if (*sptr == '&') { - sptr++; - adjbuf(&buf, &bufsz, 1+patlen+pb-buf, recsize, &pb, "gensub"); - for (q = patbeg; q < patbeg+patlen; ) - *pb++ = *q++; - } else - *pb++ = *sptr++; - } - t = patbeg + patlen; - if (patlen == 0 || *t == 0 || *(t-1) == 0) - goto done; - if (pb > buf + bufsz) - FATAL("gensub result1 %.30s too big; can't happen", buf); - mflag = 1; - } - } while (pmatch(pfa,t)); - sptr = t; - adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "gensub"); - while ((*pb++ = *sptr++) != 0) - ; - done: if (pb > buf + bufsz) - FATAL("gensub result2 %.30s too big; can't happen", buf); - *pb = '\0'; - setsval(res, buf); - pfa->initstat = tempstat; - } - tempfree(x); - tempfree(y); - free(buf); - return(res); -} - void backsub(char **pb_ptr, const char **sptr_ptr) /* handle \\& variations */ { /* sptr[0] == '\\' */ char *pb = *pb_ptr; From nobody Mon May 20 20:06:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjpVq68vNz5LL2D; Mon, 20 May 2024 20:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjpVq31jYz4NGB; Mon, 20 May 2024 20:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vve6g8oqAHYUsnHE21OpPhI2885ljX4ogwPDbjN6drI=; b=hUwu3zAXdtcyIcnCKDAdwA/1DFfa+msOQvGuIWhzzflC/U9Y11YexWQ6NuN0nqGEnOOmgq gGRrzGfcniTmd84NkNt7J+N4cTRgYAf966Vqckt+4AaTJMJUgw/MzsXMTidtCtxiOTBKV3 rxo+YugxxzLABzJaS840RasFNtgz32dCSpOAkoNaaQxkDSYC4saXrZrINLsvKhyY0aH+Dn 478qNrNn2hxLAsESQh7X9h/6FRZkXHSjTYf8NIoG8J/a24O4+Oul2ZUlNrGFcNqx9wP69Z zaCiVgKHftNIAsRglRmife+BXMrEdPWtPNAH78VUev7PIT5iZFHWOPdbobr2/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716235603; a=rsa-sha256; cv=none; b=HvLqpCUbnERvVbXczQqWDLz49nrZOp73W6aAfkTqdL+At3ylbDRx28+mgN2jhFttMIWMhy OOjRXxGCpmPndJelCu2EBsLeht40UQ1KZ8+m2HyWM3bR/IGYJFtU4Dtu3QZx9F1+P04D/i WGbyQqAws6oEb0uOdGhiH84GRWdii4ROSb35ogH2AQExYQJB0bnP8/ZwMl4r4nVDqNqhDx v2bDWjp2vvXTeYdOU8CDC4/cygJWW8C0wHeYn4N1GZQPUR8N4BKHyPMb9HJ4PMoOfm40Rt htvoL8prt3HPUyA0OgFPUWXkz3UF6qhqcUW7TKyGuKMhdA4trGiSipBdFgUMhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vve6g8oqAHYUsnHE21OpPhI2885ljX4ogwPDbjN6drI=; b=ug7mnlHXxfYgwqk43wR4imEBJXwnWQuj35f5sYlPh0GvnQRB6uvw5/+4B2GnfQxTMycur7 C3yYjcvLEpznatNCS68PgMSQy7wtKcUUUPtzfxVQ6/zVtKEAmg3UNTPRWsg5UkmT/PucRx vptIoiqz+O1vyuyIKdxRQbJ+Wh5FOly4d1/VMJ+cbFvBQW0ChG3RBNkq5JB19fqyUav9M8 tB/3wjEJ/sEq+0kmlgkUTlem1LwptLBGBSyD1TUc1cys1TUa8nETA2oMD9wTwEeJJkhWEj 0ElaWzc+09j/UfGvyhoK1oGm/tirn+2/buPEacydRQgSkeh0Mz/u6OOQRefYgQ== 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 4VjpVq2dZPzrvQ; Mon, 20 May 2024 20:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KK6hNh007405; Mon, 20 May 2024 20:06:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KK6hDf007402; Mon, 20 May 2024 20:06:43 GMT (envelope-from git) Date: Mon, 20 May 2024 20:06:43 GMT Message-Id: <202405202006.44KK6hDf007402@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 284244ac3683 - stable/14 - awk: Merge in bsd-feature branch of OTA from 20240422 (31bb33a32f71) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 284244ac36832b71f2e9e128f45ce132a3c293b0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=284244ac36832b71f2e9e128f45ce132a3c293b0 commit 284244ac36832b71f2e9e128f45ce132a3c293b0 Author: Warner Losh AuthorDate: 2024-05-14 18:15:43 +0000 Commit: Warner Losh CommitDate: 2024-05-20 19:29:26 +0000 awk: Merge in bsd-feature branch of OTA from 20240422 (31bb33a32f71) In the last 2nd edition import, I mistakenly grabbed from the 'main' branch of upstream rather than the bsd-feature branch. This means that we have a regression in awk from that point forward: all the BSD-specific bit functions (and a few others) were dropped. This restores it at the same level. MFC After: 1 day Sponsored by: Netflix (cherry picked from commit eb690a0576e8cf5412124477eace3bb765068c3d) --- contrib/one-true-awk/ChangeLog | 24 +++++ contrib/one-true-awk/awk.1 | 52 +++++++++ contrib/one-true-awk/awk.h | 8 ++ contrib/one-true-awk/awkgram.y | 20 +++- contrib/one-true-awk/lex.c | 9 ++ contrib/one-true-awk/maketab.c | 1 + contrib/one-true-awk/parse.c | 23 ++++ contrib/one-true-awk/proto.h | 3 + contrib/one-true-awk/run.c | 240 ++++++++++++++++++++++++++++++++++++++++- 9 files changed, 377 insertions(+), 3 deletions(-) diff --git a/contrib/one-true-awk/ChangeLog b/contrib/one-true-awk/ChangeLog index 6ce9417c10da..dea4ed7e3187 100644 --- a/contrib/one-true-awk/ChangeLog +++ b/contrib/one-true-awk/ChangeLog @@ -47,6 +47,30 @@ * test/T.lilly: Remove gawk warnings from output, improves portability. +2019-10-17 Arnold D. Robbins + + Pull in systime() and strftime() from the NetBSD awk. + + * awk.1: Document the functions. + * run.c (bltin): Implement the functions. + * awk.h: Add defines for systime and strftime. + * lex.c: Add support for systime and strftime. + +2019-10-07 Arnold D. Robbins + + Integrate features from different *BSD versions of awk. + Gensub support from NetBSD. Bitwise functions from OpenBSD. + + * awk.h: Add defines for and, or, xor, compl, lshift and rshift. + * awkgram.y: Add support for gensub. + * maketab.c: Ditto. + * lex.c: Add support for gensub and bitwise functions. + * parse.c (node5, op5): New functions. + * proto.h (node5, op5): New declarations. + * run.c (bltin): Implement the bitwise functions. + (gensub): New function. + * awk.1: Document additional functions. + 2019-10-07 Arnold D. Robbins * b.c (fnematch): Change type of pbuf from unsigned char to char. diff --git a/contrib/one-true-awk/awk.1 b/contrib/one-true-awk/awk.1 index ef40a0104468..496a2a652379 100644 --- a/contrib/one-true-awk/awk.1 +++ b/contrib/one-true-awk/awk.1 @@ -305,6 +305,25 @@ and .B gsub return the number of replacements. .TP +\fBgensub(\fIpat\fB, \fIrepl\fB, \fIhow\fR [\fB, \fItarget\fR]\fB)\fR +replaces instances of +.I pat +in +.I target +with +.IR repl . +If +.I how +is \fB"g"\fR or \fB"G"\fR, do so globally. Otherwise, +.I how +is a number indicating which occurrence to replace. If no +.IR target , +use +.BR $0 . +Return the resulting string; +.I target +is not modified. +.TP .BI sprintf( fmt , " expr" , " ...\fB) the string resulting from formatting .I expr ... @@ -313,6 +332,28 @@ according to the format .IR fmt . .TP +.B systime() +returns the current date and time as a standard +``seconds since the epoch'' value. +.TP +.BI strftime( fmt ", " timestamp\^ ) +formats +.I timestamp +(a value in seconds since the epoch) +according to +.IR fmt , +which is a format string as supported by +.IR strftime (3). +Both +.I timestamp +and +.I fmt +may be omitted; if no +.IR timestamp , +the current time of day is used, and if no +.IR fmt , +a default format of \fB"%a %b %e %H:%M:%S %Z %Y"\fR is used. +.TP .BI system( cmd ) executes .I cmd @@ -372,6 +413,17 @@ In all cases, returns 1 for a successful input, 0 for end of file, and \-1 for an error. .PP +The functions +.BR compl , +.BR and , +.BR or , +.BR xor , +.BR lshift , +and +.B rshift +peform the corresponding bitwise operations on their +operands, which are first truncated to integer. +.PP Patterns are arbitrary Boolean combinations (with .BR "! || &&" ) diff --git a/contrib/one-true-awk/awk.h b/contrib/one-true-awk/awk.h index 76180e47f16a..740447ee2167 100644 --- a/contrib/one-true-awk/awk.h +++ b/contrib/one-true-awk/awk.h @@ -154,6 +154,14 @@ extern Cell *symtabloc; /* SYMTAB */ #define FTOUPPER 12 #define FTOLOWER 13 #define FFLUSH 14 +#define FAND 15 +#define FFOR 16 +#define FXOR 17 +#define FCOMPL 18 +#define FLSHIFT 19 +#define FRSHIFT 20 +#define FSYSTIME 21 +#define FSTRFTIME 22 /* Node: parse tree is made of nodes, with Cell's at bottom */ diff --git a/contrib/one-true-awk/awkgram.y b/contrib/one-true-awk/awkgram.y index db804e117e19..233253a4307b 100644 --- a/contrib/one-true-awk/awkgram.y +++ b/contrib/one-true-awk/awkgram.y @@ -53,7 +53,7 @@ Node *arglist = 0; /* list of args for current function */ %token FINAL DOT ALL CCL NCCL CHAR OR STAR QUEST PLUS EMPTYRE ZERO %token AND BOR APPEND EQ GE GT LE LT NE IN %token ARG BLTIN BREAK CLOSE CONTINUE DELETE DO EXIT FOR FUNC -%token SUB GSUB IF INDEX LSUBSTR MATCHFCN NEXT NEXTFILE +%token GENSUB SUB GSUB IF INDEX LSUBSTR MATCHFCN NEXT NEXTFILE %token ADD MINUS MULT DIVIDE MOD %token ASSIGN ASGNOP ADDEQ SUBEQ MULTEQ DIVEQ MODEQ POWEQ %token PRINT PRINTF SPRINTF @@ -377,6 +377,24 @@ term: | INCR var { $$ = op1(PREINCR, $2); } | var DECR { $$ = op1(POSTDECR, $1); } | var INCR { $$ = op1(POSTINCR, $1); } + | GENSUB '(' reg_expr comma pattern comma pattern ')' + { $$ = op5(GENSUB, NIL, (Node*)makedfa($3, 1), $5, $7, rectonode()); } + | GENSUB '(' pattern comma pattern comma pattern ')' + { if (constnode($3)) { + $$ = op5(GENSUB, NIL, (Node *)makedfa(strnode($3), 1), $5, $7, rectonode()); + free($3); + } else + $$ = op5(GENSUB, (Node *)1, $3, $5, $7, rectonode()); + } + | GENSUB '(' reg_expr comma pattern comma pattern comma pattern ')' + { $$ = op5(GENSUB, NIL, (Node*)makedfa($3, 1), $5, $7, $9); } + | GENSUB '(' pattern comma pattern comma pattern comma pattern ')' + { if (constnode($3)) { + $$ = op5(GENSUB, NIL, (Node *)makedfa(strnode($3),1), $5,$7,$9); + free($3); + } else + $$ = op5(GENSUB, (Node *)1, $3, $5, $7, $9); + } | GETLINE var LT term { $$ = op3(GETLINE, $2, itonp($3), $4); } | GETLINE LT term { $$ = op3(GETLINE, NIL, itonp($2), $3); } | GETLINE var { $$ = op3(GETLINE, $2, NIL, NIL); } diff --git a/contrib/one-true-awk/lex.c b/contrib/one-true-awk/lex.c index 0473a338c906..141cc81d2b59 100644 --- a/contrib/one-true-awk/lex.c +++ b/contrib/one-true-awk/lex.c @@ -47,9 +47,11 @@ const Keyword keywords[] = { /* keep sorted: binary searched */ { "BEGIN", XBEGIN, XBEGIN }, { "END", XEND, XEND }, { "NF", VARNF, VARNF }, + { "and", FAND, BLTIN }, { "atan2", FATAN, BLTIN }, { "break", BREAK, BREAK }, { "close", CLOSE, CLOSE }, + { "compl", FCOMPL, BLTIN }, { "continue", CONTINUE, CONTINUE }, { "cos", FCOS, BLTIN }, { "delete", DELETE, DELETE }, @@ -61,6 +63,7 @@ const Keyword keywords[] = { /* keep sorted: binary searched */ { "for", FOR, FOR }, { "func", FUNC, FUNC }, { "function", FUNC, FUNC }, + { "gensub", GENSUB, GENSUB }, { "getline", GETLINE, GETLINE }, { "gsub", GSUB, GSUB }, { "if", IF, IF }, @@ -69,24 +72,30 @@ const Keyword keywords[] = { /* keep sorted: binary searched */ { "int", FINT, BLTIN }, { "length", FLENGTH, BLTIN }, { "log", FLOG, BLTIN }, + { "lshift", FLSHIFT, BLTIN }, { "match", MATCHFCN, MATCHFCN }, { "next", NEXT, NEXT }, { "nextfile", NEXTFILE, NEXTFILE }, + { "or", FFOR, BLTIN }, { "print", PRINT, PRINT }, { "printf", PRINTF, PRINTF }, { "rand", FRAND, BLTIN }, { "return", RETURN, RETURN }, + { "rshift", FRSHIFT, BLTIN }, { "sin", FSIN, BLTIN }, { "split", SPLIT, SPLIT }, { "sprintf", SPRINTF, SPRINTF }, { "sqrt", FSQRT, BLTIN }, { "srand", FSRAND, BLTIN }, + { "strftime", FSTRFTIME, BLTIN }, { "sub", SUB, SUB }, { "substr", SUBSTR, SUBSTR }, { "system", FSYSTEM, BLTIN }, + { "systime", FSYSTIME, BLTIN }, { "tolower", FTOLOWER, BLTIN }, { "toupper", FTOUPPER, BLTIN }, { "while", WHILE, WHILE }, + { "xor", FXOR, BLTIN }, }; #define RET(x) { if(dbg)printf("lex %s\n", tokname(x)); return(x); } diff --git a/contrib/one-true-awk/maketab.c b/contrib/one-true-awk/maketab.c index 3747efa03702..3a80c87725ac 100644 --- a/contrib/one-true-awk/maketab.c +++ b/contrib/one-true-awk/maketab.c @@ -104,6 +104,7 @@ struct xx { ARG, "arg", "arg" }, { VARNF, "getnf", "NF" }, { GETLINE, "awkgetline", "getline" }, + { GENSUB, "gensub", "gensub" }, { 0, "", "" }, }; diff --git a/contrib/one-true-awk/parse.c b/contrib/one-true-awk/parse.c index 14608be7570a..2b7fd1928930 100644 --- a/contrib/one-true-awk/parse.c +++ b/contrib/one-true-awk/parse.c @@ -93,6 +93,20 @@ Node *node4(int a, Node *b, Node *c, Node *d, Node *e) return(x); } +Node *node5(int a, Node *b, Node *c, Node *d, Node *e, Node *f) +{ + Node *x; + + x = nodealloc(5); + x->nobj = a; + x->narg[0] = b; + x->narg[1] = c; + x->narg[2] = d; + x->narg[3] = e; + x->narg[4] = f; + return(x); +} + Node *stat1(int a, Node *b) { Node *x; @@ -165,6 +179,15 @@ Node *op4(int a, Node *b, Node *c, Node *d, Node *e) return(x); } +Node *op5(int a, Node *b, Node *c, Node *d, Node *e, Node *f) +{ + Node *x; + + x = node5(a,b,c,d,e,f); + x->ntype = NEXPR; + return(x); +} + Node *celltonode(Cell *a, int b) { Node *x; diff --git a/contrib/one-true-awk/proto.h b/contrib/one-true-awk/proto.h index ed63e7875da3..b44f9e7a5599 100644 --- a/contrib/one-true-awk/proto.h +++ b/contrib/one-true-awk/proto.h @@ -73,12 +73,14 @@ extern Node *node1(int, Node *); extern Node *node2(int, Node *, Node *); extern Node *node3(int, Node *, Node *, Node *); extern Node *node4(int, Node *, Node *, Node *, Node *); +extern Node *node5(int, Node *, Node *, Node *, Node *, Node *); extern Node *stat3(int, Node *, Node *, Node *); extern Node *op2(int, Node *, Node *); extern Node *op1(int, Node *); extern Node *stat1(int, Node *); extern Node *op3(int, Node *, Node *, Node *); extern Node *op4(int, Node *, Node *, Node *, Node *); +extern Node *op5(int, Node *, Node *, Node *, Node *, Node *); extern Node *stat2(int, Node *, Node *); extern Node *stat4(int, Node *, Node *, Node *, Node *); extern Node *celltonode(Cell *, int); @@ -197,6 +199,7 @@ extern const char *filename(FILE *); extern Cell *closefile(Node **, int); extern void closeall(void); extern Cell *dosub(Node **, int); +extern Cell *gensub(Node **, int); extern FILE *popen(const char *, const char *); extern int pclose(FILE *); diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index 99306992df41..9c61b1a1c558 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -2062,12 +2062,14 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis { Cell *x, *y; Awkfloat u; - int t; + int t, sz; Awkfloat tmp; - char *buf; + char *buf, *fmt; Node *nextarg; FILE *fp; int status = 0; + time_t tv; + struct tm *tm; int estatus = 0; t = ptoi(a[0]); @@ -2109,6 +2111,64 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis nextarg = nextarg->nnext; } break; + case FCOMPL: + u = ~((int)getfval(x)); + break; + case FAND: + if (nextarg == 0) { + WARNING("and requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) & ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FFOR: + if (nextarg == 0) { + WARNING("or requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) | ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FXOR: + if (nextarg == 0) { + WARNING("xor requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) ^ ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FLSHIFT: + if (nextarg == 0) { + WARNING("lshift requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) << ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; + case FRSHIFT: + if (nextarg == 0) { + WARNING("rshift requires two arguments; returning 0"); + u = 0; + break; + } + y = execute(a[1]->nnext); + u = ((int)getfval(x)) >> ((int)getfval(y)); + tempfree(y); + nextarg = nextarg->nnext; + break; case FSYSTEM: fflush(stdout); /* in case something is buffered already */ estatus = status = system(getsval(x)); @@ -2163,6 +2223,41 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis else u = fflush(fp); break; + case FSYSTIME: + u = time((time_t *) 0); + break; + case FSTRFTIME: + /* strftime([format [,timestamp]]) */ + if (nextarg) { + y = execute(nextarg); + nextarg = nextarg->nnext; + tv = (time_t) getfval(y); + tempfree(y); + } else + tv = time((time_t *) 0); + tm = localtime(&tv); + if (tm == NULL) + FATAL("bad time %ld", (long)tv); + + if (isrec(x)) { + /* format argument not provided, use default */ + fmt = tostring("%a %b %d %H:%M:%S %Z %Y"); + } else + fmt = tostring(getsval(x)); + + sz = 32; + buf = NULL; + do { + if ((buf = realloc(buf, (sz *= 2))) == NULL) + FATAL("out of memory in strftime"); + } while (strftime(buf, sz, fmt, tm) == 0 && fmt[0] != '\0'); + + y = gettemp(); + setsval(y, buf); + free(fmt); + free(buf); + + return y; default: /* can't happen */ FATAL("illegal function type %d", t); break; @@ -2542,6 +2637,147 @@ next_search: return x; } +Cell *gensub(Node **a, int nnn) /* global selective substitute */ + /* XXX incomplete - doesn't support backreferences \0 ... \9 */ +{ + Cell *x, *y, *res, *h; + char *rptr; + const char *sptr; + char *buf, *pb; + const char *t, *q; + fa *pfa; + int mflag, tempstat, num, whichm; + int bufsz = recsize; + + if ((buf = malloc(bufsz)) == NULL) + FATAL("out of memory in gensub"); + mflag = 0; /* if mflag == 0, can replace empty string */ + num = 0; + x = execute(a[4]); /* source string */ + t = getsval(x); + res = copycell(x); /* target string - initially copy of source */ + res->csub = CTEMP; /* result values are temporary */ + if (a[0] == 0) /* 0 => a[1] is already-compiled regexpr */ + pfa = (fa *) a[1]; /* regular expression */ + else { + y = execute(a[1]); + pfa = makedfa(getsval(y), 1); + tempfree(y); + } + y = execute(a[2]); /* replacement string */ + h = execute(a[3]); /* which matches should be replaced */ + sptr = getsval(h); + if (sptr[0] == 'g' || sptr[0] == 'G') + whichm = -1; + else { + /* + * The specified number is index of replacement, starting + * from 1. GNU awk treats index lower than 0 same as + * 1, we do same for compatibility. + */ + whichm = (int) getfval(h) - 1; + if (whichm < 0) + whichm = 0; + } + tempfree(h); + + if (pmatch(pfa, t)) { + char *sl; + + tempstat = pfa->initstat; + pfa->initstat = 2; + pb = buf; + rptr = getsval(y); + /* + * XXX if there are any backreferences in subst string, + * complain now. + */ + for (sl = rptr; (sl = strchr(sl, '\\')) && sl[1]; sl++) { + if (strchr("0123456789", sl[1])) { + FATAL("gensub doesn't support backreferences (subst \"%s\")", rptr); + } + } + + do { + if (whichm >= 0 && whichm != num) { + num++; + adjbuf(&buf, &bufsz, (pb - buf) + (patbeg - t) + patlen, recsize, &pb, "gensub"); + + /* copy the part of string up to and including + * match to output buffer */ + while (t < patbeg + patlen) + *pb++ = *t++; + continue; + } + + if (patlen == 0 && *patbeg != 0) { /* matched empty string */ + if (mflag == 0) { /* can replace empty */ + num++; + sptr = rptr; + while (*sptr != 0) { + adjbuf(&buf, &bufsz, 5+pb-buf, recsize, &pb, "gensub"); + if (*sptr == '\\') { + backsub(&pb, &sptr); + } else if (*sptr == '&') { + sptr++; + adjbuf(&buf, &bufsz, 1+patlen+pb-buf, recsize, &pb, "gensub"); + for (q = patbeg; q < patbeg+patlen; ) + *pb++ = *q++; + } else + *pb++ = *sptr++; + } + } + if (*t == 0) /* at end */ + goto done; + adjbuf(&buf, &bufsz, 2+pb-buf, recsize, &pb, "gensub"); + *pb++ = *t++; + if (pb > buf + bufsz) /* BUG: not sure of this test */ + FATAL("gensub result0 %.30s too big; can't happen", buf); + mflag = 0; + } + else { /* matched nonempty string */ + num++; + sptr = t; + adjbuf(&buf, &bufsz, 1+(patbeg-sptr)+pb-buf, recsize, &pb, "gensub"); + while (sptr < patbeg) + *pb++ = *sptr++; + sptr = rptr; + while (*sptr != 0) { + adjbuf(&buf, &bufsz, 5+pb-buf, recsize, &pb, "gensub"); + if (*sptr == '\\') { + backsub(&pb, &sptr); + } else if (*sptr == '&') { + sptr++; + adjbuf(&buf, &bufsz, 1+patlen+pb-buf, recsize, &pb, "gensub"); + for (q = patbeg; q < patbeg+patlen; ) + *pb++ = *q++; + } else + *pb++ = *sptr++; + } + t = patbeg + patlen; + if (patlen == 0 || *t == 0 || *(t-1) == 0) + goto done; + if (pb > buf + bufsz) + FATAL("gensub result1 %.30s too big; can't happen", buf); + mflag = 1; + } + } while (pmatch(pfa,t)); + sptr = t; + adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "gensub"); + while ((*pb++ = *sptr++) != 0) + ; + done: if (pb > buf + bufsz) + FATAL("gensub result2 %.30s too big; can't happen", buf); + *pb = '\0'; + setsval(res, buf); + pfa->initstat = tempstat; + } + tempfree(x); + tempfree(y); + free(buf); + return(res); +} + void backsub(char **pb_ptr, const char **sptr_ptr) /* handle \\& variations */ { /* sptr[0] == '\\' */ char *pb = *pb_ptr; From nobody Mon May 20 20:38:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjqCY6RHHz5LP9d; Mon, 20 May 2024 20:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjqCY5lsVz4RVw; Mon, 20 May 2024 20:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6tMX9vng1NBmZx6k/T8u0gDpGDM6aWaOh+Q4cgRv0mY=; b=xSHex30IH5YWDcFhaEDCKMJYzGDy1ygJetHTpPcaseLJBDCXgLcGX+1XvonUqQ3DVGVPgE tqbvI/Kvac93ix9kA5MqhTTeNV3zr4iWtzuHm5I4lQ6fkORRzM2wrfKOlm3xF2BcSMDo/2 J9EwNBokQDiKhuqR5RcvbsJns2/Ee6m+8uQ+eelOlCXqF/cEG8WnkbCsp68ZTRW33RRGsy 253tgEd0vcAMukVNgKGJXXb7Db6q2FkprnoPUvMZHGurWRrt1botGQU5rKgL0Bbro22RkU is/T1wzHdc9vhFIXvZDYeLFB0k6GVfgEIm/4a2Pzl73OR8PhGogGuTaVmtCz8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716237513; a=rsa-sha256; cv=none; b=ON3EbXtBoxZwGhk0FxaB90jXA7rR/sxrEiLZWxyY1YHK3XFNBB/sPtI2WdKHDZ4yxgvO5U YQRVpjwv1lBl62rmU2X3T/3Q8oLy7tOt4rCApW7ms5g0iV5S9BsLyeFwg4hcygpIekLxkj lHrsZVmtxdqrQ5tKXh3Ht97uwGm8N+cctMlSp/4jsYBqp3t4er/cixsT+wjxEKJGdn6o6f 4h6WK9euGUwBAQROGrPjbpF0UdpTx+9A3SGu8jIRIvCxCPv1yVNALE7cakSNvzPpIQRYh2 Nb2VVF4WmpWX5hilsa13dqBDCuUSmgZWklkbGMmrhapuMaCqWNp0IU8lEk6AHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6tMX9vng1NBmZx6k/T8u0gDpGDM6aWaOh+Q4cgRv0mY=; b=udTxmgHdDdRcYFhdCcUp2aO/GOsJ1Qw0zQx+rlSTOUj6XXJXUP4B/zZFvy7t6AlhToM5PP NwRCQihVvaSSEr59iA9RF+Fg3mypSl/yGALIacxixHPuk3go9gUU//csRncZBckruBWmf7 R7vmOHltlLGRN/m2K4fkEI3KGVypYwHIRGVXkHkOAQp3kTVr74JlA9qaWnytCN/HkWrvFX rf8ub6oCapZqVsT/Bdj5oGj1ux0ADOx8EZrkqJ7zB+CHqPk844iiBP+158svsnApZcT6n/ 0qSzHZEU/xUePbN6d6QfmgxNawNesZDGijF/UfgbZigyYvb38YeTVWbpWob4Zg== 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 4VjqCY58ynzsxm; Mon, 20 May 2024 20:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KKcXai057573; Mon, 20 May 2024 20:38:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KKcXeM057570; Mon, 20 May 2024 20:38:33 GMT (envelope-from git) Date: Mon, 20 May 2024 20:38:33 GMT Message-Id: <202405202038.44KKcXeM057570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: f44abb705590 - releng/14.1 - ifconfig: Add format shortcuts. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: f44abb7055904b5d7ea2ce984abccd3098a54987 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f44abb7055904b5d7ea2ce984abccd3098a54987 commit f44abb7055904b5d7ea2ce984abccd3098a54987 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-14 06:51:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 20:37:28 +0000 ifconfig: Add format shortcuts. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45166 (cherry picked from commit 847ef59d4b5eab234bd1f8eb947ad74bdab5614e) ifconfig: Markup nits. MFC after: 3 days Reviewed by: imp, allanjude Differential Revision: https://reviews.freebsd.org/D45209 (cherry picked from commit 42b28f815214aa582fe4ca707687d3af47850230) (cherry picked from commit dd1a16c9e2c1c95d9ac7ad0b082248e60ede0e99) Approved by: re (cperciva) --- sbin/ifconfig/ifconfig.8 | 32 +++++++++++++++++++++++--------- sbin/ifconfig/ifconfig.c | 42 +++++++++++++++++++++++++----------------- 2 files changed, 48 insertions(+), 26 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index a538981608cd..471d37ac1779 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" -.Dd November 08, 2023 +.Dd May 12, 2024 .Dt IFCONFIG 8 .Os .Sh NAME @@ -137,7 +137,7 @@ and their associated .Ar format strings are: .Pp -.Bl -tag -width ether +.Bl -tag -width default .It Cm addr Adjust the display of inet and inet6 addresses: .Pp @@ -202,6 +202,16 @@ Integer format, for example: .Ql prefixlen 64 .El .El +.Pp +In addition, the following shortcuts are accepted: +.Bl -tag -width default +.It Cm default +Resets all formats to their default values. +.It Cm cidr +Shortcut notation for +.Cm inet:cidr,inet6:cidr . +.El +.Pp .It Fl G Ar groupname Exclude members of the specified .Ar groupname @@ -464,13 +474,17 @@ sending out requests and listening for replies. .It Cm stickyarp Enable the so-called sticky ARP mode for the interface. If this option is enabled on the given interface, any resolved address is -marked as a static one and never expires. This may be used to increase +marked as a static one and never expires. +This may be used to increase security of the network by preventing ARP spoofing or to reduce latency for high-performance Ethernet networks where the time needed for ARP resolution is -too high. Please note that a similar feature is also provided for bridges. See +too high. +Please note that a similar feature is also provided for bridges. +See the sticky option in the .Sx Bridge Interface Parameters -section. Enabling this +section. +Enabling this option may impact techniques which rely on ARP expiration/overwriting feature such as load-balancers or high-availabity solutions such as .Xr carp 4 . @@ -1227,8 +1241,8 @@ Set the interval at which beacon frames are sent when operating in ad-hoc or ap mode. The .Ar interval -parameter is specified in TU's (1024 usecs). -By default beacon frames are transmitted every 100 TU's. +parameter is specified in TUs (1024 usecs). +By default beacon frames are transmitted every 100 TUs. .It Cm bmissthreshold Ar count Set the number of consecutive missed beacons at which the station will attempt to roam (i.e., search for a new access point). @@ -1885,8 +1899,8 @@ Use .Fl powersave to disable powersave operation when operating as a client. .It Cm powersavesleep Ar sleep -Set the desired max powersave sleep time in TU's (1024 usecs). -By default the max powersave sleep time is 100 TU's. +Set the desired max powersave sleep time in TUs (1024 usecs). +By default the max powersave sleep time is 100 TUs. .It Cm protmode Ar technique For interfaces operating in 802.11g, use the specified .Ar technique diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 7a78e9a934f7..402967d405fd 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -322,14 +322,10 @@ cmpifaddrs(struct ifaddrs *a, struct ifaddrs *b, struct ifa_queue *q) static void freeformat(void) { - if (f_inet != NULL) - free(f_inet); - if (f_inet6 != NULL) - free(f_inet6); - if (f_ether != NULL) - free(f_ether); - if (f_addr != NULL) - free(f_addr); + free(f_inet); + free(f_inet6); + free(f_ether); + free(f_addr); } static void setformat(char *input) @@ -339,9 +335,18 @@ static void setformat(char *input) formatstr = strdup(input); while ((category = strsep(&formatstr, ",")) != NULL) { modifier = strchr(category, ':'); - if (modifier == NULL || modifier[1] == '\0') { - warnx("Skipping invalid format specification: %s\n", - category); + if (modifier == NULL) { + if (strcmp(category, "default") == 0) { + freeformat(); + } else if (strcmp(category, "cidr") == 0) { + free(f_inet); + f_inet = strdup(category); + free(f_inet6); + f_inet6 = strdup(category); + } else { + warnx("Skipping invalid format: %s\n", + category); + } continue; } @@ -349,14 +354,19 @@ static void setformat(char *input) modifier[0] = '\0'; modifier++; - if (strcmp(category, "addr") == 0) + if (strcmp(category, "addr") == 0) { + free(f_addr); f_addr = strdup(modifier); - else if (strcmp(category, "ether") == 0) + } else if (strcmp(category, "ether") == 0) { + free(f_ether); f_ether = strdup(modifier); - else if (strcmp(category, "inet") == 0) + } else if (strcmp(category, "inet") == 0) { + free(f_inet); f_inet = strdup(modifier); - else if (strcmp(category, "inet6") == 0) + } else if (strcmp(category, "inet6") == 0) { + free(f_inet6); f_inet6 = strdup(modifier); + } } free(formatstr); } @@ -621,8 +631,6 @@ main(int ac, char *av[]) .io_s = -1, }; - f_inet = f_inet6 = f_ether = f_addr = NULL; - lifh = ifconfig_open(); if (lifh == NULL) err(EXIT_FAILURE, "ifconfig_open"); From nobody Mon May 20 20:38:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjqCb0gX5z5LP16; Mon, 20 May 2024 20:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjqCZ6GQlz4RN0; Mon, 20 May 2024 20:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SgTTBPukJ64jLEQDTgXszH/YNbxPu0cXIieeynOjhCA=; b=fBPYl2kaq333IQcoCjjlac9SksY5B0lJbVBZ3hrRBa1SqSCux0uhYbWzczWHhR0S5Wj5VV gfFon7kXMHFDNQmsIoMkmXCdUKM1K6X/Abm1Zlx3+lT/tCaIeFKsB3YTeHkaE0iqlmOb5r CEU/zu1ukzyxq6plnUVlgz4UupNOm/+5kecc2HoGHSq+jxt+pjmDrsWFoR6SRrO+80Ka8F bSZPQ0LQ8VkAAWCBXRrAEOAN9+zRYXFbWYP5N3duPZQU5SdnsYqY1TiqbmLSa60z6wfNu+ r8N4B4ZNphw8iOh/sMKwA3KjsQ4PQI+9g8rxRTkY6NdWk7eXaqfd/N9OehGyIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716237514; a=rsa-sha256; cv=none; b=xJOG6zrgtKSTNtBxSABCtd0WKRDKwSfPyZWed439gflstwVG9siXLAZYnuqgDiUnflK5ga grnWuotC2O5G6Uf1rxS0Pe2OxqAcWQ7zCRU0Xv3nnRFJosbdeE7PVriHU5RE5p+SeA4XBf /Jmdd4lW99Yfx3YfZAosIAR6u4r8tu8UK8mBRjbbWWWlORL1YFQzN7WwMbllgp9vuh48TX qxOohlqb8H1lrhWd6nW7MHmeA3bo5byn6pDL4XBVa6be4V48pf3p1TGw52dckts67zffF/ SoxjuDzykMqc/rSvpPZegnIY5mEWYBQLTV6XnswW+mw/yB5W7o/KSABRcK4gbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SgTTBPukJ64jLEQDTgXszH/YNbxPu0cXIieeynOjhCA=; b=akDcHNE1GFIVGfiAO9j5JfTjz9G9xE051LMx97L4MhD7mZftTEmGtJWjM6JOlghEnCFwP6 erCRPr8lylB8V88ElswGOA9/eUkf46bkfZGbVkd5sl641Utc5t+GmEUUvqLP5YOvVE047S 0sQfWbWRCvkZ3+AxWJ2FiBGNhJmUNbqBeMUIfQonzvLSawmpZhyQ+lQNwbc4zt4jyF7z6+ T/XmcC/iXg0/NnBm4n4MKrAMj+xmFbJ8nmIol3wbcgHmo9P1zZnRRyJNjMtugoqgC2Q6VW CN62R74gC3xE1LDG5Beo9gwuHYaX7ESmYPcYftFxr42K/0VZrWjWvXjkQ1q/KQ== 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 4VjqCZ5THpztBj; Mon, 20 May 2024 20:38:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KKcY4B057625; Mon, 20 May 2024 20:38:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KKcYqB057622; Mon, 20 May 2024 20:38:34 GMT (envelope-from git) Date: Mon, 20 May 2024 20:38:34 GMT Message-Id: <202405202038.44KKcYqB057622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 0829f9334cdd - releng/14.1 - atf: Guard against multiple evaluation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 0829f9334cdd4f839eb3081ea91d533d1a026bcc Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0829f9334cdd4f839eb3081ea91d533d1a026bcc commit 0829f9334cdd4f839eb3081ea91d533d1a026bcc Author: Dag-Erling Smørgrav AuthorDate: 2024-05-15 10:08:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 20:37:40 +0000 atf: Guard against multiple evaluation. Note that the ATF-C++ macros have the same issue, but they are not as easily fixed. MFC after: 3 days Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D45148 (cherry picked from commit a7beca6fb113986839de73b7cf73d933464898c6) (cherry picked from commit 745ee870031e3b35141fe720bdebe9baa234e942) Approved by: re (cperciva) --- contrib/atf/atf-c/macros.h | 151 ++++++++++++++++++++++++++++----------------- 1 file changed, 95 insertions(+), 56 deletions(-) diff --git a/contrib/atf/atf-c/macros.h b/contrib/atf/atf-c/macros.h index 1784fc47435d..abcb9f697907 100644 --- a/contrib/atf/atf-c/macros.h +++ b/contrib/atf/atf-c/macros.h @@ -167,65 +167,104 @@ ATF_CHECK_MSG((expected) == (actual), "%s != %s: " fmt, \ #expected, #actual, ##__VA_ARGS__) -#define ATF_REQUIRE_STREQ(expected, actual) \ - ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ - #expected, #actual, expected, actual) - -#define ATF_CHECK_STREQ(expected, actual) \ - ATF_CHECK_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ - #expected, #actual, expected, actual) - -#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) \ - ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, \ - "%s != %s (%s != %s): " fmt, \ - #expected, #actual, expected, actual, ##__VA_ARGS__) - -#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) \ - ATF_CHECK_MSG(strcmp(expected, actual) == 0, \ - "%s != %s (%s != %s): " fmt, \ - #expected, #actual, expected, actual, ##__VA_ARGS__) - -#define ATF_REQUIRE_INTEQ(expected, actual) \ - ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd)", \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual)) - -#define ATF_CHECK_INTEQ(expected, actual) \ - ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd)", #expected, \ - #actual, (intmax_t)(expected), (intmax_t)(actual)) - -#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) \ - ATF_REQUIRE_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual), ##__VA_ARGS__) - -#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) \ - ATF_CHECK_MSG((expected) == (actual), "%s != %s (%jd != %jd): " fmt, \ - #expected, #actual, (intmax_t)(expected), \ - (intmax_t)(actual), ##__VA_ARGS__) - -#define ATF_REQUIRE_MATCH(regexp, string) \ - ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s'", regexp, string); - -#define ATF_CHECK_MATCH(regexp, string) \ - ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s'", regexp, string); - -#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) \ - ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s': " fmt, regexp, string, \ - ##__VA_ARGS__); - -#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) \ - ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \ - "'%s' not matched in '%s': " fmt, regexp, string, \ - ##__VA_ARGS__); +#define ATF_REQUIRE_STREQ(expected, actual) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_CHECK_STREQ(expected, actual) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_REQUIRE_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) do { \ + const char *_atf_expected = (expected); \ + const char *_atf_actual = (actual); \ + ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \ + "%s != %s (%s != %s): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_REQUIRE_INTEQ(expected, actual) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_CHECK_INTEQ(expected, actual) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_CHECK_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd)", #expected, #actual, \ + _atf_expected, _atf_actual); \ + } while (0) + +#define ATF_REQUIRE_INTEQ_MSG(expected, actual, fmt, ...) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_REQUIRE_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_INTEQ_MSG(expected, actual, fmt, ...) do { \ + intmax_t _atf_expected = (expected); \ + intmax_t _atf_actual = (actual); \ + ATF_CHECK_MSG(_atf_expected == _atf_actual, \ + "%s != %s (%jd != %jd): " fmt, #expected, #actual, \ + _atf_expected, _atf_actual, ##__VA_ARGS__); \ + } while (0) + +#define ATF_REQUIRE_MATCH(regexp, string) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s'", _atf_regexp, _atf_string); \ + } while (0) + +#define ATF_CHECK_MATCH(regexp, string) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s'", _atf_regexp, _atf_string); \ + } while (0) + +#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_REQUIRE_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \ + ##__VA_ARGS__); \ + } while (0) + +#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) do { \ + const char *_atf_regexp = (regexp); \ + const char *_atf_string = (string); \ + ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \ + "'%s' not matched in '%s': " fmt, _atf_regexp, _atf_string, \ + ##__VA_ARGS__); \ + } while (0) #define ATF_CHECK_ERRNO(exp_errno, bool_expr) \ - atf_tc_check_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr) + atf_tc_check_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr)) #define ATF_REQUIRE_ERRNO(exp_errno, bool_expr) \ - atf_tc_require_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr) + atf_tc_require_errno(__FILE__, __LINE__, (exp_errno), #bool_expr, (bool_expr)) #endif /* !defined(ATF_C_MACROS_H) */ From nobody Mon May 20 20:38:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjqCc32h7z5LP9j; Mon, 20 May 2024 20:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjqCc0TKnz4RSP; Mon, 20 May 2024 20:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wBZOynk8IyuaDZwZ4UdwSUoP+DEAnNDN2yVpdfmJ+v0=; b=savaRWkHufIZFuzp9db+eBxHfbHYdFXpZ0yz+V+Yjy+ExIConciO40uzFi8NPFoXI/huBd gDQx77FZrMV1zwupUo3D5RzdFuh63nTn3NnVhz7MU0aGvuLobZLRT+MPPhzC6HWtvjfC9i 0CrivMnIBaGG9y0SesyggVWAaE/b2r2ylc5lMiB20KK3CqBxQQswT5jBvvVL+LihVnjB4W nD9ze7qohyXngr+OZoP+W5ZbbgkG0EvdWkmgdYmJrQ36v1dKdb3EdOUAPXMGRrVjiHOZVG DxR53CKilTJudsxG/1a0CcPCFfDiWX09rkuFbpydmGOisLKqvvWWXNO5m7Oj6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716237516; a=rsa-sha256; cv=none; b=yTP7HV/Ggy3nmDF0QYYHsM/t+CBduqALRD3SWTzeD9uPAHKdLvPH47Zg1IYJamkHx/Ppxm PZ1bhtmj3BuYDJ5+8XMtTgsylniGxKTyH8SC09yVIahYdwlnAQr14DaggYScoeOnpLcGEy QnQ+u9ijyWrMujCNW03Ja8Kl7Q5kFaNJKsr6EhLJcN3WeQW7JsqcLxIKqJWlpL111QGPvp 9y0EWtlzf9vuCV1XCw14Zrve0mHVlM9xw1SuWDV6QD/87pzd4z8Qp+ZV6UwoYI0PnSESvr v/bWyzOb3ixcxiAHSiKWEDEvOJOcgdc/dYiHCQNSD/q6SmGwxcVXQLeBgw+0eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wBZOynk8IyuaDZwZ4UdwSUoP+DEAnNDN2yVpdfmJ+v0=; b=VBes7AlQds4wl8bQa5kE6VCgVIY6QAg4zeERTlna1OUeTBBtZbhduhhnZ1045QuXMfaoWM jDwhEPuTgStrt/0gSFF3mW+pIVjk1lKPuRzITHYqJ6hWKLPMywppQYn17MFLhv1IzrGQPF CtQTiEgnNPQN7/5x38SQRQrN5jPzsjZm8IUN7afMEwSEV7PeIb6S97gMVfsfBuaLefLa+/ sIH5KiwLXOCXeG0v5MA8ke6Wp9uLubS4LWeG4wCZfjxEsz4ZSP7fc/luy8gRFm8XQ+nFpL uo1SzDoy7FwnkFFzPyQ9EGagmCF7Tzvvtw7h/OJcBITmOcZCGphB+PuQhuYI4A== 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 4VjqCb6BGgztBk; Mon, 20 May 2024 20:38:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KKcZsA057680; Mon, 20 May 2024 20:38:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KKcZQB057677; Mon, 20 May 2024 20:38:35 GMT (envelope-from git) Date: Mon, 20 May 2024 20:38:35 GMT Message-Id: <202405202038.44KKcZQB057677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5df49242be71 - releng/14.1 - ldns: Ignore commented-out lines in resolv.conf. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 5df49242be716cd8736fd10086dc6b31af1eafbd Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5df49242be716cd8736fd10086dc6b31af1eafbd commit 5df49242be716cd8736fd10086dc6b31af1eafbd Author: Dag-Erling Smørgrav AuthorDate: 2024-05-15 10:16:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 20:37:46 +0000 ldns: Ignore commented-out lines in resolv.conf. This merges upstream PR 238 + an additional bug fix. PR: 278721 MFC after: 1 week (cherry picked from commit 3b092e4936c433889cc668ea9563c8fd437d1a3e) (cherry picked from commit 7daf36028411c3a9c73e0c75732f9cbcbf66362e) Approved by: re (cperciva) --- contrib/ldns/ldns/parse.h | 2 ++ contrib/ldns/parse.c | 35 +++++++++++++++++++++++++++---- contrib/ldns/resolver.c | 53 ++++++++--------------------------------------- 3 files changed, 42 insertions(+), 48 deletions(-) diff --git a/contrib/ldns/ldns/parse.h b/contrib/ldns/ldns/parse.h index ba7edf5679d8..6130dae32bd2 100644 --- a/contrib/ldns/ldns/parse.h +++ b/contrib/ldns/ldns/parse.h @@ -95,6 +95,8 @@ ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, */ ldns_status ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed, const char *delim, int *line_nr); +ssize_t ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, size_t limit, int *line_nr); + /** * returns a token/char from the buffer b. * This function deals with ( and ) in the buffer, diff --git a/contrib/ldns/parse.c b/contrib/ldns/parse.c index 9698ba71e881..af8b2c1321b2 100644 --- a/contrib/ldns/parse.c +++ b/contrib/ldns/parse.c @@ -27,9 +27,14 @@ ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit) return ldns_fget_token_l(f, token, delim, limit, NULL); } -ldns_status -ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed - , const char *delim, int *line_nr) +enum file_type2parse { + zone_file_type, resolv_conf_file_type +}; + +static ldns_status +ldns_fget_token_l_st_file_type(FILE *f, char **token, size_t *limit, + bool fixed, const char *delim, int *line_nr, + enum file_type2parse file_type) { int c, prev_c; int p; /* 0 -> no parentheses seen, >0 nr of ( seen */ @@ -98,7 +103,9 @@ ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed } /* do something with comments ; */ - if (c == ';' && quoted == 0) { + if ((c == ';' + || (c == '#' && file_type == resolv_conf_file_type)) + && quoted == 0) { if (prev_c != '\\') { com = 1; } @@ -215,6 +222,26 @@ tokenread: return i == 0 ? LDNS_STATUS_SYNTAX_EMPTY : LDNS_STATUS_OK; } +ldns_status +ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed + , const char *delim, int *line_nr) +{ + return ldns_fget_token_l_st_file_type( + f, token, limit, fixed, delim, line_nr, zone_file_type); +} + +ssize_t +ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, + size_t limit, int *line_nr) +{ + if (limit == 0) + limit = LDNS_MAX_LINELEN; + if (ldns_fget_token_l_st_file_type(f, &token, &limit, true, delim, + line_nr, resolv_conf_file_type)) + return -1; + else + return (ssize_t)strlen(token); +} ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr) diff --git a/contrib/ldns/resolver.c b/contrib/ldns/resolver.c index f9ec65a55966..a426b82c034e 100644 --- a/contrib/ldns/resolver.c +++ b/contrib/ldns/resolver.c @@ -775,7 +775,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) #endif ssize_t gtr, bgtr; ldns_buffer *b; - int lnr = 0, oldline; + int lnr = 0; FILE* myfp = fp; if(!line_nr) line_nr = &lnr; @@ -809,36 +809,18 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) gtr = 1; word[0] = 0; - oldline = *line_nr; expect = LDNS_RESOLV_KEYWORD; while (gtr > 0) { - /* check comments */ - if (word[0] == '#') { - word[0]='x'; - if(oldline == *line_nr) { - /* skip until end of line */ - int c; - do { - c = fgetc(myfp); - } while(c != EOF && c != '\n'); - if(c=='\n') (*line_nr)++; - } - /* and read next to prepare for further parsing */ - oldline = *line_nr; - continue; - } - oldline = *line_nr; switch(expect) { case LDNS_RESOLV_KEYWORD: /* keyword */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr != 0) { - if(word[0] == '#') continue; for(i = 0; i < LDNS_RESOLV_KEYWORDS; i++) { if (strcasecmp(keyword[i], word) == 0) { /* chosen the keyword and * expect values carefully - */ + */ expect = i; break; } @@ -856,16 +838,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_DEFDOMAIN: /* default domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { if(!fp) fclose(myfp); @@ -879,16 +857,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_NAMESERVER: /* NS aaaa or a record */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } if(strchr(word, '%')) { /* snip off interface labels, * fe80::222:19ff:fe31:4222%eth0 */ @@ -911,7 +885,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_SEARCH: /* search list domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); b = LDNS_MALLOC(ldns_buffer); if(!b) { ldns_resolver_deep_free(r); @@ -929,10 +903,6 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) bgtr = ldns_bget_token(b, word, LDNS_PARSE_NORMAL, (size_t) gtr + 1); while (bgtr > 0) { gtr -= bgtr; - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - break; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { ldns_resolver_deep_free(r); @@ -954,28 +924,23 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) } break; case LDNS_RESOLV_SORTLIST: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* sortlist not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_OPTIONS: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* options not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_ANCHOR: /* a file containing a DNSSEC trust anchor */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { ldns_resolver_deep_free(r); if(!fp) fclose(myfp); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } - #ifdef HAVE_SSL tmp_rr = ldns_read_anchor_file(word); (void) ldns_resolver_push_dnssec_anchor(r, tmp_rr); From nobody Mon May 20 20:40:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjqFL41bfz5LPfc; Mon, 20 May 2024 20:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjqFL3Vrgz4SG5; Mon, 20 May 2024 20:40:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JMRNeGn4nejpyIWxgCLcT3tJ+GMSU5p6XsHH7b7jow4=; b=AEQktLBrTjdUU5c5LwzxGHKm5tQqIrTakhS21Vcj4QoUFhkM8sKh/5sjnoSBxcmQutbFR+ dl1VLL5Fnamn6tLa0NRfdGn8+kHLQy5QfTyUXZ7hosGJEOwyLEdSk/aIuuNTKvYwFphkPi bLtZWls51fh0nv9QmeN0KuY5toMmBqmgwYUveswhjVDnNJjFE5tUCphN8L2a9yrZR7lydM kOsMB5hKRkG67wcYd1OVqWW7acyPoGvLJ8262l8ls+rw+wKmQ+26/WTe+S1Fm2cMNvHfaH VtzJS6L5TvscL72M1LIOMp9HAQQYCGpydpLmDwg3KhAUWZ9A8AOw6li7RQNXag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716237606; a=rsa-sha256; cv=none; b=B+MyzwuJAwpDKDSo0PW/lM7inUs9YDcBBrPgSfr0m8yYiVJxJQudHzc2Pn95uwYkDWSYk1 H4+2tQD7nbj78RWZI/p1nyLQxogoOF+unRHDuZ/aoAodBYu4eiwxsTvSwrqQihs3YxcuUj rUs95dowiKi66EFgYJPnYpHYu0tgWwG3yTa9y2EefYuRDrK/WRwIZHd765WcmdH3a/8E2a 4UOQPIKjHLnEYPOFNlaZSsq6N6ipXRaYZ81eY8i8ZbM1yb3ktAEqLY8Yx19giBH2N/NgVe utdDRPHys4o2+lilb9LujkCikzFOd9IiBV0vNNDMROrH8CY/x94fEuomkP6DwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JMRNeGn4nejpyIWxgCLcT3tJ+GMSU5p6XsHH7b7jow4=; b=M5rfsN6OEXFkgKYl9RZVEJRHuYCD/fr00eyey/u2XeEsSrHwssIT6EpZDaigM2FqFO74y9 0xdL8kX2jSjhPlE1iwjNc+CxExM4raKvitOBZtiMgQoNML+yDp2Tef1Mywfe/+RXSj6AGf QNSOaXzKf3pMgyZYh0Z7E7YQ5fWMBdXPb5azVa7m8xu0jFKYapcKu+bt/MTsUcQuTivpOi K7axK76VfeoRKO2uq1JXTPYaf2nYEOCY3FB2OBueg+RvKP0yfJH2f0+pg/NXEuepCnGFUp AuKMDNHyXKBALG5QyXU0gCuqHYQXUrw60cgOqoC+ouiJbttn/kI1pzVLyKbiUg== 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 4VjqFL326Czsxp; Mon, 20 May 2024 20:40:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KKe6dC060949; Mon, 20 May 2024 20:40:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KKe5ge060756; Mon, 20 May 2024 20:40:05 GMT (envelope-from git) Date: Mon, 20 May 2024 20:40:05 GMT Message-Id: <202405202040.44KKe5ge060756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a11839e6172d - stable/13 - unbound: Vendor import 1.20.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: a11839e6172de9e0d375f92a5b454e02a8537e59 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a11839e6172de9e0d375f92a5b454e02a8537e59 commit a11839e6172de9e0d375f92a5b454e02a8537e59 Author: Cy Schubert AuthorDate: 2024-05-10 20:56:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 12:47:06 +0000 unbound: Vendor import 1.20.0 Release notes at https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/ Security: The DNSBomb vulnerability CVE-2024-33655 Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main (cherry picked from commit 335c7cda12138f2aefa41fb739707612cc12a9be) --- contrib/unbound/Makefile.in | 16 +- contrib/unbound/{ac_pkg_swig.m4 => ax_pkg_swig.m4} | 110 +- contrib/unbound/ax_pthread.m4 | 444 +- contrib/unbound/cachedb/cachedb.c | 133 +- contrib/unbound/cachedb/cachedb.h | 16 + contrib/unbound/config.h.in | 105 +- contrib/unbound/configure | 12872 +++++---- contrib/unbound/configure.ac | 16 +- contrib/unbound/configure~ | 26616 +++++++++++++++++++ contrib/unbound/contrib/rc_d_unbound | 9 + contrib/unbound/contrib/unbound.init | 1 + contrib/unbound/contrib/unbound.init_fedora | 1 + contrib/unbound/contrib/unbound.init_yocto | 1 + contrib/unbound/daemon/cachedump.c | 23 +- contrib/unbound/daemon/daemon.c | 26 +- contrib/unbound/daemon/remote.c | 130 +- contrib/unbound/daemon/unbound.c | 39 +- contrib/unbound/daemon/worker.c | 35 +- contrib/unbound/doc/Changelog | 187 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf.in | 28 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 6 +- contrib/unbound/doc/unbound-control.8.in | 8 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 72 +- contrib/unbound/doc/unbound.doxygen | 2931 +- contrib/unbound/edns-subnet/subnetmod.c | 40 +- contrib/unbound/iterator/iter_fwd.c | 119 +- contrib/unbound/iterator/iter_fwd.h | 60 +- contrib/unbound/iterator/iter_hints.c | 95 +- contrib/unbound/iterator/iter_hints.h | 54 +- contrib/unbound/iterator/iter_utils.c | 62 +- contrib/unbound/iterator/iter_utils.h | 6 +- contrib/unbound/iterator/iterator.c | 295 +- contrib/unbound/libunbound/context.c | 8 + contrib/unbound/libunbound/libunbound.c | 5 + contrib/unbound/libunbound/libworker.c | 21 +- contrib/unbound/services/authzone.c | 10 + contrib/unbound/services/cache/dns.c | 52 +- contrib/unbound/services/cache/infra.c | 170 +- contrib/unbound/services/cache/infra.h | 28 + contrib/unbound/services/cache/rrset.c | 87 + contrib/unbound/services/cache/rrset.h | 31 + contrib/unbound/services/listen_dnsport.c | 51 +- contrib/unbound/services/listen_dnsport.h | 8 +- contrib/unbound/services/localzone.c | 6 +- contrib/unbound/services/mesh.c | 106 +- contrib/unbound/services/mesh.h | 6 + contrib/unbound/services/rpz.c | 342 +- contrib/unbound/services/rpz.h | 8 + contrib/unbound/services/view.h | 3 +- contrib/unbound/smallapp/unbound-anchor.c | 70 +- contrib/unbound/smallapp/unbound-checkconf.c | 13 +- contrib/unbound/smallapp/unbound-control.c | 5 +- contrib/unbound/testdata/cachedb_expired.crpl | 324 + .../testdata/cachedb_expired_client_timeout.crpl | 343 + .../testdata/cachedb_expired_reply_ttl.crpl | 259 + .../unbound/testdata/cachedb_subnet_change.crpl | 304 + .../unbound/testdata/cachedb_subnet_expired.crpl | 322 + .../testdata/cachedb_subnet_toecs_timeout.crpl | 229 + contrib/unbound/testdata/iter_dname_ttl.rpl | 39 - .../testdata/iter_ghost_grandchild_delegation.rpl | 256 + contrib/unbound/testdata/local_cnameother.rpl | 67 + contrib/unbound/testdata/rpz_clientip_override.rpl | 269 + contrib/unbound/testdata/rpz_cname_handle.rpl | 779 + contrib/unbound/testdata/rpz_nsdname_override.rpl | 325 + contrib/unbound/testdata/rpz_nsip_override.rpl | 332 + contrib/unbound/testdata/rpz_passthru_clientip.rpl | 90 + contrib/unbound/testdata/rpz_qtype_cname.rpl | 120 + .../testdata/rpz_reload.tdir/example.org.zone | 2 + .../testdata/rpz_reload.tdir/rpz.example.com.zone | 6 + .../testdata/rpz_reload.tdir/rpz_reload.conf | 30 + .../testdata/rpz_reload.tdir/rpz_reload.dsc | 16 + .../testdata/rpz_reload.tdir/rpz_reload.post | 12 + .../testdata/rpz_reload.tdir/rpz_reload.pre | 26 + .../testdata/rpz_reload.tdir/rpz_reload.test | 109 + contrib/unbound/testdata/subnet_cached_size.crpl | 308 + contrib/unbound/testdata/ttl_max_negative.rpl | 206 + contrib/unbound/testdata/ttl_min_negative.rpl | 204 + contrib/unbound/testdata/val_cnameqtype_qmin.rpl | 784 + contrib/unbound/testdata/val_dnameqtype.rpl | 689 + contrib/unbound/testdata/val_dnameqtype_qmin.rpl | 859 + contrib/unbound/util/config_file.c | 39 + contrib/unbound/util/config_file.h | 19 + contrib/unbound/util/configlexer.c | 8195 +++--- contrib/unbound/util/configlexer.lex | 7 + contrib/unbound/util/configparser.c | 4502 ++-- contrib/unbound/util/configparser.h | 508 +- contrib/unbound/util/configparser.y | 83 +- contrib/unbound/util/data/msgparse.h | 2 + contrib/unbound/util/data/msgreply.c | 33 +- contrib/unbound/util/module.c | 11 +- contrib/unbound/util/module.h | 18 +- contrib/unbound/util/net_help.c | 36 +- contrib/unbound/util/netevent.c | 8 +- contrib/unbound/util/netevent.h | 2 + contrib/unbound/util/storage/lookup3.c | 2 +- contrib/unbound/util/storage/lruhash.c | 34 + contrib/unbound/util/storage/lruhash.h | 11 + contrib/unbound/util/storage/slabhash.c | 7 + contrib/unbound/util/storage/slabhash.h | 12 + contrib/unbound/validator/val_utils.c | 40 +- contrib/unbound/validator/validator.c | 36 +- usr.sbin/unbound/config.h | 6 +- 107 files changed, 53017 insertions(+), 13503 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index 22fb75c123bd..f30ca81a84f8 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -1278,7 +1278,8 @@ daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/edns.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h \ $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/respip/respip.h \ - $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h + $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ @@ -1355,7 +1356,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h + $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h $(srcdir)/daemon/worker.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h @@ -1428,7 +1429,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h $(srcdir)/services/authzone.h \ $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h \ - $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h $(srcdir)/util/storage/slabhash.h $(srcdir)/daemon/daemon.h lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ @@ -1484,7 +1485,8 @@ context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbou $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h + $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1496,7 +1498,8 @@ libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbou $(srcdir)/sldns/sbuffer.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h + $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1510,8 +1513,7 @@ libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/li $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/sldns/str2wire.h + $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ diff --git a/contrib/unbound/ac_pkg_swig.m4 b/contrib/unbound/ax_pkg_swig.m4 similarity index 55% rename from contrib/unbound/ac_pkg_swig.m4 rename to contrib/unbound/ax_pkg_swig.m4 index 87f99fb2fe98..7a4196ff5dff 100644 --- a/contrib/unbound/ac_pkg_swig.m4 +++ b/contrib/unbound/ax_pkg_swig.m4 @@ -1,39 +1,43 @@ # =========================================================================== -# http://autoconf-archive.cryp.to/ac_pkg_swig.html +# https://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html # =========================================================================== # # SYNOPSIS # -# AC_PROG_SWIG([major.minor.micro]) +# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) # # DESCRIPTION # -# This macro searches for a SWIG installation on your system. If found you -# should call SWIG via $(SWIG). You can use the optional first argument to -# check if the version of the available SWIG is greater than or equal to -# the value of the argument. It should have the format: N[.N[.N]] (N is a -# number between 0 and 999. Only the first N is mandatory.) +# This macro searches for a SWIG installation on your system. If found, +# then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is +# found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd. # -# If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that -# the swig package is this version number or higher. +# You can use the optional first argument to check if the version of the +# available SWIG is greater than or equal to the value of the argument. It +# should have the format: N[.N[.N]] (N is a number between 0 and 999. Only +# the first N is mandatory.) If the version argument is given (e.g. +# 1.3.17), AX_PKG_SWIG checks that the swig package is this version number +# or higher. # -# In configure.in, use as: -# -# AC_PROG_SWIG(1.3.17) -# SWIG_ENABLE_CXX -# SWIG_MULTI_MODULE_SUPPORT -# SWIG_PYTHON +# As usual, action-if-found is executed if SWIG is found, otherwise +# action-if-not-found is executed. # -# LAST MODIFICATION +# In configure.in, use as: # -# 2008-04-12 +# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) +# AX_SWIG_ENABLE_CXX +# AX_SWIG_MULTI_MODULE_SUPPORT +# AX_SWIG_PYTHON # -# COPYLEFT +# LICENSE # # Copyright (c) 2008 Sebastian Huber -# Copyright (c) 2008 Alan W. Irwin +# Copyright (c) 2008 Alan W. Irwin # Copyright (c) 2008 Rafael Laboissiere -# Copyright (c) 2008 Andrew Collier +# Copyright (c) 2008 Andrew Collier +# Copyright (c) 2011 Murray Cumming +# Copyright (c) 2018 Reini Urban +# Copyright (c) 2021 Vincent Danjean # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -46,7 +50,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -57,17 +61,21 @@ # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. -AC_DEFUN([AC_PROG_SWIG],[ - AC_PATH_PROG([SWIG],[swig]) +#serial 15 + +AC_DEFUN([AX_PKG_SWIG],[ + # Find path to the "swig" executable. + AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) if test -z "$SWIG" ; then - AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' - elif test -n "$1" ; then - AC_MSG_CHECKING([for SWIG version]) + m4_ifval([$3],[$3],[:]) + elif test -z "$1" ; then + m4_ifval([$2],[$2],[:]) + else + AC_MSG_CHECKING([SWIG version]) [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] AC_MSG_RESULT([$swig_version]) if test -n "$swig_version" ; then @@ -77,12 +85,12 @@ AC_DEFUN([AC_PROG_SWIG],[ if test -z "$required_major" ; then [required_major=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_minor=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_minor" ; then [required_minor=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_patch=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_patch" ; then [required_patch=0] @@ -103,30 +111,28 @@ AC_DEFUN([AC_PROG_SWIG],[ if test -z "$available_patch" ; then [available_patch=0] fi - [badversion=0] - if test $available_major -lt $required_major ; then - [badversion=1] - fi - if test $available_major -eq $required_major \ - -a $available_minor -lt $required_minor ; then - [badversion=1] - fi - if test $available_major -eq $required_major \ - -a $available_minor -eq $required_minor \ - -a $available_patch -lt $required_patch ; then - [badversion=1] - fi - if test $badversion -eq 1 ; then - AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' + # Convert the version tuple into a single number for easier comparison. + # Using base 100 should be safe since SWIG internally uses BCD values + # to encode its version number. + required_swig_vernum=`expr $required_major \* 10000 \ + \+ $required_minor \* 100 \+ $required_patch` + available_swig_vernum=`expr $available_major \* 10000 \ + \+ $available_minor \* 100 \+ $available_patch` + + if test $available_swig_vernum -lt $required_swig_vernum; then + AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.]) + SWIG='' + m4_ifval([$3],[$3],[]) else - AC_MSG_NOTICE([SWIG executable is '$SWIG']) - SWIG_LIB=`$SWIG -swiglib` - AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB']) + AC_MSG_CHECKING([for SWIG library]) + SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '` + AC_MSG_RESULT([$SWIG_LIB]) + m4_ifval([$2],[$2],[]) fi else AC_MSG_WARN([cannot determine SWIG version]) - SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' + SWIG='' + m4_ifval([$3],[$3],[]) fi fi AC_SUBST([SWIG_LIB]) diff --git a/contrib/unbound/ax_pthread.m4 b/contrib/unbound/ax_pthread.m4 index ff7d2a67e11f..9f35d139149f 100644 --- a/contrib/unbound/ax_pthread.m4 +++ b/contrib/unbound/ax_pthread.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS @@ -14,24 +14,28 @@ # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with +# but also to link with them as well. For example, you might link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # -# If you are only building threads programs, you may wish to use these +# If you are only building threaded programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # PTHREAD_PRIO_INHERIT symbol is defined when compiling with @@ -55,6 +59,7 @@ # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -67,7 +72,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -82,35 +87,41 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 21 +#serial 31 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). +# requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) AC_MSG_RESULT([$ax_pthread_ok]) - if test x"$ax_pthread_ok" = xno; then + if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different @@ -118,12 +129,14 @@ fi # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -132,82 +145,163 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case ${host_os} in +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" ;; - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" + aix*) + ax_pthread_check_macro="_THREAD_SAFE" ;; -esac -# Clang doesn't consider unrecognized options an error unless we specify -# -Werror. We throw in some extra Clang-specific options to ensure that -# this doesn't happen for GCC, which also accepts -Werror. + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) -AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) -save_CFLAGS="$CFLAGS" -ax_pthread_extra_flags="-Werror" -CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], - [AC_MSG_RESULT([yes])], - [ax_pthread_extra_flags= - AC_MSG_RESULT([no])]) -CFLAGS="$save_CFLAGS" -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do - case $flag in + case $ax_pthread_try_flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - if test x"$ax_pthread_config" = xno; then continue; fi + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we @@ -218,8 +312,18 @@ for flag in $ax_pthread_flags; do # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include - static void routine(void *a) { *((int*)a) = 0; } +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } static void *start_routine(void *a) { return a; }], [pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); @@ -227,101 +331,187 @@ for flag in $ax_pthread_flags; do pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) + [ax_pthread_ok=yes], + []) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" AC_MSG_RESULT([$ax_pthread_ok]) - if test "x$ax_pthread_ok" = xyes; then - break; - fi + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + # Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $attr; return attr /* ; */])], - [attr_name=$attr; break], - []) - done - AC_MSG_RESULT([$attr_name]) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - # TODO: What about Clang on Solaris? - flag="-mt -D_REENTRANT" - fi - ;; - esac - AC_MSG_RESULT([$flag]) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then + if test "x$GCC" != "xyes"; then case $host_os in aix*) AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" AC_SUBST([PTHREAD_LIBS]) AC_SUBST([PTHREAD_CFLAGS]) AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then +if test "x$ax_pthread_ok" = "xyes"; then ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) : else diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index b912be8ed54f..95ac28904693 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -50,6 +50,8 @@ #include "util/data/msgreply.h" #include "util/data/msgencode.h" #include "services/cache/dns.h" +#include "services/mesh.h" *** 83295 LINES SKIPPED *** From nobody Mon May 20 20:41:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjqHR5wyqz5LPcH; Mon, 20 May 2024 20:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjqHR48Lnz4ScT; Mon, 20 May 2024 20:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XxCdL/p5k1l1rRFthgtZTnMBRNl2zD48FRLQRzHfT3E=; b=XPs2Cged7JTdQIY4R2httd25RUDT4SWS1DJGqHeS1MNQm2zjuW5/Js34T60+Tiwwlgaffx 4P9NXHVHT1elB4bsAECjKI1VvRU/NXyJHFORq7nZkxp4DG4kg+EGeJ/SQUBFgFwrOQ6AsI 38nJkftsvBu+9mOngZtbxW/8IhJKiBlFfV+5XkvrPztQ9CFMI+k08AZ0p2slIU2QSeKazb WxuE6K/hiAYHX4pRBkcMkaIbWwZdFUSusV4S3qxfpg00tQL/+bjzrM35TIhxnXu+73nwIH K8miWPs4jbmGc96vQhjR9LQzRMqheRXafC+l+O4L1f7U/6KZCMcLARz9DRqsOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716237715; a=rsa-sha256; cv=none; b=rO9IOgwXaSjN3/43d5paPt87niB04N36jcJG2YUb0kA8xZN6B1HNBWw4EurxiQDepp5/Ql LC4cV62tM4XM+QpReI5anbUbXvzxPy7Ww+U1pr/Q82IkLwwwWc5TajRzKbbLndwlk41qHh DPgwz9aGhsKu4ckA+X0oUPKFKqU6r+QjGjpJZFdIyhSzTg0FaDwkHfXOovTnnRZIuaSTtJ cxlqARY2KPhROm3pAXaiJOrjdhMhgaJvjapswnCAJ1C1thZm29MUQ0vULEzbLPdgVwEKGP hpGSCoqBALpkED+KagVm4bSPlI+6xdZf6NmUZa4wgjUoAXZ5CIzjgm+LAnl0tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716237715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XxCdL/p5k1l1rRFthgtZTnMBRNl2zD48FRLQRzHfT3E=; b=OIBHNCPkIrsyNennq4sGMaIbptq7PbDR+xrfnPMLsePo9NyPWuIp8+2QU1lQP0IccrjLre v0rwK4WrUmuEfEunvb31d3aQ8TbMjxQa82smpowzYZ/HraTjo9tCaWRCoXcGaY8aUyJnIx v3wCYatwF+ntSGEOZu1VTWJD70YC78/oAlTA26D+hpfW0Gu/Yjk0l9z7c4B3JrQQBilS4y FS9aNWDKGM339r+gYtWzsMAFNhKS0bK3dfzbvTAzlcHUw5Bjqt6x4P1M1n7TKH8U+jyTHs SQ+xtSObO8doOsHrPdK/Fhr9IDr+nN3DTe6wXHx3rHU/J2Ob5R2we/sYDzeriw== 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 4VjqHR3lJSzsy8; Mon, 20 May 2024 20:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KKftdw073556; Mon, 20 May 2024 20:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KKfsFV073553; Mon, 20 May 2024 20:41:54 GMT (envelope-from git) Date: Mon, 20 May 2024 20:41:54 GMT Message-Id: <202405202041.44KKfsFV073553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 7a2bb28f8e6d - stable/14 - unbound: Vendor import 1.20.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a2bb28f8e6d85ab82712d0f37261f388fbf7775 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7a2bb28f8e6d85ab82712d0f37261f388fbf7775 commit 7a2bb28f8e6d85ab82712d0f37261f388fbf7775 Author: Cy Schubert AuthorDate: 2024-05-10 20:56:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 20:39:57 +0000 unbound: Vendor import 1.20.0 Release notes at https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/ Security: The DNSBomb vulnerability CVE-2024-33655 Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main (cherry picked from commit 335c7cda12138f2aefa41fb739707612cc12a9be) --- contrib/unbound/Makefile.in | 16 +- contrib/unbound/{ac_pkg_swig.m4 => ax_pkg_swig.m4} | 110 +- contrib/unbound/ax_pthread.m4 | 444 +- contrib/unbound/cachedb/cachedb.c | 133 +- contrib/unbound/cachedb/cachedb.h | 16 + contrib/unbound/config.h.in | 105 +- contrib/unbound/configure | 12872 +++++---- contrib/unbound/configure.ac | 16 +- contrib/unbound/configure~ | 26616 +++++++++++++++++++ contrib/unbound/contrib/rc_d_unbound | 9 + contrib/unbound/contrib/unbound.init | 1 + contrib/unbound/contrib/unbound.init_fedora | 1 + contrib/unbound/contrib/unbound.init_yocto | 1 + contrib/unbound/daemon/cachedump.c | 23 +- contrib/unbound/daemon/daemon.c | 26 +- contrib/unbound/daemon/remote.c | 130 +- contrib/unbound/daemon/unbound.c | 39 +- contrib/unbound/daemon/worker.c | 35 +- contrib/unbound/doc/Changelog | 187 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf.in | 28 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 6 +- contrib/unbound/doc/unbound-control.8.in | 8 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 72 +- contrib/unbound/doc/unbound.doxygen | 2931 +- contrib/unbound/edns-subnet/subnetmod.c | 40 +- contrib/unbound/iterator/iter_fwd.c | 119 +- contrib/unbound/iterator/iter_fwd.h | 60 +- contrib/unbound/iterator/iter_hints.c | 95 +- contrib/unbound/iterator/iter_hints.h | 54 +- contrib/unbound/iterator/iter_utils.c | 62 +- contrib/unbound/iterator/iter_utils.h | 6 +- contrib/unbound/iterator/iterator.c | 295 +- contrib/unbound/libunbound/context.c | 8 + contrib/unbound/libunbound/libunbound.c | 5 + contrib/unbound/libunbound/libworker.c | 21 +- contrib/unbound/services/authzone.c | 10 + contrib/unbound/services/cache/dns.c | 52 +- contrib/unbound/services/cache/infra.c | 170 +- contrib/unbound/services/cache/infra.h | 28 + contrib/unbound/services/cache/rrset.c | 87 + contrib/unbound/services/cache/rrset.h | 31 + contrib/unbound/services/listen_dnsport.c | 51 +- contrib/unbound/services/listen_dnsport.h | 8 +- contrib/unbound/services/localzone.c | 6 +- contrib/unbound/services/mesh.c | 106 +- contrib/unbound/services/mesh.h | 6 + contrib/unbound/services/rpz.c | 342 +- contrib/unbound/services/rpz.h | 8 + contrib/unbound/services/view.h | 3 +- contrib/unbound/smallapp/unbound-anchor.c | 70 +- contrib/unbound/smallapp/unbound-checkconf.c | 13 +- contrib/unbound/smallapp/unbound-control.c | 5 +- contrib/unbound/testdata/cachedb_expired.crpl | 324 + .../testdata/cachedb_expired_client_timeout.crpl | 343 + .../testdata/cachedb_expired_reply_ttl.crpl | 259 + .../unbound/testdata/cachedb_subnet_change.crpl | 304 + .../unbound/testdata/cachedb_subnet_expired.crpl | 322 + .../testdata/cachedb_subnet_toecs_timeout.crpl | 229 + contrib/unbound/testdata/iter_dname_ttl.rpl | 39 - .../testdata/iter_ghost_grandchild_delegation.rpl | 256 + contrib/unbound/testdata/local_cnameother.rpl | 67 + contrib/unbound/testdata/rpz_clientip_override.rpl | 269 + contrib/unbound/testdata/rpz_cname_handle.rpl | 779 + contrib/unbound/testdata/rpz_nsdname_override.rpl | 325 + contrib/unbound/testdata/rpz_nsip_override.rpl | 332 + contrib/unbound/testdata/rpz_passthru_clientip.rpl | 90 + contrib/unbound/testdata/rpz_qtype_cname.rpl | 120 + .../testdata/rpz_reload.tdir/example.org.zone | 2 + .../testdata/rpz_reload.tdir/rpz.example.com.zone | 6 + .../testdata/rpz_reload.tdir/rpz_reload.conf | 30 + .../testdata/rpz_reload.tdir/rpz_reload.dsc | 16 + .../testdata/rpz_reload.tdir/rpz_reload.post | 12 + .../testdata/rpz_reload.tdir/rpz_reload.pre | 26 + .../testdata/rpz_reload.tdir/rpz_reload.test | 109 + contrib/unbound/testdata/subnet_cached_size.crpl | 308 + contrib/unbound/testdata/ttl_max_negative.rpl | 206 + contrib/unbound/testdata/ttl_min_negative.rpl | 204 + contrib/unbound/testdata/val_cnameqtype_qmin.rpl | 784 + contrib/unbound/testdata/val_dnameqtype.rpl | 689 + contrib/unbound/testdata/val_dnameqtype_qmin.rpl | 859 + contrib/unbound/util/config_file.c | 39 + contrib/unbound/util/config_file.h | 19 + contrib/unbound/util/configlexer.c | 8195 +++--- contrib/unbound/util/configlexer.lex | 7 + contrib/unbound/util/configparser.c | 4502 ++-- contrib/unbound/util/configparser.h | 508 +- contrib/unbound/util/configparser.y | 83 +- contrib/unbound/util/data/msgparse.h | 2 + contrib/unbound/util/data/msgreply.c | 33 +- contrib/unbound/util/module.c | 11 +- contrib/unbound/util/module.h | 18 +- contrib/unbound/util/net_help.c | 36 +- contrib/unbound/util/netevent.c | 8 +- contrib/unbound/util/netevent.h | 2 + contrib/unbound/util/storage/lookup3.c | 2 +- contrib/unbound/util/storage/lruhash.c | 34 + contrib/unbound/util/storage/lruhash.h | 11 + contrib/unbound/util/storage/slabhash.c | 7 + contrib/unbound/util/storage/slabhash.h | 12 + contrib/unbound/validator/val_utils.c | 40 +- contrib/unbound/validator/validator.c | 36 +- lib/libunbound/config.h | 6 +- 107 files changed, 53017 insertions(+), 13503 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index 22fb75c123bd..f30ca81a84f8 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -1278,7 +1278,8 @@ daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/edns.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h \ $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/respip/respip.h \ - $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h + $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ @@ -1355,7 +1356,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h + $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h $(srcdir)/daemon/worker.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h @@ -1428,7 +1429,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h $(srcdir)/services/authzone.h \ $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h \ - $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h $(srcdir)/util/storage/slabhash.h $(srcdir)/daemon/daemon.h lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ @@ -1484,7 +1485,8 @@ context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbou $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h + $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1496,7 +1498,8 @@ libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbou $(srcdir)/sldns/sbuffer.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h + $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1510,8 +1513,7 @@ libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/li $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/sldns/str2wire.h + $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ diff --git a/contrib/unbound/ac_pkg_swig.m4 b/contrib/unbound/ax_pkg_swig.m4 similarity index 55% rename from contrib/unbound/ac_pkg_swig.m4 rename to contrib/unbound/ax_pkg_swig.m4 index 87f99fb2fe98..7a4196ff5dff 100644 --- a/contrib/unbound/ac_pkg_swig.m4 +++ b/contrib/unbound/ax_pkg_swig.m4 @@ -1,39 +1,43 @@ # =========================================================================== -# http://autoconf-archive.cryp.to/ac_pkg_swig.html +# https://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html # =========================================================================== # # SYNOPSIS # -# AC_PROG_SWIG([major.minor.micro]) +# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) # # DESCRIPTION # -# This macro searches for a SWIG installation on your system. If found you -# should call SWIG via $(SWIG). You can use the optional first argument to -# check if the version of the available SWIG is greater than or equal to -# the value of the argument. It should have the format: N[.N[.N]] (N is a -# number between 0 and 999. Only the first N is mandatory.) +# This macro searches for a SWIG installation on your system. If found, +# then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is +# found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd. # -# If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that -# the swig package is this version number or higher. +# You can use the optional first argument to check if the version of the +# available SWIG is greater than or equal to the value of the argument. It +# should have the format: N[.N[.N]] (N is a number between 0 and 999. Only +# the first N is mandatory.) If the version argument is given (e.g. +# 1.3.17), AX_PKG_SWIG checks that the swig package is this version number +# or higher. # -# In configure.in, use as: -# -# AC_PROG_SWIG(1.3.17) -# SWIG_ENABLE_CXX -# SWIG_MULTI_MODULE_SUPPORT -# SWIG_PYTHON +# As usual, action-if-found is executed if SWIG is found, otherwise +# action-if-not-found is executed. # -# LAST MODIFICATION +# In configure.in, use as: # -# 2008-04-12 +# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) +# AX_SWIG_ENABLE_CXX +# AX_SWIG_MULTI_MODULE_SUPPORT +# AX_SWIG_PYTHON # -# COPYLEFT +# LICENSE # # Copyright (c) 2008 Sebastian Huber -# Copyright (c) 2008 Alan W. Irwin +# Copyright (c) 2008 Alan W. Irwin # Copyright (c) 2008 Rafael Laboissiere -# Copyright (c) 2008 Andrew Collier +# Copyright (c) 2008 Andrew Collier +# Copyright (c) 2011 Murray Cumming +# Copyright (c) 2018 Reini Urban +# Copyright (c) 2021 Vincent Danjean # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -46,7 +50,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -57,17 +61,21 @@ # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. -AC_DEFUN([AC_PROG_SWIG],[ - AC_PATH_PROG([SWIG],[swig]) +#serial 15 + +AC_DEFUN([AX_PKG_SWIG],[ + # Find path to the "swig" executable. + AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) if test -z "$SWIG" ; then - AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' - elif test -n "$1" ; then - AC_MSG_CHECKING([for SWIG version]) + m4_ifval([$3],[$3],[:]) + elif test -z "$1" ; then + m4_ifval([$2],[$2],[:]) + else + AC_MSG_CHECKING([SWIG version]) [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] AC_MSG_RESULT([$swig_version]) if test -n "$swig_version" ; then @@ -77,12 +85,12 @@ AC_DEFUN([AC_PROG_SWIG],[ if test -z "$required_major" ; then [required_major=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_minor=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_minor" ; then [required_minor=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_patch=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_patch" ; then [required_patch=0] @@ -103,30 +111,28 @@ AC_DEFUN([AC_PROG_SWIG],[ if test -z "$available_patch" ; then [available_patch=0] fi - [badversion=0] - if test $available_major -lt $required_major ; then - [badversion=1] - fi - if test $available_major -eq $required_major \ - -a $available_minor -lt $required_minor ; then - [badversion=1] - fi - if test $available_major -eq $required_major \ - -a $available_minor -eq $required_minor \ - -a $available_patch -lt $required_patch ; then - [badversion=1] - fi - if test $badversion -eq 1 ; then - AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' + # Convert the version tuple into a single number for easier comparison. + # Using base 100 should be safe since SWIG internally uses BCD values + # to encode its version number. + required_swig_vernum=`expr $required_major \* 10000 \ + \+ $required_minor \* 100 \+ $required_patch` + available_swig_vernum=`expr $available_major \* 10000 \ + \+ $available_minor \* 100 \+ $available_patch` + + if test $available_swig_vernum -lt $required_swig_vernum; then + AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.]) + SWIG='' + m4_ifval([$3],[$3],[]) else - AC_MSG_NOTICE([SWIG executable is '$SWIG']) - SWIG_LIB=`$SWIG -swiglib` - AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB']) + AC_MSG_CHECKING([for SWIG library]) + SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '` + AC_MSG_RESULT([$SWIG_LIB]) + m4_ifval([$2],[$2],[]) fi else AC_MSG_WARN([cannot determine SWIG version]) - SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' + SWIG='' + m4_ifval([$3],[$3],[]) fi fi AC_SUBST([SWIG_LIB]) diff --git a/contrib/unbound/ax_pthread.m4 b/contrib/unbound/ax_pthread.m4 index ff7d2a67e11f..9f35d139149f 100644 --- a/contrib/unbound/ax_pthread.m4 +++ b/contrib/unbound/ax_pthread.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS @@ -14,24 +14,28 @@ # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with +# but also to link with them as well. For example, you might link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # -# If you are only building threads programs, you may wish to use these +# If you are only building threaded programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # PTHREAD_PRIO_INHERIT symbol is defined when compiling with @@ -55,6 +59,7 @@ # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -67,7 +72,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -82,35 +87,41 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 21 +#serial 31 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). +# requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) AC_MSG_RESULT([$ax_pthread_ok]) - if test x"$ax_pthread_ok" = xno; then + if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different @@ -118,12 +129,14 @@ fi # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -132,82 +145,163 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case ${host_os} in +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" ;; - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" + aix*) + ax_pthread_check_macro="_THREAD_SAFE" ;; -esac -# Clang doesn't consider unrecognized options an error unless we specify -# -Werror. We throw in some extra Clang-specific options to ensure that -# this doesn't happen for GCC, which also accepts -Werror. + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) -AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) -save_CFLAGS="$CFLAGS" -ax_pthread_extra_flags="-Werror" -CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], - [AC_MSG_RESULT([yes])], - [ax_pthread_extra_flags= - AC_MSG_RESULT([no])]) -CFLAGS="$save_CFLAGS" -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do - case $flag in + case $ax_pthread_try_flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - if test x"$ax_pthread_config" = xno; then continue; fi + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we @@ -218,8 +312,18 @@ for flag in $ax_pthread_flags; do # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include - static void routine(void *a) { *((int*)a) = 0; } +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } static void *start_routine(void *a) { return a; }], [pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); @@ -227,101 +331,187 @@ for flag in $ax_pthread_flags; do pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) + [ax_pthread_ok=yes], + []) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" AC_MSG_RESULT([$ax_pthread_ok]) - if test "x$ax_pthread_ok" = xyes; then - break; - fi + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + # Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $attr; return attr /* ; */])], - [attr_name=$attr; break], - []) - done - AC_MSG_RESULT([$attr_name]) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - # TODO: What about Clang on Solaris? - flag="-mt -D_REENTRANT" - fi - ;; - esac - AC_MSG_RESULT([$flag]) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then + if test "x$GCC" != "xyes"; then case $host_os in aix*) AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" AC_SUBST([PTHREAD_LIBS]) AC_SUBST([PTHREAD_CFLAGS]) AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then +if test "x$ax_pthread_ok" = "xyes"; then ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) : else diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index b912be8ed54f..95ac28904693 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -50,6 +50,8 @@ #include "util/data/msgreply.h" #include "util/data/msgencode.h" #include "services/cache/dns.h" +#include "services/mesh.h" *** 83295 LINES SKIPPED *** From nobody Mon May 20 21:16:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjr362RCkz5LTfw; Mon, 20 May 2024 21:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjr361wwCz4WNZ; Mon, 20 May 2024 21: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=1716239778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+Nt9HRV6ytAzUrxpDqcHr0jYaleHpSuI4qPvgVTNns=; b=UzgXf5u+qQn+CoPlpnB59d5P1SMmRQS0osj3Mmrh/w5384czBGIbnlv32YinyKLESyxK7+ RM3zYUZhKQe7H8LpRwhaj9DjpKj9GU5QqXgU8NeSUsRgzMhu4x0RrQqVjym+7joi99P83l o5v1eGbtQibWW/EheQaLIc1TkysvBb0nj5fdHV5uI3UQpNH2kv0N5dbGmRGWqSeLfay7Ay TimZQrpfgJMRNkZIOyphz0DNuqjogyvEWb9oUGTyl9Od6uYPOTwajcIxUB69gWCVT+DZ1o 4kz3YTig7E2r3VpB/fMpUWGfyZhEGUY4OIUBzTnyyKXMe8svCmq4BX1zuB34lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716239778; a=rsa-sha256; cv=none; b=xzqfqd8eVk/1XrFwLQT3/B+Nk1l1PC45vRDV8HZDd8ey2QRnYR7+nIcR/8u30Twnj1Qdro 34+Vp4VF58TAZkzJvMd/8ecZED0wLuzF0Fn4WP8XTmgB1h2wWmLmMcpukheZEqwft1WbWj g3ScaRB5EWvazKawBc15FaQXzMQNAOrzawqffNzenw/ws4Va2QD55h7qhzTzzRNTXJRLmd PwPuNv/0go4pI3wUGlif0ps0BmG0tnvmwxpi0pLbqgAHi3OCC4t6f3A1SxpyiaUYPQZ4LA AvkNQ38o8D4564Ih2DltfA284Hm/2Jx5jXMIvPXRHJ4ROxmVrUUEbH9oPtOUbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716239778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+Nt9HRV6ytAzUrxpDqcHr0jYaleHpSuI4qPvgVTNns=; b=JpwTRABv+JHS9OWsuv5kdtxTwMhNhWZfdje2PiVgnQcd2rRz7YZjMECCrOh4S6XNlIx4Fl /drLCCjYWQGO5/WZAZz6qPKvMOTsg4XrZN9zQIa2cTyUGfY7PPVvhTNKf0y9ckpiFncyxb pCr5qbkpDp460HBbq9fnCuLcyg+4GFnmMMD6CHJtLEBO4yZci4ZoVbIYPMZRU051rXxlhQ NhTkoN+s+QLKNmcAOFvvHXpji/BZPUR2fCCWsVTDos13XxMp4EzuUBZK0aaffRAFxkJDuL vfxnFIruKVXQWtgTNwmraT8HeQ6bJC/TVeKgmPQFcTUVmYMpIIypvHuh/uN+ag== 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 4Vjr361QnXztq3; Mon, 20 May 2024 21:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KLGI4h025517; Mon, 20 May 2024 21:16:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KLGIut025514; Mon, 20 May 2024 21:16:18 GMT (envelope-from git) Date: Mon, 20 May 2024 21:16:18 GMT Message-Id: <202405202116.44KLGIut025514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 7ad17751074c - stable/14 - msun/riscv: expose fe{disable,enable}except List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ad17751074ca79a89ca503f5ac647819579e858 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=7ad17751074ca79a89ca503f5ac647819579e858 commit 7ad17751074ca79a89ca503f5ac647819579e858 Author: Brooks Davis AuthorDate: 2024-03-21 23:45:53 +0000 Commit: Brooks Davis CommitDate: 2024-05-20 20:49:06 +0000 msun/riscv: expose fe{disable,enable}except This is required for GCC to build. PR: 272759 Reported by: dgilbert@eicat.ca Submitted by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44333 (cherry picked from commit 1947a9383ec3a048e334022365aa199a6ae55289) --- lib/msun/riscv/Symbol.map | 10 ++++------ lib/msun/riscv/fenv.h | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/msun/riscv/Symbol.map b/lib/msun/riscv/Symbol.map index 2bc6215688bb..c3d72443cb2c 100644 --- a/lib/msun/riscv/Symbol.map +++ b/lib/msun/riscv/Symbol.map @@ -1,15 +1,13 @@ -/* - */ -FBSD_1.0 { -}; - FBSD_1.3 { fesetexceptflag; feraiseexcept; fegetenv; feholdexcept; feupdateenv; + fegetexcept; +}; + +FBSD_1.8 { feenableexcept; fedisableexcept; - fegetexcept; }; diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h index 1971e976645c..36abb7b00b7d 100644 --- a/lib/msun/riscv/fenv.h +++ b/lib/msun/riscv/fenv.h @@ -216,14 +216,12 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE -/* We currently provide no external definitions of the functions below. */ - #ifdef __riscv_float_abi_soft int feenableexcept(int __mask); int fedisableexcept(int __mask); int fegetexcept(void); #else -static inline int +__fenv_static inline int feenableexcept(int __mask __unused) { @@ -232,7 +230,7 @@ feenableexcept(int __mask __unused) return (0); } -static inline int +__fenv_static inline int fedisableexcept(int __mask __unused) { @@ -241,6 +239,7 @@ fedisableexcept(int __mask __unused) return (0); } +/* We currently provide no external definition of fegetexcept(). */ static inline int fegetexcept(void) { From nobody Mon May 20 22:24:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjsYX3Fycz5LcyS; Mon, 20 May 2024 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjsYX2nhwz4gKl; Mon, 20 May 2024 22:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716243856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HEeUKU1vJ5NZ3e13YlkMAwmpk5wSXG156ZzlpXWQeoM=; b=ZPAkk502p+HMFEgTcIhdcm9HaNmHUkE9DW+QHFkM8qL52j+t/O/0I1kS4R1ayotbKEvaiA QYA9QM93Jm2z3p+MgoGUYFCy2r8i1GM7VLRfyQ2pF8SjN6pl4KOFtjxzJ52/TNcy7wBmjv EWRIzoLXaueZpL7Kz2ly6sy1ziDfdhbvEsud3Jdr+ABINNl1tQpJF4s+zCx5RPtLuKSR/5 HpXMzSZL6rHQYW6I1MAe6IBAlH+tx33NBP4Pgf2s6ewLwaMkVXO6/yKgrUlMmX7mB2iX9z OtJPidQ3gdPvyMi/zrpcsvcR5U51IB8dv/dbN3ozOU1LUIjztIr18yPU6ULy3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716243856; a=rsa-sha256; cv=none; b=Px6OSiH0ahwHdbpVIMN27kfn7YDOlHhUZ/nYr8UUDU3hG+esBGp27q5KdEfp4MJcRHyfMJ 8uxQ6QnFO6euoKm3vHmYj57kET2OQ7xhmT5kMQNbBj5u++BcUQNiLwW+2N89PX+US4cbT7 SR7eAU27VKRDFiEmJ51kMtSxX8FZ/5mwlwEycCLV4Vtuxz22FbpftRkckFIbj87ioq9zp6 PYGveUHWqfEXwnu/vIjvpstXqg5Flvxv9e0NF0hmPy/SrmYWnQYDsaV+Voeq/PESqvmRdY /ztzbsyoOD5QyokmCXTbUygmcqNPUKsBcOq2lkoHY8zIMmwhPiLy3MMZ1AqmwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716243856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HEeUKU1vJ5NZ3e13YlkMAwmpk5wSXG156ZzlpXWQeoM=; b=GgMoC6cXepdSbS1YBqWI/+ZbKTWP4z+JewadzOHuiDLgf6tIxQ+brF1MmPSDIpD4iigN56 vzMuktzO0x0cIJm1YZlZD4/lOBoE4sVJdqoPb+6w+FIgbTF0WNledazxQvaPkLp07ZlC0I sffS9MLa0kxMiCWBkytdwetaZHpw0LG2MdyTTaXUFr3CHdr96MHzTZ3UdqXdUxsUx38WyL WguJSG+i9AUdBRHCziN0rq81TiyFIGRLJ3FYFi2B+q9tJQk6QI7q48sKMByXUR09Fqwq2o mFb+BgyfjE4/GDg/qa7vGRI8gQwrvnDSceF8AyVL4/9IwaAOGqY6jjekBBDowg== 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 4VjsYX2PlPzwrj; Mon, 20 May 2024 22:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44KMOGn0044559; Mon, 20 May 2024 22:24:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KMOGxt044556; Mon, 20 May 2024 22:24:16 GMT (envelope-from git) Date: Mon, 20 May 2024 22:24:16 GMT Message-Id: <202405202224.44KMOGxt044556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 07f986601620 - releng/14.1 - msun/riscv: expose fe{disable,enable}except List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 07f986601620e6edee11a7000af681c1cc135403 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=07f986601620e6edee11a7000af681c1cc135403 commit 07f986601620e6edee11a7000af681c1cc135403 Author: Brooks Davis AuthorDate: 2024-03-21 23:45:53 +0000 Commit: Brooks Davis CommitDate: 2024-05-20 22:23:30 +0000 msun/riscv: expose fe{disable,enable}except This is required for GCC to build. PR: 272759 Reported by: dgilbert@eicat.ca Approved by: re (cperciva) Submitted by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44333 (cherry picked from commit 1947a9383ec3a048e334022365aa199a6ae55289) (cherry picked from commit 7ad17751074ca79a89ca503f5ac647819579e858) --- lib/msun/riscv/Symbol.map | 10 ++++------ lib/msun/riscv/fenv.h | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/msun/riscv/Symbol.map b/lib/msun/riscv/Symbol.map index 2bc6215688bb..c3d72443cb2c 100644 --- a/lib/msun/riscv/Symbol.map +++ b/lib/msun/riscv/Symbol.map @@ -1,15 +1,13 @@ -/* - */ -FBSD_1.0 { -}; - FBSD_1.3 { fesetexceptflag; feraiseexcept; fegetenv; feholdexcept; feupdateenv; + fegetexcept; +}; + +FBSD_1.8 { feenableexcept; fedisableexcept; - fegetexcept; }; diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h index 1971e976645c..36abb7b00b7d 100644 --- a/lib/msun/riscv/fenv.h +++ b/lib/msun/riscv/fenv.h @@ -216,14 +216,12 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE -/* We currently provide no external definitions of the functions below. */ - #ifdef __riscv_float_abi_soft int feenableexcept(int __mask); int fedisableexcept(int __mask); int fegetexcept(void); #else -static inline int +__fenv_static inline int feenableexcept(int __mask __unused) { @@ -232,7 +230,7 @@ feenableexcept(int __mask __unused) return (0); } -static inline int +__fenv_static inline int fedisableexcept(int __mask __unused) { @@ -241,6 +239,7 @@ fedisableexcept(int __mask __unused) return (0); } +/* We currently provide no external definition of fegetexcept(). */ static inline int fegetexcept(void) { From nobody Tue May 21 00:05:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vjvnr6pFCz5LpXy; Tue, 21 May 2024 00:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vjvnr4LL0z4rQd; Tue, 21 May 2024 00:05:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716249904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k9Jcu3iIDnptLij/DCf4rB/aU0zkU8pkFrrX4yDqvu8=; b=o+UpIpgAzXIkj6u9RrqTmYRR5yREAZz9WOnuenBmOXcy/LTPme1fWjjnK/g1aA5msvdcwe eUP177lJ/71NQXM8XsuPEux6YhwpP051FyTGp4a6w+zqIhOiISlBHe+intwE6pWQaOiAEb agdDVMsY8q9e49BHYrKGWz8x4FIPjsO/HaXnCbJvU8YhGgtvz7CtsPRLY/G5iAKpcRc0rA bYU/qxoJjtg09D6J22+huyLBwABnC1mmQd7T1m+UwLXASxpfc6aH49whUuAvSEENmum1Lm IkJu16jP1QT1UcCm/9ZWvHFzCXFHCStrV5CCAFI6+8iPpcErSjoEbtfv9Mhhgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716249904; a=rsa-sha256; cv=none; b=M5LCaP8IIyOHkT+bmrCu7z1/onpCKHM1drVAO989F0/FUvEYJvP0u1M1eu5N6FQlBA0Grq feAuuwX5KLAENb/iT9suBmi0FTfuKcf7eBCuQi1eSQnItgRz7Qv2LrmXSFZYWW6QzSP1Mo TEnjQ4+Emn2VPrephQRb2tauBe4E5YJpS3lsnwx+s4rlDcYAWX8dZ7HWBz1/M+crRzSQgi W16huCJxP16NwGpNq0uMzF/liki5+arLytW/FoibBf8dxLhaHfwA0ApE9Xv4muRpNeRsV0 ir82VTAcgUZPJhymSKYVZToS+/lI06OBEkIiycVLpnBjRZxetyZMqtYY5ZWpyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716249904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k9Jcu3iIDnptLij/DCf4rB/aU0zkU8pkFrrX4yDqvu8=; b=ahztL0upWtz7XmxwPWiWJu/+BIX7BEALqQIP3/NSFK1V9FI9IIGpPnBV5cFUcIRXNGwdwY oh2mao6krqHRIyJX5zlxN20Js8LIH2vQIA4alevpbSoMoxegyLmU7GAjSNW0hl7jbRSrCh tWMlMtEMwhN+YxPYCkStDlY4s4olbbupUAmRsy3995rszjaQF46tpkS/c450A+xh9rTpHW Du76pcUigIxDZEJrYHeqVdG3p714RbEHFlArzPWuIYRFc1ydouwSb0RKmFmls0smhUt/GG uhYt5FFNlHXCFjwtK24rMlOTBxSU/TI+G39ZuOYD0hUezB64OuTKdzaZEfKlcA== 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 4Vjvnr3xsmz10DS; Tue, 21 May 2024 00:05:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L054vO013413; Tue, 21 May 2024 00:05:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L054hg013410; Tue, 21 May 2024 00:05:04 GMT (envelope-from git) Date: Tue, 21 May 2024 00:05:04 GMT Message-Id: <202405210005.44L054hg013410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 364133901a8d - stable/13 - msun/riscv: expose fe{disable,enable}except List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 364133901a8dcd228e975e88ded0c3f624992150 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=364133901a8dcd228e975e88ded0c3f624992150 commit 364133901a8dcd228e975e88ded0c3f624992150 Author: Brooks Davis AuthorDate: 2024-03-21 23:45:53 +0000 Commit: Brooks Davis CommitDate: 2024-05-20 22:26:02 +0000 msun/riscv: expose fe{disable,enable}except This is required for GCC to build. PR: 272759 Reported by: dgilbert@eicat.ca Submitted by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44333 (cherry picked from commit 1947a9383ec3a048e334022365aa199a6ae55289) --- lib/msun/riscv/Symbol.map | 10 ++++------ lib/msun/riscv/fenv.h | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/msun/riscv/Symbol.map b/lib/msun/riscv/Symbol.map index 2bc6215688bb..c3d72443cb2c 100644 --- a/lib/msun/riscv/Symbol.map +++ b/lib/msun/riscv/Symbol.map @@ -1,15 +1,13 @@ -/* - */ -FBSD_1.0 { -}; - FBSD_1.3 { fesetexceptflag; feraiseexcept; fegetenv; feholdexcept; feupdateenv; + fegetexcept; +}; + +FBSD_1.8 { feenableexcept; fedisableexcept; - fegetexcept; }; diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h index 1971e976645c..36abb7b00b7d 100644 --- a/lib/msun/riscv/fenv.h +++ b/lib/msun/riscv/fenv.h @@ -216,14 +216,12 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE -/* We currently provide no external definitions of the functions below. */ - #ifdef __riscv_float_abi_soft int feenableexcept(int __mask); int fedisableexcept(int __mask); int fegetexcept(void); #else -static inline int +__fenv_static inline int feenableexcept(int __mask __unused) { @@ -232,7 +230,7 @@ feenableexcept(int __mask __unused) return (0); } -static inline int +__fenv_static inline int fedisableexcept(int __mask __unused) { @@ -241,6 +239,7 @@ fedisableexcept(int __mask __unused) return (0); } +/* We currently provide no external definition of fegetexcept(). */ static inline int fegetexcept(void) { From nobody Tue May 21 02:46:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjzN72blgz5Kgdr; Tue, 21 May 2024 02:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjzN7260jz58bL; Tue, 21 May 2024 02:46:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVls2LDqjIE/FSlYCVXlSfU97Jsbuz1rG8C4aXvH1PY=; b=XwQCEK3eBw41rI2YQSUKK2f0p796rwmRJCWKnldwfeLiO7mJoTgtDyQz/exWMh7FRfDH7q PHHL9rtVTX1FRHf9qm0/tGzvdUdOs5/+Wn+OrWncy6Z9Q7EBEjAqXUkg1vNkm3kIHEGUik Q08k6aywcViRVNtZdREEarFzFPdcj1KOXSXbeOwH+V4gcOrizd9V1iUFLu+mUJX6oCnWjA l7uTY9y4GUwRvU17G61m4PAgktvjbjGf6An+hobvxzmN73pbTDvcQe9zaT5fUOeKiHWK9r 8IW1IXMIHbOVIL1jT3rxUHFN15bp0WnQiA3RIf1FDZwAfVmDcek2Aawb6bcFMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716259591; a=rsa-sha256; cv=none; b=prZP3cOTS/yBtbl9J4oAaOOE0bjmO5S8aqKlFqqEi9Oh5hcqjnxQX3ZAzncqwjksE28TnI xMK7NXqjJZ5DpOFSgSHs/7iJXgdgzf431nn5Jorg3azwcPLvxvNtp2enPw1hzpDoWPLqoq IdJ0THQEQaAO3R3CnjENzK+na/+eF7N4+CZoZ/0hkCbHs3+jFa1FASLcRnJuouChP2TC2U FnPvDd323/GqEYsTHeO1cQViN40JoaczufjG1awJgsaBZjkzgK1sajLgtcWr0C2C6jj66S XsJeiGCRy+/2EqaiuiabL4iDFNUxgTgqIzDw352vdkiIrt2/3a4DzFYq3F1P7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVls2LDqjIE/FSlYCVXlSfU97Jsbuz1rG8C4aXvH1PY=; b=qLUO5OVkrobY6eizT3H/SUQcM7egmFHK1gr9vzBql05XG1v47FWRXdSeYvNaMzVcN6+izw eZer0uKoON6cqQ/t0WVKqYZBH8cS4tKU+yY2BCyB78Ob4FPMiO05dNA/oUdC2AOvJ4xd76 r0eIgbK9cid7FVot07yiyZVGma3vj4rvRo47jIXeRvgLJSLT/mGITa5hSbDO6LxpURystW BhlTmOcCbXdrUB6EnKKq8fIiXxHB7qYP4BknFzu4skeflxq6zHiTN4WCLGU6X5sPUtTofU RVPrtwAZvW0uMQVQH+SQixoIO6M5t4r8yf/2YQW52lFbKHJv1r2/ED5LQg4fKQ== 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 4VjzN71Z1Sz14Cb; Tue, 21 May 2024 02:46:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L2kVN4082623; Tue, 21 May 2024 02:46:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L2kVCb082620; Tue, 21 May 2024 02:46:31 GMT (envelope-from git) Date: Tue, 21 May 2024 02:46:31 GMT Message-Id: <202405210246.44L2kVCb082620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 983aec544b03 - stable/14 - x86: Add Intel TD/HFI related MSR/CPUID defines to specialregs.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 983aec544b0300ad006b03d89c5a7f54bca06aa1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=983aec544b0300ad006b03d89c5a7f54bca06aa1 commit 983aec544b0300ad006b03d89c5a7f54bca06aa1 Author: Koine Yuusuke AuthorDate: 2024-05-06 02:17:29 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-21 02:45:59 +0000 x86: Add Intel TD/HFI related MSR/CPUID defines to specialregs.h (cherry picked from commit 338d53965d9f4bfb1a83c1bcff3ff78944ce3a9f) --- sys/x86/include/specialreg.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 4886430c84b6..f78e04c714f0 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -347,6 +347,13 @@ /* Ecx. */ #define CPUID_PERF_STAT 0x00000001 #define CPUID_PERF_BIAS 0x00000008 +#define CPUID_PERF_TD_CLASSES 0x0000ff00 + +/* Edx. */ +#define CPUID_HF_PERFORMANCE 0x00000001 +#define CPUID_HF_EFFICIENCY 0x00000002 +#define CPUID_TD_CAPABLITIES 0x0000000f +#define CPUID_TD_TBLPAGES 0x00000f00 /* * CPUID instruction 0xb ebx info. @@ -585,6 +592,8 @@ #define MSR_TURBO_RATIO_LIMIT 0x1ad #define MSR_TURBO_RATIO_LIMIT1 0x1ae #define MSR_IA32_ENERGY_PERF_BIAS 0x1b0 +#define MSR_IA32_PKG_THERM_STATUS 0x1b1 +#define MSR_IA32_PKG_THERM_INTERRUPT 0x1b2 #define MSR_DEBUGCTLMSR 0x1d9 #define MSR_LASTBRANCHFROMIP 0x1db #define MSR_LASTBRANCHTOIP 0x1dc @@ -768,6 +777,14 @@ #define TOPA_INT (1 << 2) #define TOPA_END (1 << 0) +/* + * Intel Hardware Feedback Interface / Thread Director MSRs + */ +#define MSR_IA32_HW_FEEDBACK_PTR 0x17d0 +#define MSR_IA32_HW_FEEDBACK_CONFIG 0x17d1 +#define MSR_IA32_THREAD_FEEDBACK_CHAR 0x17d2 +#define MSR_IA32_HW_FEEDBACK_THREAD_CONFIG 0x17d4 + /* * Constants related to MSR's. */ @@ -838,6 +855,19 @@ /* MSR IA32_ENERGY_PERF_BIAS */ #define IA32_ENERGY_PERF_BIAS_POLICY_HINT_MASK (0xfULL << 0) +/* MSR IA32_HW_FEEDBACK_PTR */ +#define IA32_HW_FEEDBACK_PTR_ENABLE (0x1ULL << 0) + +/* MSR IA32_HW_FEEDBACK_CONFIG */ +#define IA32_HW_FEEDBACK_CONFIG_EN_HFI (0x1ULL << 0) +#define IA32_HW_FEEDBACK_CONFIG_EN_THDIR (0x1ULL << 1) + +/* MSR IA32_PKG_THERM_STATUS */ +#define IA32_PKG_THERM_STATUS_HFI_UPDATED (0x1ULL << 26) + +/* MSR IA32_PKG_THERM_INTERRUPT */ +#define IA32_PKG_THERM_INTERRUPT_HFI_ENABLE (0x1ULL << 25) + /* * PAT modes. */ From nobody Tue May 21 02:46:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjzN84Df3z5Kgqp; Tue, 21 May 2024 02:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjzN82hKgz58gZ; Tue, 21 May 2024 02:46:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2XLbhcVvkizPv6/IWMyufRCFX/NUsLcN+S8Aw0qHuJg=; b=GcTPE3stVdGyKOcQl/4sWtkhz6D0WoM6GeU1+Um1g4/wOnZyctLXTGlV2oPJtN8g3WnSte 9tOQoddTr/SRmV+TY9sKBI0jaJtEmnlseuWl6Eszs2q8Av/tEYd7YFvQBjoRIqhE80mcM8 fZ/4HVnbzYdMWkidMHhd6rJ1cV8wPUMFF4Yx0EPFLAhQGQUZud4XlwiRnbOAQyskcPvV1o xnurjOK8YAfcSv/Ktg54hxulDRFoC4VyKxBvZ4bauR3jirrjlyAcpsoit7KBkckP+NDWJU yIMCgpB6tbDt96eay+UsN2zIMqMguLDkMJYqBfI/tuw09UaYCknWiBtfQzEG1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716259592; a=rsa-sha256; cv=none; b=UtV6XLCwsgr9Qm5biNk1RPNd7EIic4kWOBBnrgDUFDPrL0zfkAolo6qmwfIOtuwPiVbVVw 3mS921MnwFSYaVpYQWGYdDWlJdHawUsUA1YBfaXqzPE9XPJkpKzIcHR25frRsFTlEKS39s LaGIhIfvwDQxHK6yLPzmyR0FluBoARsX1tRteAY+6X1LYn5v31ce29klXk9jOICAPsj5ZK Iqo43GyJg6SrBrYZvMaivgoPOKzLJjCQ4sdeBKVgpcM1DWkwnd+lwSNXPP+64OwKlv0qHt r9cDH8afZQT9qS9Xn9YG89pMHoaDuo7UgCq+3oNWXSRB5PgZLgi/bK1C5sdNVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2XLbhcVvkizPv6/IWMyufRCFX/NUsLcN+S8Aw0qHuJg=; b=tLf97SoMOODMYjjfk5RTCK2RAORdt2GGg4tt8JgLRpvjoNI9MNhbvq1H5xHc8iAwhAbbrI wy3A505gctUvv3p3+itGbOJ8GWal3B4Gsf7dt1DbHibgo1NYE3PXd0eiNmANFykjuPGJBD 2pnje0Z7V4FVZd3cBPgN2pPwTkV4SfrocnQ47ua1n60jlVb4VhODqgGj7DQVeLJyhYyhgI cyOo742R8yiNZqb3CabgJYHp3n/H5kJxz79GmLcAiA6o2V8vJ8EVaP0MvI6xoxnmdEDiWu W5XA9gzsaT5dnk6QSd6B/M13lky66QMEZOZ8KTvcllwKOBMu0kMgAmjm5fVOnA== 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 4VjzN82JGVz13V5; Tue, 21 May 2024 02:46:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L2kWBP082677; Tue, 21 May 2024 02:46:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L2kWsx082674; Tue, 21 May 2024 02:46:32 GMT (envelope-from git) Date: Tue, 21 May 2024 02:46:32 GMT Message-Id: <202405210246.44L2kWsx082674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f03a01194c11 - stable/14 - AMD CPUs: update bits and data from CPUID 0x8000_0008 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f03a01194c112d356ef0067e2b367355b8e38d07 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f03a01194c112d356ef0067e2b367355b8e38d07 commit f03a01194c112d356ef0067e2b367355b8e38d07 Author: Konstantin Belousov AuthorDate: 2024-05-13 23:02:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-21 02:45:59 +0000 AMD CPUs: update bits and data from CPUID 0x8000_0008 (cherry picked from commit c6113ac5a2c2bfee875979ebd40a007ef4d60069) --- sys/x86/include/specialreg.h | 17 +++++++++++++++++ sys/x86/include/x86_var.h | 1 + sys/x86/x86/identcpu.c | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index f78e04c714f0..16aa07c05e65 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -399,21 +399,31 @@ #define AMDFEID_CLZERO 0x00000001 #define AMDFEID_IRPERF 0x00000002 #define AMDFEID_XSAVEERPTR 0x00000004 +#define AMDFEID_INVLPGB 0x00000008 #define AMDFEID_RDPRU 0x00000010 +#define AMDFEID_BE 0x00000040 #define AMDFEID_MCOMMIT 0x00000100 #define AMDFEID_WBNOINVD 0x00000200 #define AMDFEID_IBPB 0x00001000 +#define AMDFEID_INT_WBINVD 0x00002000 #define AMDFEID_IBRS 0x00004000 #define AMDFEID_STIBP 0x00008000 /* The below are only defined if the corresponding base feature above exists. */ #define AMDFEID_IBRS_ALWAYSON 0x00010000 #define AMDFEID_STIBP_ALWAYSON 0x00020000 #define AMDFEID_PREFER_IBRS 0x00040000 +#define AMDFEID_SAMEMODE_IBRS 0x00080000 +#define AMDFEID_NO_LMSLE 0x00100000 +#define AMDFEID_INVLPGB_NEST 0x00200000 #define AMDFEID_PPIN 0x00800000 #define AMDFEID_SSBD 0x01000000 /* SSBD via MSRC001_011F instead of MSR 0x48: */ #define AMDFEID_VIRT_SSBD 0x02000000 #define AMDFEID_SSB_NO 0x04000000 +#define AMDFEID_CPPC 0x08000000 +#define AMDFEID_PSFD 0x10000000 +#define AMDFEID_BTC_NO 0x20000000 +#define AMDFEID_IBPB_RET 0x40000000 /* * AMD extended function 8000_0008h ecx info @@ -422,6 +432,13 @@ #define AMDID_COREID_SIZE 0x0000f000 #define AMDID_COREID_SIZE_SHIFT 12 +/* + * AMD extended function 8000_0008h edx info + */ +#define AMDID_INVLPGB_MAXCNT 0x0000ffff +#define AMDID_RDPRU_SHIFT 16 +#define AMDID_RDPRU_ID 0xffff0000 + /* * CPUID instruction 7 Structured Extended Features, leaf 0 ebx info */ diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index f3677d84570b..f19c557e270b 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -57,6 +57,7 @@ extern u_int cpu_max_ext_state_size; extern u_int cpu_mxcsr_mask; extern u_int cpu_procinfo; extern u_int cpu_procinfo2; +extern u_int cpu_procinfo3; extern char cpu_vendor[]; extern char cpu_model[]; extern u_int cpu_vendor_id; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 9c82f9f8a882..7df20053a9d1 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -102,6 +102,7 @@ u_int cpu_exthigh; /* Highest arg to extended CPUID */ u_int cpu_id; /* Stepping ID */ u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */ u_int cpu_procinfo2; /* Multicore info */ +u_int cpu_procinfo3; char cpu_vendor[20]; /* CPU Origin code */ u_int cpu_vendor_id; /* CPU vendor ID */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ @@ -1085,19 +1086,29 @@ printcpuinfo(void) "\001CLZERO" "\002IRPerf" "\003XSaveErPtr" + "\004INVLPGB" "\005RDPRU" + "\007BE" "\011MCOMMIT" "\012WBNOINVD" "\015IBPB" + "\016INT_WBINVD" "\017IBRS" "\020STIBP" "\021IBRS_ALWAYSON" "\022STIBP_ALWAYSON" "\023PREFER_IBRS" + "\024SAMEMODE_IBRS" + "\025NOLMSLE" + "\026INVLPGBNEST" "\030PPIN" "\031SSBD" "\032VIRT_SSBD" "\033SSB_NO" + "\034CPPC" + "\035PSFD" + "\036BTC_NO" + "\037IBPB_RET" ); } @@ -1636,6 +1647,7 @@ finishidentcpu(void) cpu_maxphyaddr = regs[0] & 0xff; amd_extended_feature_extensions = regs[1]; cpu_procinfo2 = regs[2]; + cpu_procinfo3 = regs[3]; } else { cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32; } From nobody Tue May 21 02:46:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjzN94Qqnz5KgrD; Tue, 21 May 2024 02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjzN93lmzz58bN; Tue, 21 May 2024 02: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=1716259593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+8Xov4xLD5wy60Xa6ocNX2ZuV6ksscqQkSWVLcinoVc=; b=wKMCbqiwTz1pPIWX1KEKEHp8FbhyMvMzCURFV2hIP8yIzhAnpN5ZTxbJP/wQkDpxRS487D CWK091DKgDLuBKVgopAYmWRL2jFVQUrQjTnKw6OSZzdh6FpnTBQvAMsVpVOn8mH4UsHj0t hGuv+Qkh0Nxi5L+P8Dv0jNSKFx4AuCyO1W4I3wsD9SsspG1strPe6MwWIf6PzCA9iFK2Tb tvlM8auwFddmMCfzTNeHCpX7tny4BcHXj/vcEe16uywVsNABZr5hdClu3hw62v+c6gc9qB S6igj/Z62aasRAixBrOL+NMyxe6wheDBR6cRoWOBWP0XC9BhZMoZ//9O5CtXdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716259593; a=rsa-sha256; cv=none; b=yxVRg5V7Zw4lB8urg1UhykzdfXHb0cWO1ny35gOW8IDJYQvkfiMw2ssCty3liSltSFmSBo 77hMvXt33+fE1xS6hzpPmycM1a5zM89fDCJSLKhz7wa0N+iIWAvmShBGNB45hApB4s477e xU53qKo41n7vNgXpOQpbZS9U3nW4nNJHvjodEYkEEK7YIKQXzsN0qEjw+GUy/GpepCuPvO xpoDgsTZBQKGV6yaUs8BsoCC116sv2gxMih0NTSPKyIgOknDlklweeSyIA52e4UEemTvYC ssmFMcZoj/QeuUuy+OgUOh60FZ/CMpdoUm2LH4o6j2++2RZb1gsmsEQs/DlF1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+8Xov4xLD5wy60Xa6ocNX2ZuV6ksscqQkSWVLcinoVc=; b=GpCWKDm0aNk7URI6E6juBnL3YuqgZv5XCacJIIeOl8a2DvesD/wbYavPkSTZL4jsyeGgog 2N+QK08csX722y0u2/bYPsaZC0vhj0JxXL0qk6/YNFTBBCLdT5q4KemK+TovodR2BmIHv1 x8m1fDiT5/uJvuGdCyzIPxPGJElfRQG4kyANEsNiS8gwafitNYK+HraZm8wQOpn2vkfX0x vxxC4/ezqX/4d89JxPxrxPXRs1Qj9jZp+s1Q94SQ8GxyDb9RXDc+AZtX75JYiHknxthfpD xnpAg0DA61bTQEiAdtVM8AHw/AsuJ1TmM4PwbwjX3j9lcJVqvEOkFz2ZvRxSRQ== 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 4VjzN93LyPz14Cc; Tue, 21 May 2024 02:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L2kX59082719; Tue, 21 May 2024 02:46:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L2kX9Q082716; Tue, 21 May 2024 02:46:33 GMT (envelope-from git) Date: Tue, 21 May 2024 02:46:33 GMT Message-Id: <202405210246.44L2kX9Q082716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f148aa572a3b - stable/14 - nfs client comment typo fix List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f148aa572a3b7e744a316516fff4a1c375a358e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f148aa572a3b7e744a316516fff4a1c375a358e7 commit f148aa572a3b7e744a316516fff4a1c375a358e7 Author: Konstantin Belousov AuthorDate: 2024-05-18 22:49:59 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-21 02:45:59 +0000 nfs client comment typo fix (cherry picked from commit ff4480baf6f15551aee58707bffc9b15608d89d8) --- sys/fs/nfsclient/nfs_clbio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 43f3de8fa2d3..0e9c989e058b 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -369,7 +369,7 @@ nfs_bioread_check_cons(struct vnode *vp, struct thread *td, struct ucred *cred) bool old_lock; /* - * Ensure the exclusove access to the node before checking + * Ensure the exclusive access to the node before checking * whether the cache is consistent. */ old_lock = ncl_excl_start(vp); From nobody Tue May 21 02:47:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjzPZ0D9Sz5Kgng; Tue, 21 May 2024 02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjzPY6rVmz59N8; Tue, 21 May 2024 02: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=1716259666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1xae6oLZUa99GTJ9x08n8CNeFrRS1Tx51aJPK6thFOI=; b=L8WWhnQ7h1DTfzFEQhqYXUn55ZgNEqd2wr5WgfBOZJUFup3GEHCXmQZ/H+BhO1fPa+QJG0 OSUd4gIdvD5PMFk26IWFUl9YfDG34n3Np4dsBCMVeRAErDqVHQ6MFPZ/bHxQpcJ6LM+Cz4 S73oCJRcNWldwo0Rje11IR/7uY8AmkU216JEGfrQOi4vwZBbnQZATcDZfT6lTMASSVlU/d rriSOYs52klfQVGHwrxu8Vu6GC1IhUCIN+NI5qeibNFFiRCjGNcGxdv+3Dcr1awWE9pKeW iMfPj9nhWiIyvgj9lG5EPDibFOE6bp5iM+wVEQUM4jY+xaWz0v2dn05S8Wk3zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716259666; a=rsa-sha256; cv=none; b=DQJ3G6FU2yaT1k3VcyfEbI8/tMfePPmEvoGC7zxFh9meMULZdUSSeijoXo24X1t4fAs5Yd Na0CXAy0AiswYsbhas9XKANdGn/g5+IrQ/icaK5LOtBADR+ero80ai1+yBAakisNDMpTyA Yn+arCHlLxxdDZSJbejQa12MYRySTyxvKFNYifb/lRHcr/iLErulj/lO7ItvUvh7PWaM/m 1AhuqyxSl2k38Fr0wR7fIzXFoPEjcgi+Kyt/kEhhGbmm2UG/ow6fztIVtnFPy/HIVbxcHv Cgi2yKuNwXn6d3w65nZRFT456/s2wGLC0gAJgMlwiu5+x6azIi7Qa0QSkeCZuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1xae6oLZUa99GTJ9x08n8CNeFrRS1Tx51aJPK6thFOI=; b=M3KQ1G/SCHJk9ADyv/oOK+VgKxIPqn+PFy5qW+BG9L0mOEPe81TGzYZbDZ3G8faq8I6p3C ClkgummB3Yq8sSP6hgok8wJ6LvQfQUcumcYhVQHYZd+gKcJ+SG6qZIQaSOJI9Bs3yB5fqi nxRAY2Cvp/edgH9hNpf59syDRo1COibkBVIFZ/rE2MwjG7t0TZQoF1w3CGkfPpRB6Zu1fG SZ9W/AqGK6bYAaaly552dJSLWt1uMX1+DdGaVezmu/BuTsXVmmcNYbUMCMSktJm3N0eO9h MIBOfCSrV+suy4jvSK5NJX4rYlEYHOhvZgGIYTI0Vhf+uDiDUTZNtfUnpPiTTw== 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 4VjzPY6RnJz14MC; Tue, 21 May 2024 02:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L2lj7U083043; Tue, 21 May 2024 02:47:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L2ljMo083041; Tue, 21 May 2024 02:47:45 GMT (envelope-from git) Date: Tue, 21 May 2024 02:47:45 GMT Message-Id: <202405210247.44L2ljMo083041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c8b9ecc1a57d - stable/13 - x86: Add Intel TD/HFI related MSR/CPUID defines to specialregs.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c8b9ecc1a57d20d49a174157f234cd26379d5a53 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c8b9ecc1a57d20d49a174157f234cd26379d5a53 commit c8b9ecc1a57d20d49a174157f234cd26379d5a53 Author: Koine Yuusuke AuthorDate: 2024-05-06 02:17:29 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-21 02:46:58 +0000 x86: Add Intel TD/HFI related MSR/CPUID defines to specialregs.h (cherry picked from commit 338d53965d9f4bfb1a83c1bcff3ff78944ce3a9f) --- sys/x86/include/specialreg.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 4886430c84b6..f78e04c714f0 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -347,6 +347,13 @@ /* Ecx. */ #define CPUID_PERF_STAT 0x00000001 #define CPUID_PERF_BIAS 0x00000008 +#define CPUID_PERF_TD_CLASSES 0x0000ff00 + +/* Edx. */ +#define CPUID_HF_PERFORMANCE 0x00000001 +#define CPUID_HF_EFFICIENCY 0x00000002 +#define CPUID_TD_CAPABLITIES 0x0000000f +#define CPUID_TD_TBLPAGES 0x00000f00 /* * CPUID instruction 0xb ebx info. @@ -585,6 +592,8 @@ #define MSR_TURBO_RATIO_LIMIT 0x1ad #define MSR_TURBO_RATIO_LIMIT1 0x1ae #define MSR_IA32_ENERGY_PERF_BIAS 0x1b0 +#define MSR_IA32_PKG_THERM_STATUS 0x1b1 +#define MSR_IA32_PKG_THERM_INTERRUPT 0x1b2 #define MSR_DEBUGCTLMSR 0x1d9 #define MSR_LASTBRANCHFROMIP 0x1db #define MSR_LASTBRANCHTOIP 0x1dc @@ -768,6 +777,14 @@ #define TOPA_INT (1 << 2) #define TOPA_END (1 << 0) +/* + * Intel Hardware Feedback Interface / Thread Director MSRs + */ +#define MSR_IA32_HW_FEEDBACK_PTR 0x17d0 +#define MSR_IA32_HW_FEEDBACK_CONFIG 0x17d1 +#define MSR_IA32_THREAD_FEEDBACK_CHAR 0x17d2 +#define MSR_IA32_HW_FEEDBACK_THREAD_CONFIG 0x17d4 + /* * Constants related to MSR's. */ @@ -838,6 +855,19 @@ /* MSR IA32_ENERGY_PERF_BIAS */ #define IA32_ENERGY_PERF_BIAS_POLICY_HINT_MASK (0xfULL << 0) +/* MSR IA32_HW_FEEDBACK_PTR */ +#define IA32_HW_FEEDBACK_PTR_ENABLE (0x1ULL << 0) + +/* MSR IA32_HW_FEEDBACK_CONFIG */ +#define IA32_HW_FEEDBACK_CONFIG_EN_HFI (0x1ULL << 0) +#define IA32_HW_FEEDBACK_CONFIG_EN_THDIR (0x1ULL << 1) + +/* MSR IA32_PKG_THERM_STATUS */ +#define IA32_PKG_THERM_STATUS_HFI_UPDATED (0x1ULL << 26) + +/* MSR IA32_PKG_THERM_INTERRUPT */ +#define IA32_PKG_THERM_INTERRUPT_HFI_ENABLE (0x1ULL << 25) + /* * PAT modes. */ From nobody Tue May 21 02:47:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjzPb1sP0z5KgpJ; Tue, 21 May 2024 02:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjzPb09kQz59SZ; Tue, 21 May 2024 02:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xebunKKtm6i1UgfQi4CX2pFZyeeKhp/KoJ/zS2A8xPc=; b=CAre1c6Lq3zYpOz5SE7+o/bE5SEmYmvZ+XUo0/+7l7ehDcsxOYCfZSSSLKf9IwsGg5B1iD Dfjh37n1OMCHrA8F52QpNYRABqEhzWlb817t6rkPTwzw4TWbNWc1J7FX1r1P/nQwIwqpjw Qh4mQrHmXhS8h/O9W9TIWwKXd6xgKrTNbC4uvT8dzkVhPz1MDoHj6tPYjPA/UBDUjErcUl ZBmYinbonbPTcOaaQt/WfcOnD5f7Xi4q2PSUuo4QuCWJQzkok6K3VSh6AouWZp8h2ZY+Ri ujvQ9G7Jxcn4Y/mf1AZTKj4KSpTE5wm7uTC+GnO9ZmIdTLsZy7JWQkUpZIhAfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716259667; a=rsa-sha256; cv=none; b=spsc4s+097HuvOQVqfKNj0kMp7G8oIVV7ms7rOYnaVLsMJcPX9MgUGdFJQmnBzkyh918Xg sDOmM0AVkFspyHoonTS2b+G3uJfxpblxqQTbHrRXqQtsiqEeKoCrc7N0DiDxfY0LlnlEb6 k9UW7RBfVv0Ez5yRkGdx4kBQqd2VLPGgfIMT9gkqQfebyZdAtpBumZqpQIsQeg2zuuzaMH YFLpkPeSLKVBOtAVMEnoUVAC70DjcieYXdBjxGRrhRuYl14E0UU6zEAKcWmFMoVcVnCP5F M4+M3qds1siV/ZJegD34jVOJc23qw1/zMqfwM6LJE5fQ+eiOcD4P8uyYFdCzMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xebunKKtm6i1UgfQi4CX2pFZyeeKhp/KoJ/zS2A8xPc=; b=Eav2Pox6oy9kfpNlLY7p3hoyiugYYdReW7HGyCufK+wzNQSFca/Nn8qKeKOsItI0KFJAW1 eds5MYvu3CK+hUUIEHagDcd0Uto5nsgKE7/LRTmJeDf7zmaLGisOUqnvReWSo/o8XV66be JC6gEx17R7/4P7l0igsnGfogXqnTTFAKRSCQJJELjDFyO2U9E8/iXp3Ag/NQvzFfDJxXK5 bKyv8Jrm7r0Bqyaulp5pcsEME9OMm6pH/770QOAgT5xLVAReX3Rvepq1gOyxpFuqPeQeS5 SZdTbOrQLJi/2eF1EpXKd7OSdxCVg8F0StcrCOHTj8G20wEeP1QUs2gdJcQTqw== 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 4VjzPZ6vpNz13sJ; Tue, 21 May 2024 02:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L2lkje083101; Tue, 21 May 2024 02:47:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L2lkQp083098; Tue, 21 May 2024 02:47:46 GMT (envelope-from git) Date: Tue, 21 May 2024 02:47:46 GMT Message-Id: <202405210247.44L2lkQp083098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1fbc850bee39 - stable/13 - AMD CPUs: update bits and data from CPUID 0x8000_0008 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1fbc850bee39208a6eaddd894e009b60c6dd243a Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1fbc850bee39208a6eaddd894e009b60c6dd243a commit 1fbc850bee39208a6eaddd894e009b60c6dd243a Author: Konstantin Belousov AuthorDate: 2024-05-13 23:02:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-21 02:46:58 +0000 AMD CPUs: update bits and data from CPUID 0x8000_0008 (cherry picked from commit c6113ac5a2c2bfee875979ebd40a007ef4d60069) --- sys/x86/include/specialreg.h | 17 +++++++++++++++++ sys/x86/include/x86_var.h | 1 + sys/x86/x86/identcpu.c | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index f78e04c714f0..16aa07c05e65 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -399,21 +399,31 @@ #define AMDFEID_CLZERO 0x00000001 #define AMDFEID_IRPERF 0x00000002 #define AMDFEID_XSAVEERPTR 0x00000004 +#define AMDFEID_INVLPGB 0x00000008 #define AMDFEID_RDPRU 0x00000010 +#define AMDFEID_BE 0x00000040 #define AMDFEID_MCOMMIT 0x00000100 #define AMDFEID_WBNOINVD 0x00000200 #define AMDFEID_IBPB 0x00001000 +#define AMDFEID_INT_WBINVD 0x00002000 #define AMDFEID_IBRS 0x00004000 #define AMDFEID_STIBP 0x00008000 /* The below are only defined if the corresponding base feature above exists. */ #define AMDFEID_IBRS_ALWAYSON 0x00010000 #define AMDFEID_STIBP_ALWAYSON 0x00020000 #define AMDFEID_PREFER_IBRS 0x00040000 +#define AMDFEID_SAMEMODE_IBRS 0x00080000 +#define AMDFEID_NO_LMSLE 0x00100000 +#define AMDFEID_INVLPGB_NEST 0x00200000 #define AMDFEID_PPIN 0x00800000 #define AMDFEID_SSBD 0x01000000 /* SSBD via MSRC001_011F instead of MSR 0x48: */ #define AMDFEID_VIRT_SSBD 0x02000000 #define AMDFEID_SSB_NO 0x04000000 +#define AMDFEID_CPPC 0x08000000 +#define AMDFEID_PSFD 0x10000000 +#define AMDFEID_BTC_NO 0x20000000 +#define AMDFEID_IBPB_RET 0x40000000 /* * AMD extended function 8000_0008h ecx info @@ -422,6 +432,13 @@ #define AMDID_COREID_SIZE 0x0000f000 #define AMDID_COREID_SIZE_SHIFT 12 +/* + * AMD extended function 8000_0008h edx info + */ +#define AMDID_INVLPGB_MAXCNT 0x0000ffff +#define AMDID_RDPRU_SHIFT 16 +#define AMDID_RDPRU_ID 0xffff0000 + /* * CPUID instruction 7 Structured Extended Features, leaf 0 ebx info */ diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index ed585c33e8a8..b764f1812264 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -57,6 +57,7 @@ extern u_int cpu_max_ext_state_size; extern u_int cpu_mxcsr_mask; extern u_int cpu_procinfo; extern u_int cpu_procinfo2; +extern u_int cpu_procinfo3; extern char cpu_vendor[]; extern char cpu_model[]; extern u_int cpu_vendor_id; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 1eb6bd6cac6f..992dbb421aa4 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -102,6 +102,7 @@ u_int cpu_exthigh; /* Highest arg to extended CPUID */ u_int cpu_id; /* Stepping ID */ u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */ u_int cpu_procinfo2; /* Multicore info */ +u_int cpu_procinfo3; char cpu_vendor[20]; /* CPU Origin code */ u_int cpu_vendor_id; /* CPU vendor ID */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ @@ -1085,19 +1086,29 @@ printcpuinfo(void) "\001CLZERO" "\002IRPerf" "\003XSaveErPtr" + "\004INVLPGB" "\005RDPRU" + "\007BE" "\011MCOMMIT" "\012WBNOINVD" "\015IBPB" + "\016INT_WBINVD" "\017IBRS" "\020STIBP" "\021IBRS_ALWAYSON" "\022STIBP_ALWAYSON" "\023PREFER_IBRS" + "\024SAMEMODE_IBRS" + "\025NOLMSLE" + "\026INVLPGBNEST" "\030PPIN" "\031SSBD" "\032VIRT_SSBD" "\033SSB_NO" + "\034CPPC" + "\035PSFD" + "\036BTC_NO" + "\037IBPB_RET" ); } @@ -1692,6 +1703,7 @@ finishidentcpu(void) cpu_maxphyaddr = regs[0] & 0xff; amd_extended_feature_extensions = regs[1]; cpu_procinfo2 = regs[2]; + cpu_procinfo3 = regs[3]; } else { cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32; } From nobody Tue May 21 02:47:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjzPc27nxz5Kghm; Tue, 21 May 2024 02:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjzPc1S2nz59Fc; Tue, 21 May 2024 02:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MiqS5lDjMLNMiGP/k0SnolM1MmihjHK5ADXXOUkPtmE=; b=qm6KuQGnori1+ehjvtMliSLfvVCw0NJHOF9bYCitr56XMH0/lzS5Lb9RQgP/u80KaaWmPQ YeJcpu3KwEmpTsLHDIAbevhMgATiPwdJk+2JiyaLj5IZm2RGHb8AGxyEGpy4TylssPiC10 KkdhPrE8NWezvi6uwPxGIEidDbXFQg83QHILAuOkkqiEjds5SklsviKXDsMUr/0u0rT+Ki fHA61uDglG6th4StxLWNMgS4FkmGnaP9nKyMUeEUANxfrhhB1ve3/pckZwpISkbhzcZHxG BMxWP1k6p+bH7lWcyTIIDzHcH7tp0FNFRJ3vIAOKIi4qU6GpChR4QycWdum37Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716259668; a=rsa-sha256; cv=none; b=ipivtZmmM1gsCMod/aSFL5Q5sNyR6mLD4fQKkBUbDNxn2Y6wjl10BFe5qhjlGCrdxJ4Npr NwaKsor0Ei7OZpRAMrmcDI/JWB6/nv1PeeL9yFXhMYjdYBjhOigaV+Cmsq7MpJIsg8t4DE 0wFpehBzTKHjjIFVdvOzt6+PTuNfv7DkSdTCkhFccL6k7xa15+o5upxw7W2Q0CNdgNWoJo 1izDqo4CyjbRJXR8sY+Sdnj0MC7c9/byUZBUivuv3P05T163q6d/r6axUVMpCPodfgtgBo 7SJvUM/KDYPBVOWvBE9EdaSaWs4HtIEG7X7n8jZ+4KNYhDG20ObmzbYctfU7Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716259668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MiqS5lDjMLNMiGP/k0SnolM1MmihjHK5ADXXOUkPtmE=; b=W9uYcG6CMGHGHvetjqhORIGKzUJn9gem7bLRlXWjgiv4AZYwxBGwcvxLYowOOYM9TWs3cx IvmbScgcy4b3ToJeZFeJ2Ydm3pcpT1aeRR6O++83jNsn0qUcNbsEEJzHIhbnCCAsRHdkbr 7XNPbXobjPU0guZFi08kBQqA3rt0F9e19Vfr/ikDJw26VxBzYLmlpNk0bn4Du2K0LLXjHD pO5rKq1YPmxwTvRlU9QNFripr612+oVZ9oi/J9ne0Pe6mbSu2P8JFADTDtV5vD2AyDAP55 aC1/TJ86u3kRB5ppLhF6TDOADIcaS3hsb+XfgaHwCVZobeKwrAmZR4rH84pAOg== 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 4VjzPc142Fz14MD; Tue, 21 May 2024 02:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L2lmmP083150; Tue, 21 May 2024 02:47:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L2lm8Y083147; Tue, 21 May 2024 02:47:48 GMT (envelope-from git) Date: Tue, 21 May 2024 02:47:48 GMT Message-Id: <202405210247.44L2lm8Y083147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 25aa002545c0 - stable/13 - nfs client comment typo fix List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 25aa002545c033908cf8e0ff30800c02e2ea0e85 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=25aa002545c033908cf8e0ff30800c02e2ea0e85 commit 25aa002545c033908cf8e0ff30800c02e2ea0e85 Author: Konstantin Belousov AuthorDate: 2024-05-18 22:49:59 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-21 02:47:23 +0000 nfs client comment typo fix (cherry picked from commit ff4480baf6f15551aee58707bffc9b15608d89d8) --- sys/fs/nfsclient/nfs_clbio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 43f3de8fa2d3..0e9c989e058b 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -369,7 +369,7 @@ nfs_bioread_check_cons(struct vnode *vp, struct thread *td, struct ucred *cred) bool old_lock; /* - * Ensure the exclusove access to the node before checking + * Ensure the exclusive access to the node before checking * whether the cache is consistent. */ old_lock = ncl_excl_start(vp); From nobody Tue May 21 03:27:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk0HV308yz5L27c; Tue, 21 May 2024 03:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk0HV2Dgdz438D; Tue, 21 May 2024 03:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0z/NXGoXnF+hC6kr4kpSjZ28sv9TgHaZO8L6eAjJyg=; b=NtOORRId4AiSyyokfaYY4LZ0mDiatHw9R/qtt41mxGwwDh7A1lkhe4CcgaeATjYxU7592I i22H1HOgm7NubNWOlgwY1QP1o3p/c7HDQ4aviaGRF5Ic72FkAyh4ohTBbo5xVCCi8w0vip sbPFh1h7TUhMLfOMoGBxtEqvaowtREKOhyW0GBRRDSBgxkI1OhxpOXqdXFzQ6uOo05j3s6 1puwXw6KywBpm4MWIuSBm8j/7KzPbycToTnrcioN67cTv+CEhKIMP01CFLpj4rgHYa+Hbg sUCsKNP1TMzRuqps5XPbSvneHszoh3qbUUgMLIaDZjIRCjZ8/2Iv1b3y3zZ3BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716262054; a=rsa-sha256; cv=none; b=rcQ5A0bzTh40SCocDb+qI05AKU7I4SloqnS5jeQ8kqdrEkoqe6kmzqRCUr3yv0STpO4JeT jwJTuW8MSJjHHCvfDHOFBdlCIadDbAmP6sC3xiR627oCW2jn3+I5kZItwgQErkJHLKP0Jj yEQ/Qa5lf1lXnFuJlvN1NxVEKBFogC/0E6yHa4ZIEopMRdhYnKxXTuTNoVVfkebrG5Ude7 QZWZ4TKIU3uQuRykGwxcvsIGo53N7uZ+w/7waRooHqAIP+6pcBJCYF1JhKb9nkbpiL1w// Y0QLPvDPABtk8wkp/VE4vWOqczEwWPeY/uhl0FHr3ldYruc1nHlRRvcFLXXLKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0z/NXGoXnF+hC6kr4kpSjZ28sv9TgHaZO8L6eAjJyg=; b=JhMhD9T+HhIBjuxSK8EJ+fdV0RfIVfCz6wwLOjZwYvGxHt/zBN6i2a7/VZ49yzDlNn3x2L DiESuoiT7lS3j3F0Tiqyd/ARpRaO4pJ/GYJEmLjvMhxR04Jh6rvvctyiibiCgrpKKkFnkj 1Nb3DWSxoPpArTQA6zXH7TVUHpztOjGVsc7jMxkyeTq6qOKgTHJStqYDfNZC6jC1Fd4t0+ ZOpZLgq3vFZb7TzukztGyoX5UykIdxglkbh/EqauB5ytHbw5XWgLGIekF911gSQjaV6Wiq OrFJz1Xlvu9i1tyAdbBf7toPro6legfK0ZPyOMoFbXXf5k/oUMX26SEDzvLbOA== 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 4Vk0HV1k3Kz15Fq; Tue, 21 May 2024 03:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L3RYSN052557; Tue, 21 May 2024 03:27:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L3RYK7052554; Tue, 21 May 2024 03:27:34 GMT (envelope-from git) Date: Tue, 21 May 2024 03:27:34 GMT Message-Id: <202405210327.44L3RYK7052554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e7d689faaf77 - stable/14 - sysexits: Tidy deprecated header and manual List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e7d689faaf77d303d2b9d050e25d8f710719be4b Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e7d689faaf77d303d2b9d050e25d8f710719be4b commit e7d689faaf77d303d2b9d050e25d8f710719be4b Author: Alexander Ziaee AuthorDate: 2024-05-10 02:43:39 +0000 Commit: Warner Losh CommitDate: 2024-05-21 03:10:15 +0000 sysexits: Tidy deprecated header and manual was deprecated in the base system in a1432b4 for FreeBSD 8.0 and is retained only for backwards compatibility. Make that clear, since sysexits(3) suggested using it since it was in style(9) prior to this. MFC after: 1 week Co-authored-by: imp Fixes: a1432b4 Reviewed by: imp, pauamma (previous version) Pull Request https://github.com/freebsd/freebsd-src/pull/1195 (cherry picked from commit 5ccaab1797e5bdc404f2299ebaec1265547a4744) --- include/sysexits.h | 7 ++++--- share/man/man3/sysexits.3 | 43 ++++++++++++++++++------------------------- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/include/sysexits.h b/include/sysexits.h index 9eef5abebe93..44449e05ff06 100644 --- a/include/sysexits.h +++ b/include/sysexits.h @@ -37,9 +37,10 @@ /* * SYSEXITS.H -- Exit status codes for system programs. * - * This include file attempts to categorize possible error - * exit statuses for system programs, notably delivermail - * and the Berkeley network. + * This include file attempts to categorize error exit statuses + * for system programs, notably sendmail. These values exist only + * for interface compatibility, and are deprecated for FreeBSD + * base software. * * Error numbers begin at EX__BASE to reduce the possibility of * clashing with other exit statuses that random programs may diff --git a/share/man/man3/sysexits.3 b/share/man/man3/sysexits.3 index ef736192e439..62f79b286a16 100644 --- a/share/man/man3/sysexits.3 +++ b/share/man/man3/sysexits.3 @@ -1,7 +1,7 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 1996 Joerg Wunsch -.\" -.\" All rights reserved. +.\" Copyright (c) 1996 Joerg Wunsch. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,27 +23,20 @@ .\" (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 January 21, 2010 +.Dd May 9, 2024 .Dt SYSEXITS 3 .Os .Sh NAME .Nm sysexits -.Nd preferable exit codes for programs +.Nd legacy exit status codes for system programs .Sh SYNOPSIS .In sysexits.h .Sh DESCRIPTION -According to -.Xr style 9 , -it is not a good practice to call -.Xr exit 3 -with arbitrary values to indicate a failure condition when ending -a program. -Instead, the pre-defined exit codes from -.Nm -should be used, so the caller of the process can get a rough -estimation about the failure class without looking up the source code. -.Pp +Some commands attempt to describe the nature of a failure condition +by using these pre-defined exit codes. +This interface has been deprecated and is retained only for compatibility. +Its use is discouraged. +.Sh ERRORS The successful exit is always indicated by a status of 0, or .Sy EX_OK . Error numbers begin at @@ -112,8 +105,7 @@ The remote system returned something that was during a protocol exchange. .It Sy EX_NOPERM Pq 77 You did not have sufficient permission to perform the operation. -This -is not intended for file system problems, which should use +This is not intended for file system problems, which should use .Sy EX_NOINPUT or .Sy EX_CANTCREAT , @@ -131,12 +123,13 @@ parenthesis for easy reference. .Sh HISTORY The .Nm -file appeared somewhere after -.Bx 4.3 . +file first appeared in +.Bx 4 . .Sh AUTHORS This manual page was written by -.An J\(:org Wunsch -after the comments in -.In sysexits.h . +.An J\(:org Wunsch . .Sh BUGS -The choice of an appropriate exit value is often ambiguous. +.Bl -tag -width 0 -compact +.It This interface is not portable. +.It The choice of an appropriate exit value is often ambiguous. +.El From nobody Tue May 21 03:27:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk0HW3SDjz5L27d; Tue, 21 May 2024 03:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk0HW2q6fz42ld; Tue, 21 May 2024 03:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyL/hUjtaXJkh8hS5yx9JaH2t/Mb2jelejCjm3IpXIM=; b=PGT98XVjbZ4/4AGAiLx6U9fDxwdAt4dGGB8VZoxxNetBi1pUbl8NmnhCXmqjO9wbmfuZUS h+SX90nCC/oVb//Dh2y1zYRLSkeTIf0jjcGOpEEhc1UBEp8Qyz7Q4A6vWAAwLfxwIQXerh tVJqKcLyXYKZ/BLdDpFdQ7hV+Y11jCJUHro91G6LjeazXg93NkZvTIpLSakB6G0SzQH1L6 pGURCV3cDTnCrvsvKBINoH0CvL/NHfW8Bw8spYe4S2+gV+P+wbDCXFh52vnELEZxDEH5/G J9dO/97Ng62rvMYSsSUeZt/utDYpDmTCVbLK6h/ncRqYj76G0tyJJ34A4hOysg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716262055; a=rsa-sha256; cv=none; b=bhrsElrcSPKcS4mAmMfyS4JQw5jXCD8U8IQ3rFdMLKPJPOMlC7+hGiOM18Q0o/Sn3vEaeP JHnOntg4/DCfCUVPn+PsH7USHi8ZXCMnoNNEbACP5TxjHRAzWNTV0hmzQi+mgvZBugxPbD LpIT7hCWWlNap/Jn17LOKi23O1d7nXGZBm+rEUBNF209yWZbzcH3hnVHbHkfwbpR0LBcN1 5yZlOkTMvpDrDGr0F1MmJpFCRS7zcGf7U4Iqd+U4ghxuXOY501W/zr0daDCukqxOzR4/g7 +DuLG2upFx4f1Gk+9yBS1rktGGGwtvRD+qBMVdPgqz/6J4rEGMo2NRs8b1fdHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyL/hUjtaXJkh8hS5yx9JaH2t/Mb2jelejCjm3IpXIM=; b=lnytG8aSB4YSKkJkcry0FqqgEWHDH88juvoKKctjSDVVwlqy14w9HM5cJ0wakdmrmGRG9T nmtNWP6dq/wY9yiBEL9b9Dr/2L3tnC3ervNEQp6dGe9G1fG9vX++Tu+HnpQIBgKm5FHc9S aHRk5UEo7etYAS6tPcaMhZytVVnSFfMZHHWMoGrJ2LBACbAfIU/am1R7fmzv9gZWIADfKk s+TCTn1lAw0E2guOgiYQhjTLuBONXOQXiE2frjJ6VNAt88J/du7Gs2ddDjNQ9/xVSSIFzF AqpO3rJWSA+1ylNW77EeF3yKUFZ6T0o2An0FnW5d8ERFmgil0a5r2OwHNdeknw== 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 4Vk0HW2QKDz1595; Tue, 21 May 2024 03:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L3RZNh052603; Tue, 21 May 2024 03:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L3RZWW052600; Tue, 21 May 2024 03:27:35 GMT (envelope-from git) Date: Tue, 21 May 2024 03:27:35 GMT Message-Id: <202405210327.44L3RZWW052600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7aba92287947 - stable/14 - sys/dev/irdma/irdma_cm: fix compile without INET List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7aba922879474189e5694ffb92a51ab387ad3dd6 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7aba922879474189e5694ffb92a51ab387ad3dd6 commit 7aba922879474189e5694ffb92a51ab387ad3dd6 Author: Lexi Winter AuthorDate: 2024-04-12 16:47:16 +0000 Commit: Warner Losh CommitDate: 2024-05-21 03:10:46 +0000 sys/dev/irdma/irdma_cm: fix compile without INET irdma_get_vlan_ipv4() calls ip_ifp_find() even if INET isn't defined, in which case this function isn't available. Stub this out for the non-INET case to return an error (0xffff) instead. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1156 (cherry picked from commit 0478a0356272ab3907af9d97711f0bb8b14bf38b) --- sys/dev/irdma/irdma_cm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index 65cb5c643783..167e3c67390c 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1664,9 +1664,11 @@ irdma_get_vlan_mac_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, u8 *mac u16 irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) { + u16 vlan_id = 0xFFFF; + +#ifdef INET if_t netdev; struct vnet *vnet = &init_net; - u16 vlan_id = 0xFFFF; #ifdef VIMAGE vnet = irdma_cmid_to_vnet(cm_id); @@ -1676,6 +1678,7 @@ irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) vlan_id = rdma_vlan_dev_vlan_id(netdev); dev_put(netdev); } +#endif return vlan_id; } From nobody Tue May 21 03:27:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk0HX4pjKz5L2BR; Tue, 21 May 2024 03:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk0HX3x9Dz430Z; Tue, 21 May 2024 03:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RmQDWnFE8u8xCqCvzM3U3a32T56mQHzF/Xa1HwnavUc=; b=Z6MIlFj0blr1SHS6MxAv5IjKE8306SkDE1wrU6MO61JfDTJY41elnRz/fiDnuO+1sP0BoJ WbBOw/6fWc4W2vXHa+6tr+7aPHe28QFWqrb2aMm54uTmHoljUb7aBWPeSboJiJewUpENtw kKlmUMOBEo22fHBaO8pZjBjVNHv3XDONS48Y/1Ju8lwqWFaLD6eKKmVPzQTC69He5UPE6I bCqrv68zcsjcGjWxTJwVxuCyfwZRLoQMhM/NWLQa0XTdLkTilJ7wYnoX5629Kj9aX8uMac c/y08toQJFhxbiTCxAlwwu37bBoa9R7De4QZ6v+vyryE+BaoyGH8OiDP4UYOEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716262056; a=rsa-sha256; cv=none; b=EONCID2pfAGJIok7f4XZvmM7ycmbDHnqDACb8Mwl4xx4TnySOaLHAUWe1d4VCP85VmepaB SLj4dZFqM8YK5w78M38vOk8C/LTUJfcULYKPb+2RDu6jPfNKcI5rRW+z0Xxbn0m0dMprqv NOHiTh4Gpo8j5gCD7wpwFYguEymMG0f89Ch8q10ZlMO9AjA+QpWak2m3eaW3IibVLnon4J tLhur6iTwxTe24bOY0/m0EF/oRTReKJeTedCHr13TxpN0lFxCgRLA21KdfHhfjUVjYmjlP e7GmyXwWzJAEfp8D6TB8uZobVaZ97CH4pnwD0no2zO5VopxuUL9T8Dmd2mrNFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RmQDWnFE8u8xCqCvzM3U3a32T56mQHzF/Xa1HwnavUc=; b=Pu9okyIToCGrZgcVpCRJEDmzLdI3WYb90xytAVqSytfFtmIA0zzuYPHbmyQFQfT4OEGNaW zeXsaKpzD4HV+xrdK+gglE4YJTqWLhjKJO4IMnjnpqR40OXbV9GBOpa96HOold1hpfTWm6 91I0HzvDAl960/2FbzjPz1/R2YEJsbeEjRnDHXY1JmrbhgAamfcytoZhHRSGn/LMvpOQ0h MYFBnyYBre5iuLqNDPtCcAPnkR8Uulk4QNESdB36ml/ghZbfJU/iT3CFzmdfibeAiu/sLr T9NxI5cTlbjr9ghZXu3WQI78J0uXjXytjBuVynOITSqVg1mDjt9x4MqOXmmneQ== 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 4Vk0HX37Zlz15Bq; Tue, 21 May 2024 03:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L3Raru052657; Tue, 21 May 2024 03:27:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L3Ra7r052654; Tue, 21 May 2024 03:27:36 GMT (envelope-from git) Date: Tue, 21 May 2024 03:27:36 GMT Message-Id: <202405210327.44L3Ra7r052654@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: f30c2d86c39f - stable/14 - sys/netinet6/in6_pcb.c: fix compile without INET List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f30c2d86c39f8c3090e1f8967c13f2dd0d5d664b Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f30c2d86c39f8c3090e1f8967c13f2dd0d5d664b commit f30c2d86c39f8c3090e1f8967c13f2dd0d5d664b Author: Lexi Winter AuthorDate: 2024-04-12 16:54:24 +0000 Commit: Warner Losh CommitDate: 2024-05-21 03:12:04 +0000 sys/netinet6/in6_pcb.c: fix compile without INET in6_mapped_sockaddr() and in6_mapped_peeraddr() both define a local variable named 'inp', but in the non-INET case, this variable is set and never used, causing a compiler error: /src/freebsd/src/lf/sys/netinet6/in6_pcb.c:547:16: error: variable 'inp' set but not used [-Werror,-Wunused-but-set-variable] 547 | struct inpcb *inp; | ^ /src/freebsd/src/lf/sys/netinet6/in6_pcb.c:573:16: error: variable 'inp' set but not used [-Werror,-Wunused-but-set-variable] 573 | struct inpcb *inp; Fix this by guarding all the INET-specific logic, including the variable definition, behind #ifdef INET. While here, tweak formatting in in6_mapped_peeraddr() so both functions are the same. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1155 (cherry picked from commit 042fb58d009e7efc5b334b68fffbef9b1f620ec8) --- sys/netinet6/in6_pcb.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 5c4ef7570ddc..90f91eef1daa 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -579,13 +579,13 @@ in6_getpeeraddr(struct socket *so, struct sockaddr **nam) int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam) { - struct inpcb *inp; int error; +#ifdef INET + struct inpcb *inp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("in6_mapped_sockaddr: inp == NULL")); -#ifdef INET if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) { error = in_getsockaddr(so, nam); if (error == 0) @@ -603,21 +603,23 @@ in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam) int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam) { - struct inpcb *inp; int error; +#ifdef INET + struct inpcb *inp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("in6_mapped_peeraddr: inp == NULL")); -#ifdef INET if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) { error = in_getpeeraddr(so, nam); if (error == 0) in6_sin_2_v4mapsin6_in_sock(nam); } else #endif - /* scope issues will be handled in in6_getpeeraddr(). */ - error = in6_getpeeraddr(so, nam); + { + /* scope issues will be handled in in6_getpeeraddr(). */ + error = in6_getpeeraddr(so, nam); + } return error; } From nobody Tue May 21 03:27:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk0HY5vZ9z5L20s; Tue, 21 May 2024 03:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk0HY4XMqz430r; Tue, 21 May 2024 03:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ede3TN8mdvmdPYCZIqOD+lYJpHCQP6e1myQ8WykOt4w=; b=tKtJce2f4IOJPfGgfTHHgX+NdYWtLxHHVXiHmHsgIAM+ylvRIzkpVGDNQ93MI+VsWbZhXJ /vP2idA4pPLqfm52mqPkGmfw9i8/qDDSs6ZSqD5qxQ3IKA5e8zfu/I/j0iI5ftRG9HbtNJ TWlR+SP0Q6RVJetdsebEicXBzk5O24UyulOzUZgDe1o/88daqIcBz1sDOvYkaGiGGv2N4b v2jNmYE1aFry0W28FzAIm3EVgCtICHtbg+T9qbjTHWJpkErnpltmx4AU991PqVq8zu4W1Z 3HuKhDdZr3DucJCe20kZeNHOcoH9jgjT5q9UOGi2npb52lB/dLS6Z+wYOr055Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716262057; a=rsa-sha256; cv=none; b=phGITGCcf+oxcLyBigaNLXNoWgv09rgkiwFjYJBwYvlQMzCq2mC6W7v7q2eeXIDjkDbWy7 B7/EoTzLuxcMY98rv2Wvn5OEcViCyn7NVqEeWSVr+ZKSVcJ4H6CUQ5mCvMTxcKB4QoDpwx 5S3M8KtS6rb9I3rOcoC+X/2BwGdYwgp67zFUBlKMWw0m/SKuLIhn8/FuvRs4b5LnQ9r0Xy VY5XxfP9Dw9LpoFfjANStiMcho7wT6iL4eQYc62EjZCqfzK+oAX02hZqwArEa/GWXc+NKE HxrWzSsY6a/wYs40JKGCnRIoPUTY7XpwRZyoyCt5Uf3SqQTpMTcVt+jRV6u+Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ede3TN8mdvmdPYCZIqOD+lYJpHCQP6e1myQ8WykOt4w=; b=HsyS/zXcO/PxTF+cXaIjy+7qCmB7pkyIGhGB+iIL5S57iZ+RzBBUdOY7z3046LM2hyEePp AED5lyc6aEqNPpNbBpyh6TzUDE1MEBOutxf4kqxD4vpmRpgDr36T9nq7qnVi6kPAMQbF3W /mPbUFbHxGKGjMInvlBWDxysu4kR+MneSQInOlZx66BdDdHOoELPbqFqIbGhx8KnPDzL8p ITp9ZqFtjqoKeqFtv0lmkmZITocWPkbGx3vm78Cv3xI8zgnMyjuIyMEF/90FcSHdNo1K93 +6AvfEK2qiHV55gvPXsi94YvzG9GfFfFxUcXu96KOh2+y724Ra+StgAdGFPGqQ== 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 4Vk0HY48N3z15Fr; Tue, 21 May 2024 03:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L3Rbf1052703; Tue, 21 May 2024 03:27:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L3RbWu052700; Tue, 21 May 2024 03:27:37 GMT (envelope-from git) Date: Tue, 21 May 2024 03:27:37 GMT Message-Id: <202405210327.44L3RbWu052700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 040a7e0dcbc2 - stable/14 - sys/modules/dpdk_lpm4: do not build without INET List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 040a7e0dcbc234aa66d0b4b53638db12b81a7b75 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=040a7e0dcbc234aa66d0b4b53638db12b81a7b75 commit 040a7e0dcbc234aa66d0b4b53638db12b81a7b75 Author: Lexi Winter AuthorDate: 2024-05-15 00:16:10 +0000 Commit: Warner Losh CommitDate: 2024-05-21 03:13:24 +0000 sys/modules/dpdk_lpm4: do not build without INET Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1236 (cherry picked from commit 304a03275a65cf811fb6c06fa1c37783d07c99a4) --- sys/modules/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index b6327ec224af..4b4534aee076 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -500,7 +500,7 @@ _ipfw_nptv6= ipfw_nptv6 _ipfilter= ipfilter .endif -.if ${MK_INET_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO} +.if ${MK_INET_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO} && ${KERN_OPTS:MINET} _dpdk_lpm4= dpdk_lpm4 _fib_dxr= fib_dxr .endif From nobody Tue May 21 03:27:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk0Hb1NLZz5L2GC; Tue, 21 May 2024 03:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk0HZ5XCMz438b; Tue, 21 May 2024 03:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfoO+qWXvxqgzh4bUUgxfERTmQmLtahE0/Pmwjdg/Yw=; b=gs/Eb7K0iUQ2cvsEVFJENbVdFi4gIa1huVvDgrg+PxhPdeqaOPVMGqLZChNgMLj1WGP1qt +IffrPmnek7iCebfOm9Qc/awQ9UQ2cdKfXmlBw7FTaBvkL6UwXWSyasTusxagRLTvyFBXz RnZZTRUUAZPJ2uydRlU+7mYaJ+hFplxZUVI4RbhqwvejkurNgX5Mf0RsYTdzOvWTq7Sz+s rh1q9kbzqyTJJLbh6cV394EejpQ/YdoQKu2nnQpoShWl8obxVlD36ipRfQxHmRrBoR09g1 5NmfqiJ9JXX6oGQAap1opeTK0RtokRTHOk3K9ued/v68nlLLB9gMeBr3md+Hwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716262058; a=rsa-sha256; cv=none; b=tiqDE9Ot/njCy3pAHw2Z2ccmkJbVkOVCrOK9xYWKkfbtkuUB+QdaQ+tm08lb7GVS7weFCU hMlv9bG/OCFNjgVJkLjgJIaH7pR1bd3T3lejtDzCQYl9hZ7I82rN+9lf5yFCRDGLbpdWz3 APdM9AnClxq+GwONYC9t1HifJVSPIPBdxo+8LP4Lueh9aQmMncb4Jm9lRhePrynRIFOnr9 4xrAWn2uIsDUIZD2IYg3m6uC2Z9Swx45MnlP5QmVz/bOfbO5/DnDOnJ6+zWHuu0R/ifBoX FITbHLTuRFblVox4E33oLpHp5iZSZq7m0uow2qgJih85MWlTcf4wNZ9YBQXITw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfoO+qWXvxqgzh4bUUgxfERTmQmLtahE0/Pmwjdg/Yw=; b=iE3qSudHwWbiDPqRmbnw5o2mpLTR0OE6A29kXUEWaV0tv+1kNiStyJJBnCm+9zVHrbqwd8 dgWVzAr+eO6IRTWWgkDXdDZ3LgaAsEaFtI0/3wsQ+pjThD/fVcGl8n9svv0WMSfuyIx7KH GnQie+Tx0E3ugetjNsxZhIOTdxFF/CoDIMq/TGWStMDIqSnxvIYELPBWvK4nxIkKixyojp 4aD61JX3YzUm4181VlIa69jCVZtfgl+zHcmQPL+2esj9DsmPKTMGJtpUb4i6IaHD2dqiCO Y1nFizWb+UYPjcLTtRJhSBsWxK32T7tGdN6N2V2BUP5y6darUNTMzQSRAyk9BA== 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 4Vk0HZ57nRz15Br; Tue, 21 May 2024 03:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L3Rckx052747; Tue, 21 May 2024 03:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L3RcTh052744; Tue, 21 May 2024 03:27:38 GMT (envelope-from git) Date: Tue, 21 May 2024 03:27:38 GMT Message-Id: <202405210327.44L3RcTh052744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: cbe2436dda12 - stable/14 - intro.2: Add sys/syscall.h to SYNOPSIS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: cbe2436dda127061a13e5565a5badec02249b2e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cbe2436dda127061a13e5565a5badec02249b2e5 commit cbe2436dda127061a13e5565a5badec02249b2e5 Author: Alexander Ziaee AuthorDate: 2024-05-04 14:54:20 +0000 Commit: Warner Losh CommitDate: 2024-05-21 03:14:13 +0000 intro.2: Add sys/syscall.h to SYNOPSIS MFC after: 1 week Co-authored-by: brooks Reviewed by: brooks, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1192 (cherry picked from commit 69ff2d754c1c8bd9c2b6cea28aa754e9f92f9613) --- lib/libc/sys/intro.2 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2 index 1b84b219fe0e..5b8f437567b8 100644 --- a/lib/libc/sys/intro.2 +++ b/lib/libc/sys/intro.2 @@ -36,6 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS +.In sys/syscall.h .In errno.h .Sh DESCRIPTION This section provides an overview of the system calls, From nobody Tue May 21 03:27:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk0Hc1tVJz5L27p; Tue, 21 May 2024 03:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk0Hb73NGz43DC; Tue, 21 May 2024 03:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWKOp442EqQRb3Twa7RmHS8Zl6WWAa4KsVenf/LezGI=; b=g+l6Q0I2x+doqZ+EWt3oOtYcHc/TM0va4jSIP7lm8TKn3gqrjMqGpigeeXH7hISfqLPLKs v321o2RTTVWQVZWUnOicswRAxdy0kpMUtk/U2NLcfnx85Cyy/Ei6deM3U57+6zF/MePQBl zkcCSGQBiKlccqDdu6T7D2QcKxtOFRi9U57R+ke58rMk4oZvxoz3nTHFadZ/b3IOTF3P73 +YamnbGYifw2ljgsDCERbsYF3AtQnVA49BxmIKlerOhADenEhNjKPIrhFWtlm2yfdFHv0X POW7uFjDGqTBw7MeVWZc9VYr+na+hXo7T8PFru77BUbw9zzMGKg9DriFYXmuTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716262060; a=rsa-sha256; cv=none; b=OftysEoEGk7CK/k78KmOUEj1v+YqHg5HCAW4/ss5FY+FuJv6HkyMSeoTs/Ah8fYEe1EULG /H2r2TL57C0QMX8fI5D892R3w06t6CZPACNQ1vHW+8JlH14nTEPzbF03VAIDrzuTeJF9KI gr6lS9e3XHQnR09qV7VAQXwXQavTnV8XV7ocuP9OnjpIP3afnh1MxvvoF3CwzJolH7J3W8 VJmUUI3CE4pfpHnso/qtBdjQSXMCT2vWnDcDvb8AVDpiT9vPZxu9xbHB6hkTRp7kETqL2z o5hli4B3hrCWksgmh6YJAJ/Tiz72vH4rG63OE9156CM+sfTIwboixnyI+ytzfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWKOp442EqQRb3Twa7RmHS8Zl6WWAa4KsVenf/LezGI=; b=Q4RuRFSgcKdd6jXvCx4aoHDOKwOviBp/VfP1mTsvgxtBRovaXjBARNySNRqovD4SU2SkOP duc/FCzO99pTzYtpzE+xnru3op1hDWo77jnp1BiCnfz92I+HBFcVVUzboQ/bdgQpT/IjsR 4OqxqfwL0xzcQPmCAKhRlygwLH9SXvIxVemPmpGwEt/Uq4eRcgPI8bj0QsQ1sPQIlN/TN7 tRVVTdlzb0yZq/cW0y53aQLdAcK0gjElq/6rS6R1M9FJz36QgHZ7sv2GaaLgZZXME3dSkj +MbSyaTb961dG4HUIMWzubdr0CFo6s+QogKz0AVGn0ke66Wftu1jVWueQbfsxw== 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 4Vk0Hb69xXz15NX; Tue, 21 May 2024 03:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L3Rdjo052798; Tue, 21 May 2024 03:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L3Rdv1052795; Tue, 21 May 2024 03:27:39 GMT (envelope-from git) Date: Tue, 21 May 2024 03:27:39 GMT Message-Id: <202405210327.44L3Rdv1052795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 828e648b26ea - stable/14 - intro.2 as errno.2: Update maximum hard link limit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 828e648b26ea1d3d77a63eea395bba56b5109f2d Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=828e648b26ea1d3d77a63eea395bba56b5109f2d commit 828e648b26ea1d3d77a63eea395bba56b5109f2d Author: Alexander Ziaee AuthorDate: 2024-05-04 14:54:20 +0000 Commit: Warner Losh CommitDate: 2024-05-21 03:15:00 +0000 intro.2 as errno.2: Update maximum hard link limit MFC after: 1 week Co-authored-by: brooks Reviewed by: brooks, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1192 (cherry picked from commit 6dfbe695c3223822734dddc926415a3ba347b42c) --- lib/libc/sys/intro.2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2 index 5b8f437567b8..2232d56707a7 100644 --- a/lib/libc/sys/intro.2 +++ b/lib/libc/sys/intro.2 @@ -229,8 +229,13 @@ system call was issued on a socket, pipe or An attempt was made to modify a file or directory on a file system that was read-only at the time. .It Er 31 EMLINK Em "Too many links" . -Maximum allowable hard links to a single file has been exceeded (limit -of 32767 hard links per file). +Maximum allowable hard links to a single file has been exceeded. +This limit is a filesystem dependent variable +.Po +.Va UFS_LINK_MAX No on Xr ufs 4 , +.Va FUSE_LINK_MAX No on Xr fusefs 4 , and +.Va TMPFS_MAX No on Xr tmpfs 4 +.Pc . .It Er 32 EPIPE Em "Broken pipe" . A write on a pipe, socket or .Tn FIFO From nobody Tue May 21 03:27:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk0Hd19x1z5L1xl; Tue, 21 May 2024 03:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk0Hd0Yrmz43K6; Tue, 21 May 2024 03:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKOSXIccseZuPeaJYz6deNvNUtj5u/BXBuhgpdfQsMo=; b=qXNXHMPkY4yGoQz+K8NTkRhPVpc5+8OJ075p1hyW/zAul0ca4y6B1cSlTkUcoi4MbIBW6Q 3yydGxIEn8hsBPH2vDBHGkjOcweqm2gKcELPdLpT76UFM64TDgnWNycEM1IhQGEy5LKMxC v6EEBM6GAJ3Hdl1Xwhh2cHKDGhFDv+ojGD5oralIeh0FjlrymGvWNe+SZqQ6wKoMWk95cx SrwBlPx19eJngs5lsIYRxARcA0bfluK8GNSvkB7+42CEcqHhKZgSp0rSkvR5SjyZvVRg6j 6Xxv4SZY5SzdnCU2n+Xj9Azn+PK5rYyUmkh+ddy6wdYeiWcFNnMCIK1/V+sKIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716262061; a=rsa-sha256; cv=none; b=ydIVLJRMkEpbFVkcsS8SGt3wkbVK86CTV82ermqKfTlut0M0g65/HzxJ11zHG4LEG7XB+U ebAHSAyA8YE0eFBa4KYYq77s9aOTxcfkqF56H7Nw9yJRht9+T55+p4hRNofuUc6SQdFIhq aobMgj2/13dfG5GpVVXEKTkeZP6C5/zQYyZSxGBVhXYiL19jZxTVGqTEvX97viHKk1IfXA HtYbmv8WPB2nUNfujmJf9SInkJ0X9w/gFzxEpj7lnrfaQw4SY9YeE7iT7zXHBU59q7Pbd4 bOPq1nzBnBl/j/jUBtSDLMl20C3rtaGA7rOdU32QDvKHkSvgZTIs9WQsuLFL1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716262061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKOSXIccseZuPeaJYz6deNvNUtj5u/BXBuhgpdfQsMo=; b=Rxt7FK9VrSoa3uZeqxrptMoUmAy6qEAhb3D3hwng7nv6dUHIguzudQgiwckPj6dVnel6OP tV/CLTQ6Pn0AKd/XBkrcX4By8axK9VZSG866e5Np+xUdRImvXpud0clwjyFTJuXtLtqA2s g92VLhxGy/WbutF4R1asoPvuj2D7hWcEqH7SxAxs/2FBA/ePoz6TigYxBik1bpK/q8Ua49 72PVTaPnPBSvQcYzG3FMdpZQUyV/4/Ur/Eiob8wzdizDhJ5noh8BGMLxBOb6n89pFSz1ua +CdHlPGCLvHQo7+HFUQmywfvk++0kaXCY/poY1R2qTkKr26QnRbSdokofECX6w== 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 4Vk0Hd03t0z14kK; Tue, 21 May 2024 03:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L3Re74052843; Tue, 21 May 2024 03:27:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L3ReCf052840; Tue, 21 May 2024 03:27:40 GMT (envelope-from git) Date: Tue, 21 May 2024 03:27:40 GMT Message-Id: <202405210327.44L3ReCf052840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 5dced4143910 - stable/14 - networking.7 : create network quickstart guide List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5dced41439109368a8f3c9a818fe518542d7063e Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5dced41439109368a8f3c9a818fe518542d7063e commit 5dced41439109368a8f3c9a818fe518542d7063e Author: Alexander Ziaee AuthorDate: 2024-04-17 15:51:35 +0000 Commit: Warner Losh CommitDate: 2024-05-21 03:16:16 +0000 networking.7 : create network quickstart guide Now that the handbook has been moved to ports, I think it's very nice to have a network quickstart guide in-band, in base, in the system manual. If the user uses any of the following terms "man -k {network,networking,wifi,quickstart}" this page will come up, which is I think a very common use case for new users. Currently, this document explains connecting to a basic Ethernet network, a basic wifi network, scanning for wifi networks, and airplane mode, as well as linking to other sections, including the handbook Co-authored-by: Graham Perrin Reviewed by: imp, bcr, freebsd@igalic.co Pull Request: https://github.com/freebsd/freebsd-src/pull/833 (cherry picked from commit 75eda0096bf83b9b88996d9903b5d4e504047eba) --- share/man/man7/Makefile | 5 +++ share/man/man7/networking.7 | 101 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 11246195201c..7f506c1dfc5f 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -47,6 +47,11 @@ MLINKS+= c.7 c11.7 MLINKS+= c.7 c17.7 MLINKS+= c.7 c2x.7 +.if ${MK_INET} != "no" +MAN+= networking.7 +MLINKS+= networking.7 wifi.7 +.endif + .if ${MK_TESTS} != "no" ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc diff --git a/share/man/man7/networking.7 b/share/man/man7/networking.7 new file mode 100644 index 000000000000..869812c05a9b --- /dev/null +++ b/share/man/man7/networking.7 @@ -0,0 +1,101 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Alexander Ziaee +.\" +.Dd April 17, 2024 +.Dt "NETWORKING" 7 +.Os +.Sh NAME +.Nm networking , +.Nm wifi +.Nd quickstart guide to connecting to a network +.Sh DESCRIPTION +In the following examples, it is assumed that we are connecting to Ethernet +with the first interface found by the +.Xr em 4 +driver, and Wi-Fi with the first interface found by the +.Xr iwn 4 +driver, though your hardware will vary. +.Sh EXAMPLES +.Bl -tag -width 0n +.It Sy Connecting to an Ethernet network with DHCP: +.Bd -literal -offset 2n +.Ic # dhclient em0 +.Ed +.It Sy Connecting to a cellular network with USB tethering: +.Pp +Load the USB tethering driver, +.Xr urndis 4 : +.Bd -literal -offset 2n +.Ic # kldload urndis +.Ed +.Pp +Ask for a DHCP lease on the USB tethering interface: +.Bd -literal -offset 2n +.Ic # dhclient ue0 +.Ed +.It Sy Connecting to a Wi-Fi network: +.Pp +Identify your Wi-Fi hardware: +.Bd -literal -offset 2n +.Ic % sysctl net.wlan.devices +.Ed +.Pp +Configure your Wi-Fi hardware as wlan0 interface: +.Ed +.Bd -literal -offset 2n +.Ic # sysrc wlans_iwn0="wlan0" +.Ed +.Pp +Set that interface to negotiate a DHCP lease with +.Xr wpa_supplicant 8 : +.Bd -literal -offset 2n +.Ic # sysrc ifconfig_wlan0="WPA SYNCDHCP" +.Ed +.Pp +Enter the details of the Wi-Fi network: +.Bd -literal -offset 2n +.Ic # wpa_passphrase \(dqmyssid\(dq \(dqmypassphrase\(dq >> wpa_supplicant.conf +.Ed +.Pp +Restart the network interface daemon: +.Bd -literal -offset 2n +.Ic # service netif restart +.Ed +.Pp +.It Sy Scanning for Wi-Fi networks: +.Bd -literal -offset 2n +.Ic % ifconfig wlan0 scan +.Ed +.It Sy Airplane mode: +.Bd -literal -offset 2n +.Ic # service netif stop +.Ed +.El +.Sh SEE ALSO +.Xr bsdconfig 8 , +.Xr dhclient 8 , +.Xr ifconfig 8 , +.Xr wpa_passphrase 8 +.Pp +The Advanced Networking chapter of the +.Fx +Handbook. +.Sh CAVEATS +Shell Special Characters in the +.Ar SSID +or +.Ar passphrase +will need to be escaped for +.Xr wpa_passphrase 8 , +commonly using +.Ql \e , +see the manual page for your shell for more details. +.Pp +Currently +.Ql Ic service netif restart +does not restart routing. +A common workaround is to issue +.Ql Ic service netif restart && service routing restart +instead. From nobody Tue May 21 05:54:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vk3YK4KYvz5LLN4; Tue, 21 May 2024 05:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vk3YK1vCrz4L7k; Tue, 21 May 2024 05:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716270885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOMtdVuUOQ9eR4jJc0ME7+e2/eCo4BJelMVCEOIPU68=; b=DA2WivopHQHhEKizwFYRCAphA4/BHYq/H//j7FprmuG2HgHlALfmbwnEQ75uCO5wKqd/Rl UT8lPCNcoMhHHXvSJTPxKvbfOiMczxF/tWBbib0jo3FQClQ/tlvjaXiFbQoDmmBBc8RMEU 9GD3p8tmjQplfqccExenZxB+qV8638lUU8KdeBLoucZi7m5hAShxUPTovJKGKlv52123Wd /NwWdsb/JWOB3fBYcNvUGwjN/h9xM2+OQEVAy07HC0lGBBs3uRcsbd3OaTn17q+Ci1zORv P908yb9PFs0QHCEj+aqgqax51g0BjUQQ0OIVXof2o4wMS3ie4REuLM/BswWaAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716270885; a=rsa-sha256; cv=none; b=q9Qv7MimI+CIFZo7wBjFj3BvmKssEz3kFKgWQLGGM6uDsAp8j4/B23dr6e2f6eU11Oq8xp GrgFuiJ5x782mk/YirqatcXrl9rgkbs77wNMPvdH2tupWxmRq+Km7wq4iCtg3jb+EOEXOJ MmhaYW2YjRoDMNMmT4IxJqpEjjL24XJJuky+Ntp7wRgxuQmKICCo/92TrnbX4ijtYo3G+2 Xt2F4unO8uj+xtBVe11C6DVYYe++RbQKENhkaS508BBUiUUkTIx6dwnaD6QV7rD9lxwSDa 7cxtRZm31xkFrZcHkncf6evLNqYcn375KKFKH/iWUM7uGNh0jzsW3egxC/HaMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716270885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOMtdVuUOQ9eR4jJc0ME7+e2/eCo4BJelMVCEOIPU68=; b=uWuNzuuq3h4v0f1AmYFe6SmZiZOG31mbBquDGAyXDw1XLqPe42OiP/OyGo7vPhMMbLpX6e 3DrJMFl1Ry0MXcX+wtTTlO+ITb70PReMvEtxIy5rt4VSZ42dtZlwgJHMC03JH9KIqeSw00 NF7865YSw59b2l412f5Hcx8b1wN/otnurmG4tmAeZTMMcnzoYyFBcQj7J47e3XgwnHhjDV QO6TnnWZf6J71l58BfEiHVhsHJ+CREqJrUpvrjUb6gBzl/OqPID7SUhVYEbsfJh83S914C 6laG1CIAw8crQOhOn+oCdR5mv5CU+0Ne0/WX6IICQFE0JPknEV/V2W+JaNTJIA== 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 4Vk3YK0Yzlz18Wk; Tue, 21 May 2024 05:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44L5siWs004396; Tue, 21 May 2024 05:54:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44L5siAj004394; Tue, 21 May 2024 05:54:44 GMT (envelope-from git) Date: Tue, 21 May 2024 05:54:44 GMT Message-Id: <202405210554.44L5siAj004394@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: 8e5e42d54ad3 - main - Add man page for the ice network driver. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8e5e42d54ad3093e38263814d1f3e7d8406d5421 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8e5e42d54ad3093e38263814d1f3e7d8406d5421 commit 8e5e42d54ad3093e38263814d1f3e7d8406d5421 Author: Mathieu Simon AuthorDate: 2024-05-21 05:49:50 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-21 05:53:02 +0000 Add man page for the ice network driver. PR: 262892 MFC after: 3 days Reviewed by: concussious.bugzilla@runbox.com, erj Differential Revision: https://reviews.freebsd.org/D45270 --- share/man/man4/Makefile | 2 + share/man/man4/ice.4 | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 252 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4d3a5273d726..164efe3ddf66 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -214,6 +214,7 @@ MAN= aac.4 \ ${_hwpstate_intel.4} \ i2ctinyusb.4 \ iavf.4 \ + ice.4 \ ichsmb.4 \ ${_ichwd.4} \ icmp.4 \ @@ -711,6 +712,7 @@ MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ice.4 if_ice.4 MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 new file mode 100644 index 000000000000..da46c758479c --- /dev/null +++ b/share/man/man4/ice.4 @@ -0,0 +1,250 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Copyright (c) 2019-2020, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms of the Software, 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. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this Software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.Dd May 20, 2024 +.Dt ICE 4 +.Os +.Sh NAME +.Nm ice +.Nd "Intel Ethernet 800 Series Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iflib" +.Cd "device ice" +.Ed +.Pp +To load the driver as a module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ice_load="YES" +.Ed +.Sh DESCRIPTION +.Ss Features +The +.Nm +driver provides support for any PCI Express adapter or LOM +(LAN On Motherboard) +in the Intel Ethernet 800 Series. +As of this writing, the series includes devices with these model numbers: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your adapter. +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +This value coincides with the maximum Jumbo Frame size of 9728. +.Pp +This driver version supports VLANs. +For information on enabling VLANs, see the +.Pa README . +.Pp +Offloads are also controlled via the interface, for instance, checksumming for +both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can +be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Ss Additional Utilities +There are additional tools available from Intel to help configure and update +the adapters covered by this driver. +These tools can be downloaded directly from Intel at +.Lk https://downloadcenter.intel.com , +by searching for their names, or by installing certain packages: +.Bl -bullet +.It +To change the behavior of the QSFP28 ports on E810-C adapters, use the +Intel EPCT (Ethernet Port configuration tool); installed by the +.Em sysutils/intel-epct +package. +.It +To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) +Update Utility for Intel Network Adapter 800 series; installed by the +.Em sysutils/intel-nvmupdate-100g +package. +.El +.Sh HARDWARE +Most adapters in the Intel Ethernet 800 Series with SFP28/QSFP28 cages +have firmware that requires that Intel qualified modules are used; these +qualified modules are listed below. +This qualification check cannot be disabled by the driver. +.Pp +The +.Nm +driver supports 100Gb Ethernet adapters with these QSFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 E100GQSFPSR28SRX +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 SPTMBP1PMCDF +.It +Intel\(rg 100G QSFP28 100GBASE-CWDM4 SPTSBP3CLCCO +.It +Intel\(rg 100G QSFP28 100GBASE-DR SPTSLP2SLCDF +.El +.Pp +The +.Nm +driver supports 25Gb and 10Gb Ethernet adapters with these SFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 10G/25G SFP28 25GBASE-SR E25GSFP28SR +.It +Intel\(rg 25G SFP28 25GBASE-SR E25GSFP28SRX (Extended Temp) +.It +Intel\(rg 25G SFP28 25GBASE-LR E25GSFP28LRX (Extended Temp) +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with these SFP+ modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSR +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG1P5 +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG2P5 +.It +Intel\(rg 10G SFP+ 10GBASE-SR E10GSFPSRX (Extended Temp) +.It +Intel\(rg 1G/10G SFP+ 10GBASE-LR E10GSFPLR +.El +.Pp +Note that adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. +.Pp +This is not an exhaustive list; please consult product documentation for an +up-to-date list of supported media. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +See the +.Xr iflib 4 +man page for more information on using iflib sysctl variables as tunables. +.Bl -tag -width indent +.It Va hw.ice.#.enable_health_events +TBW +.It Va hw.ice.#.debug.enable_tx_fc_filter +TBW +.It Va hw.ice.#.debug.enable_tx_lldp_filter +TBW +.It Va hw.ice.#.debug.enable_health_events +TBW +.El +.Sh SYSCTL PROCEDURES +.Bl -tag -width indent +.It Va dev.ice.#.fc +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is +TX pause. +.It Va dev.ice.#.advertise_speed +Allows one to set advertised link speeds, this will then cause a link +renegotiation. +.It Va dev.ice.#.current_speed +This is a display of the current setting. +.It Va dev.ice.#.fw_version +Displays the current firmware and NVM versions of the adapter. +.It Va dev.ice.#.ddp_version +TBW +.It Va dev.ice.#.requested_fec +TBW +.It Va dev.ice.#.negotiated_fec +TBW +.It Va dev.ice.#.fw_lldp_agent +TBW +.It Va dev.ice.#.ets_min_rate +TBW +.It Va dev.ice.#.up2tc_map +TBW +.It Va dev.ice.#.pfc +TBW +.El +.Sh INTERRUPT STORMS +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr iflib 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.2 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Intel Corporation Aq Mt freebsd@intel.com . From nobody Tue May 21 13:41:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkFvT3gGdz5LND5; Tue, 21 May 2024 13:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkFvS4yysz4HWk; Tue, 21 May 2024 13:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716298868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ngt/fW5tRLRiX6gG+wPpKzlVQDL/uOUGtqMLAx3eDzI=; b=egSc3XKIYiPfbZ+iGZpYV2KJgqvtzzXm4eMn5zBjH9JaGck7p1cSCzBZUMigiG17ua2IKI SE0hThzzU30ce/9cfN9AfLluxeyRodmvo8LA0K3V34w+rfAdJOmNcBleBA2o7fwlLlw7DA robZNROfVc4DyR3BOdwe2gMYbmzqbltNoI3hXjUcY50D8jnj6NWK/P1y9j7Vf5YtON+rMX Ba8u/4xGcNF/6zZB+0eZy5h0ODUIL6QAgtXllRZ9+JX8OHPlUOZEfA0VHuwBZsi1Y49INi f6Nn4jzDKI1JmW7BaUnlsUEyUD1YS/5tMkMeTrdcd/IiAwurz+xHWh9M8cONmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716298868; a=rsa-sha256; cv=none; b=Z6fxagEaEJsIzkc1mE/U00CAaa31r6hCgw5ZuqyjeX4EXURJ3RvAD6DWVEdizvthwJN8Kl rueAnwqBaoz0JwPNVgtkmlHyA7l8DkiXSFxPAet0kbnUuWdqGX2DPfKjRlnxu84fpIPwYe Oo/MQkb3sDmaIJacvgltVg992B6MTRf5r6xJAjb/tpbOlZp6fvL+LldWYA1wtYhwpcitbk mGwwcQXpq07p4gcbcxCWSl2MIuf+UlPdOoKZBfzUlLCLjywsUSrgS8ZBnd+cyNJpjG6Er2 ZIcbeIpwOsLi6QRimzgWWbKJIk3pE1bAlprACih5Ejn7YmVncM2oOFWunsnOOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716298868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ngt/fW5tRLRiX6gG+wPpKzlVQDL/uOUGtqMLAx3eDzI=; b=cisBA886sxAILY/xw3yeiypJrAj07D0l+ZdWBc6dGRdRXW5rv8k3neH/srRGR53cohlMAz Ms6QzypR5tqrYac1tCbZc+ZJfsQZJGCsCFFzWsTgWkkXwRNqGlEsEV8xoFkmmnxnkMmhB6 ZXmdnQg3fzlsJwRdF1UJUMNaSTEp7sT5WchG7TXizh2wxsUnK1fG+QChZU7Bm0daoeeX1U N+5RmeovdslOMGTTQBr7wJlpK3ilQyGtvCqdxIUlQ0/T+HNuip0sxL9XU5lI3H9ICpEaCw 2SdGSE7bvc8HL7D2LBTdJUaCSstN5oKEVRaHrzUIGsy1DNQ0Tnvq88dSovzLXw== 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 4VkFvR4WC7zP4c; Tue, 21 May 2024 13:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LDf77C091745; Tue, 21 May 2024 13:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LDf7E2091742; Tue, 21 May 2024 13:41:07 GMT (envelope-from git) Date: Tue, 21 May 2024 13:41:07 GMT Message-Id: <202405211341.44LDf7E2091742@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: 7975f57b7e14 - main - uipc_shm: Fix double check for shmfd->shm_path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 7975f57b7e14b146ca730421ef9e2094c242e9c0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7975f57b7e14b146ca730421ef9e2094c242e9c0 commit 7975f57b7e14b146ca730421ef9e2094c242e9c0 Author: Ricardo Branco AuthorDate: 2024-05-20 13:09:08 +0000 Commit: Ed Maste CommitDate: 2024-05-21 13:39:53 +0000 uipc_shm: Fix double check for shmfd->shm_path Reviewed by: emaste, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1250 --- sys/kern/uipc_shm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 1136f34a6f85..c83455d1e70b 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1910,21 +1910,19 @@ shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list) kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; kif->kf_un.kf_file.kf_file_size = shmfd->shm_size; if (shmfd->shm_path != NULL) { - if (shmfd->shm_path != NULL) { - path = shmfd->shm_path; - pr_path = curthread->td_ucred->cr_prison->pr_path; - if (strcmp(pr_path, "/") != 0) { - /* Return the jail-rooted pathname. */ - pr_pathlen = strlen(pr_path); - visible = strncmp(path, pr_path, pr_pathlen) - == 0 && path[pr_pathlen] == '/'; - if (list && !visible) - return (EPERM); - if (visible) - path += pr_pathlen; - } - strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); + path = shmfd->shm_path; + pr_path = curthread->td_ucred->cr_prison->pr_path; + if (strcmp(pr_path, "/") != 0) { + /* Return the jail-rooted pathname. */ + pr_pathlen = strlen(pr_path); + visible = strncmp(path, pr_path, pr_pathlen) == 0 && + path[pr_pathlen] == '/'; + if (list && !visible) + return (EPERM); + if (visible) + path += pr_pathlen; } + strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); } return (0); } From nobody Tue May 21 14:53:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkHWL1tR3z5LX34; Tue, 21 May 2024 14:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkHWL1Q0lz4RMP; Tue, 21 May 2024 14:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716303230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rvw2aiOUYKBydkf4BKjxg5CwRXDnMKzUyX6t3SKdTA=; b=JVsfPBuN4eODBlkLb+C1tgoQ2mAE0KkJoNV9F2HrW6ZqOUHwqQTX2U0D7l83o5g2Or8JGJ tdzQv/TXuclFYmcP5ZU8Z9e4p5qxfJLWY3dE43gq63Szy6rGMoKICJ6dItAd/jQpzbGmkd dUjmjYRqegs/IHihXPu7Mc5SKSvu+nfLKahjoDKntfrjm7UZ6CIxWYMmzY2LF+Xy/1RcIW PhFodTCOVXOHk5E0jB0QmVtsiGZrSAXQMNsE7lJSAN/ZEpIisp5uMRrk1rm0T4Of4fPvhg iyG2cVejBt33FfKT8DdiRypyjAH3N4Dki8raA+9Hm0bxHb7bOFsMaR9qrlGQ6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716303230; a=rsa-sha256; cv=none; b=XbGL6kk9lWcO6by4SM8Rv1/QD5vIzRLIsFxg/Ra+/0/8R2VjzpRbnB/C+wUD7awnGZB2Km zjaLfkJQBH8nZoMuqNwYdMeTYnOjJXBIMpeXpFLe+HsJNaFZH5rHPK9U/Z/x6sfEbJWSIk ngUtSpwszvLpnGh029mSCSz+q4bOy6zaXbTs/++PjgYO/Rjw3XOfa34X3wNBTdsRnlACzf EyJGV9F22q4Q3wLMMUzjQhgNiOb5uVAywebP7oeLqGi2GJVdXXDElDCebDCeeBKByDvPfY SUYPyWSsh4f31Mk9BoTMTscaXGOFYzUOvStbCg6IWyNdiJpv0N7NXkr0DquKrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716303230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rvw2aiOUYKBydkf4BKjxg5CwRXDnMKzUyX6t3SKdTA=; b=YODws0lQf+nTTggEE2qTphGkaEva0UaL6eSPJMbFbwGB6jyasKtLu/md9VLQ88xjILrXaJ fMT5/TpWKS2vWgh8DFQeeH69Lpt0BRm1tmzfmoRe3QA/pol+Ncg50uhSiftdfJn+zgHGdZ Ic2xHkYfDo7ryv1Kt4qSU755J6sDSiw7ninCmgdhbsmN9Wb/9Em2ksnRbaVaQcyrLsXnc9 5j/r+d4G+xNsuVmGUhjwWcTPmDYGt6n4/v0BrG27g6CGMZElj7bX+smB7NbaEVRJiujyHP lSH74ezKhkElP9zTmiilYfyzIohteaH/CeozxZvjz56vS2vs/kA8n3DJdSUJQA== 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 4VkHWL11r0zRFy; Tue, 21 May 2024 14:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LEroXV017251; Tue, 21 May 2024 14:53:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LEroch017248; Tue, 21 May 2024 14:53:50 GMT (envelope-from git) Date: Tue, 21 May 2024 14:53:50 GMT Message-Id: <202405211453.44LEroch017248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 48edad2edf6e - main - fix (nuageinit): SSH keys are not handled in metadata but in userdata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48edad2edf6eb7a539e40dad8e1f87e3fa4973fd Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=48edad2edf6eb7a539e40dad8e1f87e3fa4973fd commit 48edad2edf6eb7a539e40dad8e1f87e3fa4973fd Author: Jeremy Collin AuthorDate: 2024-05-21 14:52:23 +0000 Commit: Baptiste Daroussin CommitDate: 2024-05-21 14:52:42 +0000 fix (nuageinit): SSH keys are not handled in metadata but in userdata MFC After: 1 day --- libexec/nuageinit/nuageinit | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 08224061d1b1..df637bbc5064 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -164,13 +164,6 @@ if citype == "config-2" then nuage.err("nuageinit: error parsing config-2: meta_data.json: " .. err) end local obj = parser:get_object() - local sshkeys = obj["public_keys"] - if sshkeys then - local homedir = nuage.adduser(default_user) - for _,v in pairs(sshkeys) do - nuage.addsshkey(root .. homedir, v) - end - end nuage.sethostname(obj["hostname"]) -- network From nobody Tue May 21 16:36:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkKpB5sL3z5LlB4; Tue, 21 May 2024 16:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkKpB5Dtrz4gw9; Tue, 21 May 2024 16:36:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716309410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ez2netc/SXcJOnnfDfsmqDcECY/rC9s8BMeuwZbU38=; b=kNEIrfyls5UCjzslO2qktV89Q1n1VGgXdym8B+hcoBk+uqaCPwlkyaY9W3mSu0wuWZ0o08 u/K4ioJNKeAbnJkcgASyxTkgPSZcU2WjYurSejma0R+OguCfrHyYWg/9mhZum8Wk2d1Nhr gJrAavksLTe5TEwWX2z9XLWZ5qRrTdnqagIih5CrV/NdA6O9M6WIEfHiWiTvWVBanZ1tyo TkXdlRL+3L+qP0m2dByNniJn+Pg0fJVSODr1Zq03pJkXbE28Yoz/ZUZTe8ryhE+pMZC82y lys1zii0yHjkJe9IYpAouPptzNoK7Mxxcpl8NnsZCHqNpEFeeWt4isNz9m4FOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716309410; a=rsa-sha256; cv=none; b=ymdhce9iu7hKxRfB+HlGxK5e689cAlwSOOUDGWg2qt7gdcQdraZvVEFlg+rJFjftzaqran HQc/MBnk1sbUgYz4lxj8cW4elUCQeHSGDHUGchCw98gXWjUXiXzM2OnKhHDCoWy/V4NF9u 3jqU6FshNc3W0W1has8VO0cI3Wd6L98pqa3h1idrP6wHUEfmSas8Vo87EtY+6tDcAL3sJL WJOzlWz6T3KkArC93I9z+yyj943crSlIUfbB9iFNMF1euQeqoSo7xtrvpfzH7SILU4qrD4 4xXMKS02feM7Msfj5p9fNp3Za5E+EZe6fU8b5ewYAM27BoGr6LAVgKQBlaq8Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716309410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ez2netc/SXcJOnnfDfsmqDcECY/rC9s8BMeuwZbU38=; b=vuF1OcHpW7T5DK29Nswhe4kxBWzs1PtAPJPcdTejjGOMD+gBlFWBZRHYOGPt8WtyWAxrYt GwAr6j34SNGyt/+4zXNiLjLPmpx85yqHftnjyM24o1ub74pvJ6A34aFv07T3Q5S3LXapm2 j5bUNCtNmdGrbYGXpc1k6FC8zNaNW6TAwBUXXJUWncrAFTcJWESmCYZl+gfpBorLO8uei1 l0WzaT9xiL8fo81463LeglVJly5Q1UB4tFw5SgnkndCqpbnADPsFb9kPtzErdoxYQcXLoh m30XBHfEGLS2iBhxBxjUJKOPPs8P5A/1wEasclNYpdUde1es8nCkBRNIV7I66A== 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 4VkKpB4qhSzV78; Tue, 21 May 2024 16:36:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LGaoTb086646; Tue, 21 May 2024 16:36:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LGaoii086643; Tue, 21 May 2024 16:36:50 GMT (envelope-from git) Date: Tue, 21 May 2024 16:36:50 GMT Message-Id: <202405211636.44LGaoii086643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 76df3c57a0ab - main - ifconfig: Redo fix vlan/vlanproto reconfiguration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76df3c57a0abfd24652bfa33982ba136d9d0575b Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=76df3c57a0abfd24652bfa33982ba136d9d0575b commit 76df3c57a0abfd24652bfa33982ba136d9d0575b Author: Zhenlei Huang AuthorDate: 2024-05-21 16:35:01 +0000 Commit: Zhenlei Huang CommitDate: 2024-05-21 16:35:01 +0000 ifconfig: Redo fix vlan/vlanproto reconfiguration When the if_vlan(4) interface has not been fully configured, i.e., a bare interface without a physical interface associated with it, retrieving the current settings of it and unconditionally overwriting `params` will result in losing vlandev settings in `params`. That will lead to failing to associate the if_vlan(4) interface with the requested physical interface and the false report 'both vlan and vlandev must be specified'. Fix that by checking if the vlan interface has been fully configured. The basic VLAN test is slightly modified to cover this case. PR: 279181 Reviewed by: kp Tested by: Mike Tancsa Fixes: b82b8055ad44 ifconfig: fix vlan/vlanproto reconfiguration MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45283 --- sbin/ifconfig/ifvlan.c | 31 ++++++++++++++++++++++++++----- tests/sys/net/if_vlan.sh | 10 +++++++--- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index a79ea35bc14b..0a2603f1736f 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -60,6 +60,7 @@ #include "ifconfig.h" #define NOTAG ((u_short) -1) +#define NOPROTO ((u_short) -1) static const char proto_8021Q[] = "802.1q"; static const char proto_8021ad[] = "802.1ad"; @@ -67,7 +68,7 @@ static const char proto_qinq[] = "qinq"; static struct vlanreq params = { .vlr_tag = NOTAG, - .vlr_proto = ETHERTYPE_VLAN, + .vlr_proto = NOPROTO, }; static void @@ -157,6 +158,8 @@ vlan_create(if_ctx *ctx, struct ifreq *ifr) errx(1, "must specify a tag for vlan create"); if (params.vlr_parent[0] == '\0') errx(1, "must specify a parent device for vlan create"); + if (params.vlr_proto == NOPROTO) + params.vlr_proto = ETHERTYPE_VLAN; ifr->ifr_data = (caddr_t) ¶ms; } ifcreate_ioctl(ctx, ifr); @@ -173,6 +176,8 @@ static void vlan_set(int s, struct ifreq *ifr) { if (params.vlr_tag != NOTAG && params.vlr_parent[0] != '\0') { + if (params.vlr_proto == NOPROTO) + params.vlr_proto = ETHERTYPE_VLAN; ifr->ifr_data = (caddr_t) ¶ms; if (ioctl(s, SIOCSETVLAN, (caddr_t)ifr) == -1) err(1, "SIOCSETVLAN"); @@ -196,8 +201,16 @@ setvlantag(if_ctx *ctx, const char *val, int dummy __unused) errx(1, "value for vlan out of range"); if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) { - vreq.vlr_tag = params.vlr_tag; - memcpy(¶ms, &vreq, sizeof(params)); + /* + * Retrieve the current settings if the interface has already + * been configured. + */ + if (vreq.vlr_parent[0] != '\0') { + if (params.vlr_parent[0] == '\0') + strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ); + if (params.vlr_proto == NOPROTO) + params.vlr_proto = vreq.vlr_proto; + } vlan_set(ctx->io_s, &ifr); } } @@ -230,8 +243,16 @@ setvlanproto(if_ctx *ctx, const char *val, int dummy __unused) errx(1, "invalid value for vlanproto"); if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) { - vreq.vlr_proto = params.vlr_proto; - memcpy(¶ms, &vreq, sizeof(params)); + /* + * Retrieve the current settings if the interface has already + * been configured. + */ + if (vreq.vlr_parent[0] != '\0') { + if (params.vlr_parent[0] == '\0') + strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ); + if (params.vlr_tag == NOTAG) + params.vlr_tag = vreq.vlr_tag; + } vlan_set(ctx->io_s, &ifr); } } diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh index 675ed0090e8c..458e3cc36bc6 100755 --- a/tests/sys/net/if_vlan.sh +++ b/tests/sys/net/if_vlan.sh @@ -22,8 +22,12 @@ basic_body() jexec alcatraz ifconfig ${epair_vlan}a up jexec alcatraz ifconfig ${vlan0} 10.0.0.1/24 up - vlan1=$(jexec singsing ifconfig vlan create vlandev ${epair_vlan}b \ - vlan 42) + vlan1=$(jexec singsing ifconfig vlan create) + + # Test associating the physical interface + atf_check -s exit:0 \ + jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 + jexec singsing ifconfig ${epair_vlan}b up jexec singsing ifconfig ${vlan1} 10.0.0.2/24 up @@ -37,7 +41,7 @@ basic_body() # And change back # Test changing the vlan ID atf_check -s exit:0 \ - jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 + jexec singsing ifconfig ${vlan1} vlan 42 vlandev ${epair_vlan}b atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1 } From nobody Tue May 21 16:49:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkL4Z6fCFz5LmVJ; Tue, 21 May 2024 16:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkL4Z5J4Lz4jl8; Tue, 21 May 2024 16:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716310158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LkPpmJj1us617NHljWfbfv2Dyo1ZVGBYoC99r+MwaOw=; b=wN8nQnA+zpTiPeWSOl9btvvsDsM/25oGlRVg51RVX7M/8vtO4HqK+C3bVZM6+yROPfz+Me r3kgbi/fFuektR+fEkfI/fGvNmKPfrYCxVcu/voyrt87TSEek1p0z4PwPofBs3Z9TqXVev v3xAmMTOFzplXIcWtK8HxblCxZLGvbRHdGL8ur8y6cZw7WZZEo1kpA9hPEfRkRoI3bZSvs 9pO8CjYUA4wqR7CwuxkRxurh4SPnDjljmetDuaa55V90BYQjOG8NEOzA9rVHEJkGWiGkoX uZ69HA8Coy87X7aF9fkumv3F+DBYw5P5fiHgTtGpyN5HX0B5Zu0juMieaeT45g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716310158; a=rsa-sha256; cv=none; b=Kvi4LPc0iUEVtdB34WANRK1rfixfkF08EXAsioKseENSWnNaKKRzCT2bnKREOp7k7Fxa+4 Oc7zEpmXeQNHXwJ9CJ/WPzNmu88uRyOM0+fIGlTPeAJbSZsTps0WOICyebxRlzwpy1H5LD YorCaCcxSrmO/t8X02a8gQPbyN9W7OweL/sY+VWJtFHWNI7YFMha2Mq2iD3RBSjr0H5FV2 8DSeiUe5T093p2n6JT7P+RNRVO22uWNcVjdlW8JOJkrN6h+3dIomtNOtsgxxBFTBxvPHGo 6SWkqlzqShjGKLsvuwx9Xa2m3/aVpPs7q6X3HonTxfXBAxpQ8UTRx4aOWziHRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716310158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LkPpmJj1us617NHljWfbfv2Dyo1ZVGBYoC99r+MwaOw=; b=nro0QlTA7qOcd0zlQOONs3rHAZCecEYXzSum30t8m1dTYsuL2X1Wh2Oe7c0WqyJqqK2Ysw qXsD2FfUEz7H050yo7DG1biKmbXrdGb2lScVhwo2856Nn9WuWGb1I4bRYxeBxpM0FQ4qy1 jwAyQ3jOVvtQqju0OC3zjfiUnTqZg0EdsAWGQx7ztRdfulRjZJcGOcPjWVEmImuSpa0J67 lGgROqUZIvClqGhRjopQ1NJx+HdfK8oO6zqKRWLKSexRt/cTIOmLoSt558c0zaLv5Gr3S+ +UGawKEHv2TXwV5KiGrsw8o71nb/rR073H8ppIDFpN82krb66Ow8vIWGWkvEog== 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 4VkL4Z4nvgzVB0; Tue, 21 May 2024 16:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LGnIuA004693; Tue, 21 May 2024 16:49:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LGnIYq004690; Tue, 21 May 2024 16:49:18 GMT (envelope-from git) Date: Tue, 21 May 2024 16:49:18 GMT Message-Id: <202405211649.44LGnIYq004690@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: 4ebf794a08de - main - cryptocheck: Don't test Chacha20-Poly1305 with an IV size of 8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4ebf794a08de04ebf1c520f07bff3f8fdf48819a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4ebf794a08de04ebf1c520f07bff3f8fdf48819a commit 4ebf794a08de04ebf1c520f07bff3f8fdf48819a Author: John Baldwin AuthorDate: 2024-05-21 16:42:12 +0000 Commit: John Baldwin CommitDate: 2024-05-21 16:48:50 +0000 cryptocheck: Don't test Chacha20-Poly1305 with an IV size of 8 OpenSSL 3.0+ doesn't support an IV size of 8 either for the Chacha20 stream cipher or the AEAD combination with Poly1305. This did work previously with OpenSSL 1.1. Reviewed by: markj Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D45280 --- tools/tools/crypto/cryptocheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index 2db283e4f65b..ef3e225e94f6 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -136,7 +136,7 @@ * aes-ccm128 128-bit AES-CCM * aes-ccm192 192-bit AES-CCM * aes-ccm256 256-bit AES-CCM - * chacha20-poly1305 Chacha20 with Poly1305 per RFC 8439 + * chacha20-poly1305 Chacha20 (96 bit nonce) with Poly1305 per RFC 8439 */ #include @@ -253,7 +253,7 @@ static const struct alg { .evp_cipher = EVP_aes_256_ccm }, { .name = "chacha20-poly1305", .cipher = CRYPTO_CHACHA20_POLY1305, .type = T_AEAD, .tag_len = POLY1305_HASH_LEN, - .iv_sizes = { CHACHA20_POLY1305_IV_LEN, 8 }, + .iv_sizes = { CHACHA20_POLY1305_IV_LEN }, .evp_cipher = EVP_chacha20_poly1305 }, }; From nobody Tue May 21 17:53:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkMW64gv5z5Ltn1; Tue, 21 May 2024 17:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkMW646mDz4rGY; Tue, 21 May 2024 17:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qUHgV+dvTAZhZcffN0nKM/1XFfQGiZR9DD/U23+2cpk=; b=UOFBk6xYSM2TM5Gv0lfmv/f1wyT/PU5RbWxF1dFxIq41TQDnrJ/qbUQDDb4uk+0Gb5SNwN ODaTSRyx5GOcX/MCOBylKLQSMTf3Luu0d0BR6sfguK4UlfRMP5ERLzO0bIqVspQ76/UaYl 64rArAybvEyxcYEQqriNqrCsjy9Fr6NSqF55jrpScXXx2aT+/ej0Ff+rkIbW/5mfydkYZg uIRKVRBIHMnm7GVA296Ls0q8BZ6Y56kaceJv0tl9i3LwG8sZjVlGNQB5lpcWxG34jDNHKQ jefLQniKAK6DTAfS0+KrNMZ/YpGSQnC/HSZlLs2KK5laG4R9rGrEMesidlCkGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716314034; a=rsa-sha256; cv=none; b=X5A9zMFA1ejvVQPxawIzfD8Cel3yVgGaaZBNK/64XTDjBvfJNQcBtgTHqY/0JX6kc3XYDX 6j1R5LfP2q0d9CtHG0ljHwP8zmfO3pNCd0iI3bhecQGmlkO4XsSK6Ex6K+bjhmXZgLC3sg rkDQw++Imth4Gz5aNKeCKqMqGqZhNiF/BR4Uvv9GVepXGGPAO6rw0pEHEA9e8f8qzutstq igFmnTkHpMvUBLGq6lwU4Zda5bkhv9DOdg2hbG2Y27YGVjwkwAb5SaWN2q44CWP3YGOq2D CxLwIowNfDTRtha4G+oYicvg/yA3iIA48ODj9P2lWDSn3KhyfjpPqvikiylG2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qUHgV+dvTAZhZcffN0nKM/1XFfQGiZR9DD/U23+2cpk=; b=E7uAUHIiQcqXSxJt4V6yrFxtwYIn2SL0E8OVrFAu1MHB7PahuduXz/jcWvviWPMYvBBk3f T1bPcWN8/4+f7aonSCIxG/FrbVHmwg5LA2HzkafPWkJVZi4tVctrbvXEMLKiiGT07Ufewh aUhHI8GB2tbf7IG7xB7lx+QuN9M0CPnqS6pVilH89T27HQ8sSNLwqJ6w5mjpFSpWiOYDL8 mplNkrB5Y6+ZKNXnItlrayO3CkY66aNtqMIWw5GqxyjDgDelMIuUABoCy5Q8c+X7+cUvjA a2bZo34i06PDOldpmp9C0Y0NtLYx14VAURRfhTJnc+TnQPEVi4TRsEaBnQwMxw== 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 4VkMW63jm4zXbJ; Tue, 21 May 2024 17:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LHrsml021605; Tue, 21 May 2024 17:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LHrsWA021602; Tue, 21 May 2024 17:53:54 GMT (envelope-from git) Date: Tue, 21 May 2024 17:53:54 GMT Message-Id: <202405211753.44LHrsWA021602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 8a15d5e7223d - stable/14 - sound: Get rid of redundant assignments in chn_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8a15d5e7223d0df2cbba63ad0b1ea453d528e711 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8a15d5e7223d0df2cbba63ad0b1ea453d528e711 commit 8a15d5e7223d0df2cbba63ad0b1ea453d528e711 Author: Christos Margiolis AuthorDate: 2024-05-20 14:14:17 +0000 Commit: Christos Margiolis CommitDate: 2024-05-21 17:45:30 +0000 sound: Get rid of redundant assignments in chn_init() c is allocated with M_ZERO. Reported by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45273 (cherry picked from commit 2db2292dac7331be5414f86c3ef7863c7b6a4ac6) --- sys/dev/sound/pcm/channel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 846885b9d729..039d9abb9da2 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1261,8 +1261,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, bs = NULL; CHN_INIT(c, children); CHN_INIT(c, children.busy); - c->devinfo = NULL; - c->feeder = NULL; c->latency = -1; c->timeout = 1; From nobody Tue May 21 17:53:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkMW75PyHz5LtpX; Tue, 21 May 2024 17:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkMW74lCdz4rBX; Tue, 21 May 2024 17:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Dv8lWNAK85oNlprZwpGG8BCLI1rrJK3rTAo9D6TDJM=; b=QsR1pRqF66vWSH+1xRAFbXmmZ27avLMeCanWf1e69wuVlGGGznDsB3ENI4Po+1nAOJYwRe 2vAEJs/zsZz5nsovH+7SOqpHh26GWzPajwF+lkIPZZT3RchpW8F/qyvhKewJqd8FFTjzyh 9w+Ko8zYlqYgm6C0Q3co1Wpj+/wYRkFY0Y+eXQ5XZM0zlJ8ipmFJZfCt14Xn6vpkgOL462 sIhBYMqngLa7erV4HlcKvRpiM0tR3A84QhpSCOKqm2lMNtMkcM+MC2pEEfAyVcd6ea+cAy EkMH5vDUS5ITe4yNrMlNpXnF7Hk5eC4ZrKECrJWQ+acRO1OkitqFcRekvT9Q3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716314035; a=rsa-sha256; cv=none; b=tyzR8cLtZNP0a+r/77TCWBVyxSvJOmDkoLLuvnX8QyLDWmNpxD5rmh+aocI8E1kkL2EZJl fEegfqv2AnP7tcoJUW9s4SjQtknNco3UCp7LWdmJxYMm/NhFdxip++Ll7CcFMaFzgKwzG5 zONoBjEOne/a9Rn8fqbCxmnLRWgA0ccpuipZsA5u89hzaa6bZa6DGKN4oMm1TPpObR5Crs WS6+9SDUUMm+xIWWuX1BINl+EkByK/rjCyye+j+FzFW7oSrfguJyFGLYsH32WHKvrh8Wbh yOf/WsK27ngNutnmkDi+K+wFRI1rOQt1Yg4ugTMiMOi+EtSKshPneb5MSH32lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Dv8lWNAK85oNlprZwpGG8BCLI1rrJK3rTAo9D6TDJM=; b=xFq5aREioxVKHrBB9D0+FVDyguw7zHV2d6uqAenUEKMVY3TZU6PICVJpQrU+TqZ2hPhqv8 wBMaPJ+z+Wh6BYfzoSZ5DqJ0IUUQfnjRAKfwhe18zPfQB2+P+QJGB7g9w3SAsNzsNX3RsQ mDKB7uEJcLfSH6Je5Ffx7zpaqrtZkZQyaMPHLl6gemfwvIHzf635PfIHBmncxBmQzn9qzH G3XMHs/dONPo9PdAFGsFZlOHLJaJnU5fiX0PEo9BrNofKlAkFFq6ttWdfvgmZ8X2vMnQQb UIxtfRCtr9YirmcbTq4Mlk6pYKPOaxHQANGk1bwpyfB0tmk1wfQr+7Kxv9qS5g== 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 4VkMW74Lg5zWmr; Tue, 21 May 2024 17:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LHrtud021661; Tue, 21 May 2024 17:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LHrtlf021658; Tue, 21 May 2024 17:53:55 GMT (envelope-from git) Date: Tue, 21 May 2024 17:53:55 GMT Message-Id: <202405211753.44LHrtlf021658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: bca6f391aed9 - stable/14 - sound: Prevent uninitialized variable destruction in chn_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bca6f391aed9ecc01d6b7f496ddb6a17311e4c2c Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=bca6f391aed9ecc01d6b7f496ddb6a17311e4c2c commit bca6f391aed9ecc01d6b7f496ddb6a17311e4c2c Author: Christos Margiolis AuthorDate: 2024-05-20 14:14:25 +0000 Commit: Christos Margiolis CommitDate: 2024-05-21 17:45:41 +0000 sound: Prevent uninitialized variable destruction in chn_init() If dsp_unit2name() fails, we'll get to out2 with b, bs and devinfo uninitialized, which will result in a panic. Reported by: Pierre Pronchery Reported by: Coverity Scan CID: 1545029, 1545025 Pull-request: https://github.com/freebsd/freebsd-src/pull/1240 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45272 (cherry picked from commit 5d1a5d6f1f599a4fbea9634cbe5c77f7370e1a5d) --- sys/dev/sound/pcm/channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 039d9abb9da2..a18ef1cf4234 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1236,6 +1236,8 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, } PCM_UNLOCK(d); + b = NULL; + bs = NULL; c = malloc(sizeof(*c), M_DEVBUF, M_WAITOK | M_ZERO); c->methods = kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO); c->type = type; @@ -1257,8 +1259,6 @@ chn_init(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, snprintf(c->name, sizeof(c->name), "%s:%s:%s", device_get_nameunit(c->dev), dirs, devname); - b = NULL; - bs = NULL; CHN_INIT(c, children); CHN_INIT(c, children.busy); c->latency = -1; From nobody Tue May 21 17:53:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkMW90HwXz5LvBl; Tue, 21 May 2024 17:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkMW85xK1z4rGj; Tue, 21 May 2024 17:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FBkqCSTxQ4EYyGht9D3VaLG0TWlZ+qwNchLwL3YI91U=; b=mYVU16DmdzEEOvWHHaP2PArsI/daHRzc1rMIuEZFLAbXXOE/dvOa5FEXykDE0p5nb5rvbS st5IikH8f3vQ5cNX52J+jR5axYTLR6V6hOJqaSj4JYS/73zawHEHiaBGVxMTAWRCw8cXAT izvoXQnNE2M/z9N6j1aI1c/YpyhEtKy7a+zzlArKV2DbjCF65bFPv5FA7hAfOSfBnYCyAZ OxxqNIA5k21PZ+0SWcEOx80Iaz8qP/rcDDetwIGqu8BwCf2EDJNITzfaV8R30fx5dHfDWQ FLTAakZpEDD2IP+tJ7+TP52QkeCG3Z5FXP0qoTE0e4Ce9yr8Qm2CbEN2/BlsdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716314036; a=rsa-sha256; cv=none; b=jYKC8VN2VW0nvO+FxgpSmavQVndGtGDq9XbqsydlIgxpE6EqV24GhDrtIXMaN4P0vYc2jE ruDIUMv3tcWdEll9y/9vfTy5pwrY6n/0mr14IatO0h8EnoJVvP7ZUgSAJsTC9zfERP1ZYi 63TLZZrVP9VBHv/zizFjSzZwKUUCeHIMUIULWkUXm86I9yALAVlRIiOSxnswmi843MmKCr hcID6I+gz5Iocxitx9fgUKgHhhxPK69MQnzI5eyw1BNuLICuSHB0IDgEjFlfiSvB8oiH85 V/5Hc7l7ZSlJeCVp05i6LfC4XHzY5JDzgJ3ixpT4Bzu7+mnqYt93IP3OSLSxww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FBkqCSTxQ4EYyGht9D3VaLG0TWlZ+qwNchLwL3YI91U=; b=e7niZbPh2dqdvfGIdrUDcIaeKu8dG/wjopUDWh632YjIp120lyvrhMQavs/XcytIsZnQwU KHjvKsXvh/2nRMmwy0Havpk+CNm+PvoF4K17pgQ0YvPlYIZpfDBMwBzDpftQDBTgv0R78B TwGT2HLdMY6b8vCoP1xpJ8ABsciUrbEVVfY3UVQy++6JoL50CewEA0N3sJ+CiwXLBQmIWv YrFVGJid0XmSQZMK6hkE/RPONiue0gCmryDGFuOQbPTxBfEVpDyoPsgafqwd2YjoLw8oR4 cOYxJVZFk+vf14MBSVEKvfghlI2ne2L6T46HTlpCyK+A/o4vEVio7mRDYuBkKw== 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 4VkMW85Y7lzXdK; Tue, 21 May 2024 17:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LHruGD021710; Tue, 21 May 2024 17:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LHrunh021707; Tue, 21 May 2024 17:53:56 GMT (envelope-from git) Date: Tue, 21 May 2024 17:53:56 GMT Message-Id: <202405211753.44LHrunh021707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 5830a00c2c54 - stable/14 - sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5830a00c2c5485ec17900558e4f29c459c6a1f3e Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5830a00c2c5485ec17900558e4f29c459c6a1f3e commit 5830a00c2c5485ec17900558e4f29c459c6a1f3e Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:28 +0000 Commit: Christos Margiolis CommitDate: 2024-05-21 17:45:49 +0000 sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* SNDSTIOC_ADD_USER_DEVS* expects a user-supplied sndstioc_nv_arg->nbytes, however we currently do not check whether this size is actually valid, which results in a panic when SNDSTIOC_ADD_USER_DEVS* is called with an invalid size. sndstat_add_user_devs() calls sndstat_unpack_user_nvlbuf(), which then calls malloc() with that size. PR: 266142 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45236 (cherry picked from commit 074d337ad618f9cc2a1d5ab18b484928e57bd72b) --- sys/dev/sound/pcm/sndstat.c | 5 +++++ sys/sys/sndstat.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index edb33e92ade9..f310d8f3bff3 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -864,6 +864,11 @@ sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data) goto done; } + if (arg->nbytes > SNDST_UNVLBUF_MAX) { + err = ENOMEM; + goto done; + } + err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl); if (err != 0) goto done; diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index f0e4d352242f..8a49042b0453 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -74,6 +74,11 @@ struct sndstioc_nv_arg { #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +/* + * Maximum user-specified nvlist buffer size + */ +#define SNDST_UNVLBUF_MAX 65535 + #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) #define SNDSTIOC_GET_DEVS \ From nobody Tue May 21 17:53:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkMWB3CzLz5Lv0y; Tue, 21 May 2024 17: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkMW96yKbz4r6G; Tue, 21 May 2024 17:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1qfZyL+IqSkiwEZYcfKFT7j6gRxaarXn+iKxg88OoVk=; b=i8IUxiJrLL7Hgo64pN0zRfsueIsvlgc8jQSQOb1ObM/SMXh/WwRSPmYN7+RvcWtm45R4yf w9KiD4pH88sdifL42cs7BOpsHrFcXSgrurPyVWf1AA6udGdgckzO2hQMqYTTEdZVrhQKNr J7ndPY3KVJ8mk01BRKwfJiz2smVzC4zbUKHuW102pQNwvyO34EnFEoQWNy0sHQxkDeyXr0 EOlfO78uH87gmJMufv17UwbZUq8rjE4U0z8YOV5f//itrc4n5DVbM2E3ULi+awru9Z/KNn 0jeJmAqfUUbLoDCZ0z6zfH578etKTCycXklQA+yKZG/dsqE4s8BjmI+YzY1W+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716314038; a=rsa-sha256; cv=none; b=oKi3idVndtWcI/jRX3Bx8LxZgRb4vBUcHfz5uR2S93xuRy3WFnKAlnj7VvDWTt0PxOH6ET D0XU6wHGIyd5cQyMYtlyhpg2SFaaS1ZQIbnXfeBEbaLBfS9OHoh7EbBXTnsSGrazz+2029 l+A/wyXcGbAZJ8BUHhabUgIqEMQ6VlxWbbLOhyVwjR5anjR+FUPHhr2cLWOimgOwwsg/B9 emjCWv0l51dbTrSQcyJR4XRN0rCaROe73IE/tXZT1BGQAw2Lrl8AnsCd/uAp9hfbesG2lM Gu3/vNwo6Rb24xcDhVkkkmCMHCF3FFRldYHhWLgl4xSlsnBBVQsWox5rGAqaJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1qfZyL+IqSkiwEZYcfKFT7j6gRxaarXn+iKxg88OoVk=; b=IX9lXCZrSBQJdqwyGWnAufkUjVOabNqHHVp/SVDv/W3MZJanrDILIaYt1u7ghm0kXefbij J9bVL9K+6gZrZw+OY8N7A23cbqauQgn5hw6E4+FvO6k479/NWA86PIygCVfdz+un8ec4sT 93dm4bREqpv+CZrAj7+ZCZyMs1/MS3lsbrNZCsjCtynyMp9ETSBPkoN6HKGybOrdVFVqC5 a0lEo14p9fTLZOP+IbzjwfbJ792fufxwF6RlMquIhTUd8axdEDTCkmMHb63a3ujK6W5W8f n2gKcuJMmB1awPk7pY7zo64mjn14GT9tZDpVHFM1M+7UtRYtUhVpaXcCVjLJeg== 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 4VkMW96ZflzXpR; Tue, 21 May 2024 17:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LHrv83021752; Tue, 21 May 2024 17:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LHrvqm021749; Tue, 21 May 2024 17:53:57 GMT (envelope-from git) Date: Tue, 21 May 2024 17:53:57 GMT Message-Id: <202405211753.44LHrvqm021749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 45feaa73c680 - stable/14 - sound: Correctly check nvlist_unpack() error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 45feaa73c68011bbba647d1eb6f86a166a0453e9 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=45feaa73c68011bbba647d1eb6f86a166a0453e9 commit 45feaa73c68011bbba647d1eb6f86a166a0453e9 Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:33 +0000 Commit: Christos Margiolis CommitDate: 2024-05-21 17:45:55 +0000 sound: Correctly check nvlist_unpack() error The current check is never false and if nvlist_unpack() fails, we might panic later down the road. PR: 266144 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45237 (cherry picked from commit 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a) --- sys/dev/sound/pcm/sndstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index f310d8f3bff3..bbcb2fda7c29 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -705,7 +705,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl) } *nvl = nvlist_unpack(nvlbuf, nbytes, 0); free(nvlbuf, M_DEVBUF); - if (nvl == NULL) { + if (*nvl == NULL) { return (EINVAL); } From nobody Tue May 21 17:53:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkMWC3SXqz5Lv10; Tue, 21 May 2024 17:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkMWC11lnz4rPy; Tue, 21 May 2024 17:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iNvWCtvvKybhuw4z83o5PNcqc4XrGwxaChgClzYhFc8=; b=Y1ie9EBVw5T7xPFpzgGTvmjdx+J1qS8KTJw4WQCu4pRE92nAhEkAEY3aqfJB1UUaga341X yMKpHeM8tZlOIlV7+5iB94ujuV4hN/+fWVaZyYwaFSlT3yHy/5liy7oTvL7h/AoJKtyZ8z Hlq/0XXqZZIWuFF3N2MC7yY99IZBMtFdrPtKqBqYd0n2IZdfP1+uOE+Zi7ofwlxphluQR3 FN82DQRT5JOl8Ku/mFt/dcN65xnstuXzNpnvYayBqkHPvdfr9ddIgZkcTbkCQ4uUhw1uGX rN/qRx1XgqPpYqpBkiRh8pJbE/PNsR1byldhwX04qcn4QmxNvJ1PedIlo5Oqrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716314039; a=rsa-sha256; cv=none; b=Qpd2NaFPwxd6J06sxW+c0Vw9VGvBWnQnQLoPik/pOXGMqVoJuds6CCUQWmDySxdw5VQDmA Kc82yrCPzYUB3PT2wjqrWXHX7KkEkj8c68whxerkxgNBogc9vyddMcPjJXlGQ5kdJY8TRe f5vPCG/Xp4rNOrWp7dzodxoZ3jKbRBNXedAAPEY85XgrWG6nxe/uU3V94QvIdolF63YqEx QR9sXWdQuHTmGtfMwWxRPtHeKuucCDlvQuXzMSPPtfNEPtJY3eNKgPe9tgptYV2BTjTosn pxPwK62s6ASXxtQCKpYt5Ig1SSMibVh3FroEzSCGHfMwLl44fZOQaSsjYrX7cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716314039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iNvWCtvvKybhuw4z83o5PNcqc4XrGwxaChgClzYhFc8=; b=LifLNnsB5Sr1xSPGXEJsS/7ngOKFRNIw7Wi36k0nEtvt1K9UPAoRixpbyRUYwGsexlA7eK Ld3L9wW4+plVaaPURxSRfTrStlJtTT8/cc6XH8+w7wd2jTsd81m/U2lgdd4ZOg0kD4uOMQ FT/w7K3KFboVyJJ/FCfEWdLWSx4cOAhOBys8jPg0+OVqJsbuTaN++lrP89MVOsOS9Sw3tT WKg8H6EW5XWPSnXvDDqThOnFX1kiKTq6YQWydIoZCauhsMXW08rvN5Q/8RUmX2auanWij2 cgC1TrP9iPZ+H0uA7zNxieGsf6/YiLE2KBg5lCWGHnwdBWA9OUCMDU/ZliCasA== 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 4VkMWC0VnbzXqD; Tue, 21 May 2024 17:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LHrwk6021800; Tue, 21 May 2024 17:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LHrw8t021797; Tue, 21 May 2024 17:53:58 GMT (envelope-from git) Date: Tue, 21 May 2024 17:53:58 GMT Message-Id: <202405211753.44LHrw8t021797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: eba949c37e64 - stable/14 - sound: Make SNDST_UNVLBUF_MAX a power of two List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: eba949c37e6473a07a6e3a386f239aa0f49a4c93 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=eba949c37e6473a07a6e3a386f239aa0f49a4c93 commit eba949c37e6473a07a6e3a386f239aa0f49a4c93 Author: Christos Margiolis AuthorDate: 2024-05-20 17:41:18 +0000 Commit: Christos Margiolis CommitDate: 2024-05-21 17:46:01 +0000 sound: Make SNDST_UNVLBUF_MAX a power of two Fixes: 074d337ad618 ("sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*") Reported by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45277 (cherry picked from commit d59058f3b31353442497e728dd5beb80585ad8d2) --- sys/sys/sndstat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 8a49042b0453..e0e403b1a72a 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -77,7 +77,7 @@ struct sndstioc_nv_arg { /* * Maximum user-specified nvlist buffer size */ -#define SNDST_UNVLBUF_MAX 65535 +#define SNDST_UNVLBUF_MAX 65536 #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) From nobody Tue May 21 18:16:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkN1T688Xz5LxZW; Tue, 21 May 2024 18:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkN1T5K99z3wk9; Tue, 21 May 2024 18:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM0w+7Gc5WaxqYOY+zIV/kPKkiwOCMVJRq8EDo4pCc0=; b=ovEBQ9rOQUov7TD3X8vPwPW0Jc8Ve89bEqmYbAtsEQLryFCczohaPN9prLZnRDkwY20fkM EQpbt0CwTMPoh34VRSFynFQeGd+JlPmd/97ZB75Xu6ZrpFb7x8ie5FhpqorSpYkowUesiK XNF4owEGDmnYHKXHaon0AupOb7NxqM769s/OjFj5EA3yCVd6oBLzbAWNnwwfdhEl+Y69z0 HRanuv/QNyvRWGMqAt4mYxrnRh97bmKkZTe5BM74rj+/Hb9gIFFI5B5BgmrxvS0R8CrRVu lw9fYHo9IW183jYW3y3dkuvhwMcZwEhrDU6nQSFTW3l6Y//zdo/tXd1TFESeUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716315405; a=rsa-sha256; cv=none; b=VXc4quIv4mwTbzmDe2eNWlEp17i65g473sBhPv3UQTUswGa4ZCcAUaVsIclnyB4Rj77Oz1 xYgluxiX/vxppGBNKVwL2K9Smk33O4/TUwlMBUzn5F6CNn08zvzxQiiMn3Ds5KpEtEYoge S76it5oS3rdRVxhe3SS9pthQT/2cYG/oAZ1EHjz4POtoYZ20RyC7T6hxquwv4/79+te7pn 22gLatmQg0xLxsRc3WGPa4uht2W1slpX4UdDlW9LYqZhQEbSFR+6Edgo1nhw+ru4Th4dN6 IZ8xhooItZyoR7AWsxndMQb3N1geUA8KD35/K3qwKccmInYAtYcmk2rUy96/iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM0w+7Gc5WaxqYOY+zIV/kPKkiwOCMVJRq8EDo4pCc0=; b=oYjNT0CdFaboBqzKCYVe6SWaWDNnK29o9asIZD8vovl2LJv+HJo8FIkKczJ2qQEHNYS7sf fJCszAVOb5H0nMYaOlZbvKltEnh+qB62LHQSSOoImaKet1JARC+5sb9c3hCAirT2wzUc5x fdI+Za10DfrncV+1mqXwbv/XOxw/bUotHebpWuKCBQrjlvJOBJ2X3YrPxEhlsFVgxyHagT c2b6h/TZSZ7hkCK79KJ5SZ8569vVv459NwBL2wDoRT0YQD7c9UaJKUYzapGnm5aPg5hEGV kyD1lv5rE0dfcl46AOVIagPsXyzofR7pd2CvlU82DYYrnQSKe5+RlyS16mc0Ow== 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 4VkN1T4pBxzXtt; Tue, 21 May 2024 18:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LIGjtk056158; Tue, 21 May 2024 18:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIGjHA056155; Tue, 21 May 2024 18:16:45 GMT (envelope-from git) Date: Tue, 21 May 2024 18:16:45 GMT Message-Id: <202405211816.44LIGjHA056155@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: b92cd6b2944a - main - lockmgr: make lockmgr_disowned public and use it List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b92cd6b2944af2112787c55949e0c8194305c8c4 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=b92cd6b2944af2112787c55949e0c8194305c8c4 commit b92cd6b2944af2112787c55949e0c8194305c8c4 Author: Ryan Libby AuthorDate: 2024-05-21 17:21:50 +0000 Commit: Ryan Libby CommitDate: 2024-05-21 17:21:50 +0000 lockmgr: make lockmgr_disowned public and use it Reviewed by: mckusick, kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45248 --- sys/kern/kern_lock.c | 7 ++----- sys/sys/lockmgr.h | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index f152185f5fbf..1b4d21f064a7 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -138,9 +138,6 @@ LK_CAN_SHARE(uintptr_t x, int flags, bool fp) #define LK_TRYWIT(x) \ (LK_TRYOP(x) ? LOP_TRYLOCK : 0) -#define lockmgr_disowned(lk) \ - (((lk)->lk_lock & ~(LK_FLAGMASK & ~LK_SHARE)) == LK_KERNPROC) - #define lockmgr_xlocked_v(v) \ (((v) & ~(LK_FLAGMASK & ~LK_SHARE)) == (uintptr_t)curthread) @@ -243,7 +240,7 @@ static void lockmgr_note_exclusive_release(struct lock *lk, const char *file, int line) { - if (LK_HOLDER(lockmgr_read_value(lk)) != LK_KERNPROC) { + if (!lockmgr_disowned(lk)) { WITNESS_UNLOCK(&lk->lock_object, LOP_EXCLUSIVE, file, line); TD_LOCKS_DEC(curthread); } @@ -1135,7 +1132,7 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje * any waiter. * Fix-up the tid var if the lock has been disowned. */ - if (LK_HOLDER(x) == LK_KERNPROC) + if (lockmgr_disowned_v(x)) tid = LK_KERNPROC; /* diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index ebe238cd0e25..48eea47c60da 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -130,6 +130,10 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct rwlock *ilk, LOCK_FILE, LOCK_LINE) #define lockmgr_disown(lk) \ _lockmgr_disown((lk), LOCK_FILE, LOCK_LINE) +#define lockmgr_disowned_v(v) \ + (LK_HOLDER((v)) == LK_KERNPROC) +#define lockmgr_disowned(lk) \ + lockmgr_disowned_v(lockmgr_read_value((lk))) #define lockmgr_recursed_v(v) \ (v & LK_WRITER_RECURSED) #define lockmgr_recursed(lk) \ From nobody Tue May 21 18:16:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkN1V6XD5z5Lxnr; Tue, 21 May 2024 18:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkN1V5xKdz3wxy; Tue, 21 May 2024 18:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7a+fpdMunyNo66jIvY3F9ubxJ8fdJjAekhugFGz0yeI=; b=WOK1oEYo1jAEFciA/JqrLhcYLromBrYMBHcpAk8mZJykeXWfqFvBFLGSZM1iPEMXYnNSIW gMCIQ2nHDbrbFhNhXkjm9I7+93o+RW2AT6sSu1tdKV3pvO2mkSHI0lXr0kKdUuoxxsK2A1 mkWF4MLnSLDh4QwK/CATrhoEiDrYftn4/N5bagpcdMfbEzxSnfD541qlsAZelo6gTUl2Y0 9lr12OGicfsWwCCdZbbk0DbnVRGkTkOwQALNhflc2X88blsZ1PkTpy9cmfSiXCbz98fAId dburWI1FZmDTOCtBJzsr79TDpGkz5ET+dYg2tlsfbG2X8GCwksHLiyGYE11kQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716315406; a=rsa-sha256; cv=none; b=lOdIk0ba+BeyJCWV9g+oaxv+1zcFDPQgp52gZ4LyTStONeGMjs/VdelMGPqCtbV9SuP9rj ygvhwfFF8pnTPbqoTycWnw5MXE0zXmI4RhFhjTLCbfnlZanPj24t7jSj3nMDPhc6NOJ5OU l2W9Mz0030f70/X0/EgfV4RUJNgVLGVtpyo5SB846hKolGUTTSeAccjnjCXpKZ+aLCNKiU RIQTLB9Nn3WrvkbX/VY2K/6h04z4X1B4dJrVcSOxXWM5noGR5K1JecelbjGShRMLAM046/ S8mp+tEpSAadXKFmwENOfH7C752OGpBie12SQO8DWf15pC6s6bckwoxrEJIDXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7a+fpdMunyNo66jIvY3F9ubxJ8fdJjAekhugFGz0yeI=; b=rUZ1UN+LE9Guoamwu9Yd3IQcvgCq1ejbFZQBeT6xXMt2LETWU2LGWg4NcNV1p0OyjTbWbI QVvBOA862Mn5zYaHmZO8Ds6FQFvT1wj8hYkfOcfUOLuc1M1/aKr1Tb4YkT+FYr/Bbwmcy2 bKGwvEUs5DzPSKD2NRT7FHmXsT5dSfgI7ns8aZ6AhccJ7agz5YBztj1dRMAkzBkCMv8Bc6 ce19vTdRXBw1NgOsio4mdYX3Un1PmYmghraPJTMncKyc7KnDeHHeCTtZ9f7H5BOqV0RyDr CaZAttkVne2HiBT3wJ6hGDxu6M1iYjF1PsgjlcallV8hKbeSJ6Ib31kLlX8mGQ== 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 4VkN1V5XpDzYMP; Tue, 21 May 2024 18:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LIGkis056200; Tue, 21 May 2024 18:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIGkNt056197; Tue, 21 May 2024 18:16:46 GMT (envelope-from git) Date: Tue, 21 May 2024 18:16:46 GMT Message-Id: <202405211816.44LIGkNt056197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: bd56aad33c25 - main - buf: define and use BUF_DISOWNED List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd56aad33c2533615f76c17795f0aa70b7686309 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=bd56aad33c2533615f76c17795f0aa70b7686309 commit bd56aad33c2533615f76c17795f0aa70b7686309 Author: Ryan Libby AuthorDate: 2024-05-21 17:21:50 +0000 Commit: Ryan Libby CommitDate: 2024-05-21 17:21:50 +0000 buf: define and use BUF_DISOWNED Implement an API where previously code was directly reaching into the buf's internal lock. Reviewed by: mckusick, imp, kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45249 --- sys/geom/geom_vfs.c | 4 ++-- sys/sys/buf.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index 893c8dfffa6f..87b2fea21baa 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -124,12 +124,12 @@ g_vfs_done(struct bio *bip) mp = cdevp->si_mountpt; if (mp != NULL) { if (bp->b_iocmd == BIO_READ) { - if (LK_HOLDER(bp->b_lock.lk_lock) == LK_KERNPROC) + if (BUF_DISOWNED(bp)) mp->mnt_stat.f_asyncreads++; else mp->mnt_stat.f_syncreads++; } else if (bp->b_iocmd == BIO_WRITE) { - if (LK_HOLDER(bp->b_lock.lk_lock) == LK_KERNPROC) + if (BUF_DISOWNED(bp)) mp->mnt_stat.f_asyncwrites++; else mp->mnt_stat.f_syncwrites++; diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 70fb2812c3ba..cee9547912a6 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -341,6 +341,13 @@ struct buf { */ #define BUF_ISLOCKED(bp) \ lockstatus(&(bp)->b_lock) + +/* + * Check if a buffer lock is currently held by LK_KERNPROC. + */ +#define BUF_DISOWNED(bp) \ + lockmgr_disowned(&(bp)->b_lock) + /* * Free a buffer lock. */ From nobody Tue May 21 18:16:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkN1X2Gfvz5Lxd7; Tue, 21 May 2024 18:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkN1W6G5vz4vwt; Tue, 21 May 2024 18: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=1716315407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUwto1QTfsO7yUOZKRNcaN8x7Tq/szRkWCAcFJCVcI0=; b=pc74PIPaekZ0gLVAho2WN8KBMIOswr4ye5MWYmRDHvLCdWzJBPPy0Zpc94dVMkUKkHtWud M2QOd+QT4sUDFzohbuof584iTTac8Si8rd3TnheNUVB4VTSpJR11YH+20txEUJ24qZEAGb yfhEIG72+hXbVlmVJ16CqUKPYQXztsT1GC5qEMtHH9KQ4sfvkML/OFMq7rAyuOcHXXGWad jwYnyNXHNHSQztGxGsIe7ryuotkJU6j2jxrEN+59EHU6mPPIwIzN1FSPIH65bF7+zLiLGa yU3kYOw9nR9JBoUIorGTHZSQnqEkcYuBzBCqWBMDdIIxfCkcE/bXK7ROidLsTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716315407; a=rsa-sha256; cv=none; b=raiBRR4BpQuF7WYl7p3FMpoTgyqWQ1C8RxOAA2s2cqnW55SJkEX4NEL4+SmN6G9HBQtc8v 0yaPBfv2RBpZuS66E7oDddCZM6aH0l3wEmu6dN1zWthwhi/74vkTusKjZWNnc2IuiSsWw7 iAQVpboy01DqAjWKAw03EiI+9yhmlMwrXYYaMNN0bUn8pLQMK+vfkYrA2I8ZKNnoNpDTBH 2Smjomv2gRXwAWlAHxlXHsfAY9I574GbsCqPVIAko1qsnXII4AUSyb8sUQBOmCBB01DE7a +u3erVtUjYdLslWlzIR5qjOhWcG6ZAW0nl+mLW6bMnvOhcALJ7FvrcDPv0waxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716315407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AUwto1QTfsO7yUOZKRNcaN8x7Tq/szRkWCAcFJCVcI0=; b=PLOBJo6bwUwYLCMr8wpoaNakVQOLvnibogSQeM2bDA912J5NfoZ9vM/Xnzpymnz0YxrMjy UGOwbstzdZl/Crjg0MWq0k1kEMG4kq1MumNfyv5+WzBRORhiOuANzNfgjF+1DyLxv2dBKH ehTK6SpcVr7ZoMb3UPedsy7yH3sh2M/nefKsM+7JT88AHddtIP7UT/nqh+USWeKb54W4Rl lT8rtzAz887uLCUkn7Q+djUk8M8WQrAIqkEgDyPw7l5JHfntF9PKTwx3fTGxKpxoDZczbV BT/ICuDpOMLezhomd57MuK5GlUYoiNqVsjKOTkPq2SDDl0GLN8DTEPnFhNT3BQ== 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 4VkN1W5szxzXtv; Tue, 21 May 2024 18:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LIGlaZ056242; Tue, 21 May 2024 18:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIGlT6056239; Tue, 21 May 2024 18:16:47 GMT (envelope-from git) Date: Tue, 21 May 2024 18:16:47 GMT Message-Id: <202405211816.44LIGlT6056239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: a332ba32d4a2 - main - getblk: fail faster with GB_LOCK_NOWAIT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a332ba32d4a26e20c959db14afa11ccfa25cf76c Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a332ba32d4a26e20c959db14afa11ccfa25cf76c commit a332ba32d4a26e20c959db14afa11ccfa25cf76c Author: Ryan Libby AuthorDate: 2024-05-21 17:21:50 +0000 Commit: Ryan Libby CommitDate: 2024-05-21 17:21:50 +0000 getblk: fail faster with GB_LOCK_NOWAIT If we asked not to wait on a lock, and then we failed to get a buf lock because we would have had to wait, then just return the error. This avoids taking the bufobj lock and a second trip to lockmgr. Reviewed by: mckusick, kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45245 --- sys/kern/vfs_bio.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index b5466fb2cd53..01057072d991 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -4010,8 +4010,23 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag, error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL, "getblku", 0, 0); - if (error != 0) + if (error != 0) { + KASSERT(error == EBUSY, + ("getblk: unexpected error %d from buf try-lock", error)); + /* + * We failed a buf try-lock. + * + * With GB_LOCK_NOWAIT, just return, rather than taking the + * bufobj interlock and trying again, since we would probably + * fail again anyway. This is okay even if the buf's identity + * changed and we contended on the wrong lock, as changing + * identity itself requires the buf lock, and we could have + * contended on the right lock. + */ + if ((flags & GB_LOCK_NOWAIT) != 0) + return (error); goto loop; + } /* Verify buf identify has not changed since lookup. */ if (bp->b_bufobj == bo && bp->b_lblkno == blkno) @@ -4020,6 +4035,10 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag, /* It changed, fallback to locked lookup. */ BUF_UNLOCK_RAW(bp); + /* As above, with GB_LOCK_NOWAIT, just return. */ + if ((flags & GB_LOCK_NOWAIT) != 0) + return (EBUSY); + loop: BO_RLOCK(bo); bp = gbincore(bo, blkno); From nobody Tue May 21 18:50:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkNmZ1Sdyz5M1YF; Tue, 21 May 2024 18:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkNmY5p12z41Rx; Tue, 21 May 2024 18:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716317437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7fPLSckUu2ipheFU0IhhtJzLOt2bcDcZz0fMcpT1nVU=; b=X9nUiISiscOR1vul0nkOmz0JCylQQiToCnaEwEfeKlfbmnomQ6KU62sDNxroZPVxgYKHsQ SUc4as+v42qbGUtoHhMAfU/mfK/ag9XLEPwM/OwfNSwwwN/ou7wj/J4EdDTYA8cYS1TXZB YzZz0wxBVsBTMbyl6Rp2oqr4WeRRTbubP2MlfAfcz17NpIqIdYpcA/5QeDHzbX88YfnoDM ZaJvzHHt7ENDMhv5AGD72jiV4XOUZ34HcxnNQNKNAI1WeLKdyjq1PqDH4d8XP9uC98xpiP KnuB4/qfg9Ik4y379mjt2gUpo4tKcsRywFZWHgj2bP4Z1wJWxxCrHHRZbUsTIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716317437; a=rsa-sha256; cv=none; b=jiFRtxFsrD/sqHYdYoLA3DPiZ8kQjtYQ1xGsiN8WmDZipJwh7GFzBbMrolSnC09WpYzrFc 81Tx8dimBEN433HxLrRIJZkzzbzrDurmqjod7Ts4ebobQF/BlT+5Yz+USE75u9x12BaKU+ yuW5d4HmNCCTgE87rBy2izoT0T/eBaN7/F3bbwe3C8G7mRoape8noj6uoXRZZHkHUEzJ5Z B7gxfBY1f7fWbca3zJFpmwMsdpdxOy00afNzpjj6bHJcQUc34HHDbF0vu+Xpj8NwucS5hw LQBBdn+AXFD9Z5bPZn5n0I7WUIGY9yHAPt9szcbiFgXKqjGSRc60gbuuFpuOmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716317437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7fPLSckUu2ipheFU0IhhtJzLOt2bcDcZz0fMcpT1nVU=; b=gKkfnVQb/6Dm+f8ijcOqCFEC7oZrmYovrMVyxkV7Rfn3fKRPOFZJvgC8WoagEJmwyng9lS UZNT4ceI5ORU3WZ7MLOM9uu3iLA3F+UO5KqIwL3Z8vahol1C1XkXHzyjadb4YlbxUlTajP vMleT+cTcFFm11arrh9m+zq+W2Hm2GAWPQStzmJvFVGDYT24xwYzAXnjl4358UNDvSU+We AJUen4O3BfWNv12Bu8+5Jsg0CNjAHx2Wu4dJQQL2uxNfF7BP1dT/JH2O91I0V9aBRVGQ8v bbRG83iFI4jtfZYLk2FKTzUIPvDvqQG81ycCHORVbSxbY+xrlyxjc9Y68kaI1g== 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 4VkNmY3Fc7zZ6N; Tue, 21 May 2024 18:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LIobed015549; Tue, 21 May 2024 18:50:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LIobfk015546; Tue, 21 May 2024 18:50:37 GMT (envelope-from git) Date: Tue, 21 May 2024 18:50:37 GMT Message-Id: <202405211850.44LIobfk015546@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: c80c104cbd52 - main - glabel.8: Describe cases related to permissions / existing mounts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: c80c104cbd52db994c0f2757bd1c6d014744022c Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=c80c104cbd52db994c0f2757bd1c6d014744022c commit c80c104cbd52db994c0f2757bd1c6d014744022c Author: Chris Moerz AuthorDate: 2024-05-21 18:10:11 +0000 Commit: Joseph Mingrone CommitDate: 2024-05-21 18:49:17 +0000 glabel.8: Describe cases related to permissions / existing mounts Specially, note some requirements for label changes: - glabel requires write permission on device - filesystems first need to be unmounted for new labels to persist across reboots - if the affected device node holds the filesystem root, single-user mode with r/o mount will be required. Also, while here, apply some formatting tweaks. PR: 276724 Reported by: Alex Matei Reviewed by: gbe, jrm, Alexander Ziaee Differential Revision: https://reviews.freebsd.org/D44394 --- lib/geom/label/glabel.8 | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/geom/label/glabel.8 b/lib/geom/label/glabel.8 index d6f253342905..da958b52befd 100644 --- a/lib/geom/label/glabel.8 +++ b/lib/geom/label/glabel.8 @@ -137,7 +137,7 @@ e.g. .Pa /dev/diskid/DISK-6QG3Z026 . .Pp Generic labels created and managed solely by -.Xr glabel 8 +.Nm are created in the .Pa /dev/label/ directory. @@ -164,7 +164,8 @@ device will be one sector smaller than the device from which it was created. .Pp Note that for all label types, nested GEOM classes will cause additional device nodes to be created, with context-specific data appended to their -names. E.g. for every node like +names. +E.g. for every node like .Pa /dev/label/bigdisk there will be additional entries for any partitions which the device contains, like @@ -172,6 +173,17 @@ contains, like and .Pa /dev/label/bigdiskp1a . .Pp +.Nm +requires write access to a device to create, modify, and destroy +"automatic" labels. +It will fail to persist changes if they are applied while a file +system on the device is currently mounted. +To ensure that modifications are stored across a reboot, the file system +needs to be unmounted first. +If the device holds the system's root file system, entering into +single user mode and mounting in read-only mode is required to persist +the change. +.Pp The first argument to .Nm indicates an action to be performed: @@ -252,12 +264,13 @@ Most .Nm LABEL providers implement a .Xr sysctl 8 -flag and a tunable variable named in the above format. This flag -controls if the label provider will be active, tasting devices +flag and a tunable variable named in the above format. +This flag controls if the label provider will be active, tasting devices and creating label nodes in the .Xr devfs 4 -tree. It is sometimes desirable to disable certain label types if -they conflict with other classes in complex GEOM topologies. +tree. +It is sometimes desirable to disable certain label types if they +conflict with other classes in complex GEOM topologies. .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. From nobody Tue May 21 19:50:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQ596zyhz5M7GR; Tue, 21 May 2024 19:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQ5968SRz46yl; Tue, 21 May 2024 19:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6OhIc9BbZxRtnq63E3h6nJGX6Rktvebnq3f5ecfoVAY=; b=qvWYT9o/D1jO17+PrJsLrIE4pBX6GI4BA2ykkPTJ+NPK/H3kMrWoF1bgYkbn31YVXyFoUT 5uQWdWDKov9pDAmHND6R/2rEMAWrGWJaqQNzVbf/Nyb6C5LtdJXOUtEAtRSYVrolR0ULCY dE1j0WgW5zQ3i8MVRCvn9oon+zltdOw5REi2M5eiuM68aDeb/y3GVfpfz+Xc6wfPYcGpbZ /X339c1WYS9Pky2C73WjgA51OtxvexWF9hlYcAzqZCjMRZV/fDGDeKhMDdFVXHuN0A8NLz FiFq2vc3Oa+wHcAw3j315NqthrviItDtttzpLunAX5r9OEFJwmN+tIugDmy2gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716321005; a=rsa-sha256; cv=none; b=NBCenC8hcNEo2bfQNslbcgx9ZGp2XnaWLXLGSTQMLiGIhXBSaoxa5X8lMGMmqa0IDeQcK5 VD0HjOGzF73YKQI7hZyCnN+/wYsT2iXRaU0IJ2ew+X0LElcOIV5lnNzgL55jr7aljZrz5M AeOoEP2xK2IGlBnK2x3jxs/fg2pLorb1bsiw3MpEEmbVLvIevqN9pvrTlQA3uWOIKekief NQrK7958ZR4WDIp37L7X7PELGyPe7qELuTz3DVWB/Z02Wr3uA6mSvUa965zwxDdE2ZxNBM 5UmKio4FtlkfCIuEmZaYUZ6HGbESxxAz22RHvRBDUF7Nrl5h52Xl4bhfwadH1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6OhIc9BbZxRtnq63E3h6nJGX6Rktvebnq3f5ecfoVAY=; b=SPqnTEBN/xhKcDe/ovjhq4R27pjK0sGw7udzrCAu5Sb5yRfADYWpIMPD7YKy/w3OpSH7KQ /NRog2jkkp+aZ58jokvoa0KcOzRJY1HNZNk9BFakpnU8uwRLHE6l5V0usCeZgsPXXZVxRf 3JInHlNL+p2wJ5XmbM0jgfR5Z4kmmYzMQ+l+qUIgSM/GXdYn7tE8zxFFW7MzwhsPRQsief Nc8xq8nYImPk8k6WngM3IOnmA7MOGMJsbGc+bMgy8fj69mKGdUnEvR14+Ocdf168M7kRI7 NimBJtrklesFXwECj406cfYKWr3W6ARBzG9v8v4Uy27mej1y1eXH3ccFzWkQeQ== 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 4VkQ595lwHzbJj; Tue, 21 May 2024 19:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LJo5LS010798; Tue, 21 May 2024 19:50:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LJo59u010793; Tue, 21 May 2024 19:50:05 GMT (envelope-from git) Date: Tue, 21 May 2024 19:50:05 GMT Message-Id: <202405211950.44LJo59u010793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 07f3a9eb1c35 - stable/14 - alc(4): disable MSI-X by default on Killer cards List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 07f3a9eb1c35cab2d371895f9ed5bc33d27e1815 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=07f3a9eb1c35cab2d371895f9ed5bc33d27e1815 commit 07f3a9eb1c35cab2d371895f9ed5bc33d27e1815 Author: Lexi Winter AuthorDate: 2024-04-22 22:09:26 +0000 Commit: Warner Losh CommitDate: 2024-05-21 19:43:34 +0000 alc(4): disable MSI-X by default on Killer cards Several users with alc(4)-based "Killer" Ethernet cards have reported issues with this driver not passing traffic, which are solved by disabling MSI-X using the provided tunable. To work around this issue, disable MSI-X by default on this card. This is done by having msix_disable default to 2, which means "auto-detect". The user can still override this to either 0 or 1 as desired. Since these are slow (1Gbps) Ethernet ICs used in low-end systems, it's unlikely this will cause any practical performance issues; on the other hand, the card not working by default likely causes issues for many new FreeBSD users who find their network port doesn't work and have no idea why. PR: 230807 MFC after: 1 week Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1185 (cherry picked from commit 05a95d19cb248203acdd4e069d3eedfe597c3b49) --- share/man/man4/alc.4 | 6 +++++- sys/dev/alc/if_alc.c | 24 +++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/share/man/man4/alc.4 b/share/man/man4/alc.4 index 478558657799..5ce5ce97d68a 100644 --- a/share/man/man4/alc.4 +++ b/share/man/man4/alc.4 @@ -136,7 +136,11 @@ This tunable disables MSI support on the Ethernet hardware. The default value is 0. .It Va hw.alc.msix_disable This tunable disables MSI-X support on the Ethernet hardware. -The default value is 0. +The default value is 2, which means to enable or disable MSI-X based on the +card type; for "Killer" cards (E2x00) MSI-X will be disabled, while on other +cards it will be enabled. +Set this to 0 to force MSI-X to be enabled, or 1 to force it to be disabled +regardless of card type. .El .Sh SYSCTL VARIABLES The following variables are available as both diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index be52822e1c51..2943be7063b5 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -92,8 +92,14 @@ MODULE_DEPEND(alc, miibus, 1, 1, 1); /* Tunables. */ static int msi_disable = 0; -static int msix_disable = 0; TUNABLE_INT("hw.alc.msi_disable", &msi_disable); + +/* + * The default value of msix_disable is 2, which means to decide whether to + * enable MSI-X in alc_attach() depending on the card type. The operator can + * set this to 0 or 1 to override the default. + */ +static int msix_disable = 2; TUNABLE_INT("hw.alc.msix_disable", &msix_disable); /* @@ -1411,6 +1417,14 @@ alc_attach(device_t dev) case DEVICEID_ATHEROS_E2400: case DEVICEID_ATHEROS_E2500: sc->alc_flags |= ALC_FLAG_E2X00; + + /* + * Disable MSI-X by default on Killer devices, since this is + * reported by several users to not work well. + */ + if (msix_disable == 2) + msix_disable = 1; + /* FALLTHROUGH */ case DEVICEID_ATHEROS_AR8161: if (pci_get_subvendor(dev) == VENDORID_ATHEROS && @@ -1440,6 +1454,14 @@ alc_attach(device_t dev) default: break; } + + /* + * The default value of msix_disable is 2, which means auto-detect. If + * we didn't auto-detect it, default to enabling it. + */ + if (msix_disable == 2) + msix_disable = 0; + sc->alc_flags |= ALC_FLAG_JUMBO; /* From nobody Tue May 21 19:50:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQ5C0cZqz5M7DM; Tue, 21 May 2024 19:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQ5B6vmWz46sv; Tue, 21 May 2024 19:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FHwcVaaB71wgsEHwoN00KH+0FN18TNUAYNPov/7Y9qQ=; b=rLh2HoPGdWr+Bx7nKGmtYb590bWUCRZxv9sbhszmP9Rtt6GTobWSexuUR8PmUEUEo7pTnP RstQh+x1yJRgQxWnUStg6rebxxa4+PG6RfWEaxbTlcY7dOHMB5/Mpcne1EEOo2Qk0yT4N3 BTGVZvje1US6SG09EgMSECQAQtnrYhMURmZmKG8KeS+GNylj0yycYYZtDbTqVWShqLfD4J o2vQqEV57cnCkq3WBybJDMHs6H9A21F/M0hCj9tRgWo4mJkYPMdUtaWZdJl9KT/FnWNxU6 SyNKvQJlhTnA5YGCFuGaH6an+jfpILuiLMZu+fPkWv8E1CQ7SVSwdkzqHSiP9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716321007; a=rsa-sha256; cv=none; b=OWf3SxFGmVoo5LwrEmlql5XuSP+rlzv4DENUZPQP+ObNyixGzUuWHcp3edG3UPEMtXtYdF ezW46MKyNcI9ounWYfM88J26JQXzniWNICzv/Df+HAJrvPioGE365EW21bRpgBxnFJPj16 No5iFvCXDA5hdhN+WJ5jXq6tekPHBkRrSadQNoO+VG0mLFFE7XUtGsdKlkR/Bw3T9Nuey7 VclONxPZx3wIYPLeulzbkQLyLtYmEd29GL6BueEvFpINeQHJAaMljPyWvERF3VrlFxdz2f 39FeOKAR8xUtvcxJEtKoQNC6AGjvZX0DvHAEK4voZgQxfqm5Nmn8SHf33YIAKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FHwcVaaB71wgsEHwoN00KH+0FN18TNUAYNPov/7Y9qQ=; b=IFfs7/VAmj4AATkh7ucxmEjtJpbuZ9PMM7C2FwQBfv4rgbmHcdDsDQXozfezo0j1jGwdvh G32LInIXoaOqIlR/aBw37TNuczy4wT5XFyQH1TBKlxTdnpODlpX/SvrVJdFtSRJsCB0nZG OB6lxAM4KLHXf/xocWONUbg8RC9PgqRVgVu7UtIQN5se/iuNQ72gNKRW9nUP4WSpsHNm8K oL5rKXGBfeT6veIPY4EPrnZLb3/7VaENeHdUc7Vbd00a3VOHJw4SkadedHisAuWvnXGlMJ 7dQc73GvtGete23IAyENzT+E4bU4o9C/dJA29rkprLgA1uajVj1DajXOSrsn2A== 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 4VkQ5B6WDzzbXp; Tue, 21 May 2024 19:50:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LJo6Xm011079; Tue, 21 May 2024 19:50:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LJo6gv011075; Tue, 21 May 2024 19:50:06 GMT (envelope-from git) Date: Tue, 21 May 2024 19:50:06 GMT Message-Id: <202405211950.44LJo6gv011075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 5cbccac9f3d1 - stable/14 - ifconfig tunnelfib is implemented in wg(4) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5cbccac9f3d1484bff55dd53361c50cdbe8011c0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5cbccac9f3d1484bff55dd53361c50cdbe8011c0 commit 5cbccac9f3d1484bff55dd53361c50cdbe8011c0 Author: Gregory Shapiro AuthorDate: 2024-04-22 22:10:00 +0000 Commit: Warner Losh CommitDate: 2024-05-21 19:43:34 +0000 ifconfig tunnelfib is implemented in wg(4) MFC After: 1 week Reviewed by: imp, zlei, kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/1186 (cherry picked from commit f578d0199761136e82850d8f086b8806f2dbad8d) --- sbin/ifconfig/ifconfig.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 471d37ac1779..fa463ad8af5d 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -565,9 +565,10 @@ A FIB .Ar fib_number is assigned to all packets encapsulated by tunnel interface, e.g., .Xr gif 4 , -.Xr gre 4 +.Xr gre 4 , +.Xr vxlan 4 , and -.Xr vxlan 4 . +.Xr wg 4 . .It Cm maclabel Ar label If Mandatory Access Control support is enabled in the kernel, set the MAC label to From nobody Tue May 21 20:04:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQPx3hfTz5M8lJ; Tue, 21 May 2024 20:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQPx353Bz4Cqm; Tue, 21 May 2024 20:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVzr75Wet5tEQe+17LLCnURwY1/DWSSGi7WQ/uarcIw=; b=MIYdGjxAeKqzUS8JYmGdU1sxy0W+zPEcbnmqCdjwXRogMSeyLDmEmvqdry7+/bS/EX8Rp1 mz7qpenPYSKgqc0yq3n8XyFxLOtnEdH3ttbvSfLsSx0L1pQsRa6Ly30oWIjrMKT4oh1Hl7 LaTN+yWqj1hmwLdjIhIa+CdzKtrzCbCdW55cAlNhYqOUiCIZeRLQW8utVqOGC280A2xK+8 QHs0irepYTAwU9lP4431cP72A6AuU2tmw5zC+fLHOxd98Xp8Zu+kSIyHKc/88TB06hqae4 kYiQ0jstOAckQIg7splggz7aAfp0ox8tNkfv1WJZaVT+BClKh1RXNEd9krHtDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716321877; a=rsa-sha256; cv=none; b=vNck9boji2kI2SqJP2Y9m1qCS1/2B4wfgIn6AWeUunlVv4GeoLCV1qHrl4TM8B4qplIb64 ObwDeE678FjU8cPJPuwOVIFWjSvQLt37sy/4TbLLy32w+/dzO8ZPVP4rc3mSACusqj6q8k QuxZDY5wZbdzzRwQZaxduKdO8g/U3/PSH7iD3ykqxIw4WUTnLeGNDRoA6IWave/ALQxelx FmpvJt3cmxcLrQ0Sed6toCVkzTH5Aqj4EIpOYJbGrdAjCZiL4AoW6FAWN/I3XRx0I57p5r 7qH1gmY1wbChvhS6+nfh4fBBkChDcJtBlo3IhvqjEdQL0jwdaiigZo5aZcrQiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVzr75Wet5tEQe+17LLCnURwY1/DWSSGi7WQ/uarcIw=; b=eCW8rE19Z6CaaIhqjs7HBEBMBs2Qh5RElb0wfE6epICdLc/9jIeTK81COuB2jUPTcm6fQ9 s0s0kQM/YeCgBQDnE7bhMobpss1p2fUCqRKyl0KPHpchv01ezn2Dtysd2GZJZiIur31xEl qDtNFh8RYkO6Qke5/vkCfAIO2usc5bhZ6yD45SzE0Vk6RT5soaA6fQHkSmvhqjfBcqHmLi Hm4jdjHSUbaG9t8L1J5zMWFlEQY6ZoFz1VXj8UDpuApqc/Kd7xlmDLWo4MgSc6Fc/SaCFM Yd2nq1/RmcWobp3SiCAjJWqTG1rqOc4acpIywV5dDtjH754Qm2xtJhorgFxr5Q== 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 4VkQPx2hS7zbt8; Tue, 21 May 2024 20:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK4buf042777; Tue, 21 May 2024 20:04:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK4bxK042774; Tue, 21 May 2024 20:04:37 GMT (envelope-from git) Date: Tue, 21 May 2024 20:04:37 GMT Message-Id: <202405212004.44LK4bxK042774@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: 6b7e4254a29e - main - capsicum: allow rfork(2) in capability mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6b7e4254a29e3228a7273622556b60416e300509 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=6b7e4254a29e3228a7273622556b60416e300509 commit 6b7e4254a29e3228a7273622556b60416e300509 Author: Edward Tomasz Napierala AuthorDate: 2024-05-21 19:55:09 +0000 Commit: Mariusz Zaborski CommitDate: 2024-05-21 20:02:36 +0000 capsicum: allow rfork(2) in capability mode Reviewed by: brooks, rwatson MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D45040 --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 094c538b22e0..9fdd443955c7 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1455,7 +1455,7 @@ int inherit ); } -251 AUE_RFORK STD { +251 AUE_RFORK STD|CAPENABLED { int rfork( int flags ); From nobody Tue May 21 20:04:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQPy4Zjvz5M8lM; Tue, 21 May 2024 20:04: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQPy3xbpz4D2C; Tue, 21 May 2024 20:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p7cjIvMgxfO238g9YpqYviN5svS4QkgYdTMuRxWU910=; b=cGeoUSyfq1dqiVzuc3f8n1OqVmU6ehBomdNuxGoIu/rOlLWBaIwnogNA97ZA6zRzMuu9nm JWJMiZFDNYQY1lOCtyNjqPOOHL4mO4Km0TsJzgChPYyvZqLxK9fTGBHr82Tdhirage/XDD UBca7lIcMGEjRe7ZOHQASrYFyXakBIsEuG5dixTLxAw58VPhFHFbcXHdG1NX36g/RimX7h U0N0JPZubB9iOtF8anR4OlUyTyQhIuhY3UNjcXoutnNeyCuVt9CJMUinovIQGWvAuzYejW jF08ebpG+J3phaDn5HXjB2p6l5fRHKTihF4FrvGyPDjyNimnz+yIJWTqzh4nBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716321878; a=rsa-sha256; cv=none; b=xq0OfHrX1PYhzCJhLPX87qRA7UBK++5EoiYyx2TWVGMUYvruqPg7OlDtDzyf6GbgjetQSc YKtwUgAXMTF1Ia820usj6fag2WtRBCRQgqIrE7ec2DfAMDrGAgjIcf54VOq6HcDHPUMZKZ tbpcFC7l2oQvCvTAhWxqF5cwaE0Zw2wr7DVLj9vW3g0hj6n7VpunVBhFaRsYeZdgHoQK8z wQnF3rVG104AKl/Zk3RtRjgJN24UFAf7xOn392C7g/kHwHgjJnBODIvRTCdkvNU2hzhyfa Pjc80Gmg1Qh0Qg0vElzHaDJgDld9SJOXqIEJN8BiQ5Gr0yd2T9gwiTESjDntmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716321878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p7cjIvMgxfO238g9YpqYviN5svS4QkgYdTMuRxWU910=; b=sJleM7C3r/CcbRGVg+P1wxr9nATCnnXMEq6qN9oCgXhCYdG5I8XZELX7rDEkjscTFEh3JE XTJZ4N5HcV+V1Ez70eEJTbtChN0LaT3WHCFYSrhGHyEUc9DM62DbhPf8oVyTs+C0nVDhkz V7qs+knVsfaYXO1Hjm2DTspLtoAfHXAe1iZotiv80gQAWhVcJIWhngm6ICtceKLaQlybnU VwRBrUhDk6uvuMoSo3X5wA2Urt/SazjazLR4j/r3Hozxye21Wk83qXu2ateME7ESR3YQGe X2uHYjLX98YkYrrcHj5KPmblvt1tlh2a1THFemdhm2OsGQiPEBAmOwmNhcupsQ== 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 4VkQPy3YK3zbt9; Tue, 21 May 2024 20:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK4cTT042807; Tue, 21 May 2024 20:04:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK4cBG042804; Tue, 21 May 2024 20:04:38 GMT (envelope-from git) Date: Tue, 21 May 2024 20:04:38 GMT Message-Id: <202405212004.44LK4cBG042804@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: 408957613bc0 - main - Regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 408957613bc065c4444812c3ae276ace03697ebd Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd commit 408957613bc065c4444812c3ae276ace03697ebd Author: Mariusz Zaborski AuthorDate: 2024-05-21 20:02:50 +0000 Commit: Mariusz Zaborski CommitDate: 2024-05-21 20:03:20 +0000 Regen --- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/kern/init_sysent.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index dd3b1464caba..54b07374bbce 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -312,7 +312,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 248 = ntp_gettime */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = reserved for local use */ { .sy_narg = AS(minherit_args), .sy_call = (sy_call_t *)sys_minherit, .sy_auevent = AUE_MINHERIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 250 = minherit */ - { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ + { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_issetugid, .sy_auevent = AUE_ISSETUGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 253 = issetugid */ { .sy_narg = AS(lchown_args), .sy_call = (sy_call_t *)sys_lchown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = lchown */ diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 46459f4c4e37..291d38865bd3 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -311,7 +311,7 @@ struct sysent sysent[] = { { .sy_narg = AS(ntp_gettime_args), .sy_call = (sy_call_t *)sys_ntp_gettime, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 248 = ntp_gettime */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 249 = reserved for local use */ { .sy_narg = AS(minherit_args), .sy_call = (sy_call_t *)sys_minherit, .sy_auevent = AUE_MINHERIT, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 250 = minherit */ - { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ + { .sy_narg = AS(rfork_args), .sy_call = (sy_call_t *)sys_rfork, .sy_auevent = AUE_RFORK, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 251 = rfork */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 252 = obsolete openbsd_poll */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_issetugid, .sy_auevent = AUE_ISSETUGID, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 253 = issetugid */ { .sy_narg = AS(lchown_args), .sy_call = (sy_call_t *)sys_lchown, .sy_auevent = AUE_LCHOWN, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 254 = lchown */ From nobody Tue May 21 20:09:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQWG3ZZzz5M8wL; Tue, 21 May 2024 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQWG1yZBz4DZn; Tue, 21 May 2024 20:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfhKnwzE+KoiHBcGFi17onb1fUzqImiFgQGW7qCSBRU=; b=YwieXZiFqx/qEvDrlfJUXtR+KvT88vVegdL8smsNkNbDCmzFFgEJh6oLmEnbvHUR5GCVYS H67+xs+3IIDp+7m3bD8jsaB4Ld+tIqb5m75fDpa6SlFACGak7qmJGzEgLbTefsVdLJMJND 1q+4xgdiQWeYDNXOddJWE9NIQhuSpam9dzafDiu/3EvhoPmB7nvyZuCXtTHh0p8eVxy/g9 R6tiQ/zZhsx24MFC9bsebYedRp8WXG7UgABtKlhxLcDbyqxiA/ArfCQBbpHbzhTcm2JULV 9ryF6meg8hwYh3SbWxHthYivVC1e/MB7WmCCKi2EOznLWCi5UHh9tcs7kqkVyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322154; a=rsa-sha256; cv=none; b=JzqEFOBsQTiCNfrm56NAO8tZvEDikOdvKfPnaIa8HTqOk3Ybc9jb9c5FiAtSjGpFJOrkVI mzJq/MS27CPc5VHE2GKMDwDeVyA5trrVLDQzfp3yQ+hQj8CiOSsRjvwYtYmJzSkWXdpzY7 qOJmh/TCPSGjmDRgLcOerWHatH+Cgb46VrMXRFikjms9rKkl0ACeMzqUvzpqm6s2TUslHa 0CWTHD2IBNgIm3yrAD/kbLrRjkYWvLbGOnHxx83gXhUHSKmQXtcQJiNlyasRuc78DZnQ6f IiSYfnPsGCqYazmLZISw3GKa8XVTim7Wz5e7t2c3YbVCZTb2eEVIU3dVG2cDkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KfhKnwzE+KoiHBcGFi17onb1fUzqImiFgQGW7qCSBRU=; b=LUepIKKDeK69BaJv3gkO7o8JH7S1yN8WLAXm+SiXhduZojLyZJLyWsNbeQXfxGR5bdRjTI R7xFeHijJJWAs3AcrIVwTwr2iNMqQ2DwqXVD5i23f8SqwaqkZMwKzpbVAbo2R5anuYxHjt Yr1lHpyQO9kkgBqW9A+4qg8bsyHTVjtwpFSwavJfM6jk4hJSmsOBTYp3tqI4GKPfuOt/L9 1miyNzamxV9r9mnVJO2v1uvEpcl6hrUwK7Q+wDSsjlkhxb1QzIYMvVg8J3Fx0VU2DOJ7FX ZvmdQJIHFibU/bHz6M/I00jeeR6KBsvq5WX97hmfg9kkZx27E8ovWFEIClTn1Q== 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 4VkQWG1Z2Tzc59; Tue, 21 May 2024 20:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK9EDt043660; Tue, 21 May 2024 20:09:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK9ENa043657; Tue, 21 May 2024 20:09:14 GMT (envelope-from git) Date: Tue, 21 May 2024 20:09:14 GMT Message-Id: <202405212009.44LK9ENa043657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e8adcfd14a09 - releng/14.1 - stand: Spell LUA_COMPILE_SET correctly. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: e8adcfd14a0979ca6874967d99db369644d9bfc5 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e8adcfd14a0979ca6874967d99db369644d9bfc5 commit e8adcfd14a0979ca6874967d99db369644d9bfc5 Author: Warner Losh AuthorDate: 2024-05-11 18:05:53 +0000 Commit: Warner Losh CommitDate: 2024-05-21 20:08:28 +0000 stand: Spell LUA_COMPILE_SET correctly. MFC After: 2 days Sponsored by: Netflix (cherry picked from commit e63d20b70ee1dbee9b075f29de6f30cdcfe1abe1) (cherry picked from commit 5dd6fb108dd9f5abbacbdc73197ef8468b93b958) Approved-by: re (cperciva) --- stand/liblua/lutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/liblua/lutils.h b/stand/liblua/lutils.h index ea715096df09..7fff8d3ae83d 100644 --- a/stand/liblua/lutils.h +++ b/stand/liblua/lutils.h @@ -34,7 +34,7 @@ int luaopen_pager(lua_State *); #include typedef void lua_init_md_t(lua_State *); -#define _LUA_COMPIE_SET Xlua_compile_set +#define _LUA_COMPILE_SET Xlua_compile_set #define LUA_COMPILE_SET(func) \ DATA_SET(_LUA_COMPILE_SET, func) #define LUA_FOREACH_SET(s) \ From nobody Tue May 21 20:09:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQWH3XCPz5M8wM; Tue, 21 May 2024 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQWH2xryz4Dlk; Tue, 21 May 2024 20:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7k3ARsHqeo57m/anayCQ6XEtJ/+A4skF3yOBVPcqD08=; b=DWcV7CUBtGIlohynX3UmLOfScSg8/KbobYfilAfgazmBjm/JduxZUGh7/GA0kljFZ3wuDC v1RW1ri83ekupA1ivSQXol/aTtp7Vkr7NG7PJmBCCimJ8XijDJamXE++G9WIBiQi+KYAHI +WcfiaDh7rP+erHN5LZ08fOWcEHzcTEssyltrzZdckAprQCPJ+Aa53FKrsHQ+0s4BLN0Za 3+JbajMCdhebfbpjq8J9FvVp41uSn+QeOuOn16oIfbTPgXKVJsbORFZutwNVxVcOud1lO5 JkUEazNjXTfMhUmHtZanQnaa0XPg8AuTFXs8AhqzWHI2tCB4WTX5d1tXc+wPEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322155; a=rsa-sha256; cv=none; b=OUqSZY5973C2nNyi+EC8AsNBbkch1ubX7QGc5r92G31OCudHZgK4id1ipy18gFKKywY+e1 +niCpd+VgzlUS8ghHcROAY9/hKiH9EtPeEOew13UmEbpEt3sQCUK9RY13PMRSqE0NNmYzZ v9XHRuIdar/MupxHp8CgxvZnMQoiHilf81YoHFhR9IEXwOybxN1qcCXfZQXq7CoobKieJ0 j5w5R2bUXbbhgsh+zYp6cOoQEqxzI4pr7HetcBZrBc+JHZJEdVuwxXiYLtN/z4DmqPg/3y gNwgGfYF9ILc7s50jKr0SUvHsaBknfdPaJyt7uEMFv1y9KY0tp8hzKdhYQJ0Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7k3ARsHqeo57m/anayCQ6XEtJ/+A4skF3yOBVPcqD08=; b=J/Y3ZG0w2X0A3/HT/F2UF2O9s5JNzE8jYw1b6hfBG9DG1f0YLwXWhEfxela8Wu7RuzjQzq LwldAa6RybEZFtp8ApB6fnQTTzDvCStm7DLx4kDGfzmf31OHHwGV42F6mYUhoQigRrwrFO C291uxPhyaOJjpHBvIusJrQNhhxjTnrPdm72zG45YlX6XATvX3Ru51wCt5pgLVmW5s9DFC D56Is0pO3VnriorCrDBMdLAmO3FeNzlGkHJPVw91rf/In5OoJJe49X9vEZ9/+QJoUFaSzX BY2nh4Z1Huq0QHlhbZHSefpAUe4o70oDbQAzyAR2eQExxbPNc+36TMBA7N78TA== 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 4VkQWH2XsRzbc4; Tue, 21 May 2024 20:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK9FEx043702; Tue, 21 May 2024 20:09:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK9F1o043699; Tue, 21 May 2024 20:09:15 GMT (envelope-from git) Date: Tue, 21 May 2024 20:09:15 GMT Message-Id: <202405212009.44LK9F1o043699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 78ccc5af3d23 - releng/14.1 - sys/dev/irdma/irdma_cm: fix compile without INET List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 78ccc5af3d23fe6c7d87c5f40cf6ab2b1d9d6fb2 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=78ccc5af3d23fe6c7d87c5f40cf6ab2b1d9d6fb2 commit 78ccc5af3d23fe6c7d87c5f40cf6ab2b1d9d6fb2 Author: Lexi Winter AuthorDate: 2024-04-12 16:47:16 +0000 Commit: Warner Losh CommitDate: 2024-05-21 20:08:35 +0000 sys/dev/irdma/irdma_cm: fix compile without INET irdma_get_vlan_ipv4() calls ip_ifp_find() even if INET isn't defined, in which case this function isn't available. Stub this out for the non-INET case to return an error (0xffff) instead. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1156 (cherry picked from commit 0478a0356272ab3907af9d97711f0bb8b14bf38b) (cherry picked from commit 7aba922879474189e5694ffb92a51ab387ad3dd6) Approved-by: re (cperciva) --- sys/dev/irdma/irdma_cm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/irdma/irdma_cm.c b/sys/dev/irdma/irdma_cm.c index 65cb5c643783..167e3c67390c 100644 --- a/sys/dev/irdma/irdma_cm.c +++ b/sys/dev/irdma/irdma_cm.c @@ -1664,9 +1664,11 @@ irdma_get_vlan_mac_ipv6(struct iw_cm_id *cm_id, u32 *addr, u16 *vlan_id, u8 *mac u16 irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) { + u16 vlan_id = 0xFFFF; + +#ifdef INET if_t netdev; struct vnet *vnet = &init_net; - u16 vlan_id = 0xFFFF; #ifdef VIMAGE vnet = irdma_cmid_to_vnet(cm_id); @@ -1676,6 +1678,7 @@ irdma_get_vlan_ipv4(struct iw_cm_id *cm_id, u32 *addr) vlan_id = rdma_vlan_dev_vlan_id(netdev); dev_put(netdev); } +#endif return vlan_id; } From nobody Tue May 21 20:09:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQWJ4d85z5M98G; Tue, 21 May 2024 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQWJ3znlz4DbC; Tue, 21 May 2024 20:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fsjNkQ5WkujE2GT4CL2W1cOw3quOb3SsSiJwl4botuA=; b=K0niKoGtNK4eH80dN4PWrx4Cq3XikGIlW3NKG3VEuopi8MtbTvdOL4FvBxJMyFj3MHE16N Q7oD0mFFtP6JtmcMt0fMq3/QD75dTyqxhhNF5p+W2dSugZn7QLwGDvrzalitXScgXxa9xG WYRxRe16mgjOAM31JBp+zkiLOklGETJPr2tnlI8eS6TDIDJ8QyE1I/kzy2c/+4BoO7ezw4 ZwnpF7EDXP2kGhaBI+LJlCIY8jqdPi1zo4XMrfrjNuFiakzbwnA+JqbP4so1ukcXnLRUWh Jgev/GlSWFTaYRDUMwXwBovZVejSM2SMV9up/4mRoYht/5tki0epe9IefZkSmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322156; a=rsa-sha256; cv=none; b=dqFS2NUaFh4MRiOa6bGKqCFGe7BE5SAcqI+f75x6AjcQ/hS/w28vrh69mHi9KYkL81hRcK 8qLVfltssf4uijIDqtmAy2GLbdIytrJrd6jUvW5OIRs97ki93rLJdfT5NIymnBhIXafJV6 ZGfK/5giSu5n0Cc6rNUxp4aKPXBSVyhRZ4qVjME3HaJDdnGy3LcsyFJhXLfhxUEg/Q9rYz vpfw93TzwJvsqgYt8sJPqNbJnxqjXjss965OxfWBpvlBJYxaaqQszDxdsfS30ZaAzHh6hP WA1JUAv3YqeGZXlatOg68Qsf+qgyHFTIPS8t4wFOM6DFKGfOOVeBWqKZa+u9yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fsjNkQ5WkujE2GT4CL2W1cOw3quOb3SsSiJwl4botuA=; b=AF5YPEQtCOhiT9aBW0Ipf5Q6slY6X6SgKqzBSc4U5CHnpiy5qJn0REfM7+jeQ7DK4YNw5y 4sc1Au2q0deKsu1Fl58HS2QqJpY5S5H+a5kim+nktQd1C3S5GiAf1iGOYJdWajB/Zweq4N YIc4xb71lIZYF+hvF7zGjvLPrGpEwpKDV4zPw89lQFNXRMC57ACQfBfU6/g/Ra1+wOgO1V vklmOC7HsSn1aGsNMpUx2O9VX7Gs4vDsQnzlZ30BjZuQ+AmPd3kvBSHLDDaojvzeq/3hxR /AHP/Xby5ZGVA6O02BcUHwRne43Zj9pmVSYLhYc0om9m9WHKMcLIli+t8vl17Q== 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 4VkQWJ3HNzzbtC; Tue, 21 May 2024 20:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK9Gu0043748; Tue, 21 May 2024 20:09:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK9GQ8043745; Tue, 21 May 2024 20:09:16 GMT (envelope-from git) Date: Tue, 21 May 2024 20:09:16 GMT Message-Id: <202405212009.44LK9GQ8043745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 6df9fa1c6b83 - releng/14.1 - sys/netinet6/in6_pcb.c: fix compile without INET List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 6df9fa1c6b8391e09bf74195d302ab12286a1d8a Auto-Submitted: auto-generated The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6df9fa1c6b8391e09bf74195d302ab12286a1d8a commit 6df9fa1c6b8391e09bf74195d302ab12286a1d8a Author: Lexi Winter AuthorDate: 2024-04-12 16:54:24 +0000 Commit: Warner Losh CommitDate: 2024-05-21 20:08:41 +0000 sys/netinet6/in6_pcb.c: fix compile without INET in6_mapped_sockaddr() and in6_mapped_peeraddr() both define a local variable named 'inp', but in the non-INET case, this variable is set and never used, causing a compiler error: /src/freebsd/src/lf/sys/netinet6/in6_pcb.c:547:16: error: variable 'inp' set but not used [-Werror,-Wunused-but-set-variable] 547 | struct inpcb *inp; | ^ /src/freebsd/src/lf/sys/netinet6/in6_pcb.c:573:16: error: variable 'inp' set but not used [-Werror,-Wunused-but-set-variable] 573 | struct inpcb *inp; Fix this by guarding all the INET-specific logic, including the variable definition, behind #ifdef INET. While here, tweak formatting in in6_mapped_peeraddr() so both functions are the same. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1155 (cherry picked from commit 042fb58d009e7efc5b334b68fffbef9b1f620ec8) (cherry picked from commit f30c2d86c39f8c3090e1f8967c13f2dd0d5d664b) Approved-by: re (cperciva) --- sys/netinet6/in6_pcb.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 5c4ef7570ddc..90f91eef1daa 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -579,13 +579,13 @@ in6_getpeeraddr(struct socket *so, struct sockaddr **nam) int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam) { - struct inpcb *inp; int error; +#ifdef INET + struct inpcb *inp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("in6_mapped_sockaddr: inp == NULL")); -#ifdef INET if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) { error = in_getsockaddr(so, nam); if (error == 0) @@ -603,21 +603,23 @@ in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam) int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam) { - struct inpcb *inp; int error; +#ifdef INET + struct inpcb *inp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("in6_mapped_peeraddr: inp == NULL")); -#ifdef INET if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) { error = in_getpeeraddr(so, nam); if (error == 0) in6_sin_2_v4mapsin6_in_sock(nam); } else #endif - /* scope issues will be handled in in6_getpeeraddr(). */ - error = in6_getpeeraddr(so, nam); + { + /* scope issues will be handled in in6_getpeeraddr(). */ + error = in6_getpeeraddr(so, nam); + } return error; } From nobody Tue May 21 20:09:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQWK68H0z5M98K; Tue, 21 May 2024 20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQWK4Ynfz4Dd9; Tue, 21 May 2024 20: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=1716322157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWXU9AB5+7UKk9sQafPPyREsR5YP2/Q+LPaKNMOEPgc=; b=epXDACnxjKg1H6wiLV5aWG+oSwRR96bAyhhCq9Ec1C9UpfmxEwkbrVjVbJsPzqF7oDqsxT w1CAmLRV51G+sztrxqohUMoKFnORJNW5jyoPWGx8/TzVjek2xsABQ5JfcWd0NEC1jw8HXu v9a0AyWzsBrQz3CODxikt8BpBrxsOU+Qjjz0hIyFI9kBIPq4x+2y4Loft0EUMFFbGVAXF8 zdPu+3yhLwZZB28e4KwF8Ty+JOaRv77WXz8702ojJ2tD+yu02U4+LgPat83parLlquE+BV UKPK8q7+GFTUpAzL8m8G8O4EF0egEuBsEnP2mk2a47FTMyezKCx48avQsj77ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322157; a=rsa-sha256; cv=none; b=FiuG04hrrZ10s+rGe+K6ywNdio/z8N87Eim4jDBAcs3GXefqclrTi0CZX+XA3LbrPyAVdj myMHNZVAkvlNORf6LcmmFoxSDPGOEmtlqIxO4sbnxatC4RJsUf4nrpvrYR5rhYwnX8FT+h 0AR1+7KYBQzm6u4OrC0/DobC3NCeXCuloC93SHkKaQZ9VoNJCcaWvYpTUIdjnpf9D+q5iN nk+Qs3lYUtXtk6ipwvap7JojMLgzOWzTR51f7cpd5PWxIY5oOhU/OgqdvgC4LcZW3YbgVd Csc+/yQ7jn+lY50ku9rJR/vrkDNUVWizTWEGBoSYdc1O3QF298n3yVHXrtyayA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWXU9AB5+7UKk9sQafPPyREsR5YP2/Q+LPaKNMOEPgc=; b=OiXU6QgkAmC26GZ6CU/h/2CKRLBRC3Us788LeY27A4w/hwEHrFICqDpOSqYDTzuQmnAvrb Jm+F0AhGJkgzVTE7e3imFomPwE8j31+ABAbHbJDYKjZvt0Yl/NRANLUYzgOh0TNRgFGRgi gVI8UsqWXveQO/b8JoLlyBQsisBN4OxdPpEdbDwcPRMFpC8AScn0HZUSA7BpDqbNDqy3Db hTRO1R8LE4mVWlgauMeIO3oJBNqncs+SBRNdrJtTJQOO1tgN61YI+X6B6SYE2KIH3ggY5a 5A75kcMrQVvG9CCuUFR4BO5jn9Dj/CeWRBBf1aoARYh/ueWCZwo9FgwyQc1utA== 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 4VkQWK4854zbQV; Tue, 21 May 2024 20:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK9HJD043799; Tue, 21 May 2024 20:09:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK9Hrc043796; Tue, 21 May 2024 20:09:17 GMT (envelope-from git) Date: Tue, 21 May 2024 20:09:17 GMT Message-Id: <202405212009.44LK9Hrc043796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 2507479f70df - releng/14.1 - sys/modules/dpdk_lpm4: do not build without INET List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 2507479f70df850742c750a25dace99b13740582 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2507479f70df850742c750a25dace99b13740582 commit 2507479f70df850742c750a25dace99b13740582 Author: Lexi Winter AuthorDate: 2024-05-15 00:16:10 +0000 Commit: Warner Losh CommitDate: 2024-05-21 20:08:48 +0000 sys/modules/dpdk_lpm4: do not build without INET Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1236 (cherry picked from commit 304a03275a65cf811fb6c06fa1c37783d07c99a4) (cherry picked from commit 040a7e0dcbc234aa66d0b4b53638db12b81a7b75) Approved-by: re (cperciva) --- sys/modules/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index b6327ec224af..4b4534aee076 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -500,7 +500,7 @@ _ipfw_nptv6= ipfw_nptv6 _ipfilter= ipfilter .endif -.if ${MK_INET_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO} +.if ${MK_INET_SUPPORT} != "no" && ${KERN_OPTS:MFIB_ALGO} && ${KERN_OPTS:MINET} _dpdk_lpm4= dpdk_lpm4 _fib_dxr= fib_dxr .endif From nobody Tue May 21 20:09:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQWM0YWrz5M8wS; Tue, 21 May 2024 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQWL5SY4z4DVv; Tue, 21 May 2024 20:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+F+xfC3QBmFcK3eUxNlge8PjuTWO9y78heCzydccqAU=; b=EYiD6MK+erQMZZlqrag1/VUOXAjFO+GKAhuAR6N1d8jEwA0jeC5VF4Z0gojDdfuqriCRDZ 0xW6+YBBVs1hYAoZDilOI6e+ZVGW9ugzLQL7MhI+6UkU5Xc14TStB063DAwklawQ3b66Zs wJ+RDlpxOLbZJSzVa8QUIaukPWWmEXG3hpZYcr2kAIx9AUT0fb3DP03jIOAP4CMyJwtgJV ZvcKKJ9Z0/l5ImeunsaLlMY+qBRF9OTYm+nPs0kQwMqaw+75kMxCOWOuTkPqgxtEC357TM TdZUUepWHt3bfN2AmItQMzvpb4T3zwIylWIZ8jJJXxCqSUk4F6ku/sFKh9zP4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322158; a=rsa-sha256; cv=none; b=f2+DJi3OUAR144VZ2l++4vMAT0pLM141anjZLWqVikK63X1DkzVV6u9MHZOgZlH47oOh// rZnB3icv8CfUS9ID3XLFq7OavYrr70izjamGHzmqIAWUptLCoUvA/4E0Vpja/s5ziMAqS9 MqoIIkF8TKq2r4hasbWL8TR4lapEItrZ/yhg5SejnU5J+VWg2spoFlOoy+cbkLwIFPUn/W J5Dp/arQL/5BHgsM+bL4DSCK8G3HzmStzH3NnU5VrBHq3emLHoX2neBxFHIcbQ617IPzZ/ X/eO2aZB6/C7m9k2o0pcnpZigC2jNtsfy2LBKd+W3Nm/Em4Izne5/PU4Rtuhjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+F+xfC3QBmFcK3eUxNlge8PjuTWO9y78heCzydccqAU=; b=wH2iBP839sT+4QgOETuIbMknoCwRJNROjd7fq0L5t2PfOhDyMrS0Yu+e2+e7+RfiVtmy0J DZUQCF//NE/gshjbqMer8HEKj95xp2cB2ZqL4JxCcdOfeFsEou5uarVJa+GpqK8uWRAkIg t8u0uM7Z/jL3TISjtb5kLALndyfm9YRIjQvH4xQEfL/IiWzvgUAvzVk4c2r0+TAYii7c4k OW99UTwFqLEvoIeDQkErrr0gcVt89nqTyaRXM1z+Pa2Gu4+zUqSu7TSi5KlWL97Mv5IIED 2/LCsgq7JrL4CeKB+4mZLGzhlpgsiBFjWRi0pAPb+cr2SNWH1H3x9NIRqGO2eA== 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 4VkQWL536yzbtD; Tue, 21 May 2024 20:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK9IXQ043844; Tue, 21 May 2024 20:09:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK9IkF043841; Tue, 21 May 2024 20:09:18 GMT (envelope-from git) Date: Tue, 21 May 2024 20:09:18 GMT Message-Id: <202405212009.44LK9IkF043841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e59ebcf36f41 - releng/14.1 - intro.2: Add sys/syscall.h to SYNOPSIS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: e59ebcf36f410f37aae47f6712066625e9dfdeae Auto-Submitted: auto-generated The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e59ebcf36f410f37aae47f6712066625e9dfdeae commit e59ebcf36f410f37aae47f6712066625e9dfdeae Author: Alexander Ziaee AuthorDate: 2024-05-04 14:54:20 +0000 Commit: Warner Losh CommitDate: 2024-05-21 20:08:53 +0000 intro.2: Add sys/syscall.h to SYNOPSIS MFC after: 1 week Co-authored-by: brooks Reviewed by: brooks, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1192 (cherry picked from commit 69ff2d754c1c8bd9c2b6cea28aa754e9f92f9613) (cherry picked from commit cbe2436dda127061a13e5565a5badec02249b2e5) Approved-by: re (cperciva) --- lib/libc/sys/intro.2 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2 index 1b84b219fe0e..5b8f437567b8 100644 --- a/lib/libc/sys/intro.2 +++ b/lib/libc/sys/intro.2 @@ -36,6 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS +.In sys/syscall.h .In errno.h .Sh DESCRIPTION This section provides an overview of the system calls, From nobody Tue May 21 20:09:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQWN0dYwz5M92M; Tue, 21 May 2024 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQWM6TzQz4Dmg; Tue, 21 May 2024 20:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbBYpv0Pitn0Adnh9VY7BT121uW8BMFYGuZGCRhsdI8=; b=d6xCxpG/iRaijRKBEDN5dlHeM7F3XtTbzjpi9Q2UAeUCfluzrZ/A2bweF3JgM7iZCtQ5Sy a6s7JIgMVDijMmaD6zga3m1d76jnHvoM5utZ2kK4wdAMLNr4Mv9jCn5bPTY4nbKPdrNa1B nkR+BYuyhUIYoOG/aF9G5DWePXKpWYAC/iOwvEZD+mhYGpcqCFokJlmzYk3/nmy3bPVF7r qcFzixGfcSp8BKHG6uImNjUuiMcxmo1WNxXia+9vKtTLBGRBf6QDAAPP2Y6IOAhDqtb8XU xiLXSjt8IzVyf0+Ad6HTwOhUYPD8lvGB2aCpDL0RB/aKT/atxg/1v2SwIM1n3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322159; a=rsa-sha256; cv=none; b=rBfzI2EikUBlirgJrGnS9c6UuD4MncRN9zna/b7sfWFty5peOZnX4Eap6TiL2JKPaF6EUV FxWAHj35Oqq8gjVlwSkF0uGr7gAR1DvxEu2f0W+oahzYW8WJzj5VkwcC2wKFPbhtHHm5HB 5AWqEtFrJvhcYg8ZjTY4LgCHhDQm7O2cj8kR2vuQ/bGqkPEkV9Zfx3j1dJvABvRcj6EsLn 2kaX/T9ge20OEnFgRqLWIr06zVb7nDIDu2d25WMq9qApc1bZdo8IgVM8Yw+faRiRdKY/fR 6S2tgtFrRHpsVIxoPcjAR1SRyHbZU6h5shmAOpzK4O9ECJXwQxFfAgE/E4WBYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbBYpv0Pitn0Adnh9VY7BT121uW8BMFYGuZGCRhsdI8=; b=TJHhi9OTpMBEbzBMENDm5lkfNV5IqVzEEKxRxhq7rNbYTY0I2hCbhgfAH7yn0dhwzo1m9A 1mTRiav8J8G9jkyWOfSAQNAnGvIBZFhWCh8Q0KNYNsBuH+8fpedTVxY9mf5tfFcFIQGW1x TrfC8TUpCCD0wqL/+pdrSuIuKl/N6TOfGQRysekce+hJl9h0nwJp1WCZ51Ha+9WeRTl8Ks XrBLcB+yRaRmrVD+bPjW+dxGWLQT3ILIEH18v8C97QOv9+WY5KUxyT1dMXlsnqeC9Y4v4s Zo72B6iW+HSbubDglbcYuxRreeQWydGgh4w/1Vi63k8WNGTQY0iJ3NYsaN64Ag== 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 4VkQWM65Pszbry; Tue, 21 May 2024 20:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK9JCu043895; Tue, 21 May 2024 20:09:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK9JXf043892; Tue, 21 May 2024 20:09:19 GMT (envelope-from git) Date: Tue, 21 May 2024 20:09:19 GMT Message-Id: <202405212009.44LK9JXf043892@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 839a522e2ec3 - releng/14.1 - intro.2 as errno.2: Update maximum hard link limit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 839a522e2ec3577de877bfc4e8baa363ff4a8f08 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=839a522e2ec3577de877bfc4e8baa363ff4a8f08 commit 839a522e2ec3577de877bfc4e8baa363ff4a8f08 Author: Alexander Ziaee AuthorDate: 2024-05-04 14:54:20 +0000 Commit: Warner Losh CommitDate: 2024-05-21 20:08:58 +0000 intro.2 as errno.2: Update maximum hard link limit MFC after: 1 week Co-authored-by: brooks Reviewed by: brooks, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1192 (cherry picked from commit 6dfbe695c3223822734dddc926415a3ba347b42c) (cherry picked from commit 828e648b26ea1d3d77a63eea395bba56b5109f2d) Approved-by: re (cperciva) --- lib/libc/sys/intro.2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2 index 5b8f437567b8..2232d56707a7 100644 --- a/lib/libc/sys/intro.2 +++ b/lib/libc/sys/intro.2 @@ -229,8 +229,13 @@ system call was issued on a socket, pipe or An attempt was made to modify a file or directory on a file system that was read-only at the time. .It Er 31 EMLINK Em "Too many links" . -Maximum allowable hard links to a single file has been exceeded (limit -of 32767 hard links per file). +Maximum allowable hard links to a single file has been exceeded. +This limit is a filesystem dependent variable +.Po +.Va UFS_LINK_MAX No on Xr ufs 4 , +.Va FUSE_LINK_MAX No on Xr fusefs 4 , and +.Va TMPFS_MAX No on Xr tmpfs 4 +.Pc . .It Er 32 EPIPE Em "Broken pipe" . A write on a pipe, socket or .Tn FIFO From nobody Tue May 21 20:09:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQWP1kNwz5M9F2; Tue, 21 May 2024 20:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQWP07rmz4DkQ; Tue, 21 May 2024 20:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SYaYT/tdIP8028DDS/UpfbYmpwLVi/VLpDe0YuANaAE=; b=fuTYuazN5XYVDqnSchDw0+9dT8UW6JLOdyWTkmbcgCK6vQe5PikDAP9zCxUizlL0wtI1Sf e5l9whlT7kYSrlBcwtX01HMYURB45onoA+8oxONMo8MwdmNHtVyxAEEk+KiCv1gNeBlVjw mtAkXrJtZxCi4EERAH2SWuYi6XPKAzJ6aGVhgQnSU3BVVLvGhll48pdYf51E6/HAbLkuMp VWca3iVhXbM+u/8JaUfeWbJNgRAEd5JH3o8fPUbuU3iJ3lwxsTyTFhQgx6iSWx35BieN08 AmG2BTRsbfw+C9AtEEWAq/njS+F/r4BJWUOUqhh5m03AshWc145/hYX40ELaHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322161; a=rsa-sha256; cv=none; b=GDT7tybjSnjGd5vcgayYU/Zaw9jyWZnS+tkK4SYri5gMR8/OyJO23Z2DNGAYkHBfaC2bkN 4UjMH1E4GAsIbqCLJ6CgxK40uZ/cDPSMgaPqCZGEPPSg7eIkCipSkVycBG4cu9qkubIk7+ M+dEfz7sVFRKNOIk0/g2+SwLNtnnbLZ9QTNFINmUiBqHbcA+7s2JdBolB0r8YivA/4XSy/ hn6J3V2wRcwLmK7P9eO+B6LuBai8XPMhlyCPTLjZNJvTnoerQgV7m3mnblqdQ6/Jnmi2cv rkNXzh0vd0EIrlAe51ESn4kSGPVk4rsIN4+Dv/SeRfrkxsK8a6ly05dS5KroMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SYaYT/tdIP8028DDS/UpfbYmpwLVi/VLpDe0YuANaAE=; b=c+r9xICSLZfUOIYf74cu8Y9UPQYeEZC4xsYUOhafT9guT7ZCOfNQCpLwKYKu+KCPnp0ddn EeSlHr1jHbPKrvZfBAfxnU+lsBVXGnGKFpGYwYU+jxXm+uhc2orfQyNIw0dbqSzaw359mZ DSuQohjcEqxap3PowhmLcWkH+PIgEVRL41SVfaS+rrjVpg1uTCVZWadB8Cd8e7kZaLegR0 yuR0A4Kc9OxeEUCjTO+iZBz/v36rWBQH3maKWpOwwrTvuuSSWgDxEu5ofV+s85vrzaLxNy 6jsoPNADjhKyzGCmz1vdlwBPbZCl+KxA8bSgSKXqyg8+DdgEHj8VK8uAPMLhQg== 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 4VkQWN6sqFzbs0; Tue, 21 May 2024 20:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LK9KM3043942; Tue, 21 May 2024 20:09:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LK9KYv043939; Tue, 21 May 2024 20:09:20 GMT (envelope-from git) Date: Tue, 21 May 2024 20:09:20 GMT Message-Id: <202405212009.44LK9KYv043939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 39f92a4c4c49 - releng/14.1 - networking.7 : create network quickstart guide List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 39f92a4c4c49490e8a3a4549fae054c0e59f6459 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=39f92a4c4c49490e8a3a4549fae054c0e59f6459 commit 39f92a4c4c49490e8a3a4549fae054c0e59f6459 Author: Alexander Ziaee AuthorDate: 2024-04-17 15:51:35 +0000 Commit: Warner Losh CommitDate: 2024-05-21 20:09:04 +0000 networking.7 : create network quickstart guide Now that the handbook has been moved to ports, I think it's very nice to have a network quickstart guide in-band, in base, in the system manual. If the user uses any of the following terms "man -k {network,networking,wifi,quickstart}" this page will come up, which is I think a very common use case for new users. Currently, this document explains connecting to a basic Ethernet network, a basic wifi network, scanning for wifi networks, and airplane mode, as well as linking to other sections, including the handbook Co-authored-by: Graham Perrin Reviewed by: imp, bcr, freebsd@igalic.co Pull Request: https://github.com/freebsd/freebsd-src/pull/833 (cherry picked from commit 75eda0096bf83b9b88996d9903b5d4e504047eba) (cherry picked from commit 5dced41439109368a8f3c9a818fe518542d7063e) Approved-by: re (cperciva) --- share/man/man7/Makefile | 5 +++ share/man/man7/networking.7 | 101 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 11246195201c..7f506c1dfc5f 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -47,6 +47,11 @@ MLINKS+= c.7 c11.7 MLINKS+= c.7 c17.7 MLINKS+= c.7 c2x.7 +.if ${MK_INET} != "no" +MAN+= networking.7 +MLINKS+= networking.7 wifi.7 +.endif + .if ${MK_TESTS} != "no" ATF= ${SRCTOP}/contrib/atf .PATH: ${ATF}/doc diff --git a/share/man/man7/networking.7 b/share/man/man7/networking.7 new file mode 100644 index 000000000000..869812c05a9b --- /dev/null +++ b/share/man/man7/networking.7 @@ -0,0 +1,101 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Alexander Ziaee +.\" +.Dd April 17, 2024 +.Dt "NETWORKING" 7 +.Os +.Sh NAME +.Nm networking , +.Nm wifi +.Nd quickstart guide to connecting to a network +.Sh DESCRIPTION +In the following examples, it is assumed that we are connecting to Ethernet +with the first interface found by the +.Xr em 4 +driver, and Wi-Fi with the first interface found by the +.Xr iwn 4 +driver, though your hardware will vary. +.Sh EXAMPLES +.Bl -tag -width 0n +.It Sy Connecting to an Ethernet network with DHCP: +.Bd -literal -offset 2n +.Ic # dhclient em0 +.Ed +.It Sy Connecting to a cellular network with USB tethering: +.Pp +Load the USB tethering driver, +.Xr urndis 4 : +.Bd -literal -offset 2n +.Ic # kldload urndis +.Ed +.Pp +Ask for a DHCP lease on the USB tethering interface: +.Bd -literal -offset 2n +.Ic # dhclient ue0 +.Ed +.It Sy Connecting to a Wi-Fi network: +.Pp +Identify your Wi-Fi hardware: +.Bd -literal -offset 2n +.Ic % sysctl net.wlan.devices +.Ed +.Pp +Configure your Wi-Fi hardware as wlan0 interface: +.Ed +.Bd -literal -offset 2n +.Ic # sysrc wlans_iwn0="wlan0" +.Ed +.Pp +Set that interface to negotiate a DHCP lease with +.Xr wpa_supplicant 8 : +.Bd -literal -offset 2n +.Ic # sysrc ifconfig_wlan0="WPA SYNCDHCP" +.Ed +.Pp +Enter the details of the Wi-Fi network: +.Bd -literal -offset 2n +.Ic # wpa_passphrase \(dqmyssid\(dq \(dqmypassphrase\(dq >> wpa_supplicant.conf +.Ed +.Pp +Restart the network interface daemon: +.Bd -literal -offset 2n +.Ic # service netif restart +.Ed +.Pp +.It Sy Scanning for Wi-Fi networks: +.Bd -literal -offset 2n +.Ic % ifconfig wlan0 scan +.Ed +.It Sy Airplane mode: +.Bd -literal -offset 2n +.Ic # service netif stop +.Ed +.El +.Sh SEE ALSO +.Xr bsdconfig 8 , +.Xr dhclient 8 , +.Xr ifconfig 8 , +.Xr wpa_passphrase 8 +.Pp +The Advanced Networking chapter of the +.Fx +Handbook. +.Sh CAVEATS +Shell Special Characters in the +.Ar SSID +or +.Ar passphrase +will need to be escaped for +.Xr wpa_passphrase 8 , +commonly using +.Ql \e , +see the manual page for your shell for more details. +.Pp +Currently +.Ql Ic service netif restart +does not restart routing. +A common workaround is to issue +.Ql Ic service netif restart && service routing restart +instead. From nobody Tue May 21 20:18:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkQjy4Xpsz5M9hg; Tue, 21 May 2024 20:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkQjy2BgSz4HGw; Tue, 21 May 2024 20:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xxTs6eVzzn7Hs+dXlp5zwxLbyblB7KM9B2VaCC7w/cY=; b=XDxIjiAWFChVyGCu/ttHZ3DjBnywNh4EYKW8rmHpbLBR7z4kYbtdaTESwFjuVq/NDIVDI8 S+cfwuzurj5GTqIFL1X0S1ZZnciMxs18CeuUN+8kZ4OvvIENwMnbu2TEEdw0uOLhsmSiQp eBThj+wJoHlC6rtfhA1q8meY7IUglol3rc+o08uxeXnltZkXrruAXS62eJMl+OsLM3tRIy NbtqC0usiOicmv6Fb+ysgbS8ossghHym32Q60FO/w39fRVtRpVMMHX3fGfCUfHS9Ne9hHS z2Qd/wm1raTSeNatL+IBNfW6uVZEnTR1M6tRWtsSVXRj8FCiOUI1skVFjrq0mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716322710; a=rsa-sha256; cv=none; b=TrUn303j+Rc+OSN75jGXAUc6fhpzzIoch3eU9E6fGmLTCrb+DdSADUBTAE+pAF4pFwWuTY phN5IMq4i/Qqe+0QMsQVckxkfbQS5QZ4KpJJPeZkHTKvqg6fd5oPXI2j9URpVAbjNjXj+8 w2Z8kesqCUTevn4jlqBmq+ahNqMeYJUQ0vu+6wIYCNz77mOLhWGYdQ/E1RxJ+vveQ9BFkP BWd+QdztCqfvM7FASMs2NVy5yfNvV6xUPDjGHz1fccsX2R2+sG8ksbB+bhBWHRvcoBs97D mRqkEpXmrmd8RjRyJNM/TP8EQasmRNf5M5+hlQoPPqjKzJnsnzv0hE0U8F3/LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716322710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xxTs6eVzzn7Hs+dXlp5zwxLbyblB7KM9B2VaCC7w/cY=; b=rwHIpK3Kde95V6TiV4TnLLK76t5Uh+uTMD+NDNq3PrNe8Q/RBKDRwYC19puotablIEFSlO yz3ekBt1FyTmz8DQN2zILb1u2sCT5J5Jg2t4adRE4y4VP6WCZrM3heztVVIoL85bOVXHGl hM/iQ74ZzB42yTxdyQCgtNB3bFMyrb4ZmfcIT48kpTdD5K6aO1qXPeYrV81vL/O7B2fXmr 4I2XZRy6GFd/fIVB44EVdI9EcpidsPK1fZQX25iI0EuGhPzJRj/U0Cf4A7XIhZr6CqjEH4 hv4QBnRn/SaBLK8psHNhs5XqDH4abwm2esMZuu42ZIT+NvwaKwAQkZjmE0BGIw== 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 4VkQjx6wchzc7V; Tue, 21 May 2024 20:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LKITrn060298; Tue, 21 May 2024 20:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LKISXW060294; Tue, 21 May 2024 20:18:28 GMT (envelope-from git) Date: Tue, 21 May 2024 20:18:28 GMT Message-Id: <202405212018.44LKISXW060294@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: dcde37c4170b - releng/14.1 - unbound: Vendor import 1.20.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: dcde37c4170b6c71a8b424b53180ff8c8e335435 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dcde37c4170b6c71a8b424b53180ff8c8e335435 commit dcde37c4170b6c71a8b424b53180ff8c8e335435 Author: Cy Schubert AuthorDate: 2024-05-10 20:56:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-21 20:17:21 +0000 unbound: Vendor import 1.20.0 Release notes at https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/ Security: The DNSBomb vulnerability CVE-2024-33655 Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main (cherry picked from commit 335c7cda12138f2aefa41fb739707612cc12a9be) (cherry picked from commit 7a2bb28f8e6d85ab82712d0f37261f388fbf7775) Approved by: re (cperciva) --- contrib/unbound/Makefile.in | 16 +- contrib/unbound/{ac_pkg_swig.m4 => ax_pkg_swig.m4} | 110 +- contrib/unbound/ax_pthread.m4 | 444 +- contrib/unbound/cachedb/cachedb.c | 133 +- contrib/unbound/cachedb/cachedb.h | 16 + contrib/unbound/config.h.in | 105 +- contrib/unbound/configure | 12872 +++++---- contrib/unbound/configure.ac | 16 +- contrib/unbound/configure~ | 26616 +++++++++++++++++++ contrib/unbound/contrib/rc_d_unbound | 9 + contrib/unbound/contrib/unbound.init | 1 + contrib/unbound/contrib/unbound.init_fedora | 1 + contrib/unbound/contrib/unbound.init_yocto | 1 + contrib/unbound/daemon/cachedump.c | 23 +- contrib/unbound/daemon/daemon.c | 26 +- contrib/unbound/daemon/remote.c | 130 +- contrib/unbound/daemon/unbound.c | 39 +- contrib/unbound/daemon/worker.c | 35 +- contrib/unbound/doc/Changelog | 187 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf.in | 28 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 2 +- contrib/unbound/doc/unbound-checkconf.8.in | 6 +- contrib/unbound/doc/unbound-control.8.in | 8 +- contrib/unbound/doc/unbound-host.1.in | 2 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5.in | 72 +- contrib/unbound/doc/unbound.doxygen | 2931 +- contrib/unbound/edns-subnet/subnetmod.c | 40 +- contrib/unbound/iterator/iter_fwd.c | 119 +- contrib/unbound/iterator/iter_fwd.h | 60 +- contrib/unbound/iterator/iter_hints.c | 95 +- contrib/unbound/iterator/iter_hints.h | 54 +- contrib/unbound/iterator/iter_utils.c | 62 +- contrib/unbound/iterator/iter_utils.h | 6 +- contrib/unbound/iterator/iterator.c | 295 +- contrib/unbound/libunbound/context.c | 8 + contrib/unbound/libunbound/libunbound.c | 5 + contrib/unbound/libunbound/libworker.c | 21 +- contrib/unbound/services/authzone.c | 10 + contrib/unbound/services/cache/dns.c | 52 +- contrib/unbound/services/cache/infra.c | 170 +- contrib/unbound/services/cache/infra.h | 28 + contrib/unbound/services/cache/rrset.c | 87 + contrib/unbound/services/cache/rrset.h | 31 + contrib/unbound/services/listen_dnsport.c | 51 +- contrib/unbound/services/listen_dnsport.h | 8 +- contrib/unbound/services/localzone.c | 6 +- contrib/unbound/services/mesh.c | 106 +- contrib/unbound/services/mesh.h | 6 + contrib/unbound/services/rpz.c | 342 +- contrib/unbound/services/rpz.h | 8 + contrib/unbound/services/view.h | 3 +- contrib/unbound/smallapp/unbound-anchor.c | 70 +- contrib/unbound/smallapp/unbound-checkconf.c | 13 +- contrib/unbound/smallapp/unbound-control.c | 5 +- contrib/unbound/testdata/cachedb_expired.crpl | 324 + .../testdata/cachedb_expired_client_timeout.crpl | 343 + .../testdata/cachedb_expired_reply_ttl.crpl | 259 + .../unbound/testdata/cachedb_subnet_change.crpl | 304 + .../unbound/testdata/cachedb_subnet_expired.crpl | 322 + .../testdata/cachedb_subnet_toecs_timeout.crpl | 229 + contrib/unbound/testdata/iter_dname_ttl.rpl | 39 - .../testdata/iter_ghost_grandchild_delegation.rpl | 256 + contrib/unbound/testdata/local_cnameother.rpl | 67 + contrib/unbound/testdata/rpz_clientip_override.rpl | 269 + contrib/unbound/testdata/rpz_cname_handle.rpl | 779 + contrib/unbound/testdata/rpz_nsdname_override.rpl | 325 + contrib/unbound/testdata/rpz_nsip_override.rpl | 332 + contrib/unbound/testdata/rpz_passthru_clientip.rpl | 90 + contrib/unbound/testdata/rpz_qtype_cname.rpl | 120 + .../testdata/rpz_reload.tdir/example.org.zone | 2 + .../testdata/rpz_reload.tdir/rpz.example.com.zone | 6 + .../testdata/rpz_reload.tdir/rpz_reload.conf | 30 + .../testdata/rpz_reload.tdir/rpz_reload.dsc | 16 + .../testdata/rpz_reload.tdir/rpz_reload.post | 12 + .../testdata/rpz_reload.tdir/rpz_reload.pre | 26 + .../testdata/rpz_reload.tdir/rpz_reload.test | 109 + contrib/unbound/testdata/subnet_cached_size.crpl | 308 + contrib/unbound/testdata/ttl_max_negative.rpl | 206 + contrib/unbound/testdata/ttl_min_negative.rpl | 204 + contrib/unbound/testdata/val_cnameqtype_qmin.rpl | 784 + contrib/unbound/testdata/val_dnameqtype.rpl | 689 + contrib/unbound/testdata/val_dnameqtype_qmin.rpl | 859 + contrib/unbound/util/config_file.c | 39 + contrib/unbound/util/config_file.h | 19 + contrib/unbound/util/configlexer.c | 8195 +++--- contrib/unbound/util/configlexer.lex | 7 + contrib/unbound/util/configparser.c | 4502 ++-- contrib/unbound/util/configparser.h | 508 +- contrib/unbound/util/configparser.y | 83 +- contrib/unbound/util/data/msgparse.h | 2 + contrib/unbound/util/data/msgreply.c | 33 +- contrib/unbound/util/module.c | 11 +- contrib/unbound/util/module.h | 18 +- contrib/unbound/util/net_help.c | 36 +- contrib/unbound/util/netevent.c | 8 +- contrib/unbound/util/netevent.h | 2 + contrib/unbound/util/storage/lookup3.c | 2 +- contrib/unbound/util/storage/lruhash.c | 34 + contrib/unbound/util/storage/lruhash.h | 11 + contrib/unbound/util/storage/slabhash.c | 7 + contrib/unbound/util/storage/slabhash.h | 12 + contrib/unbound/validator/val_utils.c | 40 +- contrib/unbound/validator/validator.c | 36 +- lib/libunbound/config.h | 6 +- 107 files changed, 53017 insertions(+), 13503 deletions(-) diff --git a/contrib/unbound/Makefile.in b/contrib/unbound/Makefile.in index 22fb75c123bd..f30ca81a84f8 100644 --- a/contrib/unbound/Makefile.in +++ b/contrib/unbound/Makefile.in @@ -1278,7 +1278,8 @@ daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h $(srcdir)/daemon/daemon.h $(srcdir)/util/edns.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h \ $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/respip/respip.h \ - $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h + $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h \ $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ @@ -1355,7 +1356,7 @@ testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/test $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h $(srcdir)/services/view.h \ $(srcdir)/services/authzone.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h + $(srcdir)/respip/respip.h $(srcdir)/util/net_help.h $(srcdir)/util/ub_event.h $(srcdir)/daemon/worker.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h @@ -1428,7 +1429,7 @@ fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/t $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/services/rpz.h \ $(srcdir)/services/localzone.h $(srcdir)/services/view.h $(srcdir)/sldns/sbuffer.h $(srcdir)/services/authzone.h \ $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h \ - $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/daemon/remote.h $(srcdir)/util/storage/slabhash.h $(srcdir)/daemon/daemon.h lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/module.h \ @@ -1484,7 +1485,8 @@ context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbou $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \ $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h + $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h $(srcdir)/util/edns.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1496,7 +1498,8 @@ libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbou $(srcdir)/sldns/sbuffer.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \ $(srcdir)/dnscrypt/dnscrypt.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/authzone.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h + $(srcdir)/services/rpz.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/respip/respip.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ @@ -1510,8 +1513,7 @@ libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h $(srcdir)/li $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/sldns/str2wire.h + $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ diff --git a/contrib/unbound/ac_pkg_swig.m4 b/contrib/unbound/ax_pkg_swig.m4 similarity index 55% rename from contrib/unbound/ac_pkg_swig.m4 rename to contrib/unbound/ax_pkg_swig.m4 index 87f99fb2fe98..7a4196ff5dff 100644 --- a/contrib/unbound/ac_pkg_swig.m4 +++ b/contrib/unbound/ax_pkg_swig.m4 @@ -1,39 +1,43 @@ # =========================================================================== -# http://autoconf-archive.cryp.to/ac_pkg_swig.html +# https://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html # =========================================================================== # # SYNOPSIS # -# AC_PROG_SWIG([major.minor.micro]) +# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) # # DESCRIPTION # -# This macro searches for a SWIG installation on your system. If found you -# should call SWIG via $(SWIG). You can use the optional first argument to -# check if the version of the available SWIG is greater than or equal to -# the value of the argument. It should have the format: N[.N[.N]] (N is a -# number between 0 and 999. Only the first N is mandatory.) +# This macro searches for a SWIG installation on your system. If found, +# then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is +# found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd. # -# If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that -# the swig package is this version number or higher. +# You can use the optional first argument to check if the version of the +# available SWIG is greater than or equal to the value of the argument. It +# should have the format: N[.N[.N]] (N is a number between 0 and 999. Only +# the first N is mandatory.) If the version argument is given (e.g. +# 1.3.17), AX_PKG_SWIG checks that the swig package is this version number +# or higher. # -# In configure.in, use as: -# -# AC_PROG_SWIG(1.3.17) -# SWIG_ENABLE_CXX -# SWIG_MULTI_MODULE_SUPPORT -# SWIG_PYTHON +# As usual, action-if-found is executed if SWIG is found, otherwise +# action-if-not-found is executed. # -# LAST MODIFICATION +# In configure.in, use as: # -# 2008-04-12 +# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) +# AX_SWIG_ENABLE_CXX +# AX_SWIG_MULTI_MODULE_SUPPORT +# AX_SWIG_PYTHON # -# COPYLEFT +# LICENSE # # Copyright (c) 2008 Sebastian Huber -# Copyright (c) 2008 Alan W. Irwin +# Copyright (c) 2008 Alan W. Irwin # Copyright (c) 2008 Rafael Laboissiere -# Copyright (c) 2008 Andrew Collier +# Copyright (c) 2008 Andrew Collier +# Copyright (c) 2011 Murray Cumming +# Copyright (c) 2018 Reini Urban +# Copyright (c) 2021 Vincent Danjean # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -46,7 +50,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -57,17 +61,21 @@ # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. -AC_DEFUN([AC_PROG_SWIG],[ - AC_PATH_PROG([SWIG],[swig]) +#serial 15 + +AC_DEFUN([AX_PKG_SWIG],[ + # Find path to the "swig" executable. + AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) if test -z "$SWIG" ; then - AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' - elif test -n "$1" ; then - AC_MSG_CHECKING([for SWIG version]) + m4_ifval([$3],[$3],[:]) + elif test -z "$1" ; then + m4_ifval([$2],[$2],[:]) + else + AC_MSG_CHECKING([SWIG version]) [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] AC_MSG_RESULT([$swig_version]) if test -n "$swig_version" ; then @@ -77,12 +85,12 @@ AC_DEFUN([AC_PROG_SWIG],[ if test -z "$required_major" ; then [required_major=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_minor=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_minor" ; then [required_minor=0] fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`] [required_patch=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_patch" ; then [required_patch=0] @@ -103,30 +111,28 @@ AC_DEFUN([AC_PROG_SWIG],[ if test -z "$available_patch" ; then [available_patch=0] fi - [badversion=0] - if test $available_major -lt $required_major ; then - [badversion=1] - fi - if test $available_major -eq $required_major \ - -a $available_minor -lt $required_minor ; then - [badversion=1] - fi - if test $available_major -eq $required_major \ - -a $available_minor -eq $required_minor \ - -a $available_patch -lt $required_patch ; then - [badversion=1] - fi - if test $badversion -eq 1 ; then - AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' + # Convert the version tuple into a single number for easier comparison. + # Using base 100 should be safe since SWIG internally uses BCD values + # to encode its version number. + required_swig_vernum=`expr $required_major \* 10000 \ + \+ $required_minor \* 100 \+ $required_patch` + available_swig_vernum=`expr $available_major \* 10000 \ + \+ $available_minor \* 100 \+ $available_patch` + + if test $available_swig_vernum -lt $required_swig_vernum; then + AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.]) + SWIG='' + m4_ifval([$3],[$3],[]) else - AC_MSG_NOTICE([SWIG executable is '$SWIG']) - SWIG_LIB=`$SWIG -swiglib` - AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB']) + AC_MSG_CHECKING([for SWIG library]) + SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '` + AC_MSG_RESULT([$SWIG_LIB]) + m4_ifval([$2],[$2],[]) fi else AC_MSG_WARN([cannot determine SWIG version]) - SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' + SWIG='' + m4_ifval([$3],[$3],[]) fi fi AC_SUBST([SWIG_LIB]) diff --git a/contrib/unbound/ax_pthread.m4 b/contrib/unbound/ax_pthread.m4 index ff7d2a67e11f..9f35d139149f 100644 --- a/contrib/unbound/ax_pthread.m4 +++ b/contrib/unbound/ax_pthread.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS @@ -14,24 +14,28 @@ # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) +# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is +# needed for multi-threaded programs (defaults to the value of CC +# respectively CXX otherwise). (This is necessary on e.g. AIX to use the +# special cc_r/CC_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with +# but also to link with them as well. For example, you might link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # -# If you are only building threads programs, you may wish to use these +# If you are only building threaded programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" +# CXX="$PTHREAD_CXX" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # PTHREAD_PRIO_INHERIT symbol is defined when compiling with @@ -55,6 +59,7 @@ # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -67,7 +72,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -82,35 +87,41 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 21 +#serial 31 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). +# requires special compiler flags (e.g. on Tru64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) AC_MSG_RESULT([$ax_pthread_ok]) - if test x"$ax_pthread_ok" = xno; then + if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" fi # We must check for the threads library under a number of different @@ -118,12 +129,14 @@ fi # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -132,82 +145,163 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case ${host_os} in +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" + ;; +esac + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" ;; - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" + aix*) + ax_pthread_check_macro="_THREAD_SAFE" ;; -esac -# Clang doesn't consider unrecognized options an error unless we specify -# -Werror. We throw in some extra Clang-specific options to ensure that -# this doesn't happen for GCC, which also accepts -Werror. + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) -AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) -save_CFLAGS="$CFLAGS" -ax_pthread_extra_flags="-Werror" -CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], - [AC_MSG_RESULT([yes])], - [ax_pthread_extra_flags= - AC_MSG_RESULT([no])]) -CFLAGS="$save_CFLAGS" -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do - case $flag in + case $ax_pthread_try_flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - if test x"$ax_pthread_config" = xno; then continue; fi + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we @@ -218,8 +312,18 @@ for flag in $ax_pthread_flags; do # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include - static void routine(void *a) { *((int*)a) = 0; } +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } static void *start_routine(void *a) { return a; }], [pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); @@ -227,101 +331,187 @@ for flag in $ax_pthread_flags; do pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) + [ax_pthread_ok=yes], + []) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" AC_MSG_RESULT([$ax_pthread_ok]) - if test "x$ax_pthread_ok" = xyes; then - break; - fi + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + + + # Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $attr; return attr /* ; */])], - [attr_name=$attr; break], - []) - done - AC_MSG_RESULT([$attr_name]) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - # TODO: What about Clang on Solaris? - flag="-mt -D_REENTRANT" - fi - ;; - esac - AC_MSG_RESULT([$flag]) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then + if test "x$GCC" != "xyes"; then case $host_os in aix*) AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [ + AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) + AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) + ], + [ + AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) + AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) + ] + ) + ]) ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" +test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" AC_SUBST([PTHREAD_LIBS]) AC_SUBST([PTHREAD_CFLAGS]) AC_SUBST([PTHREAD_CC]) +AC_SUBST([PTHREAD_CXX]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then +if test "x$ax_pthread_ok" = "xyes"; then ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) : else diff --git a/contrib/unbound/cachedb/cachedb.c b/contrib/unbound/cachedb/cachedb.c index b912be8ed54f..95ac28904693 100644 --- a/contrib/unbound/cachedb/cachedb.c +++ b/contrib/unbound/cachedb/cachedb.c @@ -50,6 +50,8 @@ #include "util/data/msgreply.h" *** 83298 LINES SKIPPED *** From nobody Tue May 21 22:07:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkT7S5p3kz5Kgqm; Tue, 21 May 2024 22:07:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkT7S54rYz4TQY; Tue, 21 May 2024 22:07:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329236; 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=sK6lbZuu0HgRum+krzTvmP0g9e50k8IdaT1QMxB2V8g=; b=EE1Waeb5gqVRihToliT6Lcs/x3c133nQn74MWhXPfRsu3008vLzOFfFExPm1s9UPKerDhJ GKmKBpV9Gd0DzqbDlRQXTW73l1BwmtRZm96DlWqD2NQXE7/m3Y7646NUlMjEmdJ05xuM7X Q2WfDz9Kfkg/9fJ36rPDaW+abmD57c9q0S9DbAdoRdGYGVu1BW+UVMv67dBR0NIf55khx6 xSV/KStjQ6FYzTcwQgVkydCnWj48BWpYAMi/xCnVs08BTo8DkBNrSURzBm1x0ZQvDPCJGh edNNNX9OAylnSLrx+1/jTUjmAcJt93Ofd/xeMWsmxGankktnlnOfpF9v984E6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716329236; a=rsa-sha256; cv=none; b=XrWmAvgppjpX4d5Aqh49wj8CIowAHR9laKnL/rRWD3RjATbEyhgfM0SzMM+kUFvDdMnAvP Rht1WDHDjLVH02Gf9Oh5SQkUYTg9QGyVTGTb1olBD3JcnjdPYJY3DCIXOIia+iHkCGNPbC mQsDNoJQOdd1OsN1mQx9ORSrrVR1rGbPOcTBh1UZJlZ9n05ktpbOc/hEwTYapU0x3dxB8L M0eoEEYjMCuQJX4dgyUlFxjmiLeE1fcuowkYaUhu37EaLeCuYvCgeYvKPxcIPPej/Is6mK oTSIyLmMwtP1e7l76gFh+FkmphIQWXwhtzAr2L+o5CNoka7t7TrG/FPoi3TvlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329236; 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=sK6lbZuu0HgRum+krzTvmP0g9e50k8IdaT1QMxB2V8g=; b=pBdxEWmhkzIOHrRMpcOI0qS4xO8qwuKcdViLoBJAhg9UABv0VJ8pXa2kyopMtndqGZaeeD CtUB4KVHKnV2trQt7Us0sTOz5EK5wL89qao6/HOlQDygRGF2bZc4PRh2+vObejnMsW1eyI 7ZdFV22QWdDJ1o0vUYbzuf4O6dfASV0HGUzFCwc4M9XSIRUBfqfIhrDnt5vm+9LrLcnY2R 50PHM5hu+pN4DlZjd5bUWMMjeAFVVgwGkxxHKzIhibK1SWCkoEto5XaiKoRbgNBWHlyF0a Osrb6ile/mGH9pttSxq5M/uE757UaNEMS+XhiEDe/fP2AmzXDaeOckObkv+dUQ== Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VkT7S3xH9zNLR; Tue, 21 May 2024 22:07:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E56AE8D4A126; Tue, 21 May 2024 22:07:14 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 458EA2D029D8; Tue, 21 May 2024 22:07:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id yd5-swuxlK9M; Tue, 21 May 2024 22:07:12 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B30012D029D2; Tue, 21 May 2024 22:07:12 +0000 (UTC) Date: Tue, 21 May 2024 22:07:12 +0000 (UTC) From: "Bjoern A. Zeeb" To: John Baldwin cc: Emmanuel Vadot , Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: cff79fd02636 - main - linuxkpi: Fix spin_lock_init In-Reply-To: Message-ID: <30s1641n-04ps-4024-0797-45573737pqq6@SerrOFQ.bet> References: <202405170559.44H5xD7d019861@gitrepo.freebsd.org> <2cd3e698-1b42-4e7f-93a0-aacccb55c8d6@FreeBSD.org> <20240517183350.e45f54df07f670980d5a51c3@bidouilliste.com> <0f2c4189-e259-4bd8-ad31-212a8df0e1b5@FreeBSD.org> <188o7q6o-n0rn-235r-76n4-779o555094r9@SerrOFQ.bet> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Mon, 20 May 2024, John Baldwin wrote: > On 5/17/24 2:36 PM, Bjoern A. Zeeb wrote: >> On Fri, 17 May 2024, John Baldwin wrote: >> >>> On 5/17/24 9:33 AM, Emmanuel Vadot wrote: >>>> On Fri, 17 May 2024 09:07:53 -0700 >>>> John Baldwin wrote: >>>> >>>>> On 5/16/24 10:59 PM, Emmanuel Vadot wrote: >>>>>> The branch main has been updated by manu: >>>>>> >>>>>> URL: >>>>>> https://cgit.FreeBSD.org/src/commit/?id=cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>>> >>>>>> commit cff79fd02636f34010d8b835cc9e55401fa76e74 >>>>>> Author: Emmanuel Vadot >>>>>> AuthorDate: 2024-05-17 04:52:53 +0000 >>>>>> Commit: Emmanuel Vadot >>>>>> CommitDate: 2024-05-17 05:58:59 +0000 >>>>>> >>>>>> linuxkpi: Fix spin_lock_init >>>>>> Some linux code re-init some spinlock so add MTX_NEW to >>>>>> mtx_init. >>>>>> Reported by: David Wolfskill >>>>>> Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify >>>>>> code") >>>>>> --- >>>>>> sys/compat/linuxkpi/common/include/linux/spinlock.h | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> index 3f6eb4bb70f6..2992e41c9c02 100644 >>>>>> --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h >>>>>> @@ -140,7 +140,7 @@ typedef struct mtx spinlock_t; >>>>>> #define spin_lock_name(name) _spin_lock_name(name, >>>>>> __FILE__, __LINE__) >>>>>> #define spin_lock_init(lock) mtx_init(lock, >>>>>> spin_lock_name("lnxspin"), \ >>>>>> - NULL, MTX_DEF | MTX_NOWITNESS) >>>>>> + NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW) >>>>>> #define spin_lock_destroy(_l) mtx_destroy(_l) >>>>> >>>>> This is only ok because of MTX_NOWITNESS. Reiniting locks without >>>>> destroying >>>>> them corrupts the internal linked lists in WITNESS for locks using >>>>> witness. >>>>> That may warrant a comment here explaining why we disable witness. >>>> >>>> I'll try to look at what linux expect for spinlocks, it could also be >>>> that we need to do this because some drivers via linuxkpi does weird >>>> things ... >>>> >>>>> It might be nice to add an extension to the various lock inits for code >>>>> that >>>>> wants to opt-int to using WITNESS where a name can be passed. Using >>>>> those >>>>> would >>>>> be relatively small diffs in the client code and let select locks opt >>>>> into >>>>> using WITNESS. You could make it work by adding an optional second >>>>> argument >>>>> to spin_lock_init, etc. that takes the name. >>>> >>>> We can't change spin_lock_init, we need to follow linux api here. >>> >>> You can use macro magic to add support for an optional second argument. >>> >>> #define _spin_lock_init2(lock, name) mtx_init(lock, name, NULL, MTX_DEF) >>> >>> #define _spin_lock_init1(lock) mtx_init(lock, spin_lock_name("lnxspin"), >>> ...) >>> >>> #define _spin_lock_init_macro(lock, name, NAME, ...) >>> NAME >>> >>> #define spin_lock_init(...) \ >>> _spin_lock_init_macro(__VA_ARGS__, _spin_lock_init2, >>> _spin_lock_init1)(__VA_ARGS__) >>> >>> Then you can choose to specifically annotate certain locks with a name >>> instead in which case they will use WITNESS. >> >> I think the real confusing here comes from the fact that FreeBSD has >> spin_lock_destroy in LinuxKPI which I believe is a local addition >> (though not documented as such) for semi-native drivers using parts of >> LinuxKPI and in order to use spinlocks according to "FreeBSD >> expectations". >> >> I believe (and still hope someone would correct me) that Linux has not >> functions to destroy locks like we do? I believe for rwlocks I had left >> that remark on the review: >> https://reviews.freebsd.org/D45206#1031316 >> >> So if you use WITNESS anywhere you could only really do so for >> "internal" parts but nowhere in Linux driver code as that will likely >> simply break assumptions? > > You could only do it safely if you added local modifications to the driver, > yes. My understanding is that while we aim for as little modifications to > drivers as possible to permit merging in updates, we don't mandate absolutely > zero local changes. The approach I described above would permit selectively > using WITNESS at the expense of local diffs that would have to be maintained > across updates. Okay. Makes sense. In that case I think we should more than we do today mark the spin_lock_destroy(), the WTINESS enabled ones, etc. "FreeBSD specific" even in LinuxKPI (marking them with #ifdef or at least comments or calling them slightly differently). -- Bjoern A. Zeeb r15:7 From nobody Tue May 21 22:13:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkTGM5xZzz5Kh7R; Tue, 21 May 2024 22:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkTGM5R17z4TsQ; Tue, 21 May 2024 22:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xSbG6mVA43ZWH9Kjk4qK8iF9hj8Uh3mgTcCxn+te/o0=; b=aSA2+heRVOI3Y7CaIOgtDNSc0p0nP3Rj1ji4PrK+miHyCwBrut5NMqdrPGLAIsAfXiKMQH zgQtWbLTdAW9yoGtfPXgdNEIuDgrqHREUJAcwh8Cq+gZVvFz2IkhrppOkg+d8lZhJ9v8zl kSZqueARMxVx6jifxrtb/QnCAkZ3aVavIQeCDMMSnTLAK6G9fsFpc1DmX/j2b23Qj3hrsw UB1gFSjiN53wsvVxg3uQuF1yVg12dKbsw4HhFIlBJ2vsisno/URN8/iBTspGMB/Xf4Sa5u gO9WnNQUcrk4bmIHpwU8fhk6LqHk0gEjyUkw5kbYDA9mRZI98yIOtqnnFqUEjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716329595; a=rsa-sha256; cv=none; b=rsDwxPuC4IMb9M9E4mbtiHrlWVZdPDIA0WzJXivQM2X3jKu8iVD4UEp/ZUPk71VSxOAuXp 1ruraerOwzNBmgrxVzhVxdab2hiRkEzUb5UArI8ZT6bvFbN426Ta0x6tJxKU8S/5NDOk5d 6zcno+xIotxq+evmY8cuLGcXxNj/D66P2HNSS6Aw1S3cv57o4an9MoZcb6wa/QV2+TVbvH ryfiZqXDko15fbVmJk5P6FeNzWNwQMigJEe8z68i2ZoBaU7e5gdRwSRVcTQexhmeheLyD2 wiSAXFB5d1GK8lDy84FodKduDuf4r5A7B7c32Tzd8TRkz4JIR2dFgxYLWz7eqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xSbG6mVA43ZWH9Kjk4qK8iF9hj8Uh3mgTcCxn+te/o0=; b=UAbEYUEstSdEmpQ2+Z5TfcJZ8+1J+h+cqsGoRdZMPr72+xzo4Q4q7JURDZNUnvsV1w0WyN Or/Mx2z0yq2oUJm41SS4IDOFQmrtbSq+u0CeoAXkCEVJLiNtTIbFYEgLLy67Y977OdknnA fZKvXQpmOwrQKk2NzujT3ZhI5pG/4sUWdLgyh6UITVzpFu6/YE+YL1c+jAvOkurDT7jKXi pJIxwHzC7eJDauiM66AeYO6GT0MuOFSnaZcE+2Lxir3CYuJUATX4XE1RQn3wHPNDPp63MX C7vTahO/Upr/woyHBoyuVmjp3h2o6A+lV9RxfgnDtXFzF0ZxstC6rsG9srO36Q== 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 4VkTGM52Zdzfp9; Tue, 21 May 2024 22:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LMDFxU061636; Tue, 21 May 2024 22:13:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMDFoS061633; Tue, 21 May 2024 22:13:15 GMT (envelope-from git) Date: Tue, 21 May 2024 22:13:15 GMT Message-Id: <202405212213.44LMDFoS061633@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: 69b6c4a6ec66 - main - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 69b6c4a6ec6654978628ccd48edce46f00ac3e96 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=69b6c4a6ec6654978628ccd48edce46f00ac3e96 commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96 Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-05-21 22:12:00 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Tue May 21 22:15:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkTJt3mKrz5KhL2; Tue, 21 May 2024 22:15: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkTJt2v0Fz4VHf; Tue, 21 May 2024 22:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdkTYktb04dm3lIPPKdAFyDDRRcw+r/HAPBFh2vltpQ=; b=alGVFpeZoDhUPkOx3fZVmxX6fD8jjaNd4TvKccXkcKSfVqUBFn2TXEgeDgiLoEtvmOH4v6 aCnP9fKbt/FbpFdiW4ypNgpFgthZdaH9hr6n6jHPGlxH2vFBJyVVZUy3rT0Y6u0m8lzBq7 /CbavQU7ujnQt7M4NjJ/9N31e77snsGsPRt3dL0AE7rBWGSu/RT7mklgNT0MQ2klsRgEMw 6RnDpEqx0hwe3lF/v4XkleFhbV3T3vVNPgnrAPkKaaMEPJcTxixCra2Pk4D0P+1IREenDZ qvlhytlF8oS2GysaB43xH+yhPTlEC0CCoJRqx9HAmIkXHyvov2jV3ZdzklDNow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716329726; a=rsa-sha256; cv=none; b=OCnlp9YLpY2SJlEopmfH0ZphLtmXfgK28f8eXFVgusBGbyZdw8G/o54mSOtRCDwThyeroO kQyhzWi3C1/1dT4OgI2i2KcvLgfX2zDS1DTv+B3HmfJX2W6axVnYAYOF963EIK6McR6vVb ThTUdStcpluUxjpvTsQYvQNe0XipaVfYj0N2Cb6ItBqMZcqeEAYi9GsA5bSqoYkUpYFsfB aIJE4ZoDcOwScbcmC4AnYMRmxiiFdfqjUg05KBDAQIdMEfqpUm2ArdTk565nq/j73XIAA7 OzG5CD0eY8cJKag5tcXjg7uuckFCETAmCQRsYg3R68vdn0owkMz5hCEm6eFL0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716329726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdkTYktb04dm3lIPPKdAFyDDRRcw+r/HAPBFh2vltpQ=; b=e/AnIBiwUiSckc5cTNeOGkIxzw8l+W7ecQwFRXkSuJDcNcoypFQ0IKz9d4Y7zydjBC9yRU 1TPFcpqkActAG1B9e1cSINDN+VWSSaC6+T5xhTdI4QliEV43eO08RlNzPwg0Gkwf9n31gu bMcW1Xeesnb3htwEj6Ed8O02XlopgZwZRIDlwpFD3NIraNqVxaC5WXYpbpAGEcs0LsZOdO bYtyGoj7VR4y1ZoqKwuUveW2osNFb4dW2eHWiEiOlJCVxiweCtbxFGZ3FiFNqV0lK8FUVa eKITCRXdiUUqu8BRICMbUraKPYZVyFY22B91cYvsJGqxfESrNj6FszlFUM0IzA== 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 4VkTJt2VRszg0T; Tue, 21 May 2024 22:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LMFQSx062072; Tue, 21 May 2024 22:15:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMFQqs062069; Tue, 21 May 2024 22:15:26 GMT (envelope-from git) Date: Tue, 21 May 2024 22:15:26 GMT Message-Id: <202405212215.44LMFQqs062069@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: 8e4b8e9d807a - main - LinuxKPI: add kvmemdup() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf commit 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:43:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-05-21 22:14:50 +0000 LinuxKPI: add kvmemdup() Add kvmemdup() as a variant of kmemdup(). While currently it could just call kmemdup() we duplicate the code and use kvmalloc() in case someone will change the implementation of kvmalloc/kvfree in slab.h. This is used by an updated wireless driver. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45181 --- sys/compat/linuxkpi/common/include/linux/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 9e1818a38594..32470312b78b 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -98,6 +98,18 @@ kmemdup(const void *src, size_t len, gfp_t gfp) return (dst); } +/* See slab.h for kvmalloc/kvfree(). */ +static inline void * +kvmemdup(const void *src, size_t len, gfp_t gfp) +{ + void *dst; + + dst = kvmalloc(len, gfp); + if (dst != NULL) + memcpy(dst, src, len); + return (dst); +} + static inline char * strndup_user(const char __user *ustr, long n) { From nobody Tue May 21 22:35:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkTmL0Wb0z5Kyj3; Tue, 21 May 2024 22:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkTmK6zchz4X6R; Tue, 21 May 2024 22:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716330946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uKxpXi9yYcN72yqVi0TYGHURbXdK7oyw6TMecd8RvI=; b=lTJlYh2anZ40ZQpZUU1CAawIFOBk+QPKDJa94+vQTzUqQ+fi7wAyXU+VBkvMF+PaNRUk+P NSmq2YhijyAkfdk9RX2Kmko1Qc2BakGX+eZkkPLYoT0P0IHYaz6AXBX94zmlBtnKkpfzgV k5DgrqfdUKOyGzOrR+F6fy3rpaudPXsjoTKikCTgwyb20l98uJq31iPx1Tgq+WQhGNloev VHwghmIOtXTEXqUwVFT7I20/7meDvaE/VJ2I5MzjLZGXT+xAM1yRwssem4U1SXDLm40240 wtdRStZ+ashTS7jUUlzooEtHhA5q9S5EOZHM91hgCZEcgeoGwI4G9F7/t1JcNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716330946; a=rsa-sha256; cv=none; b=IV+1FP3n0y1IOvTz4uKU+eD8bQ47MILZgZzIJVqySnyLO8EY/LnuhxfCDeuoUkaYM2bzyS xX7SG8eOFRMY1w2SW759Vyb0LL2YUCTsXpPDEMFok017V2pjQwP9sqWVedfUvkPIvqf/+I SFuXQVbcmtZAQhyIg9olHnQFlax7Xr1CpzSelvgve9CqROyRokYsGelOJuEkM8/Ek4myWC bRCaHOE233EW5WjsIlCFLTtmshGy9/asY56q5HeRjlAfhdi7KD/L+DyhVj7w7R7wVTYMkX HdpR3s6zJcdPB5guVezZySX4zpM/cdg8p2j+CInUfsYC/3r4Mx2wMkLG04jjKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716330946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uKxpXi9yYcN72yqVi0TYGHURbXdK7oyw6TMecd8RvI=; b=yRQHhlvjtf1AQtfqYyFyR7BLoLcJuLwZQSxILkO2pUAWhGrYHbUjIOVkXbikzr4nSEhBm/ hXok+aFZ7VaZM3m8/Ch50aBrhHlPGFKVJliL9zx/uz1g7p7rz2exU093e2yHqjvTka3/5A IgSLseSRsiXkMrWXje6YvFSSaOPaKhiv2gBJjsnKgrINL5di59gRENj8/nqNCYFD6uJIqw 3wFiRSmNZyJCb4r+SNdktv1B4SBPpD12OzaxgtijfDqV7BLdjijBWy56VK95DQf+wtmU/g qf6eRO8TUQxu23SQ1z7N9KfoxzzA+JNFlUTh1kje2YFYyxtVhif6fzjHwrKFyg== 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 4VkTmK6b2TzggW; Tue, 21 May 2024 22:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LMZjn5095277; Tue, 21 May 2024 22:35:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMZj3A095274; Tue, 21 May 2024 22:35:45 GMT (envelope-from git) Date: Tue, 21 May 2024 22:35:45 GMT Message-Id: <202405212235.44LMZj3A095274@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: a4be1eb21165 - main - access(2): Discourage use of these system calls. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a4be1eb21165d7aedae9dc6634528619ff10d025 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a4be1eb21165d7aedae9dc6634528619ff10d025 commit a4be1eb21165d7aedae9dc6634528619ff10d025 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-21 22:35:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-21 22:35:22 +0000 access(2): Discourage use of these system calls. Fixes: 421025a274fb PR: 262895 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45240 --- lib/libsys/access.2 | 105 +++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 55 deletions(-) diff --git a/lib/libsys/access.2 b/lib/libsys/access.2 index 91fe50a08cc4..46c00362a574 100644 --- a/lib/libsys/access.2 +++ b/lib/libsys/access.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 13, 2024 +.Dd May 21, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -45,35 +45,43 @@ .Fn faccessat "int fd" "const char *path" "int mode" "int flag" .Sh DESCRIPTION The -.Fn access -and +.Fn access , .Fn eaccess -system calls check the accessibility of the -file named by -the +and +.Fn faccessat +system calls report whether an attempt to access the file designated +by their .Fa path -argument -for the access permissions indicated by -the +in the manner described by their .Fa mode -argument. +argument is likely to succeed. The value of .Fa mode -is either the bitwise-inclusive OR of the access permissions to be -checked -.Dv ( R_OK +is either the bitwise-inclusive OR of the desired permissions +.Po +.Dv R_OK for read permission, .Dv W_OK for write permission, and .Dv X_OK -for execute/search permission), -or the existence test -.Pq Dv F_OK . +for execute / search permission +.Pc +or +.Dv F_OK +to simply check whether the file exists. .Pp -For additional information, see the -.Sx "File Access Permission" -section of -.Xr intro 2 . +For a number of reasons, these system calls cannot be relied upon to +give a correct and definitive answer. +They can at best provide an early indication of the expected outcome, +to be confirmed by actually attempting the operation. +For existence checks, either +.Xr stat 2 +or +.Xr lstat 2 +should be used instead. +See also +.Sx SECURITY CONSIDERATIONS +below. .Pp The .Fn eaccess @@ -87,6 +95,13 @@ the real user ID in place of the effective user ID, the real group ID in place of the effective group ID, and the rest of the group access list. .Pp +See the +.Sx DEFINITIONS +section of +.Xr intro 2 +for additional information on file access permissions and real +vs. effective user and group IDs. +.Pp The .Fn faccessat system call is equivalent to @@ -114,8 +129,10 @@ list, defined in .In fcntl.h : .Bl -tag -width indent .It Dv AT_EACCESS -The checks for accessibility are performed using the effective user and group -IDs instead of the real user and group ID as required in a call to +The checks are performed using the effective user and group IDs, +like +.Fn eaccess , +instead of the real user and group ID, like .Fn access . .It Dv AT_RESOLVE_BENEATH Only walk paths below the directory specified by the @@ -147,23 +164,15 @@ Likewise for .Dv R_OK and .Dv W_OK . -.Pp -.Fn access , -.Fn eaccess -and -.Fn faccessat -will always dereference symbolic links. -If the symbolic link itself needs to be referenced, -.Xr lstat 2 -should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS +The .Fn access , .Fn eaccess , -or +and .Fn faccessat -will fail if: +system calls may fail if: .Bl -tag -width Er .It Bq Er EINVAL The value of the @@ -254,25 +263,11 @@ system call appeared in .Fx 8.0 . .Sh SECURITY CONSIDERATIONS The -.Fn access -system call -is a potential security hole due to race conditions and -should never be used. -Set-user-ID and set-group-ID applications should restore the -effective user or group ID, -and perform actions directly rather than use -.Fn access -to simulate access checks for the real user or group ID. -The -.Fn eaccess -system call -likewise may be subject to races if used inappropriately. -.Pp -.Fn access -remains useful for providing clues to users as to whether operations -make sense for particular filesystem objects (e.g. 'delete' menu -item only highlighted in a writable folder ... avoiding interpretation -of the st_mode bits that the application might not understand -- -e.g. in the case of AFS). -It also allows a cheaper file existence test than -.Xr stat 2 . +.Fn access , +.Fn eaccess , +and +.Fn faccessat +system calls are subject to time-of-check-to-time-of-use races and +should not be relied upon for file permission enforcement purposes. +Instead, applications should perform the desired action using the +requesting user's credentials. From nobody Tue May 21 22:50:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkV595Zklz5L0pG; Tue, 21 May 2024 22:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkV5952Djz4YVg; Tue, 21 May 2024 22:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJtUjCndpQF2Jd7qJAOmiPto/0XF7U98OARfb7hlIkQ=; b=isWZCSqTTUtQpf+oyVv6DmjjNMrQedPuu+QwWAlFw+zFBxGampVsaee4J/JwKF/1pgbD7w 1PJGV0RQLv3VqY3s59113vnGz3McmK4RddjrFRMzYFehSKOnU37U08BW9a1t5ifGVdUfwv sNYpwsPVbulm6/0mDFCYdImUX3bTRZEQbLXdMxZGZAHsuVZXcHR4pEmtjYcrCKughh8s27 XI+zawPZK+B2yidWAoskbEv0t8uzQg8/jauqS5WwIa2x75cZo7T08HP02XcM9d3xChd/nu iGeTvVkgAyScSUnpC9SBiDle5gFbxXXmQ//YGNIGbFK0fPzQq9n7d/XNcRZbVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716331821; a=rsa-sha256; cv=none; b=Hm7pWyBC417vDdozGzOWbUsnyh1HV+8JQF3S6J37AD/KSXHr5zC8W2ylC5rdDRxpNjNjEG Rb+Y1Dqjq7WpJqwvHqauMDWkfUotI4Y8IZ7tlQKsAIumjwn/ASfF7PjOPHYIWsLbU/1akA yRWriepWlMrJHv/KG3pChtkpJFtpskKQDqPWU0QVS34JINuZpoWnLcC/+C3XrbaGocpq4M pBG9rbCti23TSclc37nAp0dQZWY0S2MBb7OXusSLolhiF+XVhWW0nMrrzIjWO+4OD1IOZl TzqdxK9gY+l25Gq8BQ9QO7fZ/O7KIu5vH9lkaqLki0Wfpb55DTCRSEhP+wM7RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RJtUjCndpQF2Jd7qJAOmiPto/0XF7U98OARfb7hlIkQ=; b=aNuUlh0HCfQB0cifCPKKreHD52Yun22qRw4zrKUOXz3AW7PZty65Ddpw8TgajM4jTtefQC Cnb202T06SxAD/15Yprlw/ZKbNbCekK/lCijQGrEbuEJvWYENinC9BJEqTiiC7/srx49rs Gvj2sFBEWVkNVkgV6oB9y2i8LGjBceQaeN7LsiY287KCxn4NKAmppH/Xs3AAIjrt5QrvsY BA/zr2s+Oe3lUuLpYjIvobPw7SWT3gCvT5xCCNcLBA/kzV3RkQJrezjTEb6ZWUtbW+CybH AgV0+wY0HG1quMDL+uF7BQVRhXdKcPWU79eZ/LBjz1Ozs1EAbDxH+CkzGvv5zQ== 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 4VkV594Kdjzh1N; Tue, 21 May 2024 22:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LMoLVc021509; Tue, 21 May 2024 22:50:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMoLEI021506; Tue, 21 May 2024 22:50:21 GMT (envelope-from git) Date: Tue, 21 May 2024 22:50:21 GMT Message-Id: <202405212250.44LMoLEI021506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: f9b66c0040bf - stable/14 - umount: Add -d option to detach md devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f9b66c0040bf03e5abe96df21690c51e881d72ed Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9b66c0040bf03e5abe96df21690c51e881d72ed commit f9b66c0040bf03e5abe96df21690c51e881d72ed Author: Ricardo Branco AuthorDate: 2024-02-03 00:29:48 +0000 Commit: Warner Losh CommitDate: 2024-05-21 22:49:52 +0000 umount: Add -d option to detach md devices Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/972 (cherry picked from commit 840a802750a464355c52b314c17fb067b317da8c) --- sbin/umount/umount.8 | 14 ++++++---- sbin/umount/umount.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 78 insertions(+), 10 deletions(-) diff --git a/sbin/umount/umount.8 b/sbin/umount/umount.8 index b5a7d7230269..086980151d60 100644 --- a/sbin/umount/umount.8 +++ b/sbin/umount/umount.8 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)umount.8 8.2 (Berkeley) 5/8/95 -.\" -.Dd June 19, 2020 +.Dd January 16, 2024 .Dt UMOUNT 8 .Os .Sh NAME @@ -35,7 +33,7 @@ .Nd unmount file systems .Sh SYNOPSIS .Nm -.Op Fl fNnv +.Op Fl dfNnv .Ar special ... | node ... | fsid ... .Nm .Fl a | A @@ -73,6 +71,11 @@ except for those mounted at .Pa / or .Pa /dev . +.It Fl d +If the filesystem is mounted on an +.Xr md 4 +device (a memory disk), detach it after +.Xr unmount 2 . .It Fl F Ar fstab Specify the .Pa fstab @@ -184,7 +187,8 @@ file system table .Xr unmount 2 , .Xr fstab 5 , .Xr autounmountd 8 , -.Xr mount 8 +.Xr mount 8 , +.Xr mdconfig 8 .Sh HISTORY A .Nm diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index aca7c201bc9b..d1471076359c 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -62,10 +62,20 @@ static char sccsid[] = "@(#)umount.c 8.8 (Berkeley) 5/8/95"; #include "mounttab.h" +/* used by md_detach() */ +#include +#include +#include +#include + +#define DEV_MD _PATH_DEV MD_NAME +#define DEV_MDCTL _PATH_DEV MDCTL_NAME + typedef enum { FIND, REMOVE, CHECKUNIQUE } dowhat; static struct addrinfo *nfshost_ai = NULL; -static int fflag, vflag; +static int dflag, fflag, vflag; +static int all; static char *nfshost; struct statfs *checkmntlist(char *); @@ -82,17 +92,18 @@ int checkname (char *, char **); int umountfs(struct statfs *sfs); void usage (void); int xdr_dir (XDR *, char *); +int md_detach(const char *); int main(int argc, char *argv[]) { - int all, errs, ch, mntsize, error, nfsforce, ret; + int errs, ch, mntsize, error, nfsforce, ret; char **typelist = NULL; struct statfs *mntbuf, *sfs; struct addrinfo hints; nfsforce = all = errs = 0; - while ((ch = getopt(argc, argv, "AaF:fh:Nnt:v")) != -1) + while ((ch = getopt(argc, argv, "AadF:fh:Nnt:v")) != -1) switch (ch) { case 'A': all = 2; @@ -100,6 +111,9 @@ main(int argc, char *argv[]) case 'a': all = 1; break; + case 'd': + dflag = 1; + break; case 'F': setfstab(optarg); break; @@ -467,6 +481,16 @@ umountfs(struct statfs *sfs) clnt_destroy(clp); } free(orignfsdirname); + + if (dflag) { + if (md_detach(sfs->f_mntfromname) == 0) { + if (vflag) + (void)printf("%s: detached\n", + sfs->f_mntfromname); + } else if (!all) + return (-1); + } + return (0); } @@ -649,7 +673,47 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: umount [-fNnv] special ... | node ... | fsid ...", - " umount -a | -A [-F fstab] [-fnv] [-h host] [-t type]"); + "usage: umount [-dfNnv] special ... | node ... | fsid ...", + " umount -a | -A [-F fstab] [-dfnv] [-h host] [-t type]"); exit(1); } + +int +md_detach(const char *device) +{ + struct md_ioctl mdio; + char *eptr; + int fd; + + memset(&mdio, 0, sizeof(mdio)); + + mdio.md_version = MDIOVERSION; + mdio.md_options = fflag ? MD_FORCE : 0; + + if (strncmp(device, DEV_MD, sizeof(DEV_MD) - 1)) { + if (!all) + warnx("invalid md device: %s", device); + return (-1); + } + + mdio.md_unit = strtoul(device + sizeof(DEV_MD) - 1, &eptr, 0); + if (mdio.md_unit == (unsigned)ULONG_MAX || *eptr != '\0') { + warnx("invalid md device: %s", device); + return (-1); + } + + fd = open(DEV_MDCTL, O_RDWR, 0); + if (fd < 0) { + warn("%s", DEV_MDCTL); + return (-1); + } + + if (ioctl(fd, MDIOCDETACH, &mdio) < 0) { + warn("%s", DEV_MD); + close(fd); + return (-1); + } + + close(fd); + return (0); +} From nobody Tue May 21 22:50:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkV5B6Yw3z5L0ts; Tue, 21 May 2024 22:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkV5B5hK8z4YSp; Tue, 21 May 2024 22:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BcTJ7Me4QghMx3dLJFCNz0muFWDxPiMf1kJ8rv1xXa8=; b=Q/IRKw8uCnPs+7jxKaxre7Z1du1U9e05xJaq/51Eeqzm4xFmdn7Pd/kxDKs0AYQ/DspDzE HWk2Dvv/fLC+xdUOYAOefFOr/ntwntmVIZ3YDsQ2IVD2lSbQUtb5DMD00E1rLmCCe4Q22b sYREWuIvBhaD0r6ICbsQFZCR3g+NRZyKBp/+jpC+JvX06B8gFVJLMuEWCth/WgGlkQyMqF HsTEhYcrPmGEk5NJ5tNvBgnOxP1ZbFWpjSb/U3hnv1YmC2LIzizOKGgqRfQgZGnDy9uEwy oqJUEWwHuneZoiFe2c26cRJ8VfWqIvx+07WLQpznQI7UwN1HXpCdVwK6PeUeoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716331822; a=rsa-sha256; cv=none; b=Zg/nxmuwqByU06KRhxzjZxmLe5TsKuOTBo7IEQB6nO8U9i9fLHSjWx2VVH7D+cBwEtBVsc evSO1g2q6FKOcjeLBq7VM7ekrM4zpGIeF3fQynkhHa64Z0mokZOgD7iq0v8fI3dnp8Yxdp Nq7oZ+y+nMf5R0cEJ9zWDu5IgeKjdWF8u2ccI5x2dYrnQ+O5gJx2fOr1WfCSA3cQkhm7CF shCfrIFE6U74TlLuchREXs+DOYnilDZyF1vOhj9rE2soZscEr6PWqvzXnp6cmZuCzLKZt1 /huVBoZrxqwDOOI0JMQ0Z7Yz7oKxCACMc4nIgEKiNHdAibTdbqxOxm6MbU6+EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BcTJ7Me4QghMx3dLJFCNz0muFWDxPiMf1kJ8rv1xXa8=; b=rfk71LTJ4CCRnvygk8jZQyuOlhzZ/FoP6EWbnldgS3m0ol/C4aECtKMdy3W0HtgisPiuhw Blvzz0uvaiKcoPjisLmSOayjSS9qRGkyL+ha4qauRgoGeg2vqyyOufpfVvZd4Iar8i6Wnz krP8Cz93xoVylRg7KL7CNCMk21GVUTuWKOGNv/bXWhgTppQCpD8NOc3XrQxdDwvyzANE+Q BgwNKVRel/5Ll6SbwAM4TPLJHWW3LdorLo5XeOZqQH6q9Cfelq48Flb23H5//Pqvy0gTvq ITwNZYUSPqCtfDkmnqfLHhT9GI7BzQZtLPI5ja2hyvcfVG1/HmzebmWiKfc7zw== 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 4VkV5B5J7bzh1P; Tue, 21 May 2024 22:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LMoMF8021567; Tue, 21 May 2024 22:50:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMoM6d021564; Tue, 21 May 2024 22:50:22 GMT (envelope-from git) Date: Tue, 21 May 2024 22:50:22 GMT Message-Id: <202405212250.44LMoM6d021564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4de324578f4f - stable/14 - umount: Support partitions & slices with -d option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4de324578f4f7d08ef5b2d3dbebe4f253c9511d3 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4de324578f4f7d08ef5b2d3dbebe4f253c9511d3 commit 4de324578f4f7d08ef5b2d3dbebe4f253c9511d3 Author: Ricardo Branco AuthorDate: 2024-04-22 22:08:58 +0000 Commit: Warner Losh CommitDate: 2024-05-21 22:50:01 +0000 umount: Support partitions & slices with -d option Signed-off-by: Ricardo Branco Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1183 (cherry picked from commit e96d0d7468446d7cabd76ae213889297711bb144) --- sbin/umount/umount.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index d1471076359c..4050524b9f2c 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -685,19 +685,17 @@ md_detach(const char *device) char *eptr; int fd; - memset(&mdio, 0, sizeof(mdio)); - - mdio.md_version = MDIOVERSION; - mdio.md_options = fflag ? MD_FORCE : 0; - if (strncmp(device, DEV_MD, sizeof(DEV_MD) - 1)) { if (!all) warnx("invalid md device: %s", device); return (-1); } + memset(&mdio, 0, sizeof(mdio)); + mdio.md_version = MDIOVERSION; + mdio.md_options = fflag ? MD_FORCE : 0; mdio.md_unit = strtoul(device + sizeof(DEV_MD) - 1, &eptr, 0); - if (mdio.md_unit == (unsigned)ULONG_MAX || *eptr != '\0') { + if (mdio.md_unit == (unsigned)ULONG_MAX || eptr - device == sizeof(DEV_MD) - 1) { warnx("invalid md device: %s", device); return (-1); } From nobody Tue May 21 22:52:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkV8B5fP0z5L1RC; Tue, 21 May 2024 22:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkV8B3lJtz4Zcp; Tue, 21 May 2024 22:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUiOPg2wSuMdEbz29Rdcvud63elmr3NThtq+1wH9vKY=; b=ixOs6T7znsEykmbk/jPgIpeuGAxlP4MkHGJCUW4XdIW4aV0lfUzd13jA6W3CMSmnus0S8I xbx+m0BePC1eifU2f3boOPfCVJ/Aun+Se7uWtwByao2xPbFAuyqyR/3JsJBRfEdw/XzagQ cmnNNLOyJ5nRhpLsFFzYQo3PjSYb0DZCCtGGNcNDyWmEslnbgJ3EyPPPidvGzLhrlwZxIC 1l9Bvy9UEmT0DISAv8lFp0E3wxGcozFVk5k4TlecAXSJCEyuVKrbJLKpdH2hmKo6BBz16b PayOH4HSSmUR/kl4pN6+wVhv1rQfr/s7fPp0fiI9anqkIu3IuVJlMw9Mx4dPlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716331978; a=rsa-sha256; cv=none; b=dEs4zwZYevVoDjuVYKxPhyZ+eS2FvUk9VXnWsm0FRODGgFIfV+KJ/sq5B9ZS0VgkMj45eo 1+cu1qp5VbZSHMxf6m9/uSART1pDejxPnBaaQ+BEWpmH+ccCJSx2cb4jNNO20Q+e+5wQS3 kDG854y2hTgobq+nefc0lNP7JJYMJ8Z6XnDgFX6rJwMGc/r/0vw2Zsy+LfPrnUEjtAhnJ2 fmtNrXPNJwThyIaNWd/ksgCcSlndMJhhqgE09F+l2qsfxl/z1DdmgQhKGFLJPqtp2xNcoY ki3dRlsYBNBFgfy2gwc9qGqbsQznhqjgaJY2vWhiGw/seP4XOeBS4sWVUG83cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716331978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iUiOPg2wSuMdEbz29Rdcvud63elmr3NThtq+1wH9vKY=; b=j0XJXg/XR/AMeSi/VaFJgj+/nwcRG9YI+WZizaxRuZRNFPZ9/r7oy1Pi01aH3cULcaIwWc Z3me/n1KUPsdCIO0R55Wd4oZg0JJTp3JcLCD4mj6qja7aGudoHmAl4qaUl7MdeyHeRpbkJ 4HuACF+6caz3eDpjuHDvPO3DqfbtBpnPHIuYVTcHsQEESJsjxa+jSbl3+hjh90ENvD/xL2 0rTvlpc+STozGB3vxDLMxhTkNoRfs+SezXDsMprgxy5Swz7qwJ3qEzvgwdb1cVDwyuKr36 Tt0+DOJNJZbbfSAMfCl4KMvvYiNgdWJZij/2rCONxlYSU1kuPQJZ49Asz/8eaw== 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 4VkV8B3M66zhLk; Tue, 21 May 2024 22:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LMqwWT029225; Tue, 21 May 2024 22:52:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LMqwXe029222; Tue, 21 May 2024 22:52:58 GMT (envelope-from git) Date: Tue, 21 May 2024 22:52:58 GMT Message-Id: <202405212252.44LMqwXe029222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: e20971500194 - main - ftpd: stop using -g flag for /bin/ls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e20971500194d2f7299e9d01ca3b20e9bc6b4009 Auto-Submitted: auto-generated The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=e20971500194d2f7299e9d01ca3b20e9bc6b4009 commit e20971500194d2f7299e9d01ca3b20e9bc6b4009 Author: Allan Jude AuthorDate: 2024-05-21 22:40:12 +0000 Commit: Allan Jude CommitDate: 2024-05-21 22:50:14 +0000 ftpd: stop using -g flag for /bin/ls In 3bfbb521 the behaviour of ls was changed such that -g was no longer a noop for compatibility with BSD 4.3, but instead changed the output of long mode to exclude the owner of the file and display only the group. Update how FTPd invokes ls to restore the previous behaviour Reported-by: Andrew Fengler Reviewed-by: jrtc27, des, imp MFC after: 3 days Sponsored-by: ScaleEngine Inc. Fixes: 3bfbb521fef5 ("ls: Improve POSIX compatibility for -g and -n.") --- libexec/ftpd/ftpcmd.y | 4 ++-- libexec/ftpd/ftpd.8 | 2 +- libexec/ftpd/ftpd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 742de2f4c086..c090130d8137 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -451,12 +451,12 @@ cmd | LIST check_login CRLF { if ($2) - retrieve(_PATH_LS " -lgA", ""); + retrieve(_PATH_LS " -lA", ""); } | LIST check_login SP pathstring CRLF { if ($2) - retrieve(_PATH_LS " -lgA %s", $4); + retrieve(_PATH_LS " -lA %s", $4); free($4); } | STAT check_login SP pathname CRLF diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index fcc5da0b6db1..2241ea78de81 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -276,7 +276,7 @@ is specified. .It EPSV Ta "prepare for server-to-server transfer, multiprotocol" .It FEAT Ta "give information on extended features of server" .It HELP Ta "give help information" -.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA" +.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lA" .It LPRT Ta "specify data connection port, multiprotocol" .It LPSV Ta "prepare for server-to-server transfer, multiprotocol" .It MDTM Ta "show last modification time of file" diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 8004d51a4579..f3a1105f6437 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2321,7 +2321,7 @@ statfilecmd(char *filename) struct stat st; code = lstat(filename, &st) == 0 && S_ISDIR(st.st_mode) ? 212 : 213; - (void)snprintf(line, sizeof(line), _PATH_LS " -lgA %s", filename); + (void)snprintf(line, sizeof(line), _PATH_LS " -lA %s", filename); fin = ftpd_popen(line, "r"); if (fin == NULL) { perror_reply(551, filename); From nobody Tue May 21 23:25:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkVsP2rhpz5L48T; Tue, 21 May 2024 23:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkVsP2M73z4d6j; Tue, 21 May 2024 23:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716333913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyOABYotkSVoeFaiMvz2Di2/5Aq+aGI0Ylh6v8d76dE=; b=pHriW3KyaAh6qNZi4TfOtqIcjx1zstR4JDwhxsiMQrqGpHFMdMiRMcnQBWwyAfonur2/NZ Wx2n8NrOO3PtUMrAHS2txwCkepZXagaA4hQGoPrXRpD4vhRA5NpQfpGCg0AMbsNyQ4w3oX JCvR4X3PAFggVq+GuDcOHpx1ePwR5mjRhqG+T8eH9JR9L8XiONGe4/i4X1RyI2cmVDnVA2 ZosmPFl686HPsjVHdKB+MQp+zv5cBlXIgY7ah8yEEnd+iXsL35AcZt42vkZenqDMxuJ9k5 zc9mX5Rs4tEF5V/1x+Diosk4K1MsfCS6NwufjDFRN5NSc0zowvjnpmaHgRzOgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716333913; a=rsa-sha256; cv=none; b=L0eQ9TAr9N4F9kHwiW4eSlEvyPCdKZ7M/OwMD+C5VsePGmZsnneVY1mOkwVTVlMjyvNl9R 9o602huL1ceESC1pxFHRZxPBLwppsS0IKEDmdZWYtuUZhCE2TD3nUtwx7iwdmPs/+ZbmT0 /NdegJaBvyexoHb2xlxBj7xhwEWVoQtXImqk10h2cfkTR6YfTYIwepu/JH6LAQOSymt8IY P2qAPDfvYrOc7nV8lrOfVABevqNVsXwarOiUbSdKNhJvgLF9qAYxR4Om0hPceNtFNiGuCS 46oAJ9Eg3zEzvXkQMw/PR4KphHOkRcHGdKyP/d0MQObm/7Ux9qv0IezPkfAX/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716333913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyOABYotkSVoeFaiMvz2Di2/5Aq+aGI0Ylh6v8d76dE=; b=NK/u9ftnN0XiBPOxoLtKI97g0WpzbXMjh2fJbTE0wPrs2uqE2AXbp5iBiyycR1uIIfKigM lti3mc7zqjI7U5Hn9GDkk/+TlaWEGwxTS8DrIYOO4gwiU3VbEKHryFYuQ+tL02lQGwIZtx b0u57kBU3+gS9nl6jbrtIUKcXYxX+DmeQOifyCda52o9cXQvvQPBZf58LmgOrbO6Sb9dR1 /S2eBdglOERkkfKogyHKxaEhsSBv7YbkoTqLPiJojWaPmBi5KG87YRnLdOv2ue8eZlOy4q vzZB4XYEs/P9TxnY83JTrA7tqWJXvpFNwEa9Vbt1ZvzmacUpnpGQ2qYJb+/Kvg== 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 4VkVsP1yN9zhP3; Tue, 21 May 2024 23:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNPDCQ080936; Tue, 21 May 2024 23:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNPDND080933; Tue, 21 May 2024 23:25:13 GMT (envelope-from git) Date: Tue, 21 May 2024 23:25:13 GMT Message-Id: <202405212325.44LNPDND080933@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: ba222f6fb4b2 - main - iavf(4): Improve man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ba222f6fb4b226ab24beaa13a8591dcb624ae70f Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ba222f6fb4b226ab24beaa13a8591dcb624ae70f commit ba222f6fb4b226ab24beaa13a8591dcb624ae70f Author: Eric Joyner AuthorDate: 2024-05-21 23:24:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-21 23:24:31 +0000 iavf(4): Improve man page MFC after: 3 days Reviewed by: erj Differential Revision: https://reviews.freebsd.org/D43093 --- share/man/man4/iavf.4 | 348 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 282 insertions(+), 66 deletions(-) diff --git a/share/man/man4/iavf.4 b/share/man/man4/iavf.4 index 2e265a5a2fbb..d55e084e82cc 100644 --- a/share/man/man4/iavf.4 +++ b/share/man/man4/iavf.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2013-2018, Intel Corporation .\" All rights reserved. .\" @@ -29,12 +32,12 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd January 30, 2019 +.Dd May 21, 2024 .Dt IAVF 4 .Os .Sh NAME .Nm iavf -.Nd "Intel Adaptive Virtual Function driver" +.Nd "Intel Ethernet Adaptive Virtual Function Driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -51,87 +54,300 @@ if_iavf_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the PCI Virtual Functions from the 700 Series of -ethernet devices and newer product families. -The driver supports Jumbo Frames, TX/RX checksum offload, -TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, and -Receive Side Steering (RSS), all for both IPv4 and IPv6. -For further hardware information and questions related to hardware -requirements, see -.Pa http://support.intel.com/ . -.Pp -Support for Jumbo Frames is provided via the interface MTU setting. -Selecting an MTU larger than 1500 bytes with the +driver provides support for any PCI Virtual Function created from certain +Intel Ethernet devices. +This driver is compatible with virtual functions bound to devices based on the +following: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.It +Intel\(rg Ethernet Controller I710 +.It +Intel\(rg Ethernet Controller X710 +.It +Intel\(rg Ethernet Controller XL710 +.It +Intel\(rg Ethernet Network Connection X722 +.It +Intel\(rg Ethernet Controller XXV710 +.It +Intel\(rg Ethernet Controller V710 +.El +.Pp +The associated Physical Function (PF) drivers for this VF driver are: +.Pp +.Bl -bullet -compact +.It +.Xr ice 4 +.It +.Xr ixl 4 +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your Intel Ethernet Adapter. +All hardware requirements listed apply to use with +.Fx . +.Ss The VF Driver +The VF driver is normally used in a virtualized environment where a host driver +manages SR\-IOV, and provides a VF device to the guest. +.Pp +In the +.Fx +guest, the iavf driver would be loaded and will function using +the VF device assigned to it. +.Pp +The VF driver provides most of the same functionality as the core driver, but +is actually a subordinate to the host. +Access to many controls is accomplished by a request to the host via what is +called the "Admin queue." +These are startup and initialization events, however; once in operation, the +device is self\-contained and should achieve near native performance. +.Pp +Some notable limitations of the VF environment: +.Bl -bullet +.It +The PF can configure the VF to allow promiscuous mode, using a configuration +parameter in +.Xr iovctl.conf 5 ; +otherwise, promiscuous mode will not work +.It +Media info is not available from the PF, so the active media will always be +displayed as auto in .Xr ifconfig 8 -utility configures the adapter to receive and transmit Jumbo Frames. -The maximum MTU size for Jumbo Frames is 9706. +.El +.Ss Adaptive Virtual Function +Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to +adapt to changing feature sets of the physical function driver (PF) with which +it is associated. +This allows system administrators to update a PF without having to update all +the VFs associated with it. +All AVFs have a single common device ID and branding string. .Pp -Offloads are also controlled via the interface, for instance, -checksumming for both IPv4 and IPv6 can be set and unset, TSO4 -and/or TSO6, and finally LRO can be set and unset. +AVFs have a minimum set of features known as "base mode," but may provide +additional features depending on what features are available in the PF with +which the AVF is associated. +The following are base mode features: +.Bl -bullet -compact +.It +4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) +for Tx/Rx +.It +iavf descriptors and ring format +.It +Descriptor write\-back completion +.It +1 control queue, with iavf descriptors, CSRs and ring format +.It +5 MSI\-X interrupt vectors and corresponding iavf CSRs +.It +1 Interrupt Throttle Rate (ITR) index +.It +1 Virtual Station Interface (VSI) per VF +.It +1 Traffic Class (TC), TC0 +.It +Receive Side Scaling (RSS) with 64 entry indirection table and key, +configured through the PF +.It +1 unicast MAC address reserved per VF +.It +8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device +.It +16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device +.It +Stateless offloads \- non\-tunneled checksums +.It +AVF device ID +.It +HW mailbox is used for VF to PF communications +.El +.Sh CONFIGURATION AND TUNING +.Ss Important System Configuration Changes +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. .Pp -For more information on configuring this device, see -.Xr ifconfig 8 . +The default is 1000. .Pp -.Em NOTE : -This +Best throughput results are seen with a large MTU; use 9706 if possible. +The default number of descriptors per ring is 1024. +Increasing this may improve performance, depending on your use case. +.Ss Configuring for no iflib +.Xr iflib 4 +is a common framework for network interface drivers for +.Fx +that uses a shared set of sysctl names. +.Pp +The default .Nm -driver is only for Virtual Functions. -For 700 series Physical Functions, use the -.Xr ixl 4 -driver. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt before booting the kernel or stored in -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va hw.iavf.rx_itr -The RX interrupt rate value, set to 62 (124 usec) by default. -.It Va hw.iavf.tx_itr -The TX interrupt rate value, set to 122 (244 usec) by default. -.It Va hw.iavf.enable_head_writeback -When the driver is finding the last TX descriptor processed by the hardware, -use a value written to memory by the hardware instead of scanning the -descriptor ring for completed descriptors. -Disabled by default; this mimics the "legacy" TX behavior found in -.Xr ixgbe 4 . -to ensure compatibility with future, non-700 series VF devices. +driver depends on it, but it can be compiled without it. +.Ss Jumbo Frames +Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) +to a value larger than the default value of 1500. +.Pp +Use the +.Xr ifconfig 8 +command to increase the MTU size. +.Pp +To confirm the MTU used between two specific devices, use +.Xr route 8 : +.Bd -literal -offset indent +route get +.Ed +.Pp +NOTE: +.Bl -bullet +.It +The maximum MTU setting for jumbo frames is 9706. +This corresponds to the maximum jumbo frame size of 9728 bytes. +.It +This driver will attempt to use multiple page-sized buffers to receive +each jumbo packet. +This should help to avoid buffer starvation issues when allocating receive +packets. +.It +Packet loss may have a greater impact on throughput when you use jumbo +frames. +If you observe a drop in performance after enabling jumbo frames, enabling +flow control may mitigate the issue. .El -.Sh SUPPORT -For general information and support, -go to the Intel support website at: -.Pa http://support.intel.com/ . +.Ss Checksum Offload +Checksum offloading supports both TCP and UDP packets and is supported for both +transmit and receive. +.Pp +TSO (TCP Segmentation Offload) supports both IPv4 and IPv6. +Both of these features are enabled and disabled via +.Xr ifconfig 8 . .Pp -If an issue is identified with this driver with a supported adapter, -email all the specific information related to the issue to -.Mt freebsd@intel.com . +NOTE: +.Bl -bullet -compact +.It +TSO requires Tx checksum; if Tx checksum is disabled then TSO will also +be disabled. +.El +.Ss LRO +LRO (Large Receive Offload) may provide Rx performance improvement. +However, it is incompatible with packet\-forwarding workloads. +You should carefully evaluate the environment and enable LRO when possible. +.Ss Rx and Tx Descriptor Rings +Allows you to set the Rx and Tx descriptor rings independently. +Set them via these +.Xr iflib 4 +sysctls: +.Bl -tag -width indent +.It dev.iavf.#.iflib.override_nrxds +.It dev.iavf.#.iflib.override_ntxds +.El +.Ss Link\-Level Flow Control (LFC) +The VF driver does not have access to flow control settings. +It must be managed from the host side. .Sh SEE ALSO .Xr arp 4 , +.Xr ice 4 , +.Xr iflib 4 , .Xr ixl 4 , .Xr netintro 4 , .Xr vlan 4 , -.Xr ifconfig 8 , -.Xr iflib 9 +.Xr ifconfig 8 +.Pp +See the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for additional information on features. +It is available on the Intel website at either of the following: +.Bl -bullet +.It +.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831 +.It +.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html +.El +.Pp +For information on how to identify your adapter, and for the latest Intel +network drivers, refer to the Intel Support website: +.Aq Lk http://www.intel.com/support +.Sh CAVEATS +.Ss Driver Buffer Overflow Fix +The fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069 +.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html , +is included in this and future versions of the driver. +.Ss Network Memory Buffer Allocation +.Fx +may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. +You can check to see if the system is mbuf\-starved by running +.Li "netstat -m" . +Increase the number of mbufs by editing the lines below in +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +kern.ipc.nmbclusters +kern.ipc.nmbjumbop +kern.ipc.nmbjumbo9 +kern.ipc.nmbjumbo16 +kern.ipc.nmbufs +.Ed +.Pp +The amount of memory that you allocate is system specific, and may require +some trial and error. +Also, increasing the following in +.Xr sysctl.conf 5 +could help increase +network performance: +.Bd -literal -offset indent +kern.ipc.maxsockbuf +net.inet.tcp.sendspace +net.inet.tcp.recvspace +net.inet.udp.maxdgram +net.inet.udp.recvspace +.Ed +.Ss UDP Stress Test Dropped Packet Issue +Under small packet UDP stress with the +.Nm +driver, the system may drop UDP packets due to socket buffers being full. +Setting the PF driver's Flow Control variables to the minimum may resolve the +issue. +.Ss Disable LRO when routing/bridging +LRO must be turned off when forwarding traffic. +.Sh SUPPORT +For general information, go to the Intel support website at +.Aq Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with the released source code on a supported kernel +with a supported adapter, email the specific information related to the issue +to +.Aq Mt freebsd@intel.com . +.Sh LEGAL +Intel\(rg is a trademark or registered trademark of Intel Corporation +or its subsidiaries in the United States and / or other countries. +.Pp +Other names and brands may be claimed as the property of others. .Sh HISTORY The .Nm device driver first appeared in -.Fx 10.1 . -under the name "ixlv" +.Fx 10.1 +under the name +.Nm ixlv . It was converted to use -.Xr iflib 9 -and changed to its current name in -.Fx 12 . +.Xr iflib 4 +and renamed in +.Fx 12.4 . .Sh AUTHORS -.An -nosplit The .Nm -driver was written by -.An Jack Vogel Aq Mt jfv@freebsd.org -and -.An Eric Joyner Aq Mt erj@freebsd.org . -.Sh CAVEATS -This driver is supposed to function on VFs spawned from future network devices by Intel, -but at the time of this writing, has only been tested on the 700 series VFs. +driver was written by the +.An Intel Corporation Aq Mt freebsd@intel.com From nobody Tue May 21 23:28:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkVwf4h3Zz5L4cg; Tue, 21 May 2024 23:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkVwf4BYBz4dnH; Tue, 21 May 2024 23:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vc0dX5r4NYGHzNjbWaiL/sUAv1sXExeyalTwU7B/wHQ=; b=siu3RGaXqXwZz2AmInNhT3gwyhuKyXykkoJGHHl1f700Dt7WL7xHWjDSHT4HFgeE3XY8zW TudaZNqCrmpP/v8oWtr1Rw4UzBgvgA2edHqNnOc7tZr2vOXEYTn3fd2W47Wn3fKJlt13FR JZVz/X5CFyT1Rx9lp5B442H91lsnYCgDYzWyzPy+wu1fW4uld88SolQt4gNK1sRVuw12c5 Sufoq7M5oVTAUgrd5Z+eXGtS40YfhQvX5PNuhEJLUAm8b18SmVA54VP0yIydoe6MZmC+SR vJeZ/8PC698M0mdvhlhf078uaHqzfbulqCWjXSuogmSSEgHVXerzHdS083dZFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334082; a=rsa-sha256; cv=none; b=ZJ7l0fJDDMUIngSHtfT79EMgeTrkiEyegPC39i/L0iO+taOVelk7v7NS6fGtr8a4eI0GrJ 5uYppGsUgKm0B+BkdMbjyzXeHO/Zf7XDGrr/7npEjQSmv68oAsXSVMguNnXrcyd9unnc/z RFte0pQloTjT4353MR4RwB/XoDEevt0Perlc2pbEU68zfR0+cgmniAo7E87Wi9mhxa+e3u ON1n61z4eruESrfVLkUay3cn6xjtpw8xYGCOABGsjsTN8b2Iq34AAlU/csdUU1RD/e5+bi 98ykZog7v9rjeCTsxYpYMJtxcf/CGO1Ge0XPa64uU+O+q5GLSU6vRtJnLGTojQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vc0dX5r4NYGHzNjbWaiL/sUAv1sXExeyalTwU7B/wHQ=; b=dEwIy0vidws9K3YmG4TJSvNIYSqGLzkzlnNYEEiGW/HYg1LEXl6BTsfTa63eg+wF7ntVhk ZhIkztjA2O6Fq3YgbnGnmHeUNOieCsE0CuLWZRrRF09BX03R2r2IQf/lLP9yvyqtZ73aya W6QLy8tZ9ySBXCp+zC6b7JJK6VYOjsxulML/gEQxwBkiO9bRgE20ALrbsnXEgiGYg8TXvJ 6J1x2H7WlmKXX4SZPczNd9S/UNtxDqblV8SpiePbc4zvbngfXGrMNYDLz/IAIBD5Y8n4HP /dZkz/R63R+jM6JzrjUFs6zgUMwr5PcAlrh1zPhnWDLxbtVaqbbXUFOPoNUAPA== 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 4VkVwf3mQXzhKp; Tue, 21 May 2024 23:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNS2Uh081416; Tue, 21 May 2024 23:28:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNS2rl081413; Tue, 21 May 2024 23:28:02 GMT (envelope-from git) Date: Tue, 21 May 2024 23:28:02 GMT Message-Id: <202405212328.44LNS2rl081413@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: bb025df25738 - main - LinuxKPI: add FIELD_PREP_CONST() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: bb025df257386c5d1087b652e8ed951bceb89862 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bb025df257386c5d1087b652e8ed951bceb89862 commit bb025df257386c5d1087b652e8ed951bceb89862 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:40:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-05-21 23:27:10 +0000 LinuxKPI: add FIELD_PREP_CONST() Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely expected on this version in Linux. This is called by an updated wireless driver. Sposnored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45180 --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index a2020d247489..8a91b0663f37 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -131,6 +131,10 @@ _uX_replace_bits(8) #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) +/* Likely would need extra sanity checks compared to FIELD_PREP()? */ +#define FIELD_PREP_CONST(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + #define FIELD_GET(_mask, _value) \ ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask))) From nobody Tue May 21 23:42:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFp42Grz5L5YC; Tue, 21 May 2024 23:42:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWFp2wbSz4gW7; Tue, 21 May 2024 23:42:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N39m837JWGqhTOMymAZsh0BV8Jxnw6/Jm7vYe8LpNGY=; b=Og6FdDAAoj21+oFMN9h9hhzgFPmZi0SIflFCwf+0ba5lJT4QKGczngQwXT9CPslgg9KI2+ 2lFKSWY9C82E/e2GL71gb56IBrN+msa8XIyQ4pRE2FXHw8pMrUcvBsgFtxIm35ucDpXmv1 yaxhiGz6ucyl+Wi5VkXJFDZ5TwKz0dWN/VAff9Btb+Z6TPneM4oRiQprK8hMd6Y6+q+aly temZxYtSoJl0BjcVhwcsxXuaIDJlzkiEM+V5d9r87y/v9WrgDeielTD0pGutF3n+QNHvdv G5RhN5zUP27jkdEKdqjiIpsszJ+848DiIKT9UtFVDNZqJFtvpEBXLc8hmd1B1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334974; a=rsa-sha256; cv=none; b=kNf3KseG8yTODcuAZLQh2OwxsElV3lt44V+llXNuoS+TNasoARjuxhhqgT3+ysRtnnmR8c /+Gm8MwVTjF/XhnEn+avBVWLQjsS3CVINjskyfUVassPeRI4GAJCKcoWT/5jL66ZhvPCys aaUpn66PWDkAXngOv1gj5t5pFA9CSfEfGHuHuxK1Efl1d1nHtfr483rLZu59CvJzT7DrqW IIZAluBESk2O+Ru9Mom110elG5HDnEZEfTB8HmohApTQsQcBw1MnPTKB3AdFwa+myBpdlO 9Cdy9mDsaop92fmHlIB2ykI7qi0krZdv9pOEfe/C82vyUT2mB68woKMx41SzRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N39m837JWGqhTOMymAZsh0BV8Jxnw6/Jm7vYe8LpNGY=; b=XtRQtlTQOKuJwlWSgrKaiinCp9tus3/3sv3tvkd4TzjGSngRKi4r9CRYl8HxfS1/5Zg0Nv I0xab2BqGvtCoSIZXe2k+yJimSTEdhfsAGDbtHabC5NAslRllpBBDkBYEcXjta5ZucV9m5 iYmjHvOb1eCg3HqZ5NiStgbkAaI3zJvxuByL/b1A+njPH8UQuBUguNcHlSs6Qu5APAMYsP en16+++z78GrOP8PwB9AoGKWsAe0YUXRMdUYRLuzOnVaD/wKTOzK+Z17Df48tE9nK7Fabk JTkMXpvQEQP98kg3WE7TexXPuC0MwitMM36JAyoJ7/mdBYBVhFliTSAQ9w+csg== 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 4VkWFp2XGFzj4K; Tue, 21 May 2024 23:42:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNgsbf014348; Tue, 21 May 2024 23:42:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNgs8d014345; Tue, 21 May 2024 23:42:54 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:54 GMT Message-Id: <202405212342.44LNgs8d014345@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: 7839534a5a7b - main - autofs manuals: align lists, tag SPDX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 7839534a5a7b0d97131512888d6baa8ba5c20e56 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7839534a5a7b0d97131512888d6baa8ba5c20e56 commit 7839534a5a7b0d97131512888d6baa8ba5c20e56 Author: Alexander Ziaee AuthorDate: 2024-05-16 23:18:30 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 autofs manuals: align lists, tag SPDX MFC after: 3 days Fixes: 286c4906d60f (add -noauto), 3914ddf8a7b1 (import autofs) Pull Request: https://github.com/freebsd/freebsd-src/pull/1243 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1243 --- usr.sbin/autofs/auto_master.5 | 5 ++++- usr.sbin/autofs/automount.8 | 5 ++++- usr.sbin/autofs/automountd.8 | 5 ++++- usr.sbin/autofs/autounmountd.8 | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/usr.sbin/autofs/auto_master.5 b/usr.sbin/autofs/auto_master.5 index 30c78cc26766..4f960161859b 100644 --- a/usr.sbin/autofs/auto_master.5 +++ b/usr.sbin/autofs/auto_master.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -246,7 +249,7 @@ Special maps have names beginning with .Li - . Supported special maps are: .Pp -.Bl -tag -width "-hosts" -compact +.Bl -tag -width "-noauto" -compact .It Li -hosts Query the remote NFS server and map exported shares. This map is traditionally mounted on diff --git a/usr.sbin/autofs/automount.8 b/usr.sbin/autofs/automount.8 index 953b3c265178..83ff1cd61709 100644 --- a/usr.sbin/autofs/automount.8 +++ b/usr.sbin/autofs/automount.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -49,7 +52,7 @@ or unmounts .Xr autofs 4 filesystems to match. These options are available: -.Bl -tag -width ".Fl v" +.Bl -tag -width "-D" .It Fl D Define a variable. It is only useful with diff --git a/usr.sbin/autofs/automountd.8 b/usr.sbin/autofs/automountd.8 index 0384fe2e7ed2..1a790fa52414 100644 --- a/usr.sbin/autofs/automountd.8 +++ b/usr.sbin/autofs/automountd.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -54,7 +57,7 @@ forks a child process. The child process parses the appropriate map and mounts filesystems accordingly. Then it signals the kernel to release blocked processes that were waiting for the mount. -.Bl -tag -width ".Fl v" +.Bl -tag -width "-m maxproc" .It Fl D Define a variable. .It Fl i diff --git a/usr.sbin/autofs/autounmountd.8 b/usr.sbin/autofs/autounmountd.8 index 69b4565703e6..582e0d36b214 100644 --- a/usr.sbin/autofs/autounmountd.8 +++ b/usr.sbin/autofs/autounmountd.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -52,7 +55,7 @@ After a specified time passes, attempts to unmount a filesystem, retrying after some time if necessary. .Pp These options are available: -.Bl -tag -width ".Fl v" +.Bl -tag -width "-d" .It Fl d Debug mode: increase verbosity and do not daemonize. .It Fl r From nobody Tue May 21 23:42:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFq64Hmz5L5lJ; Tue, 21 May 2024 23:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWFq3vvfz4gBq; Tue, 21 May 2024 23:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HjrC6geoJLKRj1zwRnc4ahXKogSHngVTOJe3Ik+Cl68=; b=HFDSq74uYRKx3fN00c9NaW4uWwLKoBOdQcETNhTmVmS40g8s5b8aYbXZ9sns9eA4QkATQ4 wj6ntfcxQXaGheRFw61+Ul/NIs0vgX4Xdzz+JL8Cvz2UGY0feOvU52BOkaSvFB4J7aBG9r Hm+E/Ew1Sg0UETL3wx4+PL1bLCbZc+Y+67dji3MfG84+/8t0QMGLZx7Vi9AQ7jPX8PprqN L4+R0ip3v21gqeDDzGdpzmo92KPHx6/+rReyNldR0mT/V794GtSs0PX3KoAoru/tYL8bdb cUdE/ztKWLi9QogDfIAfphizrjyFkWwh+6P9IM8MJWkCNcL5gtCMzDU2OEn/UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334975; a=rsa-sha256; cv=none; b=sOgMOeAQ80KBFIqG2ypEZSi7OHgmM2wBZId+6nt9d568rnOTJc1oE9b08q68eYMh+T10A6 NYYXJFVd7R2HgAdJND/+cC4NgnjRdXjcyOnlexFGUnNH3fiknDPqdC11Zjbnc+YR3flfw5 zY8AsXnLW5dg2KMD+2C+ZzKli8WVW5ckgLgNlhJDGQh636UbqR2WAw9EplyRN6Ea3Lvcfg SiHZFNH6vWrjkM5xAWe0NergDkSdExAFE9dIQ15sgLwzOwTAI3ksJXTV7/bdIOMKRpmDRo pTyeKhCxCAmD+HDdnLG2uaDKtoXf50tk7ZaYrYqLM1HdUheuDzCBu8nQD7mPGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HjrC6geoJLKRj1zwRnc4ahXKogSHngVTOJe3Ik+Cl68=; b=kbi6uDIab9U4v0J2ynhUw5v+7L/6obimfoJYqwTa9aGmiHCTgn/I/jRN4L1pJztmwrxWWt 4+nXQF/jGmhec1cHc6xknhIzpOT22FD6LDCaw8pI7iB/vb+m+XZb8uDEOsoo+xS0e14KKw 1PoNgffc7M4uC/pPvVhD/q5uLxWeiHy5etSBOM8KbQvQKwDY0+jolyIdH4FJS+q1oRRzCA USCpNSoTaN/gWQZ1V3OqEYfEIdEV4oQbi1bXXS9gc42L/2BDzookTGn3JjD0ajyZWk5Fz8 DTR1lh//vv9uhVd4o1fLXxJ7Dge/p+yjKEAcFbmFqX85ZHjXzpXmzJm0GzYevw== 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 4VkWFq3Wmtzj2c; Tue, 21 May 2024 23:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNgt6B014391; Tue, 21 May 2024 23:42:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNgtuL014388; Tue, 21 May 2024 23:42:55 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:55 GMT Message-Id: <202405212342.44LNgtuL014388@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: 5ad3b09f2fe9 - main - unionfs.4: describe better, tag SPDX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 5ad3b09f2fe91028d3ffccb80d128d3408ef74f8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5ad3b09f2fe91028d3ffccb80d128d3408ef74f8 commit 5ad3b09f2fe91028d3ffccb80d128d3408ef74f8 Author: Alexander Ziaee AuthorDate: 2024-05-16 22:49:01 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 unionfs.4: describe better, tag SPDX Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1242 --- share/man/man4/unionfs.4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man4/unionfs.4 b/share/man/man4/unionfs.4 index 205958def903..85714331b6ce 100644 --- a/share/man/man4/unionfs.4 +++ b/share/man/man4/unionfs.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Gordon Bergling .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +29,7 @@ .Os .Sh NAME .Nm unionfs -.Nd "UNION FS" +.Nd union mount file system .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your From nobody Tue May 21 23:42:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFr5Wk2z5L5sl; Tue, 21 May 2024 23:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWFr4sljz4gbw; Tue, 21 May 2024 23:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikNPhqJS0MHtfRi1LQUfBAiw4uI9117pjFfppL127sE=; b=X0LhxItUuIzb9laTTGPoLnbhaoUGxdvKEfBawHtxdhkZ3jNutrNntGH6oSI6xFa2/NGUzo Dr194P9EY2g8CEo5fZkPv8Fk4Co1j5ozHjgbeqj5caDr2JSmKNApnXaX4/kclmcpuurCPw XE/la71N9Rce4TihREXURLoBfSvVCSUyPHEkRwYeBpz2G5QQFiMIQqeem2OQRUX9jFcEdy M0grsvyMyxjT2EPggAjxX5TrkbdJx+tq0Dwn5yk/525ISn0rBjdVDVlhBIglJ4KAJsRM1W MWc48KN9Rsh1qYXhOQJ/Of9EjkyxCtbQFTvXw8KuHobIAbwST4lLp1HtqcWF1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334976; a=rsa-sha256; cv=none; b=MdvXsVWP6KQRCUE6kLuHjcicKt6NjPxXoFp8QHQKxj8dKAC3PFUIBVAzzd1IVXtybPYRXl VpL/mHdwvx04PS5bG8YSov7E3OSxnHVrYjpjfdMmnDudtBxNXw+iyPpg++znfOINNPQAgs C9aJ7tdG/WLNqBoHoIPiwJ7QoQ7jq/uy0kPmAooKLvnofljM/87lW9OYW/V+z1qFEDIebS PuJH2eo4K+O26S2BgDB0hG0tjrKa250RzODaBcZKI3hN3Cy7GwNXuqieT/LY+JDV4cwSK4 Z9r8uVpGYa9qlPXjwKs71VhKs5xtsO4ua8EQQ6wWJ+LCPfbSJPrDFzLMpMZBxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikNPhqJS0MHtfRi1LQUfBAiw4uI9117pjFfppL127sE=; b=ebwRYVgW7oslUbpON/nN0e1Q7ZyP+6ln7Kg2Ze+SEQA1GSxDh8P9OKT1WBfnFH8Yov2iBk 70yFTSTsAvEZGh39fVwprmtEbXrZ/4b85sxWY6TFOaR3AljPB8zpumk+w7Eb/D6RgXHczr KQGiB15IuuGeGXNcAZdcAGEbpy925EEIU4wMgKKElvRChhiD5YrKhsKMQvf66qv3LYtpvm wfE1rMmyQFbPnwwch1GxXj8aRCm6/n6lbcOXLWhrgRCW10P8yrfpiC1nF8Q9ABejvU49P+ L+sv8J1i6xhWFn6IWB1WCuhAi3B1fTlZuD7ajZzPhXgfzNWBU1LTok7YhC1uXg== 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 4VkWFr4Tvfzj2d; Tue, 21 May 2024 23:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNguxd014434; Tue, 21 May 2024 23:42:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNguTl014431; Tue, 21 May 2024 23:42:56 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:56 GMT Message-Id: <202405212342.44LNguTl014431@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: bd2d71b1c865 - main - smb.4/smbfs.4: distinguishable descriptions, +SPDX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: bd2d71b1c8658c05f92dd87dede042c498d66d50 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd2d71b1c8658c05f92dd87dede042c498d66d50 commit bd2d71b1c8658c05f92dd87dede042c498d66d50 Author: Alexander Ziaee AuthorDate: 2024-05-16 21:54:30 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 smb.4/smbfs.4: distinguishable descriptions, +SPDX Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1241 --- share/man/man4/smb.4 | 5 ++++- share/man/man4/smbfs.4 | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index d2a1c3b9a618..fb4836c03688 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifer: BSD-2-Clause +.\" .\" Copyright (c) 1998, Nicolas Souchu .\" Copyright (c) 2004, Joerg Wunsch .\" Copyright (c) 2015, Michael Gmelin @@ -29,7 +32,7 @@ .Os .Sh NAME .Nm smb -.Nd SMB generic I/O device driver +.Nd System Management Bus generic I/O device driver .Sh SYNOPSIS .Cd "device smb" .Sh DESCRIPTION diff --git a/share/man/man4/smbfs.4 b/share/man/man4/smbfs.4 index c0650b8e17d6..f60a9618bc3f 100644 --- a/share/man/man4/smbfs.4 +++ b/share/man/man4/smbfs.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Gordon Bergling .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +29,7 @@ .Os .Sh NAME .Nm smbfs -.Nd "SMB FS" +.Nd server message block (SMB1/CIFS) file system .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your From nobody Tue May 21 23:42:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWFt0nZdz5L5sn; Tue, 21 May 2024 23:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWFs5qkHz4gY9; Tue, 21 May 2024 23:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=knjsLndYunGLnSmzNWfPZtGDx4+XG0rUEZCwIJ+8KQo=; b=afUtpOJbByg5+jC3VVxD1ESgksYrvTQ4HcKddaysH6amAk61lrlhjQC0HEYVnZLLZpGdBS F6mXOZvm3CXMy/h1bvq+9lrriSGrD6Rz8B8WCsUesy3jXncAnythQetFlnoO6g7fex5dLs gqSmjOX55GS61dW7FuRmb5zjmR2VJlBDZdECxhqhDX/IrWeWLa8bBWW/pgOQnSpnOICPlm CvUnEfwElzGaihPUooz3Z/2ElfZ+Q8iGYdjscrpRhKKN9jW+uSDDoaVrCzNRQIKoPRcCgz UlQnucLOfXDPiNQBsMyWEF94fjixp01OqFXnBUrZfJKU0Y1NaoNjwZZwKjArtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716334977; a=rsa-sha256; cv=none; b=xL0yaMuEm9xXPRN2yvmg+jzVV4aNqEuzF+L1cV1zw2zv0Q+T0K0N9tjb1CiTxB5n1fTDSo R1rk8bzq90xm5kylkZKy85M2KUYAjYebla11R/5Kmm0mY88a33UEb1kKVpihYTw+qivqaf LsmTixwN6i9EExzret2N6llBZxiSOmnGrnz7E515pUVEmb0SvhaqdI2k1itt4teZI3asVK uIxrljxNzF8jm7dewL35749nU+ca/22oK2ocshCjHKoHcJlDSJTosCAN+ghpVno4QnZC1s hqMvWaz6nh7jU1tX0iCPVsgY8iM2bt08FrbYBq7IVlPEk04wVFzlIqqKwnaZGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716334977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=knjsLndYunGLnSmzNWfPZtGDx4+XG0rUEZCwIJ+8KQo=; b=stgY3OWVtS2jjoNsW1/fq4FvPuZfNgpVegxo9Wvd7kCJxIwWzVkF42CkjuFbxDph9GlbYN GV9XVhwYxnzOwv7hYr+AH5hRIV7IRlCrwbsgJHW50HTdbWt3+QcFAJfX1OG4LYNQPUfUco H7ODgM/uJlQAOIeOia9GOi1EzHErnakDgvTb1Ihd/zqB1Kl7HZXIcnfTKC8ASqT5GEpWGl Wi/b/de94a9u2sv/5u+IgY1QqGNeihHoWRgPN9sI26Wr6nuTaWv/RPDR4Dr13iiSnVqIsr nC2VL7VIH3U1e8FRGzi3mxlwrAuwRFh9HYMMVpssB4FcKoqz7DK5pzcKvaVxOw== 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 4VkWFs5RVYzhd6; Tue, 21 May 2024 23:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNgvIQ014480; Tue, 21 May 2024 23:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNgvql014477; Tue, 21 May 2024 23:42:57 GMT (envelope-from git) Date: Tue, 21 May 2024 23:42:57 GMT Message-Id: <202405212342.44LNgvql014477@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: 408572a24e55 - main - libnvmf: avoid resource leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 408572a24e55a4c9ff9f81d1403ec0e055841264 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=408572a24e55a4c9ff9f81d1403ec0e055841264 commit 408572a24e55a4c9ff9f81d1403ec0e055841264 Author: Pierre Pronchery AuthorDate: 2024-05-16 14:34:34 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:41:04 +0000 libnvmf: avoid resource leak In nvmf_host_fetch_discovery_log_page(), the log variable may have been allocated on the heap during the first loop cycle, and should be free()'d before exiting upon errors. Reported by: Coverity CID: 1545034 Sponsored by: The FreeBSD Foundation Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1239 --- lib/libnvmf/nvmf_host.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libnvmf/nvmf_host.c b/lib/libnvmf/nvmf_host.c index b78e2af65897..a0d95470d8ee 100644 --- a/lib/libnvmf/nvmf_host.c +++ b/lib/libnvmf/nvmf_host.c @@ -653,19 +653,23 @@ nvmf_host_fetch_discovery_log_page(struct nvmf_qpair *qp, log = NULL; for (;;) { error = nvmf_get_discovery_log_page(qp, 0, &hdr, sizeof(hdr)); - if (error != 0) + if (error != 0) { + free(log); return (error); + } nvme_discovery_log_swapbytes(&hdr); if (hdr.recfmt != 0) { printf("NVMF: Unsupported discovery log format: %d\n", hdr.recfmt); + free(log); return (EINVAL); } if (hdr.numrec > 1024) { printf("NVMF: Too many discovery log entries: %ju\n", (uintmax_t)hdr.numrec); + free(log); return (EFBIG); } From nobody Tue May 21 23:56:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYK2Qstz5L6NG; Tue, 21 May 2024 23:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWYK15Jbz4jDl; Tue, 21 May 2024 23:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qrsnISRICuEHpHcLNQMjuAdlG4LZ2NbIJw3pj1KFhso=; b=srTHLw8suQAltnTJSOin81YShx4pBzBS4XCXvgY7Yrg5f2Cj1qu4qfCpA2Bk59sn8ueR46 uB771vQ6tBNqy4WoVJjMiaWgahxWsQTyvldvQtEuqnxmBiUwDdYsCpXTTR9V8+232kZLs/ 3ulxFY1OCXP65JsTyJc/6mcIBpLOHR0k5g8pQyd3ZoLeDzYvW4jqWd3QRG+AaTlXVVFjtz oix/CxrBx5JktorpZzuXrmG9caZAfxdHwciiAgCuXPJuUlwbQxXeTaxOursbywhN6eczKL NtHKc0n0lBKBvMu7el5Zq1FkPJ16e8fHKZGWfHXYCp30HqTaA/1Rkb0VG4HIbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335781; a=rsa-sha256; cv=none; b=bbU+1A9YTnVTyhgNKbmTMTLojX9mpLfLq7eO+tIrJii2xQV6mt3P4jRSzGOURIeWpsW31a lW0ReaY7rMFcyEm8vtMEcxS9p3HEcww2rIui1wcheryPWsICqwSW1b91A4nBrXR1w02A4Y KunBRTd0kNJnZF6B5IHQPF6L3oTGA76fJXNCzQ96IIEjf4sDKbvGNR2omzijkD2eXA1gcm VZPf2sZk1ApyDKOydHLlrTLz4s3Ri63jNzqScriGy5FQPg0ohEsoWHnZ8dmUhyjkw3nrjJ uMiXY1jbW9xVPYXQ7Bauzdy8K/U5sMJefln94B4Vvdty/pNndlKbQnvWMsQlVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qrsnISRICuEHpHcLNQMjuAdlG4LZ2NbIJw3pj1KFhso=; b=h2HDt0LwvbNJen3eZ7TiKia+GxhsegXBxLlAx1bzG+dNOnCTD3bcx+fDF5zJDcOJ/h702T Jw3/+Kb6BuP72Pi3wig8fscEsBxkh9eMLU2junhoN2Vvi9omJwJJQtwMvXKF9B4OItLOnw 3ScFS8RuHDYnreb72wLREivjz/ATiZ4Z9eCuGgl913Pc6NKgp3yeAa+ERWwpRK8lssEOAo /5jT8BWVG6exrVMWkVGYLpcSKiZQ37cW7qyf+tLPLk6ZNBBGU8hjb4lRtRJkUXXLnXkudY IJ/bCIIT0rCZ7gpvyvwlSjk7MwSh0G1MrEoCHHdOy2JHVL7NfIGt3toHfDDFbQ== 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 4VkWYJ74vVzjKB; Tue, 21 May 2024 23:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNuKTd032171; Tue, 21 May 2024 23:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuKS8032168; Tue, 21 May 2024 23:56:20 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:20 GMT Message-Id: <202405212356.44LNuKS8032168@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: beb1165a018d - main - kern/rman: update debugging lines in subr_rman.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: beb1165a018d32f243c331a427dc212cf3b7febd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=beb1165a018d32f243c331a427dc212cf3b7febd commit beb1165a018d32f243c331a427dc212cf3b7febd Author: Elliott Mitchell AuthorDate: 2024-05-09 04:15:53 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:21 +0000 kern/rman: update debugging lines in subr_rman.c Rather than hard-code the function name, use __func__ instead. Apply some style and adjust indentation as appropriate. Remove the no longer required braces. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index ffd8def66b5c..d4da67b2f16f 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -154,7 +154,7 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end) struct resource_i *r, *s, *t; int rv = 0; - DPRINTF("rman_manage_region: <%s> request: start %#jx, end %#jx\n", + DPRINTF("%s: <%s> request: start %#jx, end %#jx\n", __func__, rm->rm_descr, start, end); if (start < rm->rm_start || end > rm->rm_end) return EINVAL; @@ -439,10 +439,9 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rv = NULL; - DPRINTF("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], " - "length %#jx, flags %x, device %s\n", rm->rm_descr, start, end, - count, flags, - dev == NULL ? "" : device_get_nameunit(dev)); + DPRINTF("%s: <%s> request: [%#jx, %#jx], length %#jx, flags %x, " + "device %s\n", __func__, rm->rm_descr, start, end, count, flags, + dev == NULL ? "" : device_get_nameunit(dev)); KASSERT(count != 0, ("%s: attempted to allocate an empty range", __func__)); KASSERT((flags & RF_FIRSTSHARE) == 0, @@ -452,19 +451,17 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, mtx_lock(rm->rm_mtx); r = TAILQ_FIRST(&rm->rm_list); - if (r == NULL) { - DPRINTF("NULL list head\n"); - } else { - DPRINTF("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1); - } + if (r == NULL) + DPRINTF("NULL list head\n"); + else + DPRINTF("%s: trying %#jx <%#jx,%#jx>\n", __func__, r->r_end, + start, count-1); + for (r = TAILQ_FIRST(&rm->rm_list); r && r->r_end < start + count - 1; - r = TAILQ_NEXT(r, r_link)) { - ; - DPRINTF("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1); - } + r = TAILQ_NEXT(r, r_link)) + DPRINTF("%s: tried %#jx <%#jx,%#jx>\n", __func__, r->r_end, + start, count-1); if (r == NULL) { DPRINTF("could not find a region\n"); From nobody Tue May 21 23:56:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYJ1sM3z5L6lQ; Tue, 21 May 2024 23:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWYH6lqcz4jHJ; Tue, 21 May 2024 23:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Dn1wn6vsoeUFIbq8vSDtkRP7cSlzlZKH0GfUhZPeHc=; b=aOy/sgWKGF/gQvEeEe+6y3qecHM6QID16JGnhJO1fQ96aJbX4bUWIpSgsp+8BFtKOG7qm8 5DQPy4N45psMmLJr2mGnR7fvYxT3g1wEDK7ju6xls2cJWfENRRAA5qu9/BNdEfAMsPwYZQ 0GR77CLAAg9jVU1SpmBPMkJo101SF3GfhkZ+MyTuVaOnsVLqQjBN8Gxc1Dei8POZ75USOT NrxehYazOnFe2yyzh15fzs8dKhWVO4XXDpOOvq8n7B+MhxFpr56FDZgag6xPh0otI2ALlu laDwBw+07RGC+L+yO/dgLHA25/eGnE2kxKsDoMhyvP5fvQ6kcEm+mZJaAbJDCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335779; a=rsa-sha256; cv=none; b=ec2YGPN7G9AwwEA5jwzGcyjjn4W3ix8I0qC8BQTsuAHeXkt0Pf7+DNioeMR/jnophLZE05 J1az6UxKh24lnan8YVA5Uhg1ERbiXkLmQ4zYL2mdnvRv/j/4oygKwjgZK+uIoxPagTQ5is c3P5E2hYNmmAZW491cCdqb+q4/8Uy/0SPjEPkm7a6q1RoSlZmw77HNjOb7g4uWd0RAfCYI zjpoCvd9yw2R5gU3x1rTDvvt8A1n6eYA3I9QApKPdFEwCd0nK6jPdS5bg0futawcmkQhfo V0p4vG3n4OsX0u3OVgHLqg5uUYMvBxSk8RkjJZYfH6iFwbJA9rz6Sl7GQL3uOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Dn1wn6vsoeUFIbq8vSDtkRP7cSlzlZKH0GfUhZPeHc=; b=phPWluQ+TLz9sCfueMBOLOx61QOVc+yW7mikqMNlhsxgqWPnISux6mUm6EFyd8qrztecRA O/JH9JBHUEffv42lq98Oc3t6NuXYOn0xG3YqN3iZs5yPJSdn4nyhNJ0rXoQXOLPau5tu7B xPrBR8xwjch9TwsHr5sXlPVmI7zJ4cnIXSW2VRQN6wKJNa5fKC8rZlPLJpi5XqZo7q0buL vvVWPVEa8JRumvu+T/mM5tLhdDnD07hA/6hXFBi6omlyieUOOrwnujvm1VixuU1umyOXXf QIuWHlHMgUih+H8MgAakc6HLk2pRMgYApeATus93SMBqOfdGP4zAB5Vg0F5j3w== 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 4VkWYH64n5zj4p; Tue, 21 May 2024 23:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNuJbB032126; Tue, 21 May 2024 23:56:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuJRg032123; Tue, 21 May 2024 23:56:19 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:19 GMT Message-Id: <202405212356.44LNuJRg032123@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: 973c32297f3b - main - kern/rman: update DPRINTF() macro, avoid semicolon swallowing match function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 973c32297f3b43deae37d8e26b25d1133daa2a38 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=973c32297f3b43deae37d8e26b25d1133daa2a38 commit 973c32297f3b43deae37d8e26b25d1133daa2a38 Author: Elliott Mitchell AuthorDate: 2024-05-09 05:34:49 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:15 +0000 kern/rman: update DPRINTF() macro, avoid semicolon swallowing match function Using a variadic macro allows passing everything properly to printf(). Using the do { } while(0) construct ensures the macro acts like any other single statement. This shows just how long some of this has existed. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 1393781a66fe..ffd8def66b5c 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -98,7 +98,7 @@ static int rman_debug = 0; SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN, &rman_debug, 0, "rman debug"); -#define DPRINTF(params) if (rman_debug) printf params +#define DPRINTF(...) do { if (rman_debug) printf(__VA_ARGS__); } while (0) static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager"); @@ -154,8 +154,8 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end) struct resource_i *r, *s, *t; int rv = 0; - DPRINTF(("rman_manage_region: <%s> request: start %#jx, end %#jx\n", - rm->rm_descr, start, end)); + DPRINTF("rman_manage_region: <%s> request: start %#jx, end %#jx\n", + rm->rm_descr, start, end); if (start < rm->rm_start || end > rm->rm_end) return EINVAL; r = int_alloc_resource(M_NOWAIT); @@ -439,10 +439,10 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rv = NULL; - DPRINTF(("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], " + DPRINTF("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], " "length %#jx, flags %x, device %s\n", rm->rm_descr, start, end, count, flags, - dev == NULL ? "" : device_get_nameunit(dev))); + dev == NULL ? "" : device_get_nameunit(dev)); KASSERT(count != 0, ("%s: attempted to allocate an empty range", __func__)); KASSERT((flags & RF_FIRSTSHARE) == 0, @@ -453,21 +453,21 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, r = TAILQ_FIRST(&rm->rm_list); if (r == NULL) { - DPRINTF(("NULL list head\n")); + DPRINTF("NULL list head\n"); } else { - DPRINTF(("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1)); + DPRINTF("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n", + r->r_end, start, count-1); } for (r = TAILQ_FIRST(&rm->rm_list); r && r->r_end < start + count - 1; r = TAILQ_NEXT(r, r_link)) { ; - DPRINTF(("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n", - r->r_end, start, count-1)); + DPRINTF("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n", + r->r_end, start, count-1); } if (r == NULL) { - DPRINTF(("could not find a region\n")); + DPRINTF("could not find a region\n"); goto out; } @@ -481,23 +481,23 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, * First try to find an acceptable totally-unshared region. */ for (s = r; s; s = TAILQ_NEXT(s, r_link)) { - DPRINTF(("considering [%#jx, %#jx]\n", s->r_start, s->r_end)); + DPRINTF("considering [%#jx, %#jx]\n", s->r_start, s->r_end); /* * The resource list is sorted, so there is no point in * searching further once r_start is too large. */ if (s->r_start > end - (count - 1)) { - DPRINTF(("s->r_start (%#jx) + count - 1> end (%#jx)\n", - s->r_start, end)); + DPRINTF("s->r_start (%#jx) + count - 1> end (%#jx)\n", + s->r_start, end); break; } if (s->r_start > RM_MAX_END - amask) { - DPRINTF(("s->r_start (%#jx) + amask (%#jx) too large\n", - s->r_start, amask)); + DPRINTF("s->r_start (%#jx) + amask (%#jx) too large\n", + s->r_start, amask); break; } if (s->r_flags & RF_ALLOCATED) { - DPRINTF(("region is allocated\n")); + DPRINTF("region is allocated\n"); continue; } rstart = ummax(s->r_start, start); @@ -514,17 +514,17 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rstart < s->r_end); rend = ummin(s->r_end, ummax(rstart + count - 1, end)); if (rstart > rend) { - DPRINTF(("adjusted start exceeds end\n")); + DPRINTF("adjusted start exceeds end\n"); continue; } - DPRINTF(("truncated region: [%#jx, %#jx]; size %#jx (requested %#jx)\n", - rstart, rend, (rend - rstart + 1), count)); + DPRINTF("truncated region: [%#jx, %#jx]; size %#jx (requested %#jx)\n", + rstart, rend, (rend - rstart + 1), count); if ((rend - rstart) >= (count - 1)) { - DPRINTF(("candidate region: [%#jx, %#jx], size %#jx\n", - rstart, rend, (rend - rstart + 1))); + DPRINTF("candidate region: [%#jx, %#jx], size %#jx\n", + rstart, rend, (rend - rstart + 1)); if ((s->r_end - s->r_start + 1) == count) { - DPRINTF(("candidate region is entire chunk\n")); + DPRINTF("candidate region is entire chunk\n"); rv = s; rv->r_flags = new_rflags; rv->r_dev = dev; @@ -551,11 +551,11 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, rv->r_rm = rm; if (s->r_start < rv->r_start && s->r_end > rv->r_end) { - DPRINTF(("splitting region in three parts: " + DPRINTF("splitting region in three parts: " "[%#jx, %#jx]; [%#jx, %#jx]; [%#jx, %#jx]\n", s->r_start, rv->r_start - 1, rv->r_start, rv->r_end, - rv->r_end + 1, s->r_end)); + rv->r_end + 1, s->r_end); /* * We are allocating in the middle. */ @@ -575,14 +575,14 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, TAILQ_INSERT_AFTER(&rm->rm_list, rv, r, r_link); } else if (s->r_start == rv->r_start) { - DPRINTF(("allocating from the beginning\n")); + DPRINTF("allocating from the beginning\n"); /* * We are allocating at the beginning. */ s->r_start = rv->r_end + 1; TAILQ_INSERT_BEFORE(s, rv, r_link); } else { - DPRINTF(("allocating at the end\n")); + DPRINTF("allocating at the end\n"); /* * We are allocating at the end. */ @@ -602,7 +602,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, * former restriction could probably be lifted without too much * additional work, but this does not seem warranted.) */ - DPRINTF(("no unshared regions found\n")); + DPRINTF("no unshared regions found\n"); if ((flags & RF_SHAREABLE) == 0) goto out; From nobody Tue May 21 23:56:22 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYL2ZSZz5L6j5; Tue, 21 May 2024 23:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWYL1NVMz4jBy; Tue, 21 May 2024 23:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qk+QV4ZJEXXsnzWZ0gn38HEuvna1F64nrJftwfGg7XA=; b=YpGjhJBT96AvyIVp11ho84IdfS/TN6DdvnNiB5kM8/WSf2//zwEiRE9ly5FdT9ITrIjRUa m46I9RhlngHvRkKPv2lVrXxieTBfrTpRgWt4JaBL891FgUmkjl7lgrdb7uGgFJM+cx5u9R P0MxvXhM3DxFoLvxSl2C3W692cs1aqMmUk2+p+3hYG5MbD5t3H3QEcTZHJz3rnMlxqpcim 49HW9bb2+QcCWUB77Ale+uzYtydRvV85ZctOiCSXEMmYjvVa7BkOtqBnwIKYYSyLhLz+4H PegZbPqk9wmH00sZ4s27ph2CzVKeAhzH8JE4EJ9eLhuqvezguDWBiGtk8pVIRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335782; a=rsa-sha256; cv=none; b=b+3e4TOqz/Co8rJBjFRzhm/MRTb3qSsYSOwqEgktWW8pgeCqsf7lwNGcjj6qneziEzob7h 4NQG2ngzde+3JEd2eWGj1l3bJddFYnx8K2WIn6j18ftVigDQlbZDUPg+QWRlr36cowdwiw 0uFydVOVHAWHSqAujwPvKH9I7J77EgMGPobUhArn5JoDCTzB5oxKi+JoM0CsKddf9T8L69 B3SMleujDjSU5FWxQ0ay+AkQPx2e1MBHar1xVb6ilZYRU8p0mO5gvw70UECXbii39FqhcD TPTRbK87W+FDWLCPF/6wmAKf72lkTMqBcl8me2+haiShzgd9OSp3Dgt7IEzSGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qk+QV4ZJEXXsnzWZ0gn38HEuvna1F64nrJftwfGg7XA=; b=YT+JlaSIhycrFOFJPQjWa7ffoENxHgGahtNR96mkVI25dvj932XnhMTYO1CqygD+1yad5l H+etbu2FtoySInU2Sd3tPRFqd7woMq7A/mk8emday+FVyMaQoFBOh5YTZl2o0tzIoW7eUK YYLIL/qHlQxLIgrJpN6U8UseEGskD8Dil27WWgFwn7UMtLQ8482uyqx+/KWkyYUi1mP0sn olYx8jZRitYPM13JgHqgA2D2C28ajDJcAGOjqZExk0wWTFU21hbmx3JnrKQPzITUHzBaL4 O9BYLDuH09UC+eYWuOff1okII+IkLsfRTbdHNWvHLrwStLTn45v/WiprUNLEoQ== 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 4VkWYL0zmZzjKC; Tue, 21 May 2024 23:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNuMEI032219; Tue, 21 May 2024 23:56:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuMsn032216; Tue, 21 May 2024 23:56:22 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:22 GMT Message-Id: <202405212356.44LNuMsn032216@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: 037946dc9b07 - main - kern/rman: remove rman_reserve_resource_bound(), partially revert 13fb6657723 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 037946dc9b07f7e0085e71798f5b397c5d9597db Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=037946dc9b07f7e0085e71798f5b397c5d9597db commit 037946dc9b07f7e0085e71798f5b397c5d9597db Author: Elliott Mitchell AuthorDate: 2024-05-09 04:55:28 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:24 +0000 kern/rman: remove rman_reserve_resource_bound(), partially revert 13fb6657723 Not once has rman_reserve_resource_bound() ever been used. There are though several uses of RF_ALIGNMENT. In light of this remove this extra and leave the actually used portion in place. This partially reverts commit 13fb6657723c1e9cb47bbd286942b432a4306b96. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- share/man/man9/rman.9 | 35 +++++++++-------------------------- sys/kern/subr_rman.c | 23 ++++------------------- sys/sys/rman.h | 3 --- 3 files changed, 13 insertions(+), 48 deletions(-) diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9 index 35a2d176233c..d175b60b4010 100644 --- a/share/man/man9/rman.9 +++ b/share/man/man9/rman.9 @@ -40,7 +40,6 @@ .Nm rman_last_free_region , .Nm rman_release_resource , .Nm rman_reserve_resource , -.Nm rman_reserve_resource_bound , .Nm rman_make_alignment_flags , .Nm rman_get_start , .Nm rman_get_end , @@ -90,11 +89,6 @@ .Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" .Fa "u_int flags" "device_t dev" .Fc -.Ft "struct resource *" -.Fo rman_reserve_resource_bound -.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" -.Fa "rman_res_t bound" "u_int flags" "device_t dev" -.Fc .Ft uint32_t .Fn rman_make_alignment_flags "uint32_t size" .Ft rman_res_t @@ -266,7 +260,7 @@ and are set to the bounds of the free region and zero is returned. .Pp The -.Fn rman_reserve_resource_bound +.Fn rman_reserve_resource function is where the bulk of the .Nm logic is located. @@ -279,7 +273,7 @@ The caller can specify the and .Fa end of an acceptable range, -as well as a boundary restriction and required alignment, +required alignment, and the code will attempt to find a free segment which fits. The .Fa start @@ -296,15 +290,13 @@ The alignment requirement .Pq if any is specified in .Fa flags . -The -.Fa bound -argument may be set to specify a boundary restriction such that an -allocated region may cross an address that is a multiple of the -boundary. -The -.Fa bound -argument must be a power of two. -It may be set to zero to specify no boundary restriction. +Often the +.Dv RF_ALIGNMENT_LOG2 +macro is used to specify alignment to a power-of-2 size, or +.Fn rman_make_alignment_flags +can be used to compute the +.Fa flags +value at runtime. A shared segment will be allocated if the .Dv RF_SHAREABLE flag is set, otherwise an exclusive segment will be allocated. @@ -312,15 +304,6 @@ If this shared segment already exists, the caller has its device added to the list of consumers. .Pp The -.Fn rman_reserve_resource -function is used to reserve resources within a previously established region. -It is a simplified interface to -.Fn rman_reserve_resource_bound -which passes 0 for the -.Fa bound -argument. -.Pp -The .Fn rman_make_alignment_flags function returns the flag mask corresponding to the desired alignment .Fa size . diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index d4da67b2f16f..2019e19090c0 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -429,13 +429,12 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) #define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_PREFETCHABLE)) struct resource * -rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, - rman_res_t count, rman_res_t bound, u_int flags, - device_t dev) +rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags, device_t dev) { u_int new_rflags; struct resource_i *r, *s, *rv; - rman_res_t rstart, rend, amask, bmask; + rman_res_t rstart, rend, amask; rv = NULL; @@ -472,8 +471,6 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, KASSERT(start <= RM_MAX_END - amask, ("start (%#jx) + amask (%#jx) would wrap around", start, amask)); - /* If bound is 0, bmask will also be 0 */ - bmask = ~(bound - 1); /* * First try to find an acceptable totally-unshared region. */ @@ -505,8 +502,6 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, */ do { rstart = (rstart + amask) & ~amask; - if (((rstart ^ (rstart + count - 1)) & bmask) != 0) - rstart += bound - (rstart & ~bmask); } while ((rstart & amask) != 0 && rstart < end && rstart < s->r_end); rend = ummin(s->r_end, ummax(rstart + count - 1, end)); @@ -607,8 +602,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, if (SHARE_TYPE(s->r_flags) == SHARE_TYPE(flags) && s->r_start >= start && (s->r_end - s->r_start + 1) == count && - (s->r_start & amask) == 0 && - ((s->r_start ^ s->r_end) & bmask) == 0) { + (s->r_start & amask) == 0) { rv = int_alloc_resource(M_NOWAIT); if (rv == NULL) goto out; @@ -644,15 +638,6 @@ out: return (rv == NULL ? NULL : &rv->r_r); } -struct resource * -rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags, device_t dev) -{ - - return (rman_reserve_resource_bound(rm, start, end, count, 0, flags, - dev)); -} - int rman_activate_resource(struct resource *re) { diff --git a/sys/sys/rman.h b/sys/sys/rman.h index b8b2016cc94a..70655339183b 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -148,9 +148,6 @@ int rman_release_resource(struct resource *r); struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags, device_t dev); -struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start, - rman_res_t end, rman_res_t count, rman_res_t bound, - u_int flags, device_t dev); void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); void rman_set_device(struct resource *_r, device_t _dev); From nobody Tue May 21 23:56:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYM52FVz5L6L7; Tue, 21 May 2024 23:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWYM2Yt6z4jC4; Tue, 21 May 2024 23:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V2XoKVh85r6j0/qqMvbXx1HmxozgljMge+E4Tg7Grg=; b=ogSqjB/6fuu8LVk3Md9UPS9DJFAQbYXg5wKQDw5Z4L1xKlqOP4LV1/6urvdwHp+tP3+jYc 6Tv3q8iMeLnVzLRZN1proj95/hwI7EBjDdvm41wVYPvvqY6FgcCjfcJ9d5fueDvY6acvwF LiFdO2RpGIWOy1TU1WmErtletj8ADSWqfh6XrVsBAwNkLECu4BLuT15QQZhXt1vLogXlVq 6e7f9PAT53hOmYFiFG0pc8gwNzwwwEOyl53O2/Qt107W/MBe90j7Q4ZQ4Y/lu9Jn8lNmnc cbZUZnc6GS8Yxr5TG73lIJ6PVbTuJ36LjNgLIxPhdfzUCIn7P6SMeaeEsLSLDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335783; a=rsa-sha256; cv=none; b=xXD2u/BHTDEA10lNZfSUvbm6pzVneQSy8MiBOy8ho5UDdlRQwUDkl9Wdda28psuu4vNmv2 nJGkBWTHaodrBmuoKrWZO/CRHaOPXvbS9ahBsuL0dJnBMQzhcInOvKZCDcj6vx8cq6o1Zg J9f7z48ecat8XoYZpFMUOmfB1GPPShuMBbjnm3E+vczS+Rcpdo3T1qOM4s2eAXuWZY1BRa 8arJFO9Hc65bO9eQ+PIdSqUnif8G+PdMuu6JsWRPKVxQ8KcaaKGOdrKzPL6KCdc4hpr3ri 4jYrK3JtpYuATSvJOr4n4HG1Slx9J+bBKgON1vuKvO66AqhHQ4xkCpv9ESzczQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V2XoKVh85r6j0/qqMvbXx1HmxozgljMge+E4Tg7Grg=; b=GZXOLsfFdnlN+KEPG18XQwbY4Jtyh7qLtIrD5+W8xMb1SctLa3WauYjW1G+jYIdSE6Qf7w r9QhI0CnQxvsbhD/Y/W+UeMlI+7XJTymnNg8RD//3Hw4dR4gjuSrWB08u8Tv52DZH4TsqK SUKRjSP1rRQYF60cWPVGlnFxr5u5K7lBB3P4i8ktpRtvUGSGhzu2+IHLLrcjiGCe8xZlsA /AvVwS+DfqDAxqX6nyG5WtlPNc4MY8ciu3XtLPDwmCm9hFPj3YIFL2dOVQplqIszxGB+wF sSvXE/8LInyvsmZGjsoUZDk0rg2ptRPGuzrHrUkWlDFbs76jmpryKXw6mkx7wA== 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 4VkWYM1xxvzjTv; Tue, 21 May 2024 23:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNuN4l032259; Tue, 21 May 2024 23:56:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuN8B032256; Tue, 21 May 2024 23:56:23 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:23 GMT Message-Id: <202405212356.44LNuN8B032256@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: 996fa9fb4ec4 - main - kern/rman: update rman_make_alignment_flags() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 996fa9fb4ec47995e89d2089e6084d37dcb1033c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=996fa9fb4ec47995e89d2089e6084d37dcb1033c commit 996fa9fb4ec47995e89d2089e6084d37dcb1033c Author: Elliott Mitchell AuthorDate: 2024-05-09 04:47:09 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:27 +0000 kern/rman: update rman_make_alignment_flags() The flsl() function makes use of hardware functionality to compute the value faster than this loop. The only deviation from flsl() is at 0. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 2019e19090c0..508152f74002 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -776,19 +776,14 @@ rman_release_resource(struct resource *re) uint32_t rman_make_alignment_flags(uint32_t size) { - int i; /* * Find the hightest bit set, and add one if more than one bit * set. We're effectively computing the ceil(log2(size)) here. */ - for (i = 31; i > 0; i--) - if ((1 << i) & size) - break; - if (~(1 << i) & size) - i++; - - return(RF_ALIGNMENT_LOG2(i)); + if (__predict_false(size == 0)) + return (0); + return (RF_ALIGNMENT_LOG2(flsl(size - 1))); } rman_res_t From nobody Tue May 21 23:56:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWYP00cZz5L6ql; Tue, 21 May 2024 23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWYN3H7sz4hyJ; Tue, 21 May 2024 23: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=1716335784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8izRIUi3gq4xb59TEBgIm57otsn3+dcmFSP5n7Qn64=; b=m8+s/Ql5/za1jnmuP034tzWMjS3QS3OIRb6emFWtopAqoMkoThyt/T1ubpYaqCWa79Cs3a cuaKh7jMk1JAe0wqHixqOBLzF9P2Pwnom9yq8wHf7CtX7XZmzmdhqne03JbVM549FEG4fb gGGOPLzq+ugCfBVBs6LDAb/F0zGPyvan3aR+uHE7VselZ/axCSvadv9IPOyDOZQ5M/CZeR 9kT1ik2vwbTUdodBte1Mxc55czqoQlcmQZgRmcuWXMNGFHENuTKOMDfiZ2wnGK9mhqw2D9 lm2ClwUvZTIF2Dz1zVQiAR+/HX6HgUcfAE2qtIUIl10A3BYd05ijS6US2U9H5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335784; a=rsa-sha256; cv=none; b=Ol3d05ipv/FYAlcdgXnmS8M9aexsQDwj32bSIHGWawTFydQDUZTw5bQu7DwBch4PpkcE2s zpRbqNh4bBnOhdvrdMEQybm/g04uLXVCkJWUECksfDQiSBrdQubIS7LjxANxT/rasxuAiE cxVFuX9dshZNic6z3DyVpqMRH9+lL+mJs0lW2yQYwA9QiI2bs19ZCjgb90vd158rzq+XbZ nNjkadkkF01BwRYHq3VhmFGvz2qva8SSBGFp9LeYv3aw7V0vXhpwLXKiogyg5ksH/Ln78A ranac8j21ipc2x3O93RHQuDHVUhAHNk86CAKCC6o7RdIVprBS6MdXrlVHdNmzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8izRIUi3gq4xb59TEBgIm57otsn3+dcmFSP5n7Qn64=; b=M/0kA/g7KEyWHhvmSrq30BVY8lENoRuWNDZ2GnrQhR3tFErXc6KyIahq4m45eCf0ne1mgO OBTdnd7q2pf2IqzJtD9QNVCN7bxGNE4QJi13tBKfvxcZYp64k4Ag2Z0c0W9/q26+wJzwGT pUf2DRTgcjFwAqKH/lUlHtLu47pwmqtWkzTRkk4HGm0AUSuSMND/1Q4uGPAF+/sXkREM6+ Ih6kCGlkcrcpZ0N0/vv5gD2Ac0TZvSiluBTrz1YQEKySnXEhSmZjJluYuAuFFwerzaMv4e 48aan3mdPOg6nCYTxSwtDknEY8fH5fDG33qckF0anXc2XqgRmpZ05okjfnkWTg== 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 4VkWYN2sYDzjKD; Tue, 21 May 2024 23:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNuOF1032312; Tue, 21 May 2024 23:56:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNuOKl032309; Tue, 21 May 2024 23:56:24 GMT (envelope-from git) Date: Tue, 21 May 2024 23:56:24 GMT Message-Id: <202405212356.44LNuOKl032309@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: cbcb9778dd95 - main - kern/rman: mark rman get functions as taking constants List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: cbcb9778dd957adf28fac011c6d7b511ca80c469 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cbcb9778dd957adf28fac011c6d7b511ca80c469 commit cbcb9778dd957adf28fac011c6d7b511ca80c469 Author: Elliott Mitchell AuthorDate: 2024-05-10 16:13:39 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:52:29 +0000 kern/rman: mark rman get functions as taking constants The arguments are left completely unchanged by these functions. This allows passing constant pointers for verifying ownership, but not modifying the contents. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224 --- sys/kern/subr_rman.c | 26 +++++++++++++------------- sys/sys/rman.h | 26 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 508152f74002..dbb09850d049 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -787,28 +787,28 @@ rman_make_alignment_flags(uint32_t size) } rman_res_t -rman_get_start(struct resource *r) +rman_get_start(const struct resource *r) { return (r->__r_i->r_start); } rman_res_t -rman_get_end(struct resource *r) +rman_get_end(const struct resource *r) { return (r->__r_i->r_end); } rman_res_t -rman_get_size(struct resource *r) +rman_get_size(const struct resource *r) { return (r->__r_i->r_end - r->__r_i->r_start + 1); } u_int -rman_get_flags(struct resource *r) +rman_get_flags(const struct resource *r) { return (r->__r_i->r_flags); @@ -822,7 +822,7 @@ rman_set_virtual(struct resource *r, void *v) } void * -rman_get_virtual(struct resource *r) +rman_get_virtual(const struct resource *r) { return (r->__r_i->r_virtual); @@ -836,7 +836,7 @@ rman_set_irq_cookie(struct resource *r, void *c) } void * -rman_get_irq_cookie(struct resource *r) +rman_get_irq_cookie(const struct resource *r) { return (r->__r_i->r_irq_cookie); @@ -850,7 +850,7 @@ rman_set_bustag(struct resource *r, bus_space_tag_t t) } bus_space_tag_t -rman_get_bustag(struct resource *r) +rman_get_bustag(const struct resource *r) { return (r->r_bustag); @@ -864,7 +864,7 @@ rman_set_bushandle(struct resource *r, bus_space_handle_t h) } bus_space_handle_t -rman_get_bushandle(struct resource *r) +rman_get_bushandle(const struct resource *r) { return (r->r_bushandle); @@ -882,7 +882,7 @@ rman_set_mapping(struct resource *r, struct resource_map *map) } void -rman_get_mapping(struct resource *r, struct resource_map *map) +rman_get_mapping(const struct resource *r, struct resource_map *map) { map->r_bustag = rman_get_bustag(r); @@ -899,7 +899,7 @@ rman_set_rid(struct resource *r, int rid) } int -rman_get_rid(struct resource *r) +rman_get_rid(const struct resource *r) { return (r->__r_i->r_rid); @@ -912,7 +912,7 @@ rman_set_type(struct resource *r, int type) } int -rman_get_type(struct resource *r) +rman_get_type(const struct resource *r) { return (r->__r_i->r_type); } @@ -925,14 +925,14 @@ rman_set_device(struct resource *r, device_t dev) } device_t -rman_get_device(struct resource *r) +rman_get_device(const struct resource *r) { return (r->__r_i->r_dev); } int -rman_is_region_manager(struct resource *r, struct rman *rm) +rman_is_region_manager(const struct resource *r, const struct rman *rm) { return (r->__r_i->r_rm == rm); diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 70655339183b..323da4a62201 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -124,18 +124,18 @@ TAILQ_HEAD(rman_head, rman); int rman_activate_resource(struct resource *r); int rman_adjust_resource(struct resource *r, rman_res_t start, rman_res_t end); int rman_first_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end); -bus_space_handle_t rman_get_bushandle(struct resource *); -bus_space_tag_t rman_get_bustag(struct resource *); -rman_res_t rman_get_end(struct resource *); -device_t rman_get_device(struct resource *); -u_int rman_get_flags(struct resource *); -void *rman_get_irq_cookie(struct resource *); -void rman_get_mapping(struct resource *, struct resource_map *); -int rman_get_rid(struct resource *); -rman_res_t rman_get_size(struct resource *); -rman_res_t rman_get_start(struct resource *); -int rman_get_type(struct resource *); -void *rman_get_virtual(struct resource *); +bus_space_handle_t rman_get_bushandle(const struct resource *); +bus_space_tag_t rman_get_bustag(const struct resource *); +rman_res_t rman_get_end(const struct resource *); +device_t rman_get_device(const struct resource *); +u_int rman_get_flags(const struct resource *); +void *rman_get_irq_cookie(const struct resource *); +void rman_get_mapping(const struct resource *, struct resource_map *); +int rman_get_rid(const struct resource *); +rman_res_t rman_get_size(const struct resource *); +rman_res_t rman_get_start(const struct resource *); +int rman_get_type(const struct resource *); +void *rman_get_virtual(const struct resource *); int rman_deactivate_resource(struct resource *r); int rman_fini(struct rman *rm); int rman_init(struct rman *rm); @@ -143,7 +143,7 @@ int rman_init_from_resource(struct rman *rm, struct resource *r); int rman_last_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end); uint32_t rman_make_alignment_flags(uint32_t size); int rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end); -int rman_is_region_manager(struct resource *r, struct rman *rm); +int rman_is_region_manager(const struct resource *r, const struct rman *rm); int rman_release_resource(struct resource *r); struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, rman_res_t count, From nobody Tue May 21 23:59:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkWcl0RWJz5L6sm; Tue, 21 May 2024 23:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkWck7379z4lFR; Tue, 21 May 2024 23:59:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gUOb8RSSY32V9pulHMXADoZD1DmINIFkvWrP4Cyj0k=; b=ZraUXOCR1LzM5xD43d1Gq0E7Q1JN9Kqvz4CHAkG7Lv17qnqo+D3nEB8rNlPebL1M5X5RD+ 0l90ecR3RgC+HrS1wpEs/9r3Um/f11UDI3mtl+kUSj6jWCEXYfJY/KiIzNu4iNirakNNhj ORTbVzY7pDYPYwburJMOP8qwCxUn9yE543y+szM4nEEpHFcm2CD/a4ou9JkzSA2INTDBC4 5SszxsSlZgT3Wn69zcXBdLpLmqTwLoFLB0KGg1eRjeC8exuuLtVoyR7vNNeejsrpLTob4I XTm7Fgw9RFFRdIE4zoqtYeQqbN6fE7sTGSUVYiyYgLC81zWIt7jA4SCif9d1DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716335959; a=rsa-sha256; cv=none; b=XEPe+IU4XON8onEk2Tnz/J4XDu0vjUkKrmBWeNv8aRHJ2/RI4OPNpUh71yVLD8/Vch7RfY sD8sYepMo/RHz2wl0Kd/99TesRXJVgQ5hsSEfgYa5x2lVHIh1YhWq0JbNvl8CJBZ3lNh9c ZchJBZ0b8O4QncocFsk2lrIENltefDQq9g/cAojr+biyEVDeybQEVQORiRX2NU1CQWFVhw OM67esO3lCtgCSslSoPeQclZYRCMPOFxMWNIneETlL7+GNfdbOuxGhKHfcMCvz6RNha2ff ElUoKkykg2PjQSRrhLsAYI9srF25R4bRYP8djrlwkpYFNEd6bWrr8BGJ9gl95w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716335959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gUOb8RSSY32V9pulHMXADoZD1DmINIFkvWrP4Cyj0k=; b=iCa8UsbijeTLzuqTwHipAv80EkV396Ia8SIQ+rR5C9TgyEVg1Fq3Hqc9gmngUoaMTWjEO/ IIDOBag28+XllQEDVmyeGeNdRmPJOrdHjtbVSnVt5610JkuevJLqtbo0gFl62FI5K+wwFI vEMaj935G7SXme30drAetwmYOl9KNZLrN7Bl3M7o+3wy/v9hqzt079vdVUDQgD6ylku9kz kfqfqamyDRg+WiJHk/0ztgalu4635P8V/dBKrLZEwns8vEBg5Bs1FKe85G0TqXYXT+9/4o wTquLwTj2h2BninxJtcT4WNx7WHNkM+wEx0W6YebLWfJdOvZaeQX7N5UiSz6gw== 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 4VkWck6ZMMzjXD; Tue, 21 May 2024 23:59:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44LNxIT9032848; Tue, 21 May 2024 23:59:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44LNxIYv032845; Tue, 21 May 2024 23:59:18 GMT (envelope-from git) Date: Tue, 21 May 2024 23:59:18 GMT Message-Id: <202405212359.44LNxIYv032845@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: 25a04527b706 - main - linprocfs: Add support for proc/sysvipc/{msg,sem,shm} List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 25a04527b706577dac781fc249e3dbe948ccae60 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=25a04527b706577dac781fc249e3dbe948ccae60 commit 25a04527b706577dac781fc249e3dbe948ccae60 Author: Ricardo Branco AuthorDate: 2024-05-12 20:26:15 +0000 Commit: Warner Losh CommitDate: 2024-05-21 23:58:28 +0000 linprocfs: Add support for proc/sysvipc/{msg,sem,shm} Reviewed by: imp,kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1232 --- sys/compat/linprocfs/linprocfs.c | 137 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 391d5f679ee5..bfa2074a78d3 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2092,6 +2092,134 @@ linprocfs_domax_map_cnt(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/sysvipc/msg + */ +static int +linprocfs_dosysvipc_msg(PFS_FILL_ARGS) +{ + struct msqid_kernel *msqids; + size_t id, size; + int error; + + sbuf_printf(sb, + "%10s %10s %4s %10s %10s %5s %5s %5s %5s %5s %5s %10s %10s %10s\n", + "key", "msqid", "perms", "cbytes", "qnum", "lspid", "lrpid", + "uid", "gid", "cuid", "cgid", "stime", "rtime", "ctime"); + + error = kern_get_msqids(curthread, &msqids, &size); + if (error != 0) + return (error); + + for (id = 0; id < size; id++) { + if (msqids[id].u.msg_qbytes == 0) + continue; + sbuf_printf(sb, + "%10d %10lu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n", + (int)msqids[id].u.msg_perm.key, + IXSEQ_TO_IPCID(id, msqids[id].u.msg_perm), + msqids[id].u.msg_perm.mode, + msqids[id].u.msg_cbytes, + msqids[id].u.msg_qnum, + msqids[id].u.msg_lspid, + msqids[id].u.msg_lrpid, + msqids[id].u.msg_perm.uid, + msqids[id].u.msg_perm.gid, + msqids[id].u.msg_perm.cuid, + msqids[id].u.msg_perm.cgid, + (intmax_t)msqids[id].u.msg_stime, + (intmax_t)msqids[id].u.msg_rtime, + (intmax_t)msqids[id].u.msg_ctime); + } + + free(msqids, M_TEMP); + return (0); +} + +/* + * Filler function for proc/sysvipc/sem + */ +static int +linprocfs_dosysvipc_sem(PFS_FILL_ARGS) +{ + struct semid_kernel *semids; + size_t id, size; + int error; + + sbuf_printf(sb, "%10s %10s %4s %10s %5s %5s %5s %5s %10s %10s\n", + "key", "semid", "perms", "nsems", "uid", "gid", "cuid", "cgid", + "otime", "ctime"); + + error = kern_get_sema(curthread, &semids, &size); + if (error != 0) + return (error); + + for (id = 0; id < size; id++) { + if ((semids[id].u.sem_perm.mode & SEM_ALLOC) == 0) + continue; + sbuf_printf(sb, + "%10d %10lu %4o %10u %5u %5u %5u %5u %jd %jd\n", + (int)semids[id].u.sem_perm.key, + IXSEQ_TO_IPCID(id, semids[id].u.sem_perm), + semids[id].u.sem_perm.mode, + semids[id].u.sem_nsems, + semids[id].u.sem_perm.uid, + semids[id].u.sem_perm.gid, + semids[id].u.sem_perm.cuid, + semids[id].u.sem_perm.cgid, + (intmax_t)semids[id].u.sem_otime, + (intmax_t)semids[id].u.sem_ctime); + } + + free(semids, M_TEMP); + return (0); +} + +/* + * Filler function for proc/sysvipc/shm + */ +static int +linprocfs_dosysvipc_shm(PFS_FILL_ARGS) +{ + struct shmid_kernel *shmids; + size_t id, size; + int error; + + sbuf_printf(sb, + "%10s %10s %s %21s %5s %5s %5s %5s %5s %5s %5s %10s %10s %10s %21s %21s\n", + "key", "shmid", "perms", "size", "cpid", "lpid", "nattch", "uid", + "gid", "cuid", "cgid", "atime", "dtime", "ctime", "rss", "swap"); + + error = kern_get_shmsegs(curthread, &shmids, &size); + if (error != 0) + return (error); + + for (id = 0; id < size; id++) { + if ((shmids[id].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0) + continue; + sbuf_printf(sb, + "%10d %10lu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n", + (int)shmids[id].u.shm_perm.key, + IXSEQ_TO_IPCID(id, shmids[id].u.shm_perm), + shmids[id].u.shm_perm.mode, + shmids[id].u.shm_segsz, + shmids[id].u.shm_cpid, + shmids[id].u.shm_lpid, + shmids[id].u.shm_nattch, + shmids[id].u.shm_perm.uid, + shmids[id].u.shm_perm.gid, + shmids[id].u.shm_perm.cuid, + shmids[id].u.shm_perm.cgid, + (intmax_t)shmids[id].u.shm_atime, + (intmax_t)shmids[id].u.shm_dtime, + (intmax_t)shmids[id].u.shm_ctime, + 0, 0); /* XXX rss & swp are not supported */ + } + + free(shmids, M_TEMP); + return (0); +} + /* * Constructor */ @@ -2241,6 +2369,15 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(dir, "max_map_count", &linprocfs_domax_map_cnt, NULL, NULL, NULL, PFS_RD); + /* /proc/sysvipc/... */ + dir = pfs_create_dir(root, "sysvipc", NULL, NULL, NULL, 0); + pfs_create_file(dir, "msg", &linprocfs_dosysvipc_msg, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "sem", &linprocfs_dosysvipc_sem, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "shm", &linprocfs_dosysvipc_shm, + NULL, NULL, NULL, PFS_RD); + return (0); } From nobody Wed May 22 02:20:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkZlg0M12z5LLWR; Wed, 22 May 2024 02:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkZlf33n0z3wvd; Wed, 22 May 2024 02:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716344430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0gLqwFYfGEU1/XwFz1n7grKOE7AckNrvihkMdKTXe8=; b=mc07SNwLdln2OatiWTbeoFLwfNqMaEAc6HWzxpfwGUxJko+wKf2DSjWX9qvSZZzV8BWNu0 c51/KtLs8c/vXDYI1s/JGf6qwU+H+F9YTHq+dIq+O/gU5ZM7AO15tkkfB91GeWoxk4j5Zi gVTXrv7eazMJy9+ZdgVHBTEwfpARo3UmF931+pXy/Lrg4tuWqdUI2R+HgawAiLzhy4RQUZ qroxy/+d9/LRXEXKn31WdlAcCj4ZGRZ/E84BShTrsRCM2q4N/cdpoaDPHz2N0sXn0w9TDR wipLWzyRm+2dNqTjphTT+fJH0M4bvGSLTqN9DZhg0pt3QH1HCbBDcW5oVVVPhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716344430; a=rsa-sha256; cv=none; b=XuQikzonLn2Bu64pi3o4OSTjnOBicSbipvUHy/jEFc3hm2imgVOp1mvdxPGk2TdXOTRcEI WY+t+qleqk9wVLE3WmZQiLVQxfFXVDFPdc0n4TPmm2kmgfFe1chBq3y1UOaGaJARDifJGa 7ueDOvU669fZ+V2bDr3JJJNbYRbiXy+YaCY0jcwcHwHZYx1mgAVxx8AiodecBDYFHtVJ7Z dO4RNiiBMzS8pCakIphe4EV7Kuzirg7fZ7K3IxpS6/P+ltLzo6AGgXwX1P8Ub+kKPxUy7E r/YJSmhj3E6TUq+dKs0sJucM3KxKlGpgRHn3lIbdr23KgTsD/hPdXiVje/H0Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716344430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0gLqwFYfGEU1/XwFz1n7grKOE7AckNrvihkMdKTXe8=; b=psF0nSl8ANWS3wCFDXUvroGTxReAStegbTzmCEpDsEkkCxmSC1evLsFFqgTKyXocafx5et h+R7enSlYUmHeyim/2+F3XbwPmrAGEJ4eH1F+4DHuUULtifpVwMtYoAfuy/j0rbOLTV3+n 1rblnT/E7Ki/5aHyBqP+0ED7YdfeqkEb1NY8aVFujQH+a2TawDcIQzXaC2x7oIK++Zr3la BIOW6Lz9UPn2JC8ebppRpl/BE69QjB/Nd+7Asjc9JyQ+v9RSz2/LGEZAPmrdfwI1FIr6Ki BggpMjq0lcw2WRmOXC59oMxlW8GFJkKb248DYb/K+vr5FwAV5w2YXauK7O9z7Q== 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 4VkZlf2gJtznKG; Wed, 22 May 2024 02:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M2KU9e077216; Wed, 22 May 2024 02:20:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M2KUBr077213; Wed, 22 May 2024 02:20:30 GMT (envelope-from git) Date: Wed, 22 May 2024 02:20:30 GMT Message-Id: <202405220220.44M2KUBr077213@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: 208f11e8063a - main - linprocfs: use %z for size_t arguments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 208f11e8063af7b52bddd4e7a179906e7e8c7ddf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=208f11e8063af7b52bddd4e7a179906e7e8c7ddf commit 208f11e8063af7b52bddd4e7a179906e7e8c7ddf Author: Warner Losh AuthorDate: 2024-05-22 02:01:58 +0000 Commit: Warner Losh CommitDate: 2024-05-22 02:03:08 +0000 linprocfs: use %z for size_t arguments 64-bit doesn't care or give a warning, but i386 compile complains (rightly) that these are size_t and need a %z modifier. Fixes: 25a04527b706 Sponsored by: Netflix --- sys/compat/linprocfs/linprocfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index bfa2074a78d3..617eb122291c 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2115,7 +2115,7 @@ linprocfs_dosysvipc_msg(PFS_FILL_ARGS) if (msqids[id].u.msg_qbytes == 0) continue; sbuf_printf(sb, - "%10d %10lu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n", + "%10d %10zu %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n", (int)msqids[id].u.msg_perm.key, IXSEQ_TO_IPCID(id, msqids[id].u.msg_perm), msqids[id].u.msg_perm.mode, @@ -2158,7 +2158,7 @@ linprocfs_dosysvipc_sem(PFS_FILL_ARGS) if ((semids[id].u.sem_perm.mode & SEM_ALLOC) == 0) continue; sbuf_printf(sb, - "%10d %10lu %4o %10u %5u %5u %5u %5u %jd %jd\n", + "%10d %10zu %4o %10u %5u %5u %5u %5u %jd %jd\n", (int)semids[id].u.sem_perm.key, IXSEQ_TO_IPCID(id, semids[id].u.sem_perm), semids[id].u.sem_perm.mode, @@ -2198,7 +2198,7 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS) if ((shmids[id].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0) continue; sbuf_printf(sb, - "%10d %10lu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n", + "%10d %10zu %4o %21zu %5u %5u %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n", (int)shmids[id].u.shm_perm.key, IXSEQ_TO_IPCID(id, shmids[id].u.shm_perm), shmids[id].u.shm_perm.mode, From nobody Wed May 22 02:45:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkbJT01XRz5LNKy; Wed, 22 May 2024 02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkbJS6KZVz41VV; Wed, 22 May 2024 02: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=1716345928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ezMmhhSUKujljubfTad+p/EoX+lZ6UVW2s+GmrWuta0=; b=nSCeKZ0LkIDq1rDlOJwesVE/nVVakB38PcC/HZ8aypby6GWP4u8xck5Cp4AStcrs6xOTLN VK5Lo55AxJ+inOL7UIG2BZUMgtpCgDKQwHO6Z0EXbKGIVFduNLX2e+GLdBefIfxIm/LDkk l1MfwBgJAlx4evcYYhEpTNodR3cDY+m7r8wQngtvFXa+ecWsUwiZpiJg5AY1BJlqn8SKDu hPJscEmeCkuHR8Nhcpbhpa+Pd6QKgbO8BgqSUZ5C/qhljuWQ6teczqCTZYsTmUjS3Gt5eo ygeVOKUGM+yA9i2DPcX1SUegZ/kE9p/moHvsBuaFdFWe5J9bSN4yxGDr6ehEkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716345928; a=rsa-sha256; cv=none; b=tSw+NN5lO5SYtnTPlMxY2HX1aRc0A/PHxTTeAzYUS6KJLHw4OtjItfKeCGRwWpspQuwAEv gMQi5bMcPhyRxpZO9k6TsHx1qcNXf7vc6RduLspjV9iUg2PnO5leAItBA7MHdLnyEbvQaU onsaByW26RceIkGYy2h0/H/tgdhsaNr02iHJwZBMG6RzwVXQ51m/1XOwp3OiZddE1hzpZ9 yrQAHCHepfy+Sw7okzWLaHwhNAmfWdGPRvdj10FaajDLDUGX63s76xyKrSkWNVwSPrKLzK L+l/Nuo6efQNGiLY/iUHI1Hxi7tsBPOXOkltphwxvGyCUlmIw4GrGBetJ+CSJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716345928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ezMmhhSUKujljubfTad+p/EoX+lZ6UVW2s+GmrWuta0=; b=PsM3lMKpnwiv4SXPkscpCYZONpsTMNggemc/ZnLuLUH/i+5K/2Mjyb9fLMe5MlXO1yHZJr Xd5lgjE3CxiuW3w47YKoDM62ubYd1CDEXMtmh4fdKR9YVUndjWGGbP2n6mDUEitBs9Spw6 ikM83TfeXdU2Te30VV2bdK/a6/mZQxW8O0ktDMSgfVMk83M57mg0WSFB3KKlEqTrXk8Ska OxMhwHrtVrSljB9vM648Mpk3AZLEH1awJkjqjeTrS3NvSHoj2rqUol9fPuRRYA/nNOXd6e 4ewC1AnuraQCoydTZAk5hGvObHAjbr3670N+taBQOb6Xs00M2iiclwcVAcrn3A== 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 4VkbJS5nrjznRy; Wed, 22 May 2024 02:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M2jSCa017820; Wed, 22 May 2024 02:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M2jSQp017817; Wed, 22 May 2024 02:45:28 GMT (envelope-from git) Date: Wed, 22 May 2024 02:45:28 GMT Message-Id: <202405220245.44M2jSQp017817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: dc501a9ec093 - main - Allow DEBUG_SH=rc:all to debug all rc.d List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc501a9ec093f73d9cbff666df4bf16cd5a358fd Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=dc501a9ec093f73d9cbff666df4bf16cd5a358fd commit dc501a9ec093f73d9cbff666df4bf16cd5a358fd Author: Simon J. Gerraty AuthorDate: 2024-05-22 02:44:20 +0000 Commit: Simon J. Gerraty CommitDate: 2024-05-22 02:44:20 +0000 Allow DEBUG_SH=rc:all to debug all rc.d Usually a bad idea but there are exceptions to every rule. Allso debugging all rc.d scripts or all with a given arg. --- libexec/rc/rc.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 16b2c9fc5e88..6ed9d24fdf5c 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1076,7 +1076,7 @@ run_rc_command() err 3 'run_rc_command: $name is not set.' fi - DebugOn rc:$name rc:$name:$rc_arg $name:$rc_arg + DebugOn rc:all rc:all:$rc_arg rc:$name rc:$name:$rc_arg $name:$rc_arg # Don't repeat the first argument when passing additional command- # line arguments to the command subroutines. From nobody Wed May 22 03:03:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkbjk28rfz5LQ19; Wed, 22 May 2024 03:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkbjk1fHXz42dv; Wed, 22 May 2024 03:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716347034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDczNObiLuSWXfecGuwZ1gdqm6KWwb/LS1+O/z3MI8Q=; b=vBnxR2p2Ixfo/PvOYRKLBhjSReIC+wh3jImHsmypP3c1e0VAiSkLn2nDPqqmbLy6/t67XA YJDvFhZgqfH1YWDYvJeqo3YPZYLChbfe4n3h4uKtG0HD2zKAHesiOcDrIqboNOM+KjYVnY d1qMsmGYlvTBzn3dXGBg+Il76gJSopyEoHDkZOTDn5ES+M+gHhuAK5ptFCE0YU3jZ6kgbj XjqTWb5ehRqGON5p9PnL9Bi7AYubW15d6094HlXlqIoLQuVLsllmWVr3q43LgV6sZIdv15 IEh3YYK5ly0a9QeUORdGu6tX9UjTvWJUM/u+Ww8QoXM4fQxvP1jZxWbdK5UjNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716347034; a=rsa-sha256; cv=none; b=AJpFDnzvitiapShrmKS+A39Jtxp+Y9BidGRt4OYLjOi8xXo4Qe76AhrK9jW51W/rTJUF/f 4MHrLpSbDTSbfj/0FRe+au6P4UE4aY758JIg26A/1S1skcBy1tgpMAv5pTGlJ3NE/+rFzd 1nj+Savdk5S0+HqPw1h4VLuZ6tYJFNrl1XdBb3tJ/EQuz9Ihz6vSR7MOT6dCsSVlcmkA56 B2OUWtPeFbnDRMn8w8Yps5GJF0WnDlVxWViq1RVDP93xK7HYLxhYmq55sXJky8ErsAUigL W63zQFYCGHVd/gZE8dlIxFyLLlPHisq90Q1yKe5yeuusWUHOpXaUXI+HO62wAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716347034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDczNObiLuSWXfecGuwZ1gdqm6KWwb/LS1+O/z3MI8Q=; b=LWQOYTGGAMZiuWc1NSnK4Lva7QqPI+xu/RPAmpWJknRwlc6RBqDPdu+v7fpqTml4MJ6Xan P4APNYQa1pBzjpZYL096HNAGjltseZOlmAlDq6baHyJSaW90vxO3VuCeMsN6kc6kIrO5Ma bCV0riq5hWjnmWi7qLq7mQTa+twE+Xhc7DrzGBIw4QMOCzyV0arBZlAwtKFLyd6opiVaq9 Pm8RYDh9txqWDGPEV8FEw7gXgVe1GZCh0FQrjJc3IiSNrQOB1+LcLHHrqVivhfVspmM44c xyDGz6t8peGSMD5L2kwI3eWxh7JQAHde59Hv3I8vJhbpcctCtUQHat9C8JpfaQ== 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 4Vkbjk1FXPzpHJ; Wed, 22 May 2024 03:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M33snm053441; Wed, 22 May 2024 03:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M33s8c053438; Wed, 22 May 2024 03:03:54 GMT (envelope-from git) Date: Wed, 22 May 2024 03:03:54 GMT Message-Id: <202405220303.44M33s8c053438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 31223e68e299 - main - Simplify the code. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31223e68e299cc7dbef4573adb368918f260b6ef Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=31223e68e299cc7dbef4573adb368918f260b6ef commit 31223e68e299cc7dbef4573adb368918f260b6ef Author: Pawel Jakub Dawidek AuthorDate: 2024-05-19 01:58:14 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2024-05-22 03:01:24 +0000 Simplify the code. Obtained from: Fudo Security Reviewed by: asomers, imp Approved by: oshogbo (mentor) Differential Revision: https://reviews.freebsd.org/D45247 --- sys/fs/fuse/fuse_vnops.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 3f8f3322162a..925838c89bcb 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2248,19 +2248,14 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) return (err2); if (vap->va_uid != old_va.va_uid) return err; - else - accmode |= VADMIN; drop_suid = true; - } else - accmode |= VADMIN; - } else - accmode |= VADMIN; + } + accmode |= VADMIN; } if (vap->va_gid != (gid_t)VNOVAL) { if (checkperm && priv_check_cred(cred, PRIV_VFS_CHOWN)) drop_suid = true; - if (checkperm && !groupmember(vap->va_gid, cred)) - { + if (checkperm && !groupmember(vap->va_gid, cred)) { /* * Non-root users may only chgrp to one of their own * groups @@ -2274,11 +2269,8 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) return (err2); if (vap->va_gid != old_va.va_gid) return err; - accmode |= VADMIN; - } else - accmode |= VADMIN; - } else - accmode |= VADMIN; + } + accmode |= VADMIN; } if (vap->va_size != VNOVAL) { switch (vp->v_type) { From nobody Wed May 22 03:57:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkcvM2PY2z5LVDZ; Wed, 22 May 2024 03:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkcvM1rQXz47Ms; Wed, 22 May 2024 03:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716350239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lc7vUzjV0kCfel4VUi/rbDlk0RTsEd+Hcw6zxQ4aXr0=; b=ZTupjAUw7ONqQIkvGob5RAp6S2fXIN6LdY6TMQgxzRFPYffuNuzM/Txsncj8h9CxjrTURg 1gOOe6DL///d8Cp/LypCeOq1erEHArX5pWRhbXtWMV26PV4MskAGdqiWAlI6jfLgNcwtcC q+t3UPvQ++dQ2/GLGHM0Y86cUAeRiItLwx6Nsgh7iANx0tFqEFRp3DdahW3Owyl3CBv/i7 p14iRDQJ38ZyRE3o5xXVOMAtb4h1TgGyJMiHWzRd1hbOXrWfExvmSca4r/jQRfF9Ei9eDa 6LP+OPTuViylTzbZcTqsHoSAQ0FdzihLTij1agq/1hlFcz775p3QjXrGnBeY+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716350239; a=rsa-sha256; cv=none; b=ZGU6q5hy7iJqdG8qiqLAmedxrBcCUzoDOE5x2eO9mdJxdLdnJ8EMgmJOf8pHyAo/5x+ohB gc18JIv0X1tg/m62M74SD7k/VrzJH/O46M5DPyEwU1ChIs2k04BzyVaFu58/d9Ce4e6oHR 0+KyXIww73tev47u7bu6XfHcPdCjoOm6o41bW5PL3omubmCKh9VRkz++pbz7UIrjSxTd5Y 6JmKT2Fhu2MuhkUZLb/mvuUizbW5VspVI9VV3JlKKl2DzFi9ZMdJ0fX9oNqnL/lLWOkx4t l87kcyq2H4BT2oPEQvsN48odyjC+yvpM+niWRVFU3DNMdMGARtXwimSygJizig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716350239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lc7vUzjV0kCfel4VUi/rbDlk0RTsEd+Hcw6zxQ4aXr0=; b=nS0YDMyczUplMTvsxNfnMhq5uUQXY7Dv8+3jF14iVa7rYVUSetEeGhjAv1rg217Nd+kNu0 vWXJhQYNtel86LCnrz8rIq+KPocLkdsjBU5XOORz4tjo1i9uc7/BKW//X834Rk8eLtYC0M 2hUawpRqtaYkYyWkJHz5umsPkUdEDK28K6KPpyfaytdFIQPHuAUarokXBeGbmosbsIXivm 6FJxgS90sIiD0AlSX445mYZw9MdVaHHkTCGaLBw1m6IYJfMQWxIsDBtylzH2e8rbWdWAcy 302jdfU4dxp5psdcW59Yd5wzs7a0Zz2k9ppFMG0kZx09KIJqxlOr/3847aKZCA== 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 4VkcvM1RmQzqdm; Wed, 22 May 2024 03:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M3vJvT038038; Wed, 22 May 2024 03:57:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M3vJpk038035; Wed, 22 May 2024 03:57:19 GMT (envelope-from git) Date: Wed, 22 May 2024 03:57:19 GMT Message-Id: <202405220357.44M3vJpk038035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: ff4fc43afdea - main - Fix build. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff4fc43afdeaadac0d40ca46850ba2e863e0c8d3 Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=ff4fc43afdeaadac0d40ca46850ba2e863e0c8d3 commit ff4fc43afdeaadac0d40ca46850ba2e863e0c8d3 Author: Pawel Jakub Dawidek AuthorDate: 2024-05-22 03:56:59 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2024-05-22 03:56:59 +0000 Fix build. --- sys/fs/fuse/fuse_vnops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 925838c89bcb..eb07861c04ba 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2249,6 +2249,7 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) if (vap->va_uid != old_va.va_uid) return err; drop_suid = true; + } } accmode |= VADMIN; } @@ -2269,6 +2270,7 @@ fuse_vnop_setattr(struct vop_setattr_args *ap) return (err2); if (vap->va_gid != old_va.va_gid) return err; + } } accmode |= VADMIN; } From nobody Wed May 22 04:52:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkf7J1yzMz5LZKV; Wed, 22 May 2024 04:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkf7J1SQsz4Jqv; Wed, 22 May 2024 04:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716353564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YvKjEYHXkQ2u02I1K9h+f3VSqKv2QVXrMOhoB1D3ZTM=; b=TZNQOHz/nnos1FY+4lQgiSXuciGTjn5Mga/Mspo7x9CkTAf7e+zn0oH13S+VKgCrMd7Rax mAvmwyxUZ0OxZfuIGtATRIqnH2tnHnhku7QYm0ifi0W/yz8Tyg9OdMMQ8TFiysrd/r+6P/ HR9D76ww4z4xSDhV5vwvoMYSefPt00R8l97Dpb5BJ7+yNdveHE3RCbbMBMGetrj+VYErbI Upzcy3XBG5HZ4CDhe1q5PE69aD0Yt4WEGXO1i+4X6FXi0PdbbKtGCOYZZzCRiBEPApfj/I uo+YTDoe3O2k0w0xftD4zlZx53K7z4QsTXmGNPcbfg/zULRxZyAZmJDtm3N7/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716353564; a=rsa-sha256; cv=none; b=KKsUQbjZy5S/dmlTn8KPfdCMM/kJsq6tZq4Xy930Iwpx5AgV7ajHIx2p2JxW3ZR9h9W5fq na2vVkV3uhS9pIkAhhVT19sDCcdzUeJIrFjImPH53rK9x3a1Qe8K//br+4go81BPiLNO5F 6Z25QtWoKSfb2wigsECiV0V9VHGv8tto/HfapQd4KtYmbMp4yYkYfCdKVKctUM1JS+qAdg arN1cSZ70FwzCiQqglnTjIVM7ISIpn0YXb0jF17v2Qya17Om5VNEbkrR23kUwCwgFIaZ7O TkSprw1eLNQbY3DukoCGQIb6+7yyMD+WFEaRxdUo1sLezhVhkHBQ1gk+dagEBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716353564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YvKjEYHXkQ2u02I1K9h+f3VSqKv2QVXrMOhoB1D3ZTM=; b=CR+I/JJbO2fbqrZkP8vD++8w8kXT/pg0LDn3op0sW7px3k8xSQVoeqxUeh2dS/EDawMeDs WOWTT2OZo3d+nKLKc1vB2TkRD66FfLvL9tBf5vJ9eME4d8AsWXB4WRqmQWHH+oJefrwEn4 JBtt6EYHBr5YLYKGrFB6qxUKjLXFaQBGAhBm2zyPtboO1IRGHwrWrJ01af16jSmOJPM4Vx zNZTcOLQLpZNTHICk6C8aYJwZ+IKwBBp6j9eYwJ++qEtEbasIkNNrl/XTbm22maauTeSE6 58YzqE5N1i8fR6x+SB+C24V3G/Rb1NIfK8Enn9FP7Qi0JBzkrGzAgZHozW9R4Q== 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 4Vkf7J0zydzs4l; Wed, 22 May 2024 04:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M4qiAG038938; Wed, 22 May 2024 04:52:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M4qiYt038935; Wed, 22 May 2024 04:52:44 GMT (envelope-from git) Date: Wed, 22 May 2024 04:52:44 GMT Message-Id: <202405220452.44M4qiYt038935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 61e3e1776d40 - main - capsicum: SIGTRAP is delivered also on ECAPMODE error. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61e3e1776d400c72cbdc521212bf932ed11be507 Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=61e3e1776d400c72cbdc521212bf932ed11be507 commit 61e3e1776d400c72cbdc521212bf932ed11be507 Author: Pawel Jakub Dawidek AuthorDate: 2024-01-22 21:37:04 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2024-05-22 04:51:50 +0000 capsicum: SIGTRAP is delivered also on ECAPMODE error. Approved by: oshogbo (mentor) --- sys/kern/sys_capability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sys_capability.c b/sys/kern/sys_capability.c index d59ad37f35ec..e71dc4f3285b 100644 --- a/sys/kern/sys_capability.c +++ b/sys/kern/sys_capability.c @@ -85,7 +85,7 @@ bool __read_frequently trap_enotcap; SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RWTUN, &trap_enotcap, 0, - "Deliver SIGTRAP on ENOTCAPABLE"); + "Deliver SIGTRAP on ECAPMODE and ENOTCAPABLE"); #ifdef CAPABILITY_MODE From nobody Wed May 22 05:37:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkg7S2v1Pz5Ldvt; Wed, 22 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkg7S1rfbz4MjY; Wed, 22 May 2024 05:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716356276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lIXKGB1097VhDp5BjTWnHspxl9/YjEXSiDVJ7C/azfQ=; b=N3a1w8wP+XcYtCw5HyyWmKsTik+8FdbP/SfmppgbNKOK7Kyfi31bj7bZRb3g5+Mq0XVurM v3MSxrI+9BFZGsMDZdKngGAXFf/1ttpw11jQxESlapCpqm1HfE+fdg97oOk6fIlskIqF7D RuofkxLT1H09YLpIHhzYxdnOUra/9GrMJMBvSz8WtyYtiK9IgT2EKFOSDLuNt0JWfuSo5U CCuibwVXTAF8x9VbBTTyFwJattIj9EmzMo5Gd1mWkOmTMvVLl/nMPTRKjNunEcOqqXdGHV TCMd896/26UaW7qH1keb3wblAsqMFuRAfKyV+sZR4wg7tiaiIPlZdWJ5Kv5ooA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716356276; a=rsa-sha256; cv=none; b=utCis846XAEC5UlimoJTMpMAYzPj0fFG6t9w6Q/KHp7Ok4iSjPE3pz0wU9cvT2Qkwj0Gcm t8F2Yv0jCiN0Sa7rUCIyTX9y4/SK4X4nrMiA9HtfbJ1paMCTJVBf3TkXglyjlwm8TlkJI7 oJl1cxlyQwd8TvJIuTf2kovvhTJbGn57NQanneGg315jP9zEZfDrLLHGQ8Cf3hlE3sIygZ Is0cz1ULeI5uDcFSRD9Qq3wdYAiJMJGSCupJRjm+EUrKfjY8VRLAVatRconcNXbLmYypAR j6kWbEb7Cf59mzBqVlmoYvA2mSbsEQn39Vxk1hEafnL5cuOvU3RSIQsKiOoYTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716356276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lIXKGB1097VhDp5BjTWnHspxl9/YjEXSiDVJ7C/azfQ=; b=bk88tL6Q3HO6opalKF5y//i/CpDA0+tV75DfL4m82xWzXfrVhk+cRQwk459uTHvoBfcdfc 5xicKEA5efyWB+e9Huvsf0dqQDRGAXZGPTmK6PN5JFE3BbRTojp17JT050d7uvEfTWHB4V QqpHTGNQCOQ9iKoi+4fMKx6YFuMbeAVToo1rb79irk/gAa/673bRlRN8WFjyslx/L5+Fvt 0w1vFq9VqQjOnnBRBS9hprg6ci6gANS0RCBC1ukEGFSL/LD4iuZ9nY0eReot3qUEHNcUoE 6fvEMxPmwKhpM1UfuT1nGh4AvrWKIWLWLYJdvBJSkCmglXLeu3A1RWMZKYiLkA== 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 4Vkg7S1S2LzswM; Wed, 22 May 2024 05:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M5bu6c007295; Wed, 22 May 2024 05:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M5bugu007292; Wed, 22 May 2024 05:37:56 GMT (envelope-from git) Date: Wed, 22 May 2024 05:37:56 GMT Message-Id: <202405220537.44M5bugu007292@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: 6e824f371301 - main - time: siginfo_recvd needs to be marked volatile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6e824f3713011f7955a4f88fb16445e8e2cbe72c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6e824f3713011f7955a4f88fb16445e8e2cbe72c commit 6e824f3713011f7955a4f88fb16445e8e2cbe72c Author: Kyle Evans AuthorDate: 2024-05-22 05:36:29 +0000 Commit: Kyle Evans CommitDate: 2024-05-22 05:37:41 +0000 time: siginfo_recvd needs to be marked volatile sig_atomic_t does not imply volatility, we must do it ourselves to avoid caching of siginfo_recvd loads. Sponsored by: Klara, Inc. --- usr.bin/time/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 92148ab2e35b..4c1ce06543e3 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -54,7 +54,7 @@ static void showtime(FILE *, struct timespec *, struct timespec *, static void siginfo(int); static void usage(void) __dead2; -static sig_atomic_t siginfo_recvd; +static volatile sig_atomic_t siginfo_recvd; static char decimal_point; static struct timespec before_ts; static int hflag, pflag; From nobody Wed May 22 06:52:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkhn32DP8z5L2l7; Wed, 22 May 2024 06:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkhn31fX4z4SQ3; Wed, 22 May 2024 06:52:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716360727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NYxT1FvcEp/SgFT4YYy6Ati8wjA36qsfocI3K4QXU4=; b=LHzQa0ce5LhsAqKhrckxnHUmkR0CuL0bqj9ggcj7wJgIl7hXpSWkkepjfD1QpGZcgzfuZK URGcVLWu2QdMb1mCbd3944BkXczX/q/9yKyoNM7hlp/aXvnUa3K6nc/klEHaBFjN7QF6a2 Zx81PAmoHGN7QZ/mUDc4GeFAFGvYrFQE5+RWwI4PmOBNQ3LjPQz5dQjrU2OZcIVL6KSepg dSlf8GvZkINAl8R7oFm3DMfvYWo0b6xHkljJTiAUk7FNIBzgKEeZbrjwCavub0WXBf3GHn 61TPvnrzj9r+SBMALPO9jIUdXNwpsS4mWq4Hi3lOMYXnHq6yUNGlsdKHcEvOkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716360727; a=rsa-sha256; cv=none; b=HAP7tx5lgK1dTykFF85y9HUZ3uNDbr1pmAAHPtCaVDcBMGMrOAP3wLnqfDkbBJKmFHhFjp fCTLVrluzY/5MzxUNB7TkqaLmZMExigcpkHKOpxK50YhS321HC4ibrHGEjRCfpstdIIdgf t+R79fZA/FxGeGs+D7r92hAF91MuKmzZReRPvNkwsnhZWrkHiD/hXtYfjI+yYIDNjOSfdP iAkMPkyUb+buir1nJYacTI5Wr2ZueSZKxk1I7E9uNhUrK8LnQLRgRIl5AjznaqcazG7YWB Kz1FLEKODtknLNjNkN/8U+A4P5z9eA4JF2M0nrCiZhZ8ZE1KEj1psmbHdIqouA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716360727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4NYxT1FvcEp/SgFT4YYy6Ati8wjA36qsfocI3K4QXU4=; b=oCcux7OC94NdDPmIZcl8lHp7I/Vz0GxNxyCV6Ef1jbUcJQB+FOPMPBVo15oPYESJ658io3 v8yKyx3O/e3Riq8AdVFWhJr1sBYYMkJOCmZfT4O+8gH99+KzqFenydtc7/mlfUI7bgKHtO 4EE+4Ll7++PPRuWNvRs5ftdOQIP7PJqrYIeJ4jhZEJ9ZlATfi9IhHeBeX+aCyBOb0lG15V qPw5YecPZu6MtM8cRgOPdLoltB5ZYMJSBFZgxiALzzpFe+TfAYx6dgzTtLsT/QjbEhkkxp fI5Qm/maQ0PHYpa30obEemP23oO6icWNw/xYWQYvS7TmZ8ht820A+27OnXK68g== 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 4Vkhn31C5xzvp2; Wed, 22 May 2024 06:52:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M6q7BI040352; Wed, 22 May 2024 06:52:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M6q76w040349; Wed, 22 May 2024 06:52:07 GMT (envelope-from git) Date: Wed, 22 May 2024 06:52:07 GMT Message-Id: <202405220652.44M6q76w040349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 5601feb7204b - stable/14 - fix (nuageinit): SSH keys are not handled in metadata but in userdata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5601feb7204b2ebb4c351b534105da8fc22213fd Auto-Submitted: auto-generated The branch stable/14 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5601feb7204b2ebb4c351b534105da8fc22213fd commit 5601feb7204b2ebb4c351b534105da8fc22213fd Author: Jeremy Collin AuthorDate: 2024-05-21 14:52:23 +0000 Commit: Baptiste Daroussin CommitDate: 2024-05-22 06:51:33 +0000 fix (nuageinit): SSH keys are not handled in metadata but in userdata MFC After: 1 day (cherry picked from commit 48edad2edf6eb7a539e40dad8e1f87e3fa4973fd) --- libexec/nuageinit/nuageinit | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 08224061d1b1..df637bbc5064 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -164,13 +164,6 @@ if citype == "config-2" then nuage.err("nuageinit: error parsing config-2: meta_data.json: " .. err) end local obj = parser:get_object() - local sshkeys = obj["public_keys"] - if sshkeys then - local homedir = nuage.adduser(default_user) - for _,v in pairs(sshkeys) do - nuage.addsshkey(root .. homedir, v) - end - end nuage.sethostname(obj["hostname"]) -- network From nobody Wed May 22 07:41:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkjsw5jsnz5L7bq; Wed, 22 May 2024 07:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkjsw4VrDz4b9f; Wed, 22 May 2024 07:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rk4+f8/ahlGsC6GYzdLW82W1iGLhRL4iR67iOpihzao=; b=SIYGaVZ4ob03pDkTYP0Q0Yq1R8nG11z6SyuLG5vn4a9Qnvg7WzuuzjNY+Eth9LrqoHS02R o9mP8Pl9i7pybnVZ2g99Ujt0tNVnG/9zNU2o3YHheaYxgaQiC1lKNdmzXarIqwu9nRNLer d4FIKP9l9zc8XljpgaJ7swXyWldrXXZtVheZRhcjEe0LLF3ySg8IqkAORp7XnHmy+dqU2t vzcFrb062dncOPdTO2qXcF8x8HCgrOXkpiD5bLnP1EJfBJ6vILlVeb5uVsQuAlR3VSxuQh J6FIPfoPnAotSxIAYeLHk7AumZz1GxoAJW/bW23TJ4NVXK9HMMQ+oMzqI8wCcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716363684; a=rsa-sha256; cv=none; b=JJ2brLEehdMiLLY7OcLg+8peOSCnU/C5dCTOia0WQIqDAB4cTOTBiWIO7qnOPN+c0cinyC Jj3eFSfyHpWVQnlMFMDUSh692PpRhNUXZ1qazPmLbM0labXsST2L6osVblB00QNP75x6ZS A4PWVL6WZ2VfJOPeRmnphF97lYeGKZYasU58S4URMGfL+iuSthz+BtBgG/fBQPYsnWDhT8 bcSX7LMqUbYDxCgfXw9eh/9ehERQ7DiX+ubKT5w3pxhLxbU95PozPRfbfhBDV+QNwAs2e9 F2dAu6+T6DE9tbSwE+45Z8G9iL65+Qg+fiMGizF3udoTktKdpkGxMQJ+SfNZRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rk4+f8/ahlGsC6GYzdLW82W1iGLhRL4iR67iOpihzao=; b=Kws2J9ASOHQbPCtQeRiI1QYwpwCDHjCKeyss6Om9Wrw45csefnPvTk1jq+52YKdVCsywZs UBUK/nAooi1u5KJBZZlAUxyLVBlG5EwkcheuW0SyVSimdtj7TJvbEdlJ47LTzGe97zcIKX kMXdBo4oO/YbP6n9jCIqxeN9Vqx4SrgyUQYJ1vjQX2cLsFSL92L06tEbEJ/i4Xk2+YptvL XpU3TWUEz98egDCHtX8zp6y6oqi5UrfkOnMmoqBHv4ykBP3Gj+SJoBxJ9blLgEhKC1DwIl V++nA25xCORFRJIK/T2RyjpiYUnsMYLt0ByARoEyKvvcPpTjmv2OvSSuLJT4bw== 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 4Vkjsw3qFczwl4; Wed, 22 May 2024 07:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M7fOEe019905; Wed, 22 May 2024 07:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M7fOne019902; Wed, 22 May 2024 07:41:24 GMT (envelope-from git) Date: Wed, 22 May 2024 07:41:24 GMT Message-Id: <202405220741.44M7fOne019902@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: bdd12889eaa6 - main - if_vlan: handle VID conflicts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: bdd12889eaa64032b3d09ef47e9a6f7081863378 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bdd12889eaa64032b3d09ef47e9a6f7081863378 commit bdd12889eaa64032b3d09ef47e9a6f7081863378 Author: Kristof Provost AuthorDate: 2024-05-21 11:31:13 +0000 Commit: Kristof Provost CommitDate: 2024-05-22 07:08:02 +0000 if_vlan: handle VID conflicts If we fail to change the vlan id we have to undo the removal (and vlan id change) in the error path. Otherwise we'll have removed the vlan object from the hash table, and have the wrong vlan id as well. Subsequent modification attempts will then try to remove an entry which doesn't exist, and panic. Undo the vlan id modification if the insertion in the hash table fails, and re-insert it under the original vlan id. PR: 279195 Reviewed by: zlei MFC atfer: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D45285 --- sys/net/if_vlan.c | 10 ++++++++++ tests/sys/net/if_vlan.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index b69d8107e30d..788fdf787249 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1715,10 +1715,20 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid, ifv->ifv_proto = proto; if (ifv->ifv_vid != vid) { + int oldvid = ifv->ifv_vid; + /* Re-hash */ vlan_remhash(trunk, ifv); ifv->ifv_vid = vid; error = vlan_inshash(trunk, ifv); + if (error) { + int ret __diagused; + + ifv->ifv_vid = oldvid; + /* Re-insert back where we found it. */ + ret = vlan_inshash(trunk, ifv); + MPASS(ret == 0); + } } /* Will unlock */ goto done; diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh index 458e3cc36bc6..41dac6222cbb 100755 --- a/tests/sys/net/if_vlan.sh +++ b/tests/sys/net/if_vlan.sh @@ -297,6 +297,42 @@ bpf_pcp_cleanup() vnet_cleanup } +atf_test_case "conflict_id" "cleanup" +conflict_id_head() +{ + atf_set descr 'Test conflicting VLAN IDs, PR #279195' + atf_set require.user root +} + +conflict_id_body() +{ + vnet_init + + epair=$(vnet_mkepair) + + vnet_mkjail alcatraz ${epair}b + vlan_a=$(jexec alcatraz ifconfig vlan create) + vlan_b=$(jexec alcatraz ifconfig vlan create) + + jexec alcatraz ifconfig ${vlan_a} vlan 100 vlandev ${epair}b + jexec alcatraz ifconfig ${vlan_b} vlan 101 vlandev ${epair}b + + atf_check -s exit:1 -o ignore -e ignore \ + jexec alcatraz ifconfig ${vlan_a} vlan 101 + + atf_check -s exit:0 -o match:"vlan: 100" \ + jexec alcatraz ifconfig ${vlan_a} + + atf_check -s exit:0 -o ignore -e ignore \ + jexec alcatraz ifconfig ${vlan_a} vlan 100 +} + +conflict_id_cleanup() +{ + vnet_cleanup + +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -306,4 +342,5 @@ atf_init_test_cases() atf_add_test_case "qinq_dot" atf_add_test_case "qinq_setflags" atf_add_test_case "bpf_pcp" + atf_add_test_case "conflict_id" } From nobody Wed May 22 07:45:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkjz30VVcz5L88K; Wed, 22 May 2024 07:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkjz303ZYz4bmL; Wed, 22 May 2024 07:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MjIW6zOIGl/Y5HG7RH+pHPNXPwA292ovP4mDinNDFwE=; b=H0waCKkYtE8iDlwsfxCRAnOKjrmYq9HFDF3pF3KWDwR+j4fGuxWGmRY9ObEfPgaRy053BT wA6d5lPTtN8hZpnoK+c7HGVNTCgkxhjwudi22o8Lv2RV+k21XwPvLhc6dYxOP9CGmR1bHo MgpBjgMq4Q1O1NufTFR4PP4w57+aOVbgDpXWXSE9xF6Yo+6rtc5h3Cj9EEPQPQuM3crVac DNUr9Z1mqAUDwfzKCTZk+qyHEG+fO8lM4U+wIUnwzbTWZtzcqaJyBbm2RNaPJH1g/oGPem fs219HgEfZsEmMEZzKE6pmKybPkmvHcUciLNu4k2ovb1doUchi3w0jorLZA7uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716363951; a=rsa-sha256; cv=none; b=wj3dHb5PNRs4cWXMVSY2wkq3OL+tYfxD/Rsi/8vZ1HaWeeMcasT0L7yMqoAi7K7Ma/2lQS NOP7opJFwL/pnuMmiRevqNYiuPJQ8LXzKMiIm8Ln1a7eBv2FMTY06sbta6mSTiwSSS9Qqt XXpMb1KfHBbjonyb2N1zMjchIXRU4iN8K57lopvB3w71IbS6kIoehJaz5QyzaOpPMJquYd /VvOELJ0dky+dG03AlCwstsEeLgrJ3UM4io4bahwKi5l2WUGY4MrQy9oHI+bo1rwm5E1TH uBwRYTy6pMe1orLJh4ohdAEu81bLxgAQq29FAOl5FrJQpZiHOPjuZXHAj71oFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716363951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MjIW6zOIGl/Y5HG7RH+pHPNXPwA292ovP4mDinNDFwE=; b=hfnG0ztOfB6Cr0roA3yTOklIVcn6unvV07XRgEO4GEfhu813sArixegOWfdu0HxgNHmkmn FWgkucYkJTS0sttTvVH9bacpuSp5nFS5bprn8EyNmgrcLaBFEW0LHYwcE4k0xhjtjnW2Tu Fp5W958ymBEGn+Q8ULwD+BcRjT0rfmhbOPqYe2/ho8/D2fnI88QmPMdOSpbgN1zKqtal00 hGRXfISLHZkyY4zsyiRTT+fXg3I8EG6vo3+0ZNY6cwW1xHouOULsmvbVr0U3G8q3MHeTzj uB1vwtH8UDMJtpWhYdrwnjsp+tFQy/waVGSPASizJSzhuqpQkJ460th2ahqxUA== 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 4Vkjz26SqPzxBf; Wed, 22 May 2024 07:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M7jofD026253; Wed, 22 May 2024 07:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M7josw026250; Wed, 22 May 2024 07:45:50 GMT (envelope-from git) Date: Wed, 22 May 2024 07:45:50 GMT Message-Id: <202405220745.44M7josw026250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Juraj Lutter Subject: git: 7618c9e1637c - main - daemon: Add -C (--restart-count) option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7618c9e1637caea97723ff8accd60f3dc436b044 Auto-Submitted: auto-generated The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/src/commit/?id=7618c9e1637caea97723ff8accd60f3dc436b044 commit 7618c9e1637caea97723ff8accd60f3dc436b044 Author: Juraj Lutter AuthorDate: 2024-04-25 13:40:00 +0000 Commit: Juraj Lutter CommitDate: 2024-05-22 07:45:23 +0000 daemon: Add -C (--restart-count) option Add a new option (-C, --restart-count) to specify the maximum number of times that the controlled process is restarted if restart (-r) is restarted. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44944 --- usr.sbin/daemon/daemon.8 | 19 ++++++++++++++++--- usr.sbin/daemon/daemon.c | 25 ++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index 4fafb8528f18..52fbc230ac77 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 27, 2023 +.Dd April 25, 2024 .Dt DAEMON 8 .Os .Sh NAME @@ -43,6 +43,7 @@ .Op Fl T Ar syslog_tag .Op Fl l Ar syslog_facility .Op Fl R Ar restart_delay_seconds +.Op Fl C Ar restart_count .Ar command arguments ... .Sh DESCRIPTION The @@ -55,6 +56,17 @@ log file. .Pp The options are as follows: .Bl -tag -width indent +.It Fl C , Fl -restart-count Ar restart_count +Restart the process at most +.Ar restart_count +times. +When zero is specified, +.Nm +will exit. +The maximum restart count is +.Cm 128 . +This option is used together with option +.Fl -restart . .It Fl c , Fl -change-dir Change the current working directory to the root .Pq Dq Pa / . @@ -72,8 +84,9 @@ Close and re-open it when signal .Dv SIGHUP is received, for interoperability with -.Xr newsyslog 1 -and similar log rotation / archival mechanisms. If +.Xr newsyslog 8 +and similar log rotation / archival mechanisms. +If .Fl -output-file is not specified, this flag is ignored. .It Fl l , Fl -syslog-facility Ar syslog_facility diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 26e34d1d2e2b..7214faf8bde3 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -56,6 +56,9 @@ /* 1 year in seconds */ #define MAX_RESTART_DELAY 60*60*24*365 +/* Maximum number of restarts */ +#define MAX_RESTART_COUNT 128 + #define LBUF_SIZE 4096 enum daemon_mode { @@ -92,6 +95,8 @@ struct daemon_state { bool restart_enabled; bool syslog_enabled; bool log_reopen; + int restart_count; + int restarted_count; }; static void restrict_process(const char *); @@ -109,7 +114,7 @@ static void daemon_exec(struct daemon_state *); static bool daemon_is_child_dead(struct daemon_state *); static void daemon_set_child_pipe(struct daemon_state *); -static const char shortopts[] = "+cfHSp:P:ru:o:s:l:t:m:R:T:h"; +static const char shortopts[] = "+cfHSp:P:ru:o:s:l:t:m:R:T:C:h"; static const struct option longopts[] = { { "change-dir", no_argument, NULL, 'c' }, @@ -121,6 +126,7 @@ static const struct option longopts[] = { { "child-pidfile", required_argument, NULL, 'p' }, { "supervisor-pidfile", required_argument, NULL, 'P' }, { "restart", no_argument, NULL, 'r' }, + { "restart-count", required_argument, NULL, 'C' }, { "restart-delay", required_argument, NULL, 'R' }, { "title", required_argument, NULL, 't' }, { "user", required_argument, NULL, 'u' }, @@ -139,6 +145,7 @@ usage(int exitcode) " [-u user] [-o output_file] [-t title]\n" " [-l syslog_facility] [-s syslog_priority]\n" " [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]\n" + " [-C restart_count]\n" "command arguments ...\n"); (void)fprintf(stderr, @@ -152,6 +159,7 @@ usage(int exitcode) " --child-pidfile -p Write PID of the child process to file\n" " --supervisor-pidfile -P Write PID of the supervisor process to file\n" " --restart -r Restart child if it terminates (1 sec delay)\n" + " --restart-count -C Restart child at most N times, then exit\n" " --restart-delay -R Restart child if it terminates after N sec\n" " --title -t Set the title of the supervisor process\n" " --user -u <user> Drop privileges, run as given user\n" @@ -198,6 +206,13 @@ main(int argc, char *argv[]) case 'c': state.keep_cur_workdir = 0; break; + case 'C': + state.restart_count = (int)strtonum(optarg, 0, + MAX_RESTART_COUNT, &e); + if (e != NULL) { + errx(6, "invalid restart count: %s", e); + } + break; case 'f': state.keep_fds_open = 0; break; @@ -331,6 +346,12 @@ main(int argc, char *argv[]) state.mode = MODE_SUPERVISE; daemon_eventloop(&state); daemon_sleep(&state); + if (state.restart_enabled && state.restart_count > -1) { + if (state.restarted_count >= state.restart_count) { + state.restart_enabled = false; + } + state.restarted_count++; + } } while (state.restart_enabled); daemon_terminate(&state); @@ -723,6 +744,8 @@ daemon_state_init(struct daemon_state *state) .keep_fds_open = 1, .output_fd = -1, .output_filename = NULL, + .restart_count = -1, + .restarted_count = 0 }; } From nobody Wed May 22 07:55:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkkBc5LPCz5L9Fn; Wed, 22 May 2024 07:55:52 +0000 (UTC) (envelope-from lexi@le-fay.org) Received: from fuchsia.eden.le-Fay.ORG (fuchsia.eden.le-fay.org [IPv6:2001:8b0:aab5:107::11]) by mx1.freebsd.org (Postfix) with ESMTP id 4VkkBc4SYVz4d1F; Wed, 22 May 2024 07:55:52 +0000 (UTC) (envelope-from lexi@le-fay.org) Authentication-Results: mx1.freebsd.org; none Received: from iris.eden.le-Fay.ORG (iris.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::6]) by fuchsia.eden.le-Fay.ORG (Postfix) with ESMTP id 19A732C447; Wed, 22 May 2024 07:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=le-fay.org; s=fuchsia; t=1716364552; bh=ffGlMRZPAj4dR+KZomi0jpUWZrk65WvS9k0lbZKhgrg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=vTT6nUDFs6vw6plBHf4tVSZiK5D2f0oytJHzcYupV2gkZNcMYnsu4M9aKxHU4eeS5 70VQzrzB3wm2mIK0nXnWp6x29gPpqMJtxoC/i2QBXiEl4irKrliZaTupx+xB8+W8XK J+8ebLfBXe1qzk6UCO1Q4uCgenFAEU6gyGElmuC8= Received: from ilythia.eden.le-fay.org (ilythia.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by iris.eden.le-Fay.ORG (Postfix) with ESMTPSA id A0A462C04D8; Wed, 22 May 2024 08:55:52 +0100 (BST) Date: Wed, 22 May 2024 08:55:51 +0100 From: Lexi Winter <lexi@le-fay.org> To: Mariusz Zaborski <oshogbo@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ay5cg3YZlD96aRyp" Content-Disposition: inline In-Reply-To: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> X-Spamd-Bar: ---- 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:20712, ipnet:2001:8b0::/32, country:GB] X-Rspamd-Queue-Id: 4VkkBc4SYVz4d1F --Ay5cg3YZlD96aRyp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Mariusz Zaborski: > The branch main has been updated by oshogbo: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D408957613bc065c4444812c3ae= 276ace03697ebd >=20 > commit 408957613bc065c4444812c3ae276ace03697ebd > Author: Mariusz Zaborski <oshogbo@FreeBSD.org> > AuthorDate: 2024-05-21 20:02:50 +0000 > Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> > CommitDate: 2024-05-21 20:03:20 +0000 >=20 > Regen > --- > sys/compat/freebsd32/freebsd32_sysent.c | 2 +- > sys/kern/init_sysent.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) i'm sorry if this is considered accepted practice in FreeBSD (i'm not a committer) but could i please request more useful commit messages than "Regen" for things like this? when looking through 'git log', especially 'git log --format=3Doneline', it's really not clear what this commit actually does, meaning if i'm looking through the log for commits related to a problem i'm having, i have to examine commits like this by hand to see if they're related. it would save me (and other people, i suppose) a lot of time if the commit message could at least mention what it's touching, e.g. "Regen sys/compat/freebsd32/freebsd32_sysent.c". --Ay5cg3YZlD96aRyp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmZNpQUACgkQDHqbqZ41 x5mN9wwAm63A4aPyITZ5NYp8Mclqd+IHubROEahjfJWr0CxccYbW4n8h7oR03ze8 nyraXV8WZT+zb5Kr7l0MQ5QOfPmgKG3NpCgBo+5OfST/9jXrv7SOzjhjSJSqoFSp AvSeF3cmsPgQHwUnQmJsOgUEZ3G4zY4AufAOhhgqXOSbNqMqvzkSGMoJsuRlFmFi /l8cwAcCgzDa8Sj8u3zNFjkRqPCT4cWBg74fWpmM9i7mxAQtbDv4Sz1KIPNZfczW m15XEoG0DSSvpiH25om8+78an65rKzrd8caLfJ2ZNWsDBW9ebb8TlwsXtbAysmj/ rMRfFi/2b/2RY17Wn1sL5OszSG463HOpjJhr1vVkeWk4NN/7PbARd5xe+xC1cvTG M79tHj1NUGUeKleNTvFzdZO/1sfwHzq1vnva0FhesVNOtoBD//PXANAJx2Xqu4TB GN8bPT3w7bhuelSTrI4EmeH6PgitI25L81ikkWfRLbDKi1hnBI1UxMDICK8U5Usw 57sfGxwB =R2ou -----END PGP SIGNATURE----- --Ay5cg3YZlD96aRyp-- From nobody Wed May 22 08:31:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0D1c7Lz5LDCQ; Wed, 22 May 2024 08:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0D16Xqz4j6n; Wed, 22 May 2024 08:31:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CS5YAAEiDjntgLrdfvG5POuPjSlhXUMdEOThsQUNdX0=; b=hB0K7NOvHBLemGqUR6yHkY0FPb6Actd5t9IfM8F451UKMHQURPPKS2epg8/yRi5YSVevSb dN6Vjue8zqffLCf5fM/Ld3+sdcSR0es3brIakTCuM48bLf0W4EBsmZUvnepnsZPQ5ySxND S1gj8TXKeWvQS6Y34Xr5Pe8pihWN7nd1Z6oKjzCktX1Gh75puq27lNxoPnI7o6eBETxf8L T7nal8NSuxKFe7CIIWPV3UKH8HdVJJPTOSpSnvDmW3EoNq8ql+gt92pr8WNJYjwTqKRCfY w9gxNvcYcMdO7CW3IMfhz9ousr+iJ/Hno2QRwPnkZXhF21g8LoFY6EFGc0WY9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366716; a=rsa-sha256; cv=none; b=JtHMYb1HJXXgajRs+DJM8lSysZeaFcn8LonAo917xXcb8+PXdy9m5cfWAy5uutfz1ETYAK 8kPck8a612H7r6k4NGA609PGYh0BRgjvKRj2uw8OsSipJfYjQmfXDvn3mX5BVhSW302EzL 890L5Zgv2e18gxzRyuIukEEnE+/Q/3WAlHIDZsI1qTe900mQHWwpp7IY4S7OO0ULlmajPt 7udeSyeFXWO04GnHb3XzWYC8JzdDhZWbJ9PgWq2Yyg90CJ26lOTAJHChVNw5+edplsUFb6 0TSNIxi9RFt9CfWlBNjOrWLIV/bchFO+JiY/ROky4giyJLP3UJzSydpJT8mrjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CS5YAAEiDjntgLrdfvG5POuPjSlhXUMdEOThsQUNdX0=; b=PiNfoUlyj15yufaM/75AiHw5c3pfhh/FFZydj1LkAWtQRw4UQme6beleHYixu7jlhIstAa baww0AYCH3Al9kRZ/zoSNUs/SNOw/Lh5I7iYzWUmQdGAHRYCMHHfFE22fK3LvSnaixXKaF jqNxRRGjQBi3CvQLCpJMDn9iF6E0nDO0sH0IFr49tHLtJX6fsbne3dsjVOWZDewKj5/1Ds UTMCki/ydik6f34vjR7gqzFURYLxGmE8vaw7WjdjtcA+78PDkfeXVCw+kMyT+aGxdLmGX3 +1YtJWZ8t1uin7b63zVIet5OAHziTHlBCDGwXdZfapqRYhW6eMQHfY3UYOGN9g== 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 4Vkl0D0kLZzxpG; Wed, 22 May 2024 08:31:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8Vue4008667; Wed, 22 May 2024 08:31:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vuqt008664; Wed, 22 May 2024 08:31:56 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:56 GMT Message-Id: <202405220831.44M8Vuqt008664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 9f44638ef2c4 - main - stand/efi: Fix for binutils when targeting arm64 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9f44638ef2c46861565b89bb01bbeeab17755649 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9f44638ef2c46861565b89bb01bbeeab17755649 commit 9f44638ef2c46861565b89bb01bbeeab17755649 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:17:26 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:17:26 +0000 stand/efi: Fix for binutils when targeting arm64 When linking with ld.bfd it complain with the following: /usr/local/bin/aarch64-unknown-freebsd14.0-ld: start.o: relocation R_AARCH64_ABS32 against `__data_size' can not be used when making a shared object Fix this by marking the __data_size with ABSOLUTE. This returns a non-relocatable value which appears to be the same behaviour of lld. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45257 --- stand/efi/loader/arch/arm64/arm64.ldscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/arch/arm64/arm64.ldscript b/stand/efi/loader/arch/arm64/arm64.ldscript index 18aead05cb49..889a1bafb9f7 100644 --- a/stand/efi/loader/arch/arm64/arm64.ldscript +++ b/stand/efi/loader/arch/arm64/arm64.ldscript @@ -68,7 +68,7 @@ SECTIONS . = ALIGN(16); .dynsym : { *(.dynsym) } _edata = .; - __data_size = . - __data_start; + __data_size = ABSOLUTE(. - __data_start); /* Unused sections */ .interp : { *(.interp) } From nobody Wed May 22 08:31:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0F3D46z5LD06; Wed, 22 May 2024 08:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0F1t98z4j6q; Wed, 22 May 2024 08:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F69tYcE7FA71GpWO5ITAtaYNy/fzZwq/D8nMQCBJI8s=; b=v7RQSnQS+K3pA9c3Ed/G4VbeQsZN7DI4g/XaW6naBplFui71IZVkTuGCL/d9SgmpmUtpkq jm3M2NfWZTuQ4ZCUyI1n6RditEx6gr+wizXRZTinFjeqMrSyGpkki5AgPV7Vr3ZKetBFjr EnvYB2RpHWPSRwrK2goZ4h8lEiCAz1HJrjr2Hnvg+LUyJbZ687GhuOJWB35bBdDX4bMoM1 IH9weC/YTdiMksRlHpdKB1BBllnkUenL6qNkGkG/QF0KiXGxNx4EOnl4O3joVSPsoPVLEj wNIaBOcUtNq9mfb/guFNMBzRCaBbTcMGvbJHFAnWimu6ra/8aGCS8bsG7FVFrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366717; a=rsa-sha256; cv=none; b=cg87x48exSpqOwHP84lJewa2/gezEszc55vdTLHqcFndQld0+OF1t/z5xWt35OwbAFgnd2 SJ9TefFoxd/1TAKx2Gv7cT4Gg9mxfuec+dpgzKz/YYnJjwCPEUT6e3HR5K69ZOrvkcOfbT acNCDc2Q4+UUuAfkdoiYNSsfQfJuBQpbTADM0UloQNSPbl2RfOjOF1Ouibd8LjED+K27L6 YZoRDRCq5w7CSwePNWpI7EIf9px0CNfaTiU75kmHFmJwCf3//A/7BEHey8fmc/z4lS7thT vStZu5NZEGi+1MP0L5l9DxUFvFV/kQ68WojDbDteAisf7idvamL8zCysOl+0zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F69tYcE7FA71GpWO5ITAtaYNy/fzZwq/D8nMQCBJI8s=; b=DqH5MoYH6jitDI7yToL8pv4z9c7P8JJs0paGb71MpigptAueiNkg9Fwystgp9XKxS3cCLc WcjIytiiEoIrzzlPbSub6+QlHPYuzHnePQaKAyPEQdipbJuQ0r6Yy8YVPpw+5SUBd5U4i5 QLQvKjeVbvaBDdpURO62NTs/jEKflcCZT1t7jmhAMuL2trO5+t3Cc/jWurVVobGizHA/cy FpOxENLnItEi+mrq/hFSxr31iE51JRQOktERas1OUjiYy8GiJtKNbfA4xt/qTUaLW1zvgP LQ/+5pm67HOO1mBTB3nCeWBDQ+s6ougruW68XkjQS1cBU3dvtA+W99e7AuewRA== 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 4Vkl0F1TdWzyG0; Wed, 22 May 2024 08:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8VvbE008719; Wed, 22 May 2024 08:31:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vv9U008716; Wed, 22 May 2024 08:31:57 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:57 GMT Message-Id: <202405220831.44M8Vv9U008716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 8e82c5e28db6 - main - stand/kboot: Fix the linker script OUTPUT_FORMAT List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8e82c5e28db6fb19f75d10fd2e7c3db784723f1f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8e82c5e28db6fb19f75d10fd2e7c3db784723f1f commit 8e82c5e28db6fb19f75d10fd2e7c3db784723f1f Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:17:52 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:17:52 +0000 stand/kboot: Fix the linker script OUTPUT_FORMAT ld.bfd doesn't understand elf64-aarch64 but does have elf64-littleaarch64. Switch to this so we can link kboot with it. While here switch to the single format version. We are unlikely to support booting from a big-endian Linux. Reviewed by: imp, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45258 --- stand/kboot/kboot/arch/aarch64/aarch64.ldscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/kboot/kboot/arch/aarch64/aarch64.ldscript b/stand/kboot/kboot/arch/aarch64/aarch64.ldscript index 9460be1874bf..dd551247125b 100644 --- a/stand/kboot/kboot/arch/aarch64/aarch64.ldscript +++ b/stand/kboot/kboot/arch/aarch64/aarch64.ldscript @@ -1,4 +1,4 @@ -OUTPUT_FORMAT("elf64-aarch64", "elf64-aarch64", "elf64-aarch64") +OUTPUT_FORMAT("elf64-littleaarch64") OUTPUT_ARCH(aarch64) ENTRY(_start) SECTIONS From nobody Wed May 22 08:31:58 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0G6Tnrz5LD6w; Wed, 22 May 2024 08:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0G2lYjz4jBJ; Wed, 22 May 2024 08:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YE/QyoqyZpATJkmQb4fwQA+bml6r8dHPUS+QtXEsmc=; b=sXFYIyop0g4GMW/nkY8cmCyP3/qdefyKio9NX9gJcl0GZECZZ7D5Z5ykEfNRcyHg+ecEIQ N73RTzPVVrZEpxRlS13/H2KJ0p6Fg4V/dqNfyB/wS7JIiqnKacZYqcR2AqYS+ZOyKorcr1 x1asE9OJnfHch4Cxe+ec7+D2ze/IHCP2EIsI/kaCdzBY8h09BAdZjqPR01ekeC3GXfu1jT YMrocFGLDXUrK4li/w5wYVw67eXfM3FuI2K/yJIVmsREob/S9PERUbPM02fn+9N2L0CMhB M2tCuaJfXD0UOMJKzAYByOFeX8Rz2OpO0G8OMDWbeQBGDSVSIo1xscl0i0vwzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366718; a=rsa-sha256; cv=none; b=no/4VJLSZydYnycczKTICy/QkmN3Sbgc+6AC4/5OwdPU16zSUmuWl5y14CfSPg0l4GD561 e3Q8aY0i8i6X7fBbEKdZ66Q15kIyZeXPHlSaronwt0pC3KrbkUetYWA0FrDm+5RmNFjkEn ZDuJ+/hJr1/JzsMOl7qBnVcLR1vc+wpEj/3TIG1NT+CWEzYwjEA/dWwNhhisk6Wy6RaXzh TyYs1KWW2de7Hw9/WNC6DNQLSEHLJi8jNiMx2UOH1e8gn585yZ8BM1emufXKv+wM2Lf4Cd bhcBFFyvrdb3mWSjGCcPNTt+pUd+oVCZXGOhhSgem8HESus6k5qO7uFb806JIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YE/QyoqyZpATJkmQb4fwQA+bml6r8dHPUS+QtXEsmc=; b=NEGMgbmErEC3QSYKJ2PWXJ1pvGNmJKE41xwYZYQ3xoU7AZibh5ZlglDbkHIXXNzM7SJmEB BuMHwxDy1lmY1yWjk4f7/MhrmhBDKrI7aT/1RpASFPBc47kFvS0XdBcGVfWImrtVp/sxzz H3VWqAsLoSYuPzUkqTDckZysej+ELuNqfyd2YXjxAtsjXjuiVQOUUsdbKux77Ru7ldLOsG FBGsAhoS8OPUrrA/xB/9mRcOhtodt6rLXmdL0CVVLyJCLJcTX0sQWFlld7HtBBX73aBKOP fnh8c39JpWPO86+ryQOHHnOus3+CxDNaORTGckCJ/g26IN1jjxe57CJipCnvYQ== 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 4Vkl0G2MkJzyRs; Wed, 22 May 2024 08:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8VwrL008770; Wed, 22 May 2024 08:31:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vwax008767; Wed, 22 May 2024 08:31:58 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:58 GMT Message-Id: <202405220831.44M8Vwax008767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 53120fbb6895 - main - csu: Find the main pointer through the GOT List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 53120fbb68952b7d620c2c0e1cf05c5017fc1b27 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=53120fbb68952b7d620c2c0e1cf05c5017fc1b27 commit 53120fbb68952b7d620c2c0e1cf05c5017fc1b27 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:10 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:10 +0000 csu: Find the main pointer through the GOT Use the Global Offset Table to find the location of main in crt1. With lld the old code would point to main@plt, however ld.bfd fails to link when main is in a shared library. Fix this by using the GOT address to find main as it works with both lld and bfd. Reviewed by: jrtc27 Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45259 --- lib/csu/aarch64/crt1_s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/csu/aarch64/crt1_s.S b/lib/csu/aarch64/crt1_s.S index 981cf4653efd..1fb60f756a7a 100644 --- a/lib/csu/aarch64/crt1_s.S +++ b/lib/csu/aarch64/crt1_s.S @@ -44,8 +44,8 @@ ENTRY(_start) add x2, x1, x0, lsl #3 /* env is after argv */ add x2, x2, #8 /* argv is null terminated */ #ifdef PIC - adrp x4, main - add x4, x4, :lo12:main + adrp x4, :got:main + ldr x4, [x4, :got_lo12:main] #else ldr x4, =main #endif From nobody Wed May 22 08:31:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0H5FYgz5LD08; Wed, 22 May 2024 08:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0H3RmGz4jDr; Wed, 22 May 2024 08:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DECalKj5ot6reNhIRYo2nA/XKIpl1h5RQ7rq7d6SXX8=; b=Hj708paaSaVgUzlLUmVPKZP4msWxXKQGV1ppbI8t7HZGlJjr6CrygCADZPX+uCgtmyzwA2 9g2TgujcqdghAM0D0/o0GMyfp9lmJAWnj/LN0c9jxWiTmgniXDsg1j0G8WheVCVAbnNSk1 JYATxBU/63J5PZ8xuGjClsnGtkKRoj7PSAeIcYBYsNpYjX0FUl7geyslZzYF08lQaa5XTc F07Uwsmrc4EQNqsMXS7olASMcepy4VjPYOMKhoYCs2/NnAULRmfABNqvptl5hCgSrMHHRy lqU5xuZOmPdDbNJ/RC7kKAgvGB0notmTjs58LQUcYYfuI5VCk32P6CoO6h/rQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366719; a=rsa-sha256; cv=none; b=ctiVzYoH7Xz5DdetTBAHlYRZD9MKGs4L1bKi/lDWK7o/EZFFnsKBtSKIogoPWQdYDhMwpN fiIoKReneMb4p/CLvE+ZdCy/pdY0jfTder0/IWM7cFCHN8A0fOyTGa1bFe1ZBLmW4HaM1x tekLzKnlDMEnS5qAk0rIZMUmpNDBShQwnL4ytzeN9huQedS4TYJO0a7FUMMBeaF/WA5+Gn IunNUruvf7j63BB4X2A+DzYa9ZP28G/8mEmy3s4SQfhtNXd0P21qb17SyhmEvNzzicYpLE 3eijDhlV2zYA0yYoD/r8LMMppiyhINvEfKpOfgBLzdcu90Bq9KAyEKzjT5cP+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DECalKj5ot6reNhIRYo2nA/XKIpl1h5RQ7rq7d6SXX8=; b=oK2a1XNScLzojkXqRVUO9UM1JS/4/jA9YcA3PenV5wSbFAqlZTyg/oAnUNEpkyqUsxxN1T pKIHkC8e3XpH/T/4NTGqWoR+jAYWjm7SfUpmnJhc2dBJcyWZ5AtpQax9keuQNV375bnmfH i0l+n2m6g+A8Agq0k/sfo9CrMR877adi2ujJn6mifGOfUdmZj+BiuJgxYQax8hI5bn9KQC ftLPLQnScBjLulWclkIyc7E8qEibu/JCocs/xju1O/lSLkwE133yH+wgQJmnwBF5k1Y7Lo pPYXtA/pVZhL8mPjAjhxyt+bR/YuTm1k2dtxuj9KcdnIcNydPSRS0OWn5qNCow== 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 4Vkl0H345pzyhW; Wed, 22 May 2024 08:31:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8VxIU008810; Wed, 22 May 2024 08:31:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8Vx61008807; Wed, 22 May 2024 08:31:59 GMT (envelope-from git) Date: Wed, 22 May 2024 08:31:59 GMT Message-Id: <202405220831.44M8Vx61008807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 940155d24afb - main - sys/sys: Fix __builtin_is_aligned fallback List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 940155d24afb5c80ce7fde59c856c5c0d5c6dbe1 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=940155d24afb5c80ce7fde59c856c5c0d5c6dbe1 commit 940155d24afb5c80ce7fde59c856c5c0d5c6dbe1 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:26 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:26 +0000 sys/sys: Fix __builtin_is_aligned fallback When the compiler doesn't provide __builtin_is_aligned we use macro as a fallback. The macro was missing brackets around one argument. This could lead to incorrect results when the argument is more complex than a single stagement. Fix this by adding the needed brackets. Reviewed by: brooks, imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45260 --- sys/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index a6545a29a302..037dfa55f923 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -902,7 +902,7 @@ /* Provide fallback versions for other compilers (GCC/Clang < 10): */ #if !__has_builtin(__builtin_is_aligned) #define __builtin_is_aligned(x, align) \ - (((__uintptr_t)x & ((align) - 1)) == 0) + (((__uintptr_t)(x) & ((align) - 1)) == 0) #endif #if !__has_builtin(__builtin_align_up) #define __builtin_align_up(x, align) \ From nobody Wed May 22 08:32:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0J6sgkz5LD09; Wed, 22 May 2024 08:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0J4vqRz4jSl; Wed, 22 May 2024 08:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUc/Do33OzDsJRWhcbweIzfOl9y/A/04boeGmVwLyJU=; b=uQV0iq9pYft/C2hu35HUlEaY0cXAOEc7TX/6DMNi0gwt97K5vE942taVLLWJNuY00/k8RE edX5foOXNDxCQiuPguZznwiV+ws7d0tq4ClKld8xRfjwbBRA/fJSiU6AnCX2We3bYfdaZ+ b6MrgewlvEhS5tdYjabinyun2qP1za4Eg3HJ46y+875dP3w8lopMaweP4C2YF8qxduHi2S ZDy9nrVDGMofhKlIOgtBUKn4Dd2i5XZMB9mSW12Npiyr/Mv4h5vI8kHAQqEVsXaW2apbtJ AtE2+PQHuQoX8dDdsBIJYKTEvvb8VxxNVtl4iDr4aQVOm0biJQE9Q1BMLjJS0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366720; a=rsa-sha256; cv=none; b=Og6WFSMRpEcwj6gwvE8BbDP/KjA0KOWSg0GqYO8eFGwrYi1gnUXxQnl+Gr2MDuoKSlc+xH W2qf2SeOBPbWezW6oroTUUkK/SmGkZlM/r/R0/Z4zdUZkPFmJworGCuTY6T7pfl3TvmHjc DOQnRGU5xSC6hJHxwtvtsbexnkoLNjrAn7gtMf412jPAy/F0M5eW6iU2M8+IFc+0/SC9iz 6ilGMsmXS6Q/6nbEuiWmohhsiL4ZMHuWzTuYu2Qjr+xft6C3OpEy/mxD9/O6JC/4fIBini /q1bTNEkJ++SC8Xmsm3+xDIlnoRspKnLquVoM2j87/QlVtW1iBCd542kgzzUsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUc/Do33OzDsJRWhcbweIzfOl9y/A/04boeGmVwLyJU=; b=yFbgFmmonKeGkXmYXktSPQjovnN7DsnMa4PVyeCc+FCqPsMs/hONNovcuIIwJQCStGY8rb bezqOmRd1vmfm62kzMtazomS6DoDK7e66cCB0RkHfkMFBDtTwxDCe7S+YwwFvSybjQkEPy LZBLPqlWPFz8iBt27Gvmw0fxjzE5GC5RaCyTZ+apCsLAoljt2dR3R329dhyVPgeyJuRqW0 rvn0Z0FzUbSfaZ/fE4Md5JgsVGKu0d5SMgxILPdnMBgDOb7qAVw/6Lvq/1I6eDo4gsX5r0 leeS8TYMTqujKmwm6+/sylRSFLIiAG8CZfqLL6QpTSANoUWIsxPT5fXCkxxYEA== 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 4Vkl0J4TjzzyhX; Wed, 22 May 2024 08:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8W0mW008873; Wed, 22 May 2024 08:32:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W0T9008870; Wed, 22 May 2024 08:32:00 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:00 GMT Message-Id: <202405220832.44M8W0T9008870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 29c1cf9860e5 - main - arm64: Use the UL macro in TCR_EL1 defines List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 29c1cf9860e531146220d9dc3596e4c79f91cfcd Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=29c1cf9860e531146220d9dc3596e4c79f91cfcd commit 29c1cf9860e531146220d9dc3596e4c79f91cfcd Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:39 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:39 +0000 arm64: Use the UL macro in TCR_EL1 defines While clang can handle numbers with a UL suffix in assembly files gcc/gas is unable to. Switch to use the UL macro for TCR_EL1 defines as some are used in locore.S Reviewed by: brooks, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45261 --- sys/arm64/include/armreg.h | 96 +++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index d1480cd61184..2af207a40009 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -2151,99 +2151,99 @@ /* TCR_EL1 - Translation Control Register */ /* Bits 63:59 are reserved */ #define TCR_TCMA1_SHIFT 58 -#define TCR_TCMA1 (1UL << TCR_TCMA1_SHIFT) +#define TCR_TCMA1 (UL(1) << TCR_TCMA1_SHIFT) #define TCR_TCMA0_SHIFT 57 -#define TCR_TCMA0 (1UL << TCR_TCMA0_SHIFT) +#define TCR_TCMA0 (UL(1) << TCR_TCMA0_SHIFT) #define TCR_E0PD1_SHIFT 56 -#define TCR_E0PD1 (1UL << TCR_E0PD1_SHIFT) +#define TCR_E0PD1 (UL(1) << TCR_E0PD1_SHIFT) #define TCR_E0PD0_SHIFT 55 -#define TCR_E0PD0 (1UL << TCR_E0PD0_SHIFT) +#define TCR_E0PD0 (UL(1) << TCR_E0PD0_SHIFT) #define TCR_NFD1_SHIFT 54 -#define TCR_NFD1 (1UL << TCR_NFD1_SHIFT) +#define TCR_NFD1 (UL(1) << TCR_NFD1_SHIFT) #define TCR_NFD0_SHIFT 53 -#define TCR_NFD0 (1UL << TCR_NFD0_SHIFT) +#define TCR_NFD0 (UL(1) << TCR_NFD0_SHIFT) #define TCR_TBID1_SHIFT 52 -#define TCR_TBID1 (1UL << TCR_TBID1_SHIFT) +#define TCR_TBID1 (UL(1) << TCR_TBID1_SHIFT) #define TCR_TBID0_SHIFT 51 -#define TCR_TBID0 (1UL << TCR_TBID0_SHIFT) +#define TCR_TBID0 (UL(1) << TCR_TBID0_SHIFT) #define TCR_HWU162_SHIFT 50 -#define TCR_HWU162 (1UL << TCR_HWU162_SHIFT) +#define TCR_HWU162 (UL(1) << TCR_HWU162_SHIFT) #define TCR_HWU161_SHIFT 49 -#define TCR_HWU161 (1UL << TCR_HWU161_SHIFT) +#define TCR_HWU161 (UL(1) << TCR_HWU161_SHIFT) #define TCR_HWU160_SHIFT 48 -#define TCR_HWU160 (1UL << TCR_HWU160_SHIFT) +#define TCR_HWU160 (UL(1) << TCR_HWU160_SHIFT) #define TCR_HWU159_SHIFT 47 -#define TCR_HWU159 (1UL << TCR_HWU159_SHIFT) +#define TCR_HWU159 (UL(1) << TCR_HWU159_SHIFT) #define TCR_HWU1 \ (TCR_HWU159 | TCR_HWU160 | TCR_HWU161 | TCR_HWU162) #define TCR_HWU062_SHIFT 46 -#define TCR_HWU062 (1UL << TCR_HWU062_SHIFT) +#define TCR_HWU062 (UL(1) << TCR_HWU062_SHIFT) #define TCR_HWU061_SHIFT 45 -#define TCR_HWU061 (1UL << TCR_HWU061_SHIFT) +#define TCR_HWU061 (UL(1) << TCR_HWU061_SHIFT) #define TCR_HWU060_SHIFT 44 -#define TCR_HWU060 (1UL << TCR_HWU060_SHIFT) +#define TCR_HWU060 (UL(1) << TCR_HWU060_SHIFT) #define TCR_HWU059_SHIFT 43 -#define TCR_HWU059 (1UL << TCR_HWU059_SHIFT) +#define TCR_HWU059 (UL(1) << TCR_HWU059_SHIFT) #define TCR_HWU0 \ (TCR_HWU059 | TCR_HWU060 | TCR_HWU061 | TCR_HWU062) #define TCR_HPD1_SHIFT 42 -#define TCR_HPD1 (1UL << TCR_HPD1_SHIFT) +#define TCR_HPD1 (UL(1) << TCR_HPD1_SHIFT) #define TCR_HPD0_SHIFT 41 -#define TCR_HPD0 (1UL << TCR_HPD0_SHIFT) +#define TCR_HPD0 (UL(1) << TCR_HPD0_SHIFT) #define TCR_HD_SHIFT 40 -#define TCR_HD (1UL << TCR_HD_SHIFT) +#define TCR_HD (UL(1) << TCR_HD_SHIFT) #define TCR_HA_SHIFT 39 -#define TCR_HA (1UL << TCR_HA_SHIFT) +#define TCR_HA (UL(1) << TCR_HA_SHIFT) #define TCR_TBI1_SHIFT 38 -#define TCR_TBI1 (1UL << TCR_TBI1_SHIFT) +#define TCR_TBI1 (UL(1) << TCR_TBI1_SHIFT) #define TCR_TBI0_SHIFT 37 -#define TCR_TBI0 (1UL << TCR_TBI0_SHIFT) +#define TCR_TBI0 (UL(1) << TCR_TBI0_SHIFT) #define TCR_ASID_SHIFT 36 #define TCR_ASID_WIDTH 1 -#define TCR_ASID_16 (1UL << TCR_ASID_SHIFT) +#define TCR_ASID_16 (UL(1) << TCR_ASID_SHIFT) /* Bit 35 is reserved */ #define TCR_IPS_SHIFT 32 #define TCR_IPS_WIDTH 3 -#define TCR_IPS_32BIT (0UL << TCR_IPS_SHIFT) -#define TCR_IPS_36BIT (1UL << TCR_IPS_SHIFT) -#define TCR_IPS_40BIT (2UL << TCR_IPS_SHIFT) -#define TCR_IPS_42BIT (3UL << TCR_IPS_SHIFT) -#define TCR_IPS_44BIT (4UL << TCR_IPS_SHIFT) -#define TCR_IPS_48BIT (5UL << TCR_IPS_SHIFT) +#define TCR_IPS_32BIT (UL(0) << TCR_IPS_SHIFT) +#define TCR_IPS_36BIT (UL(1) << TCR_IPS_SHIFT) +#define TCR_IPS_40BIT (UL(2) << TCR_IPS_SHIFT) +#define TCR_IPS_42BIT (UL(3) << TCR_IPS_SHIFT) +#define TCR_IPS_44BIT (UL(4) << TCR_IPS_SHIFT) +#define TCR_IPS_48BIT (UL(5) << TCR_IPS_SHIFT) #define TCR_TG1_SHIFT 30 -#define TCR_TG1_MASK (3UL << TCR_TG1_SHIFT) -#define TCR_TG1_16K (1UL << TCR_TG1_SHIFT) -#define TCR_TG1_4K (2UL << TCR_TG1_SHIFT) -#define TCR_TG1_64K (3UL << TCR_TG1_SHIFT) +#define TCR_TG1_MASK (UL(3) << TCR_TG1_SHIFT) +#define TCR_TG1_16K (UL(1) << TCR_TG1_SHIFT) +#define TCR_TG1_4K (UL(2) << TCR_TG1_SHIFT) +#define TCR_TG1_64K (UL(3) << TCR_TG1_SHIFT) #define TCR_SH1_SHIFT 28 -#define TCR_SH1_IS (3UL << TCR_SH1_SHIFT) +#define TCR_SH1_IS (UL(3) << TCR_SH1_SHIFT) #define TCR_ORGN1_SHIFT 26 -#define TCR_ORGN1_WBWA (1UL << TCR_ORGN1_SHIFT) +#define TCR_ORGN1_WBWA (UL(1) << TCR_ORGN1_SHIFT) #define TCR_IRGN1_SHIFT 24 -#define TCR_IRGN1_WBWA (1UL << TCR_IRGN1_SHIFT) +#define TCR_IRGN1_WBWA (UL(1) << TCR_IRGN1_SHIFT) #define TCR_EPD1_SHIFT 23 -#define TCR_EPD1 (1UL << TCR_EPD1_SHIFT) +#define TCR_EPD1 (UL(1) << TCR_EPD1_SHIFT) #define TCR_A1_SHIFT 22 -#define TCR_A1 (0x1UL << TCR_A1_SHIFT) +#define TCR_A1 (UL(1) << TCR_A1_SHIFT) #define TCR_T1SZ_SHIFT 16 -#define TCR_T1SZ_MASK (0x3fUL << TCR_T1SZ_SHIFT) +#define TCR_T1SZ_MASK (UL(0x3f) << TCR_T1SZ_SHIFT) #define TCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT) #define TCR_TG0_SHIFT 14 -#define TCR_TG0_MASK (3UL << TCR_TG0_SHIFT) -#define TCR_TG0_4K (0UL << TCR_TG0_SHIFT) -#define TCR_TG0_64K (1UL << TCR_TG0_SHIFT) -#define TCR_TG0_16K (2UL << TCR_TG0_SHIFT) +#define TCR_TG0_MASK (UL(3) << TCR_TG0_SHIFT) +#define TCR_TG0_4K (UL(0) << TCR_TG0_SHIFT) +#define TCR_TG0_64K (UL(1) << TCR_TG0_SHIFT) +#define TCR_TG0_16K (UL(2) << TCR_TG0_SHIFT) #define TCR_SH0_SHIFT 12 -#define TCR_SH0_IS (3UL << TCR_SH0_SHIFT) +#define TCR_SH0_IS (UL(3) << TCR_SH0_SHIFT) #define TCR_ORGN0_SHIFT 10 -#define TCR_ORGN0_WBWA (1UL << TCR_ORGN0_SHIFT) +#define TCR_ORGN0_WBWA (UL(1) << TCR_ORGN0_SHIFT) #define TCR_IRGN0_SHIFT 8 -#define TCR_IRGN0_WBWA (1UL << TCR_IRGN0_SHIFT) +#define TCR_IRGN0_WBWA (UL(1) << TCR_IRGN0_SHIFT) #define TCR_EPD0_SHIFT 7 -#define TCR_EPD0 (1UL << TCR_EPD0_SHIFT) +#define TCR_EPD0 (UL(1) << TCR_EPD0_SHIFT) /* Bit 6 is reserved */ #define TCR_T0SZ_SHIFT 0 -#define TCR_T0SZ_MASK (0x3fUL << TCR_T0SZ_SHIFT) +#define TCR_T0SZ_MASK (UL(0x3f) << TCR_T0SZ_SHIFT) #define TCR_T0SZ(x) ((x) << TCR_T0SZ_SHIFT) #define TCR_TxSZ(x) (TCR_T1SZ(x) | TCR_T0SZ(x)) From nobody Wed May 22 08:32:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0L0RQWz5LCxC; Wed, 22 May 2024 08:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0K5r5cz4jFf; Wed, 22 May 2024 08:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UC3mfCrndhCtCbqCUdvRohOxrdZa9exmQ1wOmW+tlI8=; b=pDQZoCRLjVynHoXkWCgh1Frp2r+TXWY6Yyu8ePJIbjo/KI9aAjz5AjOd9XCgePE8S8OnFs dW/WWP6BGhpyJUvz5zn6r6VMlBlH8cmeWVoi/I783F6QQ5TDb4XLBVZND7zvCXLGJlioM0 P3dz/y35CbN/EMN4/75WaPIIZCwx5Sxpv7fmnmrPTKNx6DNejq92vcJYOHEaLkGXQL6sQz xG9A/J3bxQfdk1KByAj06f7P1VPq+/WIVl/pYRkb2wSA6LVxx01gNG8uSGuui8Vlqb3Cj2 uo6VkmHtKiDxzx/fTgotCSnLp+oVp4Zfg2KCPgkAg/8kvTKpijUfP8IFsq6y8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366721; a=rsa-sha256; cv=none; b=uPX/sxh4x0Wna0jMRbd5SaTZI4ty1qrxWOzn4ItJEgdZlUMKXr2/xqoDrMsQ1lJ6GMWRZj 6AtMKBRb1Jd6CcNgI5KGSvUeAwLl6eefwNp6Zi1vccJ16pxSOBrseEqj4yQGgkc1p1yb42 f8CnofZV/QB+oEcp0GiNQDmN5KGTz1SnfiyIvomaaPGbbZhygVIZ1x04GupQMRYaBwP/S0 NxKTG0jFGc1VDr7QQQO1n6v2FGxzxbq/XYvw8htc9hk5gvZEp2OojtF+jUaEQAi50/llzJ 2JGGtF4OTBKqX/Hl2jkVbSVPuyvcJUKvVATpQd57c0R7//g3Ot/LMj8vUWpGug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UC3mfCrndhCtCbqCUdvRohOxrdZa9exmQ1wOmW+tlI8=; b=oNZJu8tA1PX38QlCzSMmr9/RZIiaA2+5WDsSi8MgSAFJGqVMAYsWlzER/ifipH+uuu7zg7 deDWN4BcW8BPwfIUbOzHnxOz4rV+14Hn06MAm8PPSWbJITprYxrOs2jQ516kIejo+xqtrw NO4UchC5lvdFYBuSVxOl+CrfB3ThNug+hPhEVoCP8QclcD8r6WQvlNLt8iZFmUPgCwpk06 6rsUcr0yq1+rpzSOT3c8DllaM/u7E1mWulPRbCIEG6ARrTDxE2zWAjPC7dwL8/TBty6Qb5 wwU75vcvWfTOBO/Q7RFY2YA9Ok6WqJxq4F9RjRq/foGUEXvp9mJDyKJKIc7/Pw== 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 4Vkl0K5QWYzyRt; Wed, 22 May 2024 08:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8W1ru008924; Wed, 22 May 2024 08:32:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W1Qi008921; Wed, 22 May 2024 08:32:01 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:01 GMT Message-Id: <202405220832.44M8W1Qi008921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 57d714a23f5c - main - arm64: Add the pointer auth registers to armreg.h List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 57d714a23f5ce21e389d53636b8bc6c1b45d518e Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=57d714a23f5ce21e389d53636b8bc6c1b45d518e commit 57d714a23f5ce21e389d53636b8bc6c1b45d518e Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:18:54 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:18:54 +0000 arm64: Add the pointer auth registers to armreg.h Add the pointer authentication registers to armreg.h. These will be used to support pointer authentication in a kernel built with GCC. Reviewed by: jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45262 --- sys/arm64/include/armreg.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 2af207a40009..7bdb28aad1e5 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -77,6 +77,86 @@ #define UL(x) UINT64_C(x) +/* APDAKeyHi_EL1 */ +#define APDAKeyHi_EL1_REG MRS_REG_ALT_NAME(APDAKeyHi_EL1) +#define APDAKeyHi_EL1_op0 3 +#define APDAKeyHi_EL1_op1 0 +#define APDAKeyHi_EL1_CRn 2 +#define APDAKeyHi_EL1_CRm 2 +#define APDAKeyHi_EL1_op2 1 + +/* APDAKeyLo_EL1 */ +#define APDAKeyLo_EL1_REG MRS_REG_ALT_NAME(APDAKeyLo_EL1) +#define APDAKeyLo_EL1_op0 3 +#define APDAKeyLo_EL1_op1 0 +#define APDAKeyLo_EL1_CRn 2 +#define APDAKeyLo_EL1_CRm 2 +#define APDAKeyLo_EL1_op2 0 + +/* APDBKeyHi_EL1 */ +#define APDBKeyHi_EL1_REG MRS_REG_ALT_NAME(APDBKeyHi_EL1) +#define APDBKeyHi_EL1_op0 3 +#define APDBKeyHi_EL1_op1 0 +#define APDBKeyHi_EL1_CRn 2 +#define APDBKeyHi_EL1_CRm 2 +#define APDBKeyHi_EL1_op2 3 + +/* APDBKeyLo_EL1 */ +#define APDBKeyLo_EL1_REG MRS_REG_ALT_NAME(APDBKeyLo_EL1) +#define APDBKeyLo_EL1_op0 3 +#define APDBKeyLo_EL1_op1 0 +#define APDBKeyLo_EL1_CRn 2 +#define APDBKeyLo_EL1_CRm 2 +#define APDBKeyLo_EL1_op2 2 + +/* APGAKeyHi_EL1 */ +#define APGAKeyHi_EL1_REG MRS_REG_ALT_NAME(APGAKeyHi_EL1) +#define APGAKeyHi_EL1_op0 3 +#define APGAKeyHi_EL1_op1 0 +#define APGAKeyHi_EL1_CRn 2 +#define APGAKeyHi_EL1_CRm 3 +#define APGAKeyHi_EL1_op2 1 + +/* APGAKeyLo_EL1 */ +#define APGAKeyLo_EL1_REG MRS_REG_ALT_NAME(APGAKeyLo_EL1) +#define APGAKeyLo_EL1_op0 3 +#define APGAKeyLo_EL1_op1 0 +#define APGAKeyLo_EL1_CRn 2 +#define APGAKeyLo_EL1_CRm 3 +#define APGAKeyLo_EL1_op2 0 + +/* APIAKeyHi_EL1 */ +#define APIAKeyHi_EL1_REG MRS_REG_ALT_NAME(APIAKeyHi_EL1) +#define APIAKeyHi_EL1_op0 3 +#define APIAKeyHi_EL1_op1 0 +#define APIAKeyHi_EL1_CRn 2 +#define APIAKeyHi_EL1_CRm 1 +#define APIAKeyHi_EL1_op2 1 + +/* APIAKeyLo_EL1 */ +#define APIAKeyLo_EL1_REG MRS_REG_ALT_NAME(APIAKeyLo_EL1) +#define APIAKeyLo_EL1_op0 3 +#define APIAKeyLo_EL1_op1 0 +#define APIAKeyLo_EL1_CRn 2 +#define APIAKeyLo_EL1_CRm 1 +#define APIAKeyLo_EL1_op2 0 + +/* APIBKeyHi_EL1 */ +#define APIBKeyHi_EL1_REG MRS_REG_ALT_NAME(APIBKeyHi_EL1) +#define APIBKeyHi_EL1_op0 3 +#define APIBKeyHi_EL1_op1 0 +#define APIBKeyHi_EL1_CRn 2 +#define APIBKeyHi_EL1_CRm 1 +#define APIBKeyHi_EL1_op2 3 + +/* APIBKeyLo_EL1 */ +#define APIBKeyLo_EL1_REG MRS_REG_ALT_NAME(APIBKeyLo_EL1) +#define APIBKeyLo_EL1_op0 3 +#define APIBKeyLo_EL1_op1 0 +#define APIBKeyLo_EL1_CRn 2 +#define APIBKeyLo_EL1_CRm 1 +#define APIBKeyLo_EL1_op2 2 + /* CCSIDR_EL1 - Cache Size ID Register */ #define CCSIDR_NumSets_MASK 0x0FFFE000 #define CCSIDR_NumSets64_MASK 0x00FFFFFF00000000 From nobody Wed May 22 08:32:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0M1Cjkz5LD9B; Wed, 22 May 2024 08:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0L6vklz4jCG; Wed, 22 May 2024 08:32:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vglw4Lkx3h4BXGuNSgZ20cdgkXZ3B+D73U6mV5/60nE=; b=OllF28Kd3ntJko+Se/mY5wXfkA+bXg0yJZWu43SnOKd25IYX0n47yeAUV3EEsebe6/mAIJ gma5aTWbWiaapRXzERd2XfOEBNB7UyWD1YJkdVC2D9rJ36YIFLSJTNOoZBW/0e3nl8HIjX zvkoZJd3UBWaGqmupNtQmqXJMPYjdV6qcY2bHZmI/5jT5Yov0kzzbjqDW6copuPWDhUZ/y hmhGzJUEcNTJq1hxUhwUxjFcf4GXFShenOTQ8f2v3feALMsv4jJ8y2XRa/S/f4op+lm6t8 W6vXzFMBT8puCcWYDWicpkEzLQOsvjCNIbAv8/yg9YfOZPRm3LvLwaHOpN38vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366723; a=rsa-sha256; cv=none; b=kExDVJ3Aj3UbRKdibJ9/5t26XL066h1tMRSFa4EKxwnhpqK6HLEiqOpTnt+QC7mLVjjnT6 eA2rxRiqF2gCgWSKR8wyp5pCoFDyHt27JzX7aR9nUG7J+8OJam/kQ3MYwQD2ILH4Ktzf9J HBsz2DpMxWzW3Or6jfTPOWXUbB/TkYCOJGG6EXSHxcLQuwEuvSGv1HpEAVK4AX8Q9Pf+Xj gq590m+9fMCs1PbsXQolDiELI5fmG0ALrAlOPoV3hxBIgIfH/1BUb/5YuzGu2HVo4Hu6Bo wSg2LnrFa1WU9j54kk8sqbPBjRiddZSkz5q0a2I/HyAle0kcHUTWdUcdTcQHrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vglw4Lkx3h4BXGuNSgZ20cdgkXZ3B+D73U6mV5/60nE=; b=nP2Z0BKhVXu4+nJ8/efOdQTrBSTDQCOZssY8u9AWd1tvSTRp3GEk5q27ahvQ7NSQKFdCRI WQqSvXQ82jk2buTPIq0yPA2kTq2LivEfCF1SihXUuWJPQsYoviVtJeUHrEhyx2vGMdva5t 2dDi6RhoaUSWe8ZCSN6XOhTOlCqouriWENDlq680Vfm624jBwhiCk3XLmYWtCifz//I6Nz QQ6Q6EiTcYrWFqArkRCJwPt5ZEPytFDFFX/YtoZizcd1m90uS2R9YLQEYdtAuLdPrq4ot9 G/hcch3nXcAsvZYtCHi+g4qt1EYMnsS9imnrXjcc6xBccxPqje/TXknlDkoEfA== 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 4Vkl0L6T3WzyhZ; Wed, 22 May 2024 08:32:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8W2bO008982; Wed, 22 May 2024 08:32:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W24M008979; Wed, 22 May 2024 08:32:02 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:02 GMT Message-Id: <202405220832.44M8W24M008979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 73c200447361 - main - arm64: Use the pointer auth register defines List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 73c200447361a649e00cdb1693a0ae7f3291914e Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=73c200447361a649e00cdb1693a0ae7f3291914e commit 73c200447361a649e00cdb1693a0ae7f3291914e Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:06 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:06 +0000 arm64: Use the pointer auth register defines When building with gcc it complains the pointer authentication registers aren't valid with the architecture level we are targeting. Fix this by using the alternative spelling of these registers accesses through MRS_REG_ALT_NAME. Reviewed by: jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45263 --- sys/arm64/arm64/ptrauth.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/sys/arm64/arm64/ptrauth.c b/sys/arm64/arm64/ptrauth.c index 40f9c86d9468..b5f9fad1dc95 100644 --- a/sys/arm64/arm64/ptrauth.c +++ b/sys/arm64/arm64/ptrauth.c @@ -169,13 +169,11 @@ ptrauth_thread_alloc(struct thread *td) * Load the userspace keys. We can't use WRITE_SPECIALREG as we need * to set the architecture extension. */ -#define LOAD_KEY(space, name) \ -__asm __volatile( \ - ".arch_extension pauth \n" \ - "msr "#name"keylo_el1, %0 \n" \ - "msr "#name"keyhi_el1, %1 \n" \ - ".arch_extension nopauth \n" \ - :: "r"(td->td_md.md_ptrauth_##space.name.pa_key_lo), \ +#define LOAD_KEY(space, name, reg) \ +__asm __volatile( \ + "msr "__XSTRING(MRS_REG_ALT_NAME(reg ## KeyLo_EL1))", %0 \n" \ + "msr "__XSTRING(MRS_REG_ALT_NAME(reg ## KeyHi_EL1))", %1 \n" \ + :: "r"(td->td_md.md_ptrauth_##space.name.pa_key_lo), \ "r"(td->td_md.md_ptrauth_##space.name.pa_key_hi)) void @@ -187,7 +185,7 @@ ptrauth_thread0(struct thread *td) /* TODO: Generate a random number here */ memset(&td->td_md.md_ptrauth_kern, 0, sizeof(td->td_md.md_ptrauth_kern)); - LOAD_KEY(kern, apia); + LOAD_KEY(kern, apia, APIA); /* * No isb as this is called before ptrauth_start so can rely on * the instruction barrier there. @@ -240,8 +238,8 @@ ptrauth_mp_start(uint64_t cpu) __asm __volatile( ".arch_extension pauth \n" - "msr apiakeylo_el1, %0 \n" - "msr apiakeyhi_el1, %1 \n" + "msr "__XSTRING(APIAKeyLo_EL1_REG)", %0 \n" + "msr "__XSTRING(APIAKeyHi_EL1_REG)", %1 \n" ".arch_extension nopauth \n" :: "r"(start_key.pa_key_lo), "r"(start_key.pa_key_hi)); @@ -257,7 +255,7 @@ struct thread * ptrauth_switch(struct thread *td) { if (enable_ptrauth) { - LOAD_KEY(kern, apia); + LOAD_KEY(kern, apia, APIA); isb(); } @@ -271,7 +269,7 @@ ptrauth_exit_el0(struct thread *td) if (!enable_ptrauth) return; - LOAD_KEY(kern, apia); + LOAD_KEY(kern, apia, APIA); isb(); } @@ -282,11 +280,11 @@ ptrauth_enter_el0(struct thread *td) if (!enable_ptrauth) return; - LOAD_KEY(user, apia); - LOAD_KEY(user, apib); - LOAD_KEY(user, apda); - LOAD_KEY(user, apdb); - LOAD_KEY(user, apga); + LOAD_KEY(user, apia, APIA); + LOAD_KEY(user, apib, APIB); + LOAD_KEY(user, apda, APDA); + LOAD_KEY(user, apdb, APDB); + LOAD_KEY(user, apga, APGA); /* * No isb as this is called from the exception handler so can rely * on the eret instruction to be the needed context synchronizing event. From nobody Wed May 22 08:32:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0N2F1zz5LD5f; Wed, 22 May 2024 08:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0N0jSPz4jCS; Wed, 22 May 2024 08:32:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkzSw+sDMgZ9x3D2I7Bzg5r17YxDe59aj0cIyX1pUFM=; b=lFT+NyM3rVm5tNjgl8gXhe3s+5L/nAElYRwGcu4RSN7w7gqM0+9bt1RLASPv5+WapQ3YNY Bx6Y3bEYlksgrvJ7UF+47rGj/k8hqACHPU7dDg6wo/EcBG0BXNTTVoyVOtGKLn30Xxa7NL sLE1dBp+stod5pqLq7qykJfAhZGd5hYCb3fs6MceRHd6/si4mHP9HpP6fknhZjSBeKkjbI AkgKmmOyQPL4X4IrVq8IXNT6uKpf3EXXOi8iqyc8uo1kJutLYeL0cVN0bdonBbmet6uD16 +Z7bU7kNHkQFDKLT5urdmfIOcORq0maIWQaNQHZVSiJM8WZVHBQ5nfQvlIBAeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366724; a=rsa-sha256; cv=none; b=nwCGwRyC8PPoRsT9w7cZCu2nkEgVpZs3ySRxDDu0pu5Ztqo5WEyPnwvn85DVXIp5QHJ/Nc 27XNSO0TwRNJSlU+7Yo4g1gHhOkMqLJ7gC3n4dtL9HM+RgVTLauP3Fy96MM0W/wCe3fYjK CEzPC+1XL49shlkY79rYDXF98+G81HBniTb/og7L5PPMkS/VOpElAKkAj31B91igFmOzX0 3VySZtINY3BBP3VnbZqkIt1RvkjxkydtD6x0yo7mlMa2c4Rk/qt9aLmnqn+rXlIApy5Xa9 Zf58YUHoVP5g395NRNx1702OprPkmStamyxiehPENKNgdVJgIHu0JRP81QqrOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkzSw+sDMgZ9x3D2I7Bzg5r17YxDe59aj0cIyX1pUFM=; b=IZ2r0wVe9JQgrxFErU0Dz0eoFkBQ4M9A9eabXSqR6QGpYIfuAxsUw9Xuj5XSKSY/MATu8p N2LCGaP53TFIR6flIg+RL5wavTvUjo6xIhFHUHSUlAbNfU46mGMEgC3vAPxGl6gn4mBMgX HlVhK6SBMZeYP8D0kBMCwPnUmm1xI349MZfJFfYVcZ9sV2p38r4Dicn0UkneejXnswJjfv Qg3Wk6Cg+mSoOXSgKNFRLzeki6vKD6C62sEaHd8n7XrF4VJ9iuj8BorPGRA4A3y0ELSNpk VQDbFLhQA56PH+Dkmr/gHQTPDjx1nJDWeC+66PZ3RgVHh5cAEe6dDbGRjMAKFA== 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 4Vkl0N0KD2zyG5; Wed, 22 May 2024 08:32:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8W3SB009027; Wed, 22 May 2024 08:32:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W37P009024; Wed, 22 May 2024 08:32:03 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:03 GMT Message-Id: <202405220832.44M8W37P009024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 4f012d7a7a47 - main - arm64/rockchip: Fix the build with GCC List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4f012d7a7a473d2486f01ce355fd2c79c3d43db6 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4f012d7a7a473d2486f01ce355fd2c79c3d43db6 commit 4f012d7a7a473d2486f01ce355fd2c79c3d43db6 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:19 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:19 +0000 arm64/rockchip: Fix the build with GCC We were missing brackets in GPIO_FLAGS_PINCTRL. Without them GCC complains a use is ambiguous. Fix by adding the needed brackets. Reviewed by: manu, brooks, imp, jhb, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45264 --- sys/arm64/rockchip/rk_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 6a7ae95d4e8a..a86392f16624 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -76,7 +76,7 @@ enum gpio_regs { GPIO_INTR_EDGE_RISING | GPIO_INTR_EDGE_FALLING | \ GPIO_INTR_LEVEL_HIGH | GPIO_INTR_LEVEL_LOW) -#define GPIO_FLAGS_PINCTRL GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN +#define GPIO_FLAGS_PINCTRL (GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) #define RK_GPIO_MAX_PINS 32 struct pin_cached { From nobody Wed May 22 08:32:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0P40n3z5LD74; Wed, 22 May 2024 08:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0P1jNDz4jRk; Wed, 22 May 2024 08:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7MusWWA25168oYBIUukXisEZeDZTnZOCPrHUpYzY/s=; b=HcNQ4vNbKIDnbeVoV3H8Jql6e4YzFFY5A6pLksqOWvoCovyuFK1eGjJ5WjB0L4eTJ1iIsR E28haBCnvJfpqn0H62uOBUFIzsmffmQFhpbXIAGxatXVWAzLLxPV30oepliPSIKmT+K8Vr qohL+n4PpnYawA1fbLhOcrhVT07zjj+BgDUJP2XWUguPBeG/Kgvdzy6U+HAOx2avOA2T9p 3aEfH2yO+p91BRHLM5cVsc6SfiFpg3GejqBP68OyZU+paV4Y148Vd4Y84GmVcam/8mjo8X lvDfxEZR/GsW4sYb7D0XmCmxK9+yNLgFbo91HPiGtRMzDoM7VsSvjteBruRI5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366725; a=rsa-sha256; cv=none; b=HFM/huVUYmhQgIfbtOd/kiA/ZhbTOsWSY/p1GtT2VtW3eJIcHcD2g0GOYLVHFNP6xZiLFd kejIAXK/fLUhbRU4Bi7/tAwFZ7l1wKZMclERU1lOS66mdfE7KBxHNysIpji6OihJOzsS7G 0/pBxptaqi3Ijjpi46LBpNeUdVrlAMjE224RJiRvVLo+IAh06v0YLqpUl+1kMX1e1VKtcn 1nre51yQcMC/f6tNZm63d+bXVj1mRBsfSEMiCk3VM1t+NN0LA1h5oX6voMrIqUNt6EVRJe BuKqsMBUbFyD3Sge2QuE9vn0TxYS92SHBkj+mLIcRjgSz4jplgY5t7VQ8YzWug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u7MusWWA25168oYBIUukXisEZeDZTnZOCPrHUpYzY/s=; b=HYA18HN8aLzbeNMa0FW93q23IZQLBMjNnzSytDFLLp0HZE4r81xPyGwW+jLfPvjghWhWV4 LXuaqndEArB8GriyzJhOmQOPcD1EEpduqmSCQh4z2g61VKNbr7JvNTnDW8AmOVYyw0EkGX 28MzBdMKt6oFqTqgqzIfAFDsN+QOTOLa3xVSdOJOQP/L+gZKKUqUyM65f1Y47q6+1toPAb Kcj6bx6iHP6A93gm5dqfcwc718EfRbxvlxcut+KLbtZpfvMOUdJwCnoEEzu0uIc7Zht92r lQaxGAcAvKCNJG+8g3HPL3fknzvSexGyomQPb8l709lKwefoDiq+Qd9Z0hXkNg== 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 4Vkl0P1L8wzxkC; Wed, 22 May 2024 08:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8W5w1009070; Wed, 22 May 2024 08:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W5Ti009067; Wed, 22 May 2024 08:32:05 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:05 GMT Message-Id: <202405220832.44M8W5Ti009067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: f55e866488ba - main - pci: Fix pci_host_generic_acpi with gcc List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f55e866488ba2d8bb5b79659ee84bec1fe7808fb Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f55e866488ba2d8bb5b79659ee84bec1fe7808fb commit f55e866488ba2d8bb5b79659ee84bec1fe7808fb Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:38 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:38 +0000 pci: Fix pci_host_generic_acpi with gcc In pci_host_generic_acpi.c we loop over pci_acpi_quirks to check if we need to handle any quirks. GCC doesn't like the terminatin as it sets a fixed width string to 0. As this the array is only ever used in this file change to use nitems to find when to stop the loop. Reviewed by: brooks, imp, jhb, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45265 --- sys/dev/pci/pci_host_generic_acpi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/pci_host_generic_acpi.c b/sys/dev/pci/pci_host_generic_acpi.c index 2191ec4d655a..0cd17d5f5555 100644 --- a/sys/dev/pci/pci_host_generic_acpi.c +++ b/sys/dev/pci/pci_host_generic_acpi.c @@ -99,7 +99,6 @@ static struct { { "MVEBU ", "CN9130 ", PCIE_ECAM_DESIGNWARE_QUIRK }, { "MVEBU ", "CN9131 ", PCIE_ECAM_DESIGNWARE_QUIRK }, { "MVEBU ", "CN9132 ", PCIE_ECAM_DESIGNWARE_QUIRK }, - { 0 }, }; /* Forward prototypes */ @@ -202,9 +201,9 @@ static void pci_host_acpi_get_oem_quirks(struct generic_pcie_acpi_softc *sc, ACPI_TABLE_HEADER *hdr) { - int i; + size_t i; - for (i = 0; pci_acpi_quirks[i].quirks; i++) { + for (i = 0; i < nitems(pci_acpi_quirks); i++) { if (memcmp(hdr->OemId, pci_acpi_quirks[i].oem_id, ACPI_OEM_ID_SIZE) != 0) continue; From nobody Wed May 22 08:32:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0Q4HKcz5LDSc; Wed, 22 May 2024 08:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0Q2lCsz4jWy; Wed, 22 May 2024 08:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3T5T/SgZVshoWTpIJZtltUbZ60NtpDUolDWVUHhY9A=; b=V7WbIpAb8sdxm54sml5F6UkpZqPu9J+F9NnwZatlLhqPKzcla2DypZFBLis2fEXvs2tm3D b8NCO1+0MehEuZDh/M7eg0DMxHTlQiRo0QvL19xzmdXFWjy2kSJdKTf+IIe5WshSINEuzr KzYTZUF7N0cvXefMO3L4jpI2mUMrTQo+9iAHshjFAiMw2Nv/6dBf8mjXMPkfWe7u0qlK5g ljLubknE+0DG4diSPGY2MMbdh+QEZyaIn+NtGKuHVeP2agAUpRReKSj+KUa2V+ZPG9K/QD HXi0+RPPELNBrolJjyUJdEtOWn1Sa+XiLGjMKSuGazjwri7vlqsoiAsmJp9KRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366726; a=rsa-sha256; cv=none; b=m7WtnRaFd2NKeaPQ5nADBDcBYB3osQLNi5VsxzeHJ6aMzdMncMk0Ycsr4sDzEFHsDwGIYC Rbk28Weo0Uqw7JS+kiFb9xrWMJFWzjyxLp+633hCjIVMkp04Log0S2e4dGb+SnAwy8jTUt RMUq2DcUJC3a0I8q7Dirik5eTL98XIBP6XJQJUQaUDbj57VKajbyVAJhKdkJgiqNwel/CW Q/IgYoK07C6NhfIbOyael60j2HvEmYSnN5S8r9MID3I5IGlTmYglJWW19j98SFeQEz0i0Q QmLFKQlUVp9G5KFjKJfxRf44nBdXp0dgYlXRcCHiyOIkaBPZ803R5rQaALVMOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3T5T/SgZVshoWTpIJZtltUbZ60NtpDUolDWVUHhY9A=; b=imGW+zeVnUXWBViYtDVAO3atp5tHYOcHpE+T9u/Bnb06dHyXIqlDNXNG0keBUYBooK1mks Uyh3HwvMNfjM+6PEvx7HHQKxMHvVS5olqshpbuz6IavAXMThT3msUOiLkpg3/1v2AnVA5A ApFjCD/IvSbBlWpemhfizmbDezcS7Q57F0igUMyAlGqDudguvEyV6i9USxXRzBC4oGG8/4 5lnqVvZ48rUL/bT7ElBNF7Xiq2eZNvOGzej+DUkDWP4vRcHLSzHZcPEJypbWolWb1ykLR/ Ngyqkk44jDubdmSfqvHODvjNpVP6ChlbKbwYLLwflizjHfSfNiI26LuDfzTe7g== 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 4Vkl0Q2MP1zyG7; Wed, 22 May 2024 08:32:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8W6fT009115; Wed, 22 May 2024 08:32:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W6G5009112; Wed, 22 May 2024 08:32:06 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:06 GMT Message-Id: <202405220832.44M8W6G5009112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 131c1718c633 - main - dev/hwpmc: Fix the dmc620 MD4 macro List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 131c1718c6331e87f139b42b4ad0e57b6a71ea44 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=131c1718c6331e87f139b42b4ad0e57b6a71ea44 commit 131c1718c6331e87f139b42b4ad0e57b6a71ea44 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:19:49 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:19:49 +0000 dev/hwpmc: Fix the dmc620 MD4 macro Add braces to the dmc620 MD4 macro to fix the GCC build. Reviewed by: brooks, imp, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45266 --- sys/dev/hwpmc/pmu_dmc620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/pmu_dmc620.c b/sys/dev/hwpmc/pmu_dmc620.c index 42e5dfdbf154..c33e5264f7de 100644 --- a/sys/dev/hwpmc/pmu_dmc620.c +++ b/sys/dev/hwpmc/pmu_dmc620.c @@ -68,7 +68,7 @@ struct pmu_dmc620_softc { #define RD4(sc, r) bus_read_4((sc)->sc_res[0], (r)) #define WR4(sc, r, v) bus_write_4((sc)->sc_res[0], (r), (v)) -#define MD4(sc, r, c, s) WR4((sc), (r), RD4((sc), (r)) & ~(c) | (s)) +#define MD4(sc, r, c, s) WR4((sc), (r), (RD4((sc), (r)) & ~(c)) | (s)) #define CD2MD4(sc, u, r, c, s) MD4((sc), DMC620_CLKDIV2_REG((u), (r)), (c), (s)) #define CMD4(sc, u, r, c, s) MD4((sc), DMC620_CLK_REG((u), (r)), (c), (s)) From nobody Wed May 22 08:32:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkl0R6CWgz5LDG6; Wed, 22 May 2024 08:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkl0R3r3mz4jJn; Wed, 22 May 2024 08:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gNh/uno41hhGPE7GnddiFK92Yd98I7R5lYZYo5Dkxc=; b=f7eZw8VRwptshIjU1NDD10LSE0i+pfzx+EnnYZfutFUyBGROTBUWqfpsXeMDKHU+KkWJjm ix/SRwK+8ypWF0slYtilPkDfskJ3qPbunkrIK6SnH9gsSCSA3ApYaHfc41yE2eO6ueN5M5 lmvkLScTtwWgBm70xRUX4LKKla5fTicOJdu0IuDXI6lIBvkH3/No3nsklMw+sdOKvorzsp k/telwLc6GGfrTKsKvJoske3k/vQhkz0HZ0LoSSkU7jqOWZwZ5/S2i507gFQ2cfHO4Ryx7 IrSuGs3l2FJd2lnDpiaoPT4QYwu72mdbJL24rmlEnTYOsKtgTeSy/ZTDMonGWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716366727; a=rsa-sha256; cv=none; b=JmJ8M+YQotL8ZxAMMSg5Tecm+2qPUUDNo198+1MeStsRo/s8qoxDPlhAI4OmJhKOi/3d+B v6af5ex+XTEUnmQha1INhqsSDLy4Dw/gOzt5wiTh9im5IxtxSgsJ6FklkFG7ZvMAnYfEU9 wpjJMzgfQJH+xiMNeOU5lqAgD5xoNAjs0+xGJlBnDLWf0n7vH/Wz96Le0EhdCyjdcT1PFq 12NWcexb3kF6fzA7uWmDe0p7NDCR68sGzKudYGQV0AiiUN9wPAKw9/7RnaQ6kr23Rbw1eM E2eRz97ayWeHS0uYJYLg7FDFaEGaO8nb5pfkO9SBht28vudX9auRXbGREH7SJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716366727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gNh/uno41hhGPE7GnddiFK92Yd98I7R5lYZYo5Dkxc=; b=PzMs0BZbh4oGCrUFksRvoCL8+Gl5as6QxJ+NfdH1R7ZCC5uh99ogDL9wEtDrQk4p0Z0CaX 3zrVG08/8M2Nw9tt1QspE9FZCsfwxdtW7RAscPGgkLujyeK1KnfiwjlDfIELkm2QogHqZF EHhcUjq6c3PKBNxUXzLtdLuIqoXroDALnBuECLrpy851rElSFiywV5NhZdJc9YuWZ+z6O3 3zYHUgZ2D/jQ1TfP9vvC3FvbZS51MacwcngTabYIOAEWyBFVDyXhTWH4txtim6XK5N3o3g advJ+TCI7RpIFzcr3cM05MPFQPrgo0bd4iHHJl5GLoCgb0sDil72OySkUWDVSw== 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 4Vkl0R3SVmzxZk; Wed, 22 May 2024 08:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M8W7ei009163; Wed, 22 May 2024 08:32:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M8W7iK009160; Wed, 22 May 2024 08:32:07 GMT (envelope-from git) Date: Wed, 22 May 2024 08:32:07 GMT Message-Id: <202405220832.44M8W7iK009160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: c2628accc029 - main - sys: Build arm64 per-thread SSP with GCC List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: c2628accc029a07eb8ff73b6df7f7d6af194ca2d Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c2628accc029a07eb8ff73b6df7f7d6af194ca2d commit c2628accc029a07eb8ff73b6df7f7d6af194ca2d Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 08:20:01 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 08:20:01 +0000 sys: Build arm64 per-thread SSP with GCC It has been supported since GCC 9. It is unlikely anything older than that will build the kernel so mark it as supported by GCC. Reviewed by: brooks, jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45267 --- sys/conf/Makefile.arm64 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 1505b6c2a45b..52f0f9052db3 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -30,7 +30,8 @@ CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\" PERTHREAD_SSP_ENABLED!= grep PERTHREAD_SSP opt_global.h || true ; echo .if !empty(PERTHREAD_SSP_ENABLED) -. if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 +. if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000) || \ + ${COMPILER_TYPE} == "gcc" ARM64_SSP_CFLAGS = -mstack-protector-guard=sysreg ARM64_SSP_CFLAGS += -mstack-protector-guard-reg=sp_el0 ARM64_SSP_CFLAGS += -mstack-protector-guard-offset=0 From nobody Wed May 22 09:08:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vklpk4VHHz5LHR4; Wed, 22 May 2024 09:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vklpk3tvlz4qPQ; Wed, 22 May 2024 09: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=1716368926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvez3tj17B7FaJO3nWhQdZ6pCoNYGiA3ZjI1svDuRYs=; b=K2seFYQlBfeYffUIpbb2jOB4h11D9TM1ChooE7gMSXg13RclAUDaY45iDdtJ/umq+DeFG0 Talc20Rb+IrcITutLzRZFhvjabHXS0gK06y/ZuQzljkkqmY1mTcUMuB5tL7Sq3q+TXQMRB m12EeB2QIrPsxLws1C++4vK+MB/hMEXpHa/RV+rgzCWsmMsWAFrS+xlDgjABIcoTRyI3xX AtY74Ogp25Frq8MmsW0PWGlae37X+62F9RnSorBuTAfKfbPA1W8ly4H3pZPCkU8mzHXH0A W3qHbn01V/4MwJ3g6Ja7yaf92Amlf+wD0BIaQMrZAGm8BIPwyP4KFkRIAAeeuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716368926; a=rsa-sha256; cv=none; b=KX/rhTAn0WzLqUolV9ic3qJy3MAPSYvIj5krK2tlEnC2wJ1bfzTh8gS4LtN3uWDsdhHFF+ nFb/S0qbQEbkRYWa8r9XrMSm6wYzPgL8ZXn71FBtzfagom5CbIRuzPbB4QYp+G5xLULwz0 fy5KlHb6lqZGjS0U/8DkkO7/G+dkj9fIibceGUfznIP50ldPFvOJFccRQoX/vTmhwPn7/V wUsYn8Qh0vE6TBOwJoY8Fc8aXdCLv2SgMMqWOfeeLkTGFJ3Scf0M4e5P1H5Raa5aTUwe6c isbVPfDeaYW+l3ecmvIaOb0JPzVjJeskcMaKntiymI4i7y+twhzBKZjQhtQ4hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716368926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvez3tj17B7FaJO3nWhQdZ6pCoNYGiA3ZjI1svDuRYs=; b=tqmBWAqSffftj91Xm+FB7RuEuIwnKGsayD1QXt1W4urQZoTYV9pawxOkGmm7R+vhKn8YJA cdY2u1+6H+m6IBs8L6MSjKHpmvFnE1vSUUaorDg5GNhStoKwuyUb9MhuyE267+qwa9WgvY deAbWmaFMmuXYWaF6kn7IxyY0H8/Kxw1gfTDDUsXsisNOo9CCKPtqZpncrw6bh8/KiFaxQ b/x3cQplgjmLIYVnCz5hVMdO8ZRcHkFkQ216H87GjSH9rj6OQ7hnDWcGzmSk4b7+SQBKXh AlTJZSE6pAeCCyOgO6RUwd3OOqGuJEuo0CHHRiwdLIsbukdCwJojXfvfROhCBA== 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 4Vklpk33fWz101J; Wed, 22 May 2024 09:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44M98kIr062350; Wed, 22 May 2024 09:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M98kar062347; Wed, 22 May 2024 09:08:46 GMT (envelope-from git) Date: Wed, 22 May 2024 09:08:46 GMT Message-Id: <202405220908.44M98kar062347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev <dsl@FreeBSD.org> Subject: git: ac4ddc467bfe - main - arm64: Fixed IOMMU compilation errors List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d Auto-Submitted: auto-generated The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d commit ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d Author: Dmitry Salychev <dsl@FreeBSD.org> AuthorDate: 2024-05-21 20:25:59 +0000 Commit: Dmitry Salychev <dsl@FreeBSD.org> CommitDate: 2024-05-22 09:08:00 +0000 arm64: Fixed IOMMU compilation errors These are missing changes after 1228b93b410a when ref_count was removed from bus_dma_tag_common and 1e3f42b6bad5, when the address arguments were switched to pointers. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45289 --- sys/arm64/conf/NOTES | 4 +++- sys/arm64/iommu/iommu.c | 1 - sys/arm64/iommu/iommu_pmap.c | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index 3e8499c872b9..cc713db86538 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -240,6 +240,8 @@ nooptions COMPAT_FREEBSD10 # arm64 supports 32-bit FreeBSD/arm binaries (armv[67] ABIs) options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm +options IOMMU # ARM64 SMMU/IOMMU + ##################################################################### # ZFS support @@ -250,4 +252,4 @@ options ZFS # device iichid # HID-over-I2C support options IICHID_DEBUG # Enable HID-over-I2C debug messages -options IICHID_SAMPLING # Workaround missing GPIO INTR support +options IICHID_SAMPLING # Workaround missing GPIO INTR support \ No newline at end of file diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index cb2b86c9dc41..b765763e3a60 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -172,7 +172,6 @@ iommu_tag_init(struct iommu_domain *iodom, struct bus_dma_tag_iommu *t) maxaddr = MIN(iodom->end, BUS_SPACE_MAXADDR); - t->common.ref_count = 0; t->common.impl = &bus_dma_iommu_impl; t->common.alignment = 1; t->common.boundary = 0; diff --git a/sys/arm64/iommu/iommu_pmap.c b/sys/arm64/iommu/iommu_pmap.c index d356a92c4d66..8a0ea641e231 100644 --- a/sys/arm64/iommu/iommu_pmap.c +++ b/sys/arm64/iommu/iommu_pmap.c @@ -632,8 +632,8 @@ retry: l1p = smmu_pmap_l1(pmap, va); l2p = smmu_pmap_l2(pmap, va); - cpu_dcache_wb_range((vm_offset_t)l1p, sizeof(pd_entry_t)); - cpu_dcache_wb_range((vm_offset_t)l2p, sizeof(pd_entry_t)); + cpu_dcache_wb_range(l1p, sizeof(pd_entry_t)); + cpu_dcache_wb_range(l2p, sizeof(pd_entry_t)); goto retry; } @@ -644,7 +644,7 @@ retry: /* New mapping */ smmu_pmap_store(l3, new_l3); - cpu_dcache_wb_range((vm_offset_t)l3, sizeof(pt_entry_t)); + cpu_dcache_wb_range(l3, sizeof(pt_entry_t)); smmu_pmap_resident_count_inc(pmap, 1); dsb(ishst); @@ -681,7 +681,7 @@ pmap_gpu_remove(struct smmu_pmap *pmap, vm_offset_t va) smmu_pmap_resident_count_dec(pmap, 1); smmu_pmap_clear(pte); - cpu_dcache_wb_range((vm_offset_t)pte, sizeof(pt_entry_t)); + cpu_dcache_wb_range(pte, sizeof(pt_entry_t)); rc = KERN_SUCCESS; out: From nobody Wed May 22 10:36:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vknng0TsYz5LRg8; Wed, 22 May 2024 10:37:59 +0000 (UTC) (envelope-from dsl@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vknnf74dcz4xYt; Wed, 22 May 2024 10:37:58 +0000 (UTC) (envelope-from dsl@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716374279; 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=EBkOcq3mRcu/zQ2HrUhi5pMKMi9K6abTiRmyZ2zb2lM=; b=chqgKM4w93FYkK+4Z8WniyNz1EGUrSAHnSdqCfQlgyfErdK3mKD642bK1iH8usAWW8/wSt u/lppQZj+3+Lr4yJgOu1LADcra60l7QJSW829EC4NQP9tm62nPOxy23S1y5lDR8dqrWUza STOps8/VhASgGtUBZssnZ8IqLFBKOqIT92ZX/gI0zLsIsMREgswhfiV978RGqVOl8Oyca+ MrwROV2wC+Gr3EJt/HwEDlQPJfadg5CQkl6Eu5S9iVgJJnGY6tVzRo+NFw11WjuBHjbi7Y jBuwQj7KBJanjVdi5T4L4euKgJSDQKVbaFhl1HaTgYudyf/hDL9+R1mnjx5AaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716374279; a=rsa-sha256; cv=none; b=bdFCfxutCXJzOKjNh5RKOjWgMxrsmALr1vJHOwacBGKw1C+0LulSRvviWxCmvXtIwePFZ/ v9xgEirVFf7vJ1eQkz0Osc+l1w1Fs4lTiqX7b5grStnO9GhSKCs5PLNWfujymkQeMimd2q dV3z3/cLcUNx/oyXUBGD2rfO0C/eZtvMCrfusuxZrHN1kb/ooFDqNZEgCaYJDJJjNQp8aa /+A+MLPvh6svYB8ITNpeYiXO+FTjJtr1FG4iiie5kJeivQHr9Etf8PG7EBmXenrpsUwCzM IQUiZOvWxc1yEt3oSR6mEsYaOCaWGld6VFtkYLlEhCQrvaokzw9rKw3E3rpzXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716374279; 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=EBkOcq3mRcu/zQ2HrUhi5pMKMi9K6abTiRmyZ2zb2lM=; b=liOQs7/ywljmlOAf3sY2CDOnURdCJ8aYkbCwP4iIQzgiZ+WSNYkuS04gM4Y+HZONCCXk3V HEN68UOwSpqOVbsFEORLtilI+GgEKmjncXSPSpxcouKdvL9gkxn1LSydoDm4AP+RwfcSX8 ++NOAi4cWqQ92a3Sm5b0H/qFNFo+iW5ONw/OhZLB/RPuKAXY4Lh0ME9Rvug19XJONJyb2C gVES2F+wi+HeYgKU/V4FnsSXKrXj2xbky2hw5Krd/+kYCYWlXaWYEi3B6wpY3HiJ847I9X N19BuwBbh2AbdTutTFv0vtNFNFwQOspJQI48Z+hscuWgeXm1khJk226SIHMw4w== Received: from localhost (unknown [91.226.51.235]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: dsl) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vknnf4dr6zfcv; Wed, 22 May 2024 10:37:58 +0000 (UTC) (envelope-from dsl@FreeBSD.org) References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> User-agent: mu4e 1.8.13; emacs 29.3 From: Dmitry Salychev <dsl@FreeBSD.org> To: Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Date: Wed, 22 May 2024 12:36:31 +0200 In-reply-to: <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> Message-ID: <86r0dugmik.fsf@peasant.tower.home> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain Lexi Winter <lexi@le-fay.org> writes: > [[PGP Signed Part:Undecided]] > Mariusz Zaborski: >> The branch main has been updated by oshogbo: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd >> >> commit 408957613bc065c4444812c3ae276ace03697ebd >> Author: Mariusz Zaborski <oshogbo@FreeBSD.org> >> AuthorDate: 2024-05-21 20:02:50 +0000 >> Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> >> CommitDate: 2024-05-21 20:03:20 +0000 >> >> Regen >> --- >> sys/compat/freebsd32/freebsd32_sysent.c | 2 +- >> sys/kern/init_sysent.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) > > i'm sorry if this is considered accepted practice in FreeBSD (i'm not a > committer) but could i please request more useful commit messages than > "Regen" for things like this? > > when looking through 'git log', especially 'git log --format=oneline', > it's really not clear what this commit actually does, meaning if i'm > looking through the log for commits related to a problem i'm having, i > have to examine commits like this by hand to see if they're related. > > it would save me (and other people, i suppose) a lot of time if the > commit message could at least mention what it's touching, e.g. "Regen > sys/compat/freebsd32/freebsd32_sysent.c". > > [[End of PGP Signed Part]] Looks like it slipped in by mistake. I expected it to be reverted and re-worded. Regards, Dmitry -- https://wiki.freebsd.org/DmitrySalychev From nobody Wed May 22 11:13:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkpZc5fNNz5LVSh; Wed, 22 May 2024 11:13:28 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkpZc3F7Nz52Sm; Wed, 22 May 2024 11:13:28 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3c9bcd57524so515449b6e.3; Wed, 22 May 2024 04:13:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716376406; x=1716981206; h=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=cgjujC0UUJyh4d7FaanX51+b5g0HzJXF7FhfPoAGurU=; b=AyLioozYilUqcUwvyjJQIlVd8VOumGieoD+VmIeUkCAjm1zIsUiqk+z2+zQ/c8WOsM tTBDPd5MmMcsOpR7UYKP2D175K3/FHs0s8XNiRAIW/XfSVH4Akmd5ohemSN6ve/d6Qrf hKlzo8pS+PlDnWq/rMr1LyISopwax7iz6y9mTFnvvfRH7PZOP5sCjr0lwTOVwsZoIIMR 4CbooQqipZ+mnep4aE4Jtp3kwCevxiNIJSHjx7EgX0sWYqsgtlswTOmG9bFvKYMc2bPC E8QhEchI/Jc0KInsw0gmhsTqAOWSQ3YCE9BxKZ77/mYik5OHohIes+Px83dokZuuQ/pM THDw== X-Forwarded-Encrypted: i=1; AJvYcCVPHzy/0/Pkx3xy78/oLlmpWfnEslWgrMQnAWfq0VjQEMNSZY6Osw450ZPziU457MIS6OqIsvIEVkq2vmm9Zv+DNVdsqxLfdl/jmcfvCLQHJQjpHs4oOcPfxUgUg0HFenR44Bpjc/yPsM8SU3zMReQM36blMZLyipVsc9hlwZ5tSWeOzg8VWNxcvZFNmgM= X-Gm-Message-State: AOJu0Yx4DqMnsRj7H3YRjQRQHu5ltQk1wjpsJx7WFVVEnYEMuPrQiMNW WKkSX/3t36Yxyhjcw3V7WiYXXbbF23AH8wo8dM80THeoewSg4oFfdCWOA3LTQjw+dKfA+LC/2hr B4OwlWDF8vl/brO5vf+3J7XAba4GS7ypbDpfhng== X-Google-Smtp-Source: AGHT+IFFHzGAK4QkLstG/7W+PH1xrygUSLOaBvdC0sEFl1/jNxXchnxsQRUR7WbpgWNdxfxvOpAvUCD+DqsY93uFFtU= X-Received: by 2002:a05:6871:58a:b0:23b:3428:725a with SMTP id 586e51a60fabf-24c68b66638mr1998173fac.1.1716376406389; Wed, 22 May 2024 04:13:26 -0700 (PDT) List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <86r0dugmik.fsf@peasant.tower.home> In-Reply-To: <86r0dugmik.fsf@peasant.tower.home> From: Mariusz Zaborski <oshogbo@freebsd.org> Date: Wed, 22 May 2024 13:13:15 +0200 Message-ID: <CAGOYWV8SUDtSisWiyYqO=8N4_eyJ-Gr=Wj8_BdFcjHHwj3hu3w@mail.gmail.com> Subject: Re: git: 408957613bc0 - main - Regen To: Dmitry Salychev <dsl@freebsd.org> Cc: Lexi Winter <lexi@le-fay.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000000fe260619090601" X-Spamd-Bar: ---- 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:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4VkpZc3F7Nz52Sm --00000000000000fe260619090601 Content-Type: text/plain; charset="UTF-8" Hello, Not really as a mistake :) The files in question have many such commits (not only committed by me). So I have assumed this is a common practice. I'm happy to provide more details next time. However, I don't plan to revert it at this point as it seems pointless to complicate the log even more. For freebsd32: e90259af59a1 regen 38bfddf597b1 regen 7893419d492c Remove never implemented sbrk and sstk syscalls 30cdbb5833f6 freebsd32: Remove mac_syscall from the unimpl list af93fea71038 timerfd: Move implementation from linux compat to sys/kern c7df87209634 Regen 9121945d7003 Regenerate sysent stuff after $FreeBSD$ removal 7b42f338d7a3 freebsd32: Regen 11cdffc60325 Regen 6a0a634590e4 Regen f99cc5a38947 sysent: regen after 52a1d90c8bfe, posix_fadvise in capmode 8601fca7895c sysent: regen for syscallarg_t 0910a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments" 3889fb8af0b6 sysent: regen for syscallarg_t b7c55487ff2f Regen 5c1835b1d4b5 syscalls: regen 7fb006e7d61e syscalls: regen c2996f8ad930 syscalls: regen 30bc335a0501 freebsd32: regen 97fdcfcaf799 freebsd32: remove unnecessicary headers bcd07aaa4ebd freebsd32: regen 8460d3e9e6cb freebsd32: regen And for freebsd 408957613bc0 (HEAD -> main, origin/main, origin/HEAD) Regen 663838451ec6 syscalls: regen 38bfddf597b1 regen 7893419d492c Remove never implemented sbrk and sstk syscalls af93fea71038 timerfd: Move implementation from linux compat to sys/kern c7df87209634 Regen 9121945d7003 Regenerate sysent stuff after $FreeBSD$ removal 9abba78acc2a syscalls: regenerate 11cdffc60325 Regen 6a0a634590e4 Regen f99cc5a38947 sysent: regen after 52a1d90c8bfe, posix_fadvise in capmode 8601fca7895c sysent: regen for syscallarg_t 0910a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments" 3889fb8af0b6 sysent: regen for syscallarg_t b7c55487ff2f Regen 5c1835b1d4b5 syscalls: regen 7fb006e7d61e syscalls: regen c2996f8ad930 syscalls: regen e58e9a8cbd7c syscalls: regen 439c3d95638a Regen da9fe3529b3d Regen after 0dc332bff200 273728b1257f Regen 2c9764f36b6f regen syscall files after d51198d63b63 d89c1c461ce3 Reserve gaps in syscall numbers for local use 65a524b499ae Remove documentation of unimplemented syscalls 20321e622515 Regenerate syscall files after reallocation of aio_writev/aio_readv 1868a91fac5e Regenerate syscall files after addition of aio_writev/aio_readv 9dd48b87e6ca Regen. 0c5bd5f99320 Regen after r366145. Thanks, Mariusz On Wed, 22 May 2024 at 12:37, Dmitry Salychev <dsl@freebsd.org> wrote: > > Lexi Winter <lexi@le-fay.org> writes: > > > [[PGP Signed Part:Undecided]] > > Mariusz Zaborski: > >> The branch main has been updated by oshogbo: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd > >> > >> commit 408957613bc065c4444812c3ae276ace03697ebd > >> Author: Mariusz Zaborski <oshogbo@FreeBSD.org> > >> AuthorDate: 2024-05-21 20:02:50 +0000 > >> Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> > >> CommitDate: 2024-05-21 20:03:20 +0000 > >> > >> Regen > >> --- > >> sys/compat/freebsd32/freebsd32_sysent.c | 2 +- > >> sys/kern/init_sysent.c | 2 +- > >> 2 files changed, 2 insertions(+), 2 deletions(-) > > > > i'm sorry if this is considered accepted practice in FreeBSD (i'm not a > > committer) but could i please request more useful commit messages than > > "Regen" for things like this? > > > > when looking through 'git log', especially 'git log --format=oneline', > > it's really not clear what this commit actually does, meaning if i'm > > looking through the log for commits related to a problem i'm having, i > > have to examine commits like this by hand to see if they're related. > > > > it would save me (and other people, i suppose) a lot of time if the > > commit message could at least mention what it's touching, e.g. "Regen > > sys/compat/freebsd32/freebsd32_sysent.c". > > > > [[End of PGP Signed Part]] > > Looks like it slipped in by mistake. I expected it to be reverted and > re-worded. > > Regards, > Dmitry > > -- > https://wiki.freebsd.org/DmitrySalychev > --00000000000000fe260619090601 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hello,<br><br>Not really as a mistake :) The files in ques= tion have many such commits (not only committed by me). So I have assumed t= his is a common practice.<br>I'm happy to provide more details next tim= e. However, I don't plan to revert it at this point as it seems pointle= ss to complicate the log even more.<br><br>For freebsd32:<br>e90259af59a1 r= egen<br>38bfddf597b1 regen<br>7893419d492c Remove never implemented sbrk an= d sstk syscalls<br>30cdbb5833f6 freebsd32: Remove mac_syscall from the unim= pl list<br>af93fea71038 timerfd: Move implementation from linux compat to s= ys/kern<br>c7df87209634 Regen<br>9121945d7003 Regenerate sysent stuff after= $FreeBSD$ removal<br>7b42f338d7a3 freebsd32: Regen<br>11cdffc60325 Regen<b= r>6a0a634590e4 Regen<br>f99cc5a38947 sysent: regen after 52a1d90c8bfe, posi= x_fadvise in capmode<br>8601fca7895c sysent: regen for syscallarg_t<br>0910= a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments&qu= ot;<br>3889fb8af0b6 sysent: regen for syscallarg_t<br>b7c55487ff2f Regen<br= >5c1835b1d4b5 syscalls: regen<br>7fb006e7d61e syscalls: regen<br>c2996f8ad9= 30 syscalls: regen<br>30bc335a0501 freebsd32: regen<br>97fdcfcaf799 freebsd= 32: remove unnecessicary headers<br>bcd07aaa4ebd freebsd32: regen<br>8460d3= e9e6cb freebsd32: regen<br><br>And for freebsd<br>408957613bc0 (HEAD -> = main, origin/main, origin/HEAD) Regen<br>663838451ec6 syscalls: regen<br>38= bfddf597b1 regen<br>7893419d492c Remove never implemented sbrk and sstk sys= calls<br>af93fea71038 timerfd: Move implementation from linux compat to sys= /kern<br>c7df87209634 Regen<br>9121945d7003 Regenerate sysent stuff after $= FreeBSD$ removal<br>9abba78acc2a syscalls: regenerate<br>11cdffc60325 Regen= <br>6a0a634590e4 Regen<br>f99cc5a38947 sysent: regen after 52a1d90c8bfe, po= six_fadvise in capmode<br>8601fca7895c sysent: regen for syscallarg_t<br>09= 10a41ef3b9 Revert "syscallarg_t: Add a type for system call arguments&= quot;<br>3889fb8af0b6 sysent: regen for syscallarg_t<br>b7c55487ff2f Regen<= br>5c1835b1d4b5 syscalls: regen<br>7fb006e7d61e syscalls: regen<br>c2996f8a= d930 syscalls: regen<br>e58e9a8cbd7c syscalls: regen<br>439c3d95638a Regen<= br>da9fe3529b3d Regen after 0dc332bff200<br>273728b1257f Regen<br>2c9764f36= b6f regen syscall files after d51198d63b63<br>d89c1c461ce3 Reserve gaps in = syscall numbers for local use<br>65a524b499ae Remove documentation of unimp= lemented syscalls<br>20321e622515 Regenerate syscall files after reallocati= on of aio_writev/aio_readv<br>1868a91fac5e Regenerate syscall files after a= ddition of aio_writev/aio_readv<br>9dd48b87e6ca Regen.<br>0c5bd5f99320 Rege= n after r366145.<br><br>Thanks,<br>Mariusz</div><br><div class=3D"gmail_quo= te"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 22 May 2024 at 12:37, Dmi= try Salychev <<a href=3D"mailto:dsl@freebsd.org">dsl@freebsd.org</a>>= wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br> Lexi Winter <<a href=3D"mailto:lexi@le-fay.org" target=3D"_blank">lexi@l= e-fay.org</a>> writes:<br> <br> > [[PGP Signed Part:Undecided]]<br> > Mariusz Zaborski:<br> >> The branch main has been updated by oshogbo:<br> >> <br> >> URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D40895761= 3bc065c4444812c3ae276ace03697ebd" rel=3D"noreferrer" target=3D"_blank">http= s://cgit.FreeBSD.org/src/commit/?id=3D408957613bc065c4444812c3ae276ace03697= ebd</a><br> >> <br> >> commit 408957613bc065c4444812c3ae276ace03697ebd<br> >> Author:=C2=A0 =C2=A0 =C2=A0Mariusz Zaborski <oshogbo@FreeBSD.or= g><br> >> AuthorDate: 2024-05-21 20:02:50 +0000<br> >> Commit:=C2=A0 =C2=A0 =C2=A0Mariusz Zaborski <oshogbo@FreeBSD.or= g><br> >> CommitDate: 2024-05-21 20:03:20 +0000<br> >> <br> >>=C2=A0 =C2=A0 =C2=A0Regen<br> >> ---<br> >>=C2=A0 sys/compat/freebsd32/freebsd32_sysent.c | 2 +-<br> >>=C2=A0 sys/kern/init_sysent.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 | 2 +-<br> >>=C2=A0 2 files changed, 2 insertions(+), 2 deletions(-)<br> ><br> > i'm sorry if this is considered accepted practice in FreeBSD (i= 9;m not a<br> > committer) but could i please request more useful commit messages than= <br> > "Regen" for things like this?<br> ><br> > when looking through 'git log', especially 'git log --form= at=3Doneline',<br> > it's really not clear what this commit actually does, meaning if i= 'm<br> > looking through the log for commits related to a problem i'm havin= g, i<br> > have to examine commits like this by hand to see if they're relate= d.<br> ><br> > it would save me (and other people, i suppose) a lot of time if the<br= > > commit message could at least mention what it's touching, e.g. &qu= ot;Regen<br> > sys/compat/freebsd32/freebsd32_sysent.c".<br> ><br> > [[End of PGP Signed Part]]<br> <br> Looks like it slipped in by mistake. I expected it to be reverted and<br> re-worded.<br> <br> Regards,<br> Dmitry<br> <br> -- <br> <a href=3D"https://wiki.freebsd.org/DmitrySalychev" rel=3D"noreferrer" targ= et=3D"_blank">https://wiki.freebsd.org/DmitrySalychev</a><br> </blockquote></div> --00000000000000fe260619090601-- From nobody Wed May 22 12:02:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkqg847Mfz5LZv7; Wed, 22 May 2024 12:02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkqg83bLJz572h; Wed, 22 May 2024 12:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqfYKFfowWJY7TaXNxYb7i8tKZSDbnphe2s3qLNf9kE=; b=CT5VAMRCEbl9V/IF5iMiwnVjlLpVFH1vBoVx2XTa/zH5D1Vk3iTM4UU1a+PX8XL9HW62dv RHavGvdvOAHaS2jtbGAoNjjn/DWhLQiVnbCTytsdtH1K/EbidWJzAi0tDJzeTEYtmtAfxY ItPrvULGbcSFfCGaLPJCnGZnpPa9EWAHUWqAP57wqkY5vL07e00yVoLayd16YP2e/0FSGZ zTYdiOvh1LtGt0N5zpokEhVsT6oXY/CyJMvphB+V2mJoKwj6t9kBssvjc24quCZqP0Hatu DMbVSVu//jpDHOFGVXkl/CXg72MneUzvPAj+D0S8MJ+f899Xx3rdRkwBd8f+fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716379348; a=rsa-sha256; cv=none; b=Lr4CYUg0JPmlzbGydiqymJEoM9F2AaCTK0lvOJxG8KNsWNNI/PVi1icRxoz3MUfTE52DLL Xt2cgqi6ellA18MtzZGGIjmk08McYc4aI1ceqRLCIlywi71udb38mbfiL8NVZFRopx8nrC PB8qNAEPK/q4FV/54FzGoQneOgiXMLR8FhU0AkW/iiM4yAZgDbnVgqx7U3FzlteD54+bWF 198t4V79+any/UlcnO85853bvNlUNfKq1pJMCXplpkrDf+UKh8YeizfMXgQJntXydUx/5q gRsrOMKTBpYFxJJSzLhR6BkK7T/Zoao5xOHSzsFhG94VKCGeF+BE9N2+sEkbKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqfYKFfowWJY7TaXNxYb7i8tKZSDbnphe2s3qLNf9kE=; b=xvf+FkH/7X0vMrzHjNGgDdXSjLrGojIX3afnulFRd0M3St6aUpc2X5bCmlOpyvZ63yjPy/ Tf4JYZN3NpeVSkLDAZPBoIP7adH9KzHWi+1KEzfejXNxCE6DUlNO1HzAJ/s/zzT7yIwka0 BPNS1N3umZP/kXb8634i9Z1kpuXbKQUOmOVRRBQY2/KhP1v7I4WfiGR46+xPmxohWkqoeO l8bnucmrNWn2dJs6enG7pBQ2dv/sVdRGSYlLf9jz0knSo/VhYTnpSznV7f+Jicm9eNzDs+ aVrlYD24BYjBWNkM+mXAJ64+3px82FZ63j5bLdw8rzu0kMjHJzP0IMMjvETfFA== 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 4Vkqg83BxZz14vy; Wed, 22 May 2024 12:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MC2S5w064291; Wed, 22 May 2024 12:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MC2Sff064288; Wed, 22 May 2024 12:02:28 GMT (envelope-from git) Date: Wed, 22 May 2024 12:02:28 GMT Message-Id: <202405221202.44MC2Sff064288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: 8aac90f18aef - main - mac_do: add a new MAC/do policy and mdo(1) utility List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8aac90f18aef7c9eea906c3ff9a001ca7b94f375 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=8aac90f18aef7c9eea906c3ff9a001ca7b94f375 commit 8aac90f18aef7c9eea906c3ff9a001ca7b94f375 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-09 22:03:28 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-22 12:01:41 +0000 mac_do: add a new MAC/do policy and mdo(1) utility This policy enables a user to become another user without having to be root (hence no setuid binary). it is configured via rules using sysctl security.mac.do.rules For example: security.mac.do.rules=uid=1001:80,gid=0:any The above rule means the user identifier by the uid 1001 is able to become user 80 Any user of the group 0 are allowed to become any user on the system. The mdo(1) utility expects the MAC/do policy to be installed and its rules defined. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D45145 --- share/man/man4/Makefile | 1 + share/man/man4/mac_do.4 | 78 +++++++ sys/modules/Makefile | 2 + sys/modules/mac_do/Makefile | 6 + sys/security/mac_do/mac_do.c | 545 +++++++++++++++++++++++++++++++++++++++++++ usr.bin/Makefile | 1 + usr.bin/mdo/Makefile | 4 + usr.bin/mdo/mdo.1 | 44 ++++ usr.bin/mdo/mdo.c | 76 ++++++ 9 files changed, 757 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 164efe3ddf66..69424a4be271 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -297,6 +297,7 @@ MAN= aac.4 \ mac_biba.4 \ mac_bsdextended.4 \ mac_ddb.4 \ + mac_do.4 \ mac_ifoff.4 \ mac_ipacl.4 \ mac_lomac.4 \ diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 new file mode 100644 index 000000000000..9a9ebe1ca989 --- /dev/null +++ b/share/man/man4/mac_do.4 @@ -0,0 +1,78 @@ +.\"- +.\" Copyright (c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 22, 2024 +.Dt MAC_DO 4 +.Os +.Sh NAME +.Nm mac_do +.Nd "policy allowing user to execute program as another user" +.Sh SYNOPSIS +To compile the +.Nm +policy into your kernel, place the following lines +in your kernel configruation file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Cd "options MAC_DO" +.Ed +.Sh DESCRIPTION +The +.Nm +policy grants users the ability to run processs as other users +according to predefined rules. +.Pp +The exact set of kernel privileges granted are: +.Bl -inset -compact -offset indent +.It Dv PRIV_CRED_SETGROUPS +.It Dv PRIV_CRET_SETUID +.El +.Pp +The following +.Xr sysctl 8 +MIBs are available: +.Bl -tag -width indent +.It Va security.mac.do.enabled +Enable the +.Nm +policy. +(Default: 1). +.It Va security.mac.do.rules +The set of rules. +.El +.Pp +The rules consist of a list of elements separated by +.So , Sc . +Each element is of the form +.Sm off +.Do +.Op Cm uid | Cm gid +.Li = +.Ar fid +.Li : +.Ar tid +.Dc +.Sm on . +Where +.Ar fid +is the uid or gid of the user or group the rule applies to, and +.Ar tid +is the uid of the targetted user. +Two special forms are accepted for +.Ar tid : +.Va any +or +.Va * , +which allow to target any user. +.Sh EXAMPLES +The following rule: +.Pp +.Dl security.mac.do.rules=uid=1001:80,gid=0:any +.Pp +means the user with the uid 1001 can execute processes as user with uid 80, +all the users which belongs to the group gid 0 can execute processes as any user. +.Sh SEE ALSO +.Xr mac 4 , +.Xr mdo 1 diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 2bd8914ab0d5..ad274e7f7b47 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -226,6 +226,7 @@ SUBDIR= \ ${_mac_biba} \ ${_mac_bsdextended} \ ${_mac_ddb} \ + ${_mac_do} \ ${_mac_ifoff} \ ${_mac_ipacl} \ ${_mac_lomac} \ @@ -587,6 +588,7 @@ _mac_bsdextended= mac_bsdextended .if ${KERN_OPTS:MDDB} || defined(ALL_MODULES) _mac_ddb= mac_ddb .endif +_mac_do= mac_do _mac_ifoff= mac_ifoff _mac_ipacl= mac_ipacl _mac_lomac= mac_lomac diff --git a/sys/modules/mac_do/Makefile b/sys/modules/mac_do/Makefile new file mode 100644 index 000000000000..532a5b9faa71 --- /dev/null +++ b/sys/modules/mac_do/Makefile @@ -0,0 +1,6 @@ +.PATH: ${SRCTOP}/sys/security/mac_do + +KMOD= mac_do +SRCS= mac_do.c vnode_if.h + +.include <bsd.kmod.mk> diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c new file mode 100644 index 000000000000..8685954b7db6 --- /dev/null +++ b/sys/security/mac_do/mac_do.c @@ -0,0 +1,545 @@ +/*- + * Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <sys/param.h> +#include <sys/malloc.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/module.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/socket.h> +#include <sys/sx.h> +#include <sys/sysctl.h> +#include <sys/systm.h> +#include <sys/ucred.h> +#include <sys/vnode.h> + +#include <security/mac/mac_policy.h> + +SYSCTL_DECL(_security_mac); + +static SYSCTL_NODE(_security_mac, OID_AUTO, do, + CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "mac_do policy controls"); + +static int do_enabled = 1; +SYSCTL_INT(_security_mac_do, OID_AUTO, enabled, CTLFLAG_RWTUN, + &do_enabled, 0, "Enforce do policy"); + +static MALLOC_DEFINE(M_DO, "do_rule", "Rules for mac_do"); + +#define MAC_RULE_STRING_LEN 1024 + +static unsigned mac_do_osd_jail_slot; + +#define RULE_UID 1 +#define RULE_GID 2 +#define RULE_ANY 3 + +struct rule { + int from_type; + union { + uid_t f_uid; + gid_t f_gid; + }; + int to_type; + uid_t t_uid; + TAILQ_ENTRY(rule) r_entries; +}; + +struct mac_do_rule { + char string[MAC_RULE_STRING_LEN]; + TAILQ_HEAD(rulehead, rule) head; +}; + +static struct mac_do_rule rules0; + +static void +toast_rules(struct rulehead *head) +{ + struct rule *r; + + while ((r = TAILQ_FIRST(head)) != NULL) { + TAILQ_REMOVE(head, r, r_entries); + free(r, M_DO); + } +} + +static int +parse_rule_element(char *element, struct rule **rule) +{ + int error = 0; + char *type, *id, *p; + struct rule *new; + + new = malloc(sizeof(*new), M_DO, M_ZERO|M_WAITOK); + + type = strsep(&element, "="); + if (type == NULL) { + error = EINVAL; + goto out; + } + if (strcmp(type, "uid") == 0) { + new->from_type = RULE_UID; + } else if (strcmp(type, "gid") == 0) { + new->from_type = RULE_GID; + } else { + error = EINVAL; + goto out; + } + id = strsep(&element, ":"); + if (id == NULL) { + error = EINVAL; + goto out; + } + if (new->from_type == RULE_UID) + new->f_uid = strtol(id, &p, 10); + if (new->from_type == RULE_GID) + new->f_gid = strtol(id, &p, 10); + if (*p != '\0') { + error = EINVAL; + goto out; + } + if (*element == '\0') { + error = EINVAL; + goto out; + } + if (strcmp(element, "any") == 0 || strcmp(element, "*") == 0) { + new->to_type = RULE_ANY; + } else { + new->to_type = RULE_UID; + new->t_uid = strtol(element, &p, 10); + if (*p != '\0') { + error = EINVAL; + goto out; + } + } +out: + if (error != 0) { + free(new, M_DO); + *rule = NULL; + } else + *rule = new; + return (error); +} + +static int +parse_rules(char *string, struct rulehead *head) +{ + struct rule *new; + char *element; + int error = 0; + + while ((element = strsep(&string, ",")) != NULL) { + if (strlen(element) == 0) + continue; + error = parse_rule_element(element, &new); + if (error) + goto out; + TAILQ_INSERT_TAIL(head, new, r_entries); + } +out: + if (error != 0) + toast_rules(head); + return (error); +} + +static struct mac_do_rule * +mac_do_rule_find(struct prison *spr, struct prison **prp) +{ + struct prison *pr; + struct mac_do_rule *rules; + + for (pr = spr;; pr = pr->pr_parent) { + mtx_lock(&pr->pr_mtx); + if (pr == &prison0) { + rules = &rules0; + break; + } + rules = osd_jail_get(pr, mac_do_osd_jail_slot); + if (rules != NULL) + break; + mtx_unlock(&pr->pr_mtx); + } + *prp = pr; + + return (rules); +} + +static int +sysctl_rules(SYSCTL_HANDLER_ARGS) +{ + char *copy_string, *new_string; + struct rulehead head, saved_head; + struct prison *pr; + struct mac_do_rule *rules; + int error; + + rules = mac_do_rule_find(req->td->td_ucred->cr_prison, &pr); + mtx_unlock(&pr->pr_mtx); + if (req->newptr == NULL) + return (sysctl_handle_string(oidp, rules->string, MAC_RULE_STRING_LEN, req)); + + new_string = malloc(MAC_RULE_STRING_LEN, M_DO, + M_WAITOK|M_ZERO); + mtx_lock(&pr->pr_mtx); + strlcpy(new_string, rules->string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + + error = sysctl_handle_string(oidp, new_string, MAC_RULE_STRING_LEN, req); + if (error) + goto out; + + copy_string = strdup(new_string, M_DO); + TAILQ_INIT(&head); + error = parse_rules(copy_string, &head); + free(copy_string, M_DO); + if (error) + goto out; + TAILQ_INIT(&saved_head); + mtx_lock(&pr->pr_mtx); + TAILQ_CONCAT(&saved_head, &rules->head, r_entries); + TAILQ_CONCAT(&rules->head, &head, r_entries); + strlcpy(rules->string, new_string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + toast_rules(&saved_head); + +out: + free(new_string, M_DO); + return (error); +} + +SYSCTL_PROC(_security_mac_do, OID_AUTO, rules, + CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE, + 0, 0, sysctl_rules, "A", + "Rules"); + +static void +destroy(struct mac_policy_conf *mpc) +{ + osd_jail_deregister(mac_do_osd_jail_slot); + toast_rules(&rules0.head); +} + +static void +mac_do_alloc_prison(struct prison *pr, struct mac_do_rule **lrp) +{ + struct prison *ppr; + struct mac_do_rule *rules, *new_rules; + void **rsv; + + rules = mac_do_rule_find(pr, &ppr); + if (ppr == pr) + goto done; + + mtx_unlock(&ppr->pr_mtx); + new_rules = malloc(sizeof(*new_rules), M_PRISON, M_WAITOK|M_ZERO); + rsv = osd_reserve(mac_do_osd_jail_slot); + rules = mac_do_rule_find(pr, &ppr); + if (ppr == pr) { + free(new_rules, M_PRISON); + osd_free_reserved(rsv); + goto done; + } + mtx_lock(&pr->pr_mtx); + osd_jail_set_reserved(pr, mac_do_osd_jail_slot, rsv, new_rules); + TAILQ_INIT(&new_rules->head); +done: + if (lrp != NULL) + *lrp = rules; + mtx_unlock(&pr->pr_mtx); + mtx_unlock(&ppr->pr_mtx); +} + +static void +mac_do_dealloc_prison(void *data) +{ + struct mac_do_rule *r = data; + + toast_rules(&r->head); +} + +static int +mac_do_prison_set(void *obj, void *data) +{ + struct prison *pr = obj; + struct vfsoptlist *opts = data; + struct rulehead head, saved_head; + struct mac_do_rule *rules; + char *rules_string, *copy_string; + int error, jsys, len; + + error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error == ENOENT) + jsys = -1; + error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len); + if (error == ENOENT) + rules = NULL; + else + jsys = JAIL_SYS_NEW; + switch (jsys) { + case JAIL_SYS_INHERIT: + mtx_lock(&pr->pr_mtx); + osd_jail_del(pr, mac_do_osd_jail_slot); + mtx_unlock(&pr->pr_mtx); + break; + case JAIL_SYS_NEW: + mac_do_alloc_prison(pr, &rules); + if (rules_string == NULL) + break; + copy_string = strdup(rules_string, M_DO); + TAILQ_INIT(&head); + error = parse_rules(copy_string, &head); + free(copy_string, M_DO); + if (error) + return (1); + TAILQ_INIT(&saved_head); + mtx_lock(&pr->pr_mtx); + TAILQ_CONCAT(&saved_head, &rules->head, r_entries); + TAILQ_CONCAT(&rules->head, &head, r_entries); + strlcpy(rules->string, rules_string, MAC_RULE_STRING_LEN); + mtx_unlock(&pr->pr_mtx); + toast_rules(&saved_head); + break; + } + return (0); +} + +SYSCTL_JAIL_PARAM_SYS_NODE(mdo, CTLFLAG_RW, "Jail MAC/do parameters"); +SYSCTL_JAIL_PARAM_STRING(_mdo, rules, CTLFLAG_RW, MAC_RULE_STRING_LEN, + "Jail MAC/do rules"); + +static int +mac_do_prison_get(void *obj, void *data) +{ + struct prison *ppr, *pr = obj; + struct vfsoptlist *opts = data; + struct mac_do_rule *rules; + int jsys, error; + + rules = mac_do_rule_find(pr, &ppr); + error = vfs_setopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error != 0 && error != ENOENT) + goto done; + error = vfs_setopts(opts, "mdo.rules", rules->string); + if (error != 0 && error != ENOENT) + goto done; + mtx_unlock(&ppr->pr_mtx); + error = 0; +done: + return (0); +} + +static int +mac_do_prison_create(void *obj, void *data __unused) +{ + struct prison *pr = obj; + + mac_do_alloc_prison(pr, NULL); + return (0); +} + +static int +mac_do_prison_remove(void *obj, void *data __unused) +{ + struct prison *pr = obj; + struct mac_do_rule *r; + + mtx_lock(&pr->pr_mtx); + r = osd_jail_get(pr, mac_do_osd_jail_slot); + mtx_unlock(&pr->pr_mtx); + toast_rules(&r->head); + return (0); +} + +static int +mac_do_prison_check(void *obj, void *data) +{ + struct vfsoptlist *opts = data; + char *rules_string; + int error, jsys, len; + + error = vfs_copyopt(opts, "mdo", &jsys, sizeof(jsys)); + if (error != ENOENT) { + if (error != 0) + return (error); + if (jsys != JAIL_SYS_NEW && jsys != JAIL_SYS_INHERIT) + return (EINVAL); + } + error = vfs_getopt(opts, "mdo.rules", (void **)&rules_string, &len); + if (error != ENOENT) { + if (error != 0) + return (error); + if (len > MAC_RULE_STRING_LEN) { + vfs_opterror(opts, "mdo.rules too long"); + return (ENAMETOOLONG); + } + } + if (error == ENOENT) + error = 0; + return (error); +} + +static void +init(struct mac_policy_conf *mpc) +{ + static osd_method_t methods[PR_MAXMETHOD] = { + [PR_METHOD_CREATE] = mac_do_prison_create, + [PR_METHOD_GET] = mac_do_prison_get, + [PR_METHOD_SET] = mac_do_prison_set, + [PR_METHOD_CHECK] = mac_do_prison_check, + [PR_METHOD_REMOVE] = mac_do_prison_remove, + }; + struct prison *pr; + + mac_do_osd_jail_slot = osd_jail_register(mac_do_dealloc_prison, methods); + TAILQ_INIT(&rules0.head); + sx_slock(&allprison_lock); + TAILQ_FOREACH(pr, &allprison, pr_list) + mac_do_alloc_prison(pr, NULL); + sx_sunlock(&allprison_lock); +} + +static bool +rule_is_valid(struct ucred *cred, struct rule *r) +{ + if (r->from_type == RULE_UID && r->f_uid == cred->cr_uid) + return (true); + if (r->from_type == RULE_GID && r->f_gid == cred->cr_gid) + return (true); + return (false); +} + +static int +priv_grant(struct ucred *cred, int priv) +{ + struct rule *r; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (EPERM); + + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (rule_is_valid(cred, r)) { + switch (priv) { + case PRIV_CRED_SETGROUPS: + case PRIV_CRED_SETUID: + mtx_unlock(&pr->pr_mtx); + return (0); + default: + break; + } + } + } + mtx_unlock(&pr->pr_mtx); + return (EPERM); +} + +static int +check_setgroups(struct ucred *cred, int ngrp, gid_t *groups) +{ + struct rule *r; + char *fullpath = NULL; + char *freebuf = NULL; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (0); + if (cred->cr_uid == 0) + return (0); + + if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) + return (EPERM); + if (strcmp(fullpath, "/usr/bin/mdo") != 0) { + free(freebuf, M_TEMP); + return (EPERM); + } + free(freebuf, M_TEMP); + + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (rule_is_valid(cred, r)) { + mtx_unlock(&pr->pr_mtx); + return (0); + } + } + mtx_unlock(&pr->pr_mtx); + + return (EPERM); +} + +static int +check_setuid(struct ucred *cred, uid_t uid) +{ + struct rule *r; + int error; + char *fullpath = NULL; + char *freebuf = NULL; + struct prison *pr; + struct mac_do_rule *rule; + + if (do_enabled == 0) + return (0); + if (cred->cr_uid == uid || cred->cr_uid == 0) + return (0); + + if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) + return (EPERM); + if (strcmp(fullpath, "/usr/bin/mdo") != 0) { + free(freebuf, M_TEMP); + return (EPERM); + } + free(freebuf, M_TEMP); + + error = EPERM; + rule = mac_do_rule_find(cred->cr_prison, &pr); + TAILQ_FOREACH(r, &rule->head, r_entries) { + if (r->from_type == RULE_UID) { + if (cred->cr_uid != r->f_uid) + continue; + if (r->to_type == RULE_ANY) { + error = 0; + break; + } + if (r->to_type == RULE_UID && uid == r->t_uid) { + error = 0; + break; + } + } + if (r->from_type == RULE_GID) { + if (cred->cr_gid != r->f_gid) + continue; + if (r->to_type == RULE_ANY) { + error = 0; + break; + } + if (r->to_type == RULE_UID && uid == r->t_uid) { + error = 0; + break; + } + } + } + mtx_unlock(&pr->pr_mtx); + return (error); +} + +static struct mac_policy_ops do_ops = { + .mpo_destroy = destroy, + .mpo_init = init, + .mpo_cred_check_setuid = check_setuid, + .mpo_cred_check_setgroups = check_setgroups, + .mpo_priv_grant = priv_grant, +}; + +MAC_POLICY_SET(&do_ops, mac_do, "MAC/do", + MPC_LOADTIME_FLAG_UNLOADOK, NULL); +MODULE_VERSION(mac_do, 1); diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 0a584a18d14a..a9d5c1563797 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -87,6 +87,7 @@ SUBDIR= alias \ lzmainfo \ m4 \ mandoc \ + mdo \ mesg \ ministat \ mkdep \ diff --git a/usr.bin/mdo/Makefile b/usr.bin/mdo/Makefile new file mode 100644 index 000000000000..e20f2719fc82 --- /dev/null +++ b/usr.bin/mdo/Makefile @@ -0,0 +1,4 @@ +PROG= mdo +SRCS= mdo.c + +.include <bsd.prog.mk> diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 new file mode 100644 index 000000000000..115ce44f4531 --- /dev/null +++ b/usr.bin/mdo/mdo.1 @@ -0,0 +1,44 @@ +.\"- +.\" Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 22, 2024 +.Dt MDO 1 +.Os +.Sh NAME +.Nm mdo +.Nd execute commands as another user +.Sh SYNOPSIS +.Nm +.Op Fl u Ar username +.Op Fl i +.Op command Op args +.Sh DESCRIPTION +The +.Nm +utility executes the specified +.Ar command +as user +.Ar username . +.Pp +If no +.Ar username +is provided it defaults to the +.Va root +user. +If no +.Ar command +is specified, it will execute the shell specified as +.Va SHELL +environnement variable, falling back on +.Pa /bin/sh . +.Pp +The +.Fl i +option can be used to only call +.Fn setuid +and keep the group from the calling user. +.Sh SEE ALSO +.Xr su 1 +.Xr mac_do 4 diff --git a/usr.bin/mdo/mdo.c b/usr.bin/mdo/mdo.c new file mode 100644 index 000000000000..22e2838daa08 --- /dev/null +++ b/usr.bin/mdo/mdo.c @@ -0,0 +1,76 @@ +/*- + * Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <sys/limits.h> + +#include <err.h> +#include <paths.h> +#include <pwd.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +static void +usage(void) +{ + fprintf(stderr, "usage: mdo [-u username] [-i] [--] [command [args]]\n"); + exit(EXIT_FAILURE); +} + +int +main(int argc, char **argv) +{ + struct passwd *pw; + const char *username = "root"; + bool uidonly = false; + int ch; + + while ((ch = getopt(argc, argv, "u:i")) != -1) { + switch (ch) { + case 'u': + username = optarg; + break; + case 'i': + uidonly = true; + break; + default: + usage(); + } + } + argc -= optind; + argv += optind; + + if ((pw = getpwnam(username)) == NULL) { + if (strspn(username, "0123456789") == strlen(username)) { + const char *errp = NULL; + uid_t uid = strtonum(username, 0, UID_MAX, &errp); + if (errp != NULL) + err(EXIT_FAILURE, "%s", errp); + pw = getpwuid(uid); + } + if (pw == NULL) + err(EXIT_FAILURE, "invalid username '%s'", username); + } + if (!uidonly) { + if (initgroups(pw->pw_name, pw->pw_gid) == -1) + err(EXIT_FAILURE, "failed to call initgroups"); + if (setgid(pw->pw_gid) == -1) + err(EXIT_FAILURE, "failed to call setgid"); + } + if (setuid(pw->pw_uid) == -1) + err(EXIT_FAILURE, "failed to call setuid"); + if (*argv == NULL) { + const char *sh = getenv("SHELL"); + if (sh == NULL) + sh = _PATH_BSHELL; + execlp(sh, sh, "-i", NULL); + } else { + execvp(argv[0], argv); + } + err(EXIT_FAILURE, "exec failed"); +} From nobody Wed May 22 12:06:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkqln1tPLz5Lb4g; Wed, 22 May 2024 12:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkqln0b3Bz57JQ; Wed, 22 May 2024 12:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUsQdyVdqUmEDeBNTRe18Oc1yRZ+8xLWO3PzANOYCKA=; b=Uwt62AV51cTgQn0lmUmqriov1KYCvhrZxMOiQHY0iqtlV0gOEW2goU2zBhT2q/L94QcMMG 6gdE/NaXEaQsX/Wolnc0W0Y50dSpvVUp2BZTNSl2fesrj9AXzdohFbbfpNJn6R6JnSfKLh VdJUpjHbJqD287VOpiYDSLDcOPrys7JP1DoiaR8K0G4WEUOpSr5E1V69cxI98s85HFQKX3 hfCq8+E+idqO1K8MEB+yuIqQtAr8W2gUXnxVr2bynu1XOMUUSeTDEYHlLBuBibQEyxy/YP t9QSPoZtq/b7m30s2W5Ee+BUyW8VCZzaJGqnEANUybckMZVxFOSw+/nBJHUb5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716379589; a=rsa-sha256; cv=none; b=TZDL+60l1j5fUyOKGnrtn21EroL8hSW5Ty0qIqm7PhNpoDxyCmGGdSwzfZvVj5O32x/AGM H83t/vkOPtVEVQuI9G1cWjnjcNOj3Zcr9DIGFH5CDyDYhKen+5F1OIxgWMQt+OCs7BClc/ v085OvVwAd9I9T/QtHqea9GDKUGNhUUHln9OYa6b7laOavv6gQawxVCPpG6gxn5pi8M8pr 3hQbRxWJcUrYGZQAI8JOdgIivj6tfKLcPsbEBEzJ9pMu8QhnOs8/3YQ1uyxe2kDHSgLvkB Sxn4wkq+FBnorgSMe94ghi/HdMkxE2Tug1Bw9+JwKufEggtk3aZQZLv6v/F2Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716379589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUsQdyVdqUmEDeBNTRe18Oc1yRZ+8xLWO3PzANOYCKA=; b=MaUxXgy8g+v6s0yPmit4siXVkKHGEEEhOl7t7sztWlyHITQZxQZi0jRlu3K8A9twsfQlo1 idbkdU7jKw5sOOIz76CAgYXKw2F+Vg/kuuAXNeFTWxDHb/ER7IzuJ9WZmecdNsqy5bVmKG 8yPiZQ9zouTf76pmG3UZ9pdiFTW3vhuVgz4LTypTsB2Jfeg/rOZzY+cigJn5RskQFGID4J 9qw0oor/35V9hoCzTBNirGD1jYlPFXCDNSxA2tCRfbtVXVgR1ONnEMp4D3JWG8sWl4bP68 ZvvzAmBSKRJsA7ZCEr1e/CXTG2oCPCkcY8eobxB0ROBmXNHY821BeJTdRBtz7Q== 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 4Vkqln03snz14cv; Wed, 22 May 2024 12:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MC6SCV064985; Wed, 22 May 2024 12:06:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MC6S7e064982; Wed, 22 May 2024 12:06:28 GMT (envelope-from git) Date: Wed, 22 May 2024 12:06:28 GMT Message-Id: <202405221206.44MC6S7e064982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: c180fd3d75c4 - main - RELNOTES: document MAC/do List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c180fd3d75c4289a7dcf675dc160c74aafd451c3 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c180fd3d75c4289a7dcf675dc160c74aafd451c3 commit c180fd3d75c4289a7dcf675dc160c74aafd451c3 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-22 12:05:57 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-22 12:05:57 +0000 RELNOTES: document MAC/do --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index 5c367720c928..5c2eff22168e 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +8aac90f18aef: + new MAC/do policy and mdo(1) utility which enables a user to + become another user without the requirement of setuid root. + 7398d1ece5cf: hw.snd.version is removed. From nobody Wed May 22 13:23:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksSM0ZJ6z5Ljd0; Wed, 22 May 2024 13:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksSL6srFz43Fw; Wed, 22 May 2024 13:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OW4zJAG1qWMpECGjbvXrd5yadnz3dwLcMxZu1l4UdNA=; b=Iswn1tppIfT+EaklcHZu7FtKUOXGgdgJOV1LA03k4ouAmIG1gJbcyayjrRLwT+1Y8cMYoe HlLnj1xkn787IZIfmeGA5LWNpbbLmQ/+wtzZaaYV0w9l/mAFot5l4dI758I7arlkPYbfPY BjwRmgd1iG6hfxeMgKaYsNnYl0ckC789QXH6p/K5nwVAIhBXD+d23XyzILb2NjV5djRYSw TZvPjrXcPR8YaplMOtK+Yu++mwTSGhjJlbH5rxzd/TjrGcUt8ZAZD6yZ3JPLsSnpfLsPnE tTj3I/k+3NgbisZBZOpAUI7SSDSxj5u5gFPFXGY9KYYsQGZbUNY8m4LsdEx25g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384195; a=rsa-sha256; cv=none; b=MR20kOxb3TQgsklu2Xtsz0kFISlXu7yajl7GNaB+rQ0EOg/ceucKL4WssEzgNv16PXnCRT qx7GauDkJ5ErrYyqhDKvP9zIboFbO5p5JJMlp6aMdhcYKJbydWNCZpMH87I0S7MP2MvCI1 DVRqeGdg+4jO9MXYvhvPE1OX2wVlF2/Up0dIESX84WD6+XBjX/XKzuddMBkr7GUvjzj45H 42npbXcDCfoEYOTXBR2LzMS1RWVNZ3ah0WIRnltzMGD90PO9xT5UQ6PLlZKTl3oiqu2DQh rBws7qwbSZjT4Lt3dx8crA7btkGNsWohom50kG8EY7qZYoOSL5EwmD2uaxU3hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OW4zJAG1qWMpECGjbvXrd5yadnz3dwLcMxZu1l4UdNA=; b=a3NUpfB3ALL55ybYYoXHz43lYsNTtIs8VnTko6GWsHtS1aunp+YGGZU2iW105QzfuohvPf H6bm8M7NB6eumSS3PDhIcNCwxo86W1Ep310Io4VbwFvL2d1Y73TcZIqEXxBv9IxAslqqxF pyecpmcYDh6EXDy/oBa+0eOhfhjV3luN1JGulZCEyUkTdWOMTfFIUToLMzQiRHY1Tev6iK bP13Bz3ex10/fSogMnDlYGGxRxyaEFQt4aB5AoEGTkYb3bu3tcx4vcP37PAAUDZQbYMuh4 ARgAVtZlW9v1mFHazkeZIPNJ0H1M9Jjtn/v69Ia1GKb65RN7LAqUtV+tHZdsCA== 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 4VksSL6SY3z16ZN; Wed, 22 May 2024 13:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNEFA098555; Wed, 22 May 2024 13:23:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNE3s098553; Wed, 22 May 2024 13:23:14 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:14 GMT Message-Id: <202405221323.44MDNE3s098553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: a4a473104ec4 - releng/14.1 - sound: Remove nmix variable from mixer_oss_mixerinfo() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: a4a473104ec4a42c66f1b9a09736954ebad43e7e Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a4a473104ec4a42c66f1b9a09736954ebad43e7e commit a4a473104ec4a42c66f1b9a09736954ebad43e7e Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-09 19:07:48 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 13:20:42 +0000 sound: Remove nmix variable from mixer_oss_mixerinfo() nmix is used to compare against oss_mixerinfo->dev, which is a user-supplied value to select the mixer device (if not -1, in which case we'll select the default one) we want to fetch the information of. It is also used to set oss_mixerinfo->dev in case it is -1. However, nmix is at best redundant, since we have the loop counter already (i), and confusing at worst. For example, suppose a system with 3 mixer devices. We call SNDCTL_MIXERINFO with oss_mixerinfo->dev=1, meaning we want to get information for /dev/mixer1. Suppose /dev/mixer0 detaches while inside the loop, so we'll hit the loop's "continue" case, and nmix won't get incremented (i.e will stay 0 for now). At this point nmix counts 1 device less, so when it reaches 1, we'll be fetching /dev/mixer2's information instead of /dev/mixer1's. This is also true in case the mixer device disappears prior to the call to mixer_oss_mixerinfo(). Simply remove nmix and use the loop counter to both set oss_mixerinfo->dev and check against it in case a non -1 value is supplied. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45135 (cherry picked from commit 2f31a5eb75f1e47b5c49f574e8ce48d2c863e9d3) (cherry picked from commit 8b4e2ba31d1b171f688cb630f1827ec397ecaacb) Approved by: re (cperciva) --- sys/dev/sound/pcm/mixer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 0645089ac503..31a633afb380 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1430,7 +1430,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) { struct snddev_info *d; struct snd_mixer *m; - int nmix, i; + int i; /* * If probing the device handling the ioctl, make sure it's a mixer @@ -1441,7 +1441,6 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) d = NULL; m = NULL; - nmix = 0; /* * There's a 1:1 relationship between mixers and PCM devices, so @@ -1461,7 +1460,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) if (d->mixer_dev != NULL && d->mixer_dev->si_drv1 != NULL && ((mi->dev == -1 && d->mixer_dev == i_dev) || - mi->dev == nmix)) { + mi->dev == i)) { m = d->mixer_dev->si_drv1; mtx_lock(m->lock); @@ -1473,7 +1472,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) * sure to unlock when existing. */ bzero((void *)mi, sizeof(*mi)); - mi->dev = nmix; + mi->dev = i; snprintf(mi->id, sizeof(mi->id), "mixer%d", i); strlcpy(mi->name, m->name, sizeof(mi->name)); mi->modify_counter = m->modify_counter; @@ -1537,8 +1536,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) mi->legacy_device = i; */ mtx_unlock(m->lock); - } else - ++nmix; + } PCM_UNLOCK(d); From nobody Wed May 22 13:23:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksSN2JrRz5Ljd1; Wed, 22 May 2024 13:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksSN0NTkz4396; Wed, 22 May 2024 13:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vh98dy3arB81QILCOpX6g9b81TSZolo7ozORMQoZIaI=; b=PcK2Ho0oqVZGNqTp+khxXzw+zKDQQTffx1HRxIa+HTvtcsl80iwRxQvibnhLLay78UUPfl nRomRJLyYkPT6cO31f48Ryh/dXWHi34eWvzbG4truhHLLtjX5+EstGI8AerM8xcXfQk0uO gP66dx3pAYy6qUECHwdrUhlYE/x/zdjjmx6LOK4gthiuGu8SfbECh1M3IUgkcTKCuSAT23 Ir8Tng1AKiCXmPqDZWn1C4dHFdnjOOKae4D1VH1YtzL2QRlBCyT3/3PQ5IwHY8tN3plbvg QaEo7wogjzy1/WuNicMU33Zp+LIdQJfi4j+uee9BRuavt+6D1NZt+YExkd6q6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384196; a=rsa-sha256; cv=none; b=XMkHit6PfoE9ty0GJ4xcJpN3q26lnytLOFCVKt5PtxETl0wxCjZC98kYQ11ytas/4MBxNY 8BUs3Znj0Vz1DQ3/nhkZdR8X/jBLl49OqeVzafTw5UeZrBdhDLm15FCRfhAjURvKpKmxSf adztRUphp3wAK41iKyRIWLz0xtscwkQntoX/vxoIKjxemi+P8WXiS+2NBbWlCROIcnvrGh NHJwxma99jR3CyLhinZXD5awYB8OatPstCjVRCBWsA4pkKJ3KC0zjJFb/DXlz6uTf2hIYQ 9j5zb/fwEE9RuKlApQ6e7ViuJXMiFpYrPFYkZy3llgsJh8gLKKMaERhVXPQiFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vh98dy3arB81QILCOpX6g9b81TSZolo7ozORMQoZIaI=; b=PbvjVMM4JUcMjy2ScFlSDAet5flzP6tWHJwXIZNMjAoMCBdTwHKeOGxg3/Qzwe1QCwy4Xp 1q0iuHcIHUWjVQKrQrQ9jgcz5pIbVGWmVw08a59zB3H3ib17qHI9SbPg8o6AeZ+6VQeCf4 kG8uy+fqP7sNEzeAv6fnG5HfRGw8156I4R1+7iGvO6WtdIiCE+BbpuFcWO3oEq25Fz/mea mhDlv0UZwDYhjukmhMk7TDS8cx4M5cAcdt0E9ZBeRzbnWtW5DEWIztS8azMpE6dyXMIlBn Bp2lTIrU4JmVKljShVaCZoauiVG6ee9W5uk8VCYEQdphcSuKHU35nrDZppRarQ== 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 4VksSM75L7z16PS; Wed, 22 May 2024 13:23:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNFwE098591; Wed, 22 May 2024 13:23:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNFJm098588; Wed, 22 May 2024 13:23:15 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:15 GMT Message-Id: <202405221323.44MDNFJm098588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: a0ff4e0f3e02 - releng/14.1 - sound: Fix oss_sysinfo->numcards List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: a0ff4e0f3e02d31e01844295f216ec87826130de Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a0ff4e0f3e02d31e01844295f216ec87826130de commit a0ff4e0f3e02d31e01844295f216ec87826130de Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-09 19:08:01 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 13:21:36 +0000 sound: Fix oss_sysinfo->numcards According to the OSS manual, oss_sysinfo->numcards holds the number of detected audio devices in the system, while the current ncards variable, whose value is assigned to oss_sysinfo->numcards, holds the number of currently registered devices only. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45136 (cherry picked from commit 59d98edae3e1a6fffd292e4393c49862d624f25f) (cherry picked from commit 2b3698288771f6d236212f80b1a259aa86e09fa8) Approved by: re (cperciva) --- sys/dev/sound/pcm/sound.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 2057c7572ad6..78a2312e56eb 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -1107,9 +1107,7 @@ sound_oss_sysinfo(oss_sysinfo *si) struct snddev_info *d; struct pcm_channel *c; - int i, j, ncards; - - ncards = 0; + int i, j; strlcpy(si->product, si_product, sizeof(si->product)); strlcpy(si->version, si_version, sizeof(si->version)); @@ -1118,7 +1116,7 @@ sound_oss_sysinfo(oss_sysinfo *si) /* * Iterate over PCM devices and their channels, gathering up data - * for the numaudios, ncards, and openedaudio fields. + * for the numaudios and openedaudio fields. */ si->numaudios = 0; bzero((void *)&si->openedaudio, sizeof(si->openedaudio)); @@ -1138,7 +1136,6 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_LOCK(d); si->numaudios += d->devcount; - ++ncards; CHN_FOREACH(c, d, channels.pcm) { CHN_UNLOCKASSERT(c); @@ -1169,7 +1166,7 @@ sound_oss_sysinfo(oss_sysinfo *si) si->nummidis = 0; si->numtimers = 0; si->nummixers = mixer_count; - si->numcards = ncards; + si->numcards = devclass_get_maxunit(pcm_devclass); /* OSSv4 docs: Intended only for test apps; API doesn't really have much of a concept of cards. Shouldn't be used by applications. */ From nobody Wed May 22 13:23:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksSP1nGyz5Ljf2; Wed, 22 May 2024 13:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksSP160Xz439F; Wed, 22 May 2024 13:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCtrZx+h40Ka9PFpJ+gzOgIQ45YWEuf42mTogHb+wac=; b=MGMfcQdnrMIlZj2y7K/OmYkF073AiuRnZKoDkB8qIDGVWI7pqbEBLKMwNOfIPGs/CD+SBG wulitG8QLPXKXfmSwFSyEpsyGYWS692um4IYiu53nvJNgJClwKa8KYI2uC89B7vs75kgkY 8Jc9zrouGTpsLw+G7a53kZbcrUKGkOjM3gz6xOJKhLUNsMlWWzbok7CF11Ko75HoMeGwFU 3oEPa/HNBFd6wbfGLAxT14/Z9wCfXMqqc287+IXoidQNFgfnFBWnhOnXfDr77qOvziDGOF waWQ/IYEswkXMSEy3iJauylmJeEqYTAIrF7RBikeMefmz667XI5Gc6an72MStQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384197; a=rsa-sha256; cv=none; b=nHIQ356j6RJ6ZB8ezRDHex8ioEo7E/bFEdW/PMqZFKZvMimODvNTOstkRtxjy3qER3hynE ABtH73gA4ccIBLSjEEICFv3ArabQQ+aPBUiTD2f/JslscQ+QCbGycAfcxGQqIbdXaXCNso 2gV7tgG4oxFbBAcTefZauEOczL+mzvevP/9X4el9EfcCxoKfhznNGjhlneHBwthtom07L9 9vP2GBjm4gPj8+ckiOu4MmEqnjJsuGaAC0fy2YdmQdxiC2S3eczbg2ri24G0R2/XM7YLaG 2V4pRYlgxjyhjWSfiHkVzuG1dsYi6YgYxhH6t221E2aq/c9TgWTDOON8INO9qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCtrZx+h40Ka9PFpJ+gzOgIQ45YWEuf42mTogHb+wac=; b=nH4DQSo1XRqEWjRQicgWrP4F1c3eeCA16k0Pqqz7bUg1vc9R/QTf6xZdXZ6+vI+gE51Qh9 Wcak1eZ7XzBcgWhrzuFuhFnkFhO2D1S1utCdTxDrCFFj8VabN7/IoXIblE/Lcvm4YFI80p 1UYpp7f6Tju3kXz7lUDn0TY6b7batFHeRfEQVO7w27SizGrpmPHhtXjjKYvUFD7XlG0tDv MYhHI88LXdvQhTRVn5CIYXDp5Iwg7SXagiuQVrRzXA8LfI3cdJF2U0Pb8JSqqr1DkH6RXs 6D5j4h+EtjkzNMI6QnXG5LiYOBbw7i9JUj+uaPZu1y0tq/zwmfmGUJOfLN/sOw== 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 4VksSP0jB7z16rr; Wed, 22 May 2024 13:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNHKJ098649; Wed, 22 May 2024 13:23:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNHsO098646; Wed, 22 May 2024 13:23:17 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:17 GMT Message-Id: <202405221323.44MDNHsO098646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: cb23e0eebfe2 - releng/14.1 - snd_hda: Add patch for Lenovo Ideapad 3 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: cb23e0eebfe21d64c2a478bdd4ebfa56d31a37e4 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=cb23e0eebfe21d64c2a478bdd4ebfa56d31a37e4 commit cb23e0eebfe21d64c2a478bdd4ebfa56d31a37e4 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-14 13:42:04 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 13:21:56 +0000 snd_hda: Add patch for Lenovo Ideapad 3 Reported by: bsd-lists@bsdforge.com Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45100 (cherry picked from commit 54cc353f505dbc5f19168b6b1417b6736433d9ae) (cherry picked from commit 9a620018afb2da062fce11e866a2154765886983) Approved by: re (cperciva) --- sys/dev/sound/pci/hda/hdaa_patches.c | 3 ++- sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 3a7dfc63637a..76f677d69614 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -318,7 +318,8 @@ hdac_pin_patch(struct hdaa_widget *w) } } else if (id == HDA_CODEC_ALC257 && (subid == LENOVO_L5AMD_SUBVENDOR || - subid == LENOVO_L5INTEL_SUBVENDOR)) { + subid == LENOVO_L5INTEL_SUBVENDOR || + subid == LENOVO_I3_SUBVENDOR)) { switch (nid) { case 20: patch_str = "as=1 seq=0"; diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 4dd589ed2a09..12552286bd8c 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -383,6 +383,7 @@ #define LENOVO_L5INTEL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x380f) #define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) #define LENOVO_I330_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3808) +#define LENOVO_I3_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3881) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From nobody Wed May 22 13:23:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksSQ3q29z5Ljd6; Wed, 22 May 2024 13:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksSQ2H2Zz43Sc; Wed, 22 May 2024 13:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bMchj6Xbb86ejyIvLnzR/UJui386zC13U7OxxgBiXSo=; b=swNKHGe6SGDkwPICVx9wCHSiOV4kBBj7YcO9adWiNFX612nAmBF+IVP8/45lCRxWxTn1J8 QKXWm+0ib1VPSJ9kWK1qNIQbpxxCexDcu85LoAn7AReXgYd0rZXm1bYqSdv2cQOZX4QcV6 N83bimTWx/hF7Dysq8RvKF4TWEPKIXARmA5WPac71XKi8xq6NALmAAMe6+Qqh5i44xU13N TtdYnxKDmZRkz/fNUMRMzXWV+i3AAFS9CWaNTqnHJTEJlb24TcHmr8oNEe2Mu7gVO7jwdC gMA4UXPgLOoP2mPWFIzTNR9S/3qZHN+M8yt5+4ntXHvPQS9XnZ6Y3cxGJgevTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384198; a=rsa-sha256; cv=none; b=M7PPE1gbbk3xtePtFQlyv3kYt6IwNmKWGTn1QEWWlpfNPDVasI2bvVFgZcvVOz8YVWlXY1 nEMldl5O4IiPDouX66mOoExjtTfvz21l5ryGCKrzyp/wS5uwBqx8+5onPx9UeHW13vsnb2 uv2XpgPnrdgI2Mk0XPZounnncYhhI/j7KwN/REugpEL2esLVGvePHn554xg1YU4mSyhTs+ u/vTJAMYbQmBLFYzavs4wg5QHKeQh1lS/LECt1xsZ7TohQ5thYkvPbch0k/WYqDbnBQlOx ur8QChk5sXTiT4uznrpVafdQUg8C2FKHyJIT32/sv7c3HVFiIZk3VZ43swu/YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bMchj6Xbb86ejyIvLnzR/UJui386zC13U7OxxgBiXSo=; b=lbrRqUbdZoFNSlDHGXkAt3A0kKzBNzjF6ZjEAC8V/z7jPYF2gyhnh08uBA/lih3WJCpyZF xJf4Dhnn4fm0dsQ2Zoe6VCkALVWqJG6YPKXMgV0DTVPwN8XkYKm3tM8TFjCMwOqpvWy80U xJSVtyFOXi+hRyy/bxq0QlSkt8B5sMG8jcdWAYDIlbfJDHltBZ1oWJPJsnrSUZvAsV5bAM PwVSZsOtHvHP7uzFjrU3eeiUtAG47ymNREI013n4PWUMQU3+IwLxWM5YejdlbfUQipmONH zITXhFS4iDqIgb0y0CJ2V+AFXKK6UPPCRhX2fQ3cX8B7vzJsofjoIZEAhzh4LA== 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 4VksSQ1sSrz15mH; Wed, 22 May 2024 13:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNIYA098695; Wed, 22 May 2024 13:23:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNIYB098692; Wed, 22 May 2024 13:23:18 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:18 GMT Message-Id: <202405221323.44MDNIYB098692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 5a9a2f5eed47 - releng/14.1 - snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD* List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 5a9a2f5eed47f76e953b546a38d5f368eaee4828 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5a9a2f5eed47f76e953b546a38d5f368eaee4828 commit 5a9a2f5eed47f76e953b546a38d5f368eaee4828 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-14 13:42:15 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 13:22:10 +0000 snd_hda: Rename LENOVO_I* to LENOVO_IDEAPAD* Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45105 (cherry picked from commit 278953360e0e6187c3f7c688cb49254df1567f0b) (cherry picked from commit 7814ed2bd321dff2bbec8408c5b64cb7f4f2dfc5) Approved by: re (cperciva) --- sys/dev/sound/pci/hda/hdaa_patches.c | 4 ++-- sys/dev/sound/pci/hda/hdac.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 76f677d69614..9f3532562252 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -319,7 +319,7 @@ hdac_pin_patch(struct hdaa_widget *w) } else if (id == HDA_CODEC_ALC257 && (subid == LENOVO_L5AMD_SUBVENDOR || subid == LENOVO_L5INTEL_SUBVENDOR || - subid == LENOVO_I3_SUBVENDOR)) { + subid == LENOVO_IDEAPAD3_SUBVENDOR)) { switch (nid) { case 20: patch_str = "as=1 seq=0"; @@ -340,7 +340,7 @@ hdac_pin_patch(struct hdaa_widget *w) break; } } else if (id == HDA_CODEC_ALC230 && - subid == LENOVO_I330_SUBVENDOR) { + subid == LENOVO_IDEAPAD330_SUBVENDOR) { switch (nid) { case 20: patch_str = "as=1 seq=0 device=Speaker"; diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 12552286bd8c..6a3314280a22 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -382,8 +382,8 @@ #define LENOVO_L5AMD_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x381b) #define LENOVO_L5INTEL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x380f) #define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) -#define LENOVO_I330_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3808) -#define LENOVO_I3_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3881) +#define LENOVO_IDEAPAD330_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3808) +#define LENOVO_IDEAPAD3_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3881) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From nobody Wed May 22 13:23:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksSR53cnz5LjPq; Wed, 22 May 2024 13:23:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksSR2zxDz43Jl; Wed, 22 May 2024 13:23:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hVg6YTZAbgtmLwFgLMHiXM9X24xWPpFWxQrJzlmIkdg=; b=Tta4IPV8EcoPSV3yd1plLG0ntcU4bADk+KbJ6BCsRWmsQVxsrD92XFCJb3JilJ9zz8qu+2 P5mumBELrXnNdtnBpGzMM4i2Wanu67FnOLHASK8IjW4bMsbOhw4OVgOe63ZIVRtm6kVEiR YTAeFSbHKqnrdLuBq+ust/e1SGdXq17HGc7RG6kE7OEEx1bAr1E8h7Ts0Swt54Fsa4qib0 hq4ksAXKR8lTZZ0xRjIiWEh9qe/cU9rQIw72FzEPLPc3A4O5TAc0nJfaujjoCW9mkb6agw BRNKx61M3YJyAb7hiVPU9F7ubIkZah2+661aSR2Z27yZXj1vdU4BwwmdtBncPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384199; a=rsa-sha256; cv=none; b=W8Jx9+iSn8M6S0HZyxYmwOW7f1Ri8ON8DdaYa/yQtvtaSNdVwktz8Sutbl08raTP5rEsdr q82pvirdhxK7JxkrsuGysaRNdB2ycA82Z/BRFOLCbbeVmZrhjMZjeHKRosErKplFVuS4mP tca7pwyZ5GULUHpxtI3AvU0TqLzW+fhgWi3HLeEM5l1CawBhc2CJby0jhtq8CGBAHVf230 MayY4l7UvB03UPgUjSjaXvCE1JiLrMtuiS/EhGFbxZfzs5itxIPoA9QZqyjTwHoU3KzSwR Bx2I4MTJGrhJTDPev8zGfU72EsILbP/w3MJyWRatPSE5yGwAiJhNp1E6P82fEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hVg6YTZAbgtmLwFgLMHiXM9X24xWPpFWxQrJzlmIkdg=; b=U6TQr4Siy+Q2yH/WbqVE8Lgeclact6KxOMQCJkfeHVRquX0PRcYOGDWcyx/I1q/LcStJF1 c6NYD7sN5bnVug7bYfpWmElHFMwcPk5xyHBjBgJVJmZQ5qsGYfZUEGTIeK17NpOain76g7 +SGj4PACUp0e19MBdOTSyz6TC1ugJHDYfE9Jr4ivPdXxkSN9bBok3vNs9eowTiu6nMuOLH vjzRm/XxEr7rrL3yitpadMWSqueNX6RphK+4RbJGyJ9KdI3I+DHMckYxNieiBwC5/kh+L4 Mh67UuufsTFkhKFte35JKoVBuT9qLp1YwKMhvaICe3L/BXEoHP9Xs+5ZL084hg== 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 4VksSR2bGyz16pG; Wed, 22 May 2024 13:23:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNJ3i098755; Wed, 22 May 2024 13:23:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNJaM098752; Wed, 22 May 2024 13:23:19 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:19 GMT Message-Id: <202405221323.44MDNJaM098752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 18f80d6d4634 - releng/14.1 - sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 18f80d6d463495703f9eb2ccfd92bae93c7889a3 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=18f80d6d463495703f9eb2ccfd92bae93c7889a3 commit 18f80d6d463495703f9eb2ccfd92bae93c7889a3 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-20 14:18:28 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 13:22:26 +0000 sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* SNDSTIOC_ADD_USER_DEVS* expects a user-supplied sndstioc_nv_arg->nbytes, however we currently do not check whether this size is actually valid, which results in a panic when SNDSTIOC_ADD_USER_DEVS* is called with an invalid size. sndstat_add_user_devs() calls sndstat_unpack_user_nvlbuf(), which then calls malloc() with that size. PR: 266142 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45236 (cherry picked from commit 074d337ad618f9cc2a1d5ab18b484928e57bd72b) (cherry picked from commit 5830a00c2c5485ec17900558e4f29c459c6a1f3e) Approved by: re (cperciva) --- sys/dev/sound/pcm/sndstat.c | 5 +++++ sys/sys/sndstat.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index ef006a580d40..eb5c68c7c519 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -865,6 +865,11 @@ sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data) goto done; } + if (arg->nbytes > SNDST_UNVLBUF_MAX) { + err = ENOMEM; + goto done; + } + err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl); if (err != 0) goto done; diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index f0e4d352242f..8a49042b0453 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -74,6 +74,11 @@ struct sndstioc_nv_arg { #define SNDST_DSPS_SOUND4_PVCHAN "pvchan" #define SNDST_DSPS_SOUND4_RVCHAN "rvchan" +/* + * Maximum user-specified nvlist buffer size + */ +#define SNDST_UNVLBUF_MAX 65535 + #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) #define SNDSTIOC_GET_DEVS \ From nobody Wed May 22 13:23:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksSS5MlLz5LjF5; Wed, 22 May 2024 13:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksSS3xYZz43T8; Wed, 22 May 2024 13:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rERo10kJVv7BymmKkdEJPQhP//YR6OK+gvvB9FC30pM=; b=Zpkcv9wj0qR6D8VaH1g1xwr40jHY309FCkxC3E+dYpWeA86ltrL19GwH5p6e9G9Z8vtmCp R9UmHmXWP7ePqvaGA3RXlhznO9+J02ciCPeh5aFL4CQxwFD3usGL1x+Di3/GLoM1X/6eMO CtuRuheNnpmz8XGPcZskcsM25K82jv4y0adFpvatOOGOG2rv9pv1rcgmooEWjfte4/Gl3t GEj1ROdEdq5eHzzUZSbK6buqq5827wk2iFFADqo36/QoQbk3+uXt9skjNk8cJmnu4z30lb GsuuBauAdJJmb8/g5llURf1v9UcfnxwAdBvWsZKw2xfKrTdNuf1H6XdUe4VpFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384200; a=rsa-sha256; cv=none; b=lnWEaOg3L8snpfH+qe1TNeAmkSRb26F1LpNuVf60A4Isb++rlgfVVff77aq/AXaIWJt99+ XeQh9+Mct2s7JcWWyHv9QuQuNKK98yCZ9v3S9MmexCZF6rnzZ5FOu3fSnQGxFzhk1Bg53k Yzq+xpbW+B3mKmBdAHdegI0vlPG4Cuo+hoO5pGPg5r2nqOStTG916EyL2D0XbtU8yIRy93 OnKjlJlAuUygyrITgyUBtv2te80uVGlRkWN6B6cIDkO9+9XxnCAu+v4sSpGTlmUFAhEjaK RdOcizbJrdzXRwDrB+saBd0BFcwiaz9QEBxc89z1mw7vhFPyhurV6yikjBXdng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rERo10kJVv7BymmKkdEJPQhP//YR6OK+gvvB9FC30pM=; b=nLM3mes6Oe07KEHQQKYRzSRhx1gKB6JfDJW9pysz3mP7rb1LidfMAjtIIqicBVvWg4P1BQ KSidb3hz2Z/O2Ju9PLiU8XUH5edX3wf62Px366JPqkgkC/911mMczPt7JJ3T1CKHfAdr2D 4AOSeZsopKjDjHBBp3jzuRM/yywQqnm7Oe7u6k2VaZxrIVIFcp+uarYi0971P91dejCvW6 rs7rlJH9h5lBtRBuq0XfXF4UfTQIUENGiAYyVM4ZfvPdnWvrhLzVMc+hdyCqqDqe++rkq5 49DAPbxKBU7YM333xm18v9GkAhqcvynL5Cm//BZeLDsZXVZr+mRmoY2ZB8lOgA== 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 4VksSS3Yspz16pH; Wed, 22 May 2024 13:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNK6b098797; Wed, 22 May 2024 13:23:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNKxh098794; Wed, 22 May 2024 13:23:20 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:20 GMT Message-Id: <202405221323.44MDNKxh098794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 8d3f96bd85c9 - releng/14.1 - sound: Correctly check nvlist_unpack() error List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8d3f96bd85c9519cef76d0727b00082354a2134b Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8d3f96bd85c9519cef76d0727b00082354a2134b commit 8d3f96bd85c9519cef76d0727b00082354a2134b Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-20 14:18:33 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 13:22:40 +0000 sound: Correctly check nvlist_unpack() error The current check is never false and if nvlist_unpack() fails, we might panic later down the road. PR: 266144 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45237 (cherry picked from commit 64f4e2db6d19d8ab520903a197fcaa8cc7ab9f9a) (cherry picked from commit 45feaa73c68011bbba647d1eb6f86a166a0453e9) Approved by: re (cperciva) --- sys/dev/sound/pcm/sndstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index eb5c68c7c519..2d66d8760327 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -706,7 +706,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl) } *nvl = nvlist_unpack(nvlbuf, nbytes, 0); free(nvlbuf, M_DEVBUF); - if (nvl == NULL) { + if (*nvl == NULL) { return (EINVAL); } From nobody Wed May 22 13:23:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksST6nLKz5LjHr; Wed, 22 May 2024 13:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksST4yQhz43fr; Wed, 22 May 2024 13:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H+Xz+tn4IFljaKkignUN0XQ+vE4n0zDdLmMH9vBA1KA=; b=rVDJrnKuE+zEyf+KY+VTNRuTxUbl1GtE0sVmOkoEaxjJ9qikoDyZXo90r0fiQ3CoaVtran MXzKrrn9YHCgNhxncSNs+6oS1d0CNeWJJk5yfx4nfkd78kAEtQQOrU8th6eEBy9+xzZnht xli7cSpsX8tJYgAN4MFC097JjVWLbZn4rFdZ3ss/P+EtfbZmgC9DGqCJag3qSEhe4nAdM+ JAui6NU6KUrILbwunMk0qz3oM+f1g6JvSWI/gonk9DQVZnvXaplZrYnFmaLbVbEkvdEsLJ BUrmWPnb0AbG6MACx8v55BYBNB/4pAvcpPc6HJ7SpxBs3OUZk3+BsxfsCcYGAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384201; a=rsa-sha256; cv=none; b=eXJ79bJPchOsRUtyKzYP+IhU2xTgf98wQ2Nnxxkb+M+mv6W1ycGcNoZmNaonMlqM+ONVIN 3pMZ2l3HCL0YCMKVKMUYqWCy+6N4Fnf+yGh9lP/SqJq3piX6V/9u5WoqIn0u3SoeOvDqje jwrhnWxcsQgb9ZpMivQnNTgxL/cJskeKY1uvLwgwMcPnGI7lioHiscOceGyTP9QPwqzQU/ uzXs9eGKHiovHujBuXJRKhZREat1RaJVaLAzrU11tpbLB8F6Hx9H5UtXYNoOhddj11JCzO TLZSwimkVUNNHpb8HKpn+YcDpQuuArHlv8ltk5ix5iHcttsM5AXmPB6YXaoyhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H+Xz+tn4IFljaKkignUN0XQ+vE4n0zDdLmMH9vBA1KA=; b=fyuwIcOXygRCFGV4YgwrJLfffNQRoI+zU2rLlGQFzEtUQIz4yZ5B6H421ycBUiwWP9z8Mz e8TfBAYs+MBo6wM6ZW2z6e2X2WTUuD8a/ojWWA95k+ro+HkMeJRlpUBCcgyxpDXMe2p+wt jKmf8s8mHkeuT0XCpkhv1vD7L23+6PEDjepJYjzdfxZI2v2u12JpXFq3Nq92ZGc4+yhbMM O5AwL3TUwhPcb7fw5K+nGJLNP6IQ6eqU2xbw3IilST+3MJVKSlxqgE4fjyncInV4KDLkOz WdbKq6mSQLapVK/AByltEJLRJOWT3xG6xS4aqcTNGZH5Exw4/qXf+JMQppmVyA== 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 4VksST4b3Jz16nw; Wed, 22 May 2024 13:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDNLHA098845; Wed, 22 May 2024 13:23:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDNL0G098842; Wed, 22 May 2024 13:23:21 GMT (envelope-from git) Date: Wed, 22 May 2024 13:23:21 GMT Message-Id: <202405221323.44MDNL0G098842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 0b367134dd92 - releng/14.1 - sound: Make SNDST_UNVLBUF_MAX a power of two List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 0b367134dd928af4cf85ed9821a4948257f547d0 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0b367134dd928af4cf85ed9821a4948257f547d0 commit 0b367134dd928af4cf85ed9821a4948257f547d0 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-20 17:41:18 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 13:22:54 +0000 sound: Make SNDST_UNVLBUF_MAX a power of two Fixes: 074d337ad618 ("sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*") Reported by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45277 (cherry picked from commit d59058f3b31353442497e728dd5beb80585ad8d2) (cherry picked from commit eba949c37e6473a07a6e3a386f239aa0f49a4c93) Approved by: re (cperciva) --- sys/sys/sndstat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/sndstat.h b/sys/sys/sndstat.h index 8a49042b0453..e0e403b1a72a 100644 --- a/sys/sys/sndstat.h +++ b/sys/sys/sndstat.h @@ -77,7 +77,7 @@ struct sndstioc_nv_arg { /* * Maximum user-specified nvlist buffer size */ -#define SNDST_UNVLBUF_MAX 65535 +#define SNDST_UNVLBUF_MAX 65536 #define SNDSTIOC_REFRESH_DEVS \ _IO('D', 100) From nobody Wed May 22 13:24:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VksTq0NNSz5Ljff; Wed, 22 May 2024 13:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VksTp4rS2z45PV; Wed, 22 May 2024 13:24:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGAbU6UavWBKCu6KLGEGUg6trpWh4h1gP/DoBf/9HrM=; b=lFkEsYfKpBLSpOqMrbYVu/5MbPKTs0GSdyZXOrCokX5P3usV/SsdHr6KFoqFuR61Sn3QRH n2xBUaIgPE5B8wB4N70zSUPf7grPlvMxjifq1zYccg7ZLueJrdd9qNfkB7aqIgjej2q262 WFvdZcGr+l/6v6mpNDAfK4l/JvGC8ovuftW2z8P2qYFRYWoRSn70NBzGWcaIZSlx2FdK2B 7dg04BW7IOgMU14Xp7EKpA5tDsZNLcuvud2u7YTZSnq3FVD758nYdj+8sN8BlvEFZa36rs agiDiv9D4Sr3Qv+l4R3mZ8keuE+G9lOcKvTlX0WzvbbVqLnqk+8ZgryNiNk8eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384270; a=rsa-sha256; cv=none; b=cu9uyI0LAmqbNfhMnirG6DrPePgHlB91yPnggCOc/M1WnfUGAnWRoTV1QDHNQJZl1mJZOD thX38/18hnYb/JDZNujfU+Hv7AuwgB8tVW6BllaWv1Eyqc060J7bLlmo7FSVRtORUG2S9Q 112b1sJ/+XVUxO8zgmhuzLvFCqGtp9PvCwdnWAf4hFQo8LyoFJDcK/sqASC1QUK4WoPHYr tdYpgRdsOGWQ6HZbr8bCyqR54w3+OWIsyFtz7Njd/o1Y1XFmH0LbhPVTp+AdcNzs6mNYSU aMsOKMhO0juDnIYJ3k9cVve2oBujsY4wfoQM0EB+wiuxCuAzlr1Pf+QPaDE/ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716384270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RGAbU6UavWBKCu6KLGEGUg6trpWh4h1gP/DoBf/9HrM=; b=UTCk4xjDt8qSvo5BpemF53M3DS/rNqQczD965Yaj5Ie1FteLeQOOLh79gU8x71pjB8hotL c5OrngdjomoMptXLk3qXMYTUM6nxZIIVFnAU21+sUB7KYhsT+5SQavh1jFwB0sNHQIhwKD wKa0mNq3dIC0ftcV0yZnZfQxyv14OviA0QP4ujuXZBaqEKhLTcyXCTJYUz2t2ASI0n9wfc pn1Fq0fgsvXCiA1f+I5dljhHXggm+hgKICY9NMZ6/7fYjrabDtYrqfh7Tt0g/mo4e9S8DP 3eHnFMvls7Xcd0vU2O92ajBGM/Z1U8m1rTYinbKFZNS4dP2htJw6v3w3UBXMaw== 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 4VksTp4RDFz16xX; Wed, 22 May 2024 13:24:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDOUcN099179; Wed, 22 May 2024 13:24:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDOUEB099176; Wed, 22 May 2024 13:24:30 GMT (envelope-from git) Date: Wed, 22 May 2024 13:24:30 GMT Message-Id: <202405221324.44MDOUEB099176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev <dsl@FreeBSD.org> Subject: git: 971b77da4649 - main - arm64: Return newline at the end of NOTES back List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 971b77da4649010a8b6b3adfaa21c550cd37dc52 Auto-Submitted: auto-generated The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=971b77da4649010a8b6b3adfaa21c550cd37dc52 commit 971b77da4649010a8b6b3adfaa21c550cd37dc52 Author: Dmitry Salychev <dsl@FreeBSD.org> AuthorDate: 2024-05-22 13:20:40 +0000 Commit: Dmitry Salychev <dsl@FreeBSD.org> CommitDate: 2024-05-22 13:20:40 +0000 arm64: Return newline at the end of NOTES back It fixes LINT kernel build after ac4ddc467bfe. MFC after: 3 days --- sys/arm64/conf/NOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index cc713db86538..b3bf2fedd5f7 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -252,4 +252,4 @@ options ZFS # device iichid # HID-over-I2C support options IICHID_DEBUG # Enable HID-over-I2C debug messages -options IICHID_SAMPLING # Workaround missing GPIO INTR support \ No newline at end of file +options IICHID_SAMPLING # Workaround missing GPIO INTR support From nobody Wed May 22 13:41:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vksst6Zp0z5LkpL; Wed, 22 May 2024 13:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vksst4v2Mz47Qt; Wed, 22 May 2024 13:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCkmzx1fpegrNF0q5iq7/wzF6NI4y3EQE0xVtaON8rc=; b=Db3FWVc1aSPLHXWzUzJjQm38Y0yiH3NYhvgyXMZSl2fLIoNN8K2dmJYqMIff4DroEdTAv+ hDY82Kdc39DNknH6RfAabZu7XL9fv1mst8tPFtcClR1zgs1Ouq1Yb4xDXv6kTaniU2iBil A4SUUK8XLHZ2kgzZIJJzk+QVthzKcDsmM7DaEKkO28pY85tz+tN9Y2mu7BmLxEDiJbojHd jgmX69MBv402pUqyTdfmtWOD3H7kK+4ah+gBUpj+0X9Di3RTRUImJzLOycYq45hVo4p0ZY 6Hc7qdpd3gp6H9S4D3uAZqc1wttk2I+vVoD3QDCgeDLWn7Jkzlq44oAWQpT9cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716385314; a=rsa-sha256; cv=none; b=SGzhWIEYP8c7ZD6HIWZNFChI8SQ3Y5pZxgwX5uFcwfQcoFEPYUT7dVp8RHjy/5tlZpbtNl UlSd7CfVC33nOPOueK+xKKPyMrknmWR62rmQZKbB2gz9hNep7PMoVxw74rey5MDdJRBpkD tg5nfxPCUelYLi6EUEoGly1d5CaaqGzzuX42GABRaSbgB4hq3I76uUz0fH8ChQbQ4ORjNU tsAbDl2Zw4GrsOR+5Qrk0fw1UqE+zRa/OY+75POMznRif61OtWcuiHenEAzfZNwdEjriII Gc3U+2/9hMsXzzYg4JN8nNVm4eta/KND3uDMEEKYJP26wdY61rFtub5zAJx7VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCkmzx1fpegrNF0q5iq7/wzF6NI4y3EQE0xVtaON8rc=; b=v059J7+5NYBRlj08t44tIy5xLZ+EQ9Bj9GsnZKCY2Ca6/bQOkOvxIJp7cbhRPWAjhqwO0W atYGHLn49GzQ0ak8+jwE/tJJihCgtGBWxDm3GuLrAuk7FJ5/cK070SNIi90CvUlvECklJ2 tVy9so9BNgMahgY/V/KDThaE1g4Ri7CcDwVUW6BwEbtQtRobz12eZnGK0V7LkLlS4z2XC7 WzP3jnQj9pvTBbfCWT8o9qoMQV2M9bX/g8H3k/Sv5UZkgN/gAwdp/gliYF3YzEQX1GFaQm SORS/TYzsyW4v1g/c6mRScsRm/MBD0rE2a43NgnE+q7D+AztCzfvFlZ89jKF5g== 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 4Vksst4W9gz172C; Wed, 22 May 2024 13:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDfs72030749; Wed, 22 May 2024 13:41:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDfsF3030747; Wed, 22 May 2024 13:41:54 GMT (envelope-from git) Date: Wed, 22 May 2024 13:41:54 GMT Message-Id: <202405221341.44MDfsF3030747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger <netchild@FreeBSD.org> Subject: git: 2efbd480f1d3 - main - rc: add service jails framework List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2efbd480f1d37cbadc5af4476a87e5336c493910 Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=2efbd480f1d37cbadc5af4476a87e5336c493910 commit 2efbd480f1d37cbadc5af4476a87e5336c493910 Author: Alexander Leidinger <netchild@FreeBSD.org> AuthorDate: 2024-05-22 13:28:11 +0000 Commit: Alexander Leidinger <netchild@FreeBSD.org> CommitDate: 2024-05-22 13:41:48 +0000 rc: add service jails framework This takes a rc.d-service and starts it in a jail which shares the same root-path as the host (or parent jail) and may inherit the network from the host (or parent jail). Per service there is the possibility to specify some arguments which give more permissions (e.g. netv4, netv6, sysvipc...). Reviewed by: bcr (man page) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D40370 --- libexec/rc/rc.subr | 155 +++++++++++++++++++++++++++++++++++++++++++---- share/man/man5/rc.conf.5 | 112 +++++++++++++++++++++++++++++++++- 2 files changed, 255 insertions(+), 12 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 6ed9d24fdf5c..23651cbf8e58 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -50,6 +50,9 @@ PROTECT="/usr/bin/protect" ID="/usr/bin/id" IDCMD="if [ -x $ID ]; then $ID -un; fi" PS="/bin/ps -ww" +SERVICE=/usr/sbin/service +JAIL_CMD=/usr/sbin/jail +_svcj_generic_params="path=/ mount.nodevfs host=inherit" JID=0 CPUSET="/bin/cpuset" @@ -521,6 +524,16 @@ _find_processes() $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")' fi + if checkyesno ${name}_svcj && [ "${_rc_svcj}" != jailing ]; then + JID=$(/usr/sbin/jls -j svcj-${name} jid 2>/dev/null) + + case ${JID} in + ''|*[!0-9]*) + # svcj-jail doesn't exist, fallback to host-check + JID=0 + ;; + esac + fi _proccheck="\ $PS 2>/dev/null -o pid= -o jid= -o command= $_psargs"' | while read _npid _jid '"$_fp_args"'; do @@ -1138,6 +1151,18 @@ run_rc_command() _cpusetcmd="$CPUSET -l $_cpuset" fi + # If a specific jail has a specific svcj request, honor it (YES/NO). + # If not (variable empty), evaluate the global svcj catch-all. + # A global YES can be overriden by a specific NO, and a global NO is overriden + # by a specific YES. + eval _svcj=\$${name}_svcj + if [ -z "$_svcj" ]; then + _svcj=${svcj_all_enable} + if [ -z "$_svcj" ]; then + eval ${name}_svcj=NO + fi + fi + # setup pid check command if [ -n "$_procname" ]; then if [ -n "$pidfile" ]; then @@ -1174,7 +1199,7 @@ run_rc_command() _prepend=\$${name}_prepend _login_class=\${${name}_login_class:-daemon} \ _limits=\$${name}_limits _oomprotect=\$${name}_oomprotect \ _setup=\$${name}_setup _env_file=\$${name}_env_file \ - _umask=\$${name}_umask + _umask=\$${name}_umask _svcj_options=\$${name}_svcj_options if [ -n "$_env_file" ] && [ -r "${_env_file}" ]; then # load env from file set -a @@ -1188,6 +1213,45 @@ run_rc_command() fi fi + if [ -n "$_svcj_options" ]; then # translate service jail options + _svcj_cmd_options="" + + for _svcj_option in $_svcj_options; do + case "$_svcj_option" in + mlock) + _svcj_cmd_options="allow.mlock ${_svcj_cmd_options}" + ;; + netv4) + _svcj_cmd_options="ip4=inherit allow.reserved_ports ${_svcj_cmd_options}" + ;; + netv6) + _svcj_cmd_options="ip6=inherit allow.reserved_ports ${_svcj_cmd_options}" + ;; + net_basic) + _svcj_cmd_options="ip4=inherit ip6=inherit allow.reserved_ports ${_svcj_cmd_options}" + ;; + net_raw) + _svcj_cmd_options="allow.raw_sockets ${_svcj_cmd_options}" + ;; + net_all) + _svcj_cmd_options="allow.socket_af allow.raw_sockets allow.reserved_ports ip4=inherit ip6=inherit ${_svcj_cmd_options}" + ;; + nfsd) + _svcj_cmd_options="allow.nfsd enforce_statfs=1 ${_svcj_cmd_options}" + ;; + sysvipc) + _svcj_cmd_options="sysvmsg=inherit sysvsem=inherit sysvshm=inherit ${_svcj_cmd_options}" + ;; + vmm) + _svcj_cmd_options="allow.vmm ${_svcj_cmd_options}" + ;; + *) + echo ${name}: unknown service jail option: $_svcj_option + ;; + esac + done + fi + [ -z "$autoboot" ] && eval $_pidcmd # determine the pid if necessary for _elem in $_keywords; do @@ -1235,9 +1299,49 @@ run_rc_command() if [ -n "$_env" ]; then eval "export -- $_env" fi - _run_rc_precmd || return 1 - _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || return 1 - _run_rc_postcmd + + if [ "${_rc_svcj}" != jailing ]; then + _run_rc_precmd || return 1 + fi + if ! checkyesno ${name}_svcj; then + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || return 1 + else + case "$rc_arg" in + start) + if [ "${_rc_svcj}" != jailing ]; then + _return=1 + $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options \ + exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \ + exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \ + exec.consolelog="/var/log/svcj_${name}_console.log" \ + name=svcj-${name} && _return=0 + else + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + fi + ;; + stop) + if [ "${_rc_svcj}" != jailing ]; then + $SERVICE -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}stop $rc_extra_args || _return=1 + $JAIL_CMD -r svcj-${name} 2>/dev/null + else + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + fi + ;; + restart|status) ;; # no special case needed for svcj or handled somewhere else + *) + eval _rc_svcj_extra_cmd=\$${name}_${rc_arg}_svcj_enable + : ${_rc_svcj_extra_cmd:=NO} + if checkyesno _rc_svcj_extra_cmd && [ "${_rc_svcj}" != jailing ]; then + $SERVICE -v -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}${rc_arg} $rc_extra_args || _return=1 + else + _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + fi + ;; + esac + fi + if [ "${_rc_svcj}" != jailing ]; then + _run_rc_postcmd + fi return $_return fi @@ -1295,9 +1399,21 @@ run_rc_command() return 1 fi - if ! _run_rc_precmd; then - warn "failed precmd routine for ${name}" - return 1 + if [ "${_rc_svcj}" != jailing ]; then + if ! _run_rc_precmd; then + warn "failed precmd routine for ${name}" + return 1 + fi + fi + + if checkyesno ${name}_svcj; then + if [ "${_rc_svcj}" != jailing ]; then + $JAIL_CMD -c $_svcj_generic_params $_svcj_cmd_options\ + exec.start="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}start $rc_extra_args" \ + exec.stop="${SERVICE} -E _rc_svcj=jailing ${name} ${_rc_prefix}stop $rc_extra_args" \ + exec.consolelog="/var/log/svcj_${name}_console.log" \ + name=svcj-${name} || return 1 + fi fi # setup the full command to run @@ -1341,16 +1457,28 @@ $_cpusetcmd $command $rc_flags $command_args" # Prepend default limits _doit="$_cd limits -C $_login_class $_limits $_doit" + + local _really_run_it=true + if checkyesno ${name}_svcj; then + if [ "${_rc_svcj}" != jailing ]; then + _really_run_it=false + fi + fi + + if [ "$_really_run_it" = true ]; then # run the full command # - if ! _run_rc_doit "$_doit"; then - warn "failed to start ${name}" - return 1 + if ! _run_rc_doit "$_doit"; then + warn "failed to start ${name}" + return 1 + fi fi + if [ "${_rc_svcj}" != jailing ]; then # finally, run postcmd # - _run_rc_postcmd + _run_rc_postcmd + fi ;; stop) @@ -1372,6 +1500,11 @@ $_cpusetcmd $command $rc_flags $command_args" # and run postcmd. wait_for_pids $rc_pid + if checkyesno ${name}_svcj; then + # remove service jail + $JAIL_CMD -r svcj-${name} 2>/dev/null + fi + _run_rc_postcmd ;; diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 51a48341be60..9f32cfa5ab82 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 May 18, 2024 +.Dd May 22, 2024 .Dt RC.CONF 5 .Os .Sh NAME @@ -263,6 +263,19 @@ value. .It Ao Ar name Ac Ns Va _user .Pq Vt str Run the service under this user account. +.It Ao Ar name Ac Ns Va _svcj +.Pq Vt bool +If set to +.Dq Li YES , +auto-jail the service with inherited filesystem and other +jail properties depending on +.Ao Ar name Ac Ns Va _svcj_options . +.It Ao Ar name Ac Ns Va _svcj_options +.Pq Vt str +A list of jail properties for the service. +See +.Sx SERVICE JAILS +for a list of valid properties. .It Va apm_enable .Pq Vt bool If set to @@ -392,6 +405,12 @@ is set to these are the flags to pass to the .Xr powerd 8 daemon. +.It Va svcj_all_enable +Enable auto-jailing of all services which are not explicitly +excluded. +See +.Sx SERVICE JAILS +for more info. .It Va tmpmfs Controls the creation of a .Pa /tmp @@ -4917,6 +4936,97 @@ daemon. these are the flags to pass to the .Xr sendmail 8 .El +.Sh SERVICE JAILS +The service jails part of the rc system automatically puts a service +into a jail. +This jail inherits the filesystem and various other parts of the +parent (if you allow child-jails in your jails, service jails +can be used in jails) depending on the content of the +.Ao Ar name Ac Ns Va _svcj_options +variable. +Typically this variable is set inside rc scripts, but it can be +overriden in the rc config. +Valid options for +.Ao Ar name Ac Ns Va _svcj_options +are: +.Bl -tag -width indent-two +.It mlock +Allows to lock memory pages into the physical memory. +.It netv4 +Inherit the IPv4 address and allows to open reserved ports. +This can not be combined with +.Pa netv6 . +.It netv6 +Inherit the IPv6 address and allows to open reserved ports. +This can not be combined with +.Pa netv4 . +.It net_basic +Inherits the IPv4 and IPv6 addresses and allows to open +reserved ports. +.It net_raw +Allow to open raw sockets. +This option can be combined with +.Pa netv4 , +.Pa netv6 , +.Pa net_basic . +.It net_all +Inherits the IPv4 and IPv6 addresses, allows to open reserved +ports, allows to open raw sockets, and allows to open sockets +of protocol stacks that have not had jail functionality added +to them. +.It nfsd +Allows to run nfsd and affiliated daemons. +.It sysvipc +Allows access to SysV semaphores, SysV shared memory and +SysV messages. +.It vmm +Allows access to +.Xr vmm 4 . +This option is only available when +.Xr vmm 4 +is enabled in the kernel. +.El + +All non-network options can be combined with all other options. + +If the +.Ao Ar name Ac Ns Va _svcj +variable is set to +.Dq Li YES , +this particular service is started in a +service jail named +.Va svcj- Ns Ar name Ac . + +The +.Va svcj_all_enable +variable allows to enable service jails for all services of the +system at once. +Services which have +.Ao Ar name Ac Ns Va _svcj +set to +.Dq Li NO +are excluded. +Some services may set +.Ao Ar name Ac Ns Va _svcj +to +.Dq Li NO +in the script to either prevent service jails for this +service at all, or may set it to +.Dq Li NO +if it is not set in the +rc config, to exclude it from +.Va svcj_all_enable +but allow to explicitely enable it. +The sshd service for example would not see other jails, if +it would run as a service jail. +This may or may not be what is needed, and as such it is +excluded from +.Va svcj_all_enable +but can be enabled via setting +.Va sshd_svcj +to +.Dq Li YES . +.El .Sh FILES .Bl -tag -width "/etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf From nobody Wed May 22 13:41:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkssv6cQQz5Ll5J; Wed, 22 May 2024 13:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkssv5sKGz47fS; Wed, 22 May 2024 13:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+GPHMbkMd3vBWehwdMR6e/1HrISrHyOqD8zsNvnq1k=; b=B8pA/H5VGdkHU6N54GySTunO0BEXCwDN+22BX+MvZeyMPwWMbliP4vjvpXBstLBqjK4UTh UyojLU03HU2nuxD+JjMD4/YN0GHeMt3556JSQd73np+pRqQJ0ck2G5SvZpHQaliBfLcg8F 429EsP5RQghaARFsgRvV03nyusn4YgM0KBrjm8xMc51FcmYAkz4DXmo7Z2+qzUMjlxDlAY SChV58jYiYe8pwCsK5lazi7U5X0SYKerA84u2WMPE0CPgzjqhMro15B4Wp7DOsh8V0WENQ YEj0247YEoQAUGnH5HeLbHUi5MUYnd9ar+rtzw3tykZU1YP+zxAJ4JDTd/X5IQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716385315; a=rsa-sha256; cv=none; b=Z1wULB74jYW4DyASFPoSef041avlijp/xYNgUOBRZqsPnrJIERI36wh5/ljqIO6r18cv+y x0VZP67ep2oXjDbDqFGa6/nSPVczx6zem/+N3Q8aEi9Nb/XLgDCqdCKu5Y4UVQ65kYlkOq fkdE1sINJVff6SHgZMko6RwVesIFmXSOtoys6MebNoHI+XpvI8qaw2jJR5iVBXL8vY7XhV iHHQBcZSpgFOVeJOHjg7jTDpxfy9F4nMA6nWb6OW5vYbmdR/688sXbA+R9c1lffTjIdEed heUvCTGmc09afM7GQ71wNI3MGJyh8miqJFcRypriuX+cRj33tfHNXXhTqo2gGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716385315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+GPHMbkMd3vBWehwdMR6e/1HrISrHyOqD8zsNvnq1k=; b=C6/MVXNwUIGQ9kAnzBF7kAYcTOKm53dxHBptLKZX7ol3MYNiMV+ADxaiq3PE15+Y9W6ewR JMmTO0uADlaG1CwREtyjkByGdlg4cXiOPp0FcfMRVLDLgHMpz934UG2nEyayjpkc4eMag6 iDiH717wL3vHqxhcv8UlV14EoZTAxTxH9gvXgHgywFwfuARqiGcxp9xU21h2gVIYfg7JPg apJQm6Ao8sfLaA6XTxes3GgLJ7HnMLzjPWAAoESgP9dLSfuJT1sq2InWteOGGk3e/9ZLsM V62z4OP6ZM5xc5a5Ttz4cJYMpxajywjQ0WPYEUPtPmh1QLgP0snRy5Z3t4Poig== 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 4Vkssv5SMxz17D6; Wed, 22 May 2024 13:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDfth6030809; Wed, 22 May 2024 13:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDftxc030806; Wed, 22 May 2024 13:41:55 GMT (envelope-from git) Date: Wed, 22 May 2024 13:41:55 GMT Message-Id: <202405221341.44MDftxc030806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Leidinger <netchild@FreeBSD.org> Subject: git: f99f0ee14e3a - main - rc.d: add a service jails config to all base system services List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: netchild X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f99f0ee14e3af81c23150a6a340259ca8a33d01a Auto-Submitted: auto-generated The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=f99f0ee14e3af81c23150a6a340259ca8a33d01a commit f99f0ee14e3af81c23150a6a340259ca8a33d01a Author: Alexander Leidinger <netchild@FreeBSD.org> AuthorDate: 2024-05-22 13:31:47 +0000 Commit: Alexander Leidinger <netchild@FreeBSD.org> CommitDate: 2024-05-22 13:41:49 +0000 rc.d: add a service jails config to all base system services This gives more permissions to services (e.g. network access to services which require this) when they are started as an automatic service jail. The sshd patch is important for the sshd-related functionality as described in the man-page in the service jails part. The location of the added env vars is supposed to allow overriding them in rc.conf, and to hard-disable the use of svcj for some parts where it doesn't make sense or will not work. Only a subset of all of the services are fully tested (I'm running this since more than a year with various services started as service jails). The untested parts should be most of the time ok, in some edge-cases more permissions are needed inside the service jail. Differential Revision: https://reviews.freebsd.org/D40371 --- libexec/rc/rc.d/accounting | 4 ++++ libexec/rc/rc.d/adjkerntz | 4 ++++ libexec/rc/rc.d/apm | 4 ++++ libexec/rc/rc.d/apmd | 4 ++++ libexec/rc/rc.d/auditd | 4 ++++ libexec/rc/rc.d/auditdistd | 2 ++ libexec/rc/rc.d/automount | 4 ++++ libexec/rc/rc.d/automountd | 4 ++++ libexec/rc/rc.d/autounmountd | 4 ++++ libexec/rc/rc.d/bgfsck | 4 ++++ libexec/rc/rc.d/blacklistd | 3 +++ libexec/rc/rc.d/bluetooth | 3 +++ libexec/rc/rc.d/bootparams | 2 ++ libexec/rc/rc.d/bridge | 4 ++++ libexec/rc/rc.d/bsnmpd | 2 ++ libexec/rc/rc.d/bthidd | 3 +++ libexec/rc/rc.d/ccd | 4 ++++ libexec/rc/rc.d/cfumass | 4 ++++ libexec/rc/rc.d/cleanvar | 4 ++++ libexec/rc/rc.d/cleartmp | 4 ++++ libexec/rc/rc.d/cron | 5 +++++ libexec/rc/rc.d/ctld | 4 ++++ libexec/rc/rc.d/ddb | 3 +++ libexec/rc/rc.d/defaultroute | 4 ++++ libexec/rc/rc.d/devd | 4 ++++ libexec/rc/rc.d/devfs | 4 ++++ libexec/rc/rc.d/devmatch | 4 ++++ libexec/rc/rc.d/dhclient | 3 +++ libexec/rc/rc.d/dmesg | 4 ++++ libexec/rc/rc.d/dnctl | 3 +++ libexec/rc/rc.d/dumpon | 4 ++++ libexec/rc/rc.d/fsck | 4 ++++ libexec/rc/rc.d/ftp-proxy | 2 ++ libexec/rc/rc.d/ftpd | 10 ++++------ libexec/rc/rc.d/geli | 4 ++++ libexec/rc/rc.d/geli2 | 4 ++++ libexec/rc/rc.d/ggated | 3 +++ libexec/rc/rc.d/gptboot | 4 ++++ libexec/rc/rc.d/growfs | 4 ++++ libexec/rc/rc.d/growfs_fstab | 4 ++++ libexec/rc/rc.d/gssd | 2 ++ libexec/rc/rc.d/hastd | 4 ++++ libexec/rc/rc.d/hcsecd | 3 +++ libexec/rc/rc.d/hostapd | 4 ++++ libexec/rc/rc.d/hostid | 4 ++++ libexec/rc/rc.d/hostid_save | 4 ++++ libexec/rc/rc.d/hostname | 4 ++++ libexec/rc/rc.d/inetd | 2 ++ libexec/rc/rc.d/iovctl | 4 ++++ libexec/rc/rc.d/ip6addrctl | 4 ++++ libexec/rc/rc.d/ipfilter | 3 +++ libexec/rc/rc.d/ipfs | 4 ++++ libexec/rc/rc.d/ipfw | 3 +++ libexec/rc/rc.d/ipfw_netflow | 3 +++ libexec/rc/rc.d/ipmon | 3 +++ libexec/rc/rc.d/ipnat | 3 +++ libexec/rc/rc.d/ippool | 4 ++++ libexec/rc/rc.d/ipropd_master | 12 ++++++++---- libexec/rc/rc.d/ipropd_slave | 14 +++++++++----- libexec/rc/rc.d/ipsec | 4 ++++ libexec/rc/rc.d/iscsictl | 4 ++++ libexec/rc/rc.d/iscsid | 4 ++++ libexec/rc/rc.d/jail | 4 ++++ libexec/rc/rc.d/kadmind | 10 +++------- libexec/rc/rc.d/kdc | 1 + libexec/rc/rc.d/keyserv | 2 ++ libexec/rc/rc.d/kfd | 8 ++------ libexec/rc/rc.d/kld | 4 ++++ libexec/rc/rc.d/kldxref | 4 ++++ libexec/rc/rc.d/kpasswdd | 10 +++------- libexec/rc/rc.d/ldconfig | 4 ++++ libexec/rc/rc.d/linux | 4 ++++ libexec/rc/rc.d/local | 4 ++++ libexec/rc/rc.d/local_unbound | 1 + libexec/rc/rc.d/localpkg | 6 ++++++ libexec/rc/rc.d/lockd | 7 +++++-- libexec/rc/rc.d/lpd | 2 ++ libexec/rc/rc.d/mdconfig | 3 +++ libexec/rc/rc.d/mdconfig2 | 3 +++ libexec/rc/rc.d/mixer | 4 ++++ libexec/rc/rc.d/motd | 4 ++++ libexec/rc/rc.d/mountcritlocal | 4 ++++ libexec/rc/rc.d/mountcritremote | 4 ++++ libexec/rc/rc.d/mountd | 6 ++++++ libexec/rc/rc.d/mountlate | 4 ++++ libexec/rc/rc.d/moused | 5 +++++ libexec/rc/rc.d/msgs | 4 ++++ libexec/rc/rc.d/natd | 4 ++++ libexec/rc/rc.d/netif | 4 ++++ libexec/rc/rc.d/netoptions | 4 ++++ libexec/rc/rc.d/netwait | 4 ++++ libexec/rc/rc.d/newsyslog | 4 ++++ libexec/rc/rc.d/nfscbd | 2 ++ libexec/rc/rc.d/nfsclient | 4 ++++ libexec/rc/rc.d/nfsd | 4 ++++ libexec/rc/rc.d/nfsuserd | 4 ++++ libexec/rc/rc.d/nisdomain | 4 ++++ libexec/rc/rc.d/nscd | 3 +++ libexec/rc/rc.d/ntpd | 3 +++ libexec/rc/rc.d/ntpdate | 4 ++++ libexec/rc/rc.d/opensm | 2 ++ libexec/rc/rc.d/os-release | 4 ++++ libexec/rc/rc.d/pf | 3 +++ libexec/rc/rc.d/pflog | 6 ++++++ libexec/rc/rc.d/pfsync | 4 ++++ libexec/rc/rc.d/power_profile | 3 +++ libexec/rc/rc.d/powerd | 4 ++++ libexec/rc/rc.d/ppp | 4 ++++ libexec/rc/rc.d/pppoed | 4 ++++ libexec/rc/rc.d/pwcheck | 4 ++++ libexec/rc/rc.d/quota | 3 +++ libexec/rc/rc.d/random | 4 ++++ libexec/rc/rc.d/rarpd | 2 ++ libexec/rc/rc.d/rctl | 4 ++++ libexec/rc/rc.d/resolv | 4 ++++ libexec/rc/rc.d/rfcomm_pppd_server | 4 ++++ libexec/rc/rc.d/root | 4 ++++ libexec/rc/rc.d/route6d | 2 ++ libexec/rc/rc.d/routed | 2 ++ libexec/rc/rc.d/routing | 4 ++++ libexec/rc/rc.d/rpcbind | 2 ++ libexec/rc/rc.d/rtadvd | 5 +++++ libexec/rc/rc.d/rtsold | 2 ++ libexec/rc/rc.d/rwho | 2 ++ libexec/rc/rc.d/savecore | 4 ++++ libexec/rc/rc.d/sdpd | 3 +++ libexec/rc/rc.d/securelevel | 4 ++++ libexec/rc/rc.d/sendmail | 2 ++ libexec/rc/rc.d/sshd | 6 ++++++ libexec/rc/rc.d/statd | 7 +++++-- libexec/rc/rc.d/static_arp | 4 ++++ libexec/rc/rc.d/static_ndp | 4 ++++ libexec/rc/rc.d/stf | 4 ++++ libexec/rc/rc.d/swap | 4 ++++ libexec/rc/rc.d/swaplate | 4 ++++ libexec/rc/rc.d/syscons | 4 ++++ libexec/rc/rc.d/sysctl | 4 ++++ libexec/rc/rc.d/sysctl_lastload | 4 ++++ libexec/rc/rc.d/syslogd | 2 ++ libexec/rc/rc.d/sysvipc | 4 ++++ libexec/rc/rc.d/tlsclntd | 2 ++ libexec/rc/rc.d/tlsservd | 2 ++ libexec/rc/rc.d/tmp | 3 +++ libexec/rc/rc.d/ubthidhci | 4 ++++ libexec/rc/rc.d/ugidfw | 4 ++++ libexec/rc/rc.d/utx | 4 ++++ libexec/rc/rc.d/var | 3 +++ libexec/rc/rc.d/var_run | 3 +++ libexec/rc/rc.d/virecover | 4 ++++ libexec/rc/rc.d/watchdogd | 4 ++++ libexec/rc/rc.d/wpa_supplicant | 3 +++ libexec/rc/rc.d/ypbind | 2 ++ libexec/rc/rc.d/ypldap | 2 ++ libexec/rc/rc.d/yppasswdd | 2 ++ libexec/rc/rc.d/ypserv | 2 ++ libexec/rc/rc.d/ypset | 3 +++ libexec/rc/rc.d/ypupdated | 2 ++ libexec/rc/rc.d/ypxfrd | 2 ++ libexec/rc/rc.d/zfs | 4 ++++ libexec/rc/rc.d/zfsbe | 4 ++++ libexec/rc/rc.d/zfsd | 4 ++++ libexec/rc/rc.d/zfskeys | 4 ++++ libexec/rc/rc.d/zpool | 4 ++++ libexec/rc/rc.d/zpoolreguid | 4 ++++ libexec/rc/rc.d/zpoolupgrade | 4 ++++ libexec/rc/rc.d/zvol | 4 ++++ 166 files changed, 598 insertions(+), 39 deletions(-) diff --git a/libexec/rc/rc.d/accounting b/libexec/rc/rc.d/accounting index 5c08f18cd2ca..1e0ece84fb15 100755 --- a/libexec/rc/rc.d/accounting +++ b/libexec/rc/rc.d/accounting @@ -76,4 +76,8 @@ accounting_rotate_log() } load_rc_config $name + +# doesn't make sense to run in a svcj: jail can't manipulate accounting +accounting_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/adjkerntz b/libexec/rc/rc.d/adjkerntz index 81ee596369a5..339f8add7201 100755 --- a/libexec/rc/rc.d/adjkerntz +++ b/libexec/rc/rc.d/adjkerntz @@ -14,4 +14,8 @@ start_cmd="adjkerntz -i" stop_cmd=":" load_rc_config $name + +# doesn't make sense to run in a svcj: jail can't modify kerntz +adjkerntz_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/apm b/libexec/rc/rc.d/apm index b2bde4d32d1c..3187f41c3a50 100755 --- a/libexec/rc/rc.d/apm +++ b/libexec/rc/rc.d/apm @@ -43,4 +43,8 @@ apm_status() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +apm_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/apmd b/libexec/rc/rc.d/apmd index 8c6293549dc0..aeb5042342d6 100755 --- a/libexec/rc/rc.d/apmd +++ b/libexec/rc/rc.d/apmd @@ -34,4 +34,8 @@ apmd_prestart() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +apmd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/auditd b/libexec/rc/rc.d/auditd index 90017d88ab85..caea2587a2e9 100755 --- a/libexec/rc/rc.d/auditd +++ b/libexec/rc/rc.d/auditd @@ -32,4 +32,8 @@ auditd_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +auditd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/auditdistd b/libexec/rc/rc.d/auditdistd index e7ae7d64d39d..0814c2a4d2c7 100755 --- a/libexec/rc/rc.d/auditdistd +++ b/libexec/rc/rc.d/auditdistd @@ -17,5 +17,7 @@ command="/usr/sbin/${name}" required_files="/etc/security/${name}.conf" extra_commands="reload" +: ${auditdistd_svcj_options:="net_basic"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/automount b/libexec/rc/rc.d/automount index b01928651ec4..19f367837189 100755 --- a/libexec/rc/rc.d/automount +++ b/libexec/rc/rc.d/automount @@ -28,4 +28,8 @@ automount_stop() } load_rc_config $name + +# mounting shall not be performed in a svcj +automount_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/automountd b/libexec/rc/rc.d/automountd index 4bc6f7d01862..b809e9dfc8ad 100755 --- a/libexec/rc/rc.d/automountd +++ b/libexec/rc/rc.d/automountd @@ -17,4 +17,8 @@ command="/usr/sbin/${name}" required_modules="autofs" load_rc_config $name + +# mounting shall not be performed in a svcj +automountd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/autounmountd b/libexec/rc/rc.d/autounmountd index c939c6d8d011..1d8b3bfa354f 100755 --- a/libexec/rc/rc.d/autounmountd +++ b/libexec/rc/rc.d/autounmountd @@ -16,4 +16,8 @@ pidfile="/var/run/${name}.pid" command="/usr/sbin/${name}" load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +autounmountd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/bgfsck b/libexec/rc/rc.d/bgfsck index 24753f9f561f..dd5c330c3d11 100755 --- a/libexec/rc/rc.d/bgfsck +++ b/libexec/rc/rc.d/bgfsck @@ -46,4 +46,8 @@ bgfsck_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +bgfsck_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/blacklistd b/libexec/rc/rc.d/blacklistd index b58c7c8a76b6..ecbb71e41fca 100755 --- a/libexec/rc/rc.d/blacklistd +++ b/libexec/rc/rc.d/blacklistd @@ -40,5 +40,8 @@ rcvar="blacklistd_enable" command="/usr/sbin/${name}" required_files="/etc/blacklistd.conf" +# no svcj options needed +: ${blacklistd_svcj_options:=""} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/bluetooth b/libexec/rc/rc.d/bluetooth index 679d669a6191..22bd5078034d 100755 --- a/libexec/rc/rc.d/bluetooth +++ b/libexec/rc/rc.d/bluetooth @@ -317,5 +317,8 @@ bluetooth_stop() load_rc_config $name hccontrol="${bluetooth_hccontrol:-/usr/sbin/hccontrol}" +# doesn't make sense to run in a svcj: nojail keyword +bluetooth_svcj="NO" + run_rc_command $* diff --git a/libexec/rc/rc.d/bootparams b/libexec/rc/rc.d/bootparams index ce0b8a45e672..1d435d4ee480 100755 --- a/libexec/rc/rc.d/bootparams +++ b/libexec/rc/rc.d/bootparams @@ -15,5 +15,7 @@ rcvar="bootparamd_enable" required_files="/etc/bootparams" command="/usr/sbin/${name}" +: ${bootparamd_svcj_options:="net_basic"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/bridge b/libexec/rc/rc.d/bridge index a42d82adacc5..98d9212593e5 100755 --- a/libexec/rc/rc.d/bridge +++ b/libexec/rc/rc.d/bridge @@ -90,4 +90,8 @@ bridge_stop() iflist=$2 load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +bridge_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/bsnmpd b/libexec/rc/rc.d/bsnmpd index 60c7242f0c1f..60f4f5e86617 100755 --- a/libexec/rc/rc.d/bsnmpd +++ b/libexec/rc/rc.d/bsnmpd @@ -13,6 +13,8 @@ desc="Simple and extensible SNMP daemon" rcvar="bsnmpd_enable" command="/usr/sbin/${name}" +: ${bsnmpd_svcj_options:="net_basic"} + load_rc_config $name pidfile="${bsnmpd_pidfile:-/var/run/snmpd.pid}" command_args="-p ${pidfile}" diff --git a/libexec/rc/rc.d/bthidd b/libexec/rc/rc.d/bthidd index ec7da8181ca3..4b230406c4d5 100755 --- a/libexec/rc/rc.d/bthidd +++ b/libexec/rc/rc.d/bthidd @@ -50,4 +50,7 @@ if evdev_enabled; then fi required_files="${config}" +# doesn't make sense to run in a svcj: nojail keyword +bthidd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ccd b/libexec/rc/rc.d/ccd index f7dde1c23f4e..5f2427e4beb0 100755 --- a/libexec/rc/rc.d/ccd +++ b/libexec/rc/rc.d/ccd @@ -21,4 +21,8 @@ ccd_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +ccd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cfumass b/libexec/rc/rc.d/cfumass index 79c9b0ae63d4..7d1117d7c388 100755 --- a/libexec/rc/rc.d/cfumass +++ b/libexec/rc/rc.d/cfumass @@ -145,4 +145,8 @@ cfumass_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +cfumass_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cleanvar b/libexec/rc/rc.d/cleanvar index 08e647dde5ae..dce5baa6875b 100755 --- a/libexec/rc/rc.d/cleanvar +++ b/libexec/rc/rc.d/cleanvar @@ -43,4 +43,8 @@ cleanvar_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +cleanvar_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cleartmp b/libexec/rc/rc.d/cleartmp index 8101474b33cf..c4dfb5367dcb 100755 --- a/libexec/rc/rc.d/cleartmp +++ b/libexec/rc/rc.d/cleartmp @@ -57,4 +57,8 @@ cleartmp_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +cleartmp_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/cron b/libexec/rc/rc.d/cron index a37d3ceee02e..584db590d835 100755 --- a/libexec/rc/rc.d/cron +++ b/libexec/rc/rc.d/cron @@ -16,6 +16,11 @@ command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" load_rc_config $name + +# doesn't make sense to run in a svcj: in the generic case it may need +# access to more than a jails allows +cron_svcj="NO" + if checkyesno cron_dst then cron_flags="$cron_flags -s" diff --git a/libexec/rc/rc.d/ctld b/libexec/rc/rc.d/ctld index f09c032575d9..c91d7a9be921 100755 --- a/libexec/rc/rc.d/ctld +++ b/libexec/rc/rc.d/ctld @@ -19,4 +19,8 @@ required_modules="ctl" extra_commands="reload" load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +ctld_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ddb b/libexec/rc/rc.d/ddb index 40235bebf90e..08a7d345c326 100755 --- a/libexec/rc/rc.d/ddb +++ b/libexec/rc/rc.d/ddb @@ -35,4 +35,7 @@ load_rc_config $name required_files="${ddb_config}" command_args="${ddb_config}" +# doesn't make sense to run in a svcj: privileged operation +ddb_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/defaultroute b/libexec/rc/rc.d/defaultroute index d8d6b2e97dcd..b96f91d36118 100755 --- a/libexec/rc/rc.d/defaultroute +++ b/libexec/rc/rc.d/defaultroute @@ -70,4 +70,8 @@ defaultroute_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +defaultroute_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/devd b/libexec/rc/rc.d/devd index 43fb9d5928dd..47326662339c 100755 --- a/libexec/rc/rc.d/devd +++ b/libexec/rc/rc.d/devd @@ -38,4 +38,8 @@ devd_prestart() } load_rc_config $name + +# doesn't make sense to run in a svcj: executing potential privileged operations +devd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/devfs b/libexec/rc/rc.d/devfs index b7835bd561ce..9987d35f6ad3 100755 --- a/libexec/rc/rc.d/devfs +++ b/libexec/rc/rc.d/devfs @@ -68,4 +68,8 @@ read_devfs_conf() } load_rc_config $name + +# doesn't make sense to run in a svcj: may need more permissions +devfs_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/devmatch b/libexec/rc/rc.d/devmatch index 67bb14761614..21846355fcfe 100755 --- a/libexec/rc/rc.d/devmatch +++ b/libexec/rc/rc.d/devmatch @@ -78,4 +78,8 @@ devmatch_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: privileged operations +devmatch_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/dhclient b/libexec/rc/rc.d/dhclient index e2f204076eb6..78442da29193 100755 --- a/libexec/rc/rc.d/dhclient +++ b/libexec/rc/rc.d/dhclient @@ -59,6 +59,9 @@ dhclient_prestart() load_rc_config $name load_rc_config network +# dhclient_prestart is not compatible with svcj +dhclient_svcj="NO" + if [ -z $ifn ] ; then # only complain if a command was specified but no interface if [ -n "$1" ] ; then diff --git a/libexec/rc/rc.d/dmesg b/libexec/rc/rc.d/dmesg index ed36ec17b419..51e35d5d4e80 100755 --- a/libexec/rc/rc.d/dmesg +++ b/libexec/rc/rc.d/dmesg @@ -23,4 +23,8 @@ do_dmesg() } load_rc_config $name + +# doesn't make sense to run in a svcj +dmesg_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/dnctl b/libexec/rc/rc.d/dnctl index 7e65b899bd01..9067d278088e 100644 --- a/libexec/rc/rc.d/dnctl +++ b/libexec/rc/rc.d/dnctl @@ -16,6 +16,9 @@ start_cmd="${name}_start" required_files="$dnctl_rules" required_modules="dummynet" +# doesn't make sense to run in a svcj: config setting +dnctl_svcj="NO" + dnctl_start() { startmsg -n "Enabling ${name}" diff --git a/libexec/rc/rc.d/dumpon b/libexec/rc/rc.d/dumpon index a6748711b796..0dfcdb266b20 100755 --- a/libexec/rc/rc.d/dumpon +++ b/libexec/rc/rc.d/dumpon @@ -97,4 +97,8 @@ dumpon_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +dumpon_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/fsck b/libexec/rc/rc.d/fsck index 359733d8484c..e755f055dbe6 100755 --- a/libexec/rc/rc.d/fsck +++ b/libexec/rc/rc.d/fsck @@ -91,4 +91,8 @@ fsck_start() } load_rc_config $name + +# doesn't make sense to run in a svcj +fsck_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ftp-proxy b/libexec/rc/rc.d/ftp-proxy index 250088d6bb35..c77dd36cd60b 100755 --- a/libexec/rc/rc.d/ftp-proxy +++ b/libexec/rc/rc.d/ftp-proxy @@ -13,6 +13,8 @@ desc="Internet File Transfer Protocol proxy daemon" rcvar="ftpproxy_enable" command="/usr/sbin/ftp-proxy" +: ${ftpproxy_svcj_options:="net_basic"} + load_rc_config $name # diff --git a/libexec/rc/rc.d/ftpd b/libexec/rc/rc.d/ftpd index 9bb9a722a2af..e25a561a520a 100755 --- a/libexec/rc/rc.d/ftpd +++ b/libexec/rc/rc.d/ftpd @@ -13,13 +13,11 @@ desc="Internet File Transfer Protocol daemon" rcvar="ftpd_enable" command="/usr/libexec/${name}" pidfile="/var/run/${name}.pid" -start_precmd=ftpd_prestart -ftpd_prestart() -{ - rc_flags="-D ${rc_flags}" - return 0 -} +: ${ftpd_svcj_options:="net_basic"} load_rc_config $name + +flags="-D ${flags} ${rc_flags}" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/geli b/libexec/rc/rc.d/geli index 16d24efd1e39..5fc5ded54ec3 100755 --- a/libexec/rc/rc.d/geli +++ b/libexec/rc/rc.d/geli @@ -121,4 +121,8 @@ geli_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +geli_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/geli2 b/libexec/rc/rc.d/geli2 index 16248d32ece8..cedd48a312ee 100755 --- a/libexec/rc/rc.d/geli2 +++ b/libexec/rc/rc.d/geli2 @@ -55,4 +55,8 @@ geli2_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +geli2_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ggated b/libexec/rc/rc.d/ggated index 22bc8beb7ca0..846019acb055 100755 --- a/libexec/rc/rc.d/ggated +++ b/libexec/rc/rc.d/ggated @@ -14,6 +14,9 @@ pidfile="/var/run/${name}.pid" load_rc_config $name required_files="${ggated_config}" +# XXX?: doesn't make sense to run in a svcj: low-level access +ggated_svcj="NO" + command_args="${ggated_config}" run_rc_command "$1" diff --git a/libexec/rc/rc.d/gptboot b/libexec/rc/rc.d/gptboot index 3f04143e79ec..188f1bb77557 100755 --- a/libexec/rc/rc.d/gptboot +++ b/libexec/rc/rc.d/gptboot @@ -73,4 +73,8 @@ gptboot_report() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +gptboot_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/growfs b/libexec/rc/rc.d/growfs index d16951b4bc3e..86bf199a8611 100755 --- a/libexec/rc/rc.d/growfs +++ b/libexec/rc/rc.d/growfs @@ -306,4 +306,8 @@ growfs_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +growfs_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/growfs_fstab b/libexec/rc/rc.d/growfs_fstab index a9d18c1eaed3..8b7cea3a63e5 100755 --- a/libexec/rc/rc.d/growfs_fstab +++ b/libexec/rc/rc.d/growfs_fstab @@ -58,4 +58,8 @@ growfs_fstab_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +growfs_fstab_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/gssd b/libexec/rc/rc.d/gssd index fa0edcead140..7ab3c181eeb1 100755 --- a/libexec/rc/rc.d/gssd +++ b/libexec/rc/rc.d/gssd @@ -13,5 +13,7 @@ name=gssd desc="Generic Security Services Daemon" rcvar=gssd_enable +: ${gssd_svcj_options:="net_basic nfsd"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/hastd b/libexec/rc/rc.d/hastd index 8c1d9e8bc16a..37df43d26c7d 100755 --- a/libexec/rc/rc.d/hastd +++ b/libexec/rc/rc.d/hastd @@ -26,4 +26,8 @@ hastd_stop_precmd() } load_rc_config $name + +# doesn't make sense to run in a svcj: nojail keyword +hastd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hcsecd b/libexec/rc/rc.d/hcsecd index 542305040357..8827e53777f3 100755 --- a/libexec/rc/rc.d/hcsecd +++ b/libexec/rc/rc.d/hcsecd @@ -21,4 +21,7 @@ config="${hcsecd_config:-/etc/bluetooth/${name}.conf}" command_args="-f ${config}" required_files="${config}" +# doesn't make sense to run in a svcj: nojail keyword +hcsecd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostapd b/libexec/rc/rc.d/hostapd index fe3dac1dea06..251df91a280b 100755 --- a/libexec/rc/rc.d/hostapd +++ b/libexec/rc/rc.d/hostapd @@ -38,4 +38,8 @@ required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp" extra_commands="reload" load_rc_config ${name} + +# doesn't make sense to run in a svcj: nojail keyword +hostapd_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostid b/libexec/rc/rc.d/hostid index 0210ca433501..18d0fbabf6e4 100755 --- a/libexec/rc/rc.d/hostid +++ b/libexec/rc/rc.d/hostid @@ -156,4 +156,8 @@ hostid_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +hostid_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostid_save b/libexec/rc/rc.d/hostid_save index af7f4138a5dd..b9727d24bc57 100755 --- a/libexec/rc/rc.d/hostid_save +++ b/libexec/rc/rc.d/hostid_save @@ -44,4 +44,8 @@ hostid_save() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +hostid_save_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/hostname b/libexec/rc/rc.d/hostname index f6ac95c9c888..8b26c4f60633 100755 --- a/libexec/rc/rc.d/hostname +++ b/libexec/rc/rc.d/hostname @@ -77,4 +77,8 @@ hostname_start() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +hostname_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/inetd b/libexec/rc/rc.d/inetd index 9820f8dc319a..81cc18d95be2 100755 --- a/libexec/rc/rc.d/inetd +++ b/libexec/rc/rc.d/inetd @@ -16,5 +16,7 @@ pidfile="/var/run/${name}.pid" required_files="/etc/${name}.conf" extra_commands="reload" +: ${inetd_svcj_options:="net_basic"} + load_rc_config $name run_rc_command "$1" diff --git a/libexec/rc/rc.d/iovctl b/libexec/rc/rc.d/iovctl index 01e16221cc4a..b2404f5665b1 100755 --- a/libexec/rc/rc.d/iovctl +++ b/libexec/rc/rc.d/iovctl @@ -35,4 +35,8 @@ iovctl_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +iovctl_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ip6addrctl b/libexec/rc/rc.d/ip6addrctl index 50d9408d0731..eac1d2729e78 100755 --- a/libexec/rc/rc.d/ip6addrctl +++ b/libexec/rc/rc.d/ip6addrctl @@ -120,4 +120,8 @@ ip6addrctl_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +ipv6addrctl_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter index e951bc9b7878..d0cb09ab527c 100755 --- a/libexec/rc/rc.d/ipfilter +++ b/libexec/rc/rc.d/ipfilter @@ -15,6 +15,9 @@ rcvar="ipfilter_enable" load_rc_config $name stop_precmd="test -f ${ipfilter_rules}" +# doesn't make sense to run in a svcj: config setting +ipfilter_svcj="NO" + start_precmd="$stop_precmd" start_cmd="ipfilter_start" stop_cmd="ipfilter_stop" diff --git a/libexec/rc/rc.d/ipfs b/libexec/rc/rc.d/ipfs index c51527bde43c..2ec4ad3b1d00 100755 --- a/libexec/rc/rc.d/ipfs +++ b/libexec/rc/rc.d/ipfs @@ -49,4 +49,8 @@ ipfs_stop() } load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +ipfs_svcj="NO" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw index 2f6b20a41b1a..6d6f7577828f 100755 --- a/libexec/rc/rc.d/ipfw +++ b/libexec/rc/rc.d/ipfw @@ -163,4 +163,7 @@ ipfw_status() load_rc_config $name firewall_coscripts="/etc/rc.d/natd ${firewall_coscripts}" +# doesn't make sense to run in a svcj: config setting +ipfw_svcj="NO" + run_rc_command $* diff --git a/libexec/rc/rc.d/ipfw_netflow b/libexec/rc/rc.d/ipfw_netflow index 219f0a4facf6..129488ce60d0 100755 --- a/libexec/rc/rc.d/ipfw_netflow +++ b/libexec/rc/rc.d/ipfw_netflow @@ -73,4 +73,7 @@ ipfw_netflow_stop() load_rc_config $name +# doesn't make sense to run in a svcj: config setting +ipfw_netflow_svcj="NO" + run_rc_command $* diff --git a/libexec/rc/rc.d/ipmon b/libexec/rc/rc.d/ipmon index a6449f241b87..3ef0c895ad16 100755 --- a/libexec/rc/rc.d/ipmon +++ b/libexec/rc/rc.d/ipmon @@ -15,6 +15,9 @@ rcvar="ipmon_enable" command="/sbin/${name}" start_precmd="ipmon_precmd" +# no svcj options needed +: ${ipmon_svcj_options:=""} + ipmon_precmd() { # Continue only if ipfilter or ipnat is enabled and the diff --git a/libexec/rc/rc.d/ipnat b/libexec/rc/rc.d/ipnat index 88cf368876d7..56fe443686b1 100755 --- a/libexec/rc/rc.d/ipnat +++ b/libexec/rc/rc.d/ipnat @@ -18,6 +18,9 @@ extra_commands="reload" required_files="${ipnat_rules}" required_modules="ipl:ipfilter" +# doesn't make sense to run in a svcj: config setting +ipnat_svcj="NO" + ipnat_start() { echo "Installing NAT rules." diff --git a/libexec/rc/rc.d/ippool b/libexec/rc/rc.d/ippool index 42cef3faf7eb..0db8bbe98f61 100755 --- a/libexec/rc/rc.d/ippool +++ b/libexec/rc/rc.d/ippool @@ -13,6 +13,10 @@ name="ippool" desc="user interface to the IPFilter pools" rcvar="ippool_enable" load_rc_config $name + +# doesn't make sense to run in a svcj: config setting +ippool_svcj="NO" + start_precmd="ippool_start_precmd" stop_cmd="${ippool_program} -F" reload_cmd="ippool_reload" diff --git a/libexec/rc/rc.d/ipropd_master b/libexec/rc/rc.d/ipropd_master index 9f8e1ee14490..a3ca498afe6c 100755 --- a/libexec/rc/rc.d/ipropd_master +++ b/libexec/rc/rc.d/ipropd_master @@ -14,6 +14,8 @@ required_files="$ipropd_master_keytab" start_precmd=${name}_start_precmd start_postcmd=${name}_start_postcmd +: ${ipropd_master_svcj_options:="net_basic"} + ipropd_master_start_precmd() { @@ -24,10 +26,6 @@ ipropd_master_start_precmd() for _slave in $ipropd_master_slaves; do echo $_slave done > /var/heimdal/slaves || return 1 - command_args="$command_args \ - --keytab=\"$ipropd_master_keytab\" \ - --detach \ - " } ipropd_master_start_postcmd() { @@ -36,4 +34,10 @@ ipropd_master_start_postcmd() } load_rc_config $name + +command_args="$command_args \ + --keytab=\"$ipropd_master_keytab\" \ + --detach \ +" + run_rc_command "$1" diff --git a/libexec/rc/rc.d/ipropd_slave b/libexec/rc/rc.d/ipropd_slave index 9d4b06f0e8f3..1735cff3de86 100755 *** 1539 LINES SKIPPED *** From nobody Wed May 22 13:56:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VktCH6Yctz5Lm0j; Wed, 22 May 2024 13:56: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VktCH631Hz4BRh; Wed, 22 May 2024 13:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njj99ici+jc/BoaEyjeU+KQq2h4LvuMlmmN0zrAfWrQ=; b=s0rb17e2ALhU/zay882xZTEa6oo6/5Q3BR0PTQcu4YE/8trEPFMnxJ6/tdFujoKqE3AcVh iAhFyOmZnU21WS5I3bNJzCA4S/v2P73+huTcqeJpHABh9MjKZmYVx1ro9a6Q1wHVFMdW12 m1PcyM7s7qteKvUs7U4FSUTtKP66PJ/eUdvx89l4JU3QY9euEQE1NGc0LIamceLlx+IwI4 LCf/2f3K3l1ei7YyWOUDDm5vtfBiVYInBgtkyvOsCRSHNi74STVqIGEzH3MOY07PVPUnUs XjxMm472lQv5RdwSdtuDHgCd7HHLokK4wSAaGQKWJft5IM3tJ0oSsjV9PDsjrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716386219; a=rsa-sha256; cv=none; b=KvankGizJ3zVQMAR9rCxr5cFZ6ae0O/6qS4BoPEFJ9YBQDyJiRWIclN3NybVzSHwZYvKku iBhk+iUNGYtILAszzBiwp5U5iXgQ2MwkNgheni3Kb9XQA3rru27J15iZ4BG9Mb9UtAlM4v TLcwznVK5zTy7TMt0CE/+P1caDJjSjd8hgrAe0PGwhYyDPCqoT4OUS+nFMjl/531obSBLn PB3jztpDd4wRlIruonRJbNSNOVbyaxU1hOyXP99HinnMhIuS6EGhI+EAzAE4xHDIOSPBWn FNVw/dA6pLFrYJrC2dEEPzfvpQ/E/PDUwX5vb18nGAa1mvZjtk6eGDIpGTZCsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njj99ici+jc/BoaEyjeU+KQq2h4LvuMlmmN0zrAfWrQ=; b=bLn+fGu0Le4qFDXWEoLObxsRTrWfiVJHap2zFXHiWWD1Fcysw/sXJhmEifa5CK140UyR8W M2FFg9eBkQNMMger3iF9lPWVHaiqqVEjVR/ZugqD/0H8hd3MXKg6zZbB+XibcKXKUpCOU/ Ckk1imZyaoV5W/TGZuOBjoSk6b454L/6nFc40boNVAHAcBr42qb+uEIxQss3cfLMS4qO5d KWAfGQ3+WP3xq3V0H/2mfuW2ObmkcpUECna/qO+oBEyFOW+jZwtfOu/2W7PxzBi+E29sCy wvBoRoCDrwd8+QL/vTNCUcV6YcShMkszNGSNk7tgjc04KhA18FdZJcIWZSnwLg== 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 4VktCH5f7yz16tY; Wed, 22 May 2024 13:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDuxb7050361; Wed, 22 May 2024 13:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDuxV4050358; Wed, 22 May 2024 13:56:59 GMT (envelope-from git) Date: Wed, 22 May 2024 13:56:59 GMT Message-Id: <202405221356.44MDuxV4050358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: eaab8e4166a0 - main - mac_do(4): fix typo List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eaab8e4166a02212cb7d6aea4304834d9bcf5ff9 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=eaab8e4166a02212cb7d6aea4304834d9bcf5ff9 commit eaab8e4166a02212cb7d6aea4304834d9bcf5ff9 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-22 13:56:03 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-22 13:56:36 +0000 mac_do(4): fix typo Reported by: Gary Jennejohn <garyj@gmx.de> --- share/man/man4/mac_do.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index 9a9ebe1ca989..ce9f8cf25a4a 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -27,7 +27,7 @@ according to predefined rules. The exact set of kernel privileges granted are: .Bl -inset -compact -offset indent .It Dv PRIV_CRED_SETGROUPS -.It Dv PRIV_CRET_SETUID +.It Dv PRIV_CRED_SETUID .El .Pp The following From nobody Wed May 22 13:59:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VktG40C8pz5LmDL; Wed, 22 May 2024 13:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VktG36X4Tz4D5V; Wed, 22 May 2024 13:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nY7nopUCbJ89NoBxmM8NoqvkX49Y61vk9Ml0lrdbBY=; b=wb9rxCxOqiXEiaXTr6/A3qtbhJB6YZMwNBGkZz1IFCV4OH9MLfi3wDHcCdAWw3Hm/74/UO xbavuhOjGpOKqte2CT5p7iro/PRdbOBQrZecknWO1h5qjB/vvTai/OXrGVECBGLmHRUJu7 AkL3oSjohS/gxpoUW7CPa3hB3W2uyfuDZYWA88d29DChK34dBoFSzVqTQyPT8pCpof5tt1 IQXiUebqIibBCTY7v4lnreuaRxj+P8KzMvgi7DVNv7x97paFHqFGCt4R6AG0+Pir+lAEpA PGCVR6TnEx2mgyNzwFPxtLrG9liJDdHKEpdqFvv7z9wm2hpFTOsTlVh2hG4oQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716386363; a=rsa-sha256; cv=none; b=gqxycC1M/XHD7+/RIxdO9VHRuwPtkWvmjmQifnpRt2Rc3vmIGkWuhx0r9mhR+/3jqOyUUU IotI2YziL/B64P2G37ZZb3q+wh4ezmHLjnr7S/AKzc+fEXWIrvupVWxgLZf0W7tJEQzFlo FLHrznXisFnxJ4sCeAB9+/oJ8IeFp8f2yN+cbvzF7JyPI/t3PRUScUiwJa8GhYbyL7sX+8 HhdhMYy3LJqycF5CA2EKbkbLsxn2zMAMyqxVnGhAiKWMCrU9qiMdfYaFf7l2CvuOCuJsIX J7IK9pVE4vz7kdsEYWwl5vQ80aTXGa7aXC5EVQT4qNQ/3h6/yXanbVrf2WuzqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/nY7nopUCbJ89NoBxmM8NoqvkX49Y61vk9Ml0lrdbBY=; b=jdvxFn8utxZESVYlDU2Uro4L2h7YfYJWU7ROcSO9WpCnZRWYXOErY3l/iEpdzk7NN1ONxd dB1mLh0uu9nJ0pYetTo6Ym+yFwffiipwB3Zw/KAzKE5+P1WgapdMQqWWY1/9JT6R/XQOZK MLzQAfAYSQ2AXgL0GpjaqWb4BidpKGSZKr7x3RLfHgSHeDawCYnpqK33CYjiS8goTH7UUE gQDX5mCeetpMGeOAfeeIeLygm4bhNe0Vi2qaq4zGnQVGjdSBS/tgpcDYRbM83GMOrgsyks Td54pakYazr5DMarbZwBJYSAnEbRlGRuv6gQOKWdrlqsNI/aURAwYY8oV7f5mA== 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 4VktG35kt1z17Ps; Wed, 22 May 2024 13:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MDxN32051520; Wed, 22 May 2024 13:59:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MDxNAP051517; Wed, 22 May 2024 13:59:23 GMT (envelope-from git) Date: Wed, 22 May 2024 13:59:23 GMT Message-Id: <202405221359.44MDxNAP051517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang <zlei@FreeBSD.org> Subject: git: 3ebd2b1c7308 - stable/14 - if_vxlan(4): Add checking for loops and nesting of tunnels List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3ebd2b1c730834123a53b3eddcf9029fcf414782 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3ebd2b1c730834123a53b3eddcf9029fcf414782 commit 3ebd2b1c730834123a53b3eddcf9029fcf414782 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-05-20 12:14:07 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-05-22 13:58:31 +0000 if_vxlan(4): Add checking for loops and nesting of tunnels User misconfiguration, either tunnel loops, or a large number of different nested tunnels, can overflow the kernel stack. Prevent that by using if_tunnel_check_nesting(). PR: 278394 Diagnosed by: markj Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45197 (cherry picked from commit 93fbfef0b50354b7a1620822454ef29cd415cb2d) --- sys/net/if_vxlan.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index e6949bb5dc9a..87648abd116b 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -433,6 +433,21 @@ TUNABLE_INT("net.link.vxlan.legacy_port", &vxlan_legacy_port); static int vxlan_reuse_port = 0; TUNABLE_INT("net.link.vxlan.reuse_port", &vxlan_reuse_port); +/* + * This macro controls the default upper limitation on nesting of vxlan + * tunnels. By default it is 3, as the overhead of IPv6 vxlan tunnel is 70 + * bytes, this will create at most 210 bytes overhead and the most inner + * tunnel's MTU will be 1290 which will meet IPv6 minimum MTU size 1280. + * Be careful to configure the tunnels when raising the limit. A large + * number of nested tunnels can introduce system crash. + */ +#ifndef MAX_VXLAN_NEST +#define MAX_VXLAN_NEST 3 +#endif +static int max_vxlan_nesting = MAX_VXLAN_NEST; +SYSCTL_INT(_net_link_vxlan, OID_AUTO, max_nesting, CTLFLAG_RW, + &max_vxlan_nesting, 0, "Max nested tunnels"); + /* Default maximum number of addresses in the forwarding table. */ #ifndef VXLAN_FTABLE_MAX #define VXLAN_FTABLE_MAX 2000 @@ -2722,6 +2737,7 @@ vxlan_encap6(struct vxlan_softc *sc, const union vxlan_sockaddr *fvxlsa, #endif } +#define MTAG_VXLAN_LOOP 0x7876706c /* vxlp */ static int vxlan_transmit(struct ifnet *ifp, struct mbuf *m) { @@ -2747,6 +2763,13 @@ vxlan_transmit(struct ifnet *ifp, struct mbuf *m) m_freem(m); return (ENETDOWN); } + if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_VXLAN_LOOP, + max_vxlan_nesting) != 0)) { + VXLAN_RUNLOCK(sc, &tracker); + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ELOOP); + } if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) fe = vxlan_ftable_entry_lookup(sc, eh->ether_dhost); From nobody Wed May 22 14:01:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VktJq3JpLz5Lmbd; Wed, 22 May 2024 14:01: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VktJq2pxPz4F0M; Wed, 22 May 2024 14:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxTVDSdmB1fMUWmysa0nfDaizJYCyMTq66c9N2EyIfg=; b=TPy/9w7WKTPdPaxrLtHrYhaA881TwEOQU0uveojD5y9qMdYB2iC+diaNCgVWSpE+FCt3fV BBHNtL3pkk60aZB/VJ8czxqMn+RVLeAioj5vSauof0wFaAqvL9/ttmFnaFUe+3ozp4tM7R PwsRwOQ5egTBJTRhy5tfedDMOkKn+k29zR3e4GVGMsn98cfOTAGco8d0hyiebESwasJHDX yGDXEjFdXgy0jkz8uN4llIVlzsMLd7SirUwW8tT7mLiTvALPFVklVAKQ/EYRSfB4Lyn5vD awIXTg4buwqonwSDmkYun3RZJHShzE3Y4mvc+1fcULbVGZ1dvLqa0pY6AAEunw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716386507; a=rsa-sha256; cv=none; b=LdAnzqnHiVJ2pVNcKBCdpWDUOnG4I7OOcPuV9RSy6SREEMS12Q1hPj03OAGdNNIpG/gB4O hD12sry8E/Z9Vdjcd6z2UdGRtyQgOnjbhAMU3DdRJ5Azgb4BXMm+sK1XdQoI7RnG8UKvkx r67rjN0TLh3//JftAsqWn7gD1bas71vGMtAIy0QovHgnOeWhyEPVBovOk1UOnK5fmHDfMK ZhvPx3upWm+AoJ2OhH2eNU9i2zJUJOttjsUMjhMTpW6Rqi3Rul0BF+VTnqVhKwU4iSzIDD fKmk5WIJwC1RJPCMqxM2mkAHC81QPGKT3+c+zicZLIsJt5L8PXhRf00HJkw9nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716386507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxTVDSdmB1fMUWmysa0nfDaizJYCyMTq66c9N2EyIfg=; b=QpcbBJiz7tD2OrUjZFTDPsJrbZlgcA0YYB6sRgxtSeBj9sIyfMFtJdO+pAXhFZ2R/adtZh ZYw5XZbkjLADeTPGJlcjm3U/2xDJTFrnk95ZCaWRPUc0vJDMsYrwefWASSeimE0djskOQ3 dhv8bsALts/KD0ypoqHK0Xgoalxosng9FQ0SHuDBxzX83jsdOlodREjWLILosjDKf+5CF2 vCDywjdqu/BlzJw2Fy/gj+zbsL0es3yBJ5dOKQW1aaRF/OPwOBB5qkSAQZUEjaXxOBvH8A q8nwmCN+rJTwj6xgunZTg5nYt+Dm18qSh1NDpzQF2Z4Gzf4M7ACPK8QY/ds6Ag== 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 4VktJq2470z17dB; Wed, 22 May 2024 14:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ME1lIC066879; Wed, 22 May 2024 14:01:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ME1lhb066876; Wed, 22 May 2024 14:01:47 GMT (envelope-from git) Date: Wed, 22 May 2024 14:01:47 GMT Message-Id: <202405221401.44ME1lhb066876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang <zlei@FreeBSD.org> Subject: git: 9d653a52f899 - stable/13 - if_vxlan(4): Add checking for loops and nesting of tunnels List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9d653a52f899c420f00e23401c3ff44b493d4d32 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9d653a52f899c420f00e23401c3ff44b493d4d32 commit 9d653a52f899c420f00e23401c3ff44b493d4d32 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-05-20 12:14:07 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-05-22 14:01:00 +0000 if_vxlan(4): Add checking for loops and nesting of tunnels User misconfiguration, either tunnel loops, or a large number of different nested tunnels, can overflow the kernel stack. Prevent that by using if_tunnel_check_nesting(). PR: 278394 Diagnosed by: markj Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45197 (cherry picked from commit 93fbfef0b50354b7a1620822454ef29cd415cb2d) (cherry picked from commit 3ebd2b1c730834123a53b3eddcf9029fcf414782) --- sys/net/if_vxlan.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 9ab46a36545c..3802ebe4bfbe 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -431,6 +431,21 @@ TUNABLE_INT("net.link.vxlan.legacy_port", &vxlan_legacy_port); static int vxlan_reuse_port = 0; TUNABLE_INT("net.link.vxlan.reuse_port", &vxlan_reuse_port); +/* + * This macro controls the default upper limitation on nesting of vxlan + * tunnels. By default it is 3, as the overhead of IPv6 vxlan tunnel is 70 + * bytes, this will create at most 210 bytes overhead and the most inner + * tunnel's MTU will be 1290 which will meet IPv6 minimum MTU size 1280. + * Be careful to configure the tunnels when raising the limit. A large + * number of nested tunnels can introduce system crash. + */ +#ifndef MAX_VXLAN_NEST +#define MAX_VXLAN_NEST 3 +#endif +static int max_vxlan_nesting = MAX_VXLAN_NEST; +SYSCTL_INT(_net_link_vxlan, OID_AUTO, max_nesting, CTLFLAG_RW, + &max_vxlan_nesting, 0, "Max nested tunnels"); + /* Default maximum number of addresses in the forwarding table. */ #ifndef VXLAN_FTABLE_MAX #define VXLAN_FTABLE_MAX 2000 @@ -2718,6 +2733,7 @@ vxlan_encap6(struct vxlan_softc *sc, const union vxlan_sockaddr *fvxlsa, #endif } +#define MTAG_VXLAN_LOOP 0x7876706c /* vxlp */ static int vxlan_transmit(struct ifnet *ifp, struct mbuf *m) { @@ -2743,6 +2759,13 @@ vxlan_transmit(struct ifnet *ifp, struct mbuf *m) m_freem(m); return (ENETDOWN); } + if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_VXLAN_LOOP, + max_vxlan_nesting) != 0)) { + VXLAN_RUNLOCK(sc, &tracker); + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ELOOP); + } if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) fe = vxlan_ftable_entry_lookup(sc, eh->ether_dhost); From nobody Wed May 22 14:38:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkv6d3v9Bz5LqJc; Wed, 22 May 2024 14:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkv6d37w8z4JDb; Wed, 22 May 2024 14:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716388681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MedQFDT7nmV3FN7g45YK3QhNW/3qPxLC1w4nLI5tqCI=; b=O/56Jvlbc9yb3e/xHGmosiygaLIv0GppQ2r4KaVHETP+xgofQe+gP9a6UJxdRXbIx1rtoR PvzyuUrpEltR7DXgdY0Oy3adI4vEGfS2662/n4Zhyw+obUGEom//sCqLYFywM3XEK9Yu0s BmTiAWCJzqdOkHYsnPdqc2+n2E9usJWbYoonYz9hSxAT5PQAPyAK1yRecHV+727CWnneJu wCT8lZ6M81uP0JsnBPPez/UKL9pc522L2kJmRXqe1bB8OtP58/vsSAUeAXSSSAC7HWImJM 7DCbuQjK+bAt9e6RgHo43Wt4q7hAw4HYShKErfl32g009vuS1Ff/6KTbWV7jIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716388681; a=rsa-sha256; cv=none; b=sLrEdbcr/mGPpi0n1E9GcFqYdHtHRWf1wZHvZqCMtRHV+oUkR7tFc6XTLAQWYVmxOaIaJe QUr3VhCp9lGK4x9g/Xah3KRg/H6nHY2ziqUNtGBLKj8Ru6yGRga9XIyF442kppNE/LdD+N h5MbOvA2E/SLFLXh1cPfbgB3LsK6Pw9Zu3wl2/12T8E3aaksDSn2OowPhcR1u9seYvzPR7 RJKWHKUELv7z2bu11Pc6cFXqrDClSciY6n/wTaReWAj5hSyDPw3trxkplSjJpI521D4MEn +9o3Dl8/3EeNezZggfLKR8UCOrBoStrpZGjQTFA21vTOY3GONdH7FeLsuRoqdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716388681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MedQFDT7nmV3FN7g45YK3QhNW/3qPxLC1w4nLI5tqCI=; b=Ms2Qcx39JlSd82P3iiO5f9OqAzLstpqXNMefe/M7kuwHGGMEMnNRoewpqk0XSp0P8u1YNS /o/M38tx5wCyuzfUa08nDPL3M83TTO9HTyarQyRwTZC1TJJQnmyO9UhqGIPo6mNNXV3JRE xrKud9kWPto4JSQUFWXD7KlNCnwPaxUZP3UcTCHX8Hig+0qfsrH3sEO2+BDKH8yjUclRjq +3cJ9tmzfzJFwI59z6cgwcWSza4B1mo0JbNuaJ8H38BSbqkF3xSJueSEaJaMTRLkgHc3JN 6cLLfj9qXAP7V7WUP3dP6cckShMrvOXKV9fIk0QBprQHUDRGcBcEubSbgrWydA== 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 4Vkv6d2lfMz18dV; Wed, 22 May 2024 14:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MEc1x7019763; Wed, 22 May 2024 14:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MEc1gn019760; Wed, 22 May 2024 14:38:01 GMT (envelope-from git) Date: Wed, 22 May 2024 14:38:01 GMT Message-Id: <202405221438.44MEc1gn019760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: f9c67a0f203f - stable/14 - devctl: Disable the boottime optimization of suppressing NOMATCH List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f9c67a0f203fe3bf4fa83f38bcd5963ea568142d Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9c67a0f203fe3bf4fa83f38bcd5963ea568142d commit f9c67a0f203fe3bf4fa83f38bcd5963ea568142d Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-18 13:07:16 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 14:37:58 +0000 devctl: Disable the boottime optimization of suppressing NOMATCH The usb bus code (uhub) doens't present the same information to devctl as it does to the NOMATCH events it generats. As such, devmatch fails to find USB devices on boot when NOMATCH events are optimized out. Since the savings of boot time is relatively trivial for all but the most demanding boot environments, disable it by default until this issue is fixed. Fixes: 6437872c1d66 MFC After: 1 minute Sponsored by: Netflix (cherry picked from commit 97aedd3395b4e9b017e29823096771aff0835ff0) --- sys/kern/kern_devctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_devctl.c b/sys/kern/kern_devctl.c index 0dd05a49c9ad..602b82105525 100644 --- a/sys/kern/kern_devctl.c +++ b/sys/kern/kern_devctl.c @@ -89,7 +89,7 @@ static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS); static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN; SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_queue, CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_queue, "I", "devctl queue length"); -static bool nomatch_enabled = false; +static bool nomatch_enabled = true; SYSCTL_BOOL(_hw_bus, OID_AUTO, devctl_nomatch_enabled, CTLFLAG_RWTUN, &nomatch_enabled, 0, "enable nomatch events"); From nobody Wed May 22 14:47:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkvL51HfQz5Lqv9; Wed, 22 May 2024 14:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkvL45ksgz4KKy; Wed, 22 May 2024 14:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqt+IbyqqaH1mJ8rd38cubPEVPCuljqih54NBaMbSyU=; b=H/2JR0sdUqOUxBPgv5/lfXM+QdTdJHcEC6j3M5i2LoHr4Y6XVaaP2x8gbE+c/duNSz4nBc LF+NXGa//HXnBDw0bSEQFX4FZDw5K9NvjsyxWBLewBAw5IqCn1IGBa0/0vlA6hRh1hbfPT qKCdJlrpMLUF3+gYC8nXK3JGq0Agr9XE6M/YAZKclxwbOjuIaMNMUzzvLotX7g8QsbcKnm SEcALXJAf3/8miqXroiug0SoX+6lA6PB7vjhp2993d+SYU+t3+qT3mRUV7lmTvzHM6u8Hi faspnACiNqPhU/R9UTMV32qv4gPuHd5xRspufwbpoy8lrerVl4ZEzLENGPY82A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716389276; a=rsa-sha256; cv=none; b=trsPKWXec/KtS+X01vp7Y5njv+DHzMq3aCJQ94BYCNdgIb1uWA9W08O13Pac9o/fZ7pfeX AJWNC3a/OU/ZppajGYv0iIvlC66iami2Bu8M9ScT2n/n59ygQ9y74FCEkipU47EGdjZ57j ziTTvBjdhRIYycomohgixjj0+Pdp1ybDUGnfET/IRafOm50tTDu/9i6kdpOw0hWIBJfDc5 TcJknmZ6cOLEO2BOkfENNbAjHJrlPc1cQd2g+D7VnFVbZumesJS0GzSzeIDQ6elU+Lb5Ym JXgAVHEKVwjJmvgqRxckcEZ2GF3+tH9hf8uv/79+XT5JWhWS1IZnKZ9+ZL9lpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cqt+IbyqqaH1mJ8rd38cubPEVPCuljqih54NBaMbSyU=; b=Eejoq7sPljS24MLDz96lFqF55TfH0GQByb/6nfCcRvjIKHhR54QOFKKbxgUZxBOY1sSOby 1em4u6foabI8iiyYALEQXFnagznHcpMj1fnSza3/TktZG6dbv/JcNMMzO+6jkrK6KcScuK rEwt0JIR3CBWachOKNaytzcflRIA4Y4V0ti7QQElNGNLQUA4MdorpzQdqcbiyBx0gWg3GM 9oLV9UiGqPZbUBV+l9hCq/5d10aQB+9GWs+sjsJNAa2vKzmQe3sOc1islCWPPLwa7VFFIy nujbiUUMSDPExFw++qhFJ2gBUX9onMeWIX9GK51J6AZdhBHzQzgieAdgzxG8Qw== 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 4VkvL45BQBz18CZ; Wed, 22 May 2024 14:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MElumo036836; Wed, 22 May 2024 14:47:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MEluXH036833; Wed, 22 May 2024 14:47:56 GMT (envelope-from git) Date: Wed, 22 May 2024 14:47:56 GMT Message-Id: <202405221447.44MEluXH036833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj <pkubaj@FreeBSD.org> Subject: git: b7f62c6042f8 - main - usr.bin/top: fix displaying load average for loads of at least 100 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7f62c6042f8b4b322d9fa20a8c6a81a9a58c164 Auto-Submitted: auto-generated The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=b7f62c6042f8b4b322d9fa20a8c6a81a9a58c164 commit b7f62c6042f8b4b322d9fa20a8c6a81a9a58c164 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2024-05-21 10:28:35 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2024-05-22 14:47:46 +0000 usr.bin/top: fix displaying load average for loads of at least 100 After top registers load average of at least 100 which then gets reduced to below 100, there are left stray digits. Supporting load over 100 requires increasing the width only to 6, but since we support over 1000 CPU's now, let's increase it to 7. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45284 --- usr.bin/top/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/display.c b/usr.bin/top/display.c index 32b8b12798dc..b6cde0e63aa7 100644 --- a/usr.bin/top/display.c +++ b/usr.bin/top/display.c @@ -252,7 +252,7 @@ i_loadave(int mpid, double avenrun[]) for (i = 0; i < 3; i++) { - printf("%c %5.2f", + printf("%c %7.2f", i == 0 ? ':' : ',', avenrun[i]); } @@ -289,7 +289,7 @@ u_loadave(int mpid, double *avenrun) /* we should optimize this and only display changes */ for (i = 0; i < 3; i++) { - printf("%s%5.2f", + printf("%s%7.2f", i == 0 ? "" : ", ", avenrun[i]); } From nobody Wed May 22 14:55:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkvVz2sxTz5LrHB; Wed, 22 May 2024 14:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkvVz2Ck7z4LrD; Wed, 22 May 2024 14:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yJv/pwv9xGi2q5Gkt4Czp3DBUlGy6aZTRt3yr2bGeN4=; b=U4yiTUn53mo8vb4QKsh9lxzBd3jDbL9emRdr2K9ow3kmvISDNlPlaT6imLzSywfLmoJ+Je leQQP9E4vBP8AqNWaku3IhFz8AMbYixapY1H8P9FQoN50zarACSBFFV7G4S86yIhsgQEpf qc8NMLjXAsVS3pZIFauX0yWfcViyy92X+9jgIt3u2OkUa7D/fZcb1E0g+ouUfqB4Bo/QSv jNlJY0TjYhmFT0tYBu6k8ofTX1lfccaYeXhPLrBIA+rs8XKwGcyaWYIkkIC6aHHxNnWzQ2 ZwlK0OtWcwMpoNbpuz/fkSmFTORrkS/SnZ9qToQgT8HnM5+PZaseQ0BPxvqCWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716389739; a=rsa-sha256; cv=none; b=OTAlCKAQEVVRvJE5ArTSWRJpSRmt4zlXRnQ9RhVuSGftO0T3xHBXxKqct/DK+OBX1wIzqG 8SosncfFnfKkhh2o1q6li/MfY0ZUZBuB0zxWdB6ZVnC1E7CBbuGMDqTKyYBnq6A7/Q9hPi KIxs41uIjZu7PnVQiBGuna9quh+g/m4aakfXKjOtVBCnypKWtSytezr6QHzzDN4R+klwNT fvI+qWK0a/DhQNySphIgCl6hX7W1PXKPx5vHHXhOtL9yBnejGJhvWldWLwNtR5kPW/ys4/ jm9iVSxqynUh+CXKC4/hDjCSDI7/rhIj0CYFmnXhTB4R5EMxlBHUrClAJnuljg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716389739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yJv/pwv9xGi2q5Gkt4Czp3DBUlGy6aZTRt3yr2bGeN4=; b=qVrg8v23z3TlFo0jUKEUYGepUbTQIrCDXjPemLdMJRDOnFr6adIxl3DSYBGp7lWA+3Q+Kj +asqT3dbXPkmss8ZZ/xGwsImoGwRkl94Xfk2rPeO5/sbU0l4nD895vLfKMUfccOufBXx/X mjRP5shJmPJfpQaG3R7xRVkXIQlDjbkhGVcFVbaCJvmpf8EFh0FQ6LQtQr66wXAXp1/HyW iySFJKNX1ugtobUCvxPZalpT95mWpLEVclTckOjx+flOfOCxORZMws1a6cI6xTUME2AQp6 kFLyrv+eDa7UoRBjumR87gJ556SRF5jHXjq18wPrP5cexIkhbO6sBHIQbdZ+cg== 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 4VkvVz1jVdz17wh; Wed, 22 May 2024 14:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MEtdDW052846; Wed, 22 May 2024 14:55:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MEtdEn052843; Wed, 22 May 2024 14:55:39 GMT (envelope-from git) Date: Wed, 22 May 2024 14:55:39 GMT Message-Id: <202405221455.44MEtdEn052843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby <rlibby@FreeBSD.org> Subject: git: bea2bf458d2c - main - tpm_if.m: declare bus addresses as bus_size_t not bus_addr_t List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bea2bf458d2cc030e97fd7b9c210b3ee97ee8d79 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=bea2bf458d2cc030e97fd7b9c210b3ee97ee8d79 commit bea2bf458d2cc030e97fd7b9c210b3ee97ee8d79 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-05-22 14:55:04 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-05-22 14:55:04 +0000 tpm_if.m: declare bus addresses as bus_size_t not bus_addr_t Do like bus_space(9) does. This fixes the build on platforms where bus_addr_t and bus_size_t are different (like i386 PAE). Reviewed by: jhibbits Fixes: c2e9c5bbf022 tpm: Refactor TIS and add a SPI attachment Differential Revision: https://reviews.freebsd.org/D45287 --- sys/dev/tpm/tpm_bus.c | 2 +- sys/dev/tpm/tpm_if.m | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/tpm/tpm_bus.c b/sys/dev/tpm/tpm_bus.c index f0d3c26c33f1..6e2cc5d81cb6 100644 --- a/sys/dev/tpm/tpm_bus.c +++ b/sys/dev/tpm/tpm_bus.c @@ -77,7 +77,7 @@ tpm_write_4(device_t dev, bus_size_t off, uint32_t val) } static void -tpm_write_barrier(device_t dev, bus_addr_t off, bus_size_t length) +tpm_write_barrier(device_t dev, bus_size_t off, bus_size_t length) { struct tpm_sc *sc = device_get_softc(dev); diff --git a/sys/dev/tpm/tpm_if.m b/sys/dev/tpm/tpm_if.m index 2b6afe22f3e8..b0149ba163a6 100644 --- a/sys/dev/tpm/tpm_if.m +++ b/sys/dev/tpm/tpm_if.m @@ -41,7 +41,7 @@ METHOD int transmit { METHOD uint64_t read_8 { device_t dev; - bus_addr_t addr; + bus_size_t addr; } # @@ -49,28 +49,28 @@ METHOD uint64_t read_8 { # METHOD uint32_t read_4 { device_t dev; - bus_addr_t addr; + bus_size_t addr; }; METHOD uint8_t read_1 { device_t dev; - bus_addr_t addr; + bus_size_t addr; }; METHOD void write_4 { device_t dev; - bus_addr_t addr; + bus_size_t addr; uint32_t value; }; METHOD void write_1 { device_t dev; - bus_addr_t addr; + bus_size_t addr; uint8_t value; }; METHOD void write_barrier { device_t dev; - bus_addr_t off; + bus_size_t off; bus_size_t length; } From nobody Wed May 22 15:07:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkvmK1GM1z5LsRp; Wed, 22 May 2024 15:07:13 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkvmK0M0nz4NLn; Wed, 22 May 2024 15:07:13 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716390433; 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=N+yYaUavOP62Bt5xOHK4bC39wbJsVWShv4RnyxbMN30=; b=EGhRrKcOZ0xRwLlylKCi9OaGkK60eou4igY+XTou3Ru87vvtFX96jNAXRHOIslSAM74nwI Vp+qZQWJUrT8/7QskooR/13ljlx/6AmS/e0pUmbhM27lgK5NzuYJ8dy3C52/9vygV+wD1p VRd7xFPjKoa+G59uPposGqLxcgPOytcPgeb70jrbC5TvISHYuFijJnEjE/cUImcHa38V6r yqj61iJUyYy3RTprhFN+QFtNaulILiE83Ebo30VtQryjxkLanC5NQZz2rIQye4yv048Yz1 s/iv6S8flHf6YT4k5ZtUaferSvbPlHKkz5oEvoYbJIm1lI23M4AmYCaxIjtNDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716390433; a=rsa-sha256; cv=none; b=y1GzYX6MDkyK31XnbdQ9AyqJwgvXeluJ9GO8f/sGdvpS0Y9omDlJjrqCVzGCmHW+7G197L bnrinWeBq7cGFmpWrWq5UsVEVOU3KHPm610MyB7fIv5wcl0fufHWzQS1UT6l+lQtESJ3YB g9vgpsQO9eX7Yre2y370HkW7rOdt+Ep+3n3yGvQnkmUbM2AmljLCWt84OUFeTLF9MM8NOa jrzDeq+UjRaV7PFTtMMbsLbqsrxIp6grR3G6rabkow/2WgmF9mumT+0gA8vl3vMgGLFp1U uLXWjO2/zSDcHNlP25X01bF37A2KoKj1y5od2QVlpxqLPP4NgsGm/zf9ruoFsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716390433; 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=N+yYaUavOP62Bt5xOHK4bC39wbJsVWShv4RnyxbMN30=; b=FnKzxZSHrtXoTGrMYDr/EhOoSNXsix220nA4HiJ8yx6uNR+ZSRXE7NlX5X9P1UuFV0NIeI ze+HnNjJBCGm+s2rnIS3DY2Mw84Zk07k6Q13kPH7BzMMwES5bINEm/HbTCuMNMD2SP1/d1 YsSJO5T/sF9xuGMbAC8IlkTX90O/e1LRo/6unsmN5f/HiZ/ksg9q00COajZhdOE6mVim1H Jy39+ON7O5sgvBrgaUOStdarLn/AI9c2DvoDcsHP/YDvEYLzz1Elpg8A/3yGbfEj3NOnhx qbX3UiqFqiJoPCJPFONb51+JMU0tutXb4cz3GWmzUGOAAZX4jwqgQ1Fr1xjdpg== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.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: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VkvmJ6M56zyPT; Wed, 22 May 2024 15:07:12 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 58AF11F7FFF; Wed, 22 May 2024 17:07:11 +0200 (CEST) Date: Wed, 22 May 2024 17:07:11 +0200 From: Baptiste Daroussin <bapt@freebsd.org> To: Michael Osipov <michaelo@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Message-ID: <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202405030740.4437eWUC034126@gitrepo.freebsd.org> On Fri 03 May 07:40, Michael Osipov wrote: > The branch main has been updated by michaelo: > > URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed > > commit aa48259f337100e79933d660fec8856371f761ed > Author: Michael Osipov <michaelo@FreeBSD.org> > AuthorDate: 2024-04-15 11:05:17 +0000 > Commit: Michael Osipov <michaelo@FreeBSD.org> > CommitDate: 2024-05-03 07:38:55 +0000 > > periodic.conf: remove long deprecated security_daily_compat_var() > > This function is documented to be gone in after 11. Time to remove this > compat shim. > > PR: 275296 > Reviewed by: jrm (mentor) > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D44796 this broke pkg's periodic script, I would have appreciated a heads up to give me time to prepare a release compatible prior this commit. This also breaks some ports. Bapt From nobody Wed May 22 15:59:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkwwP2SQ7z5LxVp; Wed, 22 May 2024 15:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkwwP1x23z4SRk; Wed, 22 May 2024 15:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716393557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CdTVRyOzAtou4NFRnIBeSxyoqg/kTU+8cQweT+JB5So=; b=N8uNQnMFzmiwjCbhpa+Sj9G+tHJluRsYIdAwrFSkbw7BKisnR53sO87GcZsDDS4ExrqK31 SMj6dVCKvu73mb4yvCu3ZopLI8oamckSw94gQ2ol+rBvrTedtvFkQXfamSNMm0BS78UXdx 5L1jtzWl9eTQ1wGtzbdg2FROaF2KS99bdN67QFW3jsX5SXwwInjMKSSLW4NDxGSxUsWojn eDQv2su1MSvMLwR/2VtlBGnxfAyhkz6EaHsMvZ8gwQ0JGxkDNoFXyaQ8zflj3D9jVoshke x8LNqH2mBdpG6QWMa1Z1YJouxrX9BiZRySg6YlQYLM2v8TbWtRKJBUgp2YZeUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716393557; a=rsa-sha256; cv=none; b=o1zc6mr3DgotjC328lgwJ9DI4JSWRTcsj9vRuw/yce8SqZ/MH/HtCAXq92Fb5833hKtjPL teWG9Sm7YKuRo/tx0tLj4/avYuvjujIo+/2+URMATTUjuX2GUORj0FQCXDBctnrHlMInLI vGN4VKRj2y28uaQyVMMaekemecr1dEBlADwz+WjV4uheaHQrN0ynqkLHpfgsiJYLuyH1Ct L4bMLbd5oS7tUqvXXU8s1+pg1papySXAwH6sIfAwWIMjOnJvefBpVuIZ09WpoCMHr0AhBW pbNscwi0vlKPBPo2MDFkbbUahmG3ADLfac6k3BiCEZwA/KTJbre79Wm+vpv+OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716393557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CdTVRyOzAtou4NFRnIBeSxyoqg/kTU+8cQweT+JB5So=; b=AJw02/GMSVwIFIqT45yi+n0cGEZc4lJ/qBvg6FjpZVHCWWaigxWyB2O8SYBNpbXOX/zrRd rUSvVt/G0xpDW7abPaRvw/Xk3Y3se1AD7/E2DFJdMHTd1B8js0YBy7FnE4bCGe8k6qVsB/ 7w5uZktXXtp3+ioV11elFg9QcXsy8jYELCjapM9JytEps8xG3wPe7XDmYqksXB616cXfMn k4IXStV5h4keQJqIsaqRgwxdBh7UUbdzumiwvZdgutCai7NOpC52kiEXP+M2D02YyArUQR aGXbHJ73zRS5xxgien3L3u9trC+YCXVogxh1ABpbHvrZK5/DgvjLF6kVqsNOaA== 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 4VkwwP1PwKz1BhX; Wed, 22 May 2024 15:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MFxHFS055096; Wed, 22 May 2024 15:59:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MFxH9M055093; Wed, 22 May 2024 15:59:17 GMT (envelope-from git) Date: Wed, 22 May 2024 15:59:17 GMT Message-Id: <202405221559.44MFxH9M055093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude <allanjude@FreeBSD.org> Subject: git: e5fadc41b480 - stable/14 - ftpd: stop using -g flag for /bin/ls List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e5fadc41b48045d8978993d6c4ac72c64542b470 Auto-Submitted: auto-generated The branch stable/14 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=e5fadc41b48045d8978993d6c4ac72c64542b470 commit e5fadc41b48045d8978993d6c4ac72c64542b470 Author: Allan Jude <allanjude@FreeBSD.org> AuthorDate: 2024-05-21 22:58:21 +0000 Commit: Allan Jude <allanjude@FreeBSD.org> CommitDate: 2024-05-22 15:59:05 +0000 ftpd: stop using -g flag for /bin/ls In 3bfbb521 the behaviour of ls was changed such that -g was no longer a noop for compatibility with BSD 4.3, but instead changed the output of long mode to exclude the owner of the file and display only the group. Update how FTPd invokes ls to restore the previous behaviour Reported-by: Andrew Fengler <andrew.fengler@scaleengine.com> Reviewed-by: jrtc27, des, imp MFC after: 3 days Sponsored-by: ScaleEngine Inc. Fixes: 3bfbb521fef5 ("ls: Improve POSIX compatibility for -g and -n.") (cherry picked from commit 5af3225e0448be6af7f0312e10d2a1dfbe150c25) --- libexec/ftpd/ftpcmd.y | 4 ++-- libexec/ftpd/ftpd.8 | 2 +- libexec/ftpd/ftpd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 9d57017e2f19..827ceda03272 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -460,12 +460,12 @@ cmd | LIST check_login CRLF { if ($2) - retrieve(_PATH_LS " -lgA", ""); + retrieve(_PATH_LS " -lA", ""); } | LIST check_login SP pathstring CRLF { if ($2) - retrieve(_PATH_LS " -lgA %s", $4); + retrieve(_PATH_LS " -lA %s", $4); free($4); } | STAT check_login SP pathname CRLF diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index ec4ce0c65100..44f8a2e00835 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -278,7 +278,7 @@ is specified. .It EPSV Ta "prepare for server-to-server transfer, multiprotocol" .It FEAT Ta "give information on extended features of server" .It HELP Ta "give help information" -.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA" +.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lA" .It LPRT Ta "specify data connection port, multiprotocol" .It LPSV Ta "prepare for server-to-server transfer, multiprotocol" .It MDTM Ta "show last modification time of file" diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index a41a23ab1184..11811da35cb5 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2336,7 +2336,7 @@ statfilecmd(char *filename) struct stat st; code = lstat(filename, &st) == 0 && S_ISDIR(st.st_mode) ? 212 : 213; - (void)snprintf(line, sizeof(line), _PATH_LS " -lgA %s", filename); + (void)snprintf(line, sizeof(line), _PATH_LS " -lA %s", filename); fin = ftpd_popen(line, "r"); if (fin == NULL) { perror_reply(551, filename); From nobody Wed May 22 16:06:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkx591NlJz5LxpT; Wed, 22 May 2024 16:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkx590Pg1z4TJF; Wed, 22 May 2024 16:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pE8yhvksUc1e0C6VLjxZXpaUitkD86oKte+VdwphOW8=; b=A/X7T2H53gfsZCpnDroiIRHpXVzC4474I+TWcKxtYAkYSjNBrKqBGWrk5eTkgxXU+B0Ieq jlew2ZNKo1K5XhJi811GqG8e1Le4Xlui85kmhr+mV4KK4dYd0CeBKqoAKQpCH7KJXdpvMB k1MJ7sxm3f2cP17sjFfCWqc/t+inMkw7G2zlmg1mj4YVQp8J6bxjHHtzTucBc7TOfql/H4 dXDy9RvZsbHc7hISY8sTb359vguNlBv+XlEbn+Yf8u/1E8JeMK0hs+Yyt+SWcJLRdJz5XF 3/M3nTDG4w0Jwir2eJ+cbO5kqB2YbjWJ+qhFpgnIqRyyzU67UH4I/keN9sPOAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716394013; a=rsa-sha256; cv=none; b=uWhDjoi6CrF1qmeHzPHe8sylSDyQJ4rWwwdh6QpilgUSZP/BOMrxqMBLhfH3gZh2P7FkZa Ym2Wr/VObZKwomWPzJJ5Kw/co0FcMotNnjpkvYdOEwU0pnzeeo1TPaqmTs0ztT8aVlrsa7 YC1e8ukWl6tm6LT+pjgMnBjSe0hkF3Vm1Lw6NiZ9rKvFnAkKHafJMqkjzbm2aP1txqfupf nUPWYLxQ1HoTk5QLNootjOR3xPvx2HGwvDNvPEbP1NJIxJ12KJUFehNpOrDlub8X9d/qwc ztKSn/sm4SfMl3V67ADzPlzgL/2jv7Lx9AGqJmUPiyRvl4sgTwdnBoIzKJyVoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pE8yhvksUc1e0C6VLjxZXpaUitkD86oKte+VdwphOW8=; b=ldQDIv0pUPwaBTQzNu8liHDOZk02hiAXCM9ieQyWb0LJ0HRDv2RimbrIu0v2j2aKicCiYy qz92a7+K1srHvhcSL0K5li3LoyG6LEs9TLCtyRw4hKhFcOlHspVYyKCjFp0JlP3KCbZY1G geeFztpFxR6QvOXFoxj6xY2A+S/O8T2GngzogQzoUHrXW6SqB/QHLUrxS/CXA8zg6utjYD zuw726OmCRe5GhMQaZqqNriTlluVMg+PNZIpnrKQv4MxQJFoqThYzEOVP1mj5qHRKIa1Hg hmaxdumnTtIzXGlTjDdyPhSzt2acqx7T6KP+/YyhPqq9nhU36OsdkfEZF5OSEg== 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 4Vkx5900p5z1BR3; Wed, 22 May 2024 16:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MG6qAI072516; Wed, 22 May 2024 16:06:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MG6qXq072513; Wed, 22 May 2024 16:06:52 GMT (envelope-from git) Date: Wed, 22 May 2024 16:06:52 GMT Message-Id: <202405221606.44MG6qXq072513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin <br@FreeBSD.org> Subject: git: ddd0d4f4cd65 - main - riscv: Fix SSTC extension support List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddd0d4f4cd65341a07bb3bb833dee7982018fd60 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=ddd0d4f4cd65341a07bb3bb833dee7982018fd60 commit ddd0d4f4cd65341a07bb3bb833dee7982018fd60 Author: Ruslan Bukin <br@FreeBSD.org> AuthorDate: 2024-05-22 14:51:45 +0000 Commit: Ruslan Bukin <br@FreeBSD.org> CommitDate: 2024-05-22 15:44:03 +0000 riscv: Fix SSTC extension support From the SSTC spec: "If the stimecmp (supervisor-mode timer compare) register is implemented, then STIP is read-only in mip and reflects the supervisor-level timer interrupt signal resulting from stimecmp. This timer interrupt signal is cleared by writing stimecmp with a value greater than the current time value." This fixes operation in Spike with sstc extension enabled. Example: spike --isa RV64IMAFDCH_zicntr_zihpm_sstc Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D45226 --- sys/riscv/riscv/timer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/riscv/riscv/timer.c b/sys/riscv/riscv/timer.c index 06806872d9fd..456dd463ab2a 100644 --- a/sys/riscv/riscv/timer.c +++ b/sys/riscv/riscv/timer.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015-2017 Ruslan Bukin <br@bsdpad.com> + * Copyright (c) 2015-2024 Ruslan Bukin <br@bsdpad.com> * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -143,7 +143,10 @@ riscv_timer_intr(void *arg) sc = (struct riscv_timer_softc *)arg; - csr_clear(sip, SIP_STIP); + if (has_sstc) + csr_write(stimecmp, -1UL); + else + csr_clear(sip, SIP_STIP); if (sc->et.et_active) sc->et.et_event_cb(&sc->et, sc->et.et_arg); From nobody Wed May 22 16:06:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkx5B27T6z5LxbB; Wed, 22 May 2024 16:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkx5B1ShPz4Srx; Wed, 22 May 2024 16:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30+sTgeLdmIeK/Q7Ss3XUcmVMUWQXL5K+i7WJfkd2CI=; b=yXDJPZScrvzXWN3r2aOnQyDqXrHmA7rAjSxLLxPqFFNVVUDtaNygjvfcevfC89h18F2nNd WKbG/Gwhm//eOv6N13sP3MDrXxztGVVZsub6A++o/qZTHbwhOnPKGKA57LXW+Rndh1HLxX OnlqhLmRWR11YPijU3JXSij7PkZMznNiKFnkmLAX5x67xQhMklX+CwEGePD/XSL/XhF7tw KVOdnVVAE/d4ldc9awxB8836rcgXUDs/9sX3TlOUxH0g52IhL+e+9vs2Iep/cwk/WJV5sb Ot3/9sHMZf/I6LYF/ogt/gERdWsIg9sIILmzuQsUa7qzRpOPVZlnRy1BKKp0gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716394014; a=rsa-sha256; cv=none; b=r1U6ZyQmtS6VVnlmxeXU4E10855ZMiq2IDielC4/e+FYhOnJ9uLyvjH0eAE72Z4HJxlRNE smspxWYoKQK/iJEodfgoyes+CSBgJeuPVIngj8c8d8ezXarkYrk+ho7euyeTjetNcYD7R7 IrmE9uE7JFU2m9hN1n8b0lPeiNltTGWu+c9IxmOScB9ohmq4HsWpuP/S6y1ZmPurNBEiox XmvfYyx7oHDmNKlhb0voLicEZ/WRgYqchqn/HiNo1uxKv8YEi5ivZI4aQGLaIogHbZXLJn +Qt1ZizskyS3vD87vFykkdTBbIqSEFTVY01HcWQK2qIMtuMHNGd/Iv6iiyl6QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716394014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30+sTgeLdmIeK/Q7Ss3XUcmVMUWQXL5K+i7WJfkd2CI=; b=KNuIzGMX+mv5MXOUx6za44Zbiv8S/HOUIQYd6gHSRfDHMAkifIERk0oleK7eAVcLQNl2i7 lnDYddktoecmy+0C5FD3cpg3V8G14lRZIJ4BgOE2ZOar0V8uolWz4WG/H2c4bMw7hcOyxm xzfD3cpafrqgEZhgWs/rASeHpWGT9EZiBuisHo3IaIWulQq5yN5Jm7M0pbLxwUhPlxsJqO XC8x7tPj33EJHv8XPOepB3Qm2SgW+tCdATWmaRWps5PaNEZArinRl2hdYvJQgC//AJMvZA ef1TEpV4KurNJj3j67Q5Ia/TadkEBuv+D+CZXGdv5SAHCg4Y9LKIOYxLzn/2rA== 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 4Vkx5B0zCcz1BR4; Wed, 22 May 2024 16:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MG6sIU072568; Wed, 22 May 2024 16:06:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MG6st5072565; Wed, 22 May 2024 16:06:54 GMT (envelope-from git) Date: Wed, 22 May 2024 16:06:54 GMT Message-Id: <202405221606.44MG6st5072565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin <br@FreeBSD.org> Subject: git: 2183004e14a8 - main - riscv: Implement atomic operations List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2183004e14a863d65ca9192df1bea2625e3fdfb3 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=2183004e14a863d65ca9192df1bea2625e3fdfb3 commit 2183004e14a863d65ca9192df1bea2625e3fdfb3 Author: Ruslan Bukin <br@FreeBSD.org> AuthorDate: 2024-05-22 15:07:27 +0000 Commit: Ruslan Bukin <br@FreeBSD.org> CommitDate: 2024-05-22 15:45:11 +0000 riscv: Implement atomic operations Implement atomic_load_acq_16, atomic_store_rel_16. These are needed by bhyve(8) PCIe bus emulation code. Group 16-bit atomic functions similarly to 32 and 64-bit. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D45228 --- sys/riscv/include/atomic.h | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index ef9aa5ef057d..03c1327d74da 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> + * Copyright (c) 2015-2024 Ruslan Bukin <br@bsdpad.com> * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -105,8 +105,6 @@ atomic_fcmpset_rel_##WIDTH(__volatile uint##WIDTH##_t *p, \ ATOMIC_CMPSET_ACQ_REL(8); ATOMIC_FCMPSET_ACQ_REL(8); -ATOMIC_CMPSET_ACQ_REL(16); -ATOMIC_FCMPSET_ACQ_REL(16); #define atomic_cmpset_char atomic_cmpset_8 #define atomic_cmpset_acq_char atomic_cmpset_acq_8 @@ -116,11 +114,40 @@ ATOMIC_FCMPSET_ACQ_REL(16); #define atomic_fcmpset_rel_char atomic_fcmpset_rel_8 #define atomic_cmpset_short atomic_cmpset_16 -#define atomic_cmpset_acq_short atomic_cmpset_acq_16 -#define atomic_cmpset_rel_short atomic_cmpset_rel_16 #define atomic_fcmpset_short atomic_fcmpset_16 + +ATOMIC_CMPSET_ACQ_REL(16); +ATOMIC_FCMPSET_ACQ_REL(16); + +#define atomic_load_acq_16 atomic_load_acq_16 +static __inline uint16_t +atomic_load_acq_16(volatile uint16_t *p) +{ + uint16_t ret; + + ret = *p; + + fence(); + + return (ret); +} + +static __inline void +atomic_store_rel_16(volatile uint16_t *p, uint16_t val) +{ + + fence(); + + *p = val; +} + +#define atomic_cmpset_acq_short atomic_cmpset_acq_16 #define atomic_fcmpset_acq_short atomic_fcmpset_acq_16 +#define atomic_load_acq_short atomic_load_acq_16 + +#define atomic_cmpset_rel_short atomic_cmpset_rel_16 #define atomic_fcmpset_rel_short atomic_fcmpset_rel_16 +#define atomic_store_rel_short atomic_store_rel_16 static __inline void atomic_add_32(volatile uint32_t *p, uint32_t val) From nobody Wed May 22 17:03:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkyLX0C0Dz5M3Gg; Wed, 22 May 2024 17:03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkyLW6r1lz4d6t; Wed, 22 May 2024 17:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3e9tsb5JgtNyj0SNJvjy/9z6JDjec333DqryQ18e6+c=; b=tfNidW1Jp9Bn9+I0AzlLRVSGr35wfOZqMu7dB8Tlb/VF35P2NbFrbYrZqHHBsOhWbwLi5x lPGAicanuHji58kjNTDg12Rnx9EDad4sxKf7Ytytyjk+bxZpfi6Ha9BeXrHU0hNnx5XLKc jhUWcZ2cZU8w739sRNxcLEZOPx/o1sjusNDZutrqcGGRFKe9BoIkg9QItvRcDF56WZA4lN e9XqDulKNPK+K4ioPvXN41X8f56xpXXyiQoP8aXmhOJf1ufYUbz4prXXwXaD2PIF2MJwCW ZGuYUwIgogTwuLDhdxInh/dWsjPvrpfN03Emt+CF1nq9iv/w3hU2JoRll1YR9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716397412; a=rsa-sha256; cv=none; b=lrH+rkhOctOpworT+Nu7UlJg8cWeuYCQwJ7H2aB6vyGdezOxgQk1PuhlnNrP/8ROYptCeM Qw9SHxigiSVO7kNKV+Wz8nQIiSYpVArQQCcko9X9Vs94BMPFZwctThSa8O1xi4K0XDZN+s BcXgE4Ws1D/4hvFyCyEo3bSMbdFnJb3HewyXQkuxgbqSgb17UWMCU75FeEEouWHmZ77xvR l9fApW34O1Gu9/HkUmIkSuaoYRP2rwvQSGaU5FpQTtuTaqC7Ijwweq4boblZaYUtZBS5U4 aHPRsEuP1eE7RdyCDO+IClAOONwqckc02mHceBNrWr+OdiIyDfwBYfTGvjgm3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3e9tsb5JgtNyj0SNJvjy/9z6JDjec333DqryQ18e6+c=; b=QpzOfsR0/vNm7Bad1m56YZsvjVSk+KUfRt5tkBd6jExYXHc7joPSnucHqds3/5Y5ZiJP17 ax42L61QBSSBRzlNmqvv749SX6w1f+4YRibYTJYuYzZ88hyMT0EW8+BA+dg9zbxaNNVjgM vAnMq9Zke8tn3Yz1UKtIprfC+BjT10Y2pcGdNoooUG54/QZCCvyX6YIJ4qu3v3NEjkQAsE CajQOLMaunATYGL4yXgIE2zQd/9Abcq+boPtVXRGBZcsfwryxJaOQWFEH9/PJu2NzBizoi oSLrLlCEDfzlP+3c62tbdLNf3cRTmMUwa7+YJOxHEAefGarqINi39UBFxr/XFQ== 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 4VkyLW6RLKzDxs; Wed, 22 May 2024 17:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MH3VU4074793; Wed, 22 May 2024 17:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MH3VJA074790; Wed, 22 May 2024 17:03:31 GMT (envelope-from git) Date: Wed, 22 May 2024 17:03:31 GMT Message-Id: <202405221703.44MH3VJA074790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: 82854693aec1 - main - arm64: Allow userspace to be built with PAC and BTI List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 82854693aec11f87f1f0560e8395452b64f1770f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=82854693aec11f87f1f0560e8395452b64f1770f commit 82854693aec11f87f1f0560e8395452b64f1770f Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 15:54:32 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 17:02:26 +0000 arm64: Allow userspace to be built with PAC and BTI Add the WITH/WITHOUT_BRANCH_PROTECTION build flags. This can be used to enable the use of pointer authentication (FEAT_PAuth) and branch target identification (FEAT_BTI) in userspace. The kernel already handles both of these is userspace, we just need to enable it. Leave disabled for a short period for this to settle before enabling. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42596 --- lib/libomp/Makefile | 3 +++ share/mk/bsd.lib.mk | 6 ++++++ share/mk/bsd.opts.mk | 5 +++++ share/mk/bsd.prog.mk | 6 ++++++ stand/Makefile.inc | 3 +++ tools/build/options/WITHOUT_BRANCH_PROTECTION | 1 + tools/build/options/WITH_BRANCH_PROTECTION | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/lib/libomp/Makefile b/lib/libomp/Makefile index aa9e6799ab59..2be8a207a219 100644 --- a/lib/libomp/Makefile +++ b/lib/libomp/Makefile @@ -1,4 +1,7 @@ +# z_Linux_asm.S is missing BTI support +MK_BRANCH_PROTECTION=no + .include <bsd.compiler.mk> SHLIB_NAME= libomp.so diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 981d0b49df39..575b521bea55 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -97,6 +97,12 @@ LDFLAGS+= -Wl,-zretpolineplt .endif # LLD sensibly defaults to -znoexecstack, so do the same for BFD LDFLAGS.bfd+= -Wl,-znoexecstack +.if ${MK_BRANCH_PROTECTION} != "no" +CFLAGS+= -mbranch-protection=standard +.if ${MACHINE_ARCH} == "aarch64" && defined(BTI_REPORT_ERROR) +LDFLAGS+= -Wl,-zbti-report=error +.endif +.endif # Initialize stack variables on function entry .if ${OPT_INIT_ALL} != "none" diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 65ae4f4cfa7c..18098c93605c 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -74,6 +74,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ ASAN \ BIND_NOW \ + BRANCH_PROTECTION \ CCACHE_BUILD \ CTF \ INSTALL_AS_USER \ @@ -102,6 +103,10 @@ __DEFAULT_NO_OPTIONS+= PIE __DEFAULT_YES_OPTIONS+=PIE .endif +.if ${MACHINE_CPUARCH} != "aarch64" +BROKEN_OPTIONS+= BRANCH_PROTECTION +.endif + __SINGLE_OPTIONS = \ INIT_ALL diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index c546c4f0b680..74a653057bda 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -69,6 +69,12 @@ LDFLAGS+= -Wl,-zretpolineplt .endif # LLD sensibly defaults to -znoexecstack, so do the same for BFD LDFLAGS.bfd+= -Wl,-znoexecstack +.if ${MK_BRANCH_PROTECTION} != "no" +CFLAGS+= -mbranch-protection=standard +.if ${MACHINE_ARCH} == "aarch64" && defined(BTI_REPORT_ERROR) +LDFLAGS+= -Wl,-zbti-report=error +.endif +.endif # Initialize stack variables on function entry .if ${OPT_INIT_ALL} != "none" diff --git a/stand/Makefile.inc b/stand/Makefile.inc index 13b3f2a1f418..391de6abc6d4 100644 --- a/stand/Makefile.inc +++ b/stand/Makefile.inc @@ -1,4 +1,7 @@ SUBDIR_PARALLEL= yes +# Firmware may not be able to handle branch protection failures +MK_BRANCH_PROTECTION= no + .include "defs.mk" diff --git a/tools/build/options/WITHOUT_BRANCH_PROTECTION b/tools/build/options/WITHOUT_BRANCH_PROTECTION new file mode 100644 index 000000000000..97b459b53c92 --- /dev/null +++ b/tools/build/options/WITHOUT_BRANCH_PROTECTION @@ -0,0 +1 @@ +Build with branch protection disabled. diff --git a/tools/build/options/WITH_BRANCH_PROTECTION b/tools/build/options/WITH_BRANCH_PROTECTION new file mode 100644 index 000000000000..3326aa5db965 --- /dev/null +++ b/tools/build/options/WITH_BRANCH_PROTECTION @@ -0,0 +1,4 @@ +Build with branch protection enabled. +On arm64 enable the use of pointer authentication and +branch target identification instructions on arm64. +These can be used to help mitigate some exploit techniques. From nobody Wed May 22 17:03:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkyLY1Cm7z5M3Nd; Wed, 22 May 2024 17:03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkyLY0Ggtz4dBq; Wed, 22 May 2024 17:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6/FpjFuBfZoUYK24d9n4XEiaqXgmAyXLrzo/y7zHvg=; b=mLJ750II6HprwIW19z5ugs/lRzxg9NN3DMOzNKNyAs1QVHYlCyiRhkrRkgvj2e8P7lu8sV WYAFQH8y38FAhfXyS+qcJ3s5P4dI8nRj0mOdo1x1T2aTFKhkAV+0SishGDxa8FsAjdEJqQ RNVHaUBFDfPcykz5G4ZPHa3p2OHarzs8qSPdsMeWBUAyd3bn4cu+XwlPPtO89qHNBsF7e9 V7DdvUF6EIeeu9lc310XZ7XWJas4K/bDz6nT2wygRYwqJYMzCyzTPI8XlLEiJ3XEhqMQNk BuLGMLCmY0UVF1EwzNFsyNUwks2kG1gSM+yznlFj5KNxO7QJSCXTWyoxXRxo/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716397413; a=rsa-sha256; cv=none; b=EJVRCb8fsFOL8ZOpS6LBpM46sPu691878kIcYYavDoLXDZGmLvM5Um9bRQLx3OhbIyZie1 4DNiUwWycZ7Ya3Y/2TeASzw9H/fO9O5LqSSDsozWbIng46mIbP+l4N/qGZ4SDwpqfKCLwr JnXZWKJfOFBkSKCIMcYvKZZpejM2zoqxIiu7La7g8oLGzkM3uB1YHhrSyCx8WVfTEqgjHG fbFFX/wrr8WzABHb2L0Ml6+YmfAOVOaAC95VoOO2yhfiMoLSIaEmhFniuGkcFqA0Lnkb/J l0ymHbwu+2vLk9f+eZS3PBDvlzUxxK5/dm4ZgWDiVBfS+dSq4eqv2g8JlCkakA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6/FpjFuBfZoUYK24d9n4XEiaqXgmAyXLrzo/y7zHvg=; b=PWrhpPP9erUXXSMuJdVZd4B8yJGoEIGER0WyJaPAzMuKidZB9n/GHEqwSmJjGL2sjN11TR b7OJ+Z/VyFL9j4XdixamTU4DDu3y/Xv0zYwuz6GvafROx33yGtXrmXD5Q+PZoHOBiA66S6 pAR/z1e5P6R9n88+nzAtpnnFZJR6KjrqpHXXeAlKM0p1emsaK1lYabGvWXwn1TjvneXlZQ D6BnncsbZcoNZMbEjGanNMfJMO7FyK9DeprehhddbzSPZQK3xBnF0YFM0sLlroU/ixgUNf xMDPani6Uko5O08DPQ/elYOHIdp4DS1OlhrxFpecePD5/3O6HsS1wiyx/W1PnQ== 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 4VkyLX6zhVzDyZ; Wed, 22 May 2024 17:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MH3WC9074826; Wed, 22 May 2024 17:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MH3Wa6074823; Wed, 22 May 2024 17:03:32 GMT (envelope-from git) Date: Wed, 22 May 2024 17:03:32 GMT Message-Id: <202405221703.44MH3Wa6074823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner <andrew@FreeBSD.org> Subject: git: a3310b7943f8 - main - src.conf.5: Regen List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a3310b7943f8128a4968620e1451e377b5d458ce Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a3310b7943f8128a4968620e1451e377b5d458ce commit a3310b7943f8128a4968620e1451e377b5d458ce Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2024-05-22 17:00:17 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2024-05-22 17:02:26 +0000 src.conf.5: Regen --- share/man/man5/src.conf.5 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 12f78e20085a..1d35823fc9c4 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 13, 2024 +.Dd May 22, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -137,7 +137,7 @@ Do not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS Do not build -.Xr autofs 5 +.Xr autofs 4 related programs, libraries, and kernel modules. .It Va WITHOUT_AUTO_OBJ Disable automatic creation of objdirs. @@ -234,6 +234,11 @@ Do not build or install .It Va WITHOUT_BOOTPD Do not build or install .Xr bootpd 8 . +.It Va WITH_BRANCH_PROTECTION +Build with branch protection enabled. +On arm64 enable the use of pointer authentication and +branch target identification instructions on arm64. +These can be used to help mitigate some exploit techniques. .It Va WITHOUT_BSDINSTALL Do not build .Xr bsdinstall 8 , From nobody Wed May 22 17:05:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkyNW15g0z5M3nk; Wed, 22 May 2024 17:05:15 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkyNW0CwFz4dhk; Wed, 22 May 2024 17:05:15 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397515; 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=tbFnZbg4hVk1NNkiIxtfT1zDALbDl0kutL0c94WqZyY=; b=ZBciIRlrq2kjzNG8Ck7V9nw9IGJqhVueXP6Q3uNiTszrVYd6pHB9hiVn3DwWXTaT+LfYF5 Qx+WKx+2EZJC+Ka3Yr7S8b3aH0CbkOLBAKam43IrMPfsOp6CWmTKNyP3IzBF1pQlc+s7rT 9Q+Xi9JjVWZKZzGQIJzXwLCHAm4JM9Iof7GOb4cNQb6jYxGKz9QRk1GXyzaIqtbhZ7e9dT A1VAjnpcbSPOZoAHlIEQVqSiaIeTAkFw9j+391fmJfw5AZ4a+DUzvajMOD2NEd2Fb9I8q3 szf6ZZIFovkwhF8OtXfEofha+zfFXbF5pny3WONtsHDay0dbpeIM+lRngb11WQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716397515; a=rsa-sha256; cv=none; b=PLd6ee2YB8IupQjjZnYXF5f0ClgPz/2p3HAWMc+oGCUlmAl1Ocvcv9BX8o9VGEfOQ4xROE gmdkK0e8+/mf+VlfG1s+WWll0FlLkefTZ3+k+zGZmGw1yQVkS9hVYeItDsFqFv+yORuYir /39UP++SpEi4TAWO4UH/p4RUpg2yVH18R0XqLDziVzopDPA05LFfA1zSX5O3M6ghqKG1tu fUZcvbOlZtKE70BFGGAhw9j1N9YjVFf4q+Rmklvzvw7+9t0xTpV0E+Rl8ZjjjOXBKNRRw3 3g1nzPtUtU2lVchJCtHZ4z2UdCzC3Ewmc/EswHBhFOF+siKmI/3b9lChJudGwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716397515; 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=tbFnZbg4hVk1NNkiIxtfT1zDALbDl0kutL0c94WqZyY=; b=K+bHbB0gPpE+ETl7ImzZkwdMkugYIINh4Lq0zURLeBCZNsUFG2CYQjAdtsT/1ZmnmKJeFX NPoxxkWuaV4/kt4fKh/1h3LjNvSDjC8m0aQ6aF3wcDvJufq11qe25XTPMP9d8xzHJgXl5L iv/9WmSw5Wx+RQgm8eP5O9sDQqM2xR9l3dg8/ktQ9kFD6EoGuG+qD9780CoumOjGPiz0ox 1rU1GPjFiBTqPEaXrJw4kWdqQ65FdTD0uBOZqFTPgF44QN3p2P9UtQTvs6NuoC5NHPwLWc 9ixOjcd2EhSK0dxhqVKi59k50rpWoeLUd67BVhQCWDXyRJXvQl/2YitGFlQyQQ== 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 4VkyNV6j1yz12Gn; Wed, 22 May 2024 17:05:14 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 3B2763C019B; Wed, 22 May 2024 17:05:14 +0000 (UTC) Date: Wed, 22 May 2024 17:05:14 +0000 From: Brooks Davis <brooks@freebsd.org> To: Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> On Wed, May 22, 2024 at 08:55:51AM +0100, Lexi Winter wrote: > Mariusz Zaborski: > > The branch main has been updated by oshogbo: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd > > > > commit 408957613bc065c4444812c3ae276ace03697ebd > > Author: Mariusz Zaborski <oshogbo@FreeBSD.org> > > AuthorDate: 2024-05-21 20:02:50 +0000 > > Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> > > CommitDate: 2024-05-21 20:03:20 +0000 > > > > Regen > > --- > > sys/compat/freebsd32/freebsd32_sysent.c | 2 +- > > sys/kern/init_sysent.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > i'm sorry if this is considered accepted practice in FreeBSD (i'm not a > committer) but could i please request more useful commit messages than > "Regen" for things like this? This is more or less standard practice for generated files. These commits are of basically no interest. Historically they had to exist because the source file $FreeBSD$ entries were embedded in the generated files and thus had to be final. That isn't true any more so I often just include them in the origional commit unless I'm doing a lot of minor changes to the source files. -- Brooks From nobody Wed May 22 17:18:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkyh62nqyz5M4jW; Wed, 22 May 2024 17:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkyh62FlLz4g4v; Wed, 22 May 2024 17:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716398326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXyvRHmFpgzSxbl7qOxvVjpYA/yAfeHXo6w+TMlpDUA=; b=vhSt3Ri3FMLwAJFiEKdfxW1y8GhLzyEIekca++2FWlLJ3v+52Ih9SJon0hzhaSY75WU6EF YBavjBlujPGYa1HFlV5a912gifKFJkV05HbWzkZmZ4g00raIYHNHoiSwruyxf/21kp+T3r iEWreeHIWH5LztYCmsHEkyYQT/5afQfwdRu1CWTHhksKlXYi5pgscNdfoP9dGp3Uc5B/U4 TBVJhssak+PrXNOuhbYbaf77XhJEGfnzMXw4LIkUkCMfmL8/LbAqG2h29D3QUO5vImukNh dnGHLoVkSP/MhpZCPIACwd1qXFbLlLTkILt9SLeNgApOtf9QpnC6m1YD2I3pNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716398326; a=rsa-sha256; cv=none; b=AO8ZIIEaNnxAdrJ9n07miC+5KnNjkMj+Us8GXnm6yixuPu4SHeAcpD98zt8uKuFdPfjRhb ybAt2cgx++ExJqMD7ndvgJNqdklREzcIPvdHJzXEwEjDWcH8hSV1jLpU8oPOaiSm3UHhO0 Y9P/oGxGwtiX8gsT9A78b/bq2/BUnkWUm5ybIEyLV/CA3ESHKfkIzkr/ISiy9+pXslvrqz ZeTh1FVguMTGvYaZ6Puwu79EaZ9boBZJ4Oumr44KzqGd04kAr4uNSysllVGy3ObuLUe7JG XXf7EXD+55ogDTvZ7NPkRyhDO2F3hG8GsudAdanxzMTXIm0V8F/Sfyqwggm+6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716398326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXyvRHmFpgzSxbl7qOxvVjpYA/yAfeHXo6w+TMlpDUA=; b=rLSOkU3PI2Jfbg98QUep3sKiPO0Tai8/XX2kVtAys3S5Z/GPeRK3lVYH1a/TtaC3MdatEv s/B6bjO+rCJPJWHqRUgViVgx8PZVqpdI3MRt+upb2TrQDlV65zGeE+KQPp062p/V/Tz9i4 AOjzqdgPJRCU8fME9HAzQdhSFRYhqc2LZsuiu4hkEm3FOGSGFhmKReAkL1Y4r2iE8L/I7B WiJRwhzwcxMJPFomvXd0jdsVzcBoGTjyz3K9w6FKDS+KKZgcsRPlRFp5Y3b9xaUreSgU6A lsv+fqQ/IN4vLx6BlaZTNc4c1JeLoS1fN0N6CHrMUentFUWvXLAMzKoCYEqUGA== 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 4Vkyh61S06zF9v; Wed, 22 May 2024 17:18:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHIklr092888; Wed, 22 May 2024 17:18:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHIkdU092885; Wed, 22 May 2024 17:18:46 GMT (envelope-from git) Date: Wed, 22 May 2024 17:18:46 GMT Message-Id: <202405221718.44MHIkdU092885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude <allanjude@FreeBSD.org> Subject: git: 207e8cef0b36 - releng/14.1 - ftpd: stop using -g flag for /bin/ls List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 207e8cef0b363603d68a226bb03f0ff421d30dd2 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=207e8cef0b363603d68a226bb03f0ff421d30dd2 commit 207e8cef0b363603d68a226bb03f0ff421d30dd2 Author: Allan Jude <allanjude@FreeBSD.org> AuthorDate: 2024-05-21 22:58:21 +0000 Commit: Allan Jude <allanjude@FreeBSD.org> CommitDate: 2024-05-22 17:18:07 +0000 ftpd: stop using -g flag for /bin/ls In 3bfbb521 the behaviour of ls was changed such that -g was no longer a noop for compatibility with BSD 4.3, but instead changed the output of long mode to exclude the owner of the file and display only the group. Update how FTPd invokes ls to restore the previous behaviour Reported-by: Andrew Fengler <andrew.fengler@scaleengine.com> Reviewed-by: jrtc27, des, imp Approved by: re (cperciva) MFC after: 3 days Sponsored-by: ScaleEngine Inc. Fixes: 3bfbb521fef5 ("ls: Improve POSIX compatibility for -g and -n.") (cherry picked from commit 5af3225e0448be6af7f0312e10d2a1dfbe150c25) (cherry picked from commit e5fadc41b48045d8978993d6c4ac72c64542b470) --- libexec/ftpd/ftpcmd.y | 4 ++-- libexec/ftpd/ftpd.8 | 2 +- libexec/ftpd/ftpd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 9d57017e2f19..827ceda03272 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -460,12 +460,12 @@ cmd | LIST check_login CRLF { if ($2) - retrieve(_PATH_LS " -lgA", ""); + retrieve(_PATH_LS " -lA", ""); } | LIST check_login SP pathstring CRLF { if ($2) - retrieve(_PATH_LS " -lgA %s", $4); + retrieve(_PATH_LS " -lA %s", $4); free($4); } | STAT check_login SP pathname CRLF diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index ec4ce0c65100..44f8a2e00835 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -278,7 +278,7 @@ is specified. .It EPSV Ta "prepare for server-to-server transfer, multiprotocol" .It FEAT Ta "give information on extended features of server" .It HELP Ta "give help information" -.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA" +.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lA" .It LPRT Ta "specify data connection port, multiprotocol" .It LPSV Ta "prepare for server-to-server transfer, multiprotocol" .It MDTM Ta "show last modification time of file" diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index a41a23ab1184..11811da35cb5 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2336,7 +2336,7 @@ statfilecmd(char *filename) struct stat st; code = lstat(filename, &st) == 0 && S_ISDIR(st.st_mode) ? 212 : 213; - (void)snprintf(line, sizeof(line), _PATH_LS " -lgA %s", filename); + (void)snprintf(line, sizeof(line), _PATH_LS " -lA %s", filename); fin = ftpd_popen(line, "r"); if (fin == NULL) { perror_reply(551, filename); From nobody Wed May 22 17:34:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkz2j3tfRz5M664; Wed, 22 May 2024 17:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkz2j3JMTz4jrG; Wed, 22 May 2024 17:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjJ7McacaeCkCoKYnq5xtIVWsXb0wkz5oy5fHiTs5Mk=; b=XghmgYOZwpHtF1Q7j5p21j1L/CTDVpkBWxiwFcHsL/66OK+tKUMw60Tl3sILU+F4R8sZII +4rLHErDJRuFHQTK3Qq3tOqA4VYZ8TIDYXzWx266b323TDlAiPTdV6swDAOmIVPbdQlGRW //Vqn5bbPY2TjiQgcQBCosnTECI1dHQencpzMKxfV+3oSzQ6S8XtrH8piHjfPD5Q1IImgy sNHu3QXiLXwdqHHq4OYZxYjFDWd7EJYKZvdD2lPDrGchg5cZFa5Mt1SRZzRgew8I55lMe9 htbIAUs7eEoBvkgBdSlDIj7Jkj5Jmd7PR9FjQQQQTRXXO7AcUsX7gStGPEpaYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716399293; a=rsa-sha256; cv=none; b=q8p2aKpSxvrft5Tj9eY/D9dY9NbRH3etoJCWkHWYgp56u+7bXJR1g5Fp+4YdsRWrlW94zD 5AAYYdf1VpvFoO2HVHy9lyWne+Ithm8oojcGQFODxqIbqj5PBNG+R7iYdfeNQN4kyTjmZ1 Xs7ZBaDnus55idnnTosan/qWocnpjN128GKwA88eud9pdBaETpIx+85g9hKG8ufl4sUXse jpyIsVY7vUug/mvRgRBdNHIotQthtUVWrKg+dvHbpJXSQLdKFL5/zOlUt2gnxAKkkaC2FP bRZqsTkin3/8YYzCRcU3whYksL1olf4v3WDLiKp4adQZAiLqge6tJuKWF2p9Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjJ7McacaeCkCoKYnq5xtIVWsXb0wkz5oy5fHiTs5Mk=; b=wN4NxqzjfVuMvlRKSWhCdohYH84xAFpTAiqXs+tFgBMdRzjJlWnPtwQ9KKkOT36wPHlrtC AZUN3ShylhXtESJ4Le/v0OfZGU60qd8jeOM1pOTPfKhBuYyE2QCAAJvQEFA61urtuhP777 bmAQ7B5wbNRswebUAtuQNcR/tEhzpp5zppaFBlu7/zg+vsVfr6jRnt3y7s73DPau9hw5HJ g7x7M/ymDcWVGFohApphHSTllraMqy/og+wLJL6VYxnci9r6Wj7WbNKx4vUIMkPwh2faCK p6gRmQy1QHKmFSkHg5riHHJu5WzcphZWcHh9jB8G0OAS+izrX446dxrU4gJy5w== 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 4Vkz2j2vCxzFZW; Wed, 22 May 2024 17:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHYr0B026518; Wed, 22 May 2024 17:34:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHYrFt026515; Wed, 22 May 2024 17:34:53 GMT (envelope-from git) Date: Wed, 22 May 2024 17:34:53 GMT Message-Id: <202405221734.44MHYrFt026515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: d6e32525c778 - stable/14 - fib_dxr: check if cached fib_data matches the new request in dxr_init() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d6e32525c778d92c26a37f4e1b562e80b18a9af7 Auto-Submitted: auto-generated The branch stable/14 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=d6e32525c778d92c26a37f4e1b562e80b18a9af7 commit d6e32525c778d92c26a37f4e1b562e80b18a9af7 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-17 15:55:43 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-22 17:34:05 +0000 fib_dxr: check if cached fib_data matches the new request in dxr_init() When calling dxr_init(), the FIB_ALGO infrastructure may provide a pointer to a previous dxr instance, which permits reuse of auxiliary dxr structures, i.e. incremental lookup structure updates. For dxr this is a crucial feature provided by FIB_ALGO, since dxr incremental updates are typically several orders of magnitude faster than full lookup table rebuilds. However, the auxiliary dxr structure caches a pointer to struct fib_data and relies upon it for performing incremental updates. Apparently, incremental rebuild requests from FIB_ALGO, i.e. a calls to dxr_init() with a pointer old_data set, may (under not yet fully understood circumstances) be invoked within a different fib_data context than the one cached in the previous version of dxr auxiliary structures. In such (rare) events, we ignore the offered old dxr context, and proceed with a full lookup structure rebuild instead of attempting an incremental one using a fib_data context which may or may not no longer be valid, and thus lead to a system crash. PR: 278422 MFC after: 1 week (cherry picked from commit 4ab122e8ef127d36d95f874e85600c36c87c8c22) --- sys/netinet/in_fib_dxr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 82245ecf6e66..539d7fe6c96f 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1139,7 +1139,8 @@ dxr_init(uint32_t fibnum, struct fib_data *fd, void *old_data, void **data) } /* Check whether we may reuse the old auxiliary structures */ - if (old_dxr != NULL && old_dxr->aux != NULL) { + if (old_dxr != NULL && old_dxr->aux != NULL && + old_dxr->aux->fd == fd) { da = old_dxr->aux; atomic_add_int(&da->refcnt, 1); } @@ -1275,7 +1276,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, da = dxr->aux; MPASS(da != NULL); - MPASS(da->fd != NULL); + MPASS(da->fd == dxr->fd); MPASS(da->refcnt > 0); FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count); From nobody Wed May 22 17:34:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkz2k6m7Wz5M5k9; Wed, 22 May 2024 17:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkz2k4LcPz4kG9; Wed, 22 May 2024 17:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y02pqzWHft3T38xFQB7Pje/sAN/HNQDQubbJi9rZ5p0=; b=DtmzTq6EDlSgLXxwiUrfJoE4naEylirUCtS8V/jGtdjbNp+y+sqKzHFIYzOuFdOkTvktpF B+gK9IJFXdOSkLpRhHNuJhpJnJOqEuDH1Q+61AsUvkMN9Virmee3pG9WVf5mBkzFi0+tWx jLrWJWkGX6E/J+8LxFBNTz0QlrW26uwdcT3a1evGSpK7vEFsb1os8tuC1QOXeMOKG86A1u jZQlSC2zp3gMouZvM1vhlHAmt9vH5ysWPQyZA2JmRVjPqbKaHwIld3l3j49EcFVs4bqcna gmfU2Nio6F4NvVwFHiWVj6PteZ0Zr/D27Gbps4siqvyYAQs8UMpvetW7luxp9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716399294; a=rsa-sha256; cv=none; b=RoTRv5LSo5mF0c0lVi2YvaDeKmYgNoLnpxx/om+QYJoA/YDvuao1NIVejNs9rBMXcRTW3A C342HblcajDWODcCfLM1UXGCZqWpSez0WZvJR3jOURWSfdIR2udCToz3uN86qlPStD9Lvw rrTWvS3/poAmxphnQPcBID2L0OJw9vD6FY53WD02gjuWDYgayoNjdEDe/7EInf8pJPP+O6 SPYz3Y+jepsgwHcP5vV5VcliBrkfoSTkJycQUUB/6jLunskP8383aETGQiD3x6BkoG9G75 /ks3msGzED5lpwD+Hm8BJsNahLkJvn3r92FI739nkGkJf9crKqASMa6hSNLFTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y02pqzWHft3T38xFQB7Pje/sAN/HNQDQubbJi9rZ5p0=; b=sdflXCVAn1eFpLMQBJWHCy5gDcVyCaSG9HqQ2aBRx+cwo8KS9cR8b8Smx7p4V2rC7ksmH+ wTDVl/c7WVqI8EnLXUmvdcMXOb9El5QRw9I6/vAt4SYw0QoOrL5QgtOYfC8xsE1zDxpv2Z i06tOarcR3O2p9OtMy5nGG9k/xYNwpOgyZ5WTTfTispJ92UQqERl2zMiOP8NlVX+XkIL4v a009v3zR5/lLnvRK/X3vOXoRpXWFdyHGgUdOmlv5amsv4HF4LdieRtWAaUeQs+z99IKlb+ Bo70wSyFxRvs++lAvuRT7+jPlVa9eQMcq8/nZXzbZTTMTpCKXNsLFoC1SFfbtw== 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 4Vkz2k3xs8zFcs; Wed, 22 May 2024 17:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHYsPp026578; Wed, 22 May 2024 17:34:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHYsXM026575; Wed, 22 May 2024 17:34:54 GMT (envelope-from git) Date: Wed, 22 May 2024 17:34:54 GMT Message-Id: <202405221734.44MHYsXM026575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: ada1d9b8edbd - stable/14 - fib_dxr: do not leak memory if FIB constellation hits structural limit List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ada1d9b8edbd52d2ce206bb99de35858b2f871cb Auto-Submitted: auto-generated The branch stable/14 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=ada1d9b8edbd52d2ce206bb99de35858b2f871cb commit ada1d9b8edbd52d2ce206bb99de35858b2f871cb Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-17 16:36:21 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-22 17:34:26 +0000 fib_dxr: do not leak memory if FIB constellation hits structural limit DXR lookup table encoding has an inherent structural limit on the amount of binary search ranges it can accomodate. With the current IPv4 BGP views (circa 1 M prefixes) and default DXR encoding we are only at around 5% of that limit, so far, far away from hitting it. Just in case it ever gets hit, make sure we free the allocated structures, instead of leaking it. MFC after: 1 week (cherry picked from commit 19bd24caa4c8c76ddf138b3a1598a21c8c5c3291) --- sys/netinet/in_fib_dxr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 539d7fe6c96f..326710cc4c45 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1320,8 +1320,10 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, dxr_build(new_dxr); /* Structural limit exceeded, hard error */ - if (da->rtbl_top >= BASE_MAX) + if (da->rtbl_top >= BASE_MAX) { + dxr_destroy(new_dxr); return (FLM_ERROR); + } if (new_dxr->d == NULL) { dxr_destroy(new_dxr); From nobody Wed May 22 17:34:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkz2m1H45z5M63Y; Wed, 22 May 2024 17:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkz2l5L5Kz4kGH; Wed, 22 May 2024 17:34:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVSVOJURmilM7lC8s2kCcXY8KkVJlYDe901a3iKtWOw=; b=kGLVvOzKBqyk56F+D7ogbmxGK5vD92i3saPuOsl5DzuPUEADNGtmqdQMUQY0K3xHYVNS+p GWuOF3qRl6GmyjurBURaELBzbz2Ye6/94jVEbgXNsPcHGh1GeCvxUOU6igNTFIDviCXC6c WAbx+Y2YpjHfYvJiG0rbTCui2fkpu7fFmXjO/ppvltiKTf6bU/MKZimEzRmTQUcUC8uYcA ulKIkhL50A631tFsncu55tDzbpKPog0qjyramQHY1VXgSU+0O86NM8bj2x9rR5Wco1oIDu f0g+VdJrpYs9IbdlqztYJG9HqCFJjyAeVvYk9DGAlSyA6F592BOq1YqTcaGghg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716399295; a=rsa-sha256; cv=none; b=a9YHsB473p/fBJ4gAsdKKNV8Aj0Yr+ept5ZSxkAyWkN4QVhS9Ir+jCQfbgjLhI0YKaiovi f7YLftDDufl2fvv/pX+oIRHDrTTc9AIOY50Wo9ngAfR3yg471x6e0CmAR/rVj8NA4o4Obe xi8msMw1UIUHg9TXI5c7kcWLvfbXWf4qKgfqbNhsUQm1ZnyKo+DLW+rgQ9IVnSAY28PrZY wh64jDI0Un7Db4dAoxpp7P+LNUJ8u9iIOS7zUAqIvzbmGL+TAu3vbGPKwFQCgw31mOx8x6 vKQb2yLIKofurEShCR3h94crw8gthfQa9q4b0ccipgx+Hmcos7BGs4puHQZ8qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MVSVOJURmilM7lC8s2kCcXY8KkVJlYDe901a3iKtWOw=; b=nbiZgKb9gL0J0z3hJUjGQVAHO/O5O92YDCuhpHmWD7o+rEYHhJ2lfU84bZwPwkW0mF629N ktEicXf9OA77uaA0UA7ZYYz+AFgJZkRN3fgVSsa1HBWok1JEgv+6Nd+q/6OLQz/DllA/49 ShlrZJpD/FRfWjmsD7pKCJwcNtfQJx+Vq2O+aKi2bPXvmjGHTwkJi1nrv0cfF/+4j3SDEw UHcxbifRwWqGIB57iIiUQeGKse85u/Z+rwTwntUDJSk2SPB8U/do/86BMez+Vs72qt0kwL GJQZAC4/TT3xlHs06FsLTqLcSlhIzwIstYjlqGQafaobi/zZ7IPxPGej7xh6jQ== 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 4Vkz2l4yGbzFmZ; Wed, 22 May 2024 17:34:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHYtuY026632; Wed, 22 May 2024 17:34:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHYtTC026629; Wed, 22 May 2024 17:34:55 GMT (envelope-from git) Date: Wed, 22 May 2024 17:34:55 GMT Message-Id: <202405221734.44MHYtTC026629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 1266d894c50c - stable/14 - fib_dxr: code hygiene, prune old code, no functional changes List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1266d894c50c54d7282c5cf13a1ac889e87ca0df Auto-Submitted: auto-generated The branch stable/14 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=1266d894c50c54d7282c5cf13a1ac889e87ca0df commit 1266d894c50c54d7282c5cf13a1ac889e87ca0df Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-17 16:57:25 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-22 17:34:40 +0000 fib_dxr: code hygiene, prune old code, no functional changes The !DXR2 code corresponds to the original DXR encoding proposal from 2012 with a single direct-lookup stage, which is inferior to the more recent (DXR2) variant with two-stage trie both in terms of memory footprint of the lookup structures, and in terms of overall lookup througput. I'm axing the old code chunks to (hopefully) somewhat improve readability, as well as to simplify future maintenance and updates. MFC after: 1 week (cherry picked from commit 42b3c16e3051fdc04acc6276dd5d97dbe80ae7eb) --- sys/netinet/in_fib_dxr.c | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 326710cc4c45..b889131b544b 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2012-2022 Marko Zec + * Copyright (c) 2012-2024 Marko Zec * Copyright (c) 2005, 2018 University of Zagreb * Copyright (c) 2005 International Computer Science Institute * @@ -68,9 +68,6 @@ CTASSERT(DXR_TRIE_BITS >= 16 && DXR_TRIE_BITS <= 24); -/* DXR2: two-stage primary trie, instead of a single direct lookup table */ -#define DXR2 - #if DXR_TRIE_BITS > 16 #define DXR_D 16 #else @@ -317,7 +314,6 @@ range_lookup(struct range_entry_long *rt, struct direct_entry de, uint32_t dst) ntohl(key.addr4.s_addr))]); \ } -#ifdef DXR2 #if DXR_TRIE_BITS > 16 DXR_LOOKUP_DEFINE(16) #endif @@ -328,23 +324,16 @@ DXR_LOOKUP_DEFINE(12) DXR_LOOKUP_DEFINE(11) DXR_LOOKUP_DEFINE(10) DXR_LOOKUP_DEFINE(9) -#endif /* DXR2 */ static int inline dxr_lookup(struct dxr *dxr, uint32_t dst) { struct direct_entry de; -#ifdef DXR2 uint16_t *dt = dxr->d; struct direct_entry *xt = dxr->x; de = xt[(dt[dst >> dxr->d_shift] << dxr->x_shift) + ((dst >> DXR_RANGE_SHIFT) & dxr->x_mask)]; -#else /* !DXR2 */ - struct direct_entry *dt = dxr->d; - - de = dt[dst >> DXR_RANGE_SHIFT]; -#endif /* !DXR2 */ if (__predict_true(de.fragments == FRAGS_MARK_HIT)) return (de.base); return (range_lookup(dxr->r, de, dst)); @@ -571,7 +560,6 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) LIST_INSERT_HEAD(&da->unused_chunks[i], cdp, cd_hash_le); } -#ifdef DXR2 static uint32_t trie_hash(struct dxr_aux *da, uint32_t dxr_x, uint32_t index) { @@ -670,7 +658,6 @@ trie_unref(struct dxr_aux *da, uint32_t index) } } while (tp != NULL); } -#endif static void heap_inject(struct dxr_aux *da, uint32_t start, uint32_t end, uint32_t preflen, @@ -864,12 +851,10 @@ dxr_build(struct dxr *dxr) uint32_t r_size, dxr_tot_size; uint32_t i, m, range_rebuild = 0; uint32_t range_frag; -#ifdef DXR2 struct trie_desc *tp; uint32_t d_tbl_size, dxr_x, d_size, x_size; uint32_t ti, trie_rebuild = 0, prev_size = 0; uint32_t trie_frag; -#endif MPASS(dxr->d == NULL); @@ -907,7 +892,6 @@ dxr_build(struct dxr *dxr) } range_rebuild = 1; } -#ifdef DXR2 if (da->x_tbl == NULL) { da->x_tbl = malloc(sizeof(*da->x_tbl) * da->xtbl_size, M_DXRAUX, M_NOWAIT); @@ -918,7 +902,6 @@ dxr_build(struct dxr *dxr) } trie_rebuild = 1; } -#endif microuptime(&t0); @@ -970,7 +953,6 @@ range_build: r_size = sizeof(*da->range_tbl) * da->rtbl_top; microuptime(&t1); -#ifdef DXR2 if (range_rebuild || abs(fls(da->prefixes) - fls(da->trie_rebuilt_prefixes)) > 1) trie_rebuild = 1; @@ -1044,10 +1026,6 @@ dxr2_try_squeeze: goto dxr2_try_squeeze; } microuptime(&t2); -#else /* !DXR2 */ - dxr_tot_size = sizeof(da->direct_tbl) + r_size; - t2 = t1; -#endif dxr->d = malloc(dxr_tot_size, M_DXRLPM, M_NOWAIT); if (dxr->d == NULL) { @@ -1055,7 +1033,6 @@ dxr2_try_squeeze: "Unable to allocate DXR lookup table"); return; } -#ifdef DXR2 memcpy(dxr->d, da->d_tbl, d_size); dxr->x = ((char *) dxr->d) + d_size; memcpy(dxr->x, da->x_tbl, x_size); @@ -1063,10 +1040,6 @@ dxr2_try_squeeze: dxr->d_shift = 32 - da->d_bits; dxr->x_shift = dxr_x; dxr->x_mask = 0xffffffffU >> (32 - dxr_x); -#else /* !DXR2 */ - memcpy(dxr->d, da->direct_tbl, sizeof(da->direct_tbl)); - dxr->r = ((char *) dxr->d) + sizeof(da->direct_tbl); -#endif memcpy(dxr->r, da->range_tbl, r_size); if (da->updates_low <= da->updates_high) @@ -1076,36 +1049,24 @@ dxr2_try_squeeze: da->updates_high = 0; microuptime(&t3); -#ifdef DXR2 FIB_PRINTF(LOG_INFO, da->fd, "D%dX%dR, %d prefixes, %d nhops (max)", da->d_bits, dxr_x, rinfo.num_prefixes, rinfo.num_nhops); -#else - FIB_PRINTF(LOG_INFO, da->fd, "D%dR, %d prefixes, %d nhops (max)", - DXR_D, rinfo.num_prefixes, rinfo.num_nhops); -#endif i = dxr_tot_size * 100; if (rinfo.num_prefixes) i /= rinfo.num_prefixes; FIB_PRINTF(LOG_INFO, da->fd, "%d.%02d KBytes, %d.%02d Bytes/prefix", dxr_tot_size / 1024, dxr_tot_size * 100 / 1024 % 100, i / 100, i % 100); -#ifdef DXR2 FIB_PRINTF(LOG_INFO, da->fd, "%d.%02d%% trie, %d.%02d%% range fragmentation", trie_frag / 100, trie_frag % 100, range_frag / 100, range_frag % 100); -#else - FIB_PRINTF(LOG_INFO, da->fd, "%d.%01d%% range fragmentation", - range_frag / 100, range_frag % 100); -#endif i = (t1.tv_sec - t0.tv_sec) * 1000000 + t1.tv_usec - t0.tv_usec; FIB_PRINTF(LOG_INFO, da->fd, "range table %s in %u.%03u ms", range_rebuild ? "rebuilt" : "updated", i / 1000, i % 1000); -#ifdef DXR2 i = (t2.tv_sec - t1.tv_sec) * 1000000 + t2.tv_usec - t1.tv_usec; FIB_PRINTF(LOG_INFO, da->fd, "trie %s in %u.%03u ms", trie_rebuild ? "rebuilt" : "updated", i / 1000, i % 1000); -#endif i = (t3.tv_sec - t2.tv_sec) * 1000000 + t3.tv_usec - t2.tv_usec; FIB_PRINTF(LOG_INFO, da->fd, "snapshot forked in %u.%03u ms", i / 1000, i % 1000); @@ -1194,7 +1155,6 @@ static void * choose_lookup_fn(struct dxr_aux *da) { -#ifdef DXR2 switch (da->d_bits) { #if DXR_TRIE_BITS > 16 case 16: @@ -1215,7 +1175,6 @@ choose_lookup_fn(struct dxr_aux *da) case 9: return (dxr_fib_lookup_9); } -#endif /* DXR2 */ return (dxr_fib_lookup); } From nobody Wed May 22 17:38:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkz6S6YlRz5M66l; Wed, 22 May 2024 17:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkz6S60ZTz4l09; Wed, 22 May 2024 17:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=463fwtfwyjdMrW/s+o0/iBzIBAnOj0G87zz7zOnI/XA=; b=nv2wdeCgxX66E9tG/uNoMiLPPMxLdpYfQw5Y8ay69UFAfa6izyUaQ5KX5c1mvxVJdcZzOd ggLQudebyOo21V8u4xbrJB0i/f2iizZ6C3eUPsWPkHH+QS+/lP8r6p25BgO8LD8WOqHDVJ phKD1TnCNbyM9JhLdNvlvPRXnQ/Fd2Dt9iqF+MmXC8iL3Ss9avTB4EE/3Agk9H+lRqr8bQ rQNLJzgTdFKHMWf6r7F0RcY9QuCZ7f+TujI6YsrQo9oCzbpaY3ctWuUw3H/CdmgKTQ2tYr SiuNgHF1g5qh450iqsUBWXkki5XucVKwadyb3ro5H3+F0dRkzgZLNLNrVRMGdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716399488; a=rsa-sha256; cv=none; b=BEZplMA0GfOgH+1+EDZ741QpMpcpA+IgtKIcBFQsH2UD5/AxaJQ7Q3u4gc1DuWIkCDyYrb 67qftdh6KoPnOvKIGF6umBem8PxPG9X3zVGSzu0LZF7Xs+bSrnaLShUrwu0O0qygMtXHG7 9oev0ZdZShKBKvGafXe3gRUNWn25G2ldVppZ/k5qP534Le45kPwPbv9PQxMew4q+MEQjtU UIzxYJ/Yghkn9krqGCGWBsncpJCudScE1o0QLnh9Bn2WqiZuEWVCiddeDzrkjUJ57RBmZO zWUW/LHO6lFhJ4PZXYi56FHN4GRq/+75+ThWiZaZXzfaGq3gw1fa4wmyXKSWiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=463fwtfwyjdMrW/s+o0/iBzIBAnOj0G87zz7zOnI/XA=; b=MzwHK2LqSvsXPMT8BnGUPA5gEtZlWAw0rtted4OtCMFWIe0fLfbH87ZOw0LU/Lk7G98Bar yuHKMChzZR2LS+Hlgz0sclm3AUn5PrYKxvJaGe1tIj6sGmMv3OEuz7AWteAvTVTM+GE5jm jCBY/+JK0D/CAjtyaVXsseecZvKK18G2Vn4aUyr4Kc0N6CUBH/ITX7O0ZUYs5iEVm6Frai B2urovvgAf5jNZ3U6UIuYalN2vj2hsv/ajuAR5sUszKfArML/VjAAC64+hTYLz8iIbw0Qk FtB9ebhYk74510QCDkv5deBqnMiQOuq9/oZ/752YMF9UK34T7jWQhU5Y+eDSYA== 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 4Vkz6S5c1nzFX0; Wed, 22 May 2024 17:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHc8T1027235; Wed, 22 May 2024 17:38:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHc8Bc027232; Wed, 22 May 2024 17:38:08 GMT (envelope-from git) Date: Wed, 22 May 2024 17:38:08 GMT Message-Id: <202405221738.44MHc8Bc027232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 9629a4b6865c - stable/13 - fib_dxr: check if cached fib_data matches the new request in dxr_init() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9629a4b6865c5c56804f79a62f45512b175776e2 Auto-Submitted: auto-generated The branch stable/13 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=9629a4b6865c5c56804f79a62f45512b175776e2 commit 9629a4b6865c5c56804f79a62f45512b175776e2 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-17 15:55:43 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-22 17:37:31 +0000 fib_dxr: check if cached fib_data matches the new request in dxr_init() When calling dxr_init(), the FIB_ALGO infrastructure may provide a pointer to a previous dxr instance, which permits reuse of auxiliary dxr structures, i.e. incremental lookup structure updates. For dxr this is a crucial feature provided by FIB_ALGO, since dxr incremental updates are typically several orders of magnitude faster than full lookup table rebuilds. However, the auxiliary dxr structure caches a pointer to struct fib_data and relies upon it for performing incremental updates. Apparently, incremental rebuild requests from FIB_ALGO, i.e. a calls to dxr_init() with a pointer old_data set, may (under not yet fully understood circumstances) be invoked within a different fib_data context than the one cached in the previous version of dxr auxiliary structures. In such (rare) events, we ignore the offered old dxr context, and proceed with a full lookup structure rebuild instead of attempting an incremental one using a fib_data context which may or may not no longer be valid, and thus lead to a system crash. PR: 278422 MFC after: 1 week (cherry picked from commit 4ab122e8ef127d36d95f874e85600c36c87c8c22) --- sys/netinet/in_fib_dxr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 82245ecf6e66..539d7fe6c96f 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1139,7 +1139,8 @@ dxr_init(uint32_t fibnum, struct fib_data *fd, void *old_data, void **data) } /* Check whether we may reuse the old auxiliary structures */ - if (old_dxr != NULL && old_dxr->aux != NULL) { + if (old_dxr != NULL && old_dxr->aux != NULL && + old_dxr->aux->fd == fd) { da = old_dxr->aux; atomic_add_int(&da->refcnt, 1); } @@ -1275,7 +1276,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, da = dxr->aux; MPASS(da != NULL); - MPASS(da->fd != NULL); + MPASS(da->fd == dxr->fd); MPASS(da->refcnt > 0); FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count); From nobody Wed May 22 17:38:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkz6V0n4Yz5M66q; Wed, 22 May 2024 17:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkz6V00Ccz4lGF; Wed, 22 May 2024 17:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Mfdp7d2OokRW21Y1f4Wc+e5dztvlykk1Cz6M46gu5o=; b=B+pyQYz85ndKUUmT23t0wtfSErF0MTSqUJLpmN/UX8KXt+RQkFrEkX0Gl0fsCl/USgeYwB W9+wlTfFrqo3VOlWLZg+60DwVHyC62CLzE7WJCLcGxP8QAQWE+6jxdfui2rbwLt6SGirqE NIkppDsklhvoGUl4M7PRo/AtDtAHV+2Xr/RG4f6Xo25IOlk35s/hxnJ6wcddktNPDoysys 4LkSbrB1C0ogatIgrhk/z23LyPfSSWY/KOaGTgU0ujV8cnc94KAVNsU3GJ8UBVu8yys7fx kU4MeiGAUumJCCiDZ/i5Wxef4E6zPrjhtv05E70UBCynwmAZ1P5/a1kEZMpoBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716399490; a=rsa-sha256; cv=none; b=U6jlwr1RjtUgkkHzjdAbZGxx4nGIE1b4AomiPOL6/ve7FKzjFN31yk1hLpIutrdsLAHl/9 JxwjBP9rCvexsdWb87c171A9qNF7bpL1YwlY5RlrSuvCkGJNRUSmlSL0WI0+r01/5sU5j3 JeqBoX9oac7dNBEc19ED2chUMC04zTkNbDdYum113DlR34ovKtF1xsqrT8Kh5UqfkqbOec pMuccefJQ3OHwvgX/RmihKAIGIDew1LuxdFz1w1McKadaMUWo0OepbOtjrVkJ4kEeMeXs5 Z384lrxT83E0LR5tRCwWHKlEjkKKKl16StrhPu/Tkb6E4xn8GgotK5XCyMYN0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Mfdp7d2OokRW21Y1f4Wc+e5dztvlykk1Cz6M46gu5o=; b=yTySAqHBeZgkQrzjvYiKFJ7mZrAQejlmfPgj3yi9pjrXH3RkVVxQGQOeN+/FUNm5/oQO8W iObtJOquSYGKXV5OYoAEMimahRYZEoVRpH2T2fFQ8HKFgxMZwoMhlvPtMIio2y4g38iXUY ZqM93TilezS+fjP/G8Yz0o8hJeTItG7qdPDurnuoRa7mG9F+o43tulQgIFO3HLeC0yp+A4 KHx98bdC4vcr+qW3rkKGPERD+dknk0xQbyhcBbjWw8PV1ojPgUs66eZ5tdUlYRI/uLniXd zD2aa6dvnXj1s80ZQYdYw1upJ850J82Uykas9GMg4smBYa40rnkBUxjiaFRAKw== 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 4Vkz6T6dGszFGM; Wed, 22 May 2024 17:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHc9J9027295; Wed, 22 May 2024 17:38:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHc9Zk027292; Wed, 22 May 2024 17:38:09 GMT (envelope-from git) Date: Wed, 22 May 2024 17:38:09 GMT Message-Id: <202405221738.44MHc9Zk027292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 56d8fb274847 - stable/13 - fib_dxr: do not leak memory if FIB constellation hits structural limit List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 56d8fb27484746416a74c8bd36aacc9edd0f4794 Auto-Submitted: auto-generated The branch stable/13 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=56d8fb27484746416a74c8bd36aacc9edd0f4794 commit 56d8fb27484746416a74c8bd36aacc9edd0f4794 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-17 16:36:21 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-22 17:37:43 +0000 fib_dxr: do not leak memory if FIB constellation hits structural limit DXR lookup table encoding has an inherent structural limit on the amount of binary search ranges it can accomodate. With the current IPv4 BGP views (circa 1 M prefixes) and default DXR encoding we are only at around 5% of that limit, so far, far away from hitting it. Just in case it ever gets hit, make sure we free the allocated structures, instead of leaking it. MFC after: 1 week (cherry picked from commit 19bd24caa4c8c76ddf138b3a1598a21c8c5c3291) --- sys/netinet/in_fib_dxr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 539d7fe6c96f..326710cc4c45 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1320,8 +1320,10 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, dxr_build(new_dxr); /* Structural limit exceeded, hard error */ - if (da->rtbl_top >= BASE_MAX) + if (da->rtbl_top >= BASE_MAX) { + dxr_destroy(new_dxr); return (FLM_ERROR); + } if (new_dxr->d == NULL) { dxr_destroy(new_dxr); From nobody Wed May 22 17:38:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vkz6W3Hflz5M645; Wed, 22 May 2024 17:38: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vkz6W0tzKz4lJm; Wed, 22 May 2024 17:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ueq4uqlVsvoSQTZt+DxezgiQD0MsGFNOsLbADbUCNw8=; b=TZpu797GjakM/KVB3JVSypAqFNEju8wivS9lWEuMuXui/yRooSbjL1E7Hk4XvRvX5UBV/R 74fVh0qR80aSln3JxDechlJa3NkEVWdqG+07Ul5AF6FZBRsNEjVpyrnmTt07skzJInfgwC kaLAEcqBP8+bWgvv8HzqDZyJRf8J2Va737ktuXQsOXIcEyvD0lK/q7qGgno9yh/NQbBSyQ NXiPi08M0H4xVzykYki4vHlZyENh5aRyutUStJO9w7D+UwzJ7EA1jOy8Ov6eyZhEghn0G1 Bv4IOGVaCCgS+SdnvoloAEmUKP4Pyz9o5qxGS94EHcVbYaadITizq8U2DhGX0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716399491; a=rsa-sha256; cv=none; b=hLh7yUCgVpwNvL3SLCnhYX9Hmcb5L/mlPz8J45MdLc3RgNh07+365hKYvqwOOcQJQ5qVaa zIXaTm7jK2gpQOl0l7piN3z5tHORI9oILMMJ+2HEOyafHxnGQm//tt3vEkfJwok36oyd/V g/hEfstr5RDs2MYNYXij6+fjvqNzY9/KSi8uYjrBGSOjDx8krpHotCqzsSldlxaPQCNMZt hsivAGdku7l8vIdDPq2LjlZT7MpY1NYKD0h9oraKIjjrxsY8/pDwwWnJ6uLSvNfMKzg99m 0dKIF/AXNvv0DnyRZixxqFNhi4aaDHg72l93inK5LTUD5YTdvD6DX0/Bo0cyqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716399491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ueq4uqlVsvoSQTZt+DxezgiQD0MsGFNOsLbADbUCNw8=; b=c0UUP+e8gY6Syu20MIpnhEBx3cmCBPN4jTzuWm7JPoJ33GNJgU4pMd6qast+Wfhb10O/mr eW5xfVYLBuhM0N7RygdXb0g+SXeSqxRjRbur2ZEfykpMPZNt6CCFEQUSMFtJ8iXhU5nGWc YVCmQnltoeKCVfN6Pde4pvpP1tlyVskzyw0RsDka2uHPeb2VCqWp/zznsobxiyhofjVEem XY9WHoWVz1HIGCTif8+q7ULGlfmK1KVi7gzfHjP/nc4jQRrEYDTqoG0/+tmGIYnOKfUmIq f9/+7LCGbksNefdxmuVdElayjsn92TXuYtT6xZ65DrZ8CrQylLz4cj2AdXHFVA== 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 4Vkz6W0WNZzFcv; Wed, 22 May 2024 17:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHcAjF027356; Wed, 22 May 2024 17:38:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHcA33027353; Wed, 22 May 2024 17:38:10 GMT (envelope-from git) Date: Wed, 22 May 2024 17:38:10 GMT Message-Id: <202405221738.44MHcA33027353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 913a955bf55d - stable/13 - fib_dxr: code hygiene, prune old code, no functional changes List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 913a955bf55dcaaaceb4424ece804d5f4080281e Auto-Submitted: auto-generated The branch stable/13 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=913a955bf55dcaaaceb4424ece804d5f4080281e commit 913a955bf55dcaaaceb4424ece804d5f4080281e Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-17 16:57:25 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-22 17:37:52 +0000 fib_dxr: code hygiene, prune old code, no functional changes The !DXR2 code corresponds to the original DXR encoding proposal from 2012 with a single direct-lookup stage, which is inferior to the more recent (DXR2) variant with two-stage trie both in terms of memory footprint of the lookup structures, and in terms of overall lookup througput. I'm axing the old code chunks to (hopefully) somewhat improve readability, as well as to simplify future maintenance and updates. MFC after: 1 week (cherry picked from commit 42b3c16e3051fdc04acc6276dd5d97dbe80ae7eb) --- sys/netinet/in_fib_dxr.c | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 326710cc4c45..b889131b544b 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2012-2022 Marko Zec + * Copyright (c) 2012-2024 Marko Zec * Copyright (c) 2005, 2018 University of Zagreb * Copyright (c) 2005 International Computer Science Institute * @@ -68,9 +68,6 @@ CTASSERT(DXR_TRIE_BITS >= 16 && DXR_TRIE_BITS <= 24); -/* DXR2: two-stage primary trie, instead of a single direct lookup table */ -#define DXR2 - #if DXR_TRIE_BITS > 16 #define DXR_D 16 #else @@ -317,7 +314,6 @@ range_lookup(struct range_entry_long *rt, struct direct_entry de, uint32_t dst) ntohl(key.addr4.s_addr))]); \ } -#ifdef DXR2 #if DXR_TRIE_BITS > 16 DXR_LOOKUP_DEFINE(16) #endif @@ -328,23 +324,16 @@ DXR_LOOKUP_DEFINE(12) DXR_LOOKUP_DEFINE(11) DXR_LOOKUP_DEFINE(10) DXR_LOOKUP_DEFINE(9) -#endif /* DXR2 */ static int inline dxr_lookup(struct dxr *dxr, uint32_t dst) { struct direct_entry de; -#ifdef DXR2 uint16_t *dt = dxr->d; struct direct_entry *xt = dxr->x; de = xt[(dt[dst >> dxr->d_shift] << dxr->x_shift) + ((dst >> DXR_RANGE_SHIFT) & dxr->x_mask)]; -#else /* !DXR2 */ - struct direct_entry *dt = dxr->d; - - de = dt[dst >> DXR_RANGE_SHIFT]; -#endif /* !DXR2 */ if (__predict_true(de.fragments == FRAGS_MARK_HIT)) return (de.base); return (range_lookup(dxr->r, de, dst)); @@ -571,7 +560,6 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) LIST_INSERT_HEAD(&da->unused_chunks[i], cdp, cd_hash_le); } -#ifdef DXR2 static uint32_t trie_hash(struct dxr_aux *da, uint32_t dxr_x, uint32_t index) { @@ -670,7 +658,6 @@ trie_unref(struct dxr_aux *da, uint32_t index) } } while (tp != NULL); } -#endif static void heap_inject(struct dxr_aux *da, uint32_t start, uint32_t end, uint32_t preflen, @@ -864,12 +851,10 @@ dxr_build(struct dxr *dxr) uint32_t r_size, dxr_tot_size; uint32_t i, m, range_rebuild = 0; uint32_t range_frag; -#ifdef DXR2 struct trie_desc *tp; uint32_t d_tbl_size, dxr_x, d_size, x_size; uint32_t ti, trie_rebuild = 0, prev_size = 0; uint32_t trie_frag; -#endif MPASS(dxr->d == NULL); @@ -907,7 +892,6 @@ dxr_build(struct dxr *dxr) } range_rebuild = 1; } -#ifdef DXR2 if (da->x_tbl == NULL) { da->x_tbl = malloc(sizeof(*da->x_tbl) * da->xtbl_size, M_DXRAUX, M_NOWAIT); @@ -918,7 +902,6 @@ dxr_build(struct dxr *dxr) } trie_rebuild = 1; } -#endif microuptime(&t0); @@ -970,7 +953,6 @@ range_build: r_size = sizeof(*da->range_tbl) * da->rtbl_top; microuptime(&t1); -#ifdef DXR2 if (range_rebuild || abs(fls(da->prefixes) - fls(da->trie_rebuilt_prefixes)) > 1) trie_rebuild = 1; @@ -1044,10 +1026,6 @@ dxr2_try_squeeze: goto dxr2_try_squeeze; } microuptime(&t2); -#else /* !DXR2 */ - dxr_tot_size = sizeof(da->direct_tbl) + r_size; - t2 = t1; -#endif dxr->d = malloc(dxr_tot_size, M_DXRLPM, M_NOWAIT); if (dxr->d == NULL) { @@ -1055,7 +1033,6 @@ dxr2_try_squeeze: "Unable to allocate DXR lookup table"); return; } -#ifdef DXR2 memcpy(dxr->d, da->d_tbl, d_size); dxr->x = ((char *) dxr->d) + d_size; memcpy(dxr->x, da->x_tbl, x_size); @@ -1063,10 +1040,6 @@ dxr2_try_squeeze: dxr->d_shift = 32 - da->d_bits; dxr->x_shift = dxr_x; dxr->x_mask = 0xffffffffU >> (32 - dxr_x); -#else /* !DXR2 */ - memcpy(dxr->d, da->direct_tbl, sizeof(da->direct_tbl)); - dxr->r = ((char *) dxr->d) + sizeof(da->direct_tbl); -#endif memcpy(dxr->r, da->range_tbl, r_size); if (da->updates_low <= da->updates_high) @@ -1076,36 +1049,24 @@ dxr2_try_squeeze: da->updates_high = 0; microuptime(&t3); -#ifdef DXR2 FIB_PRINTF(LOG_INFO, da->fd, "D%dX%dR, %d prefixes, %d nhops (max)", da->d_bits, dxr_x, rinfo.num_prefixes, rinfo.num_nhops); -#else - FIB_PRINTF(LOG_INFO, da->fd, "D%dR, %d prefixes, %d nhops (max)", - DXR_D, rinfo.num_prefixes, rinfo.num_nhops); -#endif i = dxr_tot_size * 100; if (rinfo.num_prefixes) i /= rinfo.num_prefixes; FIB_PRINTF(LOG_INFO, da->fd, "%d.%02d KBytes, %d.%02d Bytes/prefix", dxr_tot_size / 1024, dxr_tot_size * 100 / 1024 % 100, i / 100, i % 100); -#ifdef DXR2 FIB_PRINTF(LOG_INFO, da->fd, "%d.%02d%% trie, %d.%02d%% range fragmentation", trie_frag / 100, trie_frag % 100, range_frag / 100, range_frag % 100); -#else - FIB_PRINTF(LOG_INFO, da->fd, "%d.%01d%% range fragmentation", - range_frag / 100, range_frag % 100); -#endif i = (t1.tv_sec - t0.tv_sec) * 1000000 + t1.tv_usec - t0.tv_usec; FIB_PRINTF(LOG_INFO, da->fd, "range table %s in %u.%03u ms", range_rebuild ? "rebuilt" : "updated", i / 1000, i % 1000); -#ifdef DXR2 i = (t2.tv_sec - t1.tv_sec) * 1000000 + t2.tv_usec - t1.tv_usec; FIB_PRINTF(LOG_INFO, da->fd, "trie %s in %u.%03u ms", trie_rebuild ? "rebuilt" : "updated", i / 1000, i % 1000); -#endif i = (t3.tv_sec - t2.tv_sec) * 1000000 + t3.tv_usec - t2.tv_usec; FIB_PRINTF(LOG_INFO, da->fd, "snapshot forked in %u.%03u ms", i / 1000, i % 1000); @@ -1194,7 +1155,6 @@ static void * choose_lookup_fn(struct dxr_aux *da) { -#ifdef DXR2 switch (da->d_bits) { #if DXR_TRIE_BITS > 16 case 16: @@ -1215,7 +1175,6 @@ choose_lookup_fn(struct dxr_aux *da) case 9: return (dxr_fib_lookup_9); } -#endif /* DXR2 */ return (dxr_fib_lookup); } From nobody Wed May 22 17:52:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VkzR60X75z5M740; Wed, 22 May 2024 17:52: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VkzR575D1z4nJj; Wed, 22 May 2024 17:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716400354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IWP8HMB4NpSEzAy3+1yypfsid2N2/hs3d9sbGwcM1Y=; b=N9U9Ca9Q9ZdwALuri3SciUKV+wYLEVP5ZkJ4S7TXlZ4k57YuTohoWvuyClC8NVjUTSAS4q bvYW3eE235TTjYf+w32XN/1iuMvQrVMLcbXo0Dsn0o7UMLYN8HOuNFI2jwLWHcxK0zCVtS VBetYLWX6mCFFC+4WFMTC5O6mKrAcA0LHsRtNqkG7L5n7bcQBK5fhlCaTQc2A6NIcipQf+ 0oWksbeMmxaEUQdmTETpFr8Yy4gzTBIhOIEDRTuVL6fRPv5BNAS9LnT091nYlYXamFS4xn nN15hFFRqBTDFotPz1nUC5GdgQHpAPvv6nweQYrYLvkDEdrVAYCr2iu4LUsElg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716400354; a=rsa-sha256; cv=none; b=P2aNR7RYnt+KKw9B7bLBypCbR5RP07nM9PsvUmpoZs4uLil2PgV9F9SeJJsJyFT59xDhZI oA6f7/sxjJpZfXsU4ntNICMHvnBgFvBKjdQD45Riwkk3p3Dq8by4fpGfrPt8LP3P0OaKb5 i/6wfauh+Lo6pJG5LFPqgQuNI/c8DEXmcpqMfHDMtD9/tMuMfhUNFPXk4Yuy+OKbOJJPCS KpHzxcoFhsW1bFa19AHkwigurPyQjg56pIPq7tqTiTmSHUS0nTSPtqo8QKGJ/qOlcCkKRc vgMzaTGjAfg8gizv2sQliOKHWdLEU2kJDoeLdO4fqAUV0FVILxQSlV41yc3M+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716400354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IWP8HMB4NpSEzAy3+1yypfsid2N2/hs3d9sbGwcM1Y=; b=GKcl7C2YnSgAKlwGfZfjgx3K8JfkZDgjH1/X8HPTgY63kwQEuqr1k1yNQaU+STY2+AFMeq V5Mckw2GfDcC7HEFtH0GFHuTHI67jF/slNU4hKb3b1RGn8xMLes9G81/zq1Gss/YN2ftsi 9TTWpn1waG4cckrk8mjChXUwv9vccGBfRrewaKAX659e96QU7wfhsNiHty2f4zzBYqXVgM x1Uj84KDBB3yd5viloTV3gls7pxZYMlyzshw0yOsoYTDKpoxloulrFYg+zWVrbIgpLiG90 VFavLFOUXmoxbx/b8dsC+SraK1SkGCHrqBHWnqSy6ivLk6PYk2iFRyvanLO0mQ== 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 4VkzR56fh9zFCk; Wed, 22 May 2024 17:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MHqXd6059043; Wed, 22 May 2024 17:52:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MHqXS1059040; Wed, 22 May 2024 17:52:33 GMT (envelope-from git) Date: Wed, 22 May 2024 17:52:33 GMT Message-Id: <202405221752.44MHqXS1059040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: b0a1a3138a37 - releng/14.1 - fib_dxr: set fib_data field in struct dxr_aux early enough List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: b0a1a3138a37b7849d1fb735e6b5c2cd392a2e8b Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=b0a1a3138a37b7849d1fb735e6b5c2cd392a2e8b commit b0a1a3138a37b7849d1fb735e6b5c2cd392a2e8b Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-07 15:44:09 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-22 17:50:29 +0000 fib_dxr: set fib_data field in struct dxr_aux early enough Previously it was possible for dxr_build() to return with da->fd unset in case of range_tbl or x_tbl malloc() failures. This may have led to NULL ptr dereferencing in dxr_change_rib_batch(). Approved by: re (cperciva) MFC after: 1 week PR: 278422 (cherry picked from commit 0418d7a0903725ade71ae77c4ff900010a93a185) --- sys/netinet/in_fib_dxr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index e7eede53ea51..94f066bdf982 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -877,6 +877,7 @@ dxr_build(struct dxr *dxr) return; dxr->aux = da; da->fibnum = dxr->fibnum; + da->fd = dxr->fd; da->refcnt = 1; LIST_INIT(&da->all_chunks); LIST_INIT(&da->all_trie); @@ -907,7 +908,6 @@ dxr_build(struct dxr *dxr) trie_rebuild = 1; } #endif - da->fd = dxr->fd; microuptime(&t0); From nobody Wed May 22 18:50:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl0kF5VJGz5KVB7; Wed, 22 May 2024 18:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl0kD6lM4z4t75; Wed, 22 May 2024 18:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716403844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/OoPToZM3M+wjSmQHtyZdQsWImrjdYwPCboagSWl7U=; b=i9LkZ+wTR/1vab4py1j9USHTKsTzWWlYPEFM/bhAJLQDqV97JauMbXVSuNiP65HcXHBCOU jpl1+Lgb3cb97Ix9xV2KxPYBo28ks7CR9dSV4lhlsk22Imraq4bJv7W5fAMS/bQzlewUlk rD/qI3/WuQwasMYfZvNRBMaqplVr/7hQdoYoPG/0LueiZsbIHS55y4Nh0bq5beGWxN3X+M lGzmKYOh8dXB7CmIPQZS8dfKP+qHnLOMD6RXRlHupavAg/R/Nv0TDhncFMWL/TVnIlszwC zoiLmZlnIOVUpw8i8KTsKsPCCQ5gk1achJ6cVd+JxpDI24VgjOm5ay+w+ItkGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716403844; a=rsa-sha256; cv=none; b=s16V7rMneAyyhmLy9kNZ+R26Ut4a40s84uQ7HufJrRyX51XeB5A2GZoD03lNQ1xml81bb9 AATpm3Yi8Zemabdpz6+XG/HsH7RLMIN2kdAQeIL2WxxOrIoiXDj81FAjglkZmyhir77cF/ ib9mwYBz5F/dpCPu2gb9GdooBoJeAM7vGhlDc/xbkwXd7rPg8aRXqM3nDPYftgDUH4JHB2 mSQR4QYqdSzNF+yDWTcHFHr/6BjoX0bebylvOjgUTgcTsOOrOnoa8CYaMbIwPaaWI/vzvD trdSH00X2HsKpFgabkRjVaXrumfiIggtAEtr7WqaXQX4+JlxFYQ/67XKAapodA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716403844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/OoPToZM3M+wjSmQHtyZdQsWImrjdYwPCboagSWl7U=; b=b6zer8XBksgALu92wOXKmigPE3qvIpx6WdrR1IVGVUOsMV+D0e2spyZAmsy2C+oONq1B6e ki0vQLPM0Uwo+/EwGStZOk7WXEgHlAlCkOhkoG0kJOcDsMTnxakQWz44dU1k5An7BsU4HL 0WtyGbP4rNahvTYmseNZ4NCMjg21SKBLgTpXDHwcYg2eXqQgLB2EM4PplcohkoIXlXnCH4 9K1LpvNV/UJO4/zZAnWSus+zR57kJUFEgJCJicZc2z6WZPS5AFLtOexb8jB8vtET2aOk8G nJTGFr9yzj/lRrBd8mPe+Zos9LMX52hp8wpQoEpzf3lOk7H5DbjQyAUjlil1zg== 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 4Vl0kD6MQDzHTd; Wed, 22 May 2024 18:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MIoicK053455; Wed, 22 May 2024 18:50:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MIoiDN053452; Wed, 22 May 2024 18:50:44 GMT (envelope-from git) Date: Wed, 22 May 2024 18:50:44 GMT Message-Id: <202405221850.44MIoiDN053452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: a45a9e61b498 - main - blackhole.4: improve man page List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a45a9e61b498393b05f3e1e2e3e6131c7b484dc4 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a45a9e61b498393b05f3e1e2e3e6131c7b484dc4 commit a45a9e61b498393b05f3e1e2e3e6131c7b484dc4 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-22 18:36:24 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-22 18:36:24 +0000 blackhole.4: improve man page Not the connection is dropped, but the incoming SYN segment. Reviewed by: concussious.bugzilla_runbox.com MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45296 --- share/man/man4/blackhole.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 00c8e3d7a2b6..090f330a6ed8 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd November 3, 2021 +.Dd May 22, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -51,7 +51,7 @@ when unexpected packets are received. .Ss TCP Normal behaviour, when a TCP SYN segment is received on a port where there is no socket accepting connections, is for the system to return -a RST segment, and drop the connection. +a RST segment, and drop the incoming SYN segment. The connecting system will see this as a .Dq Connection refused . From nobody Wed May 22 19:22:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl1Qv6bkpz5KYP5; Wed, 22 May 2024 19:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl1Qv68c8z40FS; Wed, 22 May 2024 19:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716405751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYVIMLfSVQQeN8rQ4DZGei+hA/KQZdqb4MSvXmizfps=; b=J11Q0tRwaVF07Evx3vqUtMFYrlrPMzTbiKv9tTTYxFVNY6HaarJGnBx015u5Pak//WdO+5 f6tYkYH4oX0Ti0HXH31jidkUEHf1oRVJrzsVNaPZJbJ0//vXk1xWKB+erIL7As1Ed+/+D7 CjLpsaV2dVbPKfSZyD4p7h608MkG6/Ec2934hFeMXx8ZhKYN2Z23hh40Rz6ENPKvhxaPvw UgpiAZ9cYHlE1sHoFPvu5hpy0WtDG3lNacLJK2X73TDnZzIyzpIiefw2wUPhc5YMLCS8Yx O5RQDAzLPV5vk7UBZIEE/9pM/OgmmKlrKuM9BOGxQrILZY8/Vo4JZzb7kK764g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716405751; a=rsa-sha256; cv=none; b=tPYT3P8PLYzpgPWkCeZgkqhnvR7hO08FgLeiNEw1jf7zbCtHwp0aVptdEApWvAH3ocycwo OzJoaWSuFYooT4SCLFg64gDsvfq3Ct4EBocQs/YcUkNmr7NdrgokBine/TGonNTKf3fhAl ZnTFC5e4qOqWj17ONpwv2kt2jG9lsRvm/qRUG0Kjpd7zoYMWnDuJ+vKuvdqopzgqFV877N NlPYdRCvbJ1bKA1pQTuVr5m42fHk2TYMyyzA6sJ8PhGX9EcWgkMI0K9pyFC/6Z3SNNJ6FL SC9BPlanwpxKsyk+xdeqmoAfVBxTEwN5ms52PwtZcckWKRXItsWIq8jM3ZQsQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716405751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYVIMLfSVQQeN8rQ4DZGei+hA/KQZdqb4MSvXmizfps=; b=uLBGVHj/apWfO0H3TOLMpqYkbzwTMOmtKblCGH5pa4g1BQQx2QF5znxB7HPwI/vt84pjvs TBWzhqj7THmBYNqBZKnrWm5WPQG+YNxwhYaecmBL5aLyo/ikSkl85dlDfhcFNy4GXRynhF EPmN2JITZkoMcZjD3osZ7nN/rEUDcdz4t64zoRT/TFVOhpUtRFOWccMmGW1DBFatqbZtVP 3ETzz0ml6yPIJtRBaInZhG2p2ipLMBIt1iDN4aeiWRuY48Cc/MifGMY1vPdDOQ1jIdcMU3 XD/5nvMYz+FQJX4bWVIIddDpLghrnTI7kITHpzXD0kOhS/OPccVPV40XammOhw== 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 4Vl1Qv5ly3zJRg; Wed, 22 May 2024 19:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MJMVXV012106; Wed, 22 May 2024 19:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MJMVjC012103; Wed, 22 May 2024 19:22:31 GMT (envelope-from git) Date: Wed, 22 May 2024 19:22:31 GMT Message-Id: <202405221922.44MJMVjC012103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick <mckusick@FreeBSD.org> Subject: git: 017d52e38ab3 - stable/13 - Enable soft updates by default for UFS2 filesystems. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 017d52e38ab332b140ab40231ef920bcc3b2b1c1 Auto-Submitted: auto-generated The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=017d52e38ab332b140ab40231ef920bcc3b2b1c1 commit 017d52e38ab332b140ab40231ef920bcc3b2b1c1 Author: Kirk McKusick <mckusick@FreeBSD.org> AuthorDate: 2024-05-15 05:38:35 +0000 Commit: Kirk McKusick <mckusick@FreeBSD.org> CommitDate: 2024-05-22 19:22:14 +0000 Enable soft updates by default for UFS2 filesystems. Reviewed-by: Warner Losh, kib Differential Revision: https://reviews.freebsd.org/D45201 (cherry picked from commit 61dece6d27fb2436928ca93d65667b358e05aa7b) --- sbin/newfs/newfs.8 | 8 +++++--- sbin/newfs/newfs.c | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 915304caaa40..0b9f66a7e76d 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 -.\" -.Dd October 21, 2022 +.Dd May 18, 2024 .Dt NEWFS 8 .Os .Sh NAME @@ -100,6 +98,10 @@ The default format is UFS2. For backward compatibility. .It Fl U Enable soft updates on the new file system. +Soft updates are enabled by default for UFS2 format file systems. +Use +.Xr tunefs 8 +to disable soft updates if they are not wanted. .It Fl a Ar maxcontig Specify the maximum number of contiguous blocks that will be laid out before forcing a rotational delay. diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 1db317766692..6e69a6c5437b 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -391,6 +391,9 @@ main(int argc, char *argv[]) fprintf(stderr, "because minfree is less than %d%%\n", MINFREE); opt = FS_OPTSPACE; } + /* Use soft updates by default for UFS2 and above */ + if (Oflag > 1) + Uflag = 1; realsectorsize = sectorsize; if (sectorsize != DEV_BSIZE) { /* XXX */ int secperblk = sectorsize / DEV_BSIZE; From nobody Wed May 22 19:55:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl28t0j5mz5Kc3S; Wed, 22 May 2024 19:55:26 +0000 (UTC) (envelope-from jhb@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl28t07QCz43Cr; Wed, 22 May 2024 19:55:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407726; 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=pJg58uSMvRqat4DB3n49tTIKCHhtrIsCiRUmoJ9pCdE=; b=hik+OTw3hgtru7TFsL2XaBnLWk+uiSnAnbxgeawD3IQu1+6E9dtbrImig3+d+LjjbHyrPi GAPN41uSYC7ZTOFYkWVgVH7K6BECqF5NTvItrYY6kYqQKq13yx60iAoFPoIwx40WTInemz SGvGjPHaqkmn7Ily9z7o2nW3y8JdebNpSVfD4/RbOQO4d2quHFdB5t3P5JtF3Gg1JVixnx lpXX9UEOdziWqZ3dgMnr3BJaoAVmBn/2Lky6y4EhbtASRE1kzB583e3imGvL7xSGA8jxBx Bf7S+4ulgEJowNlW2I8FSrlWKHciSk+Lx2e05WNSmozHXNgNKYKzh4KgAXwaUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716407726; a=rsa-sha256; cv=none; b=rhG83DxWlwTE223GG5ECtnz4eGaaRqstBPHYD8wBrcisLM4hsXt1M1xKZHR4NnJWArnd3l fK53Wxebrqw0pSdM0p62McWLjq2VJ0X46xiJMpuz56Q001+L8kriZXK5I6bAGy0sH51kDz mtKclgWyKGGFuzKKmI3Sv4UwH9U60bp12nCOP6eXJzAjCAreCV53p6yNBvsow0Dj22167U LNiudZWkSB7E9MAil4eBjhxWDYBTEfAj6lPFzhYX5iXO0zttDw/BvW6e71Ym6Z+SdOTYGk AjyN9LPGr52hT9CitCvSn+DxeLj7B6q0fnROKaNnIlgd/OExYE0xSe2oAHGS8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407726; 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=pJg58uSMvRqat4DB3n49tTIKCHhtrIsCiRUmoJ9pCdE=; b=KfCV1ih0qek5kX/A32VnE/eMKHfdxTt+yWViL8Ah6o+qPUa1PVWMbOwS9s6LtneHHUw5Km OAPALFXYiGNzpM5qS80VozHl75WrvSAA2HCpmRaNX/v/1U2SI7qSVgA6w9yleEshyWASWL p1gkc2qR1NKX8LQPnr52BFQNl7CJmkiRRkWSbAtI2owX3A4Fl68d3P4QYjDZO3ovFxvvgC pF+lqIfsK7drB+7symVeVKNLkc3jKQgSMfbzFcMn9DXm0SWPkgzPiqT9hkm/PS/TYOXN9V jLNqcu6e41rVm3+bbqIrYBqDGhFnKwm4Z8kcnAjV6cOzCNZDPGiufoi+zTTABA== Received: from [IPV6:2601:644:937f:4c50:b136:2176:fd7d:9c11] (unknown [IPv6:2601:644:937f:4c50:b136:2176:fd7d:9c11]) (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: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vl28s27gNz15Cl; Wed, 22 May 2024 19:55:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <3edabe3b-4b51-401f-ad64-e36c84fd455b@FreeBSD.org> Date: Wed, 22 May 2024 12:55:24 -0700 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 408957613bc0 - main - Regen Content-Language: en-US To: Dmitry Salychev <dsl@FreeBSD.org>, Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <86r0dugmik.fsf@peasant.tower.home> From: John Baldwin <jhb@FreeBSD.org> In-Reply-To: <86r0dugmik.fsf@peasant.tower.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/22/24 3:36 AM, Dmitry Salychev wrote: > > Lexi Winter <lexi@le-fay.org> writes: > >> [[PGP Signed Part:Undecided]] >> Mariusz Zaborski: >>> The branch main has been updated by oshogbo: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=408957613bc065c4444812c3ae276ace03697ebd >>> >>> commit 408957613bc065c4444812c3ae276ace03697ebd >>> Author: Mariusz Zaborski <oshogbo@FreeBSD.org> >>> AuthorDate: 2024-05-21 20:02:50 +0000 >>> Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> >>> CommitDate: 2024-05-21 20:03:20 +0000 >>> >>> Regen >>> --- >>> sys/compat/freebsd32/freebsd32_sysent.c | 2 +- >>> sys/kern/init_sysent.c | 2 +- >>> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> i'm sorry if this is considered accepted practice in FreeBSD (i'm not a >> committer) but could i please request more useful commit messages than >> "Regen" for things like this? >> >> when looking through 'git log', especially 'git log --format=oneline', >> it's really not clear what this commit actually does, meaning if i'm >> looking through the log for commits related to a problem i'm having, i >> have to examine commits like this by hand to see if they're related. >> >> it would save me (and other people, i suppose) a lot of time if the >> commit message could at least mention what it's touching, e.g. "Regen >> sys/compat/freebsd32/freebsd32_sysent.c". >> >> [[End of PGP Signed Part]] > > Looks like it slipped in by mistake. I expected it to be reverted and > re-worded. I don't think it's worth reverting at this point. For `make sysent` I would suggest 'sysent: Regen' as a commit log in the future. We typically use 'src.conf.5: Regen' after running `make makeman`. -- John Baldwin From nobody Wed May 22 19:57:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl2Cf6PCKz5Kc9V; Wed, 22 May 2024 19:57: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl2Cf5tHVz43Hq; Wed, 22 May 2024 19:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oP2Pg2OTP25E+I4fabKA/H44vzKLhkawGOAW7JwuMlg=; b=t94qtEgzfNTmUnWH1d7iFM+CBRNwIdQgHN9DKPBcaPyY9U2RB7OsEIpck8OCy9UyXVIaaY iWb8EwbMZpxijYGzBuDE9NiOuky2f8NMQws6H7ipMHlEcH9aagCc/JLpTpR4X/VOlnKDOi CEfn9X5wURE8Bhkc2CiVf3jBhq56n7kOiOdzsMNYIwrSMyMa8mM3CIlfAnLJpxFCXg06fW JYVt88ubMT5IZpQJGTL+Ey7bO+J7Xvo2eCi2xd1pEtv+jRhFDxfmorBdO4cHxqOpzrFh9v tCvfxluLxBejqwM2XBO8M+kRVxMzxMreHjhaV9d1hOS1cqDdZQEKrRL9XK2CdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716407870; a=rsa-sha256; cv=none; b=SzCvA8Uv/9mda+VdlwKsdYv5Dn8cysza2+MswZgCULUzpgKYgMFp1DITZyZ8uSrTEZQdOX fWdZsovHFHsBkOFHYpmwfy1ek16A6gELWruj3qNj2Gt/864UNSKIYl1xrrZofn+46H3DMf fK0x534Dq9TtmhXi9H4UT36RFYEVbnteH+deICDjqSyQADxq5VUN8xaLXDntOzSFxhAv5o lfHcEadSsdKW3liqupnCXC+lL99u54EcBdf6ArK0pTir7N59kej1VRqvqMyyWAYTwjYgvX bbn9joqhrOQD2HeCpTeXfOSMpoHbh1wcRYzIJuqmg6lcQvqtYCg3jG1sWRHE1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716407870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oP2Pg2OTP25E+I4fabKA/H44vzKLhkawGOAW7JwuMlg=; b=md62DESoTniLy9mnlUb6BoM92qnAIpn0gSvsZdS9qeN4PVaSsk4rIprOccjQan7jlJE3r5 CRNkjKKGYtpfkAEz4p88+K8sOvEOz7nhTosZf5ZoD/5Cqz/zBsvd0z/bENOX4iWCBJaS3D g6aiUMDZrz7elU+yK704zHkIyjbBDIY+BkEgvuFfahatWEBFUKl8EFb4Yg5THF5Kx9kUI3 uI9dKgQwmZrqpaSTtCrUMG5v9C/KDh8sAIrh/XmSK97+z+6eGrBmpgE9bGyc8A4IqlYzSs EhUCYn4qaoy3vcBIJPdHjSV8Gi1a8UHPP/aLPH0n9KNUbqt3hQSYHsXZVFvYNA== 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 4Vl2Cf5MFpzJqk; Wed, 22 May 2024 19:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MJvoTa063490; Wed, 22 May 2024 19:57:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MJvo59063488; Wed, 22 May 2024 19:57:50 GMT (envelope-from git) Date: Wed, 22 May 2024 19:57:50 GMT Message-Id: <202405221957.44MJvo59063488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" <stevek@FreeBSD.org> Subject: git: 56b274213024 - main - Add function to OSD to get values without taking the lock. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56b274213024957cea378d27393304ae5cc8ded9 Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=56b274213024957cea378d27393304ae5cc8ded9 commit 56b274213024957cea378d27393304ae5cc8ded9 Author: Stephen J. Kiernan <stevek@FreeBSD.org> AuthorDate: 2024-04-04 00:12:57 +0000 Commit: Stephen J. Kiernan <stevek@FreeBSD.org> CommitDate: 2024-05-22 19:55:48 +0000 Add function to OSD to get values without taking the lock. There are some cases of OSD use where the value is only initialized once at a point where successive access of the value can be done so safely without the need to take the lock. Reviewed by: markj Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44631 --- sys/kern/kern_osd.c | 23 ++++++++++++++++------- sys/sys/osd.h | 5 +++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_osd.c b/sys/kern/kern_osd.c index 38db612d34d9..dcd80a948ea7 100644 --- a/sys/kern/kern_osd.c +++ b/sys/kern/kern_osd.c @@ -278,25 +278,34 @@ osd_free_reserved(void **rsv) } void * -osd_get(u_int type, struct osd *osd, u_int slot) +osd_get_unlocked(u_int type, struct osd *osd, u_int slot) { - struct rm_priotracker tracker; void *value; - KASSERT(type >= OSD_FIRST && type <= OSD_LAST, ("Invalid type.")); - KASSERT(slot > 0, ("Invalid slot.")); - - rm_rlock(&osdm[type].osd_object_lock, &tracker); KASSERT(osdm[type].osd_destructors[slot - 1] != NULL, ("Unused slot.")); if (slot > osd->osd_nslots) { value = NULL; OSD_DEBUG("Slot doesn't exist (type=%u, slot=%u).", type, slot); } else { - value = osd->osd_slots[slot - 1]; + value = atomic_load_ptr(&osd->osd_slots[slot - 1]); OSD_DEBUG("Returning slot value (type=%u, slot=%u, value=%p).", type, slot, value); } + return (value); +} + +void * +osd_get(u_int type, struct osd *osd, u_int slot) +{ + struct rm_priotracker tracker; + void *value; + + KASSERT(type >= OSD_FIRST && type <= OSD_LAST, ("Invalid type.")); + KASSERT(slot > 0, ("Invalid slot.")); + + rm_rlock(&osdm[type].osd_object_lock, &tracker); + value = osd_get_unlocked(type, osd, slot); rm_runlock(&osdm[type].osd_object_lock, &tracker); return (value); } diff --git a/sys/sys/osd.h b/sys/sys/osd.h index 1c58c4fff8de..498cad5064f9 100644 --- a/sys/sys/osd.h +++ b/sys/sys/osd.h @@ -64,6 +64,7 @@ int osd_set_reserved(u_int type, struct osd *osd, u_int slot, void **rsv, void *value); void osd_free_reserved(void **rsv); void *osd_get(u_int type, struct osd *osd, u_int slot); +void *osd_get_unlocked(u_int type, struct osd *osd, u_int slot); void osd_del(u_int type, struct osd *osd, u_int slot); int osd_call(u_int type, u_int method, void *obj, void *data); @@ -79,6 +80,8 @@ void osd_exit(u_int type, struct osd *osd); osd_set_reserved(OSD_THREAD, &(td)->td_osd, (slot), (rsv), (value)) #define osd_thread_get(td, slot) \ osd_get(OSD_THREAD, &(td)->td_osd, (slot)) +#define osd_thread_get_unlocked(td, slot) \ + osd_get_unlocked(OSD_THREAD, &(td)->td_osd, (slot)) #define osd_thread_del(td, slot) do { \ KASSERT((td) == curthread, ("Not curthread.")); \ osd_del(OSD_THREAD, &(td)->td_osd, (slot)); \ @@ -98,6 +101,8 @@ void osd_exit(u_int type, struct osd *osd); osd_set_reserved(OSD_JAIL, &(pr)->pr_osd, (slot), (rsv), (value)) #define osd_jail_get(pr, slot) \ osd_get(OSD_JAIL, &(pr)->pr_osd, (slot)) +#define osd_jail_get_unlocked(pr, slot) \ + osd_get_unlocked(OSD_JAIL, &(pr)->pr_osd, (slot)) #define osd_jail_del(pr, slot) \ osd_del(OSD_JAIL, &(pr)->pr_osd, (slot)) #define osd_jail_call(pr, method, data) \ From nobody Wed May 22 20:24:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl2pD1kPrz5KfZf; Wed, 22 May 2024 20:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl2pD1Bs3z45ZR; Wed, 22 May 2024 20:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716409460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TV5IHBrVlOBHAObZrKKiQ1fO/+wI2cxzxpmFJpmxlw4=; b=GihOAdzmZAwxf2sPKLp1PmzS9Uo4NcGOVzDQXPcR9+rju3AWZ5uPgjZJip3iU787qztMRh deAj9wuyKASA6F1wt7RiRgVzHpZ3WSga8KWp5aw5XmRQXn+MKf95CGSUIAyiRv9yo1Z1i1 3l8BAxNk7NwXIFyVGX01AlQUfdsBwtQHzTh8pCX+/r7ZXspUxPCmQQfphDWhAKqtFTn1bH YFquI7zO5ZxLvR3gXjp5N2yIY7BhuSQyMLuHcjGudK9FzwL0lh8cTLIMI2E/izHWG/ZJWV pLR0wttj6qpd9Kde0VaZadkgRzTf1OCEAqE/TpJOjFHecuOImr2FecGj79ZeAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716409460; a=rsa-sha256; cv=none; b=fuxuF5oFMUTEF905IfqloalT+zD2c4hv2XEp3NSulZGrWgRhML/OwVIsOaR/AM27dX+Tj5 m222wxU3jT4QsKg+H3Jz4/bPHyuPOTjkUtZ+fjcoBT4wSZx+CB+BqO592AZtAtacMKRNTm R9fiGP2SJ5A0+MrjFRkUk2ut5BNmFa/LLXR8YvUsx/kamiELlJIeKzAfbk/2lC3SGl9gx/ SLMfyctblHaQhbLRiIZJdwDQoQpdwRMUI1tKWo7Xs6FfhBkCOy9na7YRtGnzdl485JZPPH ibTyq2+nzwBuWzxNvBtQmIeHxH5FziM56ZfsxT7NOu06o5GYKF2FZztn6OV7vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716409460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TV5IHBrVlOBHAObZrKKiQ1fO/+wI2cxzxpmFJpmxlw4=; b=qtYZt0WerYRfAo55weJcOhRj8LCyp5wW4DrDDeT5mNJZzeJF/tRqzGQg1zuV4sLNEMlUAW sl9WTc3ANAb2Jp9etagvgxsDc1bzxSTXBHfnIEOp2X+RfJ7G/4y3ALAY7aXOvU7u9PBjam VpcjWAFxZgHBAwgcy5RcS8xy2s8tltzjHkPJE67sT1vNdIKI4ZwBsATxjA3/s2tnxa2iwm rBa/yqH5TwIV/yNEqHWzsUvV1kUizF1S4nVFNvadramyHCS2sew5rpgMN4jSUJpln924Zf DiVG1Qywby13YyBv5e5guOQOTNfCbe9aY/eNdbzdzdn58KSLcIgcjpwD9v3O2A== 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 4Vl2pD0p57zKlr; Wed, 22 May 2024 20:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MKOKdu013809; Wed, 22 May 2024 20:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MKOKVY013806; Wed, 22 May 2024 20:24:20 GMT (envelope-from git) Date: Wed, 22 May 2024 20:24:20 GMT Message-Id: <202405222024.44MKOKVY013806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 6841c2677c5b - main - zzz: Fix output formatting when suspend state not supported List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6841c2677c5b5e85fd727bfb934efdafd4ccc2bc Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6841c2677c5b5e85fd727bfb934efdafd4ccc2bc commit 6841c2677c5b5e85fd727bfb934efdafd4ccc2bc Author: Oleksandr Kryvulia <shuriku@shurik.kiev.ua> AuthorDate: 2024-05-22 20:21:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 20:21:18 +0000 zzz: Fix output formatting when suspend state not supported Reviewed by: imp (who also simplified things a little) Differenetial Revision: https://reviews.freebsd.org/D45299 --- usr.sbin/zzz/zzz.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/zzz/zzz.sh b/usr.sbin/zzz/zzz.sh index 0e0ceebe70b9..dde36e7984c6 100644 --- a/usr.sbin/zzz/zzz.sh +++ b/usr.sbin/zzz/zzz.sh @@ -27,9 +27,8 @@ if sysctl $ACPI_SUSPEND_STATE >/dev/null 2>&1; then # execute ACPI style suspend command exec acpiconf -s "$SUSPEND_STATE" else - echo -n "Requested suspend state $SUSPEND_STATE " - echo -n "is not supported." - echo "Supported states: $SUPPORTED_STATES" + echo "Requested suspend state $SUSPEND_STATE is not supported." + echo "Supported states: $SUPPORTED_STATES" fi # Check for APM support elif sysctl $APM_SUSPEND_DELAY >/dev/null 2>&1; then From nobody Wed May 22 21:08:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3n05Z1Dz5L1RD; Wed, 22 May 2024 21:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3n051Y1z4H7d; Wed, 22 May 2024 21:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eaD6jtPH/IbMlmZ5rM3F//8jgoVkvoXZoR4Bg3EReO8=; b=cW7D+H7Mj6lQkxpgbgDnynlre3pmYSN2tIi9EmbF8jNEpfSc+xsFnhRtnQWmmHcYaez5KI okHlZxUOXgN9SNyyblnS7wHFXLis4W8SvfuJhn8xRDI0/NM/fGNXO4kkERUeWzLQRGN3Yh rgM4KNms7GOSk/dK3WUDM+Q62zaW9W8ftSVquz8QG44yZtXInQTRLojW5z/6eyPGi4SNaK VSn2VgkBne9NOyFYCabOplKVbawL/JvXY1qWOuiAplJ69CBqGxNMjD3DxNSPU+vBqX7aIH V6EAQfOKmX/s1e0SxrTwQQuhLgwSLGipFEnUAhiSvhj0y4Lhtjaw0bzunD1CqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412100; a=rsa-sha256; cv=none; b=p+pWMO8ae1PkGRLp0qgD010Lk9Ho2LZHL0JPQ0giiANpFExinn5Tpt0Sg27kAUak1iaqaq 4IV2Kn0z//H7BaKEMiAknOeSkB2ztUd2mBW42a1AlCVrSEUPQNtJEw74ax9+MbNj27zVl3 4Hyz1VdF3r3aY4HFLLehv5p47mQJ1EzyTnrWX8DXDBc51O5mEPwSy4HIK7jfMTPL0fNdCZ 8Rt1BppTHF0C8jpo0rC0IgVKn2Q9a0iMTFCbATL3Iqu+icg68Aq2WnHufpgOC1vqIyT7zT 2guCYKnD1FrhHDrsYxYHKmEAlnAM7pg1dx3xahFIBkfRJ1IrKSFEniJwnMI0tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eaD6jtPH/IbMlmZ5rM3F//8jgoVkvoXZoR4Bg3EReO8=; b=D8oumlmnr71L2yEAFjk3yggh2HiZ1RIoZhUG8CEi8q2K04dgA0PRJXWrTRv32F6OxQfT8H zR5lteuivO+22Fv0LTtukcePyBMUrv+5U/TmHIscRb3oKNaQHQr0YwV4wXrN/4GNBthcGn Pf9KeS3kLPUJ3dmfyDu/SdkescnGZ1JxpOPI9SfuGNxT0S0kH04TG8ZVErNbEKzZnyBwiO HJ0LOvffmXX3ECCObu3s7pGOUNkQjZCxPgGeGU2h8f6zEZeqC5PsEoGO1QJJvzReGBbiml k26MUlK1SmZP+UKrgrAL6mwu1eqzzMdaNt9x7EQiZrNk/813sIpp5o+i1DeG8w== 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 4Vl3n04cl8zM2f; Wed, 22 May 2024 21:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ML8KQP082979; Wed, 22 May 2024 21:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ML8K2l082976; Wed, 22 May 2024 21:08:20 GMT (envelope-from git) Date: Wed, 22 May 2024 21:08:20 GMT Message-Id: <202405222108.44ML8K2l082976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: 5a4d24610fc6 - main - LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5a4d24610fc6143ac1d570fe2b5160e8ae893c2c commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-05-22 02:24:51 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-22 21:04:19 +0000 LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes While the previous order worked well for iwlwifi 22000 and later chipsets (AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes. Change the teardown order to avoid these problems. The inline comments in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new order and also the old problems we were seeing (too early sta removal or silent non-removal) leading to follow-up problems. There is a possible further problem still lingering but a lot harder to trigger (see comment in review) and likely related to some other doings so we'll track it separately. Sponsored by: The FreeBSD Foundation MFC after: 3 days PR: 275255 Tested with: AX210, 8265 (bz); 9260 (Bakul Shah) Differential Revision: https://reviews.freebsd.org/D45293 --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 ++++++++++++++++++---------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d598e9af0050..b982413382f8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -993,33 +993,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new) } } -static void +static enum ieee80211_bss_changed lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { + enum ieee80211_bss_changed changed; + + changed = 0; sta->aid = 0; if (vif->cfg.assoc) { - struct ieee80211_hw *hw; - enum ieee80211_bss_changed changed; lhw->update_mc = true; lkpi_update_mcast_filter(lhw->ic, true); - changed = 0; vif->cfg.assoc = false; vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; - /* - * This will remove the sta from firmware for iwlwifi. - * So confusing that they use state and flags and ... ^%$%#%$^. - */ IMPROVE(); - hw = LHW_TO_HW(lhw); - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, - changed); - lkpi_hw_conf_idle(hw, true); + /* + * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with + * assoc = false right away here will remove the sta from + * firmware for iwlwifi. + * We no longer do this but only return the BSS_CHNAGED value. + * The caller is responsible for removing the sta gong to + * IEEE80211_STA_NOTEXIST and then executing the + * bss_info_changed() update. + * See lkpi_sta_run_to_init() for more detailed comment. + */ } + + return (changed); } static void @@ -1459,6 +1463,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -1742,16 +1748,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* See comment in lkpi_sta_run_to_init(). */ + bss_changed = 0; + bss_changed |= lkpi_disassoc(sta, vif, lhw); - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST - * as otherwise drivers (iwlwifi at least) will silently not remove - * the sta from the firmware and when we will add a new one trigger - * a fw assert. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -1768,7 +1769,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; @@ -1801,6 +1801,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -2289,14 +2291,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + bss_changed = 0; /* + * Start updating bss info (bss_info_changed) (assoc, aid, ..). + * * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. + * See comment there; removes the sta from fw if not careful + * (bss_info_changed() change is executed right away). + * + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + * + * The order which works best so far avoiding early removal or silent + * non-removal seems to be (for iwlwifi::mld-mac80211.c cases; + * the iwlwifi:mac80211.c case still to be tested): + * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here) + * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST + * (removes the sta given assoc is false) + * 3) add the remaining BSS_CHANGED changes and call bss_info_changed() + * 4) call unassign_vif_chanctx + * 5) call lkpi_hw_conf_idle + * 6) call remove_chanctx */ - lkpi_disassoc(sta, vif, lhw); + bss_changed |= lkpi_disassoc(sta, vif, lhw); + + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -2310,15 +2331,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } + lkpi_lsta_remove(lsta, lvif); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.use_short_preamble = false; + vif->bss_conf.qos = false; + /* XXX BSS_CHANGED_???? */ lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); LKPI_80211_LVIF_LOCK(lvif); @@ -2326,7 +2351,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif->lvif_bss = NULL; lvif->lvif_bss_synched = false; LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); /* * The very last release the reference on the ni for the ni/lsta on * lvif->lvif_bss. Upon return from this both ni and lsta are invalid @@ -2346,6 +2370,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); From nobody Wed May 22 21:09:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3pk02qFz5L1T9; Wed, 22 May 2024 21:09: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3pj5Rxsz4Hrp; Wed, 22 May 2024 21:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jA50DRN/yBVoxX1sMNSA7jOBmp/hQHxIygkajycqeFc=; b=aBDJPWgisJrFNEbWtfls+hqO0Wr21RHf6YcZPRA0eFVxmd1qC4YRAcc39B0Hy5kjyYdu/y 2ITtkBE8izKufpdxEdslr10MiVKGNq3cREi/rnJWVIlv+gJbWvN4UIWxK02Qass2vhh8K2 7S2PBLQDbi1uFWHBilblQvdq7fv37TT/lOVzqq9Lb2zZeLIDVAhyHJ+o0Eea+wn5wZ79Dp Fw1+EN5r+wnfhGy76tburHrrOjjhC8DNop04YTkYy/CAOrHjF6mFibFC06CB+oVVioK0gP 2BpRa4HRk2TQIboOh+Zw5o3aV8Fcm/G3l8zK+G45A26PCUkKljXCnqRbPCn95g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412189; a=rsa-sha256; cv=none; b=RaidGSUuL4qukPBHMOThaQXnwya7xooxbW1g2F2Rhlr+D3GKFgz3Hqkn1QR2K7giWT3oAt Q5PLDS2Sq6meeVkJjG2SiBi3Ob17EdaqQYVRCA5yv0cgNGcx3nwlqWPCDMbtpDjyFzNi+1 wMz9+gzsSKoEzVfc5W0Qb0GfxZG9ce4/yB0F0Rt8xZW9Bi6dXEeEuBy4fRsGIdkOgulaxR RsEJSTxJSJuB9iv1ZtSrpmo1ihAc6QMbZpaRSFYgEo67qqLvNQsSOVdlDNE4B9xZccoU7O Aymn6GR/vIe8nbvnIurmlPMSXO35nVV3K818Y2E2CL5rFy9z0YmWlcpyiqxi8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jA50DRN/yBVoxX1sMNSA7jOBmp/hQHxIygkajycqeFc=; b=XlDZRfGunLHet+BiFjPGrjZvgatnYCJJ6uHphyXiNuczE2qtfbhGDLrVJ5xRuCqvQqiXss H4uCpCjRngpYjbhTaJIhlGx21wB39F+rh9AfAQvN59BrbqZRCgoSIU4l/FBaUAne6z7gdE qU3rincrjaHtE48TpentdFDmFvfj1p96GHeCmu2eBr3yMN+oRoGhlPR27LYEtGz7yUZn1M GdTxWtaiS+PZy4ydFqDTPsttm9YxId4dU4lympJyN+wdrCvgbXNEdYlUtthpt8ydvX+sNG S1u5btc7lKt+W8UdqdF/fc8tyEqw1reY9tUQ/tlIJH/HV1Pj+Q1fuWo7ZPigdA== 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 4Vl3pj54L2zLYp; Wed, 22 May 2024 21:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ML9nac083294; Wed, 22 May 2024 21:09:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ML9nwI083291; Wed, 22 May 2024 21:09:49 GMT (envelope-from git) Date: Wed, 22 May 2024 21:09:49 GMT Message-Id: <202405222109.44ML9nwI083291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: d1af434d9994 - main - LinuxKPI: 802.11: rename chanctx_conf for consistency List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d1af434d99941d32a09c48fb3ef77ef83e203d29 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d1af434d99941d32a09c48fb3ef77ef83e203d29 commit d1af434d99941d32a09c48fb3ef77ef83e203d29 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-22 21:08:55 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45185 --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b982413382f8..72b39e840bfd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1078,7 +1078,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1144,54 +1144,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1217,14 +1217,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1235,26 +1235,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1456,9 +1456,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1466,8 +1466,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1794,9 +1794,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1804,8 +1804,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2363,9 +2363,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -2373,8 +2373,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4770,7 +4770,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops; From nobody Wed May 22 21:10:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3q66vQFz5L0wG; Wed, 22 May 2024 21:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3q669xwz4J2T; Wed, 22 May 2024 21:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Syo6tbMr8URKRzWu12JyPQBojZm+NCrlp6lISHNXxMM=; b=eubN8kLKNomLr8rU6J6dwy/s/urFCxWhzx7aQpXYDlhV12z8b1ZOthHsbpih+o3F2UZ2B/ s6fSeG2+EXDIO71SLgbBdWQDnGRvOHfK0AoSllDpvzYP5KUuO34EMfqDjjIDrGzPbpLJPo bKiybPhYpwIA5HUG6cp/gKcdPXTsYgWl6ghJmwwY7jr8TtUDBkbPp0j+4qetawoB8j3/2N cXBNKII9DsnSyg1urk1KCKfQLGxknM6jNUav4DM571GmWJyRAoVnRbbSet1TsqJ4KuXF3q 45gpEE/ak++0NYgbfjKmfWKGFiwsBA1b0izfRVEFw5i9+wMGSbjiQvcGBkKG3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412210; a=rsa-sha256; cv=none; b=OToLkkMtMWJD/Jo9xvEdQklNmRpIuwV3B0xFow9sIio9LAwvb54yxijipHZ0y6+E7ITjaa jSkH5xFP7Bc0urDjzns5MCV7vGXvZ4ozbsBbPfRWIyqTU+bVtV+As0pEbjpeA5uUbdFz5L 17+5IRlEZcldcOWT4zH9FG17cbSBr2yGaptM51MTlkSQRVmcku0gQ8CWvI74h2r5+weumw nFpHOP+VZqrRfbRDeK5DgrOE4HmTmZG8YO2GenycpSe4UV6AViKEhhmr3x1GW84LocSP8k ln2RfRK16AImbtw8am3yjvKfdQ0d0I0CS3+yLZkb78u7IaaPAtPcLdSiaA0EyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Syo6tbMr8URKRzWu12JyPQBojZm+NCrlp6lISHNXxMM=; b=ly5FtIodc3sVlg0jpeNkrBg0TTTcYbRTEJa5UxP5mSOT+FAEGE7J++6avDBs68+w+XH7M6 UHnEz9E9mfjVOyuGCV5YCv4WPS+KhOwvh2/bYgK0KG+B4GDHUeajyeh5Db4pF80QWA0giO Wyyapg5732XSv2iRD19VwfydJFjodoENzjDZootsW1BQNEXqXGNbZ8fMu5yyXxXHjImcO/ ftW2EGEnxx1X6jIGTsOvbl+Pez8XW1PMLYEBaUyZPBAXaDUSWAd46ktSxDh/AunjeR+mA0 dMp/kyBksQIybkDtAPVQaAuy6wwK7EmC9RquLAsjNjwr4syJzIyGwq1sYD4EQg== 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 4Vl3q65nQmzLYq; Wed, 22 May 2024 21:10:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MLAAvc087909; Wed, 22 May 2024 21:10:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MLAAdf087895; Wed, 22 May 2024 21:10:10 GMT (envelope-from git) Date: Wed, 22 May 2024 21:10:10 GMT Message-Id: <202405222110.44MLAAdf087895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 0115ad61d859 - main - autofs: Fix cross-threading on file to delete List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0115ad61d859b5fe107c84abce6673c153800bda Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0115ad61d859b5fe107c84abce6673c153800bda commit 0115ad61d859b5fe107c84abce6673c153800bda Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-22 20:44:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 21:10:08 +0000 autofs: Fix cross-threading on file to delete We want to delete the new file, which is installed in man4 not man5. Noticed by: Gary Jennejohn Fixes: a03e8a40d404 Sponsored by: Netflix --- tools/build/mk/OptionalObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 82227eef5d50..c0118bcbf6cb 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -134,7 +134,7 @@ OLD_FILES+=etc/rc.d/autounmountd OLD_FILES+=usr/sbin/automount OLD_FILES+=usr/sbin/automountd OLD_FILES+=usr/sbin/autounmountd -OLD_FILES+=usr/share/man/man5/autofs.4.gz +OLD_FILES+=usr/share/man/man4/autofs.4.gz OLD_FILES+=usr/share/man/man5/auto_master.5.gz OLD_FILES+=usr/share/man/man8/automount.8.gz OLD_FILES+=usr/share/man/man8/automountd.8.gz From nobody Wed May 22 21:10:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3q80Fzgz5L1DN; Wed, 22 May 2024 21:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3q76NNDz4Hnr; Wed, 22 May 2024 21:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=634tumq4TSBj7HVLcw+yOmpfCRd27Me+9lrfhrkkH1Q=; b=Y4P8Yml0QmAtarLMShla3a+Qh885WGamHd0pug1pJP6D13b6Kst0skRFdkVDY6liW0ymWI r35wcyhnVjBlIW8+NcjhhinaNGhLtZOucb56HxVWv7DkJSFk/UNOKbIxPiyDPps4CpN+5O 3VepaODcooVrc3ShWA4Q13wXz94yL/cCWRlnHMdGt1wGlEa/2WYWPRl0meNQri2bhg/fsU QOG3lMqylWKAYmnt79R/p1huQofgTjeCnfoOXIy5CBdRcZ9M7i864DKcaahBdSFHRDEqn+ up0hK01dNlEgKBhFhTztMzivKw7rV1DXpSktcz45NBru7qvJmE7BDMv+8LNCqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412211; a=rsa-sha256; cv=none; b=ygyD8K41R554RW+8M//b8kOKePRRdm+UOBqj4zJuVkD5efCTW3UhkImXAM5tyqTd2P5MCO Kwl9oL1VJ4iuuMq/kiFW8wxKG1S5hpb1esHCpiNnFRrwtWLFqNZxi0gsCWSGsfPR1kMYjM Q6FXmaxdkKLKxHXwaeOFWGGUoIC3PKxL8GRpfL1v4GV2do3NofRRDVk93v537I1o4429kN M9UhjCortNza1XxszYwXjKl79ZezqC+8xVKL2x3xj4ioxq07a1FPXaupTmdjjpU9sekbH/ 3A3pCYT5p6efVFzUUAVt398n5CUuYXhdnU/yOmkJRLOHQfXOMxGR77BGR+4q4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=634tumq4TSBj7HVLcw+yOmpfCRd27Me+9lrfhrkkH1Q=; b=SBsuqURthFkUHmy6cLDskgzIibsygA8cn0HJqhhuHcsMndl5YjOCi2lT4yW7sB1JRKBatx B3YU1o4tUqB9wI7741Nl5TpzgzfES2h66GrzoJxe2ph6wElwKIi+CqAvEajn4hLdVEna2T YDBj3OjbEQ58Yg3I97wiGf2ePgcoxPdmeOyYgry/POQkcbV/DYyvhkXqqPOFQtVytt+cQg o0EmGjfsUDpf0/qoAuLo+kLUmL6mWH/DmUR++0X1NjZbk6Z8qgNWA61rQJpf/lc1sAq72D 8vgxaVq9HE60gcuc4gwxgyTUfE1Z3QYeymtwX6p6liH2pLB6kg7226S7hSeSvw== 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 4Vl3q75ztWzLqg; Wed, 22 May 2024 21:10:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MLABag088534; Wed, 22 May 2024 21:10:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MLABdN088529; Wed, 22 May 2024 21:10:11 GMT (envelope-from git) Date: Wed, 22 May 2024 21:10:11 GMT Message-Id: <202405222110.44MLABdN088529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 58e44aa01101 - main - Fix typo List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 58e44aa01101d420c9d7021a788b6074b7183286 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=58e44aa01101d420c9d7021a788b6074b7183286 commit 58e44aa01101d420c9d7021a788b6074b7183286 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-22 21:05:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 21:10:09 +0000 Fix typo ioclt -> ioctl. <blush> Fixes: 08b452033834 Noticed by: Thomas Mueller and John W. De Boskey Pointy hat to: imp Sponsored by: Netflix --- share/man/man4/sg.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/sg.4 b/share/man/man4/sg.4 index bf7cb93cfb09..ac549452cc93 100644 --- a/share/man/man4/sg.4 +++ b/share/man/man4/sg.4 @@ -8,7 +8,7 @@ .Os .Sh NAME .Nm sg -.Nd Linux ioclt-compatible SCSI passthru device +.Nd Linux ioctl-compatible SCSI passthru device .Sh SYNOPSIS .Cd device sg .Cd device scbus From nobody Wed May 22 21:11:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3r439sbz5L1Z7; Wed, 22 May 2024 21:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3r42kw9z4JX8; Wed, 22 May 2024 21:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hgbWhybwHRMelHo0DOlxBVzHIHATGc8MJkZv+jR+QTM=; b=l8MYWJBNFObpuUS1+GCtsZTwThWWyxApTQ+sd6NA0UebjDxYiXkB0TBF6p23B0DmAAe4Ht tVfOhzRVH275y8gZVnuyUTGyOp0iWU3MmxBPjsTMPqOZ9oI9o6/GxgQR3n9dJTEQHA7ApA zPJRlI/5U7E0dfOkeyY/784/KZOxsrE8dP0VRLDKEDpckJ9KLhWTYWC7bd49jIjRuguTI/ uD84XtAsbtTA9B3Ot7deg8xgsO8+sP3eUrTIgjRLMqeFAmRQ6DpVcPYUJbppRiGT57oe/w JjsbwkerywFudR9QhHMdYvdIZAGG4uShiIrJ02cpvLanumUxjrDITFAly5xdiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412260; a=rsa-sha256; cv=none; b=PPvIeHx4/nU9IQyRT4oWwkDQXByzLLc++8gDWtUEzMj1NrfnO8v2NSReRqvfiuWvyK+UIa DgkIeaG7utddVd3LYfWPKj7MLowPntM3TX3Q/wTiWY/HBuKQB2m+MbB08j7bUAnMZTcShw 5aO8Yxe50hgdcebRAkM9SQv2yuvHJObDS/CdR+5vjq2UzgyB6ar9IF6YE/BkDnPAoveZy0 O0wTwxKlHEgBx6zsIwqj8zN2AdORkIXwBa91VeYX7EvnUcuJnvq0QpZLiVb1VlT9W1g2N0 kc9uCiZ3QsTbAb5jCunD5bWnfotTnbLMsNrzm29332ZcsvD8XOegz4CQPhaw7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hgbWhybwHRMelHo0DOlxBVzHIHATGc8MJkZv+jR+QTM=; b=LRLt3fM0QIK9iBR2DA+3bYltI/Hxrqq9huoszhpwjhuIPWXZsQ7by2uO6WAcsNOKLa9fq1 kGOkjBbvYlmjr+2x/m3l/vdIhDfX0oLRky273TNiS6VqA38UAVH4sP6ucJAKFVa1JFeQq+ QsKM93Lf5JcnaJX75bSvEtt7wC8xC7x/VW1QpfrD2o6/WR6RT9T/erUfD8R/bT17huf3AA foGF89gI0kFz73URgPgmTwiw95ZQzI11tqMB3t4orveChwHBW5L6eQXkeN2IwjlEnyBYNQ MpxZkNkf60pVG+xpRTF7S01I2po9bV/9S01omPrN+2etI5sBZ6cmlhl2oSMVaw== 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 4Vl3r423SxzLYy; Wed, 22 May 2024 21:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MLB0bg094221; Wed, 22 May 2024 21:11:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MLB0GY094218; Wed, 22 May 2024 21:11:00 GMT (envelope-from git) Date: Wed, 22 May 2024 21:11:00 GMT Message-Id: <202405222111.44MLB0GY094218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 6a61917a4b64 - stable/14 - sg: Add sg(4) man page List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a61917a4b641c2e3ebba19bd13a0e5472b6885f Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6a61917a4b641c2e3ebba19bd13a0e5472b6885f commit 6a61917a4b641c2e3ebba19bd13a0e5472b6885f Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-06 22:28:09 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 21:10:51 +0000 sg: Add sg(4) man page Add minimal sg(4) manual page. This implements a subset of the Linux IOCTL interface for either native FreeBSD programs, or for Linux binaries in the linuxulator. Noticed by: Lexi Winter Sponsored by: Netflix (cherry picked from commit 08b4520338349bc065ec184b32a6e700cb8e34ec) --- share/man/man4/Makefile | 1 + share/man/man4/sg.4 | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 222422526180..a97c92b960f5 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -492,6 +492,7 @@ MAN= aac.4 \ send.4 \ ses.4 \ ${_sfxge.4} \ + sg.4 \ sge.4 \ siba.4 \ siftr.4 \ diff --git a/share/man/man4/sg.4 b/share/man/man4/sg.4 new file mode 100644 index 000000000000..bf7cb93cfb09 --- /dev/null +++ b/share/man/man4/sg.4 @@ -0,0 +1,63 @@ +.\" +.\" Copyright (c) 2024 Netflix, Inc. +.\" +.\" SPDX-License-Expression: BSD-2-Clause +.\" +.Dd May 6, 2024 +.Dt SG 4 +.Os +.Sh NAME +.Nm sg +.Nd Linux ioclt-compatible SCSI passthru device +.Sh SYNOPSIS +.Cd device sg +.Cd device scbus +.Sh DESCRIPTION +The +.Nm +driver provides a Linux compatible scsi passthru device. +This driver attaches to all +.Xr cam 4 +peripheral devices. +It is similar to the +.Xr pass 4 +device, but uses the Linux interfaces, rather than the FreeBSD CAM interfaces. +.Sh IOCTL +The following subset of the Linux sg ioctl interfaces are implemented: +.Bl -tag -width 12 +.It Va SG_SET_TIMEOUT +.Fa u_int to +Set the timeout in milliseconds. +.It Va SG_GET_TIMEOUT +Get the timeout in milliseconds +.It Va SG_GET_RESERVED_SIZE +.Fa u_int +Returns the size of the I/O one can do this device. +.It Va SG_GET_SCSI_ID +.Fa struct sg_scsi_id +Returns the bus number, channel, scsi bus ID number, lun and other information +about the SCSI device. +.It Va SG_GET_SG_TABLESIZE +.Fa u_int +Returns the table size, though hard wired to 0. +.It Va SG_GET_VERSION_NUM +.Fa u_int +Return the version number that is implemented. +.It Va SG_IO +.Fa struct sg_io_hdr +.El +All other ioctl interfaces return +.Va ENODEV . +.Sh FILES +.Bl -tag -width ".Pa /dev/sg*" -compact +.It Pa /dev/sg* +Passthru devices. +.El +.Sh SEE ALSO +.Xr cam 4 , +.Xr pass 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 7.0 . From nobody Wed May 22 21:11:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl3r53qXTz5L1TV; Wed, 22 May 2024 21:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl3r535pxz4Jhv; Wed, 22 May 2024 21:11:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RlwUok2uRqPkOGa1yVzCctM10mKDlKnssCoWkG6ofyQ=; b=CmJ1h8NDt6RJcz5WZnGLrjYtYO/KDJ/7wDFLjmlvd3QsnjgXTsNf4Cwz/xYCZ+C0cNhnb7 M11p4zRnMn5tQBxr9XmhtJHNIN4Do0vZh3euhs0L3KHeoTSMhY3gfSQvwheB5nSivToE1O vlUc8TRoMgW0I6JwNVaA9zZapKzbjSDzlD1/dhIBjCf9vDS4a/mJmL/HNNGtZtioM8GetZ vxq/W1J6DCTHIjFe9CwUV+OdFj6IByYLlBaHSZBZk7yMDcyG4d9itWp0yvQIriA0h2ZWLf tspoEaMKgPBMc25sLzl93+KGI5UlyqQ5wG/S0nQ+yXWU3n0T2k179uG4CQAxiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716412261; a=rsa-sha256; cv=none; b=xN/jICT4n73Z9uqTg0Hh0ecV2ka1Vk95DCQKjx2EPnSa6R4Ftsw0sbV4wAM0OZt8unthFT 5DL3HDq69WIPMSyeYlRhhr1Oykci+NM7q9T26IYbLgf8vkP2I3XXeXeKeeTKbBpiO//4fz WvPFEobXH4HW2qMAtJX7Y6esB9g5r5ARb6mVCqlvqP5cYnL9IyiurAppdU6YFiN4WnKIv6 21h8Lbdu5L0qFnP/W2fNNS2hkltcH4AMmcWfWgCy3VEJPgVEAePEVYKZGSGY8kpzfMk/gq brVtETqZ2tVz9jY/X2crwjP7dhmJgEwOAeHomWjullssIykX/SLCt0Td/RiMNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716412261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RlwUok2uRqPkOGa1yVzCctM10mKDlKnssCoWkG6ofyQ=; b=EZZm9JVGFLT40uE424OHd/ZtumCrBJlgaY2cLED/sBEHBjJlwjWypwBIMxO7OJezWo3sM4 TWJ8DxeKN1IC0qnqvPG/i9KM32JvXBM/iPqWrV2IV7V9aHMPalF6V8IA2RuIjM2gqx/bB+ 8nMD0GIE8Xa+xZxTFOafB5wLhoBW6juHeH/GJ3MkXnlVEVX6dpLgBbJYN+n3XQKVsMOkjl 6m+Gzz1ZmBioEeiP5ItIXdtsbYvOcNJpQYcQmNXyWmMbkUqQX3nC9GeOp1Juqwayzk8sCQ ZustErUgizU6ozkpcYuuSoBrF6JUwIcn9MnORDiyUMVu0TihKkNjpLd+djwt3w== 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 4Vl3r52bQwzLZ1; Wed, 22 May 2024 21:11:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MLB1Gm095360; Wed, 22 May 2024 21:11:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MLB1G4095346; Wed, 22 May 2024 21:11:01 GMT (envelope-from git) Date: Wed, 22 May 2024 21:11:01 GMT Message-Id: <202405222111.44MLB1G4095346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 23989c61c39a - stable/14 - Fix typo List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 23989c61c39a10fbacbd17a977b628b3ceb714d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=23989c61c39a10fbacbd17a977b628b3ceb714d1 commit 23989c61c39a10fbacbd17a977b628b3ceb714d1 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-22 21:05:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 21:10:51 +0000 Fix typo ioclt -> ioctl. <blush> Fixes: 08b452033834 Noticed by: Thomas Mueller and John W. De Boskey Pointy hat to: imp Sponsored by: Netflix (cherry picked from commit 58e44aa01101d420c9d7021a788b6074b7183286) --- share/man/man4/sg.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/sg.4 b/share/man/man4/sg.4 index bf7cb93cfb09..ac549452cc93 100644 --- a/share/man/man4/sg.4 +++ b/share/man/man4/sg.4 @@ -8,7 +8,7 @@ .Os .Sh NAME .Nm sg -.Nd Linux ioclt-compatible SCSI passthru device +.Nd Linux ioctl-compatible SCSI passthru device .Sh SYNOPSIS .Cd device sg .Cd device scbus From nobody Wed May 22 21:30:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl4G6374hz5L3CK; Wed, 22 May 2024 21:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl4G61sL1z4LkT; Wed, 22 May 2024 21:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716413406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hS4u9pZREYIm12DIcVvG6sA5+R6cCjfs14/3jaiXU6Q=; b=dLE56t7qvidkVGmwXnkh1z1A3HmB0dJdc/0nbKovtJPeBUW2BNl1+x0KW60oYE7L32XI7i VHJpeRU6V+GKJQBBfJsSFguAejY/1o5kn3D5JD2DJWPtZDigQR93cciY8YCmSPmQJeLEdN 5Gh9KAXoGqaboCeUXaLazTpG83hUfBXK5n3lV+OnD63tcxmF7YgtL5hnj8PoKW3JhvGhYL btqr+bpq7tWnv9W1C1qDe9FSVTJf8phyTHV6jDgspjePJH5STvVV5yrL/9gRpFmoI19tOk DEY+LMPLsQhthWdCQuyoFGSIi852w6cCYx3lOu0p3wwnvW55qojaRieGPaNZpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716413406; a=rsa-sha256; cv=none; b=B0egM13JaGoOOEY9tLXKMgaLyiPPYagLHWJKflcQ8mwg0PHeMgvkL4gEs5yWk1Aok45yhD ubwlvOYJ8f41si6Pblwy2o9bDwHo6aY5gqE1yaOJxLJi57dSa5Zc54u19Bz1XWcWCp6/Xx ky0OLkOolyZxFqSFI7RfVQwyK4G63Fbw7zk8LSVi+i7VzGTvS6FLb6tQNxnSXxdbMaxZWw /zMELhWMqPHp8S4OBIdhLOiCUZJcMo2pcnBgiUcDcDsntbFF8Hd8OioT/FMCU3FlbtGUu5 IEdvFgw0/GnaHywV5fh5Rmu3TYFL1J18I3GD1OexP8SD0aRyko2D7nQKu1L2TQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716413406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hS4u9pZREYIm12DIcVvG6sA5+R6cCjfs14/3jaiXU6Q=; b=HLFwRU7EZKo123yolKttnmz1EDemC7cL1XgNvhvnNSNCMl+RryovVR9OBwlorTEs34WwUl WaQ54d6ZLu6sCW3H1GOV6y+mkaXsjkn+Bxlsd+jFbezjbYL9kumMQmtP1mBDrqp+x5sIG0 CM5xj+2rUJV+aEiWAML8jred1sGd9CSyZxkOEP7aF/9Fx0EDkKNXt/2ydkd2ubj7299UiR /cDHgG48IR4D+FhdDy5cj/KLGXvdPANjD24Xq4AbmDgrsYJ8kJAINWd9h8rSxipilbHwnq L/uE3GNlCVbKt0xwpU55nPYpbbjECbAD+3ogixjpHcrxZA/G539jibjrtEUycg== 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 4Vl4G61Lm9zMCG; Wed, 22 May 2024 21:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MLU65d019680; Wed, 22 May 2024 21:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MLU67p019675; Wed, 22 May 2024 21:30:06 GMT (envelope-from git) Date: Wed, 22 May 2024 21:30:06 GMT Message-Id: <202405222130.44MLU67p019675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: e85f2ed0950a - stable/14 - mtree: Add missing directories generated by certctl List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e85f2ed0950ae81fa0343103c5ba8fe88e7d204d Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e85f2ed0950ae81fa0343103c5ba8fe88e7d204d commit e85f2ed0950ae81fa0343103c5ba8fe88e7d204d Author: Jose Luis Duran <jlduran@gmail.com> AuthorDate: 2023-12-28 05:26:23 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 21:29:19 +0000 mtree: Add missing directories generated by certctl PR: 255639 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/912 (cherry picked from commit 5b7f73ce16cbd3704b21943ebe6b489b2bc2de1f) --- etc/mtree/BSD.root.dist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index c6b73e648209..a85ce552589c 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -94,6 +94,10 @@ ssh .. ssl + certs + .. + untrusted + .. .. sysctl.kld.d .. From nobody Wed May 22 22:11:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl59j5tfJz5L6vb; Wed, 22 May 2024 22:11:21 +0000 (UTC) (envelope-from jhb@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl59j5Nzdz4QYV; Wed, 22 May 2024 22:11:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716415881; h=from:from:reply-to:subject: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=mqqsY36mTXOls3vfPYpN1yF1EmfUYwFRyPn1z1M7Vfg=; b=kCpnGnaJ5v7F/Dl49RMpj3/eTj55NysOhwgBpUbrtHDi6KdZr1K2gnXuxhwJFTxN1wO1I8 GWzDAvgjhJw0DvnpPYei/ePc8CBvPSEvhAufKSAsVMRb8Aat/Tfg8LNpbyOvpWIas5kNTg kme8Om1vlVWViEVn/16hcGcLaXOwEHcYi2/HuewOqJflWsqKAbW9Axpe3/tbdYHSrISkgu YDpvRWcNxT0LD9nLqsfO+ebxlkYwOaR9QCBp8hH/1f336UnZQHzFji0Ae8ZvVGp4IyCEJW JChm9q3KpxATkf9LXAfWPQEnbxH8EnjL7mfeS+44z34hF9rAOwZFhRjgyL/oLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716415881; a=rsa-sha256; cv=none; b=aBZsqDPq+Fyu3sb8ugGssQfIiyq4pxqZx3FWlDqcjGv5LiqqUD1ZxNZQVKIK7WfRjjo7Zw dRF7aKHLMAMGD1kPbrrU/zqru/0MF/hhr0blnK8ZEqGCbAM0qJmgHr4YoNa3YK6rKs73GQ QXo0HuL43qibKg7EHFQb1TN+4pR3ODKoaDKtgMn6de88FUxhlux4suOPWabjqV0Dwmofz4 KvIcX1VdFu7xoWeQmL0e4mvfNbK0CDnFaz8JHZ3MqSGFfR6On7kA/6ubxasPC8f/t31Xl7 /bDdqam+spDT6twgkNIptbOvwGyHOgNwhyDdNWkCM31GQDicQSbUwmQ+QCv+UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716415881; h=from:from:reply-to:subject: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=mqqsY36mTXOls3vfPYpN1yF1EmfUYwFRyPn1z1M7Vfg=; b=WIXhIXt30zUuWqSL6iJTtH1mnKaSLjHHheUgGWW3+FxpQSb7PeeIkpA9377W70VpG2/rM4 ZzjMU/EfFk7uqfP0fpTlE4pxhBQTKZWVzLHjgdf/iFkii6SB1TpIhEC5aL0iAZakb++Ug2 LMHPXesAmowuygjVlNqi/nDCondpOssDVoBIZOsIlK6VNpcu7jlS8t/qo3IRWQfbG1+bOd k0+hKIBqRMh7VY4/hYkYHcjaHXcJiRQE6Nt38L/UZwHCSi23qlEZmlExMguezLbHlMgNgK tc5E7phjaEaOHl48Mc+kv7XiqvRXvMZrMw94rDdp6//UFL0qn+1C0hW2R3ElBA== Received: from [IPV6:2601:644:937f:4c50:b136:2176:fd7d:9c11] (unknown [IPv6:2601:644:937f:4c50:b136:2176:fd7d:9c11]) (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: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vl59j1qN5z185h; Wed, 22 May 2024 22:11:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <6d6df2f4-547e-48bf-a99f-a26859c5c51f@FreeBSD.org> Date: Wed, 22 May 2024 15:11:19 -0700 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 0c3ade2cf13d - main - nextboot: fix nextboot -k on ZFS Content-Language: en-US To: Gleb Smirnoff <glebius@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202402200354.41K3sPeT025629@gitrepo.freebsd.org> From: John Baldwin <jhb@FreeBSD.org> In-Reply-To: <202402200354.41K3sPeT025629@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/19/24 7:54 PM, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0c3ade2cf13df1ed5cd9db4081137ec90fcd19d0 > > commit 0c3ade2cf13df1ed5cd9db4081137ec90fcd19d0 > Author: Gleb Smirnoff <glebius@FreeBSD.org> > AuthorDate: 2024-02-20 03:51:22 +0000 > Commit: Gleb Smirnoff <glebius@FreeBSD.org> > CommitDate: 2024-02-20 03:51:22 +0000 > > nextboot: fix nextboot -k on ZFS > > zfsbootcfg(1) expects pool name to operate on, not currently mounted > filesystem name. > > Fixes: fd6d47375a78fbf0737012b7cc11180291781e8b > --- > sbin/reboot/reboot.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c > index 7ea4d50eaf74..ac3927cc2432 100644 > --- a/sbin/reboot/reboot.c > +++ b/sbin/reboot/reboot.c > @@ -130,6 +130,11 @@ write_nextboot(const char *fn, const char *env, bool force) > } > > if (zfs) { > + char *slash; > + > + if ((slash = strchr(sfs.f_mntfromname, '/')) == NULL) > + E("Can't find ZFS pool name in %s", sfs.f_mntfromname); > + *slash = '\0'; > zfsbootcfg(sfs.f_mntfromname, force); This broke nextboot -k on my systems using ZFS (was working fine prior to this commit): # nextboot -k test nextboot: Can't find ZFS pool name in head: No error: 0 # zpool list NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT head 79.5G 36.2G 43.3G - - 41% 45% 1.00x ONLINE - # zfs list NAME USED AVAIL REFER MOUNTPOINT head 36.2G 40.8G 2.16G legacy head/public 1.13G 40.8G 1.13G legacy head/tmp 836M 40.8G 836M legacy head/usr 28.3G 40.8G 2.34G legacy head/usr/local 534M 40.8G 534M legacy head/usr/obj 21.4G 40.8G 21.4G legacy head/usr/ports 23K 40.8G 23K legacy head/usr/src 4.00G 40.8G 4.00G legacy head/var 3.83G 40.8G 266M legacy head/var/crash 3.57G 40.8G 3.57G legacy head/var/tmp 23K 40.8G 23K legacy I think we should just punt on the error and pass the entire string again if slash is NULL. I'll test this locally and put it in a review if it works. -- John Baldwin From nobody Wed May 22 22:13:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5DR4fG0z5L7Ts; Wed, 22 May 2024 22:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl5DR467fz4Ql3; Wed, 22 May 2024 22:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKdALu2qbWuQsfc2cBrwYot3kb/QA+kkhBsIyOKRBxc=; b=thlFpjy80gQlES7LWpKC5I2ep9P5t/8xLcSiU9Y4cv9qv8GOjqSgcxKrDOAIb4+j02rbbp r4+NUXeAPFcNSF2qQ8x1awCX89XBChA/nfRrT4p70LXbvKFPfp6yfAYfbJMcstUVmTNsFu FpwJp/QhTP4zIWs4t2BHJ3Alm6ct1X4iaBM9FTOA9MAhFzg/O1xXfu0cIQkXxNUVT4fGNG Ujp7GK/BVtssX82WiMrSbDVVQEcEppy3d6Q7YDtg9Ppnl31Urb4Za2IaY5U3oYFSb3kHPC eC4JJr/FjaozPAmaqEIzeOz/LgRml5W1KnfN+x0CEyZChHRq8pzIJ6nxhfNPaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416023; a=rsa-sha256; cv=none; b=qZzXuzw2ucAkVJ95trkBHcDVnFmahlqmNFnzVN9zKccBmX06Aqe99hlQNrPkY44ZzHjcc6 ujGHapIxg+P1y1lTO3Y+ar0scvtGwjv0swSx5aOw0o2NiPh0a1AyClWOxpQVwEWRXxi+1e 9cYxc1TrK4CYMMn9pD3jmxho4msqSsUJMywTR4jrKfFUzxXBiiK5sxpKgIEAgoRf/hX86A yeSSwEOe2S7bHq68C/ekJoFgBk4ND51dBqXXsaH4bGul+pmMuzGREDgfXRoyehebIwgGo8 1HCP4wWcue6GMOv6WOKwGD1UdUwi7qHeGrKXFxhsu30PsL+1fniQGNDjtIxqYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKdALu2qbWuQsfc2cBrwYot3kb/QA+kkhBsIyOKRBxc=; b=B7/+RZSh3+G0Hd+vBZuBrhi7AQmb59ri9fHHt/Ths3KwyGwYjgXGQBZ/8oZO7kB+0QPr/E 7fKZf2K0En6fuhFm3dJmlXbXqGFbfHRYcOLM2MysW1PZVgRcF2bMSBz2IfhpHP/TcRL22u lip5MP2Z8EEs1Z2r/DjSOx1I8SnvN5jjkQBIKdxkxxW71NA5jOrXoPJsUn/hNdttK9FVIn LGUh2159cCHS1S6h8prqmqIBemFlHumtrI3S5XQFIgHpzLUBIyjyMJt59SkQ21LxO6Dw41 LPI/7TqTirOVfx0Nh8rWlYsZdjYwrO/pGqlhIqn64z9Hf2qeevG2cHFWkJUkyw== 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 4Vl5DR3jk1zNVB; Wed, 22 May 2024 22:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MMDh9a000737; Wed, 22 May 2024 22:13:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMDhpM000734; Wed, 22 May 2024 22:13:43 GMT (envelope-from git) Date: Wed, 22 May 2024 22:13:43 GMT Message-Id: <202405222213.44MMDhpM000734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 63f18b37e01e - main - mqueuefs: minor style pass List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 63f18b37e01ef214de762a091d3c98ae5028c8f4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=63f18b37e01ef214de762a091d3c98ae5028c8f4 commit 63f18b37e01ef214de762a091d3c98ae5028c8f4 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-22 02:52:47 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 22:13:29 +0000 mqueuefs: minor style pass Also remove not needed inclusion of sys/cdefs.h. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/uipc_mqueue.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 6400f0bce9f9..d842aff8fdc9 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -50,7 +50,6 @@ * use the IPC facility without having to mount mqueue file system. */ -#include <sys/cdefs.h> #include "opt_capsicum.h" #include <sys/param.h> @@ -379,7 +378,7 @@ mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn) static __inline struct mqfs_node * mqnode_alloc(void) { - return uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO); + return (uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO)); } static __inline void @@ -451,8 +450,8 @@ mqfs_create_node(const char *name, int namelen, struct ucred *cred, int mode, node->mn_type = nodetype; node->mn_refcount = 1; vfs_timestamp(&node->mn_birth); - node->mn_ctime = node->mn_atime = node->mn_mtime - = node->mn_birth; + node->mn_ctime = node->mn_atime = node->mn_mtime = + node->mn_birth; node->mn_uid = cred->cr_uid; node->mn_gid = cred->cr_gid; node->mn_mode = mode; @@ -1017,8 +1016,8 @@ mqfs_create(struct vop_create_args *ap) /* * Remove an entry */ -static -int do_unlink(struct mqfs_node *pn, struct ucred *ucred) +static int +do_unlink(struct mqfs_node *pn, struct ucred *ucred) { struct mqfs_node *parent; struct mqfs_vdata *vd; @@ -1244,15 +1243,15 @@ mqfs_setattr(struct vop_setattr_args *ap) td = curthread; vap = ap->a_vap; vp = ap->a_vp; - if ((vap->va_type != VNON) || - (vap->va_nlink != VNOVAL) || - (vap->va_fsid != VNOVAL) || - (vap->va_fileid != VNOVAL) || - (vap->va_blocksize != VNOVAL) || + if (vap->va_type != VNON || + vap->va_nlink != VNOVAL || + vap->va_fsid != VNOVAL || + vap->va_fileid != VNOVAL || + vap->va_blocksize != VNOVAL || (vap->va_flags != VNOVAL && vap->va_flags != 0) || - (vap->va_rdev != VNOVAL) || - ((int)vap->va_bytes != VNOVAL) || - (vap->va_gen != VNOVAL)) { + vap->va_rdev != VNOVAL || + (int)vap->va_bytes != VNOVAL || + vap->va_gen != VNOVAL) { return (EINVAL); } @@ -1281,7 +1280,7 @@ mqfs_setattr(struct vop_setattr_args *ap) * check in VOP_ACCESS() be enough? Also, are the group bits * below definitely right? */ - if (((ap->a_cred->cr_uid != pn->mn_uid) || uid != pn->mn_uid || + if ((ap->a_cred->cr_uid != pn->mn_uid || uid != pn->mn_uid || (gid != pn->mn_gid && !groupmember(gid, ap->a_cred))) && (error = priv_check(td, PRIV_MQ_ADMIN)) != 0) return (error); @@ -1291,7 +1290,7 @@ mqfs_setattr(struct vop_setattr_args *ap) } if (vap->va_mode != (mode_t)VNOVAL) { - if ((ap->a_cred->cr_uid != pn->mn_uid) && + if (ap->a_cred->cr_uid != pn->mn_uid && (error = priv_check(td, PRIV_MQ_ADMIN))) return (error); pn->mn_mode = vap->va_mode; @@ -1345,11 +1344,11 @@ mqfs_read(struct vop_read_args *ap) mq = VTOMQ(vp); snprintf(buf, sizeof(buf), - "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", - mq->mq_totalbytes, - mq->mq_maxmsg, - mq->mq_curmsgs, - mq->mq_msgsize); + "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", + mq->mq_totalbytes, + mq->mq_maxmsg, + mq->mq_curmsgs, + mq->mq_msgsize); buf[sizeof(buf)-1] = '\0'; len = strlen(buf); error = uiomove_frombuf(buf, len, uio); @@ -2014,7 +2013,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, AUDIT_ARG_MODE(mode); pdp = td->td_proc->p_pd; - cmode = (((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT); + cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT; mq = NULL; if ((flags & O_CREAT) != 0 && attr != NULL) { if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > maxmsg) @@ -2809,7 +2808,7 @@ freebsd32_kmq_timedsend(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error); @@ -2840,7 +2839,7 @@ freebsd32_kmq_timedreceive(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error); From nobody Wed May 22 22:13:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5DT04cfz5L7Jv; Wed, 22 May 2024 22:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl5DS59tfz4Qvx; Wed, 22 May 2024 22:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ipyL2aHEcinl9oUogMkemM245Nx01VFlRlwdmIXNncI=; b=BSsApBhuiA+EshlSnRR5qVSWEW8MKCHnjpIoEIo+UtVyixAH9iLYWUDF3tuFNgMB0qfnS8 qFQuoouXI0EyXK7up/IxPvW/8v7eNViLbI2CM/OyU5GcHzQ6EWwiwCYCXiO2AIwOXnB2vH Ma+K7+HseeVvt17sBJc0VlXI8kdOChaZX1ITGy1p3512Xj9mVDLVtG7Eew9zXeYjSchnXB w+u6BBdLoRfU1T8fRU7oIW9b4yeZi5fr6nfHMVd5Tq30U9URW8A3IXRSoD/Qzj2QJvLhST 0G5L+I+XXiDcLkArwh2SCRtG864TyPf8unZ+dQ+PUuOKq45eg90Tgjh1e2DYhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416024; a=rsa-sha256; cv=none; b=FEmG+eb/Dla7DyaSh52AqTryZhGFhve0CTTU/PM9p5zaVYj+eeCqREIvnPpRM9VPETr/UO IFf4Euj7K75fKG1Kd4Miz8ZRslEvno8cErHox7B699HsqtoNbrUQBOZklFnxcAbJI3gLcw 4Xl3chcPdRu5Jgvwbsa0gzVLiuJQiHnSBWp552Rj/Z+WB7igwTtVv7ZgGsZlmgbU15zkbW 2LXF9YMAri8QV5h5tmA+voF3Hmf7P0z4B6vj1GbNRjiW0fF7PeVkAYhvxLU48u5XpcnHH6 6BYd3O2BRDzwviTS5tEMGLfB7dvoCANwiwL0Jdw1eryYzcDL1xYWxf0m9vL2SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ipyL2aHEcinl9oUogMkemM245Nx01VFlRlwdmIXNncI=; b=ap2ZRavf/ztmWzdxEdww2q0jv9oaz5TxxMWfGmh1w8VAvXrZQ6YZql/Rm03KgU4SkFVPbk K9DI/jNf2tfAJGSMwP/PGeNhRXrW1VRzvFihJM67fl4XmVt0EHnntTiut/8AABcFPuI/5J vmNUoj2KkjuaREF7iBE5ecWTttSKbK05yGmTrlU9vzi8Mz1czJh8lppDkqv9vs4Er8rBCk ja8kzsWtvXe92rEzvmyIjwXQg/eQ/2QGSsRGVbHMPQRjh8YL2GEgngIKCrQmdln1YvxAak U5NGvXqDKlWxO2UtCN67WtTeivUqEyM8KXmpZIQW8Sl0Gvmun270a93mXdAyig== 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 4Vl5DS4msRzNrc; Wed, 22 May 2024 22:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MMDiMW000797; Wed, 22 May 2024 22:13:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMDiBi000794; Wed, 22 May 2024 22:13:44 GMT (envelope-from git) Date: Wed, 22 May 2024 22:13:44 GMT Message-Id: <202405222213.44MMDiBi000794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: b6f4a3fa75d2 - main - mqueuefs: uma_zfree() can be postponed until mqfs sx mi_lock is dropped List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b6f4a3fa75d24637b4d81035655fcb3d3ea187ad Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b6f4a3fa75d24637b4d81035655fcb3d3ea187ad commit b6f4a3fa75d24637b4d81035655fcb3d3ea187ad Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-22 01:46:28 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 22:13:29 +0000 mqueuefs: uma_zfree() can be postponed until mqfs sx mi_lock is dropped Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/uipc_mqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index d842aff8fdc9..6f8fbaacdfb4 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -1109,9 +1109,9 @@ mqfs_reclaim(struct vop_reclaim_args *ap) sx_xlock(&mqfs->mi_lock); vp->v_data = NULL; LIST_REMOVE(vd, mv_link); - uma_zfree(mvdata_zone, vd); mqnode_release(pn); sx_xunlock(&mqfs->mi_lock); + uma_zfree(mvdata_zone, vd); return (0); } From nobody Wed May 22 22:13:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5DT6ysFz5L7ZR; Wed, 22 May 2024 22:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl5DT5rP5z4R5v; Wed, 22 May 2024 22:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeLSlpZNi8twWHo3Usl52MeZRtOAtbwATMOg5RZyVRA=; b=e64MEe6eQnUKJ48n8Eze6TlewrkR34GUUF7+s+GTEjs8vBxkxosffwngAglAEtFEeXYBio XAwIs/NdfnNpOM85Jd/DvEiNY9d4ewvCtVEI57z6xHyBzrNgEwu/UI30QsLM5zG1tHKpn2 ePWJ5urEXEkY9laUuoulc9crLmJ4/DGQBG7LcQLnvJ6TU3/YIhKf7mNH5chQEz76PaBOtR G5ankln1/HEGX6WAi17JfneqVzLe69Sq6xVv/rpFsgUDp3oNEMKPeoNgl7/ihDcNp2ExHS Q+e/v4JyMd5z5hyuu/JOtaskBwoZYxvbYq43xgrhTHbUZDyw99JQajWZ1p9r6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416025; a=rsa-sha256; cv=none; b=AdK4cnn2+aly2l8UnQlrV7Iw+lBtftnNXz79kLkrvaGZbgQuuBImpkZwU/3Z7pwVBxszKJ az5zCpjBvvaATc/WKN7YR8AhJuy7hwoaTbHf5H0HreGEfS+vjzU1abVHoxCeoJXDy4elWQ v4iPEaETtB4v1YNSL1uzjuHn1XExJOa/h//SDjFoc8YOoUVX0EaJW4BZJyc7nl5l/Vtp+D DCy/nLI9KMhJhrXFLSLwxNj94tpfrZ2sbsvp07w+HarEKWdWguuWjpEnlvOs57XT3RjHJF zhaDDOKIQxDIxsGbsZVj6MiobwLqeuHDcYrHEcdNOWKR7fbDISEPVKCPJ7jCDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeLSlpZNi8twWHo3Usl52MeZRtOAtbwATMOg5RZyVRA=; b=sJiz1xgKlIH7Jyx+x5jDkxtmURo62QNodYW3tSoKfuEDXMR3KNNUTdlCC9hF+1AqKz2CX7 Z3TXnajjl3gvbT5H+wY1oDrFsC5pS3knCw2R3+NhqN6BGvA1L4q1WQCtiJavPDtia3U52p UP9q1d60T5Saz3Ze7tVEdrSnRlQa88s5skgYi1+A9d1UiK5/6tN001yrc2O7gRnOdCcmJ1 fAm+wfqoZteQAo60o8ZB+59mE5TITrR0UTZN3v8zC0FxqPuxliIK9AZlsDx1JF3hNF60Ro Eep/B3fzOxUgJOH0etrQwvIEPui9jag+gWfQYjV5DYlW6LaHZzvxwWmkau2Fvg== 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 4Vl5DT5RsyzNVC; Wed, 22 May 2024 22:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MMDjpV000854; Wed, 22 May 2024 22:13:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMDj8e000851; Wed, 22 May 2024 22:13:45 GMT (envelope-from git) Date: Wed, 22 May 2024 22:13:45 GMT Message-Id: <202405222213.44MMDj8e000851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: f0a4dd6d46e9 - main - mqueuefs: mark newly allocated vnode as constructed, under the lock List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4 commit f0a4dd6d46e99d47fde12aabdaa52e75b59e95f4 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-22 02:39:59 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 22:13:29 +0000 mqueuefs: mark newly allocated vnode as constructed, under the lock Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/uipc_mqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 6f8fbaacdfb4..7779d8877337 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -811,6 +811,7 @@ found: panic("%s has unexpected type: %d", pn->mn_name, pn->mn_type); } sx_xunlock(&mqfs->mi_lock); + vn_set_state(*vpp, VSTATE_CONSTRUCTED); return (0); } From nobody Wed May 22 22:21:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5P14nmfz5L7nr; Wed, 22 May 2024 22:21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl5P14K0nz4SSC; Wed, 22 May 2024 22:21:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0b2spurlChCOfn3decoT3RsNG52+lm11bDGMKZ1eJVI=; b=ySSShagYDEdvPMBO5gar+2FuhXCRdNg7G4NLshSHNu1sbcB7DN/E4HAg3BCzC+6giRUADT r/VckjQlmqkdxx+BnsooaHB4SGuFGJ6j+oLtMjyLQErLfrhIXNW8Wh1hy5VxO5/8h0BKzU 17T4ZBGXNSYYmFL/sg5gUYMMejb/Or5Ot1FahEzmkD/fjHYFW8eajM5QhSPFFZSnizD4rA xb0eSwhZrjGbJdj/rK7Cu9ZE3j8ESmS7GE77wjWgNGs+YsoKDt1jF/UC3XY3TnxEZ4PZvy 1/EclPxRn/lvbG0AgQSRYFYBU+ztu8IbYclO3JH2iS5bwBtb7UYfTV1PvxY+iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416469; a=rsa-sha256; cv=none; b=NRBZtBerzAF2KSjwxMkET/So865maU5s6ReMFo21Q/h87QvrSpmpsPTGaa/m8DZxaYAIE6 jdCU8/+rt+M6Xmaa23jrcKD1lMuQfq5UlON1j51Zk3Wok5eqSAa6cXsM1GlFPqI/lOe83m 8nkEyTyUg9IwlGf1uV81R4a5QLa7gvQsmVkzYsrMYLMEHjla/7v+EkLLMHUzTxO8/p3Ela X+Q/ojRfwCBWH0Gk52f1ibBzwcdXdenRLWSOLTJNxERf4wmhqYVyHGGZnHxZ7XSK7zLCt0 i8qt1cdl24kIlEFIfOMzVYEsV0TaZB1dDUH+2ddbgdeJC18IELakBU1nxkbNLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0b2spurlChCOfn3decoT3RsNG52+lm11bDGMKZ1eJVI=; b=Cg0cIiR0WQ/NdpUsvBqEf+FLS05w2IHK8FlGzGwmW9un3xzOnze5DhkS/Ym8o9sfd24vKI NErf80FWXGjkVw+3NJkRwE+G77OxuHJT5Cdlsg17jk+ksK7LxWDCAF5Yq6sGxVr1KAsTL+ emzC3PCjrG0ZpoeKhC6R7rP8ahq00LMzNby3BrDPBJKOGXeZlCkOeG1QMd6fXXcTABb46E 341LqFbv5BhDig+UqgsSQBroP1DeYumcl23M0WHzw3GbMuUxpmqmYKgh7UGofQzag4U0e7 dQmCkEpNmePd3Gg8iop8MvZiEQkJ9AYVXGnFNDUoNjaBoTsXsUWum3z2CvwzdA== 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 4Vl5P13x3czNs3; Wed, 22 May 2024 22:21:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MML9YI015591; Wed, 22 May 2024 22:21:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MML9is015588; Wed, 22 May 2024 22:21:09 GMT (envelope-from git) Date: Wed, 22 May 2024 22:21:09 GMT Message-Id: <202405222221.44MML9is015588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 93ad59a25189 - main - snd_hda: Add patch for Asus UX331UAL List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 93ad59a251897431627345c287390ae134925a95 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=93ad59a251897431627345c287390ae134925a95 commit 93ad59a251897431627345c287390ae134925a95 Author: Lutz Bichler <Lutz.Bichler@gmail.com> AuthorDate: 2024-05-22 22:19:50 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-22 22:19:50 +0000 snd_hda: Add patch for Asus UX331UAL PR: 242802 MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D45238 --- sys/dev/sound/pci/hda/hdaa_patches.c | 11 +++++++++++ sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 12 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 9f3532562252..d425e3c0080b 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -359,6 +359,17 @@ hdac_pin_patch(struct hdaa_widget *w) patch_str = "as=4 seq=15"; break; } + } else if (id == HDA_CODEC_ALC294 && + subid == ASUS_UX331_SUBVENDOR) { + switch (nid) { + case 25: + /* XXX You are not expected to understand this. */ + config = 0x01a1103c; + break; + case 33: + patch_str = "as=1 seq=15"; + break; + } } else { /* * loop over hdaa_model_pin_patch diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 6a3314280a22..6b6bc58a4818 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -332,6 +332,7 @@ #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) #define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) +#define ASUS_UX331_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x14de) #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) #define ASUS_GL553VE_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x15e0) #define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) From nobody Wed May 22 22:24:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl5Sg1P4lz5L8NF; Wed, 22 May 2024 22:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl5Sg0sTPz4TNk; Wed, 22 May 2024 22:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9vzXEiCrlS1RfKxij4v/RMpV3CFsDZ4Ra3BAUoy79s=; b=kuMTjNGJkD8QG6eTgR4yOyJNItxKcRrZd6t+9o+hazlB7pwO1jZEVy1bbo6zvs3pT+g8dP MU/TbKwcRfuecSMImtKb3/dt5f8sr39gdjCXHbLI8+mgoMuRqw0lDaAglv+U0UrY3W5Ndg iwOsD+wVGmoKHf9HLGwtnMbBMrPq02DoHIgEwi/DQhI/g6hMBqA5NpcM6J52aCrXasa9NI mRHSP/uC2RNprFyAypii2LI9/wgUJ/4nfSEIqi8icI2M+MH+4Zdp97gaH4QZ4InNRJHZxH zF9B18xoyMzeaFg6yOexJ/EXZTrw7fddGbwDobmiDKongPn5LNR7yA+cck9JDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716416659; a=rsa-sha256; cv=none; b=VGZtjsrgMrTgRkDvQ9XUSt2I3IQ052JLAHOHXSCaKgWmhE+xstiJwGTY5vbwOvpvUHhtmY ZIX+Jf8Sm8+Z75HICNmGoXOoa3HCVMZIheZz0hkzK6ot1CEA97phX04ytC0ETUHVoRtWBN AKVXbO7x+vaNaJEhQ8oqYHfwGtL15mm056uMbqCLs5Qe+SFKalHXEHy5Mpzveg6V3bopjw v2yBD+MsdAhEbAU3T/O5wKt2IIMfKvFVOiMW7whJ2KMOenvQNC3F76Et9JbldTRUZ8cajw 1PPDs4lF5acCQQRL8lpkZqDrc2bD605ahGRI03lZqtypmrp3UlH748HHlRL1sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716416659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h9vzXEiCrlS1RfKxij4v/RMpV3CFsDZ4Ra3BAUoy79s=; b=nfUM/EJ5ikNtB8vOPr90EilQkJ512Yw6kCanUL6qZAlto6CQ3bHriNgWI5x7jmG3o7oe++ 775a7kYPLri6jAezF2t1zbj5sYYaOIYRxonIGYjuv05aqRzCgMxeyy6Bj0bKQU2NJK+wQq DZiY8u3eiKbEOKqFssXCQNUAhvQPxlCQnUmxrxAr+KpvonafRiJ7Zbps/M9CAc6kXw+n5i kprxppnh/w8mPC1vdkOPN7FUHS6iCCHJNvKRaD2H8Vnd6lEfhX2RPJlIGHZJeAp49WE9/i /DFvXByXUYe+sr8Rj8FNPTiq8U4MkFJGvVreEOCL0PVVqy+3/oj3MFMixGskTQ== 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 4Vl5Sg0MMxzNf1; Wed, 22 May 2024 22:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MMOIvW018163; Wed, 22 May 2024 22:24:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MMOIqc018160; Wed, 22 May 2024 22:24:18 GMT (envelope-from git) Date: Wed, 22 May 2024 22:24:18 GMT Message-Id: <202405222224.44MMOIqc018160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 1e84b85aad10 - main - geom: Remove sysctl.h List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1e84b85aad10e7f83ef89bc1c13e251d3ac48ccc Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e84b85aad10e7f83ef89bc1c13e251d3ac48ccc commit 1e84b85aad10e7f83ef89bc1c13e251d3ac48ccc Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-22 22:23:45 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-22 22:24:11 +0000 geom: Remove sysctl.h These files don't need sysctl.h, so remove it. Sponsored by: Netflix --- sys/geom/geom_slice.c | 1 - sys/geom/geom_subr.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 3803697e8481..0839bc213817 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -40,7 +40,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/bio.h> -#include <sys/sysctl.h> #include <sys/proc.h> #include <sys/lock.h> #include <sys/mutex.h> diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 3fef8a918530..4e2c122ef6dd 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -44,7 +44,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/bio.h> -#include <sys/sysctl.h> #include <sys/proc.h> #include <sys/kthread.h> #include <sys/lock.h> From nobody Wed May 22 23:02:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl6JC6fp2z5LCNt; Wed, 22 May 2024 23:02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl6JC5qMgz4XR8; Wed, 22 May 2024 23:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716418923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8lybhmjlD3UPDNHphrjKA7qeS4s8DZKJ9DDbRWknGc=; b=biuSRbVlfMGS4dVZ4d0befgdl1mcl7ocUFYpMIE8CCoIKmwBRI+slcqgt9RAQUUqRcCoR8 etmHogMKR3vu0BPXIkcamGoPZyK8C/8nsRFWDz4GznY0eER9WFxXJ3U2q6I3FAjXVyZaZ1 JCH2c8zBGS2/sUDKQKBdlvRsIhdAWwX/yWvnV9SuT7nRR6/rtOxprCsL0NiVevTQIPLP7z MDfDd+Tiobn89Y5IyB5FJY4OkVOz07fmCj84eOvEKqAH+d6oK+eRZ9KzQC42tt9mim0LKz V+oJ8KYgi+RMtRWnZN6NBw9uT6QvoHhJfRplcjk3pL5TC/Nw73rErY/32owTiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716418923; a=rsa-sha256; cv=none; b=q2D9hVA2EOmtVMA+O0lwFdP3AIUn9yKG16Qp7OyvF7HMunyssX1jysZOybNpn9WmKRmynM MdXHV9nfRXZlQ7683nsAwAdLoxUZCe3HKSXegh4FCplrpHt5eTrsjHbo4Fywky1xuOWthR K8ok4JfNNYw10f8QetUP8cJhdaOHupjIaZpnanhaR/REYj0WYYSSSTV5MZSghSYa5rDJn9 9OCa/9BDUld/SnABDxxyDP8cmNOMEc1da8JBUVtDLBlz0x3maynNBq8SwLNLu83wJczj+/ z0wGaQJgyTncBo+d2Y1w/w4MyuiJMgiFdUCYXwnvX5RXyy11zyJMBDAvDkbSPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716418923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f8lybhmjlD3UPDNHphrjKA7qeS4s8DZKJ9DDbRWknGc=; b=RuUeiXkcAB6cvHbhuU+l2C0vMCi8YAkV3JMNyKlW76V9jretdIukCo5OWwhg/3Lwobx/hm iwm79hhUZDRHctS01UPMVH/nom+IGg3WHbou6Qr4fYjR4loLqBgjpZAPq9oAD/ufd8LFUO WvTkM8hTX7DPjyxd+AN1VsO/8Va1M78PPfYMxKGQaebk16jnczvNdPwF+5Ns824qc7sqER W5ULQJ90qk9C46YWt+ine1uPdw+xUffxvc0CWIS5ckF5q/h4rWSbtJRYz8iNqEpHBxecZG PBcSjZbOA0DcQ470/KOvOOupYTQ/iVn5x/Hif9DXlVn7b73NQPPmpZLUiGA8DA== 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 4Vl6JC5RQFzPDg; Wed, 22 May 2024 23:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MN23Dh085356; Wed, 22 May 2024 23:02:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MN236A085353; Wed, 22 May 2024 23:02:03 GMT (envelope-from git) Date: Wed, 22 May 2024 23:02:03 GMT Message-Id: <202405222302.44MN236A085353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang <zlei@FreeBSD.org> Subject: git: 34db75d21876 - releng/14.1 - if_vxlan(4): Add checking for loops and nesting of tunnels List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 34db75d21876ae406ff57fdc594f151fc4214109 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=34db75d21876ae406ff57fdc594f151fc4214109 commit 34db75d21876ae406ff57fdc594f151fc4214109 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-05-20 12:14:07 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-05-22 23:00:03 +0000 if_vxlan(4): Add checking for loops and nesting of tunnels User misconfiguration, either tunnel loops, or a large number of different nested tunnels, can overflow the kernel stack. Prevent that by using if_tunnel_check_nesting(). PR: 278394 Diagnosed by: markj Reviewed by: kp Approved by: re (cperciva) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45197 (cherry picked from commit 93fbfef0b50354b7a1620822454ef29cd415cb2d) (cherry picked from commit 3ebd2b1c730834123a53b3eddcf9029fcf414782) --- sys/net/if_vxlan.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index e6949bb5dc9a..87648abd116b 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -433,6 +433,21 @@ TUNABLE_INT("net.link.vxlan.legacy_port", &vxlan_legacy_port); static int vxlan_reuse_port = 0; TUNABLE_INT("net.link.vxlan.reuse_port", &vxlan_reuse_port); +/* + * This macro controls the default upper limitation on nesting of vxlan + * tunnels. By default it is 3, as the overhead of IPv6 vxlan tunnel is 70 + * bytes, this will create at most 210 bytes overhead and the most inner + * tunnel's MTU will be 1290 which will meet IPv6 minimum MTU size 1280. + * Be careful to configure the tunnels when raising the limit. A large + * number of nested tunnels can introduce system crash. + */ +#ifndef MAX_VXLAN_NEST +#define MAX_VXLAN_NEST 3 +#endif +static int max_vxlan_nesting = MAX_VXLAN_NEST; +SYSCTL_INT(_net_link_vxlan, OID_AUTO, max_nesting, CTLFLAG_RW, + &max_vxlan_nesting, 0, "Max nested tunnels"); + /* Default maximum number of addresses in the forwarding table. */ #ifndef VXLAN_FTABLE_MAX #define VXLAN_FTABLE_MAX 2000 @@ -2722,6 +2737,7 @@ vxlan_encap6(struct vxlan_softc *sc, const union vxlan_sockaddr *fvxlsa, #endif } +#define MTAG_VXLAN_LOOP 0x7876706c /* vxlp */ static int vxlan_transmit(struct ifnet *ifp, struct mbuf *m) { @@ -2747,6 +2763,13 @@ vxlan_transmit(struct ifnet *ifp, struct mbuf *m) m_freem(m); return (ENETDOWN); } + if (__predict_false(if_tunnel_check_nesting(ifp, m, MTAG_VXLAN_LOOP, + max_vxlan_nesting) != 0)) { + VXLAN_RUNLOCK(sc, &tracker); + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (ELOOP); + } if ((m->m_flags & (M_BCAST | M_MCAST)) == 0) fe = vxlan_ftable_entry_lookup(sc, eh->ether_dhost); From nobody Wed May 22 23:47:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl7K80NZFz5LH7K; Wed, 22 May 2024 23:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl7K76pzpz4c9P; Wed, 22 May 2024 23:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716421676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jl8jCJxvW1GZprG8JrBTQFDCk5Pc4/OlaHxPzlCBEk4=; b=JQKftniYEqbTpZczM71YvS5Y+rmAaMJFeguYvQYiEpphE58ysytntDpZ6YXxBgbWaa8+kZ BaeoRPQ0PlHRGIxGJvdaN1zio+YXLCBWmFqxQ/Rgnl+0D2LVFmbTxEoXpazb+0YiUDo1WP LiF2aFh3LakBTMFbISMY5mgPmYvceTSZMRkQSA6cOrE2f+rgcISSQsAgtn+w06wMZAw89G YOIuwHl8gTa+5ksrQd7LDPh0cE+3O/PnZ7iu/ksJxCKqV1GxBAmBMKYWdcO6zhCI4lzzHE dvVFno1yHCXF44wGR1NBZgucoz71K6OQTM6vVFxHSjxvkHvB+tps9hzrR9A+Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716421676; a=rsa-sha256; cv=none; b=Z6NV+tgwklRDZh1smQ28Rpm7rQK0znIW+wv1OLXlCdwyscmp9rQ18HYsEaPSHFa35V59Zx F1mB9WWSsqKgqYuINd1PXtxng+2BSKDzROkQc3/lep6x+vca3FmyBkSaGn5CZIPBA1vzLp lNPc+4a7UOeTvZNPJbbfAfcNEy5Fb2OUi8uUqtQ0ir/8kVch+Hp6FgAS9uW6xNxSaIdsay rMb+45Y+anwDwFSJwPKY23N4wMYws9dyKDuxo4jQ4NHbl4Sa+Q7LvAQUcWW6vP7gcvmLAP 5ti7/3KdI1ekk8iHPp0HIybRB4/p9GxHoA45bzW17XAq2IGaR/IMgya3kw/7fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716421676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jl8jCJxvW1GZprG8JrBTQFDCk5Pc4/OlaHxPzlCBEk4=; b=osRyoZ0Py5BKdo3KPHSGRk/mlP1sekz8hkeZvHW1vR/7o8+2WuQz9CqFEoiWMyBqOb+/3A gW1bKCTP34Kwh8KMU78hxjOa0BeI3ARx1SRftR0ERfxXOK9CucAtyD0bv/22/uR0tIqU4V 0YxZGvSntY+7IbgsRVr0GQMh/Vd0qTBKZ152PQe07/9ouhS6kBeU9xV5XIlL53RbUY7E+I po4/HuPULO+JtRXr9a8xqddISHM6VsYDhRSUwd9NtswoJ1+Ns6m5OaCCmWr37dxgnDXXsU oZCG9zQKbItAX42vDhxk+H7JRhWYkqdkaF8lEV32DE7iOI9/KqR0EK8hWstq4w== 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 4Vl7K764FtzQQ1; Wed, 22 May 2024 23:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44MNltIF052788; Wed, 22 May 2024 23:47:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44MNltPr052785; Wed, 22 May 2024 23:47:55 GMT (envelope-from git) Date: Wed, 22 May 2024 23:47:55 GMT Message-Id: <202405222347.44MNltPr052785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: cd73b38955f6 - stable/13 - killpg(): more carefully avoid LoR List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: cd73b38955f62d9c05ded8e641a7462ca0f06179 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cd73b38955f62d9c05ded8e641a7462ca0f06179 commit cd73b38955f62d9c05ded8e641a7462ca0f06179 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-07-07 17:19:33 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 23:47:23 +0000 killpg(): more carefully avoid LoR (cherry picked from commit 7a70f17ac4bd64dc1a5020f963ba4380cf37b7e5) --- sys/kern/kern_proc.c | 15 +++++++++++++-- sys/kern/kern_prot.c | 6 ++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 23d2856a3d32..28c1dd90e685 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -587,8 +587,12 @@ enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess) ("enterpgrp: session leader attempted setpgrp")); old_pgrp = p->p_pgrp; - if (!sx_try_xlock(&old_pgrp->pg_killsx)) + if (!sx_try_xlock(&old_pgrp->pg_killsx)) { + sx_xunlock(&proctree_lock); + sx_xlock(&old_pgrp->pg_killsx); + sx_xunlock(&old_pgrp->pg_killsx); return (ERESTART); + } MPASS(old_pgrp == p->p_pgrp); if (sess != NULL) { @@ -656,11 +660,18 @@ enterthispgrp(struct proc *p, struct pgrp *pgrp) ("%s: p %p belongs to pgrp %p", __func__, p, pgrp)); old_pgrp = p->p_pgrp; - if (!sx_try_xlock(&old_pgrp->pg_killsx)) + if (!sx_try_xlock(&old_pgrp->pg_killsx)) { + sx_xunlock(&proctree_lock); + sx_xlock(&old_pgrp->pg_killsx); + sx_xunlock(&old_pgrp->pg_killsx); return (ERESTART); + } MPASS(old_pgrp == p->p_pgrp); if (!sx_try_xlock(&pgrp->pg_killsx)) { sx_xunlock(&old_pgrp->pg_killsx); + sx_xunlock(&proctree_lock); + sx_xlock(&pgrp->pg_killsx); + sx_xunlock(&pgrp->pg_killsx); return (ERESTART); } diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index a91b7ec3015f..5dea43971e3d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -345,10 +345,8 @@ again: error = EPERM; } else { error = enterpgrp(p, p->p_pid, newpgrp, newsess); - if (error == ERESTART) { - sx_xunlock(&proctree_lock); + if (error == ERESTART) goto again; - } MPASS(error == 0); td->td_retval[0] = p->p_pid; newpgrp = NULL; @@ -458,11 +456,11 @@ again: error = enterthispgrp(targp, pgrp); } done: - sx_xunlock(&proctree_lock); KASSERT(error == 0 || newpgrp != NULL, ("setpgid failed and newpgrp is NULL")); if (error == ERESTART) goto again; + sx_xunlock(&proctree_lock); uma_zfree(pgrp_zone, newpgrp); return (error); } From nobody Thu May 23 00:24:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl87H03D7z5LLHY; Thu, 23 May 2024 00:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl87G6BHXz4fmC; Thu, 23 May 2024 00:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716423866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wlA8156E7XW3A98b3pUQ3Ywtip+nNE0jAPi+1W9U+ys=; b=Ha4uQBc8dZZa0J9Kk52gOMXdEJCaySOJ0WpV+Gxp0XISC00B3B3dvzpGpN9Fuo2hz6cWvq 15Ge+WpLN4+aX6bP81FkAsr3LGJhA1h3GBFG+a3N6XNelB9ulHUBvXxN/aYRoxPmPgdg61 Ey0iDUALFAmu8PqG28rxHOV/WZIstfmduGyFrsBxifu/H1DU4RuAINWU/SD0zIqDlcpU8s 6HkA5A7+zuNUAWlAhv6RXv6wb2GYpxc3Rwz9e5e2azIST6Kt085t6G/vRyB2nNz/FRlCwQ Ljr8Q1xSCJ7SBvj1hz3xW53hPgiVArWM9GjTQ42tTb1ng+61OqDxaIh8syaK+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716423866; a=rsa-sha256; cv=none; b=QkQYALveBe9qHKcBj7AtuG1Y1Ic/TMXDwlviAaXKKvIWGvWo3CsuRefnIxbloNxxFQo54d HsYOxoWOniB2Wynm7PPvCKouoxd0ehZYJiM8/DXWTyGvkShhfRpClYvJlFDYTcRt7p2W7m gScTwNAb6oRP+IASsqmb63omrX2C85aRAlQY4UXatUFSnS/JxAqpLz3Ym7mozPl4FTiTw0 W8flJ8a7x9aKmFSuIU4BGJexmGGtuGOMRc849NuI1EEzIwU9FhOkcWc0dLG1yKylkerxv0 pl72iJeoSG3FAJv0aD1pb1CAXo7X8DYF9rmKDzpc8gEwaQgrZnHaikIV8xQ3kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716423866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wlA8156E7XW3A98b3pUQ3Ywtip+nNE0jAPi+1W9U+ys=; b=UtwSOFoouDygKe4y4YApDMRcqgl3OHAZz1QrkTTSRbMMJWrqGk1h1EW92/XheP62sCMig8 GF/vz40sFVnN+gMVrvVTiKi/MB8axmQ2Cgb4nr2lEwELLt57Us+piuhqUPeawgz5APrG4/ 1mELdD0qCmrDymIHPwdIm0ITq4E9qJKwMBCYrTuAhux+eYkV+y6tCEj7mTlphB5fSPMXMw vQItyYrPxvem0GuzbRP8RcOcM6Qjn0ZP9M5INRk9oOnWMwYYSPYD2MyQsDo/MINuWAADUN hkpSSg6aD6DawsY8HJnEaAORQ61DnxXvn+1ImcVZ+JCmT+fmdkFPFAD7qooYbw== 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 4Vl87G5n8kzRC9; Thu, 23 May 2024 00:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0OQhF020038; Thu, 23 May 2024 00:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0OQng020035; Thu, 23 May 2024 00:24:26 GMT (envelope-from git) Date: Thu, 23 May 2024 00:24:26 GMT Message-Id: <202405230024.44N0OQng020035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 1fb0a65ab2dd - stable/14 - snd_hda: Add patch for Asus UX331UAL List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1fb0a65ab2dd7f6fb5dfcac2d78b6dcb6e3c6c9e Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1fb0a65ab2dd7f6fb5dfcac2d78b6dcb6e3c6c9e commit 1fb0a65ab2dd7f6fb5dfcac2d78b6dcb6e3c6c9e Author: Lutz Bichler <Lutz.Bichler@gmail.com> AuthorDate: 2024-05-22 22:19:50 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:24:15 +0000 snd_hda: Add patch for Asus UX331UAL PR: 242802 MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D45238 (cherry picked from commit 93ad59a251897431627345c287390ae134925a95) --- sys/dev/sound/pci/hda/hdaa_patches.c | 11 +++++++++++ sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 12 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 9f3532562252..d425e3c0080b 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -359,6 +359,17 @@ hdac_pin_patch(struct hdaa_widget *w) patch_str = "as=4 seq=15"; break; } + } else if (id == HDA_CODEC_ALC294 && + subid == ASUS_UX331_SUBVENDOR) { + switch (nid) { + case 25: + /* XXX You are not expected to understand this. */ + config = 0x01a1103c; + break; + case 33: + patch_str = "as=1 seq=15"; + break; + } } else { /* * loop over hdaa_model_pin_patch diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 6a3314280a22..6b6bc58a4818 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -332,6 +332,7 @@ #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) #define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) +#define ASUS_UX331_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x14de) #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) #define ASUS_GL553VE_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x15e0) #define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) From nobody Thu May 23 00:27:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8BP5xD5z5LLL5; Thu, 23 May 2024 00:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8BP5Nflz4gCq; Thu, 23 May 2024 00:27:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7hzKJtyyaZp1+/ksN+a2TwrVnid7KEHWmGrb9sETs8=; b=ZpGF/W7hhcryoNyi21cG2glfja7w+ePaiaSoDaV8x/CSqbqt3wJRs4iA0RKnYHMIKas56z 74YuumAZeNX9mYuQENo0EDddDY9p697pciJH3B8RIgU3HZpVfMi1I40RjVHcbXVPDT8a5r JVuuT2awvH6JP3ZArdI9tytZINFcMsCC7RGAwGv3uwK442SlknbVSxucZADqmpbAJN7pFG ZXQDP4IuTrsYY6oibYCoGp/4BGIKURiyfmkfp6oG6zs9J3ZtgR1jQ95kpfPkcuPgP9nSsy vI9V1HyBrWgtd0CPclRuNfY3r12uC7cBgzXCQ2teIaScRt2X9+eaOKLv61fYOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424029; a=rsa-sha256; cv=none; b=A3da8UaluXJSaGYlZ46HEZeb/1tPJ6pXtKmdrqUnWrWsescWJVGbcSeYhjavIKxMg6CN9Z PpfPY0Eq5FPmssduf77F+giOYKoWX5vNF7TrudVk0EImFNtLUDWILWWI0CLuA7Gp5rksbe yXD8uK4eiLnJCMBSAZJmTmuSSSpCjFgJuD2+ErORllKGpvbXdnSZZocrDqknFFeYtbTGgl cgYbyqJPbI8qi1BELFfe0IQOiLpOgFQxijN8y9whEXxPbJE09UiVKHi9JE54Lh8CN3CplF bga5U0516iZH10/PwtHZ2uC0z+JL0LLVOrIT8tz65zb6CXp2Un+43GKV4WgKrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7hzKJtyyaZp1+/ksN+a2TwrVnid7KEHWmGrb9sETs8=; b=eI9s1/Ueh3IEvBOgOoA2eFP/zM+M0HiipGsYd70q22uB2hfl1wnf05LjRsZYB/fJrdEnSp l6jLR6ubu2daQFsHyGXhG6GlTlOxG95ajRLNR6HmUuvTAkqm74fh8//Z5j5xi1WvyyqAoh rjIyGesB4bmX0UJgX97X9sGCF/KfeW3ybZFDKvx1G0l/Fl6bAPaCbTP25yZWbhhMzzJzuH WjOn1NOJqIYAIVkQ2uZgdrx3uvq1wWS7xSkGScri1XOynOnbv1z9/X6A0aDGzdPacKz1BJ C5et0krihvqGRyb7d7fuKbtCHsDz6BcN9pUpdowW1WopTelEVN7F40sLLviFDQ== 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 4Vl8BP4zSmzQxX; Thu, 23 May 2024 00:27:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0R96S020599; Thu, 23 May 2024 00:27:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0R9Ib020596; Thu, 23 May 2024 00:27:09 GMT (envelope-from git) Date: Thu, 23 May 2024 00:27:09 GMT Message-Id: <202405230027.44N0R9Ib020596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 625a622cc651 - stable/14 - vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 625a622cc6511e250470ee3f84a8553c7c734de6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=625a622cc6511e250470ee3f84a8553c7c734de6 commit 625a622cc6511e250470ee3f84a8553c7c734de6 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-15 09:54:49 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-23 00:26:43 +0000 vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done PR: 265311 (cherry picked from commit 21ccdb4119afdfdfeaa80e9c8514171c65b35862) --- sys/kern/vfs_mount.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 9289c35e4f86..206618b4ac6b 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1314,7 +1314,7 @@ vfs_domount_update( void *bufp; struct mount *mp; int error, export_error, i, len, fsid_up_len; - uint64_t flag; + uint64_t flag, mnt_union; gid_t *grps; fsid_t *fsid_up; bool vfs_suser_failed; @@ -1396,6 +1396,7 @@ vfs_domount_update( vfs_deleteopt(*optlist, "fsid"); } + mnt_union = 0; MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { MNT_IUNLOCK(mp); @@ -1417,6 +1418,11 @@ vfs_domount_update( mp->mnt_flag |= MNT_UPDATE; } else { mp->mnt_flag &= ~MNT_UPDATEMASK; + if ((mp->mnt_flag & MNT_UNION) == 0 && + (fsflags & MNT_UNION) != 0) { + fsflags &= ~MNT_UNION; + mnt_union = MNT_UNION; + } mp->mnt_flag |= fsflags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE | MNT_SNAPSHOT | MNT_ROOTFS | MNT_UPDATEMASK | MNT_RDONLY); if ((mp->mnt_flag & MNT_ASYNC) == 0) @@ -1520,6 +1526,7 @@ vfs_domount_update( if (error == 0) { mp->mnt_flag &= ~(MNT_UPDATE | MNT_RELOAD | MNT_FORCE | MNT_SNAPSHOT); + mp->mnt_flag |= mnt_union; } else { /* * If we fail, restore old mount flags. MNT_QUOTA is special, From nobody Thu May 23 00:27:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8BQ6x1Tz5LLSD; Thu, 23 May 2024 00:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8BQ6PlHz4g5L; Thu, 23 May 2024 00:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bAuUlS9a/YjjBgknCIN8gpwhUaDVbe6cURsiMjQDEN8=; b=yHdePxjf7kbN/yEDZEqBWBQBt6lliSEavyWjUCTcKlf4l74GVJy0ZJU7ZBvjhmVwluKmlc OqhCrx24Gmk59EcF1lM00056fDGzG+IE6doGqL5LzJCyNRyauesjlCZv2B+KtKdmy+1lmu 8TOlZVoCKkVpmaAqwvCjJj0GhDtohd5UF9lLeHGJPA06Gl0iLwb464PMYqMRLJej1lnHxU BTm8+E/jb5Ty/HgQ4qa0AaKYb7Ul3elhD+OFJ5JisMyMOL1J5ZN3s3DdyPFADf8LHSB9c8 jov2ugyUAW9zZ73sC1GEGkaNKNIdHHnNV3UTT+07lhGorm4fiCppRA9YERWJug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424030; a=rsa-sha256; cv=none; b=QAxSe3DdpCZTMATfmH0gVA7gs9RVqUGYEkHCQgRPnkEUMShlFhjRCf2ntpQph43it8rN/D 4dxxf8yccdXEt0yt+UxJ3YrwqzCWLtMC1fTJyjWOToJoe+teya4mKzZDU7Zxxj9gVZ8ZNF qNwuVvkb42g5WdVpO7lCyEGGrgpmg77z0YEX5cdRheECMmu2WtqAkymNMmUSwWLESGBKFq mJtU9clGOhtzqPsnJrjCUToi6u8H5s0sLEBQDkFYmkDPrccCcuikiGQh96i6idkKfkTu93 sx1XeePfZYY5q461ktRv8bMfOlHDwzmxmTjfcful3xbs5lOQghIE3alhfkYYnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bAuUlS9a/YjjBgknCIN8gpwhUaDVbe6cURsiMjQDEN8=; b=cLzMX5nz9Fk9SYLA5SveEOJ/cEdduh/J1kOqbm707acEYcL8BT+Gr0yMJY1WgslEglPaVt GYDH0uSzqYTbSNFEuXA+caCgPjWedqo3Tr2C6Q6Yk6Ji+m2CUxzaICPyGW8+GD4P8YQ9GH JRQHgEARBxfGAFzjj+9RGjcNOlheAzd6+TaM42yHviSzn6MronMkBKUhG5Ig7gWRLvHbXf hV2RQl58LcMwA6z2/Xppp/CkrEadAk7qvFhUEKZYsKv0dge09y4+fhoE9ZHBOw/Nc9l+sX 07+hzOOGYCimDorXWN8BuJtfVJxNZEm8F2D39g6ctut5QbGb/+c7wQpw8Tk47g== 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 4Vl8BQ608kzRhT; Thu, 23 May 2024 00:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0RA4v020647; Thu, 23 May 2024 00:27:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0RAZr020644; Thu, 23 May 2024 00:27:10 GMT (envelope-from git) Date: Thu, 23 May 2024 00:27:10 GMT Message-Id: <202405230027.44N0RAZr020644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: afb68a177420 - stable/14 - SysV SHM: move SHMSEG constants to sys/shm.h List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: afb68a1774206059cf31cbae8269c9453669febd Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=afb68a1774206059cf31cbae8269c9453669febd commit afb68a1774206059cf31cbae8269c9453669febd Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-16 15:24:00 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-23 00:26:44 +0000 SysV SHM: move SHMSEG constants to sys/shm.h (cherry picked from commit 53725168e1b631be0e60f888ba5e63e140b57766) --- sys/kern/sysv_shm.c | 4 ---- sys/sys/shm.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 2529a9eeb1a7..8f67cb63f33c 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -109,10 +109,6 @@ FEATURE(sysv_shm, "System V shared memory segments support"); static MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments"); -#define SHMSEG_FREE 0x0200 -#define SHMSEG_REMOVED 0x0400 -#define SHMSEG_ALLOCATED 0x0800 - static int shm_last_free, shm_nused, shmalloced; vm_size_t shm_committed; static struct shmid_kernel *shmsegs; diff --git a/sys/sys/shm.h b/sys/sys/shm.h index 0b5cba0120e5..9c6dad5d43cc 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -152,6 +152,10 @@ struct vmspace; extern struct shminfo shminfo; +#define SHMSEG_FREE 0x0200 +#define SHMSEG_REMOVED 0x0400 +#define SHMSEG_ALLOCATED 0x0800 + void shmexit(struct vmspace *); void shmfork(struct proc *, struct proc *); From nobody Thu May 23 00:27:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8BS0g0gz5LLSF; Thu, 23 May 2024 00:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8BS05GRz4gFq; Thu, 23 May 2024 00:27:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7RUFn7EQI4JlcIAwPBKCEN8Imr04m233Qpv3OzMEnBA=; b=L3KGa+n6nvHv6P29Gdvae0osgmZy19kgoNqkQ5J4KwfIkzqAkisdRkfFQMzYH/mGra9UL0 fCXUdyZ77EDLI9ntbb1Ia8C8xSlX9I6lOAMRMA7w8rljIbLxVuNmG/isMvP0f147MIdKpo PesvMnE6pf0lbXwO7pRtYVW9yi4Huh9eC09EqLAeWzQYCr3FaoHb2yjffI78msK9nt7TtR sLBt6BZcFzWF8HP1fGXFiEaGsR1IeGqaTbYap3/MfMa9PhF7nG0XMhvLyRbjz/SHECNFeB HbO5qJhs7bOM9YN9slEcQTNP02MxgRV60eAV02A8oBvb2QOrpSqdecaagV36BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424032; a=rsa-sha256; cv=none; b=QzU5INBMT6CIqr+mwhvZ4ef5LxzZZqThz+5IKyDVlzc+sFYh7ZFLAMtuZC8FfDpD4IDw9J 2j0655LzRUOqiDA4EAQNcR6J4qgGsOLTveOusa7lozATIMIedS9XiZYmSYvZNQA/ljLPAc qg43mUdXX5Cs1+3x1sJgqPoE1WmF1ZJ9yWDJZWUJ4CM3JlYQBlVP2ST3HPUAzFeYNzCYB+ 9PPyFnVNyW21Ye8q3sjsN6XTloNRHmeYhI7acY3u+ExdFM+NaV5fgNJqshUcwPaDq3/wHq vYJxyBdvbSXwHZeo/M8GBc8C9TuABWDaQZIfS2PMeNAPB2PIwhgOTm6vYE579w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7RUFn7EQI4JlcIAwPBKCEN8Imr04m233Qpv3OzMEnBA=; b=nvgxULW7xw0MBNq8dyh5F8zbjzUK6GNQAva3FmMaRELUR2SUP0D9xFAhEpy9Ga2lWbpq5p Ibo9JflTBF403lDMcp3CspiDbOvHpHC75m4ZwpPhSGqn6nhDlrPiA72qENK5CSmF0L4nKf AMtH4oXq1hesihlQ48OWvwacJ5Umk+oFvCH0GQRyS5YNG0MNXAys4sU+2PySFQwM2Hk3Sl IhJ8qJRecxHO1nki41RHYWO/nq30VOx2MTlJNbwm22Z5jSQ7qPY33A8tdTYGQj6V+Au3HG 9dr+WCjcM2vz9C0/c7HFMMlkPzuVtZ6Csq98J1VaedpZlB3m9E3DnE0Hc/RpQA== 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 4Vl8BR6nGNzS64; Thu, 23 May 2024 00:27:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0RBHh020701; Thu, 23 May 2024 00:27:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0RBoO020698; Thu, 23 May 2024 00:27:11 GMT (envelope-from git) Date: Thu, 23 May 2024 00:27:11 GMT Message-Id: <202405230027.44N0RBoO020698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: b76674a73988 - stable/14 - SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b76674a73988eb708bdb53e11c5c54e8488b33a1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b76674a73988eb708bdb53e11c5c54e8488b33a1 commit b76674a73988eb708bdb53e11c5c54e8488b33a1 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-13 17:17:47 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-23 00:26:44 +0000 SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information PR: 278949 (cherry picked from commit 87a156527563d0728bff355093e26943da3d7fad) --- sys/kern/sysv_msg.c | 34 ++++++++++++++++++++++++++++++++++ sys/kern/sysv_sem.c | 33 +++++++++++++++++++++++++++++++++ sys/kern/sysv_shm.c | 36 ++++++++++++++++++++++++++++++++++++ sys/sys/msg.h | 3 +++ sys/sys/sem.h | 3 +++ sys/sys/shm.h | 2 ++ 6 files changed, 111 insertions(+) diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 078151627dfc..0620fbd175af 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1477,6 +1477,40 @@ sysctl_msqids(SYSCTL_HANDLER_ARGS) return (error); } +int +kern_get_msqids(struct thread *td, struct msqid_kernel **res, size_t *sz) +{ + struct msqid_kernel *pmsqk; + struct prison *pr, *rpr; + int i, mi; + + *sz = mi = msginfo.msgmni; + if (res == NULL) + return (0); + + pr = td->td_ucred->cr_prison; + rpr = msg_find_prison(td->td_ucred); + *res = malloc(sizeof(struct msqid_kernel) * mi, M_TEMP, M_WAITOK); + for (i = 0; i < mi; i++) { + pmsqk = &(*res)[i]; + mtx_lock(&msq_mtx); + if (msqids[i].u.msg_qbytes == 0 || rpr == NULL || + msq_prison_cansee(rpr, &msqids[i]) != 0) + bzero(pmsqk, sizeof(*pmsqk)); + else { + *pmsqk = msqids[i]; + if (pmsqk->cred->cr_prison != pr) + pmsqk->u.msg_perm.key = IPC_PRIVATE; + } + mtx_unlock(&msq_mtx); + pmsqk->u.__msg_first = NULL; + pmsqk->u.__msg_last = NULL; + pmsqk->label = NULL; + pmsqk->cred = NULL; + } + return (0); +} + SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, "Maximum message size"); SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 6a668906ebd0..d8c10f837105 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1574,6 +1574,39 @@ sysctl_sema(SYSCTL_HANDLER_ARGS) return (error); } +int +kern_get_sema(struct thread *td, struct semid_kernel **res, size_t *sz) +{ + struct prison *pr, *rpr; + struct semid_kernel *psemak; + int i, mi; + + *sz = mi = seminfo.semmni; + if (res == NULL) + return (0); + + pr = td->td_ucred->cr_prison; + rpr = sem_find_prison(td->td_ucred); + *res = malloc(sizeof(struct semid_kernel) * mi, M_TEMP, M_WAITOK); + for (i = 0; i < mi; i++) { + psemak = &(*res)[i]; + mtx_lock(&sema_mtx[i]); + if ((sema[i].u.sem_perm.mode & SEM_ALLOC) == 0 || + rpr == NULL || sem_prison_cansee(rpr, &sema[i]) != 0) + bzero(psemak, sizeof(*psemak)); + else { + *psemak = sema[i]; + if (psemak->cred->cr_prison != pr) + psemak->u.sem_perm.key = IPC_PRIVATE; + } + mtx_unlock(&sema_mtx[i]); + psemak->u.__sem_base = NULL; + psemak->label = NULL; + psemak->cred = NULL; + } + return (0); +} + static int sem_prison_check(void *obj, void *data) { diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 8f67cb63f33c..835b44ab332a 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1089,6 +1089,42 @@ sysctl_shmsegs(SYSCTL_HANDLER_ARGS) return (error); } +int +kern_get_shmsegs(struct thread *td, struct shmid_kernel **res, size_t *sz) +{ + struct shmid_kernel *pshmseg; + struct prison *pr, *rpr; + int i; + + SYSVSHM_LOCK(); + *sz = shmalloced; + if (res == NULL) + goto out; + + pr = td->td_ucred->cr_prison; + rpr = shm_find_prison(td->td_ucred); + *res = malloc(sizeof(struct shmid_kernel) * shmalloced, M_TEMP, + M_WAITOK); + for (i = 0; i < shmalloced; i++) { + pshmseg = &(*res)[i]; + if ((shmsegs[i].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0 || + rpr == NULL || shm_prison_cansee(rpr, &shmsegs[i]) != 0) { + bzero(pshmseg, sizeof(*pshmseg)); + pshmseg->u.shm_perm.mode = SHMSEG_FREE; + } else { + *pshmseg = shmsegs[i]; + if (pshmseg->cred->cr_prison != pr) + pshmseg->u.shm_perm.key = IPC_PRIVATE; + } + pshmseg->object = NULL; + pshmseg->label = NULL; + pshmseg->cred = NULL; + } +out: + SYSVSHM_UNLOCK(); + return (0); +} + static int shm_prison_check(void *obj, void *data) { diff --git a/sys/sys/msg.h b/sys/sys/msg.h index 29fb8c2106b5..d8c950e66c47 100644 --- a/sys/sys/msg.h +++ b/sys/sys/msg.h @@ -152,6 +152,9 @@ struct msqid_kernel { #ifdef _KERNEL extern struct msginfo msginfo; +int kern_get_msqids(struct thread *td, struct msqid_kernel **res, + size_t *sz); + #else /* _KERNEL */ __BEGIN_DECLS diff --git a/sys/sys/sem.h b/sys/sys/sem.h index 05b69f64cd05..5634f4b0cfcc 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -142,6 +142,9 @@ extern struct seminfo seminfo; */ void semexit(struct proc *p); +int kern_get_sema(struct thread *td, struct semid_kernel **res, + size_t *sz); + #else /* !_KERNEL */ __BEGIN_DECLS diff --git a/sys/sys/shm.h b/sys/sys/shm.h index 9c6dad5d43cc..a1aa6ca54c60 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -158,6 +158,8 @@ extern struct shminfo shminfo; void shmexit(struct vmspace *); void shmfork(struct proc *, struct proc *); +int kern_get_shmsegs(struct thread *td, struct shmid_kernel **res, + size_t *sz); #else /* !_KERNEL */ From nobody Thu May 23 00:27:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8BT2yngz5LLHj; Thu, 23 May 2024 00:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8BT19z9z4g88; Thu, 23 May 2024 00:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wLPOLoaU5fr8olViyrYOaD5wprjU4nb0eTUGE3NGfA=; b=FpOfsWdLl+/AQdCAaWlzE8I3LNT0iBdKhWwvVqgKPK5+uZ8sTgPQ9BRDGitTPHypWyS1FZ S2tZhAqF3UBoLq97p+avNGpogBu1LZ7LF8YbULIze26kgQoc6+a68S9ZtLT5s9YOSYfs2I 3ATxvMSIhbY6Hx0iczRdcyx4LQCTaGR87vxLXtOqC7LSbW3VA0ETY55ctX5wa59vaDa0LI dCHOa0uKtyzUbc+oNxqBrK30/1qlZDbK8D9yQo3AZh0THSEH+63DGcAhovk2wX9gfg6LAy kI+su3JgXvaFjLJJUmF+XdwxnA3QT0GC6dF5WmRDadL0zmHLhn9di+AElpdgfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424033; a=rsa-sha256; cv=none; b=EohFJb8BHxH2xHPLvN/GBfjMiYIXH+tQ71rQx0cn6VPg7aktZSS3R1pAXGoUKhCyDPRcyf e7CP4CKuHj8khN8VXPOE2OHRtIG+JK9aha7GeeIU1xoSV2SFYgNwHADDCGQoZB5pVpQwZk HKY90PAgRrNQlmDBAlQWq6XjqBScem6SVdipkl4fGoisBujYDsI4A/K6R3v1XkJ8JYnp3r IHk8ZI+qESZwefEP0pZK28pD4hW5O2u9hWFQVeYGfV9qnoVKWpLy6qOIhdF8lP6PKTTk5r QyvuJryRNu+oMVdyBmipynf74/U7KgWuMampqcmsAQzZHy2FL23H5I+e4vS4yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wLPOLoaU5fr8olViyrYOaD5wprjU4nb0eTUGE3NGfA=; b=BmiMhSq3y/QLgkfVMu2vojzYUZ9SN5zG/AUXhdWS0Jr2DsuRwGmAcNd5QYRq6OECmUcjiK LHApwvnwfwZvdVg1wPF6AH3W1w6xYWojASfZ5rfAwr9Z1bEPgCN8eVPVa+glcNb4Uj3Ddh rIlqaIr4cZTc7a2QQRLXtMN1yA5IHtyya3VjZkCHSAcAzQRnnG6v5O0ofZQRwJqfkvW2Kh EfFhRNCJKLdJjyR0+ZxZqf7t26c8QrmZ1ii8KsbrG/173faJTb38kQnjlA+td5ZWAw8bSD dgO9b9aeoqHgtzEfNc9Lp1jGNZ+/wI68ug+n+8KAs1+X5MrRWt+vnUxZR4sV/A== 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 4Vl8BT0mCQzRdc; Thu, 23 May 2024 00:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0RDG4020755; Thu, 23 May 2024 00:27:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0RDdc020752; Thu, 23 May 2024 00:27:13 GMT (envelope-from git) Date: Thu, 23 May 2024 00:27:13 GMT Message-Id: <202405230027.44N0RDdc020752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 1449d298daaa - stable/14 - acpidump IVRS table format: change 'IOMMUId' into 'IOMMU DeviceId' List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1449d298daaa955153df7e0b67d9b38b17cae4dd Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1449d298daaa955153df7e0b67d9b38b17cae4dd commit 1449d298daaa955153df7e0b67d9b38b17cae4dd Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-19 23:01:43 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-23 00:26:44 +0000 acpidump IVRS table format: change 'IOMMUId' into 'IOMMU DeviceId' (cherry picked from commit 6cba29c09a966be33b0958f912a7c03d92b926b8) --- usr.sbin/acpi/acpidump/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index adef488065f6..6f8effe58fbd 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -1504,7 +1504,7 @@ acpi_handle_dmar(ACPI_TABLE_HEADER *sdp) static void acpi_handle_ivrs_ivhd_header(ACPI_IVRS_HEADER *addr) { - printf("\n\tIVHD Type=%#x IOMMUId=%x\n\tFlags=", + printf("\n\tIVHD Type=%#x IOMMU DeviceId=%#06x\n\tFlags=", addr->Type, addr->DeviceId); #define PRINTFLAG(flag, name) printflag(addr->Flags, flag, #name) PRINTFLAG(ACPI_IVHD_TT_ENABLE, HtTunEn); From nobody Thu May 23 00:28:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8CS2GYdz5LLLW; Thu, 23 May 2024 00:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8CS0FK3z4hV5; Thu, 23 May 2024 00:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQJ/aTp8Zkbx3VI7+h83e9vZLMAPKMKZiZrP7p7rlfI=; b=iMMVpmVFV6gvhdq6lHuRjNG7jcL342AF5v+lZWB6RumvZOPIgpXLMDs4rbB3k3n+FfptC7 qMlDjW89LfQGDzoiJ2+GsyDtn2ja8AA1kkYm73z12tiLn/1/E9YB6ILvKjD8hmI0ECDJVc NRp8MdRnar9tKWUU0gTW2jvlG3OoC00dOx+o6bNFkO2GHjcrjcPSVjF7Ro6mpmh+aSd1IC IsUatpYHFkc/XivdlJoOhVvyfHf4s1qYC7Oun81YDDpg3DvWzEX5mxpNq7MMYTtOkXVjuy xYI4jTeEtNsvoBevzeB7xATejDKHRXq7bBAAlx0bW9Aj3/MQCfeuXF6ryV7oNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424084; a=rsa-sha256; cv=none; b=Jr//tN+q2ArQh4cRPc6FG/LJ1Gk5y/JHJUjxaBnzXOrUq5D/EsQ2ktB0ZDC0phf5A1ee/c BwrUvW0qYzlz3Y3ketTpO4Nc1bmThsG4F+UBKixqaQL2bcdDMlTDWHflX0Dzegr3eKikdO vrFpOIdi7eXwZ972wlznZlhpsqh2jQBAeNcyoI+XH6mjrjf+dxqtKMl5DtyGGXoPPqSnRJ Cu5j4FdVEzBTwFE34OJ5L8hxM1wndKy1QxjzVL8k/O/tvhP7+blpNUXixjpV9V/Azm6FJ2 QEn1EBOHtSXNRfQt/S1r4GhWz+oyrrW2LdR9RG8RI2231WvJViKXIfWqBzXwjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQJ/aTp8Zkbx3VI7+h83e9vZLMAPKMKZiZrP7p7rlfI=; b=C6KQS6D2GdMDYw9ZeoKbztk8gi5UDB56h2HZmD7WTyc40hM11vfRSXIP1NUEG/+meMebRj iPrvadnhKp+jIC88jSZWObscs9KGis5RnXzHzNIik1zwNk+Ix7PJHERGHRUS9RoDU1Y2Og us4ZI5TjGlv/kTfHGhLi3f053BSId2ZSmItsLwd9603Yc1272vWHprYIOfyA5esrFx5fEe FuyKti+bfe03fUg+CKmCt/Ne4XLInS9+8BSMCmRa6zt8bd5fcFp/b6kwY51x7u8Be3Nihx q6HK8g5Ke9ficU5mDYjYA1ypI8Bz6tFTWytlvgCP0EFdtKa/1yE3WmU5zBtWaQ== 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 4Vl8CR6zT9zRhZ; Thu, 23 May 2024 00:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0S3S8021079; Thu, 23 May 2024 00:28:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0S3TX021077; Thu, 23 May 2024 00:28:03 GMT (envelope-from git) Date: Thu, 23 May 2024 00:28:03 GMT Message-Id: <202405230028.44N0S3TX021077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 2a2f2f59132a - stable/13 - vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a2f2f59132ad365203c5deb8ed16202a78585c1 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2f2f59132ad365203c5deb8ed16202a78585c1 commit 2a2f2f59132ad365203c5deb8ed16202a78585c1 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-15 09:54:49 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 23:47:23 +0000 vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done PR: 265311 (cherry picked from commit 21ccdb4119afdfdfeaa80e9c8514171c65b35862) --- sys/kern/vfs_mount.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 68b22d1a77a8..8cee38c7ec2e 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1155,7 +1155,7 @@ vfs_domount_update( void *bufp; struct mount *mp; int error, export_error, i, len, fsid_up_len; - uint64_t flag; + uint64_t flag, mnt_union; gid_t *grps; fsid_t *fsid_up; bool vfs_suser_failed; @@ -1237,6 +1237,7 @@ vfs_domount_update( vfs_deleteopt(*optlist, "fsid"); } + mnt_union = 0; MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { MNT_IUNLOCK(mp); @@ -1258,6 +1259,11 @@ vfs_domount_update( mp->mnt_flag |= MNT_UPDATE; } else { mp->mnt_flag &= ~MNT_UPDATEMASK; + if ((mp->mnt_flag & MNT_UNION) == 0 && + (fsflags & MNT_UNION) != 0) { + fsflags &= ~MNT_UNION; + mnt_union = MNT_UNION; + } mp->mnt_flag |= fsflags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE | MNT_SNAPSHOT | MNT_ROOTFS | MNT_UPDATEMASK | MNT_RDONLY); if ((mp->mnt_flag & MNT_ASYNC) == 0) @@ -1361,6 +1367,7 @@ vfs_domount_update( if (error == 0) { mp->mnt_flag &= ~(MNT_UPDATE | MNT_RELOAD | MNT_FORCE | MNT_SNAPSHOT); + mp->mnt_flag |= mnt_union; } else { /* * If we fail, restore old mount flags. MNT_QUOTA is special, From nobody Thu May 23 00:28:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8CT4NPqz5LL6F; Thu, 23 May 2024 00:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8CT1KBTz4hGh; Thu, 23 May 2024 00:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q7tJyXyg1msmZZAAw1Aiw6hkWAAnDpIbP78zNMZVKsw=; b=hXYM7+4QuVd3AfSLOZc4GbhS8H0FnuvZAngg9S49lcF9ln/w/BYJviMXNx5ppKyVxYkZXG ib7vOzeFeg2Cnq+tAzll39ZiiNtagGlvVVm5no6ZzOjnNUM7iPlE0PXzhUAJhmrGHzkB4z oeK9FBUOs6gPjPNfQTYytnakAakhf01ik6nGn2ROKXFhMRaHrXUpbODQ1ustiQssT1w0II RTZ3p/aN/wEd6NzrJzqEzoEQz4roD6JNSe33U9pDD1SznClmo+2TkfJ7P2GOwd5J4WYxmv XejAOToa/rojwtfNrWugqaS8lizbmOpDrVRX+e5JSm9uE5kLj+6uuJ0ZUunFxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424085; a=rsa-sha256; cv=none; b=kofcFHv7RHrr7rZ42x5LGW1lyGJBI0IJcsvDG8gRZUlW9yDDmjHVnfW6b81X5QJS6wjDcd 9GQSkhEJcCLj51kaKg9LwVJdQClyWUN8hSDh6wnykqUKtG7gT3ORRVg9s/ZgvsX6Hj/w6Z t42lm+05QREPX2/c7TqlajKimXK1Ma6MgsZPGlm+UzNgTz/gA3Ta1d1JT4/P9Bro6wgbtf nCqamzzyZevWysr/eP4+bApv+iT2lXE601iY/T+ocZZToxymlkK7sQrYyYVWcbmS5Pgv7E bFVdJenwav7tmnBhzHjwG+BbTYowP45jN9XKRzpqvHHqAuch2yauwKPihCmSuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q7tJyXyg1msmZZAAw1Aiw6hkWAAnDpIbP78zNMZVKsw=; b=d4Fy9D62mnm/QTKI6K+x0ot2A6VZ85w4znKClx5MhP3toooujIyTvm/M9mZLvHzNnugdYt CwvLTvl2c/2PH0wchZjyXeB4yy6B0QD8/YyuO0OhgPJnXwHL6ftcZL99vpJiUNsRFr74xz OfWuQpx4gfzSJav05ZWT1hUq0GD9DLo1PhwwAKB88MY0WwU3u6N9yJ2JQDQwwngA+RvSHQ b4C1hcWWV4PIvA8lnv6ndfMeTYu3e2UwsDc0uodX8JcAdJZzNEEmOuatQ0YIJzckqmNIY1 z4afhAbpkGBtg66uNRgOAw5wqGxiz7opVazxbEMCUYc0eKYuzVSt7wXnPvWerw== 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 4Vl8CT0tCTzQxb; Thu, 23 May 2024 00:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0S51f021131; Thu, 23 May 2024 00:28:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0S5l3021128; Thu, 23 May 2024 00:28:05 GMT (envelope-from git) Date: Thu, 23 May 2024 00:28:05 GMT Message-Id: <202405230028.44N0S5l3021128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 454ebd0be5ee - stable/13 - SysV SHM: move SHMSEG constants to sys/shm.h List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 454ebd0be5ee35e804759c6fff0144f08f75f538 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=454ebd0be5ee35e804759c6fff0144f08f75f538 commit 454ebd0be5ee35e804759c6fff0144f08f75f538 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-16 15:24:00 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 23:47:23 +0000 SysV SHM: move SHMSEG constants to sys/shm.h (cherry picked from commit 53725168e1b631be0e60f888ba5e63e140b57766) --- sys/kern/sysv_shm.c | 4 ---- sys/sys/shm.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 91ee7c557136..1da95b86c9ba 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -109,10 +109,6 @@ FEATURE(sysv_shm, "System V shared memory segments support"); static MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments"); -#define SHMSEG_FREE 0x0200 -#define SHMSEG_REMOVED 0x0400 -#define SHMSEG_ALLOCATED 0x0800 - static int shm_last_free, shm_nused, shmalloced; vm_size_t shm_committed; static struct shmid_kernel *shmsegs; diff --git a/sys/sys/shm.h b/sys/sys/shm.h index 0b5cba0120e5..9c6dad5d43cc 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -152,6 +152,10 @@ struct vmspace; extern struct shminfo shminfo; +#define SHMSEG_FREE 0x0200 +#define SHMSEG_REMOVED 0x0400 +#define SHMSEG_ALLOCATED 0x0800 + void shmexit(struct vmspace *); void shmfork(struct proc *, struct proc *); From nobody Thu May 23 00:28:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8CW4689z5LLQj; Thu, 23 May 2024 00:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8CV2NvLz4hB3; Thu, 23 May 2024 00:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1VvnXNg9ZoSDbTBJrf/JxKEzt3hIeC0vaunt2yhKi0=; b=yQhtodsJby3h8V9J2nso6FN7A28A3KTwuGywcjQP4qUBKBOBYxygWmYM+PvG8p3UMzuFJl mDAq/Hso0qMUkUAid23ZwphGWvgESZohpCOZG7Ux2Z5zHyWIoCG37jPiontcd0Ehv5b90/ OKBt9LCfnZAY0Gu15DENzFRJ1y+UIIYSrq+cwEG99MRG3WkgvtYVo+/X50TNrsPm5FPT5Z oUshNIKSEuNVbBdlFz+KOlBi/7GkaUhzHb8Un7HvERPIZIUnGobFG2FAkjwsqoyod2qYnC CPIwQXydqnbra07MqjZKUFmhpKGktcVZAm6hzIhW3/DjRBA3hIlHITDTg5mKvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424086; a=rsa-sha256; cv=none; b=m3BQmPeWWtyfwEfUYnY6V4BFTLXThcHeepitsOo9NZTSrXDcfG20YP3NHmt7mMqE9u+dNq 0BVEUKj4x3ziNJt/e6VigsXzjUtcqyi0/0SYTZVd4ZaxdX7gg4OuCqyIfgnQzvr9CPkpu2 JR8E1rO8feI9wSvHOBMSZqwWPCSFv3PacdaUM/4aqeSvq/2+ePM9sxkI8UqH7geDNQOGTr u6BRClgwprDg3aYOtYRFq5pMKzsk3JZKJmcI09WjBnPmqCNUpln4X/Ei0EJgpW7QTclLAD iU/zgu4T+PzgWoq3Chtpb38XVtIjvSZJa1KtNooPejHrhvbFl/TNwa1ngiMaPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1VvnXNg9ZoSDbTBJrf/JxKEzt3hIeC0vaunt2yhKi0=; b=P6N9c/Y3hQjYxx26Nvvy2YvKrgO9GrnRQCq9bbJsL28Sl61W86JsQf9um4ggiqeeXmd9ze tNVWVkaZzJHBqlIhX9UvztAV67Xaqm6lbWDSAiKlQdVZ+unYQ5dnk4PCtyYDdGCFHktr8m rP89fn7PYlrN3nXb+iVmVv79zm51NIwff+XHfQElM7+Ju/wozor7mnE9/tHcsisxtnGGs/ J/mxWxMmxotNNvAxyJAh4M/X1UprjixVyTYbF37qCvmxI3qnWM07oPJ7LLAaX9drmOm5HT 19+f3M1P5SdEpiAR81Uq8F9tn0MVdid+FSW+XEx32yTgmz4+qCIm0UT+gINqow== 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 4Vl8CV1yqHzRCD; Thu, 23 May 2024 00:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0S6Lt021188; Thu, 23 May 2024 00:28:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0S6gC021185; Thu, 23 May 2024 00:28:06 GMT (envelope-from git) Date: Thu, 23 May 2024 00:28:06 GMT Message-Id: <202405230028.44N0S6gC021185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 07b7dec1fe42 - stable/13 - SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 07b7dec1fe4296cdf470013087180a80a0d4a2cf Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=07b7dec1fe4296cdf470013087180a80a0d4a2cf commit 07b7dec1fe4296cdf470013087180a80a0d4a2cf Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-13 17:17:47 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 23:47:23 +0000 SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information PR: 278949 (cherry picked from commit 87a156527563d0728bff355093e26943da3d7fad) --- sys/kern/sysv_msg.c | 34 ++++++++++++++++++++++++++++++++++ sys/kern/sysv_sem.c | 33 +++++++++++++++++++++++++++++++++ sys/kern/sysv_shm.c | 36 ++++++++++++++++++++++++++++++++++++ sys/sys/msg.h | 3 +++ sys/sys/sem.h | 3 +++ sys/sys/shm.h | 2 ++ 6 files changed, 111 insertions(+) diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 5f08a867f5a9..1b73634eea24 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1477,6 +1477,40 @@ sysctl_msqids(SYSCTL_HANDLER_ARGS) return (error); } +int +kern_get_msqids(struct thread *td, struct msqid_kernel **res, size_t *sz) +{ + struct msqid_kernel *pmsqk; + struct prison *pr, *rpr; + int i, mi; + + *sz = mi = msginfo.msgmni; + if (res == NULL) + return (0); + + pr = td->td_ucred->cr_prison; + rpr = msg_find_prison(td->td_ucred); + *res = malloc(sizeof(struct msqid_kernel) * mi, M_TEMP, M_WAITOK); + for (i = 0; i < mi; i++) { + pmsqk = &(*res)[i]; + mtx_lock(&msq_mtx); + if (msqids[i].u.msg_qbytes == 0 || rpr == NULL || + msq_prison_cansee(rpr, &msqids[i]) != 0) + bzero(pmsqk, sizeof(*pmsqk)); + else { + *pmsqk = msqids[i]; + if (pmsqk->cred->cr_prison != pr) + pmsqk->u.msg_perm.key = IPC_PRIVATE; + } + mtx_unlock(&msq_mtx); + pmsqk->u.__msg_first = NULL; + pmsqk->u.__msg_last = NULL; + pmsqk->label = NULL; + pmsqk->cred = NULL; + } + return (0); +} + SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, "Maximum message size"); SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 381c1ac4f71b..8a10c1ed90ce 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1574,6 +1574,39 @@ sysctl_sema(SYSCTL_HANDLER_ARGS) return (error); } +int +kern_get_sema(struct thread *td, struct semid_kernel **res, size_t *sz) +{ + struct prison *pr, *rpr; + struct semid_kernel *psemak; + int i, mi; + + *sz = mi = seminfo.semmni; + if (res == NULL) + return (0); + + pr = td->td_ucred->cr_prison; + rpr = sem_find_prison(td->td_ucred); + *res = malloc(sizeof(struct semid_kernel) * mi, M_TEMP, M_WAITOK); + for (i = 0; i < mi; i++) { + psemak = &(*res)[i]; + mtx_lock(&sema_mtx[i]); + if ((sema[i].u.sem_perm.mode & SEM_ALLOC) == 0 || + rpr == NULL || sem_prison_cansee(rpr, &sema[i]) != 0) + bzero(psemak, sizeof(*psemak)); + else { + *psemak = sema[i]; + if (psemak->cred->cr_prison != pr) + psemak->u.sem_perm.key = IPC_PRIVATE; + } + mtx_unlock(&sema_mtx[i]); + psemak->u.__sem_base = NULL; + psemak->label = NULL; + psemak->cred = NULL; + } + return (0); +} + static int sem_prison_check(void *obj, void *data) { diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 1da95b86c9ba..7d38747b585d 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1089,6 +1089,42 @@ sysctl_shmsegs(SYSCTL_HANDLER_ARGS) return (error); } +int +kern_get_shmsegs(struct thread *td, struct shmid_kernel **res, size_t *sz) +{ + struct shmid_kernel *pshmseg; + struct prison *pr, *rpr; + int i; + + SYSVSHM_LOCK(); + *sz = shmalloced; + if (res == NULL) + goto out; + + pr = td->td_ucred->cr_prison; + rpr = shm_find_prison(td->td_ucred); + *res = malloc(sizeof(struct shmid_kernel) * shmalloced, M_TEMP, + M_WAITOK); + for (i = 0; i < shmalloced; i++) { + pshmseg = &(*res)[i]; + if ((shmsegs[i].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0 || + rpr == NULL || shm_prison_cansee(rpr, &shmsegs[i]) != 0) { + bzero(pshmseg, sizeof(*pshmseg)); + pshmseg->u.shm_perm.mode = SHMSEG_FREE; + } else { + *pshmseg = shmsegs[i]; + if (pshmseg->cred->cr_prison != pr) + pshmseg->u.shm_perm.key = IPC_PRIVATE; + } + pshmseg->object = NULL; + pshmseg->label = NULL; + pshmseg->cred = NULL; + } +out: + SYSVSHM_UNLOCK(); + return (0); +} + static int shm_prison_check(void *obj, void *data) { diff --git a/sys/sys/msg.h b/sys/sys/msg.h index 29fb8c2106b5..d8c950e66c47 100644 --- a/sys/sys/msg.h +++ b/sys/sys/msg.h @@ -152,6 +152,9 @@ struct msqid_kernel { #ifdef _KERNEL extern struct msginfo msginfo; +int kern_get_msqids(struct thread *td, struct msqid_kernel **res, + size_t *sz); + #else /* _KERNEL */ __BEGIN_DECLS diff --git a/sys/sys/sem.h b/sys/sys/sem.h index 05b69f64cd05..5634f4b0cfcc 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -142,6 +142,9 @@ extern struct seminfo seminfo; */ void semexit(struct proc *p); +int kern_get_sema(struct thread *td, struct semid_kernel **res, + size_t *sz); + #else /* !_KERNEL */ __BEGIN_DECLS diff --git a/sys/sys/shm.h b/sys/sys/shm.h index 9c6dad5d43cc..a1aa6ca54c60 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -158,6 +158,8 @@ extern struct shminfo shminfo; void shmexit(struct vmspace *); void shmfork(struct proc *, struct proc *); +int kern_get_shmsegs(struct thread *td, struct shmid_kernel **res, + size_t *sz); #else /* !_KERNEL */ From nobody Thu May 23 00:58:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t56D4yz5LNhn; Thu, 23 May 2024 00:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8t55KhQz4lp9; Thu, 23 May 2024 00:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ow6v7sY+aHJKQz48A1o8M5Chr3G1CxCW0Uaj5tLC970=; b=pZm6hksTTVQ2B4qz1tSvVTMIm2VB2XwqsgUZ4Lr3iwoouvqeAxZOevXU4fct8dzxHb/PTz xs06v3zuZjnXk614IqolOJXUaLHyg+wnmXb/lL4K8XnRabcmAo/0Z/2oC1DujLQVrskLdn V9kqlgUSx1Bfvzy/r4IvegKCn0WrC6bOf4eQf5briap0SrmUUmiTy7nOytVXeeDyUk74+e wtyEbh1WM08eHFCa+0uyLd4u69bZpu7sCKr6E84SUc2lYpRK1rVH8suTQ5/l4ZuxMJw+hT 4v21gF5xrEJorT0c9z8O8Gn/QeuSqCSECrTnxCbh6s4+nblazRR2IY3fa74NzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425885; a=rsa-sha256; cv=none; b=qTMjjjLhJP1d5A06La7JwOzPpRiSk1dQQREJOjywJ6eaoDSdIGd0S4AJGyEaMcehF8X8ej vkWuH433zXplSr7laxPaNLPftrv9CzS3QWCeLYAGbOqEjaYzZLcosklfx6iTexmu+JmhBS abY4GRmSCYOsabL3PBZOxzS997n8sUUnSdDBmBEe2cKOp9h6jGm9CHKUtZk4YkOvW+2Nhh 8RJXIgJDD5jXADSKCgtxndHbeBcj6bTJ8G7IRKrZ0VH36XwRP7qD1NYPzx7oH+b+SHxUbd a+1X8ZhffKu79n1iVzZPKw6vi4l3vCvFiOlHCHpdFimYdJ9QwV99FTbw7kD12w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ow6v7sY+aHJKQz48A1o8M5Chr3G1CxCW0Uaj5tLC970=; b=XjTvNIJJIJdDJVFz2acXxqJDiTuZu+SL5sQzIxnKXjPx72gM0GhV867P/1MwqCHBL5DVvD whuT3tU/0qH8VyabmcC1rpRPGKk5f9OevORzQX9M2xR24rzLzC/gvhxmY6wHZyD6tO2fJp 6lbf4FztEC+IjlkYXo9Mi1zjGG7sLgstbW757NY5Q8xJ59VYZs2AkXj9Weo2YQng8ke1lB DeRPsZ9V0/yCFu3D0ed6DEgt98z/QL5Ca4JQ4chJX10om89kVnVNk1ntIgAlrPgwoIXAKq sP8McAxj8UUuqXDq0X9Oo1XCP5bRlL8QZeiXyfUoErgxH0lWWEvkKHXc2xGcaw== 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 4Vl8t54wsTzShT; Thu, 23 May 2024 00:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0w5Eh071837; Thu, 23 May 2024 00:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w5qL071834; Thu, 23 May 2024 00:58:05 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:05 GMT Message-Id: <202405230058.44N0w5qL071834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: e07f9178502b - main - sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e07f9178502b7cbc0769fc10e99ad0d013f437fd Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e07f9178502b7cbc0769fc10e99ad0d013f437fd commit e07f9178502b7cbc0769fc10e99ad0d013f437fd Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:04 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:04 +0000 sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO FreeBSD's implementation of SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO does not exactly work as intended. The problem is essentially that both IOCTLs return the same information, while in fact the information returned currently by dsp_oss_audioinfo() is what _only_ SNDCTL_ENGINEINFO is meant to return. This behavior is also noted in the OSS manual [1] (see bold paragraph in "Audio engines and device files" section), but since e8c0d15a64fa ("sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)") we can actually fix this, because we now expose only a single device for each soundcard, and create the engines (channels) internally. SNDCTL_ENGINEINFO will now report info about all channels in a given device, and SNDCTL_AUDIOINFO[_EX] will only report information about /dev/dspX. To make this work, we also have to modify the SNDCTL_SYSINFO IOCTL to report the number of audio devices and audio engines correctly. While here, modernize the minimum and maximum channel counting in both SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO. Currently these IOCTLs will report only up to 2 channels, which is no longer the case. [1] http://manuals.opensound.com/developer/SNDCTL_AUDIOINFO.html PR: 246231, 252761 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45164 --- sys/dev/sound/pcm/dsp.c | 179 +++++++++++++++++++++++++++++++++++++++++----- sys/dev/sound/pcm/dsp.h | 3 +- sys/dev/sound/pcm/mixer.c | 8 ++- sys/dev/sound/pcm/sound.c | 8 +-- 4 files changed, 173 insertions(+), 25 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 6e5fad048d40..4ee5d7c6738c 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -778,9 +778,15 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, ret = sound_oss_card_info((oss_card_info *)arg); break; case SNDCTL_AUDIOINFO: + ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + false); + break; case SNDCTL_AUDIOINFO_EX: + ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + true); + break; case SNDCTL_ENGINEINFO: - ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg); + ret = dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg); break; case SNDCTL_MIXERINFO: ret = mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg); @@ -2034,8 +2040,152 @@ dsp_unit2name(char *buf, size_t len, struct pcm_channel *ch) return (NULL); } +/** + * @brief Handler for SNDCTL_AUDIOINFO. + * + * Gathers information about the audio device specified in ai->dev. If + * ai->dev == -1, then this function gathers information about the current + * device. If the call comes in on a non-audio device and ai->dev == -1, + * return EINVAL. + * + * This routine is supposed to go practically straight to the hardware, + * getting capabilities directly from the sound card driver, side-stepping + * the intermediate channel interface. + * + * @note + * Calling threads must not hold any snddev_info or pcm_channel locks. + * + * @param dev device on which the ioctl was issued + * @param ai ioctl request data container + * @param ex flag to distinguish between SNDCTL_AUDIOINFO from + * SNDCTL_AUDIOINFO_EX + * + * @retval 0 success + * @retval EINVAL ai->dev specifies an invalid device + */ +int +dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) +{ + struct pcmchan_caps *caps; + struct pcm_channel *ch; + struct snddev_info *d; + uint32_t fmts; + int i, minch, maxch, unit; + + /* + * If probing the device that received the ioctl, make sure it's a + * DSP device. (Users may use this ioctl with /dev/mixer and + * /dev/midi.) + */ + if (ai->dev == -1 && i_dev->si_devsw != &dsp_cdevsw) + return (EINVAL); + + for (unit = 0; pcm_devclass != NULL && + unit < devclass_get_maxunit(pcm_devclass); unit++) { + d = devclass_get_softc(pcm_devclass, unit); + if (!PCM_REGISTERED(d)) { + d = NULL; + continue; + } + + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + if ((ai->dev == -1 && d->dsp_dev == i_dev) || + (ai->dev == unit)) { + PCM_UNLOCK(d); + break; + } else { + PCM_UNLOCK(d); + d = NULL; + } + } + + /* Exhausted the search -- nothing is locked, so return. */ + if (d == NULL) + return (EINVAL); + + /* XXX Need Giant magic entry ??? */ + + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + + bzero((void *)ai, sizeof(oss_audioinfo)); + ai->dev = unit; + strlcpy(ai->name, device_get_desc(d->dev), sizeof(ai->name)); + ai->pid = -1; + ai->card_number = -1; + ai->port_number = -1; + ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1; + ai->legacy_device = unit; + snprintf(ai->devnode, sizeof(ai->devnode), "/dev/dsp%d", unit); + ai->enabled = device_is_attached(d->dev) ? 1 : 0; + ai->next_play_engine = 0; + ai->next_rec_engine = 0; + ai->busy = 0; + ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; + ai->iformats = 0; + ai->oformats = 0; + ai->min_rate = INT_MAX; + ai->max_rate = 0; + ai->min_channels = INT_MAX; + ai->max_channels = 0; + + /* Gather global information about the device. */ + CHN_FOREACH(ch, d, channels.pcm) { + CHN_UNLOCKASSERT(ch); + CHN_LOCK(ch); + + /* + * Skip physical channels if we are servicing SNDCTL_AUDIOINFO, + * or VCHANs if we are servicing SNDCTL_AUDIOINFO_EX. + */ + if ((ex && (ch->flags & CHN_F_VIRTUAL) != 0) || + (!ex && (ch->flags & CHN_F_VIRTUAL) == 0)) { + CHN_UNLOCK(ch); + continue; + } + + if ((ch->flags & CHN_F_BUSY) == 0) { + ai->busy |= (ch->direction == PCMDIR_PLAY) ? + OPEN_WRITE : OPEN_READ; + } + + ai->caps |= + ((ch->flags & CHN_F_VIRTUAL) ? PCM_CAP_VIRTUAL : 0) | + ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : + PCM_CAP_INPUT); + + caps = chn_getcaps(ch); + + minch = INT_MAX; + maxch = 0; + fmts = 0; + for (i = 0; caps->fmtlist[i]; i++) { + fmts |= AFMT_ENCODING(caps->fmtlist[i]); + minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch); + maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch); + } + + if (ch->direction == PCMDIR_PLAY) + ai->oformats |= fmts; + else + ai->iformats |= fmts; + + ai->min_rate = min(ai->min_rate, caps->minspeed); + ai->max_rate = max(ai->max_rate, caps->maxspeed); + ai->min_channels = min(ai->min_channels, minch); + ai->max_channels = max(ai->max_channels, maxch); + + CHN_UNLOCK(ch); + } + + PCM_UNLOCK(d); + + return (0); +} + static int -dsp_oss_audioinfo_cb(void *data, void *arg) +dsp_oss_engineinfo_cb(void *data, void *arg) { struct dsp_cdevpriv *priv = data; struct pcm_channel *ch = arg; @@ -2047,10 +2197,10 @@ dsp_oss_audioinfo_cb(void *data, void *arg) } /** - * @brief Handler for SNDCTL_AUDIOINFO. + * @brief Handler for SNDCTL_ENGINEINFO * - * Gathers information about the audio device specified in ai->dev. If - * ai->dev == -1, then this function gathers information about the current + * Gathers information about the audio device's engine specified in ai->dev. + * If ai->dev == -1, then this function gathers information about the current * device. If the call comes in on a non-audio device and ai->dev == -1, * return EINVAL. * @@ -2066,11 +2216,9 @@ dsp_oss_audioinfo_cb(void *data, void *arg) * * @retval 0 success * @retval EINVAL ai->dev specifies an invalid device - * - * @todo Verify correctness of Doxygen tags. ;) */ int -dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) +dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) { struct pcmchan_caps *caps; struct pcm_channel *ch; @@ -2113,7 +2261,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) CHN_LOCK(ch); if (ai->dev == -1) { if (devfs_foreach_cdevpriv(i_dev, - dsp_oss_audioinfo_cb, ch) != 0) { + dsp_oss_engineinfo_cb, ch) != 0) { devname = dsp_unit2name(buf, sizeof(buf), ch); } @@ -2182,18 +2330,13 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) * if any channel is mono, minch = 1; * and if all channels are mono, maxch = 1. */ - minch = 0; + minch = INT_MAX; maxch = 0; fmts = 0; for (i = 0; caps->fmtlist[i]; i++) { - fmts |= caps->fmtlist[i]; - if (AFMT_CHANNEL(caps->fmtlist[i]) > 1) { - minch = (minch == 0) ? 2 : minch; - maxch = 2; - } else { - minch = 1; - maxch = (maxch == 0) ? 1 : maxch; - } + fmts |= AFMT_ENCODING(caps->fmtlist[i]); + minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch); + maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch); } if (ch->direction == PCMDIR_PLAY) diff --git a/sys/dev/sound/pcm/dsp.h b/sys/dev/sound/pcm/dsp.h index b81e60dc19b5..7559e855d4e1 100644 --- a/sys/dev/sound/pcm/dsp.h +++ b/sys/dev/sound/pcm/dsp.h @@ -36,6 +36,7 @@ extern struct cdevsw dsp_cdevsw; int dsp_make_dev(device_t); void dsp_destroy_dev(device_t); char *dsp_unit2name(char *, size_t, struct pcm_channel *); -int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *); +int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *, bool); +int dsp_oss_engineinfo(struct cdev *, oss_audioinfo *); #endif /* !_PCMDSP_H_ */ diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 9811496853c8..130333c7c442 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1282,9 +1282,13 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, case SNDCTL_CARDINFO: return (sound_oss_card_info((oss_card_info *)arg)); case SNDCTL_AUDIOINFO: + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + false)); case SNDCTL_AUDIOINFO_EX: - case SNDCTL_ENGINEINFO: - return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + true)); + case SNDCTL_ENGINEINFO: + return (dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg)); case SNDCTL_MIXERINFO: return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); } diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index e66462af2a71..072d42c4e989 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -718,9 +718,9 @@ sound_oss_sysinfo(oss_sysinfo *si) /* * Iterate over PCM devices and their channels, gathering up data - * for the numaudios and openedaudio fields. + * for the numaudioengines and openedaudio fields. */ - si->numaudios = 0; + si->numaudioengines = 0; bzero((void *)&si->openedaudio, sizeof(si->openedaudio)); j = 0; @@ -737,7 +737,7 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_UNLOCKASSERT(d); PCM_LOCK(d); - si->numaudios += PCM_CHANCOUNT(d); + si->numaudioengines += PCM_CHANCOUNT(d); CHN_FOREACH(c, d, channels.pcm) { CHN_UNLOCKASSERT(c); @@ -751,7 +751,6 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_UNLOCK(d); } - si->numaudioengines = si->numaudios; si->numsynths = 0; /* OSSv4 docs: this field is obsolete */ /** @@ -769,6 +768,7 @@ sound_oss_sysinfo(oss_sysinfo *si) si->numtimers = 0; si->nummixers = mixer_count; si->numcards = devclass_get_maxunit(pcm_devclass); + si->numaudios = devclass_get_maxunit(pcm_devclass); /* OSSv4 docs: Intended only for test apps; API doesn't really have much of a concept of cards. Shouldn't be used by applications. */ From nobody Thu May 23 00:58:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t673S0z5LNqT; Thu, 23 May 2024 00:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8t665gbz4lwS; Thu, 23 May 2024 00:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J9kJqu8u6C6Shcv9wInSfKAp1g24dJ1NtKI8nkUWt2g=; b=f8rQZZqoVUwdEBAll2vkQaTW4TsHz4I2sxBS0HVbc65LTns1we3Zm8FyLvElJc5IHMleOX 0vwrIODoJ+UlkVKDg30a/5p6Z4N/HV3m1lrBxNK6ixIotaHsDIMl0UNdl7eykZIfnZp7vc A/8egiHvs1EV72jl6HfyExOtf+yNeq2INylb0b24c4VCczO2cF/VCs0Pa2MJcalllU8rbv ckrC0N5yhQCN9UGL34L/YAXqVin87nmg3OLtACYTGhxo8VhnxqmGQqAJdmFl5dXJBvr52V xNOmWQIxIqSFMNaASMzPNuq/nzBCnupXRK3UrlLEBuUbf0vO7M7yHQlLgFKOZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425886; a=rsa-sha256; cv=none; b=DbCLoeuXd8s8v0e5X7Tq/6GdZmQBjdN0sKBtpS5XyDXAEC95vjfncs5LuqBnE2kuf7UAkt UY3Zk3YF9fQGmq424UUYb1zx3A5Eu57iFY3E3I2Gqt1OPu5Zg3rfYgExPeGSYqIENTbDwU G7wGHndtv10DuzgazxazZmpcFXnMeppkxQ6Z+LGHe/WOqMfYHxZ0GHKY47S4kZHHYigftz gaHUu/xjbZ8RJZ6Ml0cnG0RXXnLzw2uVL8OqPZM2vxCRfx+bGI9p+VabYFMavycut0MCpz R3I/K3a7tN4Ak6Mpdj9Av5KC0VjzLYXhf0g92fW2FfVvdTnBeH5WSWg/5Qx1aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J9kJqu8u6C6Shcv9wInSfKAp1g24dJ1NtKI8nkUWt2g=; b=mMLasV2NSMnapgnPzYEW92fLs0UbhQELDGB1rio0d6+haX4nBJte/dS0u9cu4S9HJde8V3 hMgr5MC95Eez2t10jDjNFt50LBPwrlqWxOG5pH1acmjrtKK8zvrj+g5EwA6mMxnktNY/VG RxxixaTBk0LKb8lAAp3sBK6HiqR4oqVJ4pbYcRLns46DqjaF5v1W8kvZE2tHUZkSzzdQ5d DBDDkski3on5sOBacSdcJAVyhcgxVheWunzMfeCjIgvdlj+lX3ZyP0+w76PM1m2jc8/SLD PdNP13V4st54qdEGwOYRPN1HYbRWzyQocqH3HTvj472NCUJrGmlMtOBlCgr7FA== 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 4Vl8t65hf0zSTN; Thu, 23 May 2024 00:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0w60t071898; Thu, 23 May 2024 00:58:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w6Xp071895; Thu, 23 May 2024 00:58:06 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:06 GMT Message-Id: <202405230058.44N0w6Xp071895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 5d980fadf73d - main - sound: Handle unavailable devices in various OSS IOCTLs List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 5d980fadf73df64a1e0eda40a93170ed76ce6f14 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5d980fadf73df64a1e0eda40a93170ed76ce6f14 commit 5d980fadf73df64a1e0eda40a93170ed76ce6f14 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:17 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:17 +0000 sound: Handle unavailable devices in various OSS IOCTLs mixer(8)'s -a option is used to print information about all mixer devices in the system. To do this, it loops from 0 to mixer_get_nmixers(), and tries to open "/dev/mixer%d". However, this approach doesn't work when there are disabled/unregistered mixers in the system, or when an audio device simply doesn't have a mixer. mixer_get_nmixers() calls SNDCTL_SYSINFO and returns oss_sysinfo->nummixers, whose value is the number of currently _enabled_ mixers only. Taking the bug report mentioned below (277615) as an example, suppose a system with 8 mixer devices total, but 3 of them are either disabled or non-existent, which means they will not show up under /dev, meaning we have 5 enabled mixer devices, which is also what the value of oss_sysinfo->nummixers will be. What mixer(8) will do is loop from 0 to 5 (instead of 8), and start calling mixer_open() on /dev/mixer0, up to /dev/mixer4, and as is expected, the first call will fail right away, hence the error shown in the bug report. To fix this, modify oss_sysinfo->nummixers to hold the value of the maximum unit in the system, which, although not necessarily "correct", is more intuitive for applications that will want to use this value to loop through all mixer devices. Additionally, notify applications that a device is unavailable/unregistered instead of skipping it. The current implementations of SNDCTL_AUDIOINFO, SNDCTL_MIXERINFO and SNDCTL_CARDINFO break applications that expect to get information about a device that is skipped. Related discussion can be found here: https://reviews.freebsd.org/D45135#1029526 It has to be noted, that other applications, apart from mixer(8), suffer from this. PR: 277615 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45256 --- lib/libmixer/mixer.3 | 7 +- sys/dev/sound/pcm/dsp.c | 23 +++++- sys/dev/sound/pcm/mixer.c | 201 ++++++++++++++++++++++++---------------------- sys/dev/sound/pcm/mixer.h | 2 - sys/dev/sound/pcm/sound.c | 41 ++++++---- 5 files changed, 155 insertions(+), 119 deletions(-) diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index af2a8ff135a8..a3593898ed68 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -20,7 +20,7 @@ .\" THE SOFTWARE. .\" -.Dd January 19, 2023 +.Dd May 22, 2024 .Dt MIXER 3 .Os .Sh NAME @@ -395,7 +395,10 @@ Playback and recording. .Pp The .Fn mixer_get_nmixers -function returns the total number of mixer devices in the system. +function returns the maximum mixer unit number. +Although this might sound as incorrect behavior, given that one would expect +"nmixers" to refer to the total number of active mixers, it is more intuitive +for applications that want to loop through all mixer devices. .Pp The .Fn MIX_ISDEV diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 4ee5d7c6738c..c737df33b97d 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2040,6 +2040,19 @@ dsp_unit2name(char *buf, size_t len, struct pcm_channel *ch) return (NULL); } +static void +dsp_oss_audioinfo_unavail(oss_audioinfo *ai, int unit) +{ + bzero(ai, sizeof(*ai)); + ai->dev = unit; + snprintf(ai->name, sizeof(ai->name), "pcm%d (unavailable)", unit); + ai->pid = -1; + ai->card_number = unit; + ai->port_number = unit; + ai->mixer_dev = -1; + ai->legacy_device = unit; +} + /** * @brief Handler for SNDCTL_AUDIOINFO. * @@ -2084,8 +2097,14 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) unit < devclass_get_maxunit(pcm_devclass); unit++) { d = devclass_get_softc(pcm_devclass, unit); if (!PCM_REGISTERED(d)) { - d = NULL; - continue; + if ((ai->dev == -1 && unit == snd_unit) || + ai->dev == unit) { + dsp_oss_audioinfo_unavail(ai, unit); + return (0); + } else { + d = NULL; + continue; + } } PCM_UNLOCKASSERT(d); diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 130333c7c442..0cf6a9f42f8f 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -105,11 +105,6 @@ static struct cdevsw mixer_cdevsw = { .d_name = "mixer", }; -/** - * Keeps a count of mixer devices; used only by OSSv4 SNDCTL_SYSINFO ioctl. - */ -int mixer_count = 0; - static eventhandler_tag mixer_ehtag = NULL; static struct cdev * @@ -701,22 +696,13 @@ mixer_delete(struct snd_mixer *m) snd_mtxfree(m->lock); kobj_delete((kobj_t)m, M_MIXER); - --mixer_count; - return (0); } struct snd_mixer * mixer_create(device_t dev, kobj_class_t cls, void *devinfo, const char *desc) { - struct snd_mixer *m; - - m = mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_SECONDARY, desc); - - if (m != NULL) - ++mixer_count; - - return (m); + return (mixer_obj_create(dev, cls, devinfo, MIXER_TYPE_SECONDARY, desc)); } int @@ -769,8 +755,6 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) pdev->si_drv1 = m; snddev->mixer_dev = pdev; - ++mixer_count; - if (bootverbose) { for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (!(m->devs & (1 << i))) @@ -839,8 +823,6 @@ mixer_uninit(device_t dev) d->mixer_dev = NULL; - --mixer_count; - return 0; } @@ -1411,6 +1393,17 @@ mixer_sysuninit(void *p) SYSINIT(mixer_sysinit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysinit, NULL); SYSUNINIT(mixer_sysuninit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysuninit, NULL); +static void +mixer_oss_mixerinfo_unavail(oss_mixerinfo *mi, int unit) +{ + bzero(mi, sizeof(*mi)); + mi->dev = unit; + snprintf(mi->id, sizeof(mi->id), "mixer%d (n/a)", unit); + snprintf(mi->name, sizeof(mi->name), "pcm%d:mixer (unavailable)", unit); + mi->card_number = unit; + mi->legacy_device = unit; +} + /** * @brief Handler for SNDCTL_MIXERINFO * @@ -1454,8 +1447,13 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) - continue; + if (!PCM_REGISTERED(d) || PCM_DETACHING(d)) { + if ((mi->dev == -1 && i == snd_unit) || mi->dev == i) { + mixer_oss_mixerinfo_unavail(mi, i); + return (0); + } else + continue; + } /* XXX Need Giant magic entry */ @@ -1463,89 +1461,96 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) PCM_UNLOCKASSERT(d); PCM_LOCK(d); - if (d->mixer_dev != NULL && d->mixer_dev->si_drv1 != NULL && - ((mi->dev == -1 && d->mixer_dev == i_dev) || + if (!((d->mixer_dev == i_dev && mi->dev == -1) || mi->dev == i)) { - m = d->mixer_dev->si_drv1; - mtx_lock(m->lock); - - /* - * At this point, the following synchronization stuff - * has happened: - * - a specific PCM device is locked. - * - a specific mixer device has been locked, so be - * sure to unlock when existing. - */ - bzero((void *)mi, sizeof(*mi)); - mi->dev = i; - snprintf(mi->id, sizeof(mi->id), "mixer%d", i); - strlcpy(mi->name, m->name, sizeof(mi->name)); - mi->modify_counter = m->modify_counter; - mi->card_number = i; - /* - * Currently, FreeBSD assumes 1:1 relationship between - * a pcm and mixer devices, so this is hardcoded to 0. - */ - mi->port_number = 0; - - /** - * @todo Fill in @sa oss_mixerinfo::mixerhandle. - * @note From 4Front: "mixerhandle is an arbitrary - * string that identifies the mixer better than - * the device number (mixerinfo.dev). Device - * numbers may change depending on the order the - * drivers are loaded. However the handle should - * remain the same provided that the sound card - * is not moved to another PCI slot." - */ - - /** - * @note - * @sa oss_mixerinfo::magic is a reserved field. - * - * @par - * From 4Front: "magic is usually 0. However some - * devices may have dedicated setup utilities and the - * magic field may contain an unique driver specific - * value (managed by [4Front])." - */ - - mi->enabled = device_is_attached(m->dev) ? 1 : 0; - /** - * The only flag for @sa oss_mixerinfo::caps is - * currently MIXER_CAP_VIRTUAL, which I'm not sure we - * really worry about. - */ - /** - * Mixer extensions currently aren't supported, so - * leave @sa oss_mixerinfo::nrext blank for now. - */ - - /** - * @todo Fill in @sa oss_mixerinfo::priority (requires - * touching drivers?) - * @note The priority field is for mixer applets to - * determine which mixer should be the default, with 0 - * being least preferred and 10 being most preferred. - * From 4Front: "OSS drivers like ICH use higher - * values (10) because such chips are known to be used - * only on motherboards. Drivers for high end pro - * devices use 0 because they will never be the - * default mixer. Other devices use values 1 to 9 - * depending on the estimated probability of being the - * default device. - */ - - snprintf(mi->devnode, sizeof(mi->devnode), "/dev/mixer%d", i); - mi->legacy_device = i; + PCM_UNLOCK(d); + continue; + } - mtx_unlock(m->lock); + if (d->mixer_dev->si_drv1 == NULL) { + mixer_oss_mixerinfo_unavail(mi, i); + PCM_UNLOCK(d); + return (0); } + m = d->mixer_dev->si_drv1; + mtx_lock(m->lock); + + /* + * At this point, the following synchronization stuff + * has happened: + * - a specific PCM device is locked. + * - a specific mixer device has been locked, so be + * sure to unlock when existing. + */ + bzero((void *)mi, sizeof(*mi)); + mi->dev = i; + snprintf(mi->id, sizeof(mi->id), "mixer%d", i); + strlcpy(mi->name, m->name, sizeof(mi->name)); + mi->modify_counter = m->modify_counter; + mi->card_number = i; + /* + * Currently, FreeBSD assumes 1:1 relationship between + * a pcm and mixer devices, so this is hardcoded to 0. + */ + mi->port_number = 0; + + /** + * @todo Fill in @sa oss_mixerinfo::mixerhandle. + * @note From 4Front: "mixerhandle is an arbitrary + * string that identifies the mixer better than + * the device number (mixerinfo.dev). Device + * numbers may change depending on the order the + * drivers are loaded. However the handle should + * remain the same provided that the sound card + * is not moved to another PCI slot." + */ + + /** + * @note + * @sa oss_mixerinfo::magic is a reserved field. + * + * @par + * From 4Front: "magic is usually 0. However some + * devices may have dedicated setup utilities and the + * magic field may contain an unique driver specific + * value (managed by [4Front])." + */ + + mi->enabled = device_is_attached(m->dev) ? 1 : 0; + /** + * The only flag for @sa oss_mixerinfo::caps is + * currently MIXER_CAP_VIRTUAL, which I'm not sure we + * really worry about. + */ + /** + * Mixer extensions currently aren't supported, so + * leave @sa oss_mixerinfo::nrext blank for now. + */ + + /** + * @todo Fill in @sa oss_mixerinfo::priority (requires + * touching drivers?) + * @note The priority field is for mixer applets to + * determine which mixer should be the default, with 0 + * being least preferred and 10 being most preferred. + * From 4Front: "OSS drivers like ICH use higher + * values (10) because such chips are known to be used + * only on motherboards. Drivers for high end pro + * devices use 0 because they will never be the + * default mixer. Other devices use values 1 to 9 + * depending on the estimated probability of being the + * default device. + */ + + snprintf(mi->devnode, sizeof(mi->devnode), "/dev/mixer%d", i); + mi->legacy_device = i; + + mtx_unlock(m->lock); + PCM_UNLOCK(d); - if (m != NULL) - return (0); + return (0); } return (EINVAL); diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 6c5c8f3ec3fe..7139a766b392 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -69,8 +69,6 @@ u_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev); void *mix_getdevinfo(struct snd_mixer *m); struct mtx *mixer_get_lock(struct snd_mixer *m); -extern int mixer_count; - #define MIXER_CMD_DIRECT 0 /* send command within driver */ #define MIXER_CMD_CDEV 1 /* send command from cdev/ioctl */ diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 072d42c4e989..8d97dcd60231 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -766,7 +766,12 @@ sound_oss_sysinfo(oss_sysinfo *si) */ si->nummidis = 0; si->numtimers = 0; - si->nummixers = mixer_count; + /* + * Set this to the maximum unit number so that applications will not + * break if they try to loop through all mixers and some of them are + * not available. + */ + si->nummixers = devclass_get_maxunit(pcm_devclass); si->numcards = devclass_get_maxunit(pcm_devclass); si->numaudios = devclass_get_maxunit(pcm_devclass); /* OSSv4 docs: Intended only for test apps; API doesn't @@ -797,23 +802,29 @@ sound_oss_card_info(oss_card_info *si) for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d)) - continue; - if (i != si->card) continue; - PCM_UNLOCKASSERT(d); - PCM_LOCK(d); - - strlcpy(si->shortname, device_get_nameunit(d->dev), - sizeof(si->shortname)); - strlcpy(si->longname, device_get_desc(d->dev), - sizeof(si->longname)); - strlcpy(si->hw_info, d->status, sizeof(si->hw_info)); - si->intr_count = si->ack_count = 0; - - PCM_UNLOCK(d); + if (!PCM_REGISTERED(d)) { + snprintf(si->shortname, sizeof(si->shortname), + "pcm%d (n/a)", i); + strlcpy(si->longname, "Device unavailable", + sizeof(si->longname)); + si->hw_info[0] = '\0'; + si->intr_count = si->ack_count = 0; + } else { + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + + strlcpy(si->shortname, device_get_nameunit(d->dev), + sizeof(si->shortname)); + strlcpy(si->longname, device_get_desc(d->dev), + sizeof(si->longname)); + strlcpy(si->hw_info, d->status, sizeof(si->hw_info)); + si->intr_count = si->ack_count = 0; + + PCM_UNLOCK(d); + } return (0); } From nobody Thu May 23 00:58:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t81q6jz5LNng; Thu, 23 May 2024 00:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8t800nNz4lly; Thu, 23 May 2024 00:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABWSO0OgC0lDAwMufVM9vU2Y1e08XOAZHFLNAmhFz4c=; b=dqu73Ai2wuh1idmyYc93WSVy9eMJQCxzoEqCi6OzJtOP5zMzisZmNL/2SjwO/rc/lC5ZXj 9cDsxwThJthCn91vZlN/SnBWBdEs+MioCgijPRTc9V5+fLZu7Y9//0xGfR2BijsDZlxg/o T9KhUbdrxrJ0sBJnkis35oBhhcdytHa0B/ndwtRN4rAgDLVAzbx2RKUHtg7jRVUeHOK8+U z3Wpsn2OfyxBE3FBW8opRJCHDxnDygOonCWAV366Ox5Gq+dAb5wW45YR00dcO4I6eIERZ8 PjFCRuowD2X38DtgxmeKNCBANqGV4/P1MwSzyHlJIMep6y1EWcGkr0WdJQU7VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425888; a=rsa-sha256; cv=none; b=t7BHrZjfN74tDge9RjzHrsRPt60Ct4J0geV71mRQ+U4HAX+mF2+8JGI3F0yeXennqXZyyQ 7c7PZLCx9DS/YU7Qa9N1W/ptsyzlLN4Kwo4zYXaE8GvAWbbbNPQbusUWJ986gzRcbahbBN VmLT+wZmRBgcEOE/6dBpjqehq7wkBi4lhyxfy/YNtLLhbTiIV6nk0wlHR0G1Hj6SEQbbCF CrWXuJleVUd+zLnDTIVzwDLK/NeDnoQEc82+Xg7Mm8D58KXR3+YY46OfJ8boYQYKu/ldWA ZrVAVS3BqhB4lB3bXxjJu2tGg2sMIieQxi80psALE0mGsu3fujUYlRCtF2GO8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABWSO0OgC0lDAwMufVM9vU2Y1e08XOAZHFLNAmhFz4c=; b=YXrJPnicFH7Q2fcQbxq+tsRiYliYhI0hKU3CCWOS4wgw/ylU52epvDNuKKDFzuvh6QvGj1 OH1OviJj8lg0TFrNw/GGLVLajBZ6M9/BrY9W5AhvUlKZIqjBadnwrt6kefx1EuhWB9+K7/ Iq8Gxxn9NcZrv1DMddQTO9Ag9VbB8RvQy1yztR2g2nHfX0kqNzfzxOmf6elKFPXRzUbh4+ RlmtMX2q83H5+TPjebsv+T+rYmCfMCEKDk8DOZdvXq021pQC2+oFGuVS8l/5dmGY69FHp0 kJWKI28iTTBN9sly4eOMcA31oeW3kJFwlDKdWlSFC/pHVAbEfgo3+Uee5F1exA== 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 4Vl8t76kXszSYg; Thu, 23 May 2024 00:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0w7U2071949; Thu, 23 May 2024 00:58:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w70Q071946; Thu, 23 May 2024 00:58:07 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:07 GMT Message-Id: <202405230058.44N0w70Q071946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 0e80798518be - main - mixer(8): Ignore mixer_open() failures for the -a option List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0e80798518be673bdad7245b627cb5bd7ec08888 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0e80798518be673bdad7245b627cb5bd7ec08888 commit 0e80798518be673bdad7245b627cb5bd7ec08888 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:25 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:25 +0000 mixer(8): Ignore mixer_open() failures for the -a option The most likely reason mixer_open() will fail is because either the device doesn't exist, or because it is disabled, so there is not reason to kill the application. Instead, continue and print the rest of the enabled mixers. PR: 277615 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45151 --- usr.sbin/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 47d8e6359b73..284ea955b7b4 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -99,7 +99,7 @@ main(int argc, char *argv[]) for (i = 0; i < n; i++) { (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i); if ((m = mixer_open(buf)) == NULL) - errx(1, "%s: no such mixer", buf); + continue; initctls(m); if (sflag) printrecsrc(m, oflag); From nobody Thu May 23 00:58:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8t93PBVz5LNlk; Thu, 23 May 2024 00:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8t91Ml3z4m2N; Thu, 23 May 2024 00:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSnSCvqef1rppD8iW29G256bdpiwRC5lY6t6YnOW7pk=; b=QZ+CjWWxYvLrTb/R8r2VaW4R7PT5sC438WneiSYD7kEp+FEJsYc0Z4onnI0kc8u+x0/WTt WaBcrWn2L8HrHx1GjI+3bsG0At1+/5Rig/3cTlZTLfuF8MWtjDEOTOtwzo5qx65zN1POVl jvYitg2IM2QWhMKnCv6ugPZHwNNhhkcLrtXoYo+G4q9SS5eHKixYqhBWuxGtrmgbHBd390 OpJt7UtW1Hkdd6vsbVnQNWEXVYPURLhEWc2sm/1n1kgxYJ3w3uywn3WozbsAvwWZucOn5D nkWMWpGV+4lVaBylKye9NejKmeJO6IJQUmxFy9SjV7u7/hIiRiJAMC+vPWYg0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425889; a=rsa-sha256; cv=none; b=iYoiIuxo6R/jqybipeUVaTukBX5QVB1bVhB9O50rElTLomnao4uE3cHrgxIilP4nlVTEcJ +Utk50xXC8+mETbgRitMqMihSHRJC3YmWZiMlnJYfazQJm4HA/QcZalAPJmSl6/Rq7scbE ncy3Jc71rFGrQQNA3hqkoOzz3V/zjyWaGoCx0eqQLcBiI48Vojw0O1nkx3vQ+5OAj9fxxI 065r7iyW6Prt19RKzijTekXQLh/OObzkL9k/mh+b8KsoA9VBI1hX4aVr2EKOqeraK1gs1a pI/1OoGImPlRtsGFXXnode2MZigC5EzdONMcItFpeJ/xJwryOo5Z7zAQdRXxvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSnSCvqef1rppD8iW29G256bdpiwRC5lY6t6YnOW7pk=; b=DpN9uMjb1PuaOxM1XsSd0QKrd7CMTCCQe3L2p5AoYxy0F9YpF6Jg6j9uwF5RWfXK1bBibr 2MQJ0WYcMW5d7qLu5WxWKZFcDp9uRRlGTjFINmb1Lj+Tc9MAP1Ik50HX3hbBjMKKgOyry2 J55PBfmjDp6OX3GDMe0UvBvKmctb4EHowUuCplq4EDWnCz3h5TnTJBIK7TEiSCZb4R0qg4 Tw58iIMO/10wyIUW8YTsrHYzoCMokIxSlk1DfC6mRKpR2CYIvliAm88qcBH7tWdZThW7Tf lBHZtYyd1kBwaFBXpGSiEzB6AopAf3zP/9zHiDTfQ6L2OUNCHdyE9Bqo64Or+Q== 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 4Vl8t90f1yzSYh; Thu, 23 May 2024 00:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0w80D071988; Thu, 23 May 2024 00:58:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0w8rk071985; Thu, 23 May 2024 00:58:08 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:08 GMT Message-Id: <202405230058.44N0w8rk071985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 67c89b21b956 - main - mixer(3): Implement mixer_get_path() function List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 67c89b21b95601c01bafe5a0c518d320a39111c0 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=67c89b21b95601c01bafe5a0c518d320a39111c0 commit 67c89b21b95601c01bafe5a0c518d320a39111c0 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:36 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:36 +0000 mixer(3): Implement mixer_get_path() function This is better than hardcoding device paths in mixer applications. Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45275 --- lib/libmixer/Makefile | 1 + lib/libmixer/Symbol.map | 4 ++++ lib/libmixer/mixer.3 | 40 +++++++++++++++++++++++++++++++++++++--- lib/libmixer/mixer.c | 25 +++++++++++++++++++++++++ lib/libmixer/mixer.h | 1 + 5 files changed, 68 insertions(+), 3 deletions(-) diff --git a/lib/libmixer/Makefile b/lib/libmixer/Makefile index 6ca17a9d020d..3f8a4dad4a65 100644 --- a/lib/libmixer/Makefile +++ b/lib/libmixer/Makefile @@ -22,6 +22,7 @@ MLINKS+= mixer.3 mixer_get_dunit.3 MLINKS+= mixer.3 mixer_set_dunit.3 MLINKS+= mixer.3 mixer_get_mode.3 MLINKS+= mixer.3 mixer_get_nmixers.3 +MLINKS+= mixer.3 mixer_get_path.3 MLINKS+= mixer.3 MIX_ISDEV.3 MLINKS+= mixer.3 MIX_ISMUTE.3 MLINKS+= mixer.3 MIX_ISREC.3 diff --git a/lib/libmixer/Symbol.map b/lib/libmixer/Symbol.map index f16e13d66e4c..2ce39fd058ab 100644 --- a/lib/libmixer/Symbol.map +++ b/lib/libmixer/Symbol.map @@ -19,3 +19,7 @@ FBSD_1.7 { mixer_get_mode; mixer_get_nmixers; }; + +FBSD_1.8 { + mixer_get_path; +}; diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index a3593898ed68..c8a7ee1148a8 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -40,6 +40,7 @@ .Nm mixer_set_dunit , .Nm mixer_get_mode , .Nm mixer_get_nmixers , +.Nm mixer_get_path , .Nm MIX_ISDEV , .Nm MIX_ISMUTE , .Nm MIX_ISREC , @@ -86,6 +87,8 @@ Mixer library (libmixer, -lmixer) .Ft int .Fn mixer_get_nmixers "void" .Ft int +.Fn mixer_get_path "char * buf" "size_t size" "int unit" +.Ft int .Fn MIX_ISDEV "struct mixer *m" "int devno" .Ft int .Fn MIX_ISMUTE "struct mixer *m" "int devno" @@ -398,7 +401,21 @@ The function returns the maximum mixer unit number. Although this might sound as incorrect behavior, given that one would expect "nmixers" to refer to the total number of active mixers, it is more intuitive -for applications that want to loop through all mixer devices. +for applications that want to loop through all mixer devices (see the +.Sx EXAMPLES +section). +.Pp +The +.Fn mixer_get_path +function writes the path of the mixer device specified in the +.Ar unit +argument to the buffer specified in +.Ar buf . +.Ar unit +can be either -1, in which case +.Fn mixer_get_path +will fetch the path of the default mixer, or between 0 and the maximum mixer +unit. .Pp The .Fn MIX_ISDEV @@ -470,9 +487,10 @@ The .Fn mixer_set_mute , .Fn mixer_mod_recsrc , .Fn mixer_get_dunut , -.Fn mixer_set_dunit +.Fn mixer_set_dunit , +.Fn mixer_get_nmixers , and -.Fn mixer_get_nmixers +.Fn mixer_get_path functions return 0 or positive values on success and -1 on failure. .Pp The @@ -542,6 +560,22 @@ TAILQ_FOREACH(dp, &m->devs, devs) { (void)mixer_close(m); .Ed +.Ss Loop through all mixer devices in the system +.Bd -literal +struct mixer *m; +char buf[NAME_MAX]; +int n; + +if ((n = mixer_get_nmixers()) < 0) + errx(1, "no mixers present in the system"); +for (i = 0; i < n; i++) { + (void)mixer_get_path(buf, sizeof(buf), i); + if ((m = mixer_open(buf)) == NULL) + continue; + ... + (void)mixer_close(m); +} +.Ed .Sh SEE ALSO .Xr queue 3 , .Xr sysctl 3 , diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c index 93ace1d0c69b..4abbed9b27d3 100644 --- a/lib/libmixer/mixer.c +++ b/lib/libmixer/mixer.c @@ -493,3 +493,28 @@ mixer_get_nmixers(void) return (si.nummixers); } + +/* + * Get the full path to a mixer device. + */ +int +mixer_get_path(char *buf, size_t size, int unit) +{ + size_t n; + + if (!(unit == -1 || (unit >= 0 && unit < mixer_get_nmixers()))) { + errno = EINVAL; + return (-1); + } + if (unit == -1) + n = strlcpy(buf, BASEPATH, size); + else + n = snprintf(buf, size, BASEPATH "%d", unit); + + if (n >= size) { + errno = ENOMEM; + return (-1); + } + + return (0); +} diff --git a/lib/libmixer/mixer.h b/lib/libmixer/mixer.h index cb9575c5f012..80a4b5c91a82 100644 --- a/lib/libmixer/mixer.h +++ b/lib/libmixer/mixer.h @@ -115,6 +115,7 @@ int mixer_get_dunit(void); int mixer_set_dunit(struct mixer *, int); int mixer_get_mode(int); int mixer_get_nmixers(void); +int mixer_get_path(char *, size_t, int); __END_DECLS From nobody Thu May 23 00:58:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8tB4SlGz5LNsq; Thu, 23 May 2024 00:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8tB2Js4z4lxJ; Thu, 23 May 2024 00:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZp6aJ6FfzK12ZSWK7HeBy1RA6NB8AVEKfowJQD8/xE=; b=IeZyzOSvPN2DU4ckurz/7+z4LREjtcmPGICdSdBKcHZnXnGynXeI8VlDdoYqU/LbKmdtxV m3mEl19SRsODgXZFZ7tsczjHkUmlt93W3lXADhu9vxTncFklgM0F/2mTvWy8GJeg8L5A+m z9tafGYLszVGvogncSocUDZsxxRYkFLoV9FZfT4bCsy7BrTZc/MdaATPNBMhY+yxnGQUMR 34R/bTj38V5blGioUhF7aGFHiiA7vKzg4Owwz79KQjQn8qKQ+e22wN6hWnCbs0/4LuP7so Nzwj+DakLK0MWRMxcjiEOIkn1Gqf+HnHL+qAPhVl7z/UOvWOfLNohHzRYzVzLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425890; a=rsa-sha256; cv=none; b=EmzIyGKE+kMeXPHyxncxO6JDvh/ba1NehoRJY4WC3Q1Jp3d7iHb+3xqFC5I0vL5je5jTKi UCG1091puZ4NsNb1zkP2mBS7d46vNlOIXJzmdQ8FYwkcvI+c3JATYl52WkNouWsPzGbdXy ikGWlD30tFqTo9xAzkx5gxtbR7o4Wngixb4IFFPH81HzxkdpfsEGQAUWz+Qgtn9wRd3p8A WckePHam0Rgp+/VLfJbmBJqmMhquARLROUxUbMIgutFSGn3hR9qw9aszChix6vPq6K5Dr1 mZxK5HfBMEFxl0HrBC6bnpI6kaE/KCHNOfAEEVKNWnBrdmt7dBOQRokHsrgirA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aZp6aJ6FfzK12ZSWK7HeBy1RA6NB8AVEKfowJQD8/xE=; b=IyU1JDwifXeizN0+DjR2qekMqghhMKZ9XFclx7NvJwa5oznvMu4ApmtyPnWIjSE1A1L0Rl uONXEVW3XnaaoGabPcD4UaeaqJ7olphk+DdgxlC3YDHLqfiEn59KTBDQLiDImsheSuw5Vx rUk2rw/7d/rYdAYW02yIdwZS/xDDrKstfuIEwGi5Z/j4mtMlHk6TLYjSXf2sibGsAaRvEj z7amdki2qjWrYMeyIcw9c3qUyMRD0I3LlSgOEkKv6711XXZmBujCT9xAqxMKkG4ZHluL3K 88VyNHN47TSiFYychyZHcrKtjs5Gk4ub9HegfwP3a6ldgZbc0bnQHi28FBiq2g== 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 4Vl8tB1d84zSTQ; Thu, 23 May 2024 00:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0wA53072026; Thu, 23 May 2024 00:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0wAsN072023; Thu, 23 May 2024 00:58:10 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:10 GMT Message-Id: <202405230058.44N0wAsN072023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: e3b94b375e1d - main - mixer(8): Use mixer_get_path() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f commit e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:43 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:43 +0000 mixer(8): Use mixer_get_path() Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45276 --- usr.sbin/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 284ea955b7b4..07dd16536495 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -97,7 +97,7 @@ main(int argc, char *argv[]) if ((n = mixer_get_nmixers()) < 0) errx(1, "no mixers present in the system"); for (i = 0; i < n; i++) { - (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i); + (void)mixer_get_path(buf, sizeof(buf), i); if ((m = mixer_open(buf)) == NULL) continue; initctls(m); From nobody Thu May 23 00:58:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8tC67ZXz5LNnk; Thu, 23 May 2024 00:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8tC320Rz4lvG; Thu, 23 May 2024 00:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zy9zlmD6VT3se/etVyQy9UFAZT665oTVT6qRdLv7NFk=; b=yPGczrwk50FzZkzSIslNl4OtQE3rfvyKBZnaKsEBNycNvECDDdqflmgMqf326uH44osi7c saiRUdUpN9jOEAPUsfUqGv19ZcZJ6SuCLl4Y6I+fB+hxZYbsojIAH44Szxr8J73Z+ZDOuH vlqGnEMGPOLkLIvvA0+b40MH9f69dBWfpIgg7so69ZuaoD5kn9V9m7SKGSnjMYTi/KFqvt QkJN/9bPIqojlAfimv2Yqz413bqA/KfAKmla7stdM178wXs3RmUg3jaltjMSgwhyzZ9nUX w2BtLv4WtDpQNmSNSgMk35iVKDHB+vNCEpRmjcKQkspLlgqwi3acbziZdcfRcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425891; a=rsa-sha256; cv=none; b=ydHxl39Ob4StpPwzAekcXmn1PSsm13MCti+Sd+eP6WtNZkw+7lvAqu95i2nEe97ScHv5BV nryZ9gMlOhApvUcUVqGyoR4l4iFYpE89ocmMZPXO9pqeRZOMeZAJeG9SuNiHlykmCGKx5U WkWkcIo9LsJYgSbE2X4SqckxMEvClwiz2hLAffeHK6QMRcHFe+fPxl8D6z107djb+zi+VJ c8sPysf30umrEKGObcC8g7WGAD1ri0AOaBz34UpgutifB/fWByq17SQjKbpk44EOYzkzHF zp5Zq0L0VioQ69nOHXbGsAnLhW3gjzfIhgcqWxUz8cg7+D0DCDd5iNWS9lRIUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zy9zlmD6VT3se/etVyQy9UFAZT665oTVT6qRdLv7NFk=; b=SgXvRvLQ66Sbn34D9fuDWSv++UxYUl+FU43pBMZ0BklR/MItblIkrK9Pfk9XxTG18h0fC4 h3MBdJRNh5y449pYppe84ijyH+piys+adhBe7Mp2KYU/21IEMnlJWCIanUHQLdr9Y81s9h JNibRVM+LWl87WdLtZ7oGa6YhDmwxL4ukCk9CcDICqagF60xSrpJPae/Wi4amgXPo7jmwy qP2HRDFGuh93oTmkGv6GIZZT2O6cM1J64ts97/w1TZcDyS3UG9Z28nMxCT8zORCKxAUWre YGkUEfgra5Ci22YiyZUib4MdfvHqqSYm3Ug9lJu4FgceQdTSFnFA5qQ3QDI83Q== 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 4Vl8tC2dxszSqT; Thu, 23 May 2024 00:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0wBZw072068; Thu, 23 May 2024 00:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0wB5Y072065; Thu, 23 May 2024 00:58:11 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:11 GMT Message-Id: <202405230058.44N0wB5Y072065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 1ab62c8d0674 - main - mixer.3: Fix mandoc -Tlint warnings List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1ab62c8d067454b77bc9fb1c5aac75f263bb4143 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1ab62c8d067454b77bc9fb1c5aac75f263bb4143 commit 1ab62c8d067454b77bc9fb1c5aac75f263bb4143 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:49 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:49 +0000 mixer.3: Fix mandoc -Tlint warnings Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45290 --- lib/libmixer/mixer.3 | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index c8a7ee1148a8..4008867ef2fb 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -19,7 +19,6 @@ .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN .\" THE SOFTWARE. .\" - .Dd May 22, 2024 .Dt MIXER 3 .Os @@ -168,13 +167,15 @@ is always equal to the number of that pcmX device. For example, if the audio device's number is 0 (i.e pcm0), then .Ar unit is 0 as well. -This number is useful when checking if the mixer's audio card is the default one. +This number is useful when checking if the mixer's audio card is the default +one. .It Fa ndev Number of devices in .Ar devs . .It Fa devmask Bit mask containing all supported devices for the mixer. -For example, if device 10 is supported, then the 10th bit in the mask will be set. +For example, if device 10 is supported, then the 10th bit in the mask will be +set. By default, .Fn mixer_open stores only the supported devices in devs, so it is very unlikely this mask will @@ -318,23 +319,27 @@ opens the default mixer (hw.snd.default_unit). The .Fn mixer_close function frees resources and closes the mixer device. -It is a good practice to always call it when the application is done using the mixer. +It is a good practice to always call it when the application is done using the +mixer. .Ss Manipulating the mixer The .Fn mixer_get_dev and .Fn mixer_get_dev_byname -functions select a mixer device, either by its number or by its name respectively. -The mixer structure keeps a list of all the devices, but only \ -one can be manipulated at a time. -Each time a new device is to be manipulated, one of the two functions has to be called. +functions select a mixer device, either by its number or by its name +respectively. +The mixer structure keeps a list of all the devices, but only one can be +manipulated at a time. +Each time a new device is to be manipulated, one of the two functions has to be +called. .Pp The .Fn mixer_set_vol function changes the volume of the selected mixer device. The .Ar vol -parameter is a structure that stores the left and right volumes of a given device. +parameter is a structure that stores the left and right volumes of a given +device. The allowed volume values are between MIX_VOLMIN (0.0) and MIX_VOLMAX (1.0). .Pp The @@ -355,7 +360,8 @@ Toggle the device's mute (e.g mute if unmuted and unmute if muted). The .Fn mixer_mod_recsrc function modifies a recording device. -The selected device has to be a recording device, otherwise the function will fail. +The selected device has to be a recording device, otherwise the function will +fail. The .Ar opt parameter has to be one of the following options: From nobody Thu May 23 00:58:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vl8tD5H0qz5LNqc; Thu, 23 May 2024 00:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vl8tD42S2z4m7R; Thu, 23 May 2024 00:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0n4CXbHtTcBLi0TrD5wpkNxokbuQCZrOsuLrkXTPa4=; b=sBq03J3HAv/LREchYEe6kWc3F1oSiIinOLrmrmKD2vBWnd4TNcGJLvKCXwygxjJ2mjMXDl LurqfIXJdiIGG3tKzp9Qc16BX240l224PHCPrUHO84Sk654KerfE9fbrElhS8GepxiJsID gY3qqR98crY5nqhH7pbumQ+CL1kUltkCFnuAsudzTL/Hz8Ey4DxJnM1n5rDb1fmr4hMcu/ YCa3Wf6WAJIdaJiV1IO0XezvuTBAwZeje+9B8rTHYZqAmtUaF3fg97t+LZKANQYNoHEZuW x8hAIySHwcjU7NwdQb5fOsAqvEAhmPjY4Y2UYuFzgQ/n82TXyUICdWJMEf+NKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716425892; a=rsa-sha256; cv=none; b=VxNJW/5ZX1EOpRUv2ebH1TB00Dc4ZAVTB34tcpeJF1yb8ArDmYQv2fYZhFoays6NjwPklR Sz4gkB5ZCxDf82eMscr3WZmF/EoOK5roz/ECW6ev1hPFawzUWQPqdcMPRfp6nMF3FZxIIW iylnq6/WwaqeSKJyJcsm8tSSMmd5VhP+vVKAQB+USkk88mxjxo5Ryi2rubzhEurxx/rIrb cvauXz1L24xuaCeHEY1ksaGRCcSV+0f2TS8SFhSvEMkeLuZWnd+DervA++ja6obYC8iEqL HJtpm9tUR1UrelvbNmJ78FEo/YgwJz4sj0XQu/UWhKRb3dpz+NOlMPLWgtD5TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716425892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0n4CXbHtTcBLi0TrD5wpkNxokbuQCZrOsuLrkXTPa4=; b=Dj0it7MzQpRhgVf45FESSzJf3CE+fCPglP5G0yEaWksP7ixjS87ouvnetPTrpZvSX/dgf7 LTa7t/tH6eKJHDtLuSCRoalBm10BaNG3XHUafB6lvA0sjKH5NOdbn/UkN6TV5Gsgiz+V9q 10LipmNFjUDfB5kfeaTRE0qblcvkXxHIgA90b3g9s7oBd2hADMCDWpFEBL4mypnnHhQ7kL rjQn+ClJt5uGw/PtOIvAPwNMLYHS4Xk+mynQuJ/KRA22F5ht4C6/euU/OphCKOJ+9kYYUs GRRuLory9eNOd6uQH/5ZtsztZltdLbAHe0F9t8Zgn9zFFjV/EK2d4weJ7lWXpw== 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 4Vl8tD3fK8zSYj; Thu, 23 May 2024 00:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N0wCpN072125; Thu, 23 May 2024 00:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0wCaN072122; Thu, 23 May 2024 00:58:12 GMT (envelope-from git) Date: Thu, 23 May 2024 00:58:12 GMT Message-Id: <202405230058.44N0wCaN072122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 425a7bc465d4 - main - sound: Fix minchn, maxchn and fmts in sndstat_get_caps() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 425a7bc465d4a6393c88c2e79c5ad77befda2a97 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=425a7bc465d4a6393c88c2e79c5ad77befda2a97 commit 425a7bc465d4a6393c88c2e79c5ad77befda2a97 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:55 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-23 00:57:55 +0000 sound: Fix minchn, maxchn and fmts in sndstat_get_caps() The current implementation (incorrectly) passes the channel encoding value to AFMT_CHANNEL(), which will always return 0, since the channel number bits are masked out by AFMT_ENCODING(). Also add missing fmts initialization and aggregate encoding formats into it directly. Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45312 --- sys/dev/sound/pcm/sndstat.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index bbcb2fda7c29..6880ce383ba4 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -330,7 +330,6 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, uint32_t *max_rate, uint32_t *fmts, uint32_t *minchn, uint32_t *maxchn) { struct pcm_channel *c; - unsigned int encoding; int dir; dir = play ? PCMDIR_PLAY : PCMDIR_REC; @@ -347,11 +346,11 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, return; } + *fmts = 0; *min_rate = UINT32_MAX; *max_rate = 0; *minchn = UINT32_MAX; *maxchn = 0; - encoding = 0; CHN_FOREACH(c, d, channels.pcm) { struct pcmchan_caps *caps; int i; @@ -364,9 +363,9 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, *min_rate = min(caps->minspeed, *min_rate); *max_rate = max(caps->maxspeed, *max_rate); for (i = 0; caps->fmtlist[i]; i++) { - encoding |= AFMT_ENCODING(caps->fmtlist[i]); - *minchn = min(AFMT_CHANNEL(encoding), *minchn); - *maxchn = max(AFMT_CHANNEL(encoding), *maxchn); + *fmts |= AFMT_ENCODING(caps->fmtlist[i]); + *minchn = min(AFMT_CHANNEL(caps->fmtlist[i]), *minchn); + *maxchn = max(AFMT_CHANNEL(caps->fmtlist[i]), *maxchn); } CHN_UNLOCK(c); } From nobody Thu May 23 02:41:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlC9t3JFLz5LZ2j; Thu, 23 May 2024 02:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlC9t1xf1z42PW; Thu, 23 May 2024 02:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zeCGx0iJUrR8TcVh23WiIwaS5QaQUwCaV29dRiqEKHk=; b=RzApUkwXi50zLgcy7JZYSDqKLFBtnyPrl0cWoCHN9l5tZICfy7N6rgaYTR69l0omvX6Nvv X4wOhz9OD5HEWbNn4zRv8QrEQZu6UxPDRGspvmoEm6EhwI8IqpXjpFYUAP8sO+vYwbTHoI X6L8+Hl8BETN+iE5hLgi77h7GgMC2T7oi2txIRRRV9vZqFaz1HzHHjozJwIdhTwwqLLpby gtOn7dfUJrWkJmqx5HXXaiWn7f4iDohO9qj6UXyaPwKA5VwHPc9apQ71jOIGce47aRVAgQ WRPqcHVH/9XExhsZZf3pgbgJC5pU6NAFY6r9uqhs4Cw+5TR3nJYtJN1VUEKtcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432114; a=rsa-sha256; cv=none; b=DTWcScmFdxStzWNZF9aAIuK+wfKg1mFN+I8gqlFsiBVO5gfIkXsd52aQtXeWn3JVyemZTw FutZSi31SgiLHYqYafFzW6lgnldypWN/o4O06PW0XhtZNfJ4JcF9qYvMmhLj8hDUGFkNh3 4wccNFzb4mOq2sgyQcwFSBPA9yH4OUF0OS8ULuT1KFye3sljr1djkiYSu6nIOM7CFUHkdn iboBQp7xRXJZjiYRjGkxRspQNaWUyDDNtZH9OL9EnqYpdVv7N8NkoAjgMTpLrakqfQJJk+ OfdpnCcHxgFfyGskme4x2W/8dw3AW/kRIMHWnljHbDVvQhqvs/JH4YtDf1p+8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zeCGx0iJUrR8TcVh23WiIwaS5QaQUwCaV29dRiqEKHk=; b=kgbepy9Ie0hKyXYsWsNHkCY/ycZHfDJj3VxZjMOLUii46Iw5Fo/zO1dmQ64i198QN05v2X lELirOevKMtneWPrcIYDWLa9jkG3zTkpf5g9pe4G0lM5JDKqtEYBoF+9vJoJiKu0KDVMSN l2xOrW5UCofBX2OZF2aTV1oQODJAt9Nq6ij4z0IV6Mm41dSsC/LANqLEmtWaM7F3JT3SfY TV/uStNCLYnuNg/rXIN+CeY2xG3RNB4mUL0fSKxTz6o68ZeeY+1YA7VaXfq8lfqKBIWySf qUvob6N1pALI284mNzp5gGHVq8kMqtq295HqXmydwTmtZL57+KI4nL9kw+vLOA== 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 4VlC9t1YGNzX78; Thu, 23 May 2024 02:41:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2fsMN053692; Thu, 23 May 2024 02:41:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2fsml053681; Thu, 23 May 2024 02:41:54 GMT (envelope-from git) Date: Thu, 23 May 2024 02:41:54 GMT Message-Id: <202405230241.44N2fsml053681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: 42e50eaf7f6f - stable/14 - Add man page for the ice network driver. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 42e50eaf7f6f4459f1217564fd143ae4f8127154 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=42e50eaf7f6f4459f1217564fd143ae4f8127154 commit 42e50eaf7f6f4459f1217564fd143ae4f8127154 Author: Mathieu Simon <freebsd@simweb.ch> AuthorDate: 2024-05-21 05:49:50 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:41:32 +0000 Add man page for the ice network driver. PR: 262892 MFC after: 3 days Reviewed by: concussious.bugzilla@runbox.com, erj Differential Revision: https://reviews.freebsd.org/D45270 (cherry picked from commit 8e5e42d54ad3093e38263814d1f3e7d8406d5421) --- share/man/man4/Makefile | 2 + share/man/man4/ice.4 | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 252 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index a97c92b960f5..10ae7f3cef19 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -209,6 +209,7 @@ MAN= aac.4 \ hwpmc.4 \ ${_hwpstate_intel.4} \ iavf.4 \ + ice.4 \ ichsmb.4 \ ${_ichwd.4} \ icmp.4 \ @@ -690,6 +691,7 @@ MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ice.4 if_ice.4 MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 new file mode 100644 index 000000000000..da46c758479c --- /dev/null +++ b/share/man/man4/ice.4 @@ -0,0 +1,250 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Copyright (c) 2019-2020, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms of the Software, 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. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this Software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.Dd May 20, 2024 +.Dt ICE 4 +.Os +.Sh NAME +.Nm ice +.Nd "Intel Ethernet 800 Series Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iflib" +.Cd "device ice" +.Ed +.Pp +To load the driver as a module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ice_load="YES" +.Ed +.Sh DESCRIPTION +.Ss Features +The +.Nm +driver provides support for any PCI Express adapter or LOM +(LAN On Motherboard) +in the Intel Ethernet 800 Series. +As of this writing, the series includes devices with these model numbers: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your adapter. +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +This value coincides with the maximum Jumbo Frame size of 9728. +.Pp +This driver version supports VLANs. +For information on enabling VLANs, see the +.Pa README . +.Pp +Offloads are also controlled via the interface, for instance, checksumming for +both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can +be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Ss Additional Utilities +There are additional tools available from Intel to help configure and update +the adapters covered by this driver. +These tools can be downloaded directly from Intel at +.Lk https://downloadcenter.intel.com , +by searching for their names, or by installing certain packages: +.Bl -bullet +.It +To change the behavior of the QSFP28 ports on E810-C adapters, use the +Intel EPCT (Ethernet Port configuration tool); installed by the +.Em sysutils/intel-epct +package. +.It +To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) +Update Utility for Intel Network Adapter 800 series; installed by the +.Em sysutils/intel-nvmupdate-100g +package. +.El +.Sh HARDWARE +Most adapters in the Intel Ethernet 800 Series with SFP28/QSFP28 cages +have firmware that requires that Intel qualified modules are used; these +qualified modules are listed below. +This qualification check cannot be disabled by the driver. +.Pp +The +.Nm +driver supports 100Gb Ethernet adapters with these QSFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 E100GQSFPSR28SRX +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 SPTMBP1PMCDF +.It +Intel\(rg 100G QSFP28 100GBASE-CWDM4 SPTSBP3CLCCO +.It +Intel\(rg 100G QSFP28 100GBASE-DR SPTSLP2SLCDF +.El +.Pp +The +.Nm +driver supports 25Gb and 10Gb Ethernet adapters with these SFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 10G/25G SFP28 25GBASE-SR E25GSFP28SR +.It +Intel\(rg 25G SFP28 25GBASE-SR E25GSFP28SRX (Extended Temp) +.It +Intel\(rg 25G SFP28 25GBASE-LR E25GSFP28LRX (Extended Temp) +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with these SFP+ modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSR +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG1P5 +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG2P5 +.It +Intel\(rg 10G SFP+ 10GBASE-SR E10GSFPSRX (Extended Temp) +.It +Intel\(rg 1G/10G SFP+ 10GBASE-LR E10GSFPLR +.El +.Pp +Note that adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. +.Pp +This is not an exhaustive list; please consult product documentation for an +up-to-date list of supported media. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +See the +.Xr iflib 4 +man page for more information on using iflib sysctl variables as tunables. +.Bl -tag -width indent +.It Va hw.ice.#.enable_health_events +TBW +.It Va hw.ice.#.debug.enable_tx_fc_filter +TBW +.It Va hw.ice.#.debug.enable_tx_lldp_filter +TBW +.It Va hw.ice.#.debug.enable_health_events +TBW +.El +.Sh SYSCTL PROCEDURES +.Bl -tag -width indent +.It Va dev.ice.#.fc +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is +TX pause. +.It Va dev.ice.#.advertise_speed +Allows one to set advertised link speeds, this will then cause a link +renegotiation. +.It Va dev.ice.#.current_speed +This is a display of the current setting. +.It Va dev.ice.#.fw_version +Displays the current firmware and NVM versions of the adapter. +.It Va dev.ice.#.ddp_version +TBW +.It Va dev.ice.#.requested_fec +TBW +.It Va dev.ice.#.negotiated_fec +TBW +.It Va dev.ice.#.fw_lldp_agent +TBW +.It Va dev.ice.#.ets_min_rate +TBW +.It Va dev.ice.#.up2tc_map +TBW +.It Va dev.ice.#.pfc +TBW +.El +.Sh INTERRUPT STORMS +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr iflib 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.2 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Intel Corporation Aq Mt freebsd@intel.com . From nobody Thu May 23 02:41:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlC9v5fPqz5LZ5P; Thu, 23 May 2024 02:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlC9v2zP5z42ML; Thu, 23 May 2024 02:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tn3IyRI0eV8ZAy7J+14LgrOGmTVRB2hGL5vOMEBQDl0=; b=sK4tRHQeD7z+4UfEg/rrbQwcg5elKAgvboJqc/P1auv4UUS4nwLPdQ0oKmO6v9/73IoPEP phvY+p9hhriAR8N6WAeVCZu7GiDLG9wPms6eat9AABuSWwAR12bOeTFY94OvA84L0zMLdr z0tXj4mXTpYoGZB3w1c0DznqUHnvOSgGCIywKlbIc5EgQaj9cneKRC36rVz2dnksNw0rxL NB8CFlbwyjFIXm+DcTWTpU/tDF3IkCN9RsnH1RlkNJeqSUQYqvl4TYaoc//lPX3diz6bSo RD1iCgFoynK0bg+fmAScei2wACIGjg/lSkaPnU0G2vyjeqtwnq2fkPX2iGJmdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432115; a=rsa-sha256; cv=none; b=gB24aPr8Fm2An5R7RjZC8jnn6mvovA3Gn80EkJi4oM6kQhxwUA9m1aD5W2HhsRjqacOBog u/dP0nnpX9Q1K+LSv4KsR55mEh6bEJc3Aih4ODk72ZuiuXwtwwzFiBc6tpalm+iV6zhuQS 9EAyNOEha+/vNOno8etXGNvtMToxlwdtk3/YyKAZfA2NB7mHeL/LgUxAPF0XAbQq80qR9W WzuHdihl+PYXfFpAgoDvW3LpuZ9e8G804hZB9PTd9iNU4fCzgrVEdSVvMjqV/idVJ7fPZz FTISmfp+a5xIlwxVT9mMwa3P0ISc+7Pf8dirTk46uE8kxVQS48MedShOnQST3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tn3IyRI0eV8ZAy7J+14LgrOGmTVRB2hGL5vOMEBQDl0=; b=AKHXGXt0KH4EnQ+KTh7US0fvoi1gMwYo1OZXb2nj9Q6k3Cs6qHZexbB3sMPSeXsLcFlMts 95IOKRbr6erLaxWGC+qCC9sX7LUcsgNBtcQc5agNSaLUQbqgm6jgvc/9laZ4GQzEZtkmkd zND7isjKsWiUV5T2HT/6Nn3CqBCWwqljfzeqYkPvkUVFUATNWRjkwq2MHLJoycb5trPHgm /9c3xqK05tEO3CmrVQOiPw+krxtsDrAof/BGbxMd8Ejw6c10+baTS+Ipqz4bvUo6ydbLo6 yVnMI3SJYPKiaxu1Ze/iuYYxgZx/W2iIYsE4J7utABjl5j9RBVeX00kI+F2Cbg== 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 4VlC9v2bB7zXbc; Thu, 23 May 2024 02:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2ftGD054196; Thu, 23 May 2024 02:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2ftsJ054193; Thu, 23 May 2024 02:41:55 GMT (envelope-from git) Date: Thu, 23 May 2024 02:41:55 GMT Message-Id: <202405230241.44N2ftsJ054193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: f075b6113726 - stable/14 - access.2: Mention that lstat(2) should be used for symbolic links List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f075b6113726d74342d4af15dfab60709f50b859 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f075b6113726d74342d4af15dfab60709f50b859 commit f075b6113726d74342d4af15dfab60709f50b859 Author: Gordon Bergling <gbe@FreeBSD.org> AuthorDate: 2024-05-13 08:40:12 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:41:32 +0000 access.2: Mention that lstat(2) should be used for symbolic links access(), eaccess() and faccessat() will always dereference symbolic links. So add a note in the manual page, that lstat(2) should be used in the case of symbolic links. PR: 262895 Reviewed by: gbe, pauamma_gundo.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44890 (cherry picked from commit 421025a274fb5759b3ecc8bdb30b24db830b45ae) --- lib/libc/sys/access.2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 681e4483a9e6..64ed1133b23d 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -27,7 +27,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd March 30, 2021 +.Dd May 13, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -149,6 +149,15 @@ Likewise for .Dv R_OK and .Dv W_OK . +.Pp +.Fn access , +.Fn eaccess +and +.Fn faccessat +will always dereference symbolic links. +If the symbolic link itself needs to be referenced, +.Xr lstat 2 +should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS From nobody Thu May 23 02:41:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlC9w5ltKz5LYtY; Thu, 23 May 2024 02:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlC9w40hBz42dR; Thu, 23 May 2024 02:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eFa41nT7sMbFZCZ6armDW6yGlfLOs3YlR5OkDKMaxNU=; b=ftsJ1uU949pASCkStKD+Wleq53Kfgx1Cq6/sW+s5HVaqoKsYonEHs4YcNLPne383Bx/q4K VsSzd1497CDqwT2slii8nKNoFHIDc3EGqRVqi22wMZ08BEBj3RIoOqzfr11bFPOdcmVmEr 51Ock5wp5HBLqyJ6QYu2Qy/E2BpyB1pMriudO6+57lKGgbfD3CGs206pHMuvR/+lfjJcAm AHkZZEcjCOGIlwRPLCWbkEFSUmBFVFOTDDz83t8X3hRPmFFkbxGRs65ZeZNOHe/nbjr4Z9 PNJT38V+w8ZAxmvuYP68M4t8x3Le6YQAjjtsmBPwVK27/GLeL08NzrxSctAdBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432116; a=rsa-sha256; cv=none; b=Zimremh+n/W6/rGUec6irJ0lrdSEjx1Qw8PEJ7ctZgQaeh5jkxmEW6hxhhMjN3xX/9iTT/ 9l1ZLdiiA4+Uq/bXq387A6Qa32nEvbWJKRdaY75YMFRJXg0mks8cVmyyKS+8mu475CFK+3 rhfMbGROJ5HXik3jSWDpZi13qGWTlxjPVajQu5KmJFHPSyEWqPeRB6dYtwCmBIXNMAmqgu sHPGt93ZmzZLcKaI0KvDuuw6/xkOY5x0aqTy9pXwlBzvTi2zujwj2DwuWymNrXFTqIwmos KbumMuc9a3b7b8gF6xwcBdOP2TegVkj84tVyxju1dQSubT60lGpzfpil7iUC0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eFa41nT7sMbFZCZ6armDW6yGlfLOs3YlR5OkDKMaxNU=; b=EWnzTjkfTjruBaXTjh1KtcxfeaTIB0ey19rps1lmYNidjhLQHFff4ZrcbVu2y2BXU9t9yY Q+zrzKxwaUDOmkImBKFmkOFlZWS7IBuJFGrDV/l15/73OV5bbnCKgxO2Y9x6JAyJb+movk jEdQgSAWB6mhkX1nw9wBQk9gXumIlx929RqYG0ggCwhuDA7pC7OrzxzU8AIqmigRPNvoiN BrJdMIXetcNAhr6f2qYjTSs+A5YENQziNTi4yWFqXVAkIS/14Iyu1lqmGtw5AVbD+I2OzF C0DN13TPgqpqVB02yvMnFAzhEkIh1KiKmimLcnIhTuzyHQXs0Zi231baBb8rLw== 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 4VlC9w3cLJzXQH; Thu, 23 May 2024 02:41:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2fuDa054248; Thu, 23 May 2024 02:41:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2fuAf054245; Thu, 23 May 2024 02:41:56 GMT (envelope-from git) Date: Thu, 23 May 2024 02:41:56 GMT Message-Id: <202405230241.44N2fuAf054245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: 79b39f23e134 - stable/14 - access(2): Discourage use of these system calls. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 79b39f23e1341bdc3ab9c6a08e1506d40b8b6dbc Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=79b39f23e1341bdc3ab9c6a08e1506d40b8b6dbc commit 79b39f23e1341bdc3ab9c6a08e1506d40b8b6dbc Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2024-05-21 22:35:22 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:41:32 +0000 access(2): Discourage use of these system calls. Fixes: 421025a274fb PR: 262895 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45240 (cherry picked from commit a4be1eb21165d7aedae9dc6634528619ff10d025) --- lib/libc/sys/access.2 | 105 ++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 55 deletions(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 64ed1133b23d..8595444720b1 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -27,7 +27,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd May 13, 2024 +.Dd May 21, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -47,35 +47,43 @@ .Fn faccessat "int fd" "const char *path" "int mode" "int flag" .Sh DESCRIPTION The -.Fn access -and +.Fn access , .Fn eaccess -system calls check the accessibility of the -file named by -the +and +.Fn faccessat +system calls report whether an attempt to access the file designated +by their .Fa path -argument -for the access permissions indicated by -the +in the manner described by their .Fa mode -argument. +argument is likely to succeed. The value of .Fa mode -is either the bitwise-inclusive OR of the access permissions to be -checked -.Dv ( R_OK +is either the bitwise-inclusive OR of the desired permissions +.Po +.Dv R_OK for read permission, .Dv W_OK for write permission, and .Dv X_OK -for execute/search permission), -or the existence test -.Pq Dv F_OK . +for execute / search permission +.Pc +or +.Dv F_OK +to simply check whether the file exists. .Pp -For additional information, see the -.Sx "File Access Permission" -section of -.Xr intro 2 . +For a number of reasons, these system calls cannot be relied upon to +give a correct and definitive answer. +They can at best provide an early indication of the expected outcome, +to be confirmed by actually attempting the operation. +For existence checks, either +.Xr stat 2 +or +.Xr lstat 2 +should be used instead. +See also +.Sx SECURITY CONSIDERATIONS +below. .Pp The .Fn eaccess @@ -89,6 +97,13 @@ the real user ID in place of the effective user ID, the real group ID in place of the effective group ID, and the rest of the group access list. .Pp +See the +.Sx DEFINITIONS +section of +.Xr intro 2 +for additional information on file access permissions and real +vs. effective user and group IDs. +.Pp The .Fn faccessat system call is equivalent to @@ -116,8 +131,10 @@ list, defined in .In fcntl.h : .Bl -tag -width indent .It Dv AT_EACCESS -The checks for accessibility are performed using the effective user and group -IDs instead of the real user and group ID as required in a call to +The checks are performed using the effective user and group IDs, +like +.Fn eaccess , +instead of the real user and group ID, like .Fn access . .It Dv AT_RESOLVE_BENEATH Only walk paths below the directory specified by the @@ -149,23 +166,15 @@ Likewise for .Dv R_OK and .Dv W_OK . -.Pp -.Fn access , -.Fn eaccess -and -.Fn faccessat -will always dereference symbolic links. -If the symbolic link itself needs to be referenced, -.Xr lstat 2 -should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS +The .Fn access , .Fn eaccess , -or +and .Fn faccessat -will fail if: +system calls may fail if: .Bl -tag -width Er .It Bq Er EINVAL The value of the @@ -256,25 +265,11 @@ system call appeared in .Fx 8.0 . .Sh SECURITY CONSIDERATIONS The -.Fn access -system call -is a potential security hole due to race conditions and -should never be used. -Set-user-ID and set-group-ID applications should restore the -effective user or group ID, -and perform actions directly rather than use -.Fn access -to simulate access checks for the real user or group ID. -The -.Fn eaccess -system call -likewise may be subject to races if used inappropriately. -.Pp -.Fn access -remains useful for providing clues to users as to whether operations -make sense for particular filesystem objects (e.g. 'delete' menu -item only highlighted in a writable folder ... avoiding interpretation -of the st_mode bits that the application might not understand -- -e.g. in the case of AFS). -It also allows a cheaper file existence test than -.Xr stat 2 . +.Fn access , +.Fn eaccess , +and +.Fn faccessat +system calls are subject to time-of-check-to-time-of-use races and +should not be relied upon for file permission enforcement purposes. +Instead, applications should perform the desired action using the +requesting user's credentials. From nobody Thu May 23 02:41:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlC9y0xlZz5LZGJ; Thu, 23 May 2024 02:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlC9x4yx4z42XD; Thu, 23 May 2024 02:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQWLkQMZ0aF8JLq9n900lQg7CaU+Q9nRlbzkbZV7cyo=; b=Ni2LSmIp0wJuCw13oiV0c+QacHkymhQlUyiWcJmMake9zDGB9MFHMubu8ItIRS162eEcK2 9DZd+PoTeAKYJlma5oXRJKt8fzS0wP5EEnrqrsOG8fvnmQw0brgMuH5sHlp6rBixVUZenf dPyvCIkerEszWR6NflYtWo2vD5WQy5mMUfrI54FI0lCO4CZyClmW3gvGbaangCT9Fgyb2I yU3q5Z62NWJCy30HOF2ekJdwoQR/3mphuv1KuHFfBijyuK521GfZKUmUaVqhFdnQa3ikvA 9VxkGBnL/m7VJjs9ye1GUd3+SIeRNBzt42rChMNlNfLDE9oP8BeC0Yjtgclo5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432117; a=rsa-sha256; cv=none; b=eyHNz6DVDTp3SqFwniQfAfU/4ay1cRkfw0BnqMQK0s3cmmLuhE1DJXlCJsnrhBREVrW0Ih FKUTVGtIkNcZKkHrEkHZvwnXa0YIMS6ZRcaajjr+LPRNdyStvf2lX2ztqrWdp04syOXBjP ydYytSQVX2Zq1WNHIRaB8i4Iy+ivNRDmEmtG2vWiHIZqrNA22FWZ9kahcOA2jED4hBeSwo jg51fbbbVxVxKnuBn2Qduag5/bKOd9aPBrxOvkFJC+QqcLSKRt3R2Ldkfu5oVAWDvCmSZg fTGgixS76Egim7jvH9aD3+rmz5Bf8qfeTLhOm2UgkZMQ7YHFMcL6HrbddyHOig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQWLkQMZ0aF8JLq9n900lQg7CaU+Q9nRlbzkbZV7cyo=; b=VyG8yDk5efnpinDboDMZTrpNlq1dp1Mq0u0/ze+nXgLq8cBZnsYptGaJRNFy1pXBD7PNJh 734eh/4bah8/Gfb6vPJBMXnlmo2Hmzfq4wRyNWAKWNQ0hZTG++xXWd2LsvtUvXHT4GwESG f/TXFf1ebA+Qd2qFB7Jf8JaYpKdAUGAEWCz9sAzz9eRKWWYvCIwKOn07Q8WzBFwWBM2Lti yHfDOFnJybjset4SRv0+hGwgGZtH34DVGu9dyKD75BsZLH4lHVQ+SMhJEoXTBllF9/8TtC 3JHuJnDbucdzSuc2pDaHMBnngCGrGpP+u6ZVIqCJQP3UAcjOyGpk1tbQ/2NQnw== 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 4VlC9x4bRdzX7C; Thu, 23 May 2024 02:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2fvNE054290; Thu, 23 May 2024 02:41:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2fvnD054287; Thu, 23 May 2024 02:41:57 GMT (envelope-from git) Date: Thu, 23 May 2024 02:41:57 GMT Message-Id: <202405230241.44N2fvnD054287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: 4c380c44c82f - stable/14 - iavf(4): Improve man page List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c380c44c82f36c04539e3c9e60e58567abf3856 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4c380c44c82f36c04539e3c9e60e58567abf3856 commit 4c380c44c82f36c04539e3c9e60e58567abf3856 Author: Eric Joyner <erj@FreeBSD.org> AuthorDate: 2024-05-21 23:24:31 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:41:32 +0000 iavf(4): Improve man page MFC after: 3 days Reviewed by: erj Differential Revision: https://reviews.freebsd.org/D43093 (cherry picked from commit ba222f6fb4b226ab24beaa13a8591dcb624ae70f) --- share/man/man4/iavf.4 | 348 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 282 insertions(+), 66 deletions(-) diff --git a/share/man/man4/iavf.4 b/share/man/man4/iavf.4 index 2e265a5a2fbb..d55e084e82cc 100644 --- a/share/man/man4/iavf.4 +++ b/share/man/man4/iavf.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2013-2018, Intel Corporation .\" All rights reserved. .\" @@ -29,12 +32,12 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd January 30, 2019 +.Dd May 21, 2024 .Dt IAVF 4 .Os .Sh NAME .Nm iavf -.Nd "Intel Adaptive Virtual Function driver" +.Nd "Intel Ethernet Adaptive Virtual Function Driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -51,87 +54,300 @@ if_iavf_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the PCI Virtual Functions from the 700 Series of -ethernet devices and newer product families. -The driver supports Jumbo Frames, TX/RX checksum offload, -TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, and -Receive Side Steering (RSS), all for both IPv4 and IPv6. -For further hardware information and questions related to hardware -requirements, see -.Pa http://support.intel.com/ . -.Pp -Support for Jumbo Frames is provided via the interface MTU setting. -Selecting an MTU larger than 1500 bytes with the +driver provides support for any PCI Virtual Function created from certain +Intel Ethernet devices. +This driver is compatible with virtual functions bound to devices based on the +following: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.It +Intel\(rg Ethernet Controller I710 +.It +Intel\(rg Ethernet Controller X710 +.It +Intel\(rg Ethernet Controller XL710 +.It +Intel\(rg Ethernet Network Connection X722 +.It +Intel\(rg Ethernet Controller XXV710 +.It +Intel\(rg Ethernet Controller V710 +.El +.Pp +The associated Physical Function (PF) drivers for this VF driver are: +.Pp +.Bl -bullet -compact +.It +.Xr ice 4 +.It +.Xr ixl 4 +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your Intel Ethernet Adapter. +All hardware requirements listed apply to use with +.Fx . +.Ss The VF Driver +The VF driver is normally used in a virtualized environment where a host driver +manages SR\-IOV, and provides a VF device to the guest. +.Pp +In the +.Fx +guest, the iavf driver would be loaded and will function using +the VF device assigned to it. +.Pp +The VF driver provides most of the same functionality as the core driver, but +is actually a subordinate to the host. +Access to many controls is accomplished by a request to the host via what is +called the "Admin queue." +These are startup and initialization events, however; once in operation, the +device is self\-contained and should achieve near native performance. +.Pp +Some notable limitations of the VF environment: +.Bl -bullet +.It +The PF can configure the VF to allow promiscuous mode, using a configuration +parameter in +.Xr iovctl.conf 5 ; +otherwise, promiscuous mode will not work +.It +Media info is not available from the PF, so the active media will always be +displayed as auto in .Xr ifconfig 8 -utility configures the adapter to receive and transmit Jumbo Frames. -The maximum MTU size for Jumbo Frames is 9706. +.El +.Ss Adaptive Virtual Function +Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to +adapt to changing feature sets of the physical function driver (PF) with which +it is associated. +This allows system administrators to update a PF without having to update all +the VFs associated with it. +All AVFs have a single common device ID and branding string. .Pp -Offloads are also controlled via the interface, for instance, -checksumming for both IPv4 and IPv6 can be set and unset, TSO4 -and/or TSO6, and finally LRO can be set and unset. +AVFs have a minimum set of features known as "base mode," but may provide +additional features depending on what features are available in the PF with +which the AVF is associated. +The following are base mode features: +.Bl -bullet -compact +.It +4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) +for Tx/Rx +.It +iavf descriptors and ring format +.It +Descriptor write\-back completion +.It +1 control queue, with iavf descriptors, CSRs and ring format +.It +5 MSI\-X interrupt vectors and corresponding iavf CSRs +.It +1 Interrupt Throttle Rate (ITR) index +.It +1 Virtual Station Interface (VSI) per VF +.It +1 Traffic Class (TC), TC0 +.It +Receive Side Scaling (RSS) with 64 entry indirection table and key, +configured through the PF +.It +1 unicast MAC address reserved per VF +.It +8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device +.It +16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device +.It +Stateless offloads \- non\-tunneled checksums +.It +AVF device ID +.It +HW mailbox is used for VF to PF communications +.El +.Sh CONFIGURATION AND TUNING +.Ss Important System Configuration Changes +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. .Pp -For more information on configuring this device, see -.Xr ifconfig 8 . +The default is 1000. .Pp -.Em NOTE : -This +Best throughput results are seen with a large MTU; use 9706 if possible. +The default number of descriptors per ring is 1024. +Increasing this may improve performance, depending on your use case. +.Ss Configuring for no iflib +.Xr iflib 4 +is a common framework for network interface drivers for +.Fx +that uses a shared set of sysctl names. +.Pp +The default .Nm -driver is only for Virtual Functions. -For 700 series Physical Functions, use the -.Xr ixl 4 -driver. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt before booting the kernel or stored in -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va hw.iavf.rx_itr -The RX interrupt rate value, set to 62 (124 usec) by default. -.It Va hw.iavf.tx_itr -The TX interrupt rate value, set to 122 (244 usec) by default. -.It Va hw.iavf.enable_head_writeback -When the driver is finding the last TX descriptor processed by the hardware, -use a value written to memory by the hardware instead of scanning the -descriptor ring for completed descriptors. -Disabled by default; this mimics the "legacy" TX behavior found in -.Xr ixgbe 4 . -to ensure compatibility with future, non-700 series VF devices. +driver depends on it, but it can be compiled without it. +.Ss Jumbo Frames +Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) +to a value larger than the default value of 1500. +.Pp +Use the +.Xr ifconfig 8 +command to increase the MTU size. +.Pp +To confirm the MTU used between two specific devices, use +.Xr route 8 : +.Bd -literal -offset indent +route get <destination_IP_address> +.Ed +.Pp +NOTE: +.Bl -bullet +.It +The maximum MTU setting for jumbo frames is 9706. +This corresponds to the maximum jumbo frame size of 9728 bytes. +.It +This driver will attempt to use multiple page-sized buffers to receive +each jumbo packet. +This should help to avoid buffer starvation issues when allocating receive +packets. +.It +Packet loss may have a greater impact on throughput when you use jumbo +frames. +If you observe a drop in performance after enabling jumbo frames, enabling +flow control may mitigate the issue. .El -.Sh SUPPORT -For general information and support, -go to the Intel support website at: -.Pa http://support.intel.com/ . +.Ss Checksum Offload +Checksum offloading supports both TCP and UDP packets and is supported for both +transmit and receive. +.Pp +TSO (TCP Segmentation Offload) supports both IPv4 and IPv6. +Both of these features are enabled and disabled via +.Xr ifconfig 8 . .Pp -If an issue is identified with this driver with a supported adapter, -email all the specific information related to the issue to -.Mt freebsd@intel.com . +NOTE: +.Bl -bullet -compact +.It +TSO requires Tx checksum; if Tx checksum is disabled then TSO will also +be disabled. +.El +.Ss LRO +LRO (Large Receive Offload) may provide Rx performance improvement. +However, it is incompatible with packet\-forwarding workloads. +You should carefully evaluate the environment and enable LRO when possible. +.Ss Rx and Tx Descriptor Rings +Allows you to set the Rx and Tx descriptor rings independently. +Set them via these +.Xr iflib 4 +sysctls: +.Bl -tag -width indent +.It dev.iavf.#.iflib.override_nrxds +.It dev.iavf.#.iflib.override_ntxds +.El +.Ss Link\-Level Flow Control (LFC) +The VF driver does not have access to flow control settings. +It must be managed from the host side. .Sh SEE ALSO .Xr arp 4 , +.Xr ice 4 , +.Xr iflib 4 , .Xr ixl 4 , .Xr netintro 4 , .Xr vlan 4 , -.Xr ifconfig 8 , -.Xr iflib 9 +.Xr ifconfig 8 +.Pp +See the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for additional information on features. +It is available on the Intel website at either of the following: +.Bl -bullet +.It +.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831 +.It +.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html +.El +.Pp +For information on how to identify your adapter, and for the latest Intel +network drivers, refer to the Intel Support website: +.Aq Lk http://www.intel.com/support +.Sh CAVEATS +.Ss Driver Buffer Overflow Fix +The fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069 +.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html , +is included in this and future versions of the driver. +.Ss Network Memory Buffer Allocation +.Fx +may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. +You can check to see if the system is mbuf\-starved by running +.Li "netstat -m" . +Increase the number of mbufs by editing the lines below in +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +kern.ipc.nmbclusters +kern.ipc.nmbjumbop +kern.ipc.nmbjumbo9 +kern.ipc.nmbjumbo16 +kern.ipc.nmbufs +.Ed +.Pp +The amount of memory that you allocate is system specific, and may require +some trial and error. +Also, increasing the following in +.Xr sysctl.conf 5 +could help increase +network performance: +.Bd -literal -offset indent +kern.ipc.maxsockbuf +net.inet.tcp.sendspace +net.inet.tcp.recvspace +net.inet.udp.maxdgram +net.inet.udp.recvspace +.Ed +.Ss UDP Stress Test Dropped Packet Issue +Under small packet UDP stress with the +.Nm +driver, the system may drop UDP packets due to socket buffers being full. +Setting the PF driver's Flow Control variables to the minimum may resolve the +issue. +.Ss Disable LRO when routing/bridging +LRO must be turned off when forwarding traffic. +.Sh SUPPORT +For general information, go to the Intel support website at +.Aq Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with the released source code on a supported kernel +with a supported adapter, email the specific information related to the issue +to +.Aq Mt freebsd@intel.com . +.Sh LEGAL +Intel\(rg is a trademark or registered trademark of Intel Corporation +or its subsidiaries in the United States and / or other countries. +.Pp +Other names and brands may be claimed as the property of others. .Sh HISTORY The .Nm device driver first appeared in -.Fx 10.1 . -under the name "ixlv" +.Fx 10.1 +under the name +.Nm ixlv . It was converted to use -.Xr iflib 9 -and changed to its current name in -.Fx 12 . +.Xr iflib 4 +and renamed in +.Fx 12.4 . .Sh AUTHORS -.An -nosplit The .Nm -driver was written by -.An Jack Vogel Aq Mt jfv@freebsd.org -and -.An Eric Joyner Aq Mt erj@freebsd.org . -.Sh CAVEATS -This driver is supposed to function on VFs spawned from future network devices by Intel, -but at the time of this writing, has only been tested on the 700 series VFs. +driver was written by the +.An Intel Corporation Aq Mt freebsd@intel.com From nobody Thu May 23 02:44:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCDS6k0Tz5LZ3D; Thu, 23 May 2024 02:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCDS4Mg9z442k; Thu, 23 May 2024 02:44:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jG5uzTR7qJJ5+Qji3AjW1yLtQb5LBwbL8xW6l4noCRE=; b=IcEt0U8F27dRadHFIzxqHGKcxmUgxedkHQd3k6p615+Z4ZWoy70EKWXC5JLs8HUgg2lqiT NbTyXMIVZGrr4jJZhzGsdrh6fUgJLEomAKNOrLq/xZpb0xfx5bVFmPYwPr0q49pT06JTIc CLidKL+XPWVFjQTYU00Z98Zu4ydDF/tSeVPucmhOlww6Kru99dH0LUiNslH+ZvZMEnTWih JEldVlb2kI8W8qCcwaUy0E0tSJDQ1mTWzEB45Y6erHsrFs1r4EYC24wAMB9zEOVUFk0/nX dcYXxe+EEn1Uys+brg4GahY8Yz0KlSN5OPur1H9cXHWnoZpmNTR06S6aMDYTKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432248; a=rsa-sha256; cv=none; b=X5gWuUHfn1Mi8yakcoeHCBoLqM/0CohiQd0GXPOBpd3CqDobor9mnxiZ705FPj+kwhskzT ekck/fIAU+CgH6r2nWK62qOvrPIMuhFywkRxuh5taXWWpsqnujuSYZlawA5wYyJVSV2fde rNSgEn8papp+dDQ3msGC2e2HhW+pR37MgWe1z8R3tNe6G6X4mWlmIGneCojWff2k0Mw5k0 Yxi6xQDxI1sumsgA0LuDQbi/cKT9F6a3Wte0i+pSvbiXb6R0NSrZNWJq+zQuobhjif8JIa owVVR6Avw0lWr5RsA7vJxL6Ym6mmMvHYGMaEah1oAeq8NfAsPKaTNEe8hcTjFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jG5uzTR7qJJ5+Qji3AjW1yLtQb5LBwbL8xW6l4noCRE=; b=Xc4GMjvmL808C4M8gQ6QI4bsCeVmPVgBg9AJ5UELy3glmNZEibign65rwF225CCJ+vPwsx xB9UMNogMJxST35lvq5ek4hAjPJGFn3ttsYNBQFY4CRG+ScyEKyl2h0UVGqitdNR+nKlRS a7C7jDIR8o8fyQmDKqYwg3zlXvmClMdXfbPpN8wX31IffHd4kw39hTp/H5mwZypervR3mJ uPCX1UGKUIlgTJfHDSYvYk5i+OUtMaagQCzky9mKEjRETdOQYA8urtnO79u3oZRmKJxXsL qFF26tL1+Kv2sJ19AWG7x7XvlcNoaRax1ZY8F2r4PT0r0WRF9vzi3fJlZN6udQ== 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 4VlCDS3y9KzXbx; Thu, 23 May 2024 02:44:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2i8pi056604; Thu, 23 May 2024 02:44:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2i8Ls056601; Thu, 23 May 2024 02:44:08 GMT (envelope-from git) Date: Thu, 23 May 2024 02:44:08 GMT Message-Id: <202405230244.44N2i8Ls056601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: c96451a0d94e - stable/13 - Add man page for the ice network driver. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c96451a0d94e046d1ce147f8db6e83c1e7968f2c Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c96451a0d94e046d1ce147f8db6e83c1e7968f2c commit c96451a0d94e046d1ce147f8db6e83c1e7968f2c Author: Mathieu Simon <freebsd@simweb.ch> AuthorDate: 2024-05-21 05:49:50 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:43:49 +0000 Add man page for the ice network driver. PR: 262892 MFC after: 3 days Reviewed by: concussious.bugzilla@runbox.com, erj Differential Revision: https://reviews.freebsd.org/D45270 (cherry picked from commit 8e5e42d54ad3093e38263814d1f3e7d8406d5421) --- share/man/man4/Makefile | 2 + share/man/man4/ice.4 | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 252 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 1ea3431c859a..727768ae5bea 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -209,6 +209,7 @@ MAN= aac.4 \ hwpmc.4 \ ${_hwpstate_intel.4} \ iavf.4 \ + ice.4 \ ichsmb.4 \ ${_ichwd.4} \ icmp.4 \ @@ -708,6 +709,7 @@ MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ice.4 if_ice.4 MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 new file mode 100644 index 000000000000..da46c758479c --- /dev/null +++ b/share/man/man4/ice.4 @@ -0,0 +1,250 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Copyright (c) 2019-2020, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms of the Software, 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. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this Software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.Dd May 20, 2024 +.Dt ICE 4 +.Os +.Sh NAME +.Nm ice +.Nd "Intel Ethernet 800 Series Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iflib" +.Cd "device ice" +.Ed +.Pp +To load the driver as a module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ice_load="YES" +.Ed +.Sh DESCRIPTION +.Ss Features +The +.Nm +driver provides support for any PCI Express adapter or LOM +(LAN On Motherboard) +in the Intel Ethernet 800 Series. +As of this writing, the series includes devices with these model numbers: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your adapter. +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +This value coincides with the maximum Jumbo Frame size of 9728. +.Pp +This driver version supports VLANs. +For information on enabling VLANs, see the +.Pa README . +.Pp +Offloads are also controlled via the interface, for instance, checksumming for +both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can +be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Ss Additional Utilities +There are additional tools available from Intel to help configure and update +the adapters covered by this driver. +These tools can be downloaded directly from Intel at +.Lk https://downloadcenter.intel.com , +by searching for their names, or by installing certain packages: +.Bl -bullet +.It +To change the behavior of the QSFP28 ports on E810-C adapters, use the +Intel EPCT (Ethernet Port configuration tool); installed by the +.Em sysutils/intel-epct +package. +.It +To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) +Update Utility for Intel Network Adapter 800 series; installed by the +.Em sysutils/intel-nvmupdate-100g +package. +.El +.Sh HARDWARE +Most adapters in the Intel Ethernet 800 Series with SFP28/QSFP28 cages +have firmware that requires that Intel qualified modules are used; these +qualified modules are listed below. +This qualification check cannot be disabled by the driver. +.Pp +The +.Nm +driver supports 100Gb Ethernet adapters with these QSFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 E100GQSFPSR28SRX +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 SPTMBP1PMCDF +.It +Intel\(rg 100G QSFP28 100GBASE-CWDM4 SPTSBP3CLCCO +.It +Intel\(rg 100G QSFP28 100GBASE-DR SPTSLP2SLCDF +.El +.Pp +The +.Nm +driver supports 25Gb and 10Gb Ethernet adapters with these SFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 10G/25G SFP28 25GBASE-SR E25GSFP28SR +.It +Intel\(rg 25G SFP28 25GBASE-SR E25GSFP28SRX (Extended Temp) +.It +Intel\(rg 25G SFP28 25GBASE-LR E25GSFP28LRX (Extended Temp) +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with these SFP+ modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSR +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG1P5 +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG2P5 +.It +Intel\(rg 10G SFP+ 10GBASE-SR E10GSFPSRX (Extended Temp) +.It +Intel\(rg 1G/10G SFP+ 10GBASE-LR E10GSFPLR +.El +.Pp +Note that adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. +.Pp +This is not an exhaustive list; please consult product documentation for an +up-to-date list of supported media. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +See the +.Xr iflib 4 +man page for more information on using iflib sysctl variables as tunables. +.Bl -tag -width indent +.It Va hw.ice.#.enable_health_events +TBW +.It Va hw.ice.#.debug.enable_tx_fc_filter +TBW +.It Va hw.ice.#.debug.enable_tx_lldp_filter +TBW +.It Va hw.ice.#.debug.enable_health_events +TBW +.El +.Sh SYSCTL PROCEDURES +.Bl -tag -width indent +.It Va dev.ice.#.fc +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is +TX pause. +.It Va dev.ice.#.advertise_speed +Allows one to set advertised link speeds, this will then cause a link +renegotiation. +.It Va dev.ice.#.current_speed +This is a display of the current setting. +.It Va dev.ice.#.fw_version +Displays the current firmware and NVM versions of the adapter. +.It Va dev.ice.#.ddp_version +TBW +.It Va dev.ice.#.requested_fec +TBW +.It Va dev.ice.#.negotiated_fec +TBW +.It Va dev.ice.#.fw_lldp_agent +TBW +.It Va dev.ice.#.ets_min_rate +TBW +.It Va dev.ice.#.up2tc_map +TBW +.It Va dev.ice.#.pfc +TBW +.El +.Sh INTERRUPT STORMS +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr iflib 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.2 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Intel Corporation Aq Mt freebsd@intel.com . From nobody Thu May 23 02:44:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCDV0WCgz5LZGB; Thu, 23 May 2024 02:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCDT5RLVz44D9; Thu, 23 May 2024 02:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wcQ5ONHn5E2MoSdFsZVSDl3TA9q92OLwJxvSbthveAw=; b=OfdA8AoC41ZWFuazHMhflujmLeTc0+goHpm4v+09YuWCjNwI8x0P9toWgB7heiRRUcd9z0 3UoXZfTCApHktNRRv0AcNJ3Tb2aB8X0RpVkLGMUj0VkkuV4DNaC0MopCHTR76DrvG6SyS1 AjGA9YaN5/j0rUCNbACssngfBuN24qBdT+FASpNzDiEGA9yrc2gUTEoS6s5XkhzhVyN1Tn +eozjP0fa01NQuxiwxwghD38UZ0Hjt42KhAv7n22HZaZ0qyvYm6B0eq79Aq1wNGfltILV8 d4tRW7ngHbB6ABZeGBKTAYK9iGFZgNfI8Jqt4TpU6gzmnSBIjVOG/EdOLR3DUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432249; a=rsa-sha256; cv=none; b=nZo8Hl94Felnz5O/xYz+02eZlaEY79zp9HRnPxCgrC4PqUTrHcXalJP81YfraGVuarPIeO NXZ7OF+i49O4JFmpvRTkWnhXQUEYwxC74/MVUjTJmjbNaBP9jOkQ5z0Mgmu2JE0nNv3qc7 KIblHiILeriOGOYBP0RgsGXqHQiqn7fCt+jR8W0xGTyB20QjywjajrCmBtFu9v6l/3iR0j 9vY2nY7FTIbdUxh1/yLV7v8S1o/X6DD5jj9Thz7ezc2vFDY46uZ+NhmpNn0Yrel27ScT+7 MOHgtXGbeAZZk0epp9YETfGuNsMcA3bL6KhY6bcZ40Zxz7i7CzPZcK1Sv2O18w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wcQ5ONHn5E2MoSdFsZVSDl3TA9q92OLwJxvSbthveAw=; b=wB1z4TtPuQnLamYeRHlchZFfP82U40IYhC1himit7Xd0BRdkDtogQnf4be1qcN7K6LFutW TGd595mRRF6tEdLXDFP31UVtgchnA5k7CsnsAmy+VoR/C0kmQIm+UDW2XegI0p6YnhVLxY dNp0MsqsPjHrBM/WlA+htqh/a5aI/N9/7jTmBjLE2qnK1/xcfk5d6ZDOjOCr7WouAjo2ED HXCEGYRWeSi/2h2yIBLwXE89WC2JhGtexyP+15N2uoHjCkYf9VbB9Z4bpKY1pw3rJ9Gjb1 gZGYwWaTZ0GKYis2P9hMyIA5k0UJfqYmHlN/dQtX/cG1MdqdpBTlpqdcgiUiow== 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 4VlCDT52QrzXgy; Thu, 23 May 2024 02:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2i9Ec056669; Thu, 23 May 2024 02:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2i9IW056666; Thu, 23 May 2024 02:44:09 GMT (envelope-from git) Date: Thu, 23 May 2024 02:44:09 GMT Message-Id: <202405230244.44N2i9IW056666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: 78ea1fcf29a7 - stable/13 - access.2: Mention that lstat(2) should be used for symbolic links List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 commit 78ea1fcf29a780fb6bd90e41772d5a3751fb56d7 Author: Gordon Bergling <gbe@FreeBSD.org> AuthorDate: 2024-05-13 08:40:12 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:43:49 +0000 access.2: Mention that lstat(2) should be used for symbolic links access(), eaccess() and faccessat() will always dereference symbolic links. So add a note in the manual page, that lstat(2) should be used in the case of symbolic links. PR: 262895 Reviewed by: gbe, pauamma_gundo.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44890 (cherry picked from commit 421025a274fb5759b3ecc8bdb30b24db830b45ae) --- lib/libc/sys/access.2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 681e4483a9e6..64ed1133b23d 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -27,7 +27,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd March 30, 2021 +.Dd May 13, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -149,6 +149,15 @@ Likewise for .Dv R_OK and .Dv W_OK . +.Pp +.Fn access , +.Fn eaccess +and +.Fn faccessat +will always dereference symbolic links. +If the symbolic link itself needs to be referenced, +.Xr lstat 2 +should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS From nobody Thu May 23 02:44:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCDW07rNz5LZGd; Thu, 23 May 2024 02:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCDV6RFjz44DB; Thu, 23 May 2024 02:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YMo4CrH36YDicqI36poGTw6SdSoiF+qRfPuj2srp0G0=; b=D04zx2bV80WV2RQRIg8DyzutAuj7Cr/xMPQ2P7Se8Em30AgMnJRCD5cAc+lm7Wum4QGiNq uNViRVVtsB/HsH3f0vOhQCVouD9zg/e71o+Nu8ZFgaadbRBPJz1rjnTmP3KpmLIGzC9oQ8 AZo/eo5QScjq7LoKr/6GWgpDXfQyxJ4dd6xy3d4RTXJdcKNfHzPo8eEKDF4sFb8RfHOg5h JtPGPFAd7bWS2Ez+4/eJF+9oPIJud2t5SJt09N+yzbmJR3Zec80WYE7EkH8ZZhBxFP++N4 C//iLyNHMMQFqTCLkI61nY7gDxQ4Mfy+0JFBgdtaesr0g6/8W177Z6MNTBXoGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432250; a=rsa-sha256; cv=none; b=Tm2kRaeMY6HaSX+8mB9A5uyg23Fi4z2OtVY2fnYhkT5YsYpGrQZy7cp+PYDrFFcr0Lcyra 7Tf96wOGWhl7/pbtd4uQjuSEl4YEycuzBqUrse5AzLD6wUQh8Dr1oMReBEovTyrQBnQ49d WgwkTbLJI4+CLxq4TPO+ipVNerc6fL2ITSIVXa4KSs9L5Z2dgr/ZS0Uyx8wE/efYkOTHss lgFb5tYmP04kL/9QR5jx+J4rU+XbpCkgTMg8dVWdDIFiUaYW5IvPyQTkQFlGc81D86SMFe iGgCYXavOy9yWFs9RlwnzH07lboPWwb/27K2+CELN6cjz2uiJkrIuqi/PM9pZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YMo4CrH36YDicqI36poGTw6SdSoiF+qRfPuj2srp0G0=; b=KqmJYcM+9cEtjvpzGaDKB8qtyIlAMuGrTd/LgG77IhGlmL0pjk+ET+uHYbM0FZa+11oR5B p5HCw3VqAvMdo5fJm48u7tAb8jBtoqhgIBPQRiIhgx2aEc/WGl/ASTeIz4xQ+yuJx4Wnee Xfh+OiR2xbPQ/7AIyeUsU0juTEwL45KKfbEKv9c4oQLhUogiz84rUs+EsJ/Pbwkljs642I wG4Dckgtwx9+mAlkUsMblqyCRCncIlF3Gl4i5QgCJJRjT7pPhKCNAUyChm/Sz5mpBRoux1 qQW/drnnpmF7iJmFNvRVfIJsLWEUC1Zn+m+9XNmJjf/DWeWxoohrkkrUhoKfyg== 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 4VlCDV63b0zX7S; Thu, 23 May 2024 02:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2iAti056720; Thu, 23 May 2024 02:44:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2iAnB056717; Thu, 23 May 2024 02:44:10 GMT (envelope-from git) Date: Thu, 23 May 2024 02:44:10 GMT Message-Id: <202405230244.44N2iAnB056717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: 55cd52a4418d - stable/13 - access(2): Discourage use of these system calls. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 55cd52a4418d79962ebd81f34544a3747db9e031 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=55cd52a4418d79962ebd81f34544a3747db9e031 commit 55cd52a4418d79962ebd81f34544a3747db9e031 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2024-05-21 22:35:22 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:43:49 +0000 access(2): Discourage use of these system calls. Fixes: 421025a274fb PR: 262895 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45240 (cherry picked from commit a4be1eb21165d7aedae9dc6634528619ff10d025) --- lib/libc/sys/access.2 | 105 ++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 55 deletions(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 64ed1133b23d..8595444720b1 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -27,7 +27,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd May 13, 2024 +.Dd May 21, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -47,35 +47,43 @@ .Fn faccessat "int fd" "const char *path" "int mode" "int flag" .Sh DESCRIPTION The -.Fn access -and +.Fn access , .Fn eaccess -system calls check the accessibility of the -file named by -the +and +.Fn faccessat +system calls report whether an attempt to access the file designated +by their .Fa path -argument -for the access permissions indicated by -the +in the manner described by their .Fa mode -argument. +argument is likely to succeed. The value of .Fa mode -is either the bitwise-inclusive OR of the access permissions to be -checked -.Dv ( R_OK +is either the bitwise-inclusive OR of the desired permissions +.Po +.Dv R_OK for read permission, .Dv W_OK for write permission, and .Dv X_OK -for execute/search permission), -or the existence test -.Pq Dv F_OK . +for execute / search permission +.Pc +or +.Dv F_OK +to simply check whether the file exists. .Pp -For additional information, see the -.Sx "File Access Permission" -section of -.Xr intro 2 . +For a number of reasons, these system calls cannot be relied upon to +give a correct and definitive answer. +They can at best provide an early indication of the expected outcome, +to be confirmed by actually attempting the operation. +For existence checks, either +.Xr stat 2 +or +.Xr lstat 2 +should be used instead. +See also +.Sx SECURITY CONSIDERATIONS +below. .Pp The .Fn eaccess @@ -89,6 +97,13 @@ the real user ID in place of the effective user ID, the real group ID in place of the effective group ID, and the rest of the group access list. .Pp +See the +.Sx DEFINITIONS +section of +.Xr intro 2 +for additional information on file access permissions and real +vs. effective user and group IDs. +.Pp The .Fn faccessat system call is equivalent to @@ -116,8 +131,10 @@ list, defined in .In fcntl.h : .Bl -tag -width indent .It Dv AT_EACCESS -The checks for accessibility are performed using the effective user and group -IDs instead of the real user and group ID as required in a call to +The checks are performed using the effective user and group IDs, +like +.Fn eaccess , +instead of the real user and group ID, like .Fn access . .It Dv AT_RESOLVE_BENEATH Only walk paths below the directory specified by the @@ -149,23 +166,15 @@ Likewise for .Dv R_OK and .Dv W_OK . -.Pp -.Fn access , -.Fn eaccess -and -.Fn faccessat -will always dereference symbolic links. -If the symbolic link itself needs to be referenced, -.Xr lstat 2 -should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS +The .Fn access , .Fn eaccess , -or +and .Fn faccessat -will fail if: +system calls may fail if: .Bl -tag -width Er .It Bq Er EINVAL The value of the @@ -256,25 +265,11 @@ system call appeared in .Fx 8.0 . .Sh SECURITY CONSIDERATIONS The -.Fn access -system call -is a potential security hole due to race conditions and -should never be used. -Set-user-ID and set-group-ID applications should restore the -effective user or group ID, -and perform actions directly rather than use -.Fn access -to simulate access checks for the real user or group ID. -The -.Fn eaccess -system call -likewise may be subject to races if used inappropriately. -.Pp -.Fn access -remains useful for providing clues to users as to whether operations -make sense for particular filesystem objects (e.g. 'delete' menu -item only highlighted in a writable folder ... avoiding interpretation -of the st_mode bits that the application might not understand -- -e.g. in the case of AFS). -It also allows a cheaper file existence test than -.Xr stat 2 . +.Fn access , +.Fn eaccess , +and +.Fn faccessat +system calls are subject to time-of-check-to-time-of-use races and +should not be relied upon for file permission enforcement purposes. +Instead, applications should perform the desired action using the +requesting user's credentials. From nobody Thu May 23 02:44:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCDX0ymtz5LZ69; Thu, 23 May 2024 02:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCDX0JBzz44Gs; Thu, 23 May 2024 02:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=je6mt2LTvqaWS4bpcPtnaWGZoOUF42D3IPP+G3Yz6LU=; b=BjrpL82qG2bfzkS5OsCq68eOkzHNEnDNfl20WHHSre82VXOJHcxhPi+ReA1gwUE9VnYvlk c4gBDtqpQZUj8A2dMT3WSaY5nqFGFCa0y6uVkHQaIOyIrZxE3e1K/MOgbJtEzwo1XXD0Cv zoVPyQbJPaMURqa2HiR1/xUIc3vV4loDtDa7Idf9x8Xvzaf3CvyBbitLFTJfLCsWUnmz2w hbzuoT6O/EU4F1jwFeKJ1yMbecPGikXJlYdSRDPjVby06yQ9NevUHEkAvJ1NVfCCch4aTG Zm/LYV0ZMuk316Oa5t1beOMfkrpVH0hGkZs66Xl6yzNfFXbtXnEjJJkJbn/AoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432252; a=rsa-sha256; cv=none; b=E9UrDsh+wwjgCt3XEHUUPZcsbOZ6kFggA3+1jMpmnqbHvv6HYIH8pdcRpL4y1KxW2O1ILo 39aSUKYVnmkf3BKsNkdrRbdY2lSvEFzRCjTCsMrPpRosjxp/TZKiGsWUaeI9iaenBmEdua r2tZSTixfti2GY9OALvwnIBLTGC4m0LIxmaKXX0yMGZYxmGHRnE5mjAvUqemRVe5gVNM6j 3O4xxhWpSJYueXzMz+oP4srpBUj2eqXkHJIOeq81ADtemK8VmQr6i14Jf+IZT4/03XlCdF hMVBCamMdOwvq6tbJFRWX5RkTLI3E5dsELj7HGpgb0mrhNMs+iyO16SAhlPT1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=je6mt2LTvqaWS4bpcPtnaWGZoOUF42D3IPP+G3Yz6LU=; b=qHJgJ2DXHnjxZXAbVOo5y64SpKNvFK/iV8n/3C4fP2brG0QUQ9b5RoeXRD5/yf0bRNC05Q /fAyOC29YVIUxcnrwHB8h8ukPIYlECuuyeuz8KTAOcjZ6AydKHGQIlP2SRUDxDW/iIv61S NRxGdFMVCvq8uC+rmiFDIMPnYo4Ro8gL/kAqUm2LVq2PKBl1adZs+33hIpXMAN658SQm9L lCa3KZ3xBsNJ5IdrhYryF1y9jhvy/mywb9/hdLxIMGCifNfPo6lpXwbyIhV3Dr6yIjIxaE w79TxGxn/pCf9XlY44E1Pzyt5505btp+KFBoMhja1d+Oktg2IFk0cCgv+AgOxQ== 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 4VlCDW7235zXby; Thu, 23 May 2024 02:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2iBcW056772; Thu, 23 May 2024 02:44:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2iB5m056769; Thu, 23 May 2024 02:44:11 GMT (envelope-from git) Date: Thu, 23 May 2024 02:44:11 GMT Message-Id: <202405230244.44N2iB5m056769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: d823e80ef5a7 - stable/13 - iavf(4): Improve man page List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d823e80ef5a709ee8c1f9e138eedcda6c1cbd1b5 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d823e80ef5a709ee8c1f9e138eedcda6c1cbd1b5 commit d823e80ef5a709ee8c1f9e138eedcda6c1cbd1b5 Author: Eric Joyner <erj@FreeBSD.org> AuthorDate: 2024-05-21 23:24:31 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:43:49 +0000 iavf(4): Improve man page MFC after: 3 days Reviewed by: erj Differential Revision: https://reviews.freebsd.org/D43093 (cherry picked from commit ba222f6fb4b226ab24beaa13a8591dcb624ae70f) --- share/man/man4/iavf.4 | 348 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 282 insertions(+), 66 deletions(-) diff --git a/share/man/man4/iavf.4 b/share/man/man4/iavf.4 index 2e265a5a2fbb..d55e084e82cc 100644 --- a/share/man/man4/iavf.4 +++ b/share/man/man4/iavf.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2013-2018, Intel Corporation .\" All rights reserved. .\" @@ -29,12 +32,12 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd January 30, 2019 +.Dd May 21, 2024 .Dt IAVF 4 .Os .Sh NAME .Nm iavf -.Nd "Intel Adaptive Virtual Function driver" +.Nd "Intel Ethernet Adaptive Virtual Function Driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -51,87 +54,300 @@ if_iavf_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the PCI Virtual Functions from the 700 Series of -ethernet devices and newer product families. -The driver supports Jumbo Frames, TX/RX checksum offload, -TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, and -Receive Side Steering (RSS), all for both IPv4 and IPv6. -For further hardware information and questions related to hardware -requirements, see -.Pa http://support.intel.com/ . -.Pp -Support for Jumbo Frames is provided via the interface MTU setting. -Selecting an MTU larger than 1500 bytes with the +driver provides support for any PCI Virtual Function created from certain +Intel Ethernet devices. +This driver is compatible with virtual functions bound to devices based on the +following: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.It +Intel\(rg Ethernet Controller I710 +.It +Intel\(rg Ethernet Controller X710 +.It +Intel\(rg Ethernet Controller XL710 +.It +Intel\(rg Ethernet Network Connection X722 +.It +Intel\(rg Ethernet Controller XXV710 +.It +Intel\(rg Ethernet Controller V710 +.El +.Pp +The associated Physical Function (PF) drivers for this VF driver are: +.Pp +.Bl -bullet -compact +.It +.Xr ice 4 +.It +.Xr ixl 4 +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your Intel Ethernet Adapter. +All hardware requirements listed apply to use with +.Fx . +.Ss The VF Driver +The VF driver is normally used in a virtualized environment where a host driver +manages SR\-IOV, and provides a VF device to the guest. +.Pp +In the +.Fx +guest, the iavf driver would be loaded and will function using +the VF device assigned to it. +.Pp +The VF driver provides most of the same functionality as the core driver, but +is actually a subordinate to the host. +Access to many controls is accomplished by a request to the host via what is +called the "Admin queue." +These are startup and initialization events, however; once in operation, the +device is self\-contained and should achieve near native performance. +.Pp +Some notable limitations of the VF environment: +.Bl -bullet +.It +The PF can configure the VF to allow promiscuous mode, using a configuration +parameter in +.Xr iovctl.conf 5 ; +otherwise, promiscuous mode will not work +.It +Media info is not available from the PF, so the active media will always be +displayed as auto in .Xr ifconfig 8 -utility configures the adapter to receive and transmit Jumbo Frames. -The maximum MTU size for Jumbo Frames is 9706. +.El +.Ss Adaptive Virtual Function +Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to +adapt to changing feature sets of the physical function driver (PF) with which +it is associated. +This allows system administrators to update a PF without having to update all +the VFs associated with it. +All AVFs have a single common device ID and branding string. .Pp -Offloads are also controlled via the interface, for instance, -checksumming for both IPv4 and IPv6 can be set and unset, TSO4 -and/or TSO6, and finally LRO can be set and unset. +AVFs have a minimum set of features known as "base mode," but may provide +additional features depending on what features are available in the PF with +which the AVF is associated. +The following are base mode features: +.Bl -bullet -compact +.It +4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) +for Tx/Rx +.It +iavf descriptors and ring format +.It +Descriptor write\-back completion +.It +1 control queue, with iavf descriptors, CSRs and ring format +.It +5 MSI\-X interrupt vectors and corresponding iavf CSRs +.It +1 Interrupt Throttle Rate (ITR) index +.It +1 Virtual Station Interface (VSI) per VF +.It +1 Traffic Class (TC), TC0 +.It +Receive Side Scaling (RSS) with 64 entry indirection table and key, +configured through the PF +.It +1 unicast MAC address reserved per VF +.It +8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device +.It +16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device +.It +Stateless offloads \- non\-tunneled checksums +.It +AVF device ID +.It +HW mailbox is used for VF to PF communications +.El +.Sh CONFIGURATION AND TUNING +.Ss Important System Configuration Changes +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. .Pp -For more information on configuring this device, see -.Xr ifconfig 8 . +The default is 1000. .Pp -.Em NOTE : -This +Best throughput results are seen with a large MTU; use 9706 if possible. +The default number of descriptors per ring is 1024. +Increasing this may improve performance, depending on your use case. +.Ss Configuring for no iflib +.Xr iflib 4 +is a common framework for network interface drivers for +.Fx +that uses a shared set of sysctl names. +.Pp +The default .Nm -driver is only for Virtual Functions. -For 700 series Physical Functions, use the -.Xr ixl 4 -driver. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt before booting the kernel or stored in -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va hw.iavf.rx_itr -The RX interrupt rate value, set to 62 (124 usec) by default. -.It Va hw.iavf.tx_itr -The TX interrupt rate value, set to 122 (244 usec) by default. -.It Va hw.iavf.enable_head_writeback -When the driver is finding the last TX descriptor processed by the hardware, -use a value written to memory by the hardware instead of scanning the -descriptor ring for completed descriptors. -Disabled by default; this mimics the "legacy" TX behavior found in -.Xr ixgbe 4 . -to ensure compatibility with future, non-700 series VF devices. +driver depends on it, but it can be compiled without it. +.Ss Jumbo Frames +Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) +to a value larger than the default value of 1500. +.Pp +Use the +.Xr ifconfig 8 +command to increase the MTU size. +.Pp +To confirm the MTU used between two specific devices, use +.Xr route 8 : +.Bd -literal -offset indent +route get <destination_IP_address> +.Ed +.Pp +NOTE: +.Bl -bullet +.It +The maximum MTU setting for jumbo frames is 9706. +This corresponds to the maximum jumbo frame size of 9728 bytes. +.It +This driver will attempt to use multiple page-sized buffers to receive +each jumbo packet. +This should help to avoid buffer starvation issues when allocating receive +packets. +.It +Packet loss may have a greater impact on throughput when you use jumbo +frames. +If you observe a drop in performance after enabling jumbo frames, enabling +flow control may mitigate the issue. .El -.Sh SUPPORT -For general information and support, -go to the Intel support website at: -.Pa http://support.intel.com/ . +.Ss Checksum Offload +Checksum offloading supports both TCP and UDP packets and is supported for both +transmit and receive. +.Pp +TSO (TCP Segmentation Offload) supports both IPv4 and IPv6. +Both of these features are enabled and disabled via +.Xr ifconfig 8 . .Pp -If an issue is identified with this driver with a supported adapter, -email all the specific information related to the issue to -.Mt freebsd@intel.com . +NOTE: +.Bl -bullet -compact +.It +TSO requires Tx checksum; if Tx checksum is disabled then TSO will also +be disabled. +.El +.Ss LRO +LRO (Large Receive Offload) may provide Rx performance improvement. +However, it is incompatible with packet\-forwarding workloads. +You should carefully evaluate the environment and enable LRO when possible. +.Ss Rx and Tx Descriptor Rings +Allows you to set the Rx and Tx descriptor rings independently. +Set them via these +.Xr iflib 4 +sysctls: +.Bl -tag -width indent +.It dev.iavf.#.iflib.override_nrxds +.It dev.iavf.#.iflib.override_ntxds +.El +.Ss Link\-Level Flow Control (LFC) +The VF driver does not have access to flow control settings. +It must be managed from the host side. .Sh SEE ALSO .Xr arp 4 , +.Xr ice 4 , +.Xr iflib 4 , .Xr ixl 4 , .Xr netintro 4 , .Xr vlan 4 , -.Xr ifconfig 8 , -.Xr iflib 9 +.Xr ifconfig 8 +.Pp +See the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for additional information on features. +It is available on the Intel website at either of the following: +.Bl -bullet +.It +.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831 +.It +.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html +.El +.Pp +For information on how to identify your adapter, and for the latest Intel +network drivers, refer to the Intel Support website: +.Aq Lk http://www.intel.com/support +.Sh CAVEATS +.Ss Driver Buffer Overflow Fix +The fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069 +.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html , +is included in this and future versions of the driver. +.Ss Network Memory Buffer Allocation +.Fx +may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. +You can check to see if the system is mbuf\-starved by running +.Li "netstat -m" . +Increase the number of mbufs by editing the lines below in +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +kern.ipc.nmbclusters +kern.ipc.nmbjumbop +kern.ipc.nmbjumbo9 +kern.ipc.nmbjumbo16 +kern.ipc.nmbufs +.Ed +.Pp +The amount of memory that you allocate is system specific, and may require +some trial and error. +Also, increasing the following in +.Xr sysctl.conf 5 +could help increase +network performance: +.Bd -literal -offset indent +kern.ipc.maxsockbuf +net.inet.tcp.sendspace +net.inet.tcp.recvspace +net.inet.udp.maxdgram +net.inet.udp.recvspace +.Ed +.Ss UDP Stress Test Dropped Packet Issue +Under small packet UDP stress with the +.Nm +driver, the system may drop UDP packets due to socket buffers being full. +Setting the PF driver's Flow Control variables to the minimum may resolve the +issue. +.Ss Disable LRO when routing/bridging +LRO must be turned off when forwarding traffic. +.Sh SUPPORT +For general information, go to the Intel support website at +.Aq Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with the released source code on a supported kernel +with a supported adapter, email the specific information related to the issue +to +.Aq Mt freebsd@intel.com . +.Sh LEGAL +Intel\(rg is a trademark or registered trademark of Intel Corporation +or its subsidiaries in the United States and / or other countries. +.Pp +Other names and brands may be claimed as the property of others. .Sh HISTORY The .Nm device driver first appeared in -.Fx 10.1 . -under the name "ixlv" +.Fx 10.1 +under the name +.Nm ixlv . It was converted to use -.Xr iflib 9 -and changed to its current name in -.Fx 12 . +.Xr iflib 4 +and renamed in +.Fx 12.4 . .Sh AUTHORS -.An -nosplit The .Nm -driver was written by -.An Jack Vogel Aq Mt jfv@freebsd.org -and -.An Eric Joyner Aq Mt erj@freebsd.org . -.Sh CAVEATS -This driver is supposed to function on VFs spawned from future network devices by Intel, -but at the time of this writing, has only been tested on the 700 series VFs. +driver was written by the +.An Intel Corporation Aq Mt freebsd@intel.com From nobody Thu May 23 02:47:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCJ11Tj9z5LZTk; Thu, 23 May 2024 02:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCJ10ttqz45tT; Thu, 23 May 2024 02:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OKfp/a5S7IAk2HedaLh6JxGRHcFYYYb1lpS+QkWKYU4=; b=mIRcIut7FB4KdgDt2+E4gvDptLe0TgvKS3IRZ4X397azeHcv6+uNdUECD0mkjwkAQZsiQa 9wOEIR//zJI6PxT3E+Ryuu6cY/jaj+pclf9/nx3VIaWS3opQ19H6hb6F6wyyx6llBruFch td3e5gs+yhf61X31QLYgIiR+XLBXHap19rBhQfJAXSRx1J8/brrujlKn3S5ggeeVGAKhju j2aHkDKW7LoiDm4BeIk4mdvvS4buA9nWDEDNi4EuDFDXy+RaZxBDf5mqIViSHUNWG9MPTg MAqM/X8vKHsq2KRT7v+FNC3fC/hgV//G3x5yC79ix3lPGcx9j6M46/nj6pS5gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432433; a=rsa-sha256; cv=none; b=wfzx8lj65rip7/X8t3dYprwaTpUkbD3ta48WgUqsES9tE4lTKf96NX4Rwaahp1X06T8n6N bGoNxvBTnz4X8n8U0UdgIdJFniWiZBqTjTdxX3onvLb4GtsJ+jL42kAhR8veGyhU5x9oLp FoMYfWpYSoDU3r8s81XFoqACJZ3ojoajUY5YgUE6LMH4CcX9UHXkNVvd8jkaHyDvNlrs1J 8l3TU/IMLdEqi8QdexSIEdEzT4Bi2RF/+VjT+xNvolC2d7sOHB+KoNYpKCBl8kYDrg4MO+ oxVfua+7soNgQ+oop70D49EDTaK+o+ASCvXJ+pkSwA7MaHc9/+2LUtuepBKaAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OKfp/a5S7IAk2HedaLh6JxGRHcFYYYb1lpS+QkWKYU4=; b=ao+342A09vbk5GNJqQpoLP0zxiiBJIMcwud5AuA3f6M/aPNnMYacJfQM6XE8CLgARqjhk2 HJ8nkmueBD8EyXHh97Xtg7RcgWaainVNy854ALiXe2+BydzFlRqisxOGu/ju1WNkzg3hV+ LrNrgcBkwnp4tAYufBtqIQfwLtV4syYuXUXNPCtdnQFk97O6K6B/4I5CArlxjrvP0K7uCv O5q0YKbzSj5Iio53r9ujhiIH8jLuoDQIfsdgtKUpv/XlhL9EwSjcJLJ/cBQmBH71yMf8aO 0nE8nmZbRLKp/Ea7MDhpGhqCrrn8uSDf6XuH2iUoINNmxpLOAuyVH7SuAbG8nw== 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 4VlCJ106LRzXdk; Thu, 23 May 2024 02:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2lCqN057393; Thu, 23 May 2024 02:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2lCB4057390; Thu, 23 May 2024 02:47:12 GMT (envelope-from git) Date: Thu, 23 May 2024 02:47:12 GMT Message-Id: <202405230247.44N2lCB4057390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: 3cec7e14b06e - releng/14.1 - Add man page for the ice network driver. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 3cec7e14b06edb74c6c30889bef5c8e448ecec71 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3cec7e14b06edb74c6c30889bef5c8e448ecec71 commit 3cec7e14b06edb74c6c30889bef5c8e448ecec71 Author: Mathieu Simon <freebsd@simweb.ch> AuthorDate: 2024-05-21 05:49:50 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:45:25 +0000 Add man page for the ice network driver. PR: 262892 MFC after: 3 days Reviewed by: concussious.bugzilla@runbox.com, erj Differential Revision: https://reviews.freebsd.org/D45270 (cherry picked from commit 8e5e42d54ad3093e38263814d1f3e7d8406d5421) (cherry picked from commit 42e50eaf7f6f4459f1217564fd143ae4f8127154) Approved by: re (karels) --- share/man/man4/Makefile | 2 + share/man/man4/ice.4 | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 252 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index a2d544034005..7c18e3cf7d12 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -209,6 +209,7 @@ MAN= aac.4 \ hwpmc.4 \ ${_hwpstate_intel.4} \ iavf.4 \ + ice.4 \ ichsmb.4 \ ${_ichwd.4} \ icmp.4 \ @@ -688,6 +689,7 @@ MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ice.4 if_ice.4 MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 new file mode 100644 index 000000000000..da46c758479c --- /dev/null +++ b/share/man/man4/ice.4 @@ -0,0 +1,250 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Copyright (c) 2019-2020, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms of the Software, 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. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this Software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.Dd May 20, 2024 +.Dt ICE 4 +.Os +.Sh NAME +.Nm ice +.Nd "Intel Ethernet 800 Series Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iflib" +.Cd "device ice" +.Ed +.Pp +To load the driver as a module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ice_load="YES" +.Ed +.Sh DESCRIPTION +.Ss Features +The +.Nm +driver provides support for any PCI Express adapter or LOM +(LAN On Motherboard) +in the Intel Ethernet 800 Series. +As of this writing, the series includes devices with these model numbers: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your adapter. +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +This value coincides with the maximum Jumbo Frame size of 9728. +.Pp +This driver version supports VLANs. +For information on enabling VLANs, see the +.Pa README . +.Pp +Offloads are also controlled via the interface, for instance, checksumming for +both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can +be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Ss Additional Utilities +There are additional tools available from Intel to help configure and update +the adapters covered by this driver. +These tools can be downloaded directly from Intel at +.Lk https://downloadcenter.intel.com , +by searching for their names, or by installing certain packages: +.Bl -bullet +.It +To change the behavior of the QSFP28 ports on E810-C adapters, use the +Intel EPCT (Ethernet Port configuration tool); installed by the +.Em sysutils/intel-epct +package. +.It +To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) +Update Utility for Intel Network Adapter 800 series; installed by the +.Em sysutils/intel-nvmupdate-100g +package. +.El +.Sh HARDWARE +Most adapters in the Intel Ethernet 800 Series with SFP28/QSFP28 cages +have firmware that requires that Intel qualified modules are used; these +qualified modules are listed below. +This qualification check cannot be disabled by the driver. +.Pp +The +.Nm +driver supports 100Gb Ethernet adapters with these QSFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 E100GQSFPSR28SRX +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 SPTMBP1PMCDF +.It +Intel\(rg 100G QSFP28 100GBASE-CWDM4 SPTSBP3CLCCO +.It +Intel\(rg 100G QSFP28 100GBASE-DR SPTSLP2SLCDF +.El +.Pp +The +.Nm +driver supports 25Gb and 10Gb Ethernet adapters with these SFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 10G/25G SFP28 25GBASE-SR E25GSFP28SR +.It +Intel\(rg 25G SFP28 25GBASE-SR E25GSFP28SRX (Extended Temp) +.It +Intel\(rg 25G SFP28 25GBASE-LR E25GSFP28LRX (Extended Temp) +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with these SFP+ modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSR +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG1P5 +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG2P5 +.It +Intel\(rg 10G SFP+ 10GBASE-SR E10GSFPSRX (Extended Temp) +.It +Intel\(rg 1G/10G SFP+ 10GBASE-LR E10GSFPLR +.El +.Pp +Note that adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. +.Pp +This is not an exhaustive list; please consult product documentation for an +up-to-date list of supported media. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +See the +.Xr iflib 4 +man page for more information on using iflib sysctl variables as tunables. +.Bl -tag -width indent +.It Va hw.ice.#.enable_health_events +TBW +.It Va hw.ice.#.debug.enable_tx_fc_filter +TBW +.It Va hw.ice.#.debug.enable_tx_lldp_filter +TBW +.It Va hw.ice.#.debug.enable_health_events +TBW +.El +.Sh SYSCTL PROCEDURES +.Bl -tag -width indent +.It Va dev.ice.#.fc +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is +TX pause. +.It Va dev.ice.#.advertise_speed +Allows one to set advertised link speeds, this will then cause a link +renegotiation. +.It Va dev.ice.#.current_speed +This is a display of the current setting. +.It Va dev.ice.#.fw_version +Displays the current firmware and NVM versions of the adapter. +.It Va dev.ice.#.ddp_version +TBW +.It Va dev.ice.#.requested_fec +TBW +.It Va dev.ice.#.negotiated_fec +TBW +.It Va dev.ice.#.fw_lldp_agent +TBW +.It Va dev.ice.#.ets_min_rate +TBW +.It Va dev.ice.#.up2tc_map +TBW +.It Va dev.ice.#.pfc +TBW +.El +.Sh INTERRUPT STORMS +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr iflib 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.2 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Intel Corporation Aq Mt freebsd@intel.com . From nobody Thu May 23 02:47:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCJ23pmbz5LZXC; Thu, 23 May 2024 02:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCJ21bGdz45yQ; Thu, 23 May 2024 02:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFFnT922PQT8Jgkz+34Br5kZUU0y5zdt50OwrXxmArM=; b=gWZ+bGimf1Dikj52VJxKEF/+1w9UND7u3TaD0tVcBtRxVjGfc+1mbVhYBgjmiPC0HVL918 +HJubLrmypWnFMqr3D7h+uFmH5D8878kap1SuvJR6r/RL3KPYhLUFLu2W51SyrpXwGD/Wv zJWVwLxdqMQnBuLxM1xCqRAujFDHpU4h2HG/YTsg+3BivFA/Tyhw6vKKdw87ls+PtFquC5 zrEoVW+k8vjOdjkps0KqI+S3R+KU9RWMxLwJDHLfiNbI6KDvU05+yyemtVM03gtI4aGIYR Z4i8Sn7XU2yLEe42yFgB85YnJMUYExN01VvRoaXExNy+xqNKH1vwIo8IRWl71Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432434; a=rsa-sha256; cv=none; b=aqyAgpEgUaES70/eV9WnIAsyQXDLBAX/eJMocjHj5CajwQtGKana1gB8L+F7+MFkz4hmV2 mtoQBxnM6ym1+lxaooOHTwdPMpMVl6oNAB8xhwKq9a2/RAFZelQjBwoKy3+lQqHT5IiDif 8FrKVuy/p7PkL3E8ZmVvfc9bnk2Bho+NgXG64tbJJ/SBGcwlB42Qi4yUsWV6kQFbfrwMLV dPCxb36BWUZX5SGZakxNBpWtJ5oRpnb5ZNJogENCRrkszS9AyRObLSyYEy89vjFLxDQz7w SauC6Km4PQMjszTSXnLEw54yLe9gCpUDxu8IR5uMvsT8LZqUlzOk5MgRPXFTsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFFnT922PQT8Jgkz+34Br5kZUU0y5zdt50OwrXxmArM=; b=i5/2R0bDOZhNk5uHEA5S24k0p+giBfvQDY4SGqE4VipjUcGuibrcrUkKs/QDVeHee8KhfG fXE2fYucgBSKN8hYpgB1rYgcHOY2uRCE+3+tg85/M94s4D9ojx5QdLIrTxA4mbexV3i6dQ Kml/o0Wu/EzHcHyN5y74zrJONYUq61nhTivVHmGD0bsUs1GrKCYQ20uuE189qxe9pxqAM9 zfpUzDmzIMfeajgebv2v8K0+R9XOp2HzGHmPWsuiK6U0Bg8gfv1J1npfsTBI3rhpjf9zEE ELRElIWdXEsfSA840mDwNbqdbnLwg1lBo4/xN+vM3smukYF+S72FpR43E89TCg== 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 4VlCJ20mwhzXsH; Thu, 23 May 2024 02:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2lElK057456; Thu, 23 May 2024 02:47:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2lENF057453; Thu, 23 May 2024 02:47:14 GMT (envelope-from git) Date: Thu, 23 May 2024 02:47:14 GMT Message-Id: <202405230247.44N2lENF057453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: 8766ae10d3b7 - releng/14.1 - access.2: Mention that lstat(2) should be used for symbolic links List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8766ae10d3b792caf7c31b583afcaf43b1a6543f Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8766ae10d3b792caf7c31b583afcaf43b1a6543f commit 8766ae10d3b792caf7c31b583afcaf43b1a6543f Author: Gordon Bergling <gbe@FreeBSD.org> AuthorDate: 2024-05-13 08:40:12 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:45:49 +0000 access.2: Mention that lstat(2) should be used for symbolic links access(), eaccess() and faccessat() will always dereference symbolic links. So add a note in the manual page, that lstat(2) should be used in the case of symbolic links. PR: 262895 Reviewed by: gbe, pauamma_gundo.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44890 (cherry picked from commit 421025a274fb5759b3ecc8bdb30b24db830b45ae) (cherry picked from commit f075b6113726d74342d4af15dfab60709f50b859) Approved by: re (cperciva) --- lib/libc/sys/access.2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 681e4483a9e6..64ed1133b23d 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -27,7 +27,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd March 30, 2021 +.Dd May 13, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -149,6 +149,15 @@ Likewise for .Dv R_OK and .Dv W_OK . +.Pp +.Fn access , +.Fn eaccess +and +.Fn faccessat +will always dereference symbolic links. +If the symbolic link itself needs to be referenced, +.Xr lstat 2 +should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS From nobody Thu May 23 02:47:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCJ345t1z5LZck; Thu, 23 May 2024 02:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCJ32zx0z45rN; Thu, 23 May 2024 02:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7gUCz20Txw/JcsXdsm3tB4WA9PBAMAbt3ztF1bQGv8o=; b=UG7kPrXFZi3el0NqcfPGZGGTgl8x1lHS9CJVwwHmwNv7bK91U+e3BL55CE0QlMdgCY4uIA f4DrmqktW8JE1axgh+I0AmLAEL4HViSoOxQq7t+Y+YCzZTMuiYmLxfiPsW8DLEkalP6cyU F0aKWtlufoSbw5H5mAkuKHI6a0meMmfNibgyCugJWuFOmoMftkonQ4g3N2exNNFD07VKkd qNfXiLEcn2Zv0ccqK5nJXH0RX+ghIUvgroGCwH8Fh63+yBcA8b2z6Ji2BrGi96nrm6WO09 YhkWSodWrko/924df5MhDFbfUHp2fGtT7LO2HO6aPYsjI0hJTZROyR6t4nUpEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432435; a=rsa-sha256; cv=none; b=bhpU4JRMhly+UafgGKH5Erc/wDmLvt+reMkGiJ1sQK/v7WCqvlmchI7zB7I/CH0m6d0g34 lvJYMwqRwHfj8MKee9tfqPAt7UQkN6t1BZYy6cJwdAhnntvLTVm5jzvxVv27WPiT8Xox/b o+dUC0ybEfUIsN3mKTFDK9FAYbez4yO3/fxPywBQpgfHKj7dwyH4yeskjZgA7o/F26OjtW jOeAczAkVjWzOOtlmuf2Dfi/SCj0vFs6/UdITsP0A8VzKr5OQ2ClG/PfzXcPM7gbIkWGf1 OMHZw0oiKTZQE18YYbUQ2CvV4SF1GvnQ6Z/2Fo9DTrdYc6m/YFi8fKt2Xc/Bzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7gUCz20Txw/JcsXdsm3tB4WA9PBAMAbt3ztF1bQGv8o=; b=KyUprN4IaXriv2K6NQOh4n6ZNdS25xf81JaWLfVMMpFTD1rmvZMEJQrnTx3Nxj58/4lwUf MFyBfo+JWUgo5qvQSBAIkezPpSZ/4tdJC+ieGNNpMLFGBD3cfsFL0hB3jbRZEuUku3FxmB KeVTqnsJDC9yt0jEomVlgwiqdBswVPen4X9i34nidYLbVJbYW5LcxN0GFPn8ZsziGXYOaj mhp+gfJNek16KVsaSxhqKnEwh6A3yGZSEF7ZPAbu4yuWoeLnNB7kP0DJitpqs4Q/1RYQPG H37X4TozH87c1Pu0JA5wyd137rQnKR396FKDPiHY3if7z7VMKRkDT4KOsTpaVw== 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 4VlCJ31pZCzXsJ; Thu, 23 May 2024 02:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2lFkI057507; Thu, 23 May 2024 02:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2lFMP057504; Thu, 23 May 2024 02:47:15 GMT (envelope-from git) Date: Thu, 23 May 2024 02:47:15 GMT Message-Id: <202405230247.44N2lFMP057504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: fb18c369c32d - releng/14.1 - access(2): Discourage use of these system calls. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: fb18c369c32d746569e36ae7dca7dad43bcc118e Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fb18c369c32d746569e36ae7dca7dad43bcc118e commit fb18c369c32d746569e36ae7dca7dad43bcc118e Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2024-05-21 22:35:22 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:45:55 +0000 access(2): Discourage use of these system calls. Fixes: 421025a274fb PR: 262895 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45240 (cherry picked from commit a4be1eb21165d7aedae9dc6634528619ff10d025) (cherry picked from commit 79b39f23e1341bdc3ab9c6a08e1506d40b8b6dbc) Approved by: re (cperciva) --- lib/libc/sys/access.2 | 105 ++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 55 deletions(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 64ed1133b23d..8595444720b1 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -27,7 +27,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd May 13, 2024 +.Dd May 21, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -47,35 +47,43 @@ .Fn faccessat "int fd" "const char *path" "int mode" "int flag" .Sh DESCRIPTION The -.Fn access -and +.Fn access , .Fn eaccess -system calls check the accessibility of the -file named by -the +and +.Fn faccessat +system calls report whether an attempt to access the file designated +by their .Fa path -argument -for the access permissions indicated by -the +in the manner described by their .Fa mode -argument. +argument is likely to succeed. The value of .Fa mode -is either the bitwise-inclusive OR of the access permissions to be -checked -.Dv ( R_OK +is either the bitwise-inclusive OR of the desired permissions +.Po +.Dv R_OK for read permission, .Dv W_OK for write permission, and .Dv X_OK -for execute/search permission), -or the existence test -.Pq Dv F_OK . +for execute / search permission +.Pc +or +.Dv F_OK +to simply check whether the file exists. .Pp -For additional information, see the -.Sx "File Access Permission" -section of -.Xr intro 2 . +For a number of reasons, these system calls cannot be relied upon to +give a correct and definitive answer. +They can at best provide an early indication of the expected outcome, +to be confirmed by actually attempting the operation. +For existence checks, either +.Xr stat 2 +or +.Xr lstat 2 +should be used instead. +See also +.Sx SECURITY CONSIDERATIONS +below. .Pp The .Fn eaccess @@ -89,6 +97,13 @@ the real user ID in place of the effective user ID, the real group ID in place of the effective group ID, and the rest of the group access list. .Pp +See the +.Sx DEFINITIONS +section of +.Xr intro 2 +for additional information on file access permissions and real +vs. effective user and group IDs. +.Pp The .Fn faccessat system call is equivalent to @@ -116,8 +131,10 @@ list, defined in .In fcntl.h : .Bl -tag -width indent .It Dv AT_EACCESS -The checks for accessibility are performed using the effective user and group -IDs instead of the real user and group ID as required in a call to +The checks are performed using the effective user and group IDs, +like +.Fn eaccess , +instead of the real user and group ID, like .Fn access . .It Dv AT_RESOLVE_BENEATH Only walk paths below the directory specified by the @@ -149,23 +166,15 @@ Likewise for .Dv R_OK and .Dv W_OK . -.Pp -.Fn access , -.Fn eaccess -and -.Fn faccessat -will always dereference symbolic links. -If the symbolic link itself needs to be referenced, -.Xr lstat 2 -should be used instead. .Sh RETURN VALUES .Rv -std .Sh ERRORS +The .Fn access , .Fn eaccess , -or +and .Fn faccessat -will fail if: +system calls may fail if: .Bl -tag -width Er .It Bq Er EINVAL The value of the @@ -256,25 +265,11 @@ system call appeared in .Fx 8.0 . .Sh SECURITY CONSIDERATIONS The -.Fn access -system call -is a potential security hole due to race conditions and -should never be used. -Set-user-ID and set-group-ID applications should restore the -effective user or group ID, -and perform actions directly rather than use -.Fn access -to simulate access checks for the real user or group ID. -The -.Fn eaccess -system call -likewise may be subject to races if used inappropriately. -.Pp -.Fn access -remains useful for providing clues to users as to whether operations -make sense for particular filesystem objects (e.g. 'delete' menu -item only highlighted in a writable folder ... avoiding interpretation -of the st_mode bits that the application might not understand -- -e.g. in the case of AFS). -It also allows a cheaper file existence test than -.Xr stat 2 . +.Fn access , +.Fn eaccess , +and +.Fn faccessat +system calls are subject to time-of-check-to-time-of-use races and +should not be relied upon for file permission enforcement purposes. +Instead, applications should perform the desired action using the +requesting user's credentials. From nobody Thu May 23 02:47:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCJ467Tkz5LZRM; Thu, 23 May 2024 02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCJ442Cmz464W; Thu, 23 May 2024 02: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=1716432436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1H3v78dZMN6QOiKSEwuLdcFUev53mNOw6SZ1QaKfPNU=; b=dqsFbAnNp9vQTjITrvhdDW/Wqq5wNkV2gvzNjDg9jA5oQKAINHNPoIfk8v9x8Vn6P+TgfU V/jxQLlTMtP74cE5ETG8woMECH+uJ3dWLNQAm6B6zm99XLLRggrEbGpMtCXzofBa2u+KxK wlHuU2atOcadP+QUL1AzqenImllzdXhjKV/dF3n2kYqZ3ILr0P5BU27Qh2OYrd8GlXgT8O 3buUR3UD215syjuKcPfmzGgw8Yg0hBm+YRH0RpLQiqYU0W1cVl1LA9ZnHEs7gp9+4Y+VMf ZQAPfEeZ6JibHuovF5m8dOVU2bkadqGS3wxY8qBch5tmx9qp6uENyPSUQOSXUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716432436; a=rsa-sha256; cv=none; b=dCAk0p1P8IkttgCdme0w742PFYJLeVhQXNj1gyPgsq3gNjo8bfRYD0hIWtnqlnJnyHcoQ5 7X/gUg/koVHzlFcpXqBcQHSduAtN9ENxb84x3RL+jmucZ2LPBZihxTyeHIin8FlTMs9QgJ S975yTQHdpLi1u0hMzi4Q1gfT2pq7J+3MPHg4GFeFDhCGmBeuzY7ilwaahb6Lbm/dkL1B7 w++C4zwPQCe/C+XlUr6aTg0jIhMcaM3VWNuKMN9RyjNWWfVATlHDPbtizvZLHoNdRDCpQF KEo435GA2E+NJVTAbVJNfzmZpHZzUmG7OOhRS/GWwqSnNInFfmuZl1LTks9x/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716432436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1H3v78dZMN6QOiKSEwuLdcFUev53mNOw6SZ1QaKfPNU=; b=mS1KRKMclEROQLWyaNo14ptol5VszA/gwgtTlRMZVsbv5oJj6lydyWulw1UAsB534nOJHN /cF/cMXg4JstoB9h2TMPUJPzm7WqZq3pKlXcCd12X2WGpzcMwPcsNsixUv2XapfHbdIMnb cQF7Nh565iUZ9Ti34oqkAvqEH+jq4I6UkYZfvUs5dlrIMPR+bsE0DH+nuho7L0Wyo66m/c eAsqkR/liWIhZ2VIFfsPU4YoiqAKql0oO4V3DOfAJibsODDx/fn06aVrIFhlQeyQcqED1c Xonuvqr0Hs4CABaqGSijfqEYFSHRdmEatcE0A1Kq+nI0UfTKpMNRckArK7mBJQ== 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 4VlCJ43HggzX7Z; Thu, 23 May 2024 02:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N2lG7f057549; Thu, 23 May 2024 02:47:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N2lG35057546; Thu, 23 May 2024 02:47:16 GMT (envelope-from git) Date: Thu, 23 May 2024 02:47:16 GMT Message-Id: <202405230247.44N2lG35057546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> Subject: git: f9b5ecd25790 - releng/14.1 - iavf(4): Improve man page List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: f9b5ecd257908b1623daf28782c92c3dde95d368 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f9b5ecd257908b1623daf28782c92c3dde95d368 commit f9b5ecd257908b1623daf28782c92c3dde95d368 Author: Eric Joyner <erj@FreeBSD.org> AuthorDate: 2024-05-21 23:24:31 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2024-05-23 02:46:00 +0000 iavf(4): Improve man page MFC after: 3 days Reviewed by: erj Differential Revision: https://reviews.freebsd.org/D43093 (cherry picked from commit ba222f6fb4b226ab24beaa13a8591dcb624ae70f) (cherry picked from commit 4c380c44c82f36c04539e3c9e60e58567abf3856) Approved by: re (karels) --- share/man/man4/iavf.4 | 348 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 282 insertions(+), 66 deletions(-) diff --git a/share/man/man4/iavf.4 b/share/man/man4/iavf.4 index 2e265a5a2fbb..d55e084e82cc 100644 --- a/share/man/man4/iavf.4 +++ b/share/man/man4/iavf.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2013-2018, Intel Corporation .\" All rights reserved. .\" @@ -29,12 +32,12 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd January 30, 2019 +.Dd May 21, 2024 .Dt IAVF 4 .Os .Sh NAME .Nm iavf -.Nd "Intel Adaptive Virtual Function driver" +.Nd "Intel Ethernet Adaptive Virtual Function Driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -51,87 +54,300 @@ if_iavf_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the PCI Virtual Functions from the 700 Series of -ethernet devices and newer product families. -The driver supports Jumbo Frames, TX/RX checksum offload, -TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, and -Receive Side Steering (RSS), all for both IPv4 and IPv6. -For further hardware information and questions related to hardware -requirements, see -.Pa http://support.intel.com/ . -.Pp -Support for Jumbo Frames is provided via the interface MTU setting. -Selecting an MTU larger than 1500 bytes with the +driver provides support for any PCI Virtual Function created from certain +Intel Ethernet devices. +This driver is compatible with virtual functions bound to devices based on the +following: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.It +Intel\(rg Ethernet Controller I710 +.It +Intel\(rg Ethernet Controller X710 +.It +Intel\(rg Ethernet Controller XL710 +.It +Intel\(rg Ethernet Network Connection X722 +.It +Intel\(rg Ethernet Controller XXV710 +.It +Intel\(rg Ethernet Controller V710 +.El +.Pp +The associated Physical Function (PF) drivers for this VF driver are: +.Pp +.Bl -bullet -compact +.It +.Xr ice 4 +.It +.Xr ixl 4 +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your Intel Ethernet Adapter. +All hardware requirements listed apply to use with +.Fx . +.Ss The VF Driver +The VF driver is normally used in a virtualized environment where a host driver +manages SR\-IOV, and provides a VF device to the guest. +.Pp +In the +.Fx +guest, the iavf driver would be loaded and will function using +the VF device assigned to it. +.Pp +The VF driver provides most of the same functionality as the core driver, but +is actually a subordinate to the host. +Access to many controls is accomplished by a request to the host via what is +called the "Admin queue." +These are startup and initialization events, however; once in operation, the +device is self\-contained and should achieve near native performance. +.Pp +Some notable limitations of the VF environment: +.Bl -bullet +.It +The PF can configure the VF to allow promiscuous mode, using a configuration +parameter in +.Xr iovctl.conf 5 ; +otherwise, promiscuous mode will not work +.It +Media info is not available from the PF, so the active media will always be +displayed as auto in .Xr ifconfig 8 -utility configures the adapter to receive and transmit Jumbo Frames. -The maximum MTU size for Jumbo Frames is 9706. +.El +.Ss Adaptive Virtual Function +Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to +adapt to changing feature sets of the physical function driver (PF) with which +it is associated. +This allows system administrators to update a PF without having to update all +the VFs associated with it. +All AVFs have a single common device ID and branding string. .Pp -Offloads are also controlled via the interface, for instance, -checksumming for both IPv4 and IPv6 can be set and unset, TSO4 -and/or TSO6, and finally LRO can be set and unset. +AVFs have a minimum set of features known as "base mode," but may provide +additional features depending on what features are available in the PF with +which the AVF is associated. +The following are base mode features: +.Bl -bullet -compact +.It +4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) +for Tx/Rx +.It +iavf descriptors and ring format +.It +Descriptor write\-back completion +.It +1 control queue, with iavf descriptors, CSRs and ring format +.It +5 MSI\-X interrupt vectors and corresponding iavf CSRs +.It +1 Interrupt Throttle Rate (ITR) index +.It +1 Virtual Station Interface (VSI) per VF +.It +1 Traffic Class (TC), TC0 +.It +Receive Side Scaling (RSS) with 64 entry indirection table and key, +configured through the PF +.It +1 unicast MAC address reserved per VF +.It +8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device +.It +16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device +.It +Stateless offloads \- non\-tunneled checksums +.It +AVF device ID +.It +HW mailbox is used for VF to PF communications +.El +.Sh CONFIGURATION AND TUNING +.Ss Important System Configuration Changes +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. .Pp -For more information on configuring this device, see -.Xr ifconfig 8 . +The default is 1000. .Pp -.Em NOTE : -This +Best throughput results are seen with a large MTU; use 9706 if possible. +The default number of descriptors per ring is 1024. +Increasing this may improve performance, depending on your use case. +.Ss Configuring for no iflib +.Xr iflib 4 +is a common framework for network interface drivers for +.Fx +that uses a shared set of sysctl names. +.Pp +The default .Nm -driver is only for Virtual Functions. -For 700 series Physical Functions, use the -.Xr ixl 4 -driver. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt before booting the kernel or stored in -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va hw.iavf.rx_itr -The RX interrupt rate value, set to 62 (124 usec) by default. -.It Va hw.iavf.tx_itr -The TX interrupt rate value, set to 122 (244 usec) by default. -.It Va hw.iavf.enable_head_writeback -When the driver is finding the last TX descriptor processed by the hardware, -use a value written to memory by the hardware instead of scanning the -descriptor ring for completed descriptors. -Disabled by default; this mimics the "legacy" TX behavior found in -.Xr ixgbe 4 . -to ensure compatibility with future, non-700 series VF devices. +driver depends on it, but it can be compiled without it. +.Ss Jumbo Frames +Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) +to a value larger than the default value of 1500. +.Pp +Use the +.Xr ifconfig 8 +command to increase the MTU size. +.Pp +To confirm the MTU used between two specific devices, use +.Xr route 8 : +.Bd -literal -offset indent +route get <destination_IP_address> +.Ed +.Pp +NOTE: +.Bl -bullet +.It +The maximum MTU setting for jumbo frames is 9706. +This corresponds to the maximum jumbo frame size of 9728 bytes. +.It +This driver will attempt to use multiple page-sized buffers to receive +each jumbo packet. +This should help to avoid buffer starvation issues when allocating receive +packets. +.It +Packet loss may have a greater impact on throughput when you use jumbo +frames. +If you observe a drop in performance after enabling jumbo frames, enabling +flow control may mitigate the issue. .El -.Sh SUPPORT -For general information and support, -go to the Intel support website at: -.Pa http://support.intel.com/ . +.Ss Checksum Offload +Checksum offloading supports both TCP and UDP packets and is supported for both +transmit and receive. +.Pp +TSO (TCP Segmentation Offload) supports both IPv4 and IPv6. +Both of these features are enabled and disabled via +.Xr ifconfig 8 . .Pp -If an issue is identified with this driver with a supported adapter, -email all the specific information related to the issue to -.Mt freebsd@intel.com . +NOTE: +.Bl -bullet -compact +.It +TSO requires Tx checksum; if Tx checksum is disabled then TSO will also +be disabled. +.El +.Ss LRO +LRO (Large Receive Offload) may provide Rx performance improvement. +However, it is incompatible with packet\-forwarding workloads. +You should carefully evaluate the environment and enable LRO when possible. +.Ss Rx and Tx Descriptor Rings +Allows you to set the Rx and Tx descriptor rings independently. +Set them via these +.Xr iflib 4 +sysctls: +.Bl -tag -width indent +.It dev.iavf.#.iflib.override_nrxds +.It dev.iavf.#.iflib.override_ntxds +.El +.Ss Link\-Level Flow Control (LFC) +The VF driver does not have access to flow control settings. +It must be managed from the host side. .Sh SEE ALSO .Xr arp 4 , +.Xr ice 4 , +.Xr iflib 4 , .Xr ixl 4 , .Xr netintro 4 , .Xr vlan 4 , -.Xr ifconfig 8 , -.Xr iflib 9 +.Xr ifconfig 8 +.Pp +See the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for additional information on features. +It is available on the Intel website at either of the following: +.Bl -bullet +.It +.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831 +.It +.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html +.El +.Pp +For information on how to identify your adapter, and for the latest Intel +network drivers, refer to the Intel Support website: +.Aq Lk http://www.intel.com/support +.Sh CAVEATS +.Ss Driver Buffer Overflow Fix +The fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069 +.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html , +is included in this and future versions of the driver. +.Ss Network Memory Buffer Allocation +.Fx +may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. +You can check to see if the system is mbuf\-starved by running +.Li "netstat -m" . +Increase the number of mbufs by editing the lines below in +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +kern.ipc.nmbclusters +kern.ipc.nmbjumbop +kern.ipc.nmbjumbo9 +kern.ipc.nmbjumbo16 +kern.ipc.nmbufs +.Ed +.Pp +The amount of memory that you allocate is system specific, and may require +some trial and error. +Also, increasing the following in +.Xr sysctl.conf 5 +could help increase +network performance: +.Bd -literal -offset indent +kern.ipc.maxsockbuf +net.inet.tcp.sendspace +net.inet.tcp.recvspace +net.inet.udp.maxdgram +net.inet.udp.recvspace +.Ed +.Ss UDP Stress Test Dropped Packet Issue +Under small packet UDP stress with the +.Nm +driver, the system may drop UDP packets due to socket buffers being full. +Setting the PF driver's Flow Control variables to the minimum may resolve the +issue. +.Ss Disable LRO when routing/bridging +LRO must be turned off when forwarding traffic. +.Sh SUPPORT +For general information, go to the Intel support website at +.Aq Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with the released source code on a supported kernel +with a supported adapter, email the specific information related to the issue +to +.Aq Mt freebsd@intel.com . +.Sh LEGAL +Intel\(rg is a trademark or registered trademark of Intel Corporation +or its subsidiaries in the United States and / or other countries. +.Pp +Other names and brands may be claimed as the property of others. .Sh HISTORY The .Nm device driver first appeared in -.Fx 10.1 . -under the name "ixlv" +.Fx 10.1 +under the name +.Nm ixlv . It was converted to use -.Xr iflib 9 -and changed to its current name in -.Fx 12 . +.Xr iflib 4 +and renamed in +.Fx 12.4 . .Sh AUTHORS -.An -nosplit The .Nm -driver was written by -.An Jack Vogel Aq Mt jfv@freebsd.org -and -.An Eric Joyner Aq Mt erj@freebsd.org . -.Sh CAVEATS -This driver is supposed to function on VFs spawned from future network devices by Intel, -but at the time of this writing, has only been tested on the 700 series VFs. +driver was written by the +.An Intel Corporation Aq Mt freebsd@intel.com From nobody Thu May 23 03:11:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlCqf45X3z5LcNS; Thu, 23 May 2024 03:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlCqf3xJnz4CB7; Thu, 23 May 2024 03:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716433870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7hyCHc8EWBFp4DD23A7WgIlMbZ4vX5KoAOQs5WdCkU=; b=aRHXpchi/N2sBC7EA5IP0I9bg69alKDPFl/C72xdmcvSyX2CJREyyw8L9LBUEmuMONDVdQ LsCoJpY81xx0n1uA/dCJN1JBJHF12uYyEK9oZsEhwEDw9ozuWbq2eYD40RAXGLYJh4DVKH l4WC9g4kHUNBXAo+wBmF/ruxfvWLwcMmNqTFi7NRFuB/zXeWHVostD+4gLVicedu7xdd94 wSbVWmmcUTuk1a46qb0I6xCNa5fF7TsP182R988Rmm64Duv6Vj2Na5cX4IyrN+jtUUhi2V VlGApPfZwahsDgwkUQ014OCjVxdbnTP0M+HD8LdA+eHIzPbrvgU/8loEz+s32A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716433870; a=rsa-sha256; cv=none; b=vGBBcoYbvBXqU9g8jrFnCUZmiQg8MybPqz2yHof4jqoXoSCWTzHJ9xvr8B7PjK2BSaMYSP jLxlVVMFrkE2fSCtFeNyQU4gAh/EIBYSwEfcPeUo9vSPM3guiNcIdrfuhrAnuZejqIQEXY OGghgaguRf3AKu9ev5nRtnQKb1NZI/P2wLtH/VlYbPI2bDlgnvtHrAiazAznUGk5F9RplT hQrq9+00FZiDHh7ExAMgAmdF89xwAu34Souz4FOreuEa3zC5EWWDE9sVCWY1NRY/i0+Rvw oQeCyprN790GDMfj2fff2w3d+43nmNGA5PhA3n4sLb3htz/l4NApLk/ELH/Q+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716433870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7hyCHc8EWBFp4DD23A7WgIlMbZ4vX5KoAOQs5WdCkU=; b=jQf6DhV9LdTIoK+/SDKNWuIBGAlklNmtzIO27rEPSTrjqd2RN+unkqMaoa64G2tbwzQmLT +3+iBbhupwNHxzwU6MRWNgzaygcdKM70zl8ecRBjFrqvCsEWZafmP7DAuyLVtFlvJKFtdv ZwTupI3ljjs/7k9lowhnLV2bk8i+wJ8SmGox/ix15fnCp5HP0q554fzvLwtpUeZiQ7MXbb JZ2fLMyySGq17T3CsftEKHZATIvIjQ0G0i9P2LZUeg78Gbjd21SFHkUERzW1XowcSRjAO7 MdvevWLP8L3WkqbCi4luDYkTlX2+29zOsumk2gsJVx8lDU9PE7K0BCz2YUWlLA== 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 4VlCqf3M7TzYQx; Thu, 23 May 2024 03:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N3BAOR003899; Thu, 23 May 2024 03:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N3BAJT003896; Thu, 23 May 2024 03:11:10 GMT (envelope-from git) Date: Thu, 23 May 2024 03:11:10 GMT Message-Id: <202405230311.44N3BAJT003896@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox <alc@FreeBSD.org> Subject: git: 9fc5e3fb39ca - main - arm64: set ATTR_CONTIGUOUS on the DMAP's L2 blocks List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9fc5e3fb39ca5b2239066b750bea2ce5775bd79b Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=9fc5e3fb39ca5b2239066b750bea2ce5775bd79b commit 9fc5e3fb39ca5b2239066b750bea2ce5775bd79b Author: Alan Cox <alc@FreeBSD.org> AuthorDate: 2024-05-13 06:39:28 +0000 Commit: Alan Cox <alc@FreeBSD.org> CommitDate: 2024-05-23 03:09:43 +0000 arm64: set ATTR_CONTIGUOUS on the DMAP's L2 blocks On systems configured with 16KB pages, this change creates 1GB page mappings in the direct map where possible. Previously, the largest page size that was used to implement the direct map was 32MB. Similarly, on systems configured with 4KB pages, this change creates 32MB page mappings, instead of 2MB, in the direct map where 1GB is too large. Implement demotion on L2C (32MB/1GB) page mappings within the DMAP. Update sysctl vm.pmap.kernel_maps to report on L2C page mappings. Reviewed by: markj Tested by: gallatin, Eliot Solomon <ehs3@rice.edu> Differential Revision: https://reviews.freebsd.org/D45224 --- sys/arm64/arm64/pmap.c | 264 ++++++++++++++++++++++++++++++++++++++++++------ sys/arm64/include/pte.h | 5 + 2 files changed, 237 insertions(+), 32 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 269513589d78..2ce313de36cf 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -429,7 +429,6 @@ void (*pmap_stage2_invalidate_all)(uint64_t); #define TLBI_VA_SHIFT 12 #define TLBI_VA_MASK ((1ul << 44) - 1) #define TLBI_VA(addr) (((addr) >> TLBI_VA_SHIFT) & TLBI_VA_MASK) -#define TLBI_VA_L3_INCR (L3_SIZE >> TLBI_VA_SHIFT) static int __read_frequently superpages_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, superpages_enabled, @@ -470,6 +469,7 @@ static pt_entry_t *pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va); static pt_entry_t *pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, struct rwlock **lockp); static pt_entry_t *pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va); +static bool pmap_demote_l2c(pmap_t pmap, pt_entry_t *l2p, vm_offset_t va); static bool pmap_demote_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); @@ -1108,6 +1108,7 @@ pmap_bootstrap_l2_table(struct pmap_bootstrap_state *state) static void pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i) { + pt_entry_t contig; u_int l2_slot; bool first; @@ -1118,7 +1119,7 @@ pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i) pmap_bootstrap_l1_table(state); MPASS((state->va & L2_OFFSET) == 0); - for (first = true; + for (first = true, contig = 0; state->va < DMAP_MAX_ADDRESS && (physmap[i + 1] - state->pa) >= L2_SIZE; state->va += L2_SIZE, state->pa += L2_SIZE) { @@ -1129,13 +1130,27 @@ pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i) if (!first && (state->pa & L1_OFFSET) == 0) break; + /* + * If we have an aligned, contiguous chunk of L2C_ENTRIES + * L2 blocks, set the contiguous bit within each PTE so that + * the chunk can be cached using only one TLB entry. + */ + if ((state->pa & L2C_OFFSET) == 0) { + if (state->va + L2C_SIZE < DMAP_MAX_ADDRESS && + physmap[i + 1] - state->pa >= L2C_SIZE) { + contig = ATTR_CONTIGUOUS; + } else { + contig = 0; + } + } + first = false; l2_slot = pmap_l2_index(state->va); MPASS((state->pa & L2_OFFSET) == 0); MPASS(state->l2[l2_slot] == 0); pmap_store(&state->l2[l2_slot], PHYS_TO_PTE(state->pa) | ATTR_DEFAULT | ATTR_S1_XN | ATTR_KERN_GP | - ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | L2_BLOCK); + ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK) | contig | L2_BLOCK); } MPASS(state->va == (state->pa - dmap_phys_base + DMAP_MIN_ADDRESS)); } @@ -1667,6 +1682,20 @@ pmap_init(void) vm_initialized = 1; } +static SYSCTL_NODE(_vm_pmap, OID_AUTO, l1, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "L1 (1GB/64GB) page mapping counters"); + +static COUNTER_U64_DEFINE_EARLY(pmap_l1_demotions); +SYSCTL_COUNTER_U64(_vm_pmap_l1, OID_AUTO, demotions, CTLFLAG_RD, + &pmap_l1_demotions, "L1 (1GB/64GB) page demotions"); + +static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2c, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "L2C (32MB/1GB) page mapping counters"); + +static COUNTER_U64_DEFINE_EARLY(pmap_l2c_demotions); +SYSCTL_COUNTER_U64(_vm_pmap_l2c, OID_AUTO, demotions, CTLFLAG_RD, + &pmap_l2c_demotions, "L2C (32MB/1GB) page demotions"); + static SYSCTL_NODE(_vm_pmap, OID_AUTO, l2, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "2MB page mapping counters"); @@ -1771,12 +1800,12 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va, bool final_only) } /* - * Invalidates any cached final- and optionally intermediate-level TLB entries - * for the specified virtual address range in the given virtual address space. + * Use stride L{1,2}_SIZE when invalidating the TLB entries for L{1,2}_BLOCK + * mappings. Otherwise, use stride L3_SIZE. */ static __inline void -pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, - bool final_only) +pmap_s1_invalidate_strided(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + vm_offset_t stride, bool final_only) { uint64_t end, r, start; @@ -1786,19 +1815,30 @@ pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap == kernel_pmap) { start = TLBI_VA(sva); end = TLBI_VA(eva); - for (r = start; r < end; r += TLBI_VA_L3_INCR) + for (r = start; r < end; r += TLBI_VA(stride)) pmap_s1_invalidate_kernel(r, final_only); } else { start = end = ASID_TO_OPERAND(COOKIE_TO_ASID(pmap->pm_cookie)); start |= TLBI_VA(sva); end |= TLBI_VA(eva); - for (r = start; r < end; r += TLBI_VA_L3_INCR) + for (r = start; r < end; r += TLBI_VA(stride)) pmap_s1_invalidate_user(r, final_only); } dsb(ish); isb(); } +/* + * Invalidates any cached final- and optionally intermediate-level TLB entries + * for the specified virtual address range in the given virtual address space. + */ +static __inline void +pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + bool final_only) +{ + pmap_s1_invalidate_strided(pmap, sva, eva, L3_SIZE, final_only); +} + static __inline void pmap_s2_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, bool final_only) @@ -4521,7 +4561,6 @@ static void pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, vm_offset_t va, vm_size_t size) { - pd_entry_t *lip, *ptep_end; register_t intr; PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -4529,11 +4568,6 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, if ((newpte & ATTR_SW_NO_PROMOTE) != 0) panic("%s: Updating non-promote pte", __func__); - if (size == L3C_SIZE) - ptep_end = ptep + L3C_ENTRIES; - else - ptep_end = ptep + 1; - /* * Ensure we don't get switched out with the page table in an * inconsistent state. We also need to ensure no interrupts fire @@ -4546,20 +4580,59 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, * unchanged, so that a lockless, concurrent pmap_kextract() can still * lookup the physical address. */ - for (lip = ptep; lip < ptep_end; lip++) - pmap_clear_bits(lip, ATTR_DESCR_VALID); + pmap_clear_bits(ptep, ATTR_DESCR_VALID); /* * When promoting, the L{1,2}_TABLE entry that is being replaced might * be cached, so we invalidate intermediate entries as well as final * entries. */ - pmap_s1_invalidate_range(pmap, va, va + size, size == L3C_SIZE); + pmap_s1_invalidate_range(pmap, va, va + size, false); /* Create the new mapping */ + pmap_store(ptep, newpte); + dsb(ishst); + + intr_restore(intr); +} + +/* + * Performs a break-before-make update of an ATTR_CONTIGUOUS mapping. + */ +static void +pmap_update_strided(pmap_t pmap, pd_entry_t *ptep, pd_entry_t *ptep_end, + pd_entry_t newpte, vm_offset_t va, vm_offset_t stride, vm_size_t size) +{ + pd_entry_t *lip; + register_t intr; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + + if ((newpte & ATTR_SW_NO_PROMOTE) != 0) + panic("%s: Updating non-promote pte", __func__); + + /* + * Ensure we don't get switched out with the page table in an + * inconsistent state. We also need to ensure no interrupts fire + * as they may make use of an address we are about to invalidate. + */ + intr = intr_disable(); + + /* + * Clear the old mapping's valid bits, but leave the rest of each + * entry unchanged, so that a lockless, concurrent pmap_kextract() can + * still lookup the physical address. + */ + for (lip = ptep; lip < ptep_end; lip++) + pmap_clear_bits(lip, ATTR_DESCR_VALID); + + /* Only final entries are changing. */ + pmap_s1_invalidate_strided(pmap, va, va + size, stride, true); + + /* Create the new mapping. */ for (lip = ptep; lip < ptep_end; lip++) { pmap_store(lip, newpte); - newpte += PAGE_SIZE; + newpte += stride; } dsb(ishst); @@ -4873,8 +4946,8 @@ set_l3: /* * Remake the mappings with the contiguous bit set. */ - pmap_update_entry(pmap, l3p, firstl3c | ATTR_CONTIGUOUS, va & - ~L3C_OFFSET, L3C_SIZE); + pmap_update_strided(pmap, l3p, l3p + L3C_ENTRIES, firstl3c | + ATTR_CONTIGUOUS, va & ~L3C_OFFSET, L3_SIZE, L3C_SIZE); counter_u64_add(pmap_l3c_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_l3c: success for va %#lx in pmap %p", va, @@ -7843,8 +7916,9 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, MPASS((pmap_load(ptep) & ATTR_SW_NO_PROMOTE) == 0); /* - * Split the entry to an level 3 table, then - * set the new attribute. + * Find the entry and demote it if the requested change + * only applies to part of the address range mapped by + * the entry. */ switch (lvl) { default: @@ -7863,6 +7937,16 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, ptep = pmap_l1_to_l2(ptep, tmpva); /* FALLTHROUGH */ case 2: + if ((pmap_load(ptep) & ATTR_CONTIGUOUS) != 0) { + if ((tmpva & L2C_OFFSET) == 0 && + (base + size - tmpva) >= L2C_SIZE) { + pte_size = L2C_SIZE; + break; + } + if (!pmap_demote_l2c(kernel_pmap, ptep, + tmpva)) + return (EINVAL); + } if ((tmpva & L2_OFFSET) == 0 && (base + size - tmpva) >= L2_SIZE) { pte_size = L2_SIZE; @@ -7894,8 +7978,26 @@ pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, pte &= ~mask; pte |= bits; - pmap_update_entry(kernel_pmap, ptep, pte, tmpva, - pte_size); + switch (pte_size) { + case L2C_SIZE: + pmap_update_strided(kernel_pmap, ptep, ptep + + L2C_ENTRIES, pte, tmpva, L2_SIZE, L2C_SIZE); + break; + case L3C_SIZE: + pmap_update_strided(kernel_pmap, ptep, ptep + + L3C_ENTRIES, pte, tmpva, L3_SIZE, L3C_SIZE); + break; + default: + /* + * We are updating a single block or page entry, + * so regardless of pte_size pass PAGE_SIZE in + * order that a single TLB invalidation is + * performed. + */ + pmap_update_entry(kernel_pmap, ptep, pte, tmpva, + PAGE_SIZE); + break; + } pa = PTE_TO_PHYS(pte); if (!VIRT_IN_DMAP(tmpva) && PHYS_IN_DMAP(pa)) { @@ -7970,13 +8072,14 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va) newl2 = oldl1 & ATTR_MASK; /* Create the new entries */ + newl2 |= ATTR_CONTIGUOUS; for (i = 0; i < Ln_ENTRIES; i++) { l2[i] = newl2 | phys; phys += L2_SIZE; } - KASSERT(l2[0] == ((oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK), - ("Invalid l2 page (%lx != %lx)", l2[0], - (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK)); + KASSERT(l2[0] == (ATTR_CONTIGUOUS | (oldl1 & ~ATTR_DESCR_MASK) | + L2_BLOCK), ("Invalid l2 page (%lx != %lx)", l2[0], + ATTR_CONTIGUOUS | (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK)); if (tmpl1 != 0) { pmap_kenter(tmpl1, PAGE_SIZE, @@ -7987,6 +8090,7 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *l1, vm_offset_t va) pmap_update_entry(pmap, l1, l2phys | L1_TABLE, va, PAGE_SIZE); + counter_u64_add(pmap_l1_demotions, 1); fail: if (tmpl1 != 0) { pmap_kremove(tmpl1); @@ -8227,6 +8331,96 @@ pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t va) return (l3); } +/* + * Demote an L2C superpage mapping to L2C_ENTRIES L2 block mappings. + */ +static bool +pmap_demote_l2c(pmap_t pmap, pt_entry_t *l2p, vm_offset_t va) +{ + pd_entry_t *l2c_end, *l2c_start, l2e, mask, nbits, *tl2p; + vm_offset_t tmpl3; + register_t intr; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PMAP_ASSERT_STAGE1(pmap); + l2c_start = (pd_entry_t *)((uintptr_t)l2p & ~((L2C_ENTRIES * + sizeof(pd_entry_t)) - 1)); + l2c_end = l2c_start + L2C_ENTRIES; + tmpl3 = 0; + if ((va & ~L2C_OFFSET) < (vm_offset_t)l2c_end && + (vm_offset_t)l2c_start < (va & ~L2C_OFFSET) + L2C_SIZE) { + tmpl3 = kva_alloc(PAGE_SIZE); + if (tmpl3 == 0) + return (false); + pmap_kenter(tmpl3, PAGE_SIZE, + DMAP_TO_PHYS((vm_offset_t)l2c_start) & ~L3_OFFSET, + VM_MEMATTR_WRITE_BACK); + l2c_start = (pd_entry_t *)(tmpl3 + + ((vm_offset_t)l2c_start & PAGE_MASK)); + l2c_end = (pd_entry_t *)(tmpl3 + + ((vm_offset_t)l2c_end & PAGE_MASK)); + } + mask = 0; + nbits = ATTR_DESCR_VALID; + intr = intr_disable(); + + /* + * Break the mappings. + */ + for (tl2p = l2c_start; tl2p < l2c_end; tl2p++) { + /* + * Clear the mapping's contiguous and valid bits, but leave + * the rest of the entry unchanged, so that a lockless, + * concurrent pmap_kextract() can still lookup the physical + * address. + */ + l2e = pmap_load(tl2p); + KASSERT((l2e & ATTR_CONTIGUOUS) != 0, + ("pmap_demote_l2c: missing ATTR_CONTIGUOUS")); + KASSERT((l2e & (ATTR_SW_DBM | ATTR_S1_AP_RW_BIT)) != + (ATTR_SW_DBM | ATTR_S1_AP(ATTR_S1_AP_RO)), + ("pmap_demote_l2c: missing ATTR_S1_AP_RW")); + while (!atomic_fcmpset_64(tl2p, &l2e, l2e & ~(ATTR_CONTIGUOUS | + ATTR_DESCR_VALID))) + cpu_spinwait(); + + /* + * Hardware accessed and dirty bit maintenance might only + * update a single L2 entry, so we must combine the accessed + * and dirty bits from this entire set of contiguous L2 + * entries. + */ + if ((l2e & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == + (ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_SW_DBM)) + mask = ATTR_S1_AP_RW_BIT; + nbits |= l2e & ATTR_AF; + } + if ((nbits & ATTR_AF) != 0) { + pmap_s1_invalidate_strided(pmap, va & ~L2C_OFFSET, (va + + L2C_SIZE) & ~L2C_OFFSET, L2_SIZE, true); + } + + /* + * Remake the mappings, updating the accessed and dirty bits. + */ + for (tl2p = l2c_start; tl2p < l2c_end; tl2p++) { + l2e = pmap_load(tl2p); + while (!atomic_fcmpset_64(tl2p, &l2e, (l2e & ~mask) | nbits)) + cpu_spinwait(); + } + dsb(ishst); + + intr_restore(intr); + if (tmpl3 != 0) { + pmap_kremove(tmpl3); + kva_free(tmpl3, PAGE_SIZE); + } + counter_u64_add(pmap_l2c_demotions, 1); + CTR2(KTR_PMAP, "pmap_demote_l2c: success for va %#lx in pmap %p", + va, pmap); + return (true); +} + /* * Demote a L3C superpage mapping to L3C_ENTRIES 4KB page mappings. */ @@ -9314,6 +9508,7 @@ struct pmap_kernel_map_range { int l3pages; int l3contig; int l2blocks; + int l2contig; int l1blocks; }; @@ -9352,15 +9547,15 @@ sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_map_range *range, break; } - sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c%c %6s %d %d %d %d\n", + sbuf_printf(sb, "0x%016lx-0x%016lx r%c%c%c%c%c %6s %d %d %d %d %d\n", range->sva, eva, (range->attrs & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP_RW ? 'w' : '-', (range->attrs & ATTR_S1_PXN) != 0 ? '-' : 'x', (range->attrs & ATTR_S1_UXN) != 0 ? '-' : 'X', (range->attrs & ATTR_S1_AP(ATTR_S1_AP_USER)) != 0 ? 'u' : 's', (range->attrs & ATTR_S1_GP) != 0 ? 'g' : '-', - mode, range->l1blocks, range->l2blocks, range->l3contig, - range->l3pages); + mode, range->l1blocks, range->l2contig, range->l2blocks, + range->l3contig, range->l3pages); /* Reset to sentinel value. */ range->sva = 0xfffffffffffffffful; @@ -9525,7 +9720,12 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) if ((l2e & ATTR_DESCR_MASK) == L2_BLOCK) { sysctl_kmaps_check(sb, &range, sva, l0e, l1e, l2e, 0); - range.l2blocks++; + if ((l2e & ATTR_CONTIGUOUS) != 0) + range.l2contig += + k % L2C_ENTRIES == 0 ? + 1 : 0; + else + range.l2blocks++; sva += L2_SIZE; continue; } diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h index 56eede01d776..1f36655a45e2 100644 --- a/sys/arm64/include/pte.h +++ b/sys/arm64/include/pte.h @@ -198,13 +198,18 @@ typedef uint64_t pt_entry_t; /* page table entry */ * can be coalesced into a single TLB entry */ #if PAGE_SIZE == PAGE_SIZE_4K +#define L2C_ENTRIES 16 #define L3C_ENTRIES 16 #elif PAGE_SIZE == PAGE_SIZE_16K +#define L2C_ENTRIES 32 #define L3C_ENTRIES 128 #else #error Unsupported page size #endif +#define L2C_SIZE (L2C_ENTRIES * L2_SIZE) +#define L2C_OFFSET (L2C_SIZE - 1) + #define L3C_SIZE (L3C_ENTRIES * L3_SIZE) #define L3C_OFFSET (L3C_SIZE - 1) From nobody Thu May 23 04:11:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlF8y4Xw7z5H1Mt; Thu, 23 May 2024 04:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlF8y40dVz4JLx; Thu, 23 May 2024 04:11:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716437474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDX3kYqtkgT8gjT881coc+VQe++F81JR7Bece5BHg7Q=; b=D1nBnWMcWjjt/4uYMocCs0mo0aMgZMpM33W31Xp0C760Ubjy+vLlAFGE3sASPYXgpN3X8d TfP9thgLpz4HRfCj/NIRfvcZNz00IzHeL8lUYvrNwO1vDtmpSW1AncjJuHG8fALJaJqRzY XJ7+JpID3eVyX54kHkcymFyVKzb8wPChXpGuJOOMmNia0REid4H6geJhRZd7wXYkbXxoI2 Kqcy0UCC9CVJ9ewX7Fu0IYouLv8rjaTOUPIRQhOLGKrSghifNrUByuL7XNN70npoMFdVtb TfIlmFQET7Z15YFt/KSE6o/4y0JwxjWXjL/llzA8MJLIA5LC69UVpGzQf3knNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716437474; a=rsa-sha256; cv=none; b=HOmVWA7ODfZ8fsUd/GggN3YkdZwILEu+oR5biUM9Bt0E82NFBjsnBi6K9QwepHwmUzjSO6 2y2GLXhKrnL3AQ1bCZ85S8BRh2XuH3JR1ul+lutewPixCUECyTpkWP8IVvRXvD6ibwdlhd 46BK6Ev3xp4esfBfOEY8TfvwHEMZ0xoaqE//1vNPX+i8peBmXUdoadyolkA6CepBDnuw0Q ShPAFyy0Xsj82wW/l89VgklGJ2JGVpmcWomgUfxX9PlIjYxPdlTPlktnrlylxX/tcxKQNy 8bQk58lsKbtSAgQ9/C8x9KF3lwLcRXkbRbzbe5FDr9gc7fHYR9G+x2AiSXHthQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716437474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDX3kYqtkgT8gjT881coc+VQe++F81JR7Bece5BHg7Q=; b=Y+KJQhAEuyqpceo0oqLii1yze9C/W8dMmtFmNbe9V/XyOSUHhOeTP1sskeQNqzjd1LvgKz W8a4t94m4EbRynqpS5S1Q1f0ogOm3aDx2ymy/00RjOBFDtnYIyzgwT8ZS2RDUvO8QjqmVa 0JsDGFPqdZEHs/hX2QVC+TcTh7xF/63PSPbH+Pzy4vywaivh9CIwY6Y2ZNlss6pj4dJJo6 NurM3itLtS1OG1CXZIg39ZcXVHNaLAM9+yuEks4Oo6E9eqXbWhNMPDmjZjcIH3N3wj9y6P LBKZFOsRBDGNT+z8oTDNircOml3SxsG6X7vThV7K2C6jnrM0hF7t+Vqyofio8A== 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 4VlF8y3Zr5zZ5W; Thu, 23 May 2024 04:11:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N4BETS009285; Thu, 23 May 2024 04:11:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N4BEIC009282; Thu, 23 May 2024 04:11:14 GMT (envelope-from git) Date: Thu, 23 May 2024 04:11:14 GMT Message-Id: <202405230411.44N4BEIC009282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang <zlei@FreeBSD.org> Subject: git: d76ef58d566c - main - freebsd-update: Correctly check if pkg(8) is present List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d76ef58d566ccf203b21a1c8fea55985f355d4d2 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d76ef58d566ccf203b21a1c8fea55985f355d4d2 commit d76ef58d566ccf203b21a1c8fea55985f355d4d2 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-05-23 04:10:17 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-05-23 04:10:17 +0000 freebsd-update: Correctly check if pkg(8) is present On systems without pkg(8) installed, `command -v pkg` will return success and falsely report that pkg(8) is present. Fix that by checking via the `pkg -N` form. This is missing from the final revision of D39695. Reported by: delphij Reviewed by: fernape, delphij Fixes: bc0c6c9cf3a9 freebsd-update: Add check for kernel modules Differential Revision: https://reviews.freebsd.org/D45292 --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index fb9924ee60eb..1456601edf26 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -667,7 +667,7 @@ upgrade_check_kmod_ports() { local report local w - if ! command -v pkg >/dev/null; then + if ! pkg -N 2>/dev/null; then echo "Skipping kernel modules check. pkg(8) not present." return fi From nobody Thu May 23 05:37:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlH4M6cWhz5H9pY; Thu, 23 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlH4M5vYsz4PJj; Thu, 23 May 2024 05:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cHnG1qcfHkgkpSBuHoJWHHcQZsKoj48UKCgRpp8bOCs=; b=UgT9mrSqo82KfNwYTNNk5pechqMauWlEJqILepSxfndy7CDNxxueYrPK6bIUMEq12UF8q+ b34xkhs51q8gfEkEG/ZKVsYhTjqhKnm2zsxKbwuE35grIkkPdZp2AsBJO23n0MkK+C6tnK 18TKg/Wy5iZKEAAo/3TukgST6QKsOWLRY7+LmmUIQ6Cnkx2kznYdkbK2bVRL3RgQHYwRQV BhKMDgWXLukhuiq/jiRSy59EvMSIXIEErZLui32KZJvK65QkWYFQcPW9632CgmfHNsGkS/ QWSYueLNf0ZwFzUDtuBdnUgrDo1vDq722rpRUNPgOe9VfRWIvPwFJleIbXDa9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442643; a=rsa-sha256; cv=none; b=cgdkm9x/KgfuBtjIlexcGSAbfqd9He3zLLDGNujJ7joLwPCd4wikIPSGPyhgY5Gwf8BnYU yhlRrzGrOM8gBFOY+Hy+kxFltXgKwqhAuHzd7PPKyA+Bi3w2lFE3jTHZ0dHxnUYi8Sap3C BVlDJqsayFhZj+bh3Td2fCI4vkRhiDIr2+4tg9C7KKi6Adas92VhHc89jK9ddv559mTcvX 5bSSPhZupI2mswTzhoeEi/TECcQ/GxW61JO+dYN7b3wYDj9K9jaXHcrLDN+HOI9SBZ3dTO wqsM/BvaJktRVHpFoz8cSo5u41vR0avmOHc1n+59BX3/zYVTmKLHzK5XeGDtkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cHnG1qcfHkgkpSBuHoJWHHcQZsKoj48UKCgRpp8bOCs=; b=POi6PPuPi30kKam0CoSOj9YxzNlQvq2gjYQiu+b686263TLG7f4aFjB+1mmgxKZ7n3CC0M XXKGUxq0CTG2iCWur7pdGoo0tvNoVui0f/OsXRJC8bXH/r0+OzP3sWPW2ln39TMWh9ldgE nxpB913mrQhCGdL/9l2GkydISAZhsLmb6BYR90NhwOjAUye3BpIXTRXVQua9GcSAqLiSlb h5qtaX3DuKzHy/WPY4FDqBLJdJ8VkWO4wYY5bV3fWjcB/djajVPM7XolvWT8H9E/LyBPhB YnmyUwgslCbduanA1q9j3ji9i6moUXvKK2h6W6QzslSS6R/8Ss43bLEB/A4WKA== 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 4VlH4M5NTvzdCH; Thu, 23 May 2024 05:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bN9n047779; Thu, 23 May 2024 05:37:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bNlU047776; Thu, 23 May 2024 05:37:23 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:23 GMT Message-Id: <202405230537.44N5bNlU047776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 78ae540decdc - releng/14.1 - fib_dxr: log malloc() failures. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 78ae540decdc4e2a2e5d2f05b1c13bd34b68a278 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=78ae540decdc4e2a2e5d2f05b1c13bd34b68a278 commit 78ae540decdc4e2a2e5d2f05b1c13bd34b68a278 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-06 18:21:55 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-23 04:25:27 +0000 fib_dxr: log malloc() failures. MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit e9927f4e6129271843985d994aab9edf7299aaa0) --- sys/netinet/in_fib_dxr.c | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 94f066bdf982..c4815a64b260 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1118,8 +1118,10 @@ dxr_init(uint32_t fibnum, struct fib_data *fd, void *old_data, void **data) struct dxr *dxr; dxr = malloc(sizeof(*dxr), M_DXRAUX, M_NOWAIT); - if (dxr == NULL) + if (dxr == NULL) { + FIB_PRINTF(LOG_NOTICE, fd, "Unable to allocate DXR struct"); return (FLM_REBUILD); + } /* Check whether we may reuse the old auxiliary structures */ if (old_dxr != NULL && old_dxr->aux != NULL) { @@ -1213,16 +1215,41 @@ dxr_dump_end(void *data, struct fib_dp *dp) dxr_build(dxr); da = dxr->aux; - if (da == NULL) + if (da == NULL) { + /* malloc(, M_DXRAUX, M_NOWAIT) failed, retry later */ + FIB_PRINTF(LOG_NOTICE, dxr->fd, + "Unable to allocate DXR aux struct"); return (FLM_REBUILD); + } - /* Structural limit exceeded, hard error */ - if (da->rtbl_top >= BASE_MAX) + if (da->range_tbl == NULL) { + /* malloc(, M_DXRAUX, M_NOWAIT) failed, retry later */ + FIB_PRINTF(LOG_NOTICE, dxr->fd, + "Unable to allocate DXR range table"); + return (FLM_REBUILD); + } + +#ifdef DXR2 + if (da->x_tbl == NULL) { + /* malloc(, M_DXRAUX, M_NOWAIT) failed, retry later */ + FIB_PRINTF(LOG_NOTICE, dxr->fd, + "Unable to allocate DXR extension table"); + return (FLM_REBUILD); + } +#endif + + if (da->rtbl_top >= BASE_MAX) { + /* Structural limit exceeded, hard error */ + FIB_PRINTF(LOG_ERR, dxr->fd, "DXR structural limit exceeded"); return (FLM_ERROR); + } - /* A malloc(,, M_NOWAIT) failed somewhere, retry later */ - if (dxr->d == NULL) + if (dxr->d == NULL) { + /* malloc(, M_DXRLPM, M_NOWAIT) failed, retry later */ + FIB_PRINTF(LOG_NOTICE, dxr->fd, + "Unable to allocate DXR lookup table"); return (FLM_REBUILD); + } dp->f = choose_lookup_fn(da); dp->arg = dxr; @@ -1311,13 +1338,17 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, /* Structural limit exceeded, hard error */ if (da->rtbl_top >= BASE_MAX) { + /* Structural limit exceeded, hard error */ dxr_destroy(new_dxr); + FIB_PRINTF(LOG_ERR, dxr->fd, "DXR structural limit exceeded"); return (FLM_ERROR); } - /* A malloc(,, M_NOWAIT) failed somewhere, retry later */ if (new_dxr->d == NULL) { + /* malloc(, M_DXRLPM, M_NOWAIT) failed, retry later */ dxr_destroy(new_dxr); + FIB_PRINTF(LOG_NOTICE, dxr->fd, + "Unable to allocate DXR lookup table"); return (FLM_REBUILD); } From nobody Thu May 23 05:37:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlH4P00MZz5H9pc; Thu, 23 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlH4N6Y9qz4PYX; Thu, 23 May 2024 05:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TfbWhQ/LvatT1kBz9TdWyNNyT91BJUA8IwqAUzbmjKY=; b=CJejoij/Q5joiVtHlhP49ufJQElLw3oemVMVLUmSVV6FA0/L/G57ll6YcoJPV0o0pQjkum +XGxgtASkukI3+To0hqMau/99U+Tus9b72O14XdgYpYgDh63nwhE0dVB+sYZGktWAEEGiU iQrnWdDYyagMxLoTzy9L1SWW3PQfFm9g9+R8YA+gs5EiOqLipAcmSFhs3wQ+LxMH+VFJbn K/vwfAFX1Oe+bStwXINIy0b7p1lHwhhSXMhNJdLDzSUziI5Ex1p7jiq2MnWmpEkDUplsNq W8aHXSHgwcD/M6/o27wuLzpfygNJLDIu64nD2fI/yjHm9KJiBM5lusKBzVUfcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442644; a=rsa-sha256; cv=none; b=ExTwG1dL6dYuL2Shhl1uHAx8LO5rSZWQHZ1W2+UEpUUfh1qHBKPjs6BuAhhNnSTUOpkSHx 8+aud4tQOhsfgkyTlNkH1twJ9kMWq3++z5o5lKFJS7FFLGkX//THRJDB923x9jm4xYL9U7 50dJ9AHBvDU0Q4IjwnHFn7fPFwUxe9y/IDY/lAwFpGDyaYX/ZMvxdhlW44LBI9BKWO9+zt TPjLaQ5d5TnaOAUvFkiL4pJNVuljXYif7PYBnDmy2X9Jl7tZsMqWL4150XiZKHOFt7RhcY iBWwoMgXCc8EyefH2XbF7hkmaBwSE8b7kgk2WTqe9CBwkke1odiXB9DM2Vislw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TfbWhQ/LvatT1kBz9TdWyNNyT91BJUA8IwqAUzbmjKY=; b=XO4QYlZHJRHIAA9ViHwc9AUZwQVasnvbUH+/ZaUoCys+P7shkCfqhzigRekK0R8x9MMD68 b7uJpdk1/VyjRidW0qV51rgpQan8sL7EuZOBXP6fo5uegiUrbxLYsCWSu9EBhDa2M1ypet HdPXG2qluxXyPIcnJpkFW8MgIfkiRaQpOz+eGkk8Ix0rlYPUV3EWkorZD8P2YALqSaJT/5 E9osicQHmPaYOJx2O0vdlbgjewqqLBOqYOtnRaz9+YJ90xvbSx78c/NWcdxcRHnbjfk66i wH6q/jeP3V6FppQ73w9O7na9JXhTk8XRY6dopJW7iDCbrCW2itpgTmcQ8sUG9Q== 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 4VlH4N67Sszcd0; Thu, 23 May 2024 05:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bOCk047845; Thu, 23 May 2024 05:37:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bO8X047842; Thu, 23 May 2024 05:37:24 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:24 GMT Message-Id: <202405230537.44N5bO8X047842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 78782f3dd2f2 - releng/14.1 - fib_dxr: free() does nothing if arg is NULL, so remove a redundant check. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 78782f3dd2f27b5665abcb94a04584bd68900da0 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=78782f3dd2f27b5665abcb94a04584bd68900da0 commit 78782f3dd2f27b5665abcb94a04584bd68900da0 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-06 18:34:11 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-23 04:26:37 +0000 fib_dxr: free() does nothing if arg is NULL, so remove a redundant check. MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit 64136682ba1681e56093f77b4cec8bdfa6375a72) --- sys/netinet/in_fib_dxr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index c4815a64b260..f7840858f9c9 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1142,14 +1142,11 @@ static void dxr_destroy(void *data) { struct dxr *dxr = data; - struct dxr_aux *da; + struct dxr_aux *da = dxr->aux; struct chunk_desc *cdp; struct trie_desc *tp; - if (dxr->d != NULL) - free(dxr->d, M_DXRLPM); - - da = dxr->aux; + free(dxr->d, M_DXRLPM); free(dxr, M_DXRAUX); if (da == NULL || atomic_fetchadd_int(&da->refcnt, -1) > 1) From nobody Thu May 23 05:37:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlH4Q4GYBz5H9vC; Thu, 23 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlH4Q0R5gz4PfG; Thu, 23 May 2024 05:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUJbt8Oxabq6s7afjJKxm8YniYA3ubg89cAWBa4VZWc=; b=Mr7Bu0J7t3y05xEicESZ3mycEQXpKhHmQdDziHrOgBJWFOorv1OFdE4ONN7bxFaZB+wkky DTf4ewcBvrTMJnhOlApbswPFnmBhskh/skBbPzA/O5SXZx3CF2lYjQlAUE1fqDewQRRI8k z/aeSIxBB5yGhHJtVBNqy0ugtKSYUNpskNummodE3sgoKOwud8rYXQoAJYviFNw79WJmGZ 9KnXGDjLc9Rs7Fmt/xLpbU3suXPdwbDYusyZmCNbhiZsPUt9ZoUn5d9DrRVPYuVrKS/t3k zBkvZ77lom39KmnONIU9oIAVTLn1Z7K9J+N8flLAh2nyjZHVbHDQwluxrP7D3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442646; a=rsa-sha256; cv=none; b=FHw7z5oJhBzIrG8aD1ecV8w3WcqaEsVCceVoenGvkFrLSFgVBdPXv4d1j2OCAvGXmP3APJ yonLyIX/Y3WRaG1bDYvpwRfYtb2ANn17YIDqf5EMXE2JPeKv+lSkJ0Wrd0UfmgeF5AeE+t ZQKMHcNvPdx3y+niNGJqS7iOHWXpN5bCy/Ip3FPJ39/mTFaxKsHj7o06dc4i7CIlo6rURS tMkKkTzh+GpKZUbZanCpfZPrcORqENd/G0Hyl9cF8YGKWL7FMV2WKLRauH05psWfvCKFqn MRlQVDys03lro9fx16XIlti3lFHbuJ/h9fhCnAb6DhOKxTm1iJAhEyWUXptQWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUJbt8Oxabq6s7afjJKxm8YniYA3ubg89cAWBa4VZWc=; b=TIkXWaS5+JmkAa6BWaveTvXn/yQObaX/i0nsCuItMcRilTE1ytUyT0K/QW/tq0dGGkjT+7 kwd3thG4a8HSl/F+qa4gTwgC9Jp9GVOS7G40Sl1u/evccUT/I/DnzhyhiY0NWtkdkPz5cE PMWPU7hfqs1zE5aOaewoI/siXtpadVjFLkEiCjncAO/c7rAvKVFCOm/SGwrrgLD4o4evC7 zVGAQ0uPDhgtuSkiLsIm3JQBFVle6SDC08NSJKg+N5F+7AAIngPbgrHTqPEqnfufhYZ72n pkvTfuyzgKN1mHDV4yAUoC/NVUFlwTr6pdXAjbtQStZrFxMK9ar0V9qREAqKhA== 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 4VlH4Q01DLzd8w; Thu, 23 May 2024 05:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bPm8047881; Thu, 23 May 2024 05:37:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bPLY047878; Thu, 23 May 2024 05:37:25 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:25 GMT Message-Id: <202405230537.44N5bPLY047878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 4df0c59feb66 - releng/14.1 - fib_dxr: update comment. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 4df0c59feb66bcfffe1f6b42e76e83651f9afbc8 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=4df0c59feb66bcfffe1f6b42e76e83651f9afbc8 commit 4df0c59feb66bcfffe1f6b42e76e83651f9afbc8 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-06 18:42:31 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-23 04:27:07 +0000 fib_dxr: update comment. MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit df376a714af6b9aaec5a0366e27ef42985b4220b) --- sys/netinet/in_fib_dxr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index f7840858f9c9..dcd13a249dd3 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1098,7 +1098,7 @@ dxr2_try_squeeze: } /* - * Glue functions for attaching to FreeBSD 13 fib_algo infrastructure. + * Glue functions for attaching to the FIB_ALGO infrastructure. */ static struct nhop_object * From nobody Thu May 23 05:37:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlH4R3vNsz5H9pd; Thu, 23 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlH4R1S8Gz4Phc; Thu, 23 May 2024 05:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yRAGJs5JpHPdPUKLGSP+ozy6alOPIkm2kLdRxI60WeY=; b=HOCI+ALxsFJ+PKMCDHpisUt5NcTUlmAx5WWMh2lObjDf6RyYmpIb2h+g95HDq2b9PIPjFh F54xRM3rBYoOA+qK96zHG9j4YIkJ7h5WzcBJuFVeRcI8UtTuvU0ZfmFMTsRnraA5viaqH1 lAQGDaHVArHwIUXqs4nnzG1J39EL9DqWbGcrUCZ1W0OSYll/9rixO4/OUIjeGRYGXOoTCa O/9Gt4Ci0FgcGxCFtRvj/gD4X+V/BFOGdnYakE7vSFs628e0tv+/X4BNF3e+qqaxEpEntw zkIuYzKpjLEVUDuowajFriU4AjVJZ3sduImmcP1Gfbd8ASSfeM3YHgpnSOfHcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442647; a=rsa-sha256; cv=none; b=kjbOfpvtGMCx/nqcN8lDcyRdDjhBdXkKxRE0TpuE+fOr1ZoS8PedMfY7GRgfnNWb778zjR tjwTCVvPGWem6AW0cH6oGN2onGfCkuYN7DEi0R1NIw73jmLmQ+XAtMr3DfwgxNZ736KyDx 2Zvqh4EzrYne/L49/AaZmfdc3dBToLCjn7k/SeGMdcZO6/ztxJolvGVqngmmcGk3iWbBmp yY9tTiHJGynaTcusIUCJ5d21hc9LEE4K2RZ+BlT+YfMsnUcSm5fkvNZZEM3CJgaApoZHIt ldg2xmwFvbd5yGPwFJcQpzsAR2QShKkBNuLcZ97A6z1e35Ck810W/v0QD30cHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yRAGJs5JpHPdPUKLGSP+ozy6alOPIkm2kLdRxI60WeY=; b=AhO0dCcZG3f/u53ddIeHDcMX3ltA+vSXmQKbPGTGqlE2HOjP2eJobG5aY4LJD7k9iJI/Jl se47poFt0db97nyMbRDtaF1/DrmtRniprxQLIBfja0/AsauF+otb8fsKrjjwCWE7HTxxsD ebu8TWBH53BQhmLsqkFiXiDZYRAzzbYVo3cl0T6IDwldI51NdWGw93W0myS9h5Hks0+Ma5 JoypCL2AFWU9nukUBFGzWduoFumxDyjG4vcbp0BAMu8AYn36LRpH6CuSolNzoOXcLeyzFn nJiyRsJPf2wlK0kgnx5n+wRDZKV9dKG8UITiRU/ffE4Opbmx2Z+Svqy6l1ZH5A== 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 4VlH4R149lzckY; Thu, 23 May 2024 05:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bRej047947; Thu, 23 May 2024 05:37:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bR45047944; Thu, 23 May 2024 05:37:27 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:27 GMT Message-Id: <202405230537.44N5bR45047944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 47fb63a288cd - releng/14.1 - fib_dxr: move the bulko of malloc() failure logging into dxr_build() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 47fb63a288cd2cd75b4a74c36f26a29dfcd2655f Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=47fb63a288cd2cd75b4a74c36f26a29dfcd2655f commit 47fb63a288cd2cd75b4a74c36f26a29dfcd2655f Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-07 15:11:30 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-23 04:27:33 +0000 fib_dxr: move the bulko of malloc() failure logging into dxr_build() Approved by: re (cperciva) (cherry picked from commit e474704b9c49dda12e2afff2ae05f972207e21d7) --- sys/netinet/in_fib_dxr.c | 77 +++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 47 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index dcd13a249dd3..69332b859099 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -497,8 +497,11 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk) da->range_tbl = realloc(da->range_tbl, sizeof(*da->range_tbl) * da->rtbl_size + FRAGS_PREF_SHORT, M_DXRAUX, M_NOWAIT); - if (da->range_tbl == NULL) + if (da->range_tbl == NULL) { + FIB_PRINTF(LOG_NOTICE, da->fd, + "Unable to allocate DXR range table"); return (1); + } } return (0); @@ -632,8 +635,11 @@ trie_ref(struct dxr_aux *da, uint32_t index) da->xtbl_size += XTBL_SIZE_INCR; da->x_tbl = realloc(da->x_tbl, sizeof(*da->x_tbl) * da->xtbl_size, M_DXRAUX, M_NOWAIT); - if (da->x_tbl == NULL) + if (da->x_tbl == NULL) { + FIB_PRINTF(LOG_NOTICE, da->fd, + "Unable to allocate DXR extension table"); return (-1); + } } return(tp->td_index); } @@ -873,8 +879,11 @@ dxr_build(struct dxr *dxr) if (da == NULL) { da = malloc(sizeof(*dxr->aux), M_DXRAUX, M_NOWAIT); - if (da == NULL) + if (da == NULL) { + FIB_PRINTF(LOG_NOTICE, dxr->fd, + "Unable to allocate DXR aux struct"); return; + } dxr->aux = da; da->fibnum = dxr->fibnum; da->fd = dxr->fd; @@ -895,16 +904,22 @@ dxr_build(struct dxr *dxr) if (da->range_tbl == NULL) { da->range_tbl = malloc(sizeof(*da->range_tbl) * da->rtbl_size + FRAGS_PREF_SHORT, M_DXRAUX, M_NOWAIT); - if (da->range_tbl == NULL) + if (da->range_tbl == NULL) { + FIB_PRINTF(LOG_NOTICE, da->fd, + "Unable to allocate DXR range table"); return; + } range_rebuild = 1; } #ifdef DXR2 if (da->x_tbl == NULL) { da->x_tbl = malloc(sizeof(*da->x_tbl) * da->xtbl_size, M_DXRAUX, M_NOWAIT); - if (da->x_tbl == NULL) + if (da->x_tbl == NULL) { + FIB_PRINTF(LOG_NOTICE, da->fd, + "Unable to allocate DXR extension table"); return; + } trie_rebuild = 1; } #endif @@ -1039,8 +1054,11 @@ dxr2_try_squeeze: #endif dxr->d = malloc(dxr_tot_size, M_DXRLPM, M_NOWAIT); - if (dxr->d == NULL) + if (dxr->d == NULL) { + FIB_PRINTF(LOG_NOTICE, da->fd, + "Unable to allocate DXR lookup table"); return; + } #ifdef DXR2 memcpy(dxr->d, da->d_tbl, d_size); dxr->x = ((char *) dxr->d) + d_size; @@ -1119,7 +1137,8 @@ dxr_init(uint32_t fibnum, struct fib_data *fd, void *old_data, void **data) dxr = malloc(sizeof(*dxr), M_DXRAUX, M_NOWAIT); if (dxr == NULL) { - FIB_PRINTF(LOG_NOTICE, fd, "Unable to allocate DXR struct"); + FIB_PRINTF(LOG_NOTICE, fd, + "Unable to allocate DXR container struct"); return (FLM_REBUILD); } @@ -1212,41 +1231,11 @@ dxr_dump_end(void *data, struct fib_dp *dp) dxr_build(dxr); da = dxr->aux; - if (da == NULL) { - /* malloc(, M_DXRAUX, M_NOWAIT) failed, retry later */ - FIB_PRINTF(LOG_NOTICE, dxr->fd, - "Unable to allocate DXR aux struct"); + if (da == NULL || dxr->d == NULL) return (FLM_REBUILD); - } - if (da->range_tbl == NULL) { - /* malloc(, M_DXRAUX, M_NOWAIT) failed, retry later */ - FIB_PRINTF(LOG_NOTICE, dxr->fd, - "Unable to allocate DXR range table"); - return (FLM_REBUILD); - } - -#ifdef DXR2 - if (da->x_tbl == NULL) { - /* malloc(, M_DXRAUX, M_NOWAIT) failed, retry later */ - FIB_PRINTF(LOG_NOTICE, dxr->fd, - "Unable to allocate DXR extension table"); - return (FLM_REBUILD); - } -#endif - - if (da->rtbl_top >= BASE_MAX) { - /* Structural limit exceeded, hard error */ - FIB_PRINTF(LOG_ERR, dxr->fd, "DXR structural limit exceeded"); + if (da->rtbl_top >= BASE_MAX) return (FLM_ERROR); - } - - if (dxr->d == NULL) { - /* malloc(, M_DXRLPM, M_NOWAIT) failed, retry later */ - FIB_PRINTF(LOG_NOTICE, dxr->fd, - "Unable to allocate DXR lookup table"); - return (FLM_REBUILD); - } dp->f = choose_lookup_fn(da); dp->arg = dxr; @@ -1334,18 +1323,11 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, dxr_build(new_dxr); /* Structural limit exceeded, hard error */ - if (da->rtbl_top >= BASE_MAX) { - /* Structural limit exceeded, hard error */ - dxr_destroy(new_dxr); - FIB_PRINTF(LOG_ERR, dxr->fd, "DXR structural limit exceeded"); + if (da->rtbl_top >= BASE_MAX) return (FLM_ERROR); - } if (new_dxr->d == NULL) { - /* malloc(, M_DXRLPM, M_NOWAIT) failed, retry later */ dxr_destroy(new_dxr); - FIB_PRINTF(LOG_NOTICE, dxr->fd, - "Unable to allocate DXR lookup table"); return (FLM_REBUILD); } @@ -1357,6 +1339,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, return (FLM_SUCCESS); } + FIB_PRINTF(LOG_NOTICE, dxr->fd, "fib_set_datapath_ptr() failed"); dxr_destroy(new_dxr); return (FLM_REBUILD); } From nobody Thu May 23 05:37:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlH4S5K72z5HB31; Thu, 23 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlH4S2Y3Xz4Pq2; Thu, 23 May 2024 05:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ms0wZdFii87NsgO0/fqyUUXKvS9QqD0xn2ezWMTSJk=; b=d29pZLJMbkGmDANmCGuUEKVQaH0qZ497rdrnJDZegOrO9MowEpxvXYzGx3cmYW5qJJjSKS rWkfiFmjnI+EQgLKg8GjdvTIc8SKtR46a8cL/GklaGsfkY+WkrI1tng4ZGH4kMrycXKGKt M+Z8hpHNnzuUueOlmVUSfV/q4lmGUcSjFQ9KucVIwL/PnzxrlvuOWDekIQYv0yNK6vf5ne N1gxfnLa7OH2H2X3u/KAdalBL8cBbXzRQRGaxHuatA12LBwD3c4IeI/ruGVnW7S1ptMO+2 JLyBG97x8rrpx5biguMIgY20ML2UANgfMuYH1CK9T0ijbAs1qcretk29TnPfZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442648; a=rsa-sha256; cv=none; b=PkM5cxMBTMM0DtwE0qNwOVG/wYR6jJ8tfI8AOZKSYKyVDwLuzQF8xqA13lbbRkrqNCX+H/ g+4fthhO0GpdNK3WBbiBGQt8lBilmmwhrt1KYoVyXaxvzoSQ/j4vORrDscM+ZyYNHsP3mz 2IOtQAmSe80ltrIufLX7kwxpNtJpHPgHkMg07RNPlxOpprMd2cUETDIrBak38cKvYtvpZk irJjNjxrU5DZ8Vzm1hfD94yZIPT77GMCuCMHz+N3kupkjyc1+VPCWKhku/7jC1Bn04ywSh P47xagGisOhxPiwSyAy1S9MnDgvmkIt9aKD2kUMPGdQk7+6G0FwX4w4ylQlCVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ms0wZdFii87NsgO0/fqyUUXKvS9QqD0xn2ezWMTSJk=; b=CcJvhbtgfVhN0AScyBtDiVdsci62Dim3D3ptoWKCZnSjC+/7Usgc2Z8srm16pocWQmrrAE DC+eZ5HGV/gqfUz4k0XFzYIxX4lSFpHBjeweVvrF/gUlmgVk7PhEEqxYGDOOQbq/lJsd+E 17JkBL6QvJk0OU0rIKFJVOM6Z+FV1t8dl+0Ukv8+N5RoNezgAJrEJTnXL09zHfy+rQ4P3o ivNRHTxE9iG/OSU2wH9HRZ2sAgHij+UO81lxPik6f9bz7j3Jkq1L4mRLmkq+XA8Syo/lNz v60o2cZjS3mWfH651OYOIK1ZXXz800MYqeygIgnx9ObwVJ1TxTEr3jQ/MWdtuw== 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 4VlH4S273bzcd1; Thu, 23 May 2024 05:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bS5Q048006; Thu, 23 May 2024 05:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bSTL048003; Thu, 23 May 2024 05:37:28 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:28 GMT Message-Id: <202405230537.44N5bSTL048003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: cf879fdb4820 - releng/14.1 - fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: cf879fdb482034f73150fd47aed60ff6e57110f8 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=cf879fdb482034f73150fd47aed60ff6e57110f8 commit cf879fdb482034f73150fd47aed60ff6e57110f8 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-07 15:22:00 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-23 04:28:02 +0000 fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit 52075e4cfabc30d08605ec296b2b374d61e2e2bb) --- sys/netinet/in_fib_dxr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 69332b859099..8b1e92d01d35 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1280,6 +1280,9 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, da = dxr->aux; KASSERT(da != NULL, ("%s: NULL dxr->aux", __FUNCTION__)); + KASSERT(da->fd != NULL, ("%s: da->fd %p", __FUNCTION__, da->fd)); + KASSERT(da->refcnt > 0, ("%s: da->refcnt %d", __FUNCTION__, + da->refcnt)); FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count); for (ui = 0; ui < q->count; ui++) { From nobody Thu May 23 05:37:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlH4T55zFz5H9vH; Thu, 23 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlH4T3JhSz4PKC; Thu, 23 May 2024 05:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKOAS40rxuXRvgwuKdKkFpIu6TstVPWzVYPfSgstQJE=; b=T6WmNwwmE54Jmak6eJTDkh1Z6lK94Pkv/0SFbFYk+C8zFViNu5bQgaznEKLz+iDxDZHIFE ap4H+9xgjXk7LSMJLiZHI6BrVr4WDcfWgN3WIIYTZxT/PwaxEjXl2CP4qdfJMWcKc8l7IG abVMhTB9ZBb23W6uTCrfzvxTrgRP6l8ffEk1c0Kz1FtGO8Pb1MvsZSOOaIZWASCgdqC6V1 JA4yIs1sDfSSWzNvV+lEu7HEd2Ahaqkpbr2UE256yX8I0rCOpcJSmHWh9ZiIQnI7CxvvBW ff97DKVqe8XaAn8lcLkw7IjVPYonLwJLr/UPOsKXXXZjd2f0vIRKZzUJ5Ol94w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442649; a=rsa-sha256; cv=none; b=sOTdABHBWnvy8TIQ0Szclbj3IjzrRTXpqYyTzUl5xEKfWYLJGjn+r5+TBmnxEvbnZtS3xe vgWbcYc6MtfiRz4lxu/Oi62fK+p0ed/x6n3ngJGMYcCCjXFXBfGKYlwcDh5oeD11n1Gjhw uI0xtQNk4WhLiXwl6A4IawSoGmsuEkBe9KtRJGGR3MuvsE7VuUXtaAUQYvNntE8K1yEkd7 Jkzbt6WzU5hS6EjXKviniOe+j3G/Dr29GKD3GyoqPSxy1uHyeStJOc8wTyaGa/6xs5h0qb kPp+99vVurgWsOL1RiScNwxMJq5YSqvZjeQlD7nbECA+4pXffQ4vxZVeRanOAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lKOAS40rxuXRvgwuKdKkFpIu6TstVPWzVYPfSgstQJE=; b=fI8gpiHP3rpqKYphScSLjbUng3vu8A6KQoqCSMKJiNtEfYbd+SejXgB6dNcHRUhBMIclnr 85soq8hc/u3H/FniyID9g3e8qCWsbdpvmxss9GfxiG/HdqwSgayB/fxSWpRbzrGzDOgM59 EykKlFymD9QxZIY1CYkh54hfCZ1jIZ+rpYhhozWNaMYPeTZoDmsGva/arlmO4C89qYvXle uJf0lp/EKIPr1Dyz7FPrsIWKOAZZ8dR5ZduFGSKHGh6FNnyRzbQkqeMMcucy4EBUgcfow9 BrU13N77WwV73oN2TwBGTbW4TgaVMaw76eE3FWJptmoE2pv5MWG3teP440dW3Q== 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 4VlH4T2rX1zdCJ; Thu, 23 May 2024 05:37:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bTCa048043; Thu, 23 May 2024 05:37:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bTGD048040; Thu, 23 May 2024 05:37:29 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:29 GMT Message-Id: <202405230537.44N5bTGD048040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 0e5e6a9419ea - releng/14.1 - fib_dxr: s/KASSERT/MPASS/ List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 0e5e6a9419ea1c966cfe1afe4c5e46e9bbcd43c8 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=0e5e6a9419ea1c966cfe1afe4c5e46e9bbcd43c8 commit 0e5e6a9419ea1c966cfe1afe4c5e46e9bbcd43c8 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-07 15:33:23 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-23 04:28:30 +0000 fib_dxr: s/KASSERT/MPASS/ MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit 1261fc325c3cb96eeaddf3ed5a6b1c7c6a08d064) --- sys/netinet/in_fib_dxr.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 8b1e92d01d35..82245ecf6e66 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -474,8 +474,7 @@ chunk_ref(struct dxr_aux *da, uint32_t chunk) cdp->cd_max_size = size; cdp->cd_base = fdesc->base; LIST_INSERT_HEAD(&da->all_chunks, cdp, cd_all_le); - KASSERT(cdp->cd_base + cdp->cd_max_size == da->rtbl_top, - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp->cd_base + cdp->cd_max_size == da->rtbl_top); } cdp->cd_hash = hash; @@ -525,7 +524,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) sizeof(struct range_entry_long) * size) == 0) break; - KASSERT(cdp != NULL, ("dxr: dangling chunk")); + MPASS(cdp != NULL); if (--cdp->cd_refcnt > 0) return; @@ -536,8 +535,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) /* Attempt to merge with the preceding chunk, if empty */ cdp2 = LIST_NEXT(cdp, cd_all_le); if (cdp2 != NULL && cdp2->cd_cur_size == 0) { - KASSERT(cdp2->cd_base + cdp2->cd_max_size == cdp->cd_base, - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp2->cd_base + cdp2->cd_max_size == cdp->cd_base); LIST_REMOVE(cdp, cd_all_le); LIST_REMOVE(cdp2, cd_hash_le); cdp2->cd_max_size += cdp->cd_max_size; @@ -548,8 +546,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) /* Attempt to merge with the subsequent chunk, if empty */ cdp2 = LIST_PREV(cdp, &da->all_chunks, chunk_desc, cd_all_le); if (cdp2 != NULL && cdp2->cd_cur_size == 0) { - KASSERT(cdp->cd_base + cdp->cd_max_size == cdp2->cd_base, - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp->cd_base + cdp->cd_max_size == cdp2->cd_base); LIST_REMOVE(cdp, cd_all_le); LIST_REMOVE(cdp2, cd_hash_le); cdp2->cd_max_size += cdp->cd_max_size; @@ -560,8 +557,7 @@ chunk_unref(struct dxr_aux *da, uint32_t chunk) if (cdp->cd_base + cdp->cd_max_size == da->rtbl_top) { /* Free the chunk on the top of the range heap, trim the heap */ - KASSERT(cdp == LIST_FIRST(&da->all_chunks), - ("dxr: %s %d", __FUNCTION__, __LINE__)); + MPASS(cdp == LIST_FIRST(&da->all_chunks)); da->rtbl_top -= cdp->cd_max_size; da->unused_chunks_size -= cdp->cd_max_size; LIST_REMOVE(cdp, cd_all_le); @@ -875,7 +871,7 @@ dxr_build(struct dxr *dxr) uint32_t trie_frag; #endif - KASSERT(dxr->d == NULL, ("dxr: d not free")); + MPASS(dxr->d == NULL); if (da == NULL) { da = malloc(sizeof(*dxr->aux), M_DXRAUX, M_NOWAIT); @@ -1273,16 +1269,14 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, int update_delta = 0; #endif - KASSERT(data != NULL, ("%s: NULL data", __FUNCTION__)); - KASSERT(q != NULL, ("%s: NULL q", __FUNCTION__)); - KASSERT(q->count < q->size, ("%s: q->count %d q->size %d", - __FUNCTION__, q->count, q->size)); + MPASS(data != NULL); + MPASS(q != NULL); + MPASS(q->count < q->size); da = dxr->aux; - KASSERT(da != NULL, ("%s: NULL dxr->aux", __FUNCTION__)); - KASSERT(da->fd != NULL, ("%s: da->fd %p", __FUNCTION__, da->fd)); - KASSERT(da->refcnt > 0, ("%s: da->refcnt %d", __FUNCTION__, - da->refcnt)); + MPASS(da != NULL); + MPASS(da->fd != NULL); + MPASS(da->refcnt > 0); FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count); for (ui = 0; ui < q->count; ui++) { @@ -1315,8 +1309,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, #ifdef INVARIANTS fib_get_rtable_info(fib_get_rh(da->fd), &rinfo); - KASSERT(da->prefixes + update_delta == rinfo.num_prefixes, - ("%s: update count mismatch", __FUNCTION__)); + MPASS(da->prefixes + update_delta == rinfo.num_prefixes); #endif res = dxr_init(0, dxr->fd, data, (void **) &new_dxr); From nobody Thu May 23 05:37:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlH4W0BwSz5H9xc; Thu, 23 May 2024 05:37: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlH4V4fNgz4Q1b; Thu, 23 May 2024 05:37:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qdp4QXhiq4b3DQ41jTs2EdZmGRmq2qOq2odFGmyRfds=; b=N+3MlXgLOOJBx7CJBpOCe74UgQKpi8td/CJkH5ZUubiyUIFXf1E2TWkLoUb13GVKkSJp2r PnQkoIJ4VoXJ3SteMBRvgH1JMJ0PRNtKYCJ8gao4bW0jm00N9zrQnUpvLSdXWngaFV58E2 uzEibUq7lgIO1VXPzxK3dmwbsVnmK0jus8/aqgiVyMbxMxFKifTpOPsXI8Cj8cbdhqvgw9 y3h1k02yWJ26r0wVUZdwKa0C6Px5ZQ10vpPCUIzOCx2rSsCCx31+wrWrT2xRVSprnCazqr O0Y5WGtcB17Ni5BThdzucCaGRiJD7XTVeqEo1umTlB5LhJIuHVZdatIeCDdGWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442650; a=rsa-sha256; cv=none; b=Ty3i6wQelQdFy1bJO2BEwpAzPWpIyo3/06ob6zL2nUOQpsC2EZp6BU4ycGYdkzb1ujOM2b /cjrYAFgxuB3tbbVc4a0KGeQ3w2OHEHc/Y31zsgGf8Bhtke08DRCUVNwgOHlJRl7S2O+3J gCEUA682bjXg1IlyZ7wQrgHgfi/iLQuK1VnHOb2peuVN11GIG40buaQRN/fqUS3mqif62Z 4E22LzUOMGjeBlaguRn0Hm21Sr5m8jqXcPnUgP7bLiEmAOQ7Fv5fvUIx6h0YeCaZDOhleV U4nePk+WDWcP1S5qYwXTI74fK0L8PMI7JHb1ULAtOF9Z5wNAjdGgaa4Jt555ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qdp4QXhiq4b3DQ41jTs2EdZmGRmq2qOq2odFGmyRfds=; b=wFZY9fXPEKCwBqlgkJZW+QP+OduaHRLuDzvY0R8aXG3uuzrBvfm/VQ6idCmJ5L0bCi5YS6 J/4XvrKM2hxvPksJJ0ZdDxVruEHu4OK2gvlFMfp18ejl07U+bCgEvyZSutFKc/rHZA0nMC X8Iu4IW3xsKfNBtel5p7dWaS2bhzSd6NLYMN/m3ASEVZeOkwEeJqc/MfY8NIgYSkKZCW86 MMTwoWrTSQgCMgJbkjpO+96TZ+7/2XSUFfbbJbvPF5skU22ur+vTxdvDa0ONgCKM9EAJPH SNPnylttyp+6D1XSa04dTwVT0qXgYUIUQf8HWDoqBK93jkP4nQyGNieeXPe4yg== 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 4VlH4V4G71zcyP; Thu, 23 May 2024 05:37:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N5bU8O048103; Thu, 23 May 2024 05:37:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bUTA048100; Thu, 23 May 2024 05:37:30 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:30 GMT Message-Id: <202405230537.44N5bUTA048100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec <zec@FreeBSD.org> Subject: git: 782f02004251 - releng/14.1 - fib_dxr: check if cached fib_data matches the new request in dxr_init() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 782f02004251f68d144ea7914e390297b6edad48 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=782f02004251f68d144ea7914e390297b6edad48 commit 782f02004251f68d144ea7914e390297b6edad48 Author: Marko Zec <zec@FreeBSD.org> AuthorDate: 2024-05-17 15:55:43 +0000 Commit: Marko Zec <zec@FreeBSD.org> CommitDate: 2024-05-23 04:29:22 +0000 fib_dxr: check if cached fib_data matches the new request in dxr_init() When calling dxr_init(), the FIB_ALGO infrastructure may provide a pointer to a previous dxr instance, which permits reuse of auxiliary dxr structures, i.e. incremental lookup structure updates. For dxr this is a crucial feature provided by FIB_ALGO, since dxr incremental updates are typically several orders of magnitude faster than full lookup table rebuilds. However, the auxiliary dxr structure caches a pointer to struct fib_data and relies upon it for performing incremental updates. Apparently, incremental rebuild requests from FIB_ALGO, i.e. a calls to dxr_init() with a pointer old_data set, may (under not yet fully understood circumstances) be invoked within a different fib_data context than the one cached in the previous version of dxr auxiliary structures. In such (rare) events, we ignore the offered old dxr context, and proceed with a full lookup structure rebuild instead of attempting an incremental one using a fib_data context which may or may not no longer be valid, and thus lead to a system crash. PR: 278422 MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit 4ab122e8ef127d36d95f874e85600c36c87c8c22) (cherry picked from commit d6e32525c778d92c26a37f4e1b562e80b18a9af7) --- sys/netinet/in_fib_dxr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 82245ecf6e66..539d7fe6c96f 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1139,7 +1139,8 @@ dxr_init(uint32_t fibnum, struct fib_data *fd, void *old_data, void **data) } /* Check whether we may reuse the old auxiliary structures */ - if (old_dxr != NULL && old_dxr->aux != NULL) { + if (old_dxr != NULL && old_dxr->aux != NULL && + old_dxr->aux->fd == fd) { da = old_dxr->aux; atomic_add_int(&da->refcnt, 1); } @@ -1275,7 +1276,7 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, da = dxr->aux; MPASS(da != NULL); - MPASS(da->fd != NULL); + MPASS(da->fd == dxr->fd); MPASS(da->refcnt > 0); FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count); From nobody Thu May 23 06:00:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlHbK5nKyz5HCmY; Thu, 23 May 2024 06:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlHbK5DwQz4SSN; Thu, 23 May 2024 06:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716444045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yygCUqVmMfRbAkXFmP8nw4bJcOXFAAnii0J0V+wLDDM=; b=NgmdRHJcWl54DqeeKVobmZA/e2f8l/lqokD7uOglFM9Wf916eTiTynfbWImwjmqlf2XTb6 NJzGloDQDzEhxjzZVeH6DGQZslihbCd2BfoJGFnCefBL4sVT9dJ2jKsiCSu5sPfAjor6vE 2XkUmqaHdIjNiI3YqxSJ6+IdLOLXjpeiLW71m0+F+XVCVnVk503ZE8jVKYg8f6+qrLvKpn QBL1NLSHcwBCFt30RxjU27sKZ03poP8hcw8wCBWi4zEBXRKgLRqmAKPW/m/SjLf66vMD0r 1owR5VA2nzPtt05a0E1VzS/JWB3/zMT8d8fFwKQbyFhAtlM+telSE6A3h7asdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716444045; a=rsa-sha256; cv=none; b=ZWYLcskhxtg5I2GZmyc7NbK9mK3Lfp2Vi/Yw8X2sQ4fiNzypvbWm5nHSpXtrJAp+SO3po2 Yl+j7zzgvBSDIF66Sp+EcTbvSSF1aEkXEJM+qH9/+pcWueNDKqaQEEACimaAoPsWkCqP6q fxqRzjVk44pDuSaY9hFnXkVOMYWtscBVoqTUgQUlDOCAQrnocBZ3DE6cPRDfesMB8Svawx 023GdN7LJiqwo6NV1WdnlYFjn7gocC2apMK1ejkP/MAUaFViTcgZoVxc9Dzu10cmizczv3 rTPBPfnu92WzXjXUKgIY5Nm42qLLPt9yzpxeNa9JDvYmxAtRPlYuYQygXW0ziw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716444045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yygCUqVmMfRbAkXFmP8nw4bJcOXFAAnii0J0V+wLDDM=; b=kSrlYtJI4kFoxsDH35+dMUpv4rZ5BYWsnSQ6HbofxDgrgILewl11CfULFNDaWvL1f+hBLu 9ociQhVFDvR0ghI3qbwQ/LXYLna8cj0NVF81lPs8hE3Y9wp894AHtXelHustex4q1wiaN9 vVNxmuYxOLJNyKFKV3F4AXZBxJIh7ble7TRwkzU6QMT3ntCp/IpiI/JopLXjYTJlMrp/ky QlgYP+gPAkw4rtVXiQUe3NNH9zkmIHaxMiUezOIb3s0fapV24+i+I3BUWA57qjTFhuUsMC s6JaP8TKqZZ0zJjb844JTPrCHqBfjheUp4JDt3w7mVVxQiLtO5eQ+T6mudlT/w== 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 4VlHbK4rNjzdGR; Thu, 23 May 2024 06:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N60jIW094316; Thu, 23 May 2024 06:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N60jWS094313; Thu, 23 May 2024 06:00:45 GMT (envelope-from git) Date: Thu, 23 May 2024 06:00:45 GMT Message-Id: <202405230600.44N60jWS094313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski <oshogbo@FreeBSD.org> Subject: git: ea5a708625e5 - stable/14 - geli: allocate a UMA pool earlier List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ea5a708625e5b5c89333e3e3e9a48fe588f05361 Auto-Submitted: auto-generated The branch stable/14 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=ea5a708625e5b5c89333e3e3e9a48fe588f05361 commit ea5a708625e5b5c89333e3e3e9a48fe588f05361 Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2024-05-19 12:53:17 +0000 Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> CommitDate: 2024-05-23 06:00:57 +0000 geli: allocate a UMA pool earlier The functions g_eli_init_uma and g_eli_fini_uma are used to trace the number of devices in GELI. There is an issue where the g_eli_create function may fail before g_eli_init_uma is called, however g_eli_fini_uma is still executed in the fail path. This can incorrectly decrease the device count to zero, potentially leading to the UMA pool being freed. Accessing the device after the pool has been freed causes a system panic. This commit resolves the issue by ensuring devices count is increassed eariler. PR: 278828 Reported by: Andre Albsmeier <mail@fbsd2.e4m.org> Reviewed by: asomers MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45225 (cherry picked from commit 4b3141f5d5373989598f9447ab5a9f87e2d1c9fb) --- sys/geom/eli/g_eli.c | 4 +++- tests/sys/geom/class/eli/attach_test.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index 400734c10596..bed0875283aa 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -1047,10 +1047,12 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp, bioq_init(&sc->sc_queue); mtx_init(&sc->sc_queue_mtx, "geli:queue", NULL, MTX_DEF); mtx_init(&sc->sc_ekeys_lock, "geli:ekeys", NULL, MTX_DEF); + g_eli_init_uma(); pp = NULL; cp = g_new_consumer(gp); cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; + error = g_attach(cp, bpp); if (error != 0) { if (req != NULL) { @@ -1093,7 +1095,6 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp, if (threads == 0) threads = mp_ncpus; sc->sc_cpubind = (mp_ncpus > 1 && threads == mp_ncpus); - g_eli_init_uma(); for (i = 0; i < threads; i++) { if (g_eli_cpu_is_disabled(i)) { G_ELI_DEBUG(1, "%s: CPU %u disabled, skipping.", @@ -1165,6 +1166,7 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp, sc->sc_crypto == G_ELI_CRYPTO_SW_ACCEL ? "accelerated software" : sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware"); return (gp); + failed: mtx_lock(&sc->sc_queue_mtx); sc->sc_flags |= G_ELI_FLAG_DESTROY; diff --git a/tests/sys/geom/class/eli/attach_test.sh b/tests/sys/geom/class/eli/attach_test.sh index bdb39a806fca..8803fa9f1a40 100644 --- a/tests/sys/geom/class/eli/attach_test.sh +++ b/tests/sys/geom/class/eli/attach_test.sh @@ -39,6 +39,34 @@ attach_d_cleanup() geli_test_cleanup } +atf_test_case atach_multiple_fails cleanup +attach_multiple_fails_head() +{ + atf_set "descr" "test multiple failed attach of geli provider" + atf_set "require.user" "root" +} +attach_multiple_fails_body() +{ + geli_test_setup + + sectors=1000 + attach_md md -t malloc -s `expr $sectors + 1` + atf_check dd if=/dev/random of=keyfile bs=512 count=16 status=none + + atf_check geli init -B none -P -K keyfile ${md} + atf_check geli attach -d -p -k keyfile ${md} + + for i in $(jot 100); do + atf_check -s not-exit:0 -e ignore -- geli attach -d -p -k keyfile ${md} + done + atf_check -o ignore -- newfs ${md}.eli +} +attach_multiple_fails_cleanup() +{ + geli_test_cleanup +} + + atf_test_case attach_r cleanup attach_r_head() { @@ -125,5 +153,6 @@ atf_init_test_cases() atf_add_test_case attach_d atf_add_test_case attach_r atf_add_test_case attach_multiple + atf_add_test_case attach_multiple_fails atf_add_test_case nokey } From nobody Thu May 23 06:08:32 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlHmK0Tc3z5HDQC; Thu, 23 May 2024 06:08: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlHmJ6qXbz4T6L; Thu, 23 May 2024 06:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716444513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3Hd8gO5XLmQT/kVXQNHYpHU9sWfkahYjeQaX8wj3Ek=; b=BHg3KfhQDelkyjllc6ATcXU1yHfg2K6naFzIB0dAWOxNI6rOIxNpms6XZEUsY4ack3Xt4U 4+xljqMJPysoK7pT3p09AXri+9EjHYRyJ3wTWVvK7/eVgplbM77neuHYbrBsmBQv4z7C9K YGDq8Dl9J6NUIh2TiDz0jWBOex7ioWp96GaqrM4E07a9xZYI5+6AeWll6Ln5H8yqw9tdQ5 16yqqrTAY3QeLIZI+4na4HKBlSL4Oi/TyYj3IjajFTFI2N92QFmaf16wHxmMGWUa1hg2+L S5wzQT293TrEeccM3t6VvlqDMXb0t1zFde+mwEwfee65F+YFycU5G+qqagjvfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716444513; a=rsa-sha256; cv=none; b=e8FCZ6R+G/IpmEAwf3RtCD1ImaHLnf6Rp1db0RSzPzZQzOo4YphNMXdFKqZQVlfuf+Oucj VsW6V/0+oPTJvtpIIsqPNlk39B0bQ1QpcM/Ha7d9KsvBMmuGb6rXTJZmATqLsMBRY+MSOq q2rGj5TecUtywEuBjUowJ7BZct3qYQdJZHmtWYxpgJPmuqv4zyvQwu7teNcNPDkANMk3dP LJnUU70CLr4soPxuucCFLcyV/xlW+9CBkwWEp0/M++vicfCbzjE/IdjAsGIosF9KMd/y58 L8FfEUxemzIlg+8NgloE01kyFESvUqwAWtch1SMawfOkmmT7Y1KY4kkrYgVGPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716444513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t3Hd8gO5XLmQT/kVXQNHYpHU9sWfkahYjeQaX8wj3Ek=; b=EvlEboG0fFzlY9rSiCvKNgIzIrPYGvft9AMRDRLGrliag9lGth3Suqe7niKw7k5Kjmfd94 tKqC3AyKbDSYKGI9D0kXj5ITVcBa1FWbbtd9gb7KTbevR1AS4pn6WnBs2P6M7i1Q6C7KqV y0Cds30DoiXmhzGEMbD7JGlPRxVMeZlG8EmAihSbGRsnp3vyOESy4AP/5jdmMH45zMaBLN FYclzndeNbrIl5QywbcUjUOPVB4/eKd3sV8Ujzv4LTqow8I4/Y6px8a+mA7o5WQ5kMOTyA y0lf4jlzj3wbGRZaXluESaJB6ufLUniEn7oEKOJhY8eBxB27sUOkh9Qqg8pe6g== 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 4VlHmJ6P8pzdGx; Thu, 23 May 2024 06:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N68WFr000244; Thu, 23 May 2024 06:08:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N68WUV000241; Thu, 23 May 2024 06:08:32 GMT (envelope-from git) Date: Thu, 23 May 2024 06:08:32 GMT Message-Id: <202405230608.44N68WUV000241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek <pjd@FreeBSD.org> Subject: git: 56a8aca83ab5 - main - Stop treating size 0 as unknown size in vnode_create_vobject(). List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56a8aca83ab5a93af05f4c8c3a358b71a8392af8 Auto-Submitted: auto-generated The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=56a8aca83ab5a93af05f4c8c3a358b71a8392af8 commit 56a8aca83ab5a93af05f4c8c3a358b71a8392af8 Author: Pawel Jakub Dawidek <pjd@FreeBSD.org> AuthorDate: 2024-05-19 01:08:41 +0000 Commit: Pawel Jakub Dawidek <pjd@FreeBSD.org> CommitDate: 2024-05-23 06:08:14 +0000 Stop treating size 0 as unknown size in vnode_create_vobject(). Whenever file is created, the vnode_create_vobject() function will try to determine its size by calling vn_getsize_locked() as size 0 is ambigious: it means either the file size is 0 or the file size is unknown. Introduce special value for the size argument: VNODE_NO_SIZE. Only when it is given, the vnode_create_vobject() will try to obtain file's size on its own. Introduce dedicated vnode_disk_create_vobject() for use by g_vfs_open(), so we don't have to call vn_isdisk() in the common case (for regular files). Handle the case of mediasize==0 in g_vfs_open(). Reviewed by: alc, kib, markj, olce Approved by: oshogbo (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D45244 --- sys/fs/ext2fs/ext2_vfsops.c | 2 +- sys/fs/fuse/fuse_node.c | 2 +- sys/fs/fuse/fuse_vfsops.c | 2 +- sys/geom/geom_vfs.c | 11 ++++++++++- sys/sys/vnode.h | 7 +++++++ sys/vm/vnode_pager.c | 45 +++++++++++++++++++++++++++++++-------------- 6 files changed, 51 insertions(+), 18 deletions(-) diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index bffbf4546f37..9e7a03fffd71 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -1345,7 +1345,7 @@ ext2_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) return (ESTALE); } *vpp = nvp; - vnode_create_vobject(*vpp, 0, curthread); + vnode_create_vobject(*vpp, ip->i_size, curthread); return (0); } diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 777519450954..0a24d0da4fac 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -354,7 +354,7 @@ void fuse_vnode_open(struct vnode *vp, int32_t fuse_open_flags, struct thread *td) { if (vnode_vtype(vp) == VREG) - vnode_create_vobject(vp, 0, td); + vnode_create_vobject(vp, VNODE_NO_SIZE, td); } int diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index e088f92bf5bf..e60c9aa80cfa 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -286,7 +286,7 @@ fuse_vfsop_fhtovp(struct mount *mp, struct fid *fhp, int flags, return (ESTALE); } *vpp = nvp; - vnode_create_vobject(*vpp, 0, curthread); + vnode_create_vobject(*vpp, VNODE_NO_SIZE, curthread); return (0); } diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c index 87b2fea21baa..d9e9a6c82da1 100644 --- a/sys/geom/geom_vfs.c +++ b/sys/geom/geom_vfs.c @@ -292,7 +292,16 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr g_wither_geom(gp, ENXIO); return (error); } - vnode_create_vobject(vp, pp->mediasize, curthread); + /* + * Mediasize might not be set until first access (see g_disk_access()), + * That's why we check it here and not earlier. + */ + if (pp->mediasize == 0) { + (void)g_access(cp, -1, -wr, -wr); + g_wither_geom(gp, ENXIO); + return (ENXIO); + } + vnode_create_disk_vobject(vp, pp->mediasize, curthread); *cpp = cp; cp->private = vp; cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 987cf995f606..dc926d7a9c9e 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1081,7 +1081,14 @@ vrefcnt(struct vnode *vp) vref(vp); \ } while (0) +/* + * The caller doesn't know the file size and vnode_create_vobject() should + * determine the size on its own. + */ +#define VNODE_NO_SIZE ((off_t)-1) + int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td); +int vnode_create_disk_vobject(struct vnode *vp, off_t size, struct thread *td); void vnode_destroy_vobject(struct vnode *vp); extern struct vop_vector fifo_specops; diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index d32fec845043..98b905f27c4a 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -146,27 +146,22 @@ vnode_pager_init(void *dummy) SYSINIT(vnode_pager, SI_SUB_CPU, SI_ORDER_ANY, vnode_pager_init, NULL); /* Create the VM system backing object for this vnode */ -int -vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) +static int +vnode_create_vobject_any(struct vnode *vp, off_t isize, struct thread *td) { vm_object_t object; - vm_ooffset_t size = isize; + vm_ooffset_t size; bool last; - if (!vn_isdisk(vp) && vn_canvmio(vp) == FALSE) - return (0); - object = vp->v_object; if (object != NULL) return (0); - if (size == 0) { - if (vn_isdisk(vp)) { - size = IDX_TO_OFF(INT_MAX); - } else { - if (vn_getsize_locked(vp, &size, td->td_ucred) != 0) - return (0); - } + if (isize == VNODE_NO_SIZE) { + if (vn_getsize_locked(vp, &size, td->td_ucred) != 0) + return (0); + } else { + size = isize; } object = vnode_pager_alloc(vp, size, 0, 0, td->td_ucred); @@ -182,11 +177,33 @@ vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) if (last) vrele(vp); - KASSERT(vp->v_object != NULL, ("vnode_create_vobject: NULL object")); + VNASSERT(vp->v_object != NULL, vp, ("%s: NULL object", __func__)); return (0); } +int +vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) +{ + VNASSERT(!vn_isdisk(vp), vp, ("%s: disk vnode", __func__)); + VNASSERT(isize == VNODE_NO_SIZE || isize >= 0, vp, + ("%s: invalid size (%jd)", __func__, (intmax_t)isize)); + + if (!vn_canvmio(vp)) + return (0); + + return (vnode_create_vobject_any(vp, isize, td)); +} + +int +vnode_create_disk_vobject(struct vnode *vp, off_t isize, struct thread *td) +{ + VNASSERT(isize > 0, vp, ("%s: invalid size (%jd)", __func__, + (intmax_t)isize)); + + return (vnode_create_vobject_any(vp, isize, td)); +} + void vnode_destroy_vobject(struct vnode *vp) { From nobody Thu May 23 06:24:30 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlJ6k5fpqz5KyRJ for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 06:24: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlJ6k565Cz4W3t; Thu, 23 May 2024 06:24:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716445470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oi0oSPQb5WG0jNOnZscbrLVucHbh4V2/PnS6ZxndA3g=; b=o+VHyWlNAHrzMmvAWPlw0yGu1Vf6K4/cKBhPd6Cxt8FH0I3A4w9Ropflz8SgpceGLiTvD5 Fb98Xxu2DrR769F8eMD3F5qx3FzUGTfpneTLsnVp2yO7Uyaxdo/jZ5HC5pgdLMObrxrXpO b57IS+P/kVkNtE5CMedyQHSn/Q7AUJJnEZHJ1TgCKGw0KI4v5B0WUCRFWgCg9zACSXv5/E JOtkcus7G117ODnhGS36p3YsiI/8hiOfLNvZ60jowwg7+sw7ssY5QXIVjwHiYJuuLLVVg8 7gP36Je8YDOICKrPvUacdGePrd3o14+G5QeAfKAYPH3gMxr/lP1ws8nkSbtbJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716445470; a=rsa-sha256; cv=none; b=LhVRZ+eD8C+OAmq2Q+ptR2QtxPVEHhzv3Q1BmMO+BHEkxdCxQsi2hhvSiPzhNQo0M4/aT3 y3dXz80tVc8smNDgg3So973AYSukgtFcwUwazS3ccS32LE6r/Nuz/0PukEmqc6mXeSxju1 mTA5OKOwvhJ4H7IeWbv4JHTMIuzZ3zQhPStzlU7F8zl6vSMJAyxIBlu5PMMB9P7mPIQSRf aVsbL/bom6fAJj9ecq++fh3Ewks7QCpSMl4XFXxfZ76fl3LdfysjFiPyTymS1QIeqCKYja AgTLnhydUEbHQwg15i2X0+KGQIt16UF7VjZ2zGRPy+vNLlJ0Bk2ZsR6xQA6SOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716445470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oi0oSPQb5WG0jNOnZscbrLVucHbh4V2/PnS6ZxndA3g=; b=WMjlup6pNPohDjsxkcY9QOeLHaXcimtGZdaE52tQsR0/A78EqQAf7jHZ9sHiYCrTspRMCh 1/x6D4r6Md64TFSo8wsr2FI5PvmcRsBHG4t600QX190A8KD5/CkRYWdFUXU0y9mWblYCZz AOh00gGzWujCIU5TIgbayk9DzAiK0OoBu7c4EJBGyrHkSzINp+ttnLaQIWpCeyENX7OyeH juwxvHbxep9eW206O5wVaDwIdx5EMSmjxWbk6Bvm4jCVt0P8OmeQPB1gGEpLbOm0PYK6Z8 1IW0FifzouXozLtO6wk+NzDFj9Kvj2LGfSOONsqqU0bICFcihqahuK88adpMNw== 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 4VlJ6k4gZKzf8F; Thu, 23 May 2024 06:24:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N6OUjL032654; Thu, 23 May 2024 06:24:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N6OUFV032651; Thu, 23 May 2024 06:24:30 GMT (envelope-from git) Date: Thu, 23 May 2024 06:24:30 GMT Message-Id: <202405230624.44N6OUFV032651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Mariusz Zaborski <oshogbo@FreeBSD.org> Subject: git: c9b901816216 - internal/admin - Release Pawel Jakub Dawidek (pjd) from mentorship. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/internal/admin X-Git-Reftype: branch X-Git-Commit: c9b9018162169d4325b921782393d0e78ebd1a8d Auto-Submitted: auto-generated The branch internal/admin has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=c9b9018162169d4325b921782393d0e78ebd1a8d commit c9b9018162169d4325b921782393d0e78ebd1a8d Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2024-05-22 16:53:20 +0000 Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> CommitDate: 2024-05-23 06:25:16 +0000 Release Pawel Jakub Dawidek (pjd) from mentorship. Approved by: allanjude (co-mentor), core (implicit) --- mentors | 1 - 1 file changed, 1 deletion(-) diff --git a/mentors b/mentors index 9349947e9ad3..8bf3992b5cc1 100644 --- a/mentors +++ b/mentors @@ -18,7 +18,6 @@ gordon delphij Co-mentor: emaste jfree imp Co-mentor: markj oh manu olce emaste Co-mentor: markj -pjd allanjude Co-mentor: oshogbo ram ken Co-mentor: mav rcm kp ssaxena imp From nobody Thu May 23 07:51:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlL2d5WVYz5L7nZ; Thu, 23 May 2024 07:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlL2d4ysnz4dLB; Thu, 23 May 2024 07:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716450665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ma3xbwPwd5Q8yU0tG7QIonRruw2V/vtOV2AXbvdwVnY=; b=tB4+d4ZHCV/l6eAyC1SguNAsIvqLW6XMapwvRdrhZRxIPHI8PPsCnGnUZhRCMY1Z6yu/3g eELn8VwvVxJgNYgI1xD0FX7qZZ4nmG6MO3jcMuoBsTRDIE6IpJUaa7FYUDAh6KLxRteFux FW0LPMpG2iLhbU2wi7fumeOBSr7dxSpyXd8wC5X610MkKKyqmuO3nBihHOQ5gIueSdQK9N d9mDn91CrBHek7L3nyG+PysDNHjvo+kjOaMdjSLCHfp0WRzFf7qiErLj/cQg7MOcspZLAK Ic8mYCkFa5mCzmA/QzcXUY2K4wSdyv7FEp6aJytbRdqTVv3EvERDtcFX6sqipw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716450665; a=rsa-sha256; cv=none; b=K8xnYeWZ5ZyglVAb61zTT4fkJECp+ZYOK1RLWGy0i86sRCY0ZH1m02GGlB5r9iWntkVxZO AkAwVNYthDmls8Es0kysvxWkqw2sQqXbAJf5T3gaA+WKY6IKF3AHfBKAz/CKGJsSzhHie3 np27JSczA1QDNOc9RDi0QLwsQ1untBRwv5sU1EuQwkpQrMZmEPwhP8RuhBBtyof5VTDLpS dEFFg+FFRo0pVjwfHeHvPaWPiWNsJL3wpxmzLL9B9e49BlNUc/nOwTG6w4xj+Sl9TZY6wD B4f1eLWfXFOpbBSYSlRHgJ2aMP/WEIWkDLjv+O6h+vi8lxnhidyl40C7/SJysQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716450665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ma3xbwPwd5Q8yU0tG7QIonRruw2V/vtOV2AXbvdwVnY=; b=cojGPWcOiJjNTslJ8sW0hZbLy7GkypHOoZtUzwddO9jZ5v1PF2hJ5FgfPiU165UZnV1OAP R/tAdeO4446A/j3gtMFhnl1ZSirG6sJ4roJQkfe4khstapmbaoN/HGXTA/aa1C/4m0HWmj meGYfkvHAT98gITz2KxPmiw1uOC70DZOlBaxMUYoqSVMujg3MTeQqIFmOBoEHz5NVgB7EE I/eGEsqyd7rApR9WOLyz7pkUX9VdJvtjF5Gz/Pju9bk8GXgTZkQBPAGKjX7+iu10VdmUJa +wj76vQok8saFmFgPYBBWpeBE6Ju9IyQcNVKzhjqYekEmQ/R5wHurF47NXhPYQ== 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 4VlL2d4ZsFzhMB; Thu, 23 May 2024 07:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N7p52B080872; Thu, 23 May 2024 07:51:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N7p5i6080869; Thu, 23 May 2024 07:51:05 GMT (envelope-from git) Date: Thu, 23 May 2024 07:51:05 GMT Message-Id: <202405230751.44N7p5i6080869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: d31c10fca32c - releng/14.1 - nuageinit: by default to not enable nuageinit List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: d31c10fca32c6ee07e35d50010ef1b55976a5d25 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d31c10fca32c6ee07e35d50010ef1b55976a5d25 commit d31c10fca32c6ee07e35d50010ef1b55976a5d25 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-14 12:15:43 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-23 07:49:46 +0000 nuageinit: by default to not enable nuageinit MFC After: 1 day Reported by: karels@ Approved by: re (cperciva) (cherry picked from commit 5681636ead6790d5ad2c24a4712f010fcdfc926c) (cherry picked from commit 2c5c85cbcfac0037aaafff130d9c4bdb5d341fe8) --- libexec/rc/rc.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 831ef202219c..7f9e67981eec 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -725,6 +725,7 @@ newsyslog_enable="YES" # Run newsyslog at startup. newsyslog_flags="-CN" # Newsyslog flags to create marked files mixer_enable="YES" # Run the sound mixer. opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off +nuageinit_enable="NO" # Run nuageinit at startup # rctl(8) requires kernel options RACCT and RCTL rctl_enable="YES" # Load rctl(8) rules on boot From nobody Thu May 23 07:51:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlL2g15Cbz5L7fp; Thu, 23 May 2024 07:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlL2f6CV0z4dLD; Thu, 23 May 2024 07:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716450666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JKiRoWaqoX8BQwGctmx0asnJF7CpD9GO+VhxtTyTn7A=; b=j84H93ZIktQcV0KYwspKzdPbEkpOdSvY1208I6XFa5r7ov2yJEPuWiLEY/xoaHOAqqmkG4 dRWvFSJJI1RjijofU4FaeSNCCgG5ZpNNP5TdkZ42iuE3/Qi7MXESpOmDBcZvHzv1MxXBmq E6fFro+t4bGsJF5NOhFr5G6HLhwd0lReww5qpyyMYo1gHNodsnl5urbr4UM19Gc1NIAH8h FjCI+stRiKATuOJBr/PMu9TZr/R0u/Hj/2XKKM851YXwUp36vjbVV4sgV5K7HOxUlUAIQL f7zOmivnmUPNhkBrzFT+AYhCTO2CL0NjWGoTGVXob2ry1smfo7MzhqnxMX/0cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716450666; a=rsa-sha256; cv=none; b=qZ+XTySFqYcqNkIJfQx5ZjKMx5etRV9WpBifdz9AyRSU4hJss45z2nzZFxUN7MmawK3dNw dqjy42n1IdWm7Cqsr1qRNpMU0zzQ919BLO2TuXso/dLoKOzFla7z/B0aksbSxwYc87HpkS KOoNcBMdFe/fAoUA9whMRzUChavjG7yYEcwP7kvj9Aq6WVla4wWLJ8l7c7EeLGukIkfQfs xYDY7OqeUoHiMJRMReXuE/Ih3SyJ/YR7EEu+wOJyBPFVw3P9OGdHpq8Sz0h898rjQ1jUlX XS9GCWpLCffYnDC4hi/lN9mOPf6Elta9ZhgxvPq03CsiUbQnMu/owA1y6Ve/oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716450666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JKiRoWaqoX8BQwGctmx0asnJF7CpD9GO+VhxtTyTn7A=; b=Az+rPsI1kD7+5H+bPeLQShhHdt4wBt/gy6u/o3sEtWsJOrTdawAbTGuFMubDqKgbo634AX 1trRTBlqv60tSye5Qp23dautGBgwX0dFYO+HuHO6x7i43TgIm1xh2UF40tf12LFCu1J12z 3ZRh2Se+OhxzbjuxqZlwK8g6ceeQP3/q/yNVr5XgvIoURauy+N/wAlHPXY0nuAHcdzogY4 Q8O1CD9PwPkI6a0HL9tZ4YtcZ2FhLBC26vZrKDAgA0jDaj2i2Qw61y8BhO4IhAWQlLNnmR 036PDQ3HfoHfjj+qSabQ9z1cnBX//m4H6xE553X/Uy+ydDz0OSHNXRKpp0525g== 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 4VlL2f5f5NzgwC; Thu, 23 May 2024 07:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N7p6gu080935; Thu, 23 May 2024 07:51:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N7p6ID080932; Thu, 23 May 2024 07:51:06 GMT (envelope-from git) Date: Thu, 23 May 2024 07:51:06 GMT Message-Id: <202405230751.44N7p6ID080932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: 3b9c88fa9916 - releng/14.1 - fix (nuageinit): SSH keys are not handled in metadata but in userdata List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 3b9c88fa991649be79bc84b131266b20d432b11a Auto-Submitted: auto-generated The branch releng/14.1 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=3b9c88fa991649be79bc84b131266b20d432b11a commit 3b9c88fa991649be79bc84b131266b20d432b11a Author: Jeremy Collin <jeremy.collin@ovhcloud.com> AuthorDate: 2024-05-21 14:52:23 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-23 07:50:01 +0000 fix (nuageinit): SSH keys are not handled in metadata but in userdata MFC After: 1 day Approved by: re (cperciva) (cherry picked from commit 48edad2edf6eb7a539e40dad8e1f87e3fa4973fd) (cherry picked from commit 5601feb7204b2ebb4c351b534105da8fc22213fd) --- libexec/nuageinit/nuageinit | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 08224061d1b1..df637bbc5064 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -164,13 +164,6 @@ if citype == "config-2" then nuage.err("nuageinit: error parsing config-2: meta_data.json: " .. err) end local obj = parser:get_object() - local sshkeys = obj["public_keys"] - if sshkeys then - local homedir = nuage.adduser(default_user) - for _,v in pairs(sshkeys) do - nuage.addsshkey(root .. homedir, v) - end - end nuage.sethostname(obj["hostname"]) -- network From nobody Thu May 23 08:06:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlLNH5fkPz5L8hc; Thu, 23 May 2024 08:06: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlLNH4q8Dz4fLn; Thu, 23 May 2024 08:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716451583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MPAckFDfhEPtW21OTLuO9fssnIrXC3Vdsc4F8bv2vEQ=; b=Gq7WfRcZChxZeu9l5FZz1GByygePBYjzQEWMeEHun/zAT9eBW2ejNY+ugzlAzbF8XOg763 KOj8Y11fK1LwrGfxjkuSQJZbnybJ3B5+hgzXfdHk2VziLn7IqRu7WdTGWB28YPktwqW8OL eDkwo0DQy32nxx1l8ed+opJRK20Iary9hfwmVUPBxbVPf9c0aqZeLmEEGLAmmfdEDy71D7 XtHZdCGMIeOJN/4HNmXSuQ6KUN0nqO8reRIfDF0e+XxxD2/rpisfXnMUX4zfTvdidEgn6z i9HdGkFwTVNn7I4HMPmQKy6TR9H9dfU4GThQTYWHKp2A/E32SPg5L8gykB7huA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716451583; a=rsa-sha256; cv=none; b=JML6Jp5fc/sg0fvowiWtc9tTqO7xLYM9CZ86Usq3yrENswQqoC95Zd+X5yamxdwmA9w7EK 6SUsGDZrkqrW3dQGZAIUrJ0fzYva9NGZ4feANe/YM3hdheNZCWwLOEQil4G44PlrzJWrJV V0LzhsNGcpxl6nJLl+PmGqfqW0RFjlO6INrSEVPvoaUyzbDw2tcpvFl2cmSkdGypt/ngJH R7wmkqEbK8gQgifxyOm5FqVsKCG61wdeu2Vdd3DFgDEiacBJ2hCNcrfXg5MsqOfTFR0IcG yoF8b9Ah0zH47AxkCXNL68Jxe/pj/+ZiGbsRXF5aK/Jh/Mp24jSoNPxV/z5wWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716451583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MPAckFDfhEPtW21OTLuO9fssnIrXC3Vdsc4F8bv2vEQ=; b=oYYLNh7HAViDrfbtRQuCKfNaBOWaubBnpTwy4q9zj4V+ld+GkFuax1Y04WH5iTudp6ncY+ 4V54OqzjI8k6nXW8bxPgQQXaQxP1eTX1e3EkxTf0LxJGvRmOYjGjm6j9aNQOiPT6+BmH+U gItY8CLyi4w63NgJGktGIAz9OXu+jieZLvPleTVtspOm0qX9BTGHGJb/bZFQZuhhhfBewj ePm6B9CBpmFuHVvxGteiV5WuLNI4kh2bZn/C6Q9E91TFQjugElUeO0Ndh0bagihZspf2Jp QdXffFXXSb93qpkkGVuAFFW4ltJMUtStAySejXHHgCojeZiS5ufp1h+C8HDWdw== 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 4VlLNH4QCNzhqW; Thu, 23 May 2024 08:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44N86NrT002409; Thu, 23 May 2024 08:06:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N86Ngw002406; Thu, 23 May 2024 08:06:23 GMT (envelope-from git) Date: Thu, 23 May 2024 08:06:23 GMT Message-Id: <202405230806.44N86Ngw002406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski <oshogbo@FreeBSD.org> Subject: git: 309946854fd5 - releng/14.1 - geli: allocate a UMA pool earlier List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 309946854fd5cb24283cf7a36c9d20c2f2820df7 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=309946854fd5cb24283cf7a36c9d20c2f2820df7 commit 309946854fd5cb24283cf7a36c9d20c2f2820df7 Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2024-05-19 12:53:17 +0000 Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> CommitDate: 2024-05-23 08:07:19 +0000 geli: allocate a UMA pool earlier The functions g_eli_init_uma and g_eli_fini_uma are used to trace the number of devices in GELI. There is an issue where the g_eli_create function may fail before g_eli_init_uma is called, however g_eli_fini_uma is still executed in the fail path. This can incorrectly decrease the device count to zero, potentially leading to the UMA pool being freed. Accessing the device after the pool has been freed causes a system panic. This commit resolves the issue by ensuring devices count is increassed eariler. PR: 278828 Reported by: Andre Albsmeier <mail@fbsd2.e4m.org> Reviewed by: asomers MFC after: 3 days Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D45225 (cherry picked from commit 4b3141f5d5373989598f9447ab5a9f87e2d1c9fb) (cherry picked from commit ea5a708625e5b5c89333e3e3e9a48fe588f05361) --- sys/geom/eli/g_eli.c | 4 +++- tests/sys/geom/class/eli/attach_test.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index 16b38e628e35..8c866820b33e 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -1045,10 +1045,12 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp, bioq_init(&sc->sc_queue); mtx_init(&sc->sc_queue_mtx, "geli:queue", NULL, MTX_DEF); mtx_init(&sc->sc_ekeys_lock, "geli:ekeys", NULL, MTX_DEF); + g_eli_init_uma(); pp = NULL; cp = g_new_consumer(gp); cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; + error = g_attach(cp, bpp); if (error != 0) { if (req != NULL) { @@ -1091,7 +1093,6 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp, if (threads == 0) threads = mp_ncpus; sc->sc_cpubind = (mp_ncpus > 1 && threads == mp_ncpus); - g_eli_init_uma(); for (i = 0; i < threads; i++) { if (g_eli_cpu_is_disabled(i)) { G_ELI_DEBUG(1, "%s: CPU %u disabled, skipping.", @@ -1163,6 +1164,7 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp, sc->sc_crypto == G_ELI_CRYPTO_SW_ACCEL ? "accelerated software" : sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware"); return (gp); + failed: mtx_lock(&sc->sc_queue_mtx); sc->sc_flags |= G_ELI_FLAG_DESTROY; diff --git a/tests/sys/geom/class/eli/attach_test.sh b/tests/sys/geom/class/eli/attach_test.sh index bdb39a806fca..8803fa9f1a40 100644 --- a/tests/sys/geom/class/eli/attach_test.sh +++ b/tests/sys/geom/class/eli/attach_test.sh @@ -39,6 +39,34 @@ attach_d_cleanup() geli_test_cleanup } +atf_test_case atach_multiple_fails cleanup +attach_multiple_fails_head() +{ + atf_set "descr" "test multiple failed attach of geli provider" + atf_set "require.user" "root" +} +attach_multiple_fails_body() +{ + geli_test_setup + + sectors=1000 + attach_md md -t malloc -s `expr $sectors + 1` + atf_check dd if=/dev/random of=keyfile bs=512 count=16 status=none + + atf_check geli init -B none -P -K keyfile ${md} + atf_check geli attach -d -p -k keyfile ${md} + + for i in $(jot 100); do + atf_check -s not-exit:0 -e ignore -- geli attach -d -p -k keyfile ${md} + done + atf_check -o ignore -- newfs ${md}.eli +} +attach_multiple_fails_cleanup() +{ + geli_test_cleanup +} + + atf_test_case attach_r cleanup attach_r_head() { @@ -125,5 +153,6 @@ atf_init_test_cases() atf_add_test_case attach_d atf_add_test_case attach_r atf_add_test_case attach_multiple + atf_add_test_case attach_multiple_fails atf_add_test_case nokey } From nobody Thu May 23 10:10:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlP7M4Z8mz5LNVC; Thu, 23 May 2024 10:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlP7M3tSdz4rwc; Thu, 23 May 2024 10:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716459023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=08K+4GXzFUjgeZZDsIAGWnLmZeVmxtMeMxHL7qP7M4k=; b=GSUITfbTq1EeYOmRYyjsD7f7dQdpOARTy7d5s/vm1VZu80xQjyuBEMDYS/dbp2fW5HNTcA w4L8ZjunJMnHAWsLGxc193xPQkv0ayKtWQnKwmrVIDIB8mw7IDwZkyuSPF5fOcCw/sTqDL 6Mmxlbew6DSWLtHiSZXw/raSYaCfDxLN5VO1Ab/JuhRscDBQgxfsZeqCq7hA3JGUNhs9le s/Rx032U5YLDp9UjA7VmsaR+pJpdqqezOWZWITD1PAJigiShgHC5kkdqDH3qrjheFoLxif Yg5akgv6B1rYFEnXmAaoePcKBUN92po+OtkyJBTcGky3PnOO7xm9UaOELXJELw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716459023; a=rsa-sha256; cv=none; b=ffzqlVLGD9ZUW7XGhJe7f0mLD6UwOs8ZAUYPYv6kb/mYfQ+j+F0Gs4dhZVZHX88q8g669f M5fQxmcNWuNS5asAS900MoQua/oRytO/+sStIuV5ze/qZXy44sV/FuztZD9v9N8tB0Nb0Z nwpI4Mdl0XCqfsZkX8dOIb79pD2dPcIkaKsOzQ+CuwGLOmW/DpFfgXm+y7Hsa5xX3HyUNX LkOiFpUBVu8NvMD5J25u5OP7nBjcKW8EHLSufRj2rm+e1rP3etDbzJ3BZYIOd2Vr1Fx7bD 0wrYxS7Q9FdIJuzd2r6Q6gf6jYC8+/LcPNEXZyCcfSujiM97LmCojgzTgJqOIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716459023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=08K+4GXzFUjgeZZDsIAGWnLmZeVmxtMeMxHL7qP7M4k=; b=wDeE15nxZ4ru43yWPEK2fikg7QcnrPXXeCRnuZF6pgREfeWEqcQjz5Z2hOMQ6Oy3MSJP19 g/eXiXFoqIPgkCaby/MtQA7fl1qiec5twtw4TytHD18ZyqDWWsCojzeQSXjoyWSbq4yjin ZMeRCGvG+Ri3zWykKdNqcnaudAv/Jfj+XZILGH5zCDXEuhAPo7E3wVUnjPIYl9RytYtheQ weAp2tcY2zQky27FoEYzhRsaZjVBK2G4fizNId3bZZkd9bCUGvInrlAkUn5xrVhoyJ/bTQ X2/azSCsualpqW9BM7pq3upHcQeFQlQYreedm5KvKKzG3xCEv0qHAePbISKWrg== 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 4VlP7M3M8PzlQf; Thu, 23 May 2024 10:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NAANsx014159; Thu, 23 May 2024 10:10:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NAANuM014156; Thu, 23 May 2024 10:10:23 GMT (envelope-from git) Date: Thu, 23 May 2024 10:10:23 GMT Message-Id: <202405231010.44NAANuM014156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin <bapt@FreeBSD.org> Subject: git: 61b07f8aa528 - main - MAC/do: allow to call setuid if real user id is 0 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61b07f8aa52844b21637ac264ea134c1aef48cb7 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=61b07f8aa52844b21637ac264ea134c1aef48cb7 commit 61b07f8aa52844b21637ac264ea134c1aef48cb7 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2024-05-23 10:09:11 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-05-23 10:09:11 +0000 MAC/do: allow to call setuid if real user id is 0 This fixed sshd not able to call restore_uid when MAC/do policy is loaded --- sys/security/mac_do/mac_do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 8685954b7db6..507e64ea0175 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -489,7 +489,7 @@ check_setuid(struct ucred *cred, uid_t uid) if (do_enabled == 0) return (0); - if (cred->cr_uid == uid || cred->cr_uid == 0) + if (cred->cr_uid == uid || cred->cr_uid == 0 || cred->cr_ruid == 0) return (0); if (vn_fullpath(curproc->p_textvp, &fullpath, &freebuf) != 0) From nobody Thu May 23 12:10:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlRpH3SGHz5Lb68; Thu, 23 May 2024 12:10:47 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlRpG73Jwz44Qj; Thu, 23 May 2024 12:10:46 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.18.1/8.18.1) with ESMTP id 44NCAetO057666; Thu, 23 May 2024 07:10:40 -0500 (CDT) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1716466240; bh=3QNc7kbajhGmI2iL6yiiMcI8k6pHYBOx02IZbVtgsU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bDZsDmQBeDkC7S4ArjiF65AS5aVR4QXiu/q5r8ytVhoH2ChTA7jyG8kW8MZiPo11v yo9zSpdguhvCp3v21qN3yjRvtQpzVtdvS4XfG3B63h6c+u0FUbez8hJSrHrZNt0i+8 DVFkSK4mZ89ArrR1dpWjFzbiS1k4oLrmNXpQgtyiasxxpephADihIw9qC2rkZiHCJ2 s7+Ixi/MCjtpboDXti3D24eaYz3ZVmqdk3JWt2WHM99Iw3bllXIavppalqYhg2dTBT iJ7bAqfkoyt694D9eZjms2rZPIIHtZ/OxbnrU2HQd0JBZ3oO5I5ewS0zUSrmMo9lmN dOxxSjIK/WfJQ== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id 344sG0AyT2ZA4QAAs/W3XQ (envelope-from <mike@karels.net>); Thu, 23 May 2024 07:10:40 -0500 From: Mike Karels <mike@karels.net> To: Baptiste Daroussin <bapt@freebsd.org>, Michael Osipov <michaelo@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Date: Thu, 23 May 2024 07:10:39 -0500 X-Mailer: MailMate (1.14r6030) Message-ID: <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> In-Reply-To: <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- 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.16.0.0/14, country:US] X-Rspamd-Queue-Id: 4VlRpG73Jwz44Qj On 22 May 2024, at 10:07, Baptiste Daroussin wrote: > On Fri 03 May 07:40, Michael Osipov wrote: >> The branch main has been updated by michaelo: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Daa48259f337100e79933d66= 0fec8856371f761ed >> >> commit aa48259f337100e79933d660fec8856371f761ed >> Author: Michael Osipov <michaelo@FreeBSD.org> >> AuthorDate: 2024-04-15 11:05:17 +0000 >> Commit: Michael Osipov <michaelo@FreeBSD.org> >> CommitDate: 2024-05-03 07:38:55 +0000 >> >> periodic.conf: remove long deprecated security_daily_compat_var() >> >> This function is documented to be gone in after 11. Time to remove= this >> compat shim. >> >> PR: 275296 >> Reviewed by: jrm (mentor) >> MFC after: 1 month >> Differential Revision: https://reviews.freebsd.org/D44796 > > this broke pkg's periodic script, I would have appreciated a heads up t= o give me > time to prepare a release compatible prior this commit. > > This also breaks some ports. > > Bapt This produces almost a dozen failure messages in the daily security email= =2E Given that the deprecated function was still in use, it should not be rem= oved. Michael, please revert this. Mike From nobody Thu May 23 12:34:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlSKX4GTfz5LdNt; Thu, 23 May 2024 12:34:24 +0000 (UTC) (envelope-from michaelo@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlSKX3nH5z46g1; Thu, 23 May 2024 12:34:24 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716467664; 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=KyWQ/AfJ5ZSrpuX1fPR9x7QLdQdP5rU7fM00II+8cdo=; b=Yy6+H/7ThawCEs3fgTTL7snK2TT6XTa0DQv2zbEAGIdcwSH5z+tnBOaJG9JM850K7i8nkJ 9B1/j3ASbTxb4FBJvs7QGn+z8DpmrpP0z8QuxmNpmeAUAY3kGdgt7DUERJ6tk4zfMM5Lbq bS8mIHq+GySiAx33TLY9K5SDmAAZG/RjYCAuL08GDEOel4Nll0EIyHmoT0yfmOe3c6JoGU z3fM4jtXI5u+o6Dys4nXyI8BN35RtUnGi3zCh6dlf+Ksk4deJfldDDd/wj9L4aUfA4dt6B CeOcrr6Be6g2jKjkOktpxG9VHAdHwqUcV9aUvo1w4pA0M1j744lcsSw4XAaYhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716467664; a=rsa-sha256; cv=none; b=rAjAaNMTZH4/4lmYS4Ucv/LpSfxgzQ8K0jC5jbwWOTPwwAAVjDDW7EcbLBuxyfPvxiLP2H aBc5lReVXRknWZHhzIeG1TfTBuoj6fmt+jgFwW429Fk9ea7KvNbLooUNNYeIAyuQcyqajm z8YaehqGK+hvRGMgi2BEsaWuCkQCutWYCDY73veuRTad/YakDXz/1XMABpwEB6P7myFuK0 YmBxp7GJUF6FOXyABFpt/tN3iOpsYKXsXGIZfoByRO6oXigEYo+WhniS+RiuEg2DqtvNFL 5ntkZgBCWPXV/Dqr+sAj68nrn/TtBGjwD127aAms3yIbBhKCm8B2kGlO5/Fdmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716467664; 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=KyWQ/AfJ5ZSrpuX1fPR9x7QLdQdP5rU7fM00II+8cdo=; b=ZCvuwk6jon3D13XWPt58FETbyTjVuaRDwdKX0HOgM/TohUoFpD58essS1ABUa4XhQ4CzCm X/aEfthRzm5bCxwSDm2/JFCVsBUKvkS5AByfAyU49gBR3LdNTwPs/ISoBLVjw4U/7fZ0Ly 0k240pMPzXb7rvFNUc+WMXL5hBQxsiW/M4bZvwBysQqV5i90pR66+jnBTjJT6zNHizHs0i kf53tjE6B014bctjcjUfd+srCXSJrEcpRsx6HZAuy6oUpDdAzqi7wklpmEA7rXYu/JC/7o 9mp1qEoFpYK0WvVrJmOVjSrNaC5L/2Pcwf9luW4B78X0pA50iwpDkHrb1DNohg== Received: from [192.168.1.23] (unknown [147.161.168.127]) (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: michaelo/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlSKW52Lpz1QZ9; Thu, 23 May 2024 12:34:23 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) Message-ID: <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> Date: Thu, 23 May 2024 14:34:21 +0200 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Thunderbird Daily Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() To: Mike Karels <mike@karels.net>, Baptiste Daroussin <bapt@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> Content-Language: en-US From: Michael Osipov <michaelo@FreeBSD.org> In-Reply-To: <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-05-23 14:10, Mike Karels wrote: > On 22 May 2024, at 10:07, Baptiste Daroussin wrote: > >> On Fri 03 May 07:40, Michael Osipov wrote: >>> The branch main has been updated by michaelo: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed >>> >>> commit aa48259f337100e79933d660fec8856371f761ed >>> Author: Michael Osipov <michaelo@FreeBSD.org> >>> AuthorDate: 2024-04-15 11:05:17 +0000 >>> Commit: Michael Osipov <michaelo@FreeBSD.org> >>> CommitDate: 2024-05-03 07:38:55 +0000 >>> >>> periodic.conf: remove long deprecated security_daily_compat_var() >>> >>> This function is documented to be gone in after 11. Time to remove this >>> compat shim. >>> >>> PR: 275296 >>> Reviewed by: jrm (mentor) >>> MFC after: 1 month >>> Differential Revision: https://reviews.freebsd.org/D44796 >> >> this broke pkg's periodic script, I would have appreciated a heads up to give me >> time to prepare a release compatible prior this commit. >> >> This also breaks some ports. >> >> Bapt > > This produces almost a dozen failure messages in the daily security email. > Given that the deprecated function was still in use, it should not be removed. > Michael, please revert this. Salut Baptiste, Hi Mike, this is surprising that is it still in use although clear marked as deprecated after 11. Though, Baptiste has pushed a new pkg release yesterday [1] and only main is affected, do you still prefer to revert this commit (for now)? @bapt, can you name the affected ports and report a PR, so we can track them? Michael [1] https://github.com/freebsd/pkg/releases/tag/1.21.3 From nobody Thu May 23 12:53:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlSlb5Kt0z5LgM5; Thu, 23 May 2024 12:53: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlSlb4V43z4B3k; Thu, 23 May 2024 12:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716468811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3mKlZrdIo9oTTyWyCiS0um0fqJmxVdL2BmYxTKqYKDU=; b=xMBeERCm/X6F1DLWrjYi3ZTBqEVlxH25IBMiNWAPxCKhjDNIZ7sqW6s53rD+o5lOHKAaHz RFr6Fsv0py9Oip7iNTmQIS3HRWLNCFAEIkYlGVEt3r3Rr3/0/OvgR1hhiSFGK23Uhaz+Zt jzCpl9v+dDgAJ00wH/L6cuUu+hDBYKhVppQ7kPd1ApMmrT6eG8MYehsk+VK762Nq/wA4On HOxq4F1h/X8TVlv4x5VgynW9Cvl4oWCbugmX5jxZ6tcmJiVirVaUHE+Fe8aCQ6v5tnfsOB QYyug5VUJIGUcwQ9YVRuzsi+YVjoVeJGCIiUMjwLUurjnwf5dYEIHmJvp+7OwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716468811; a=rsa-sha256; cv=none; b=dzV+D+GcXkqRngk1hWoNpAFTaEBkADy8jZyp5ET47k8i5km8TmutkQs2bZLY1Emx0XulMZ Kg7z0R5CcGJyhCgbqFND8n2jAIwH+NaCh/THeDAYueTLhJYn452GffUk1QQ7/5yICozntk DjBAdfLw8IwFfgfahVljOUr+b/MUVp9mmiG00j5YZgQJkUmvpOdbspDvvmIOFV5TPX1OIA vUPg+2/Y70+3h2bt9mJxsWYqz7TtrHi0mI/+Kegvb4MTSIkLEhMnJGydIbdSWZx70LUo8u 4Uqtj58sZ54e9frVUmUjVPOQkdjONDIWS+KCbgnuO8Yi1HPztHhSqLLqjDsyrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716468811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3mKlZrdIo9oTTyWyCiS0um0fqJmxVdL2BmYxTKqYKDU=; b=s/udqqLnMuC4PCxBNcs/Wu+VAZ3RKy9tEFfzHanNTHN9IkRkR7lQdUNUs0kNc7BNM7grfP I2oTgX/uve3vcpbukdPJZQCbySNw3tnZTw7EMRMHQ3bUflLJCot29CnYPhNPtOGiylylSx nPkf/Pka4pbpbYI8vG4B9Pdf29wX9WQfM2cCOOiygqvmb5sdRl28bfZ5R++lvANYs/xfT5 xht20k9juLHFy/kExc66DMhJACpsO/HCl6LjKhePmJlMJVq+892kcvKfu8vqSM/ZWYAYIa X0nRuZG+F89Z2BzzJvHgp301KEmET1QXuaBa3A/z/eSZGukFjQbYnzhE/4GbpA== 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 4VlSlb45BBzr1G; Thu, 23 May 2024 12:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NCrVTa090050; Thu, 23 May 2024 12:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NCrVq2090047; Thu, 23 May 2024 12:53:31 GMT (envelope-from git) Date: Thu, 23 May 2024 12:53:31 GMT Message-Id: <202405231253.44NCrVq2090047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mike Karels <karels@FreeBSD.org> Subject: git: 83731cdde6c6 - stable/14 - adduser: create dataset only if home is directly within dataset List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83731cdde6c672b16338de4c6a0c4939c02c0928 Auto-Submitted: auto-generated The branch stable/14 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=83731cdde6c672b16338de4c6a0c4939c02c0928 commit 83731cdde6c672b16338de4c6a0c4939c02c0928 Author: Mike Karels <karels@FreeBSD.org> AuthorDate: 2024-05-20 13:43:34 +0000 Commit: Mike Karels <karels@FreeBSD.org> CommitDate: 2024-05-23 12:52:37 +0000 adduser: create dataset only if home is directly within dataset Currently, if the prefix of the new home directory is a subdirectory of a ZFS dataset, adduser will create a new dataset up one or more levels from the intended destination. "pw useradd" will then create a normal directory in the desired location, leaving an unused dataset. Check for this situation when determining whether to create a dataset, and let pw create the directory. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D45229 (cherry picked from commit 0b39b2e2ddb2df1d1325e042893ddcb1a1c12b8e) --- usr.sbin/adduser/adduser.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh index 7c3fdb418179..ecac7478befd 100644 --- a/usr.sbin/adduser/adduser.sh +++ b/usr.sbin/adduser/adduser.sh @@ -474,7 +474,7 @@ get_homeperm() { # so, enable ZFS home dataset creation. # get_zfs_home() { - local _prefix= + local _prefix= _tmp= # check if zfs kernel module is loaded before attempting to run zfs to # prevent loading the kernel module on systems that don't use ZFS @@ -487,6 +487,13 @@ get_zfs_home() { Zcreate="no" return fi + # Make sure that _prefix is not a subdirectory within a dataset. If it + # is, the containing dataset will be the same for it and its parent. + _tmp=$(${ZFSCMD} list -Ho name "$(dirname "${homeprefix}")" 2>/dev/null) + if [ "${_tmp}" = "${_prefix}" ]; then + Zcreate="no" + return + fi zhome="${_prefix}/${username}" } From nobody Thu May 23 15:14:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlWtq2qDpz5Ltkk; Thu, 23 May 2024 15:14:59 +0000 (UTC) (envelope-from bapt@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlWtq1z88z4TBx; Thu, 23 May 2024 15:14:59 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716477299; 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=cPG0YVyvlfMNDbseTC5COIF9T94GZgpLfyBvo+doSNI=; b=AfJ+/rsIxbQ/30kt6uznNhb3xfH6VHJx7y9+gUv3QMbtsVvNzo1OA+gz1A0ffYvHVCG+oe NaY6TuP3Hx+YJ0Bgobt1DcOKOK8LvviL9eIbA+TkWeaGfZuERcNslvkhfabRb+Zrka+fiM lsVvVfJtOTLFrScoGzD6UkU0IzpzwCcsLwN1XtUxFR3kkPCIxHiki8GynNxWDTlejSbY8i wGtYPUDxjKDEHI96KSTrtBmE42q8WvxfiqxzGwy64NKTLUssMm8atSA/OkrnHqTaT57Xa8 gnpjpiuv4j0h6KGLR1nCY+ehucxEO4tn5wDYFahBq/eQucgBX4ZW2Nm/7wLVWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716477299; a=rsa-sha256; cv=none; b=qTu/MfQmWjzGjg8w3ERP7Wb/jXQMrmFnvt3kXVrY1eO2nM312lcc4AE420M44O29sar3/M 5qsCGRzfoU4cqdujcmfB3g9NEGlWK4gbZD6MdfHFPG+PrMz0aloEYIvlPo7bPgjRg60rpu 5UIFZ1QOKEUyQNdHPB29+R4oHICuIzoUtkucuaM7OhFpcW9e2VtAyRkS8RvyH/NJNiweaX Qhre4jG+iiE49pcebnvsE3DSJGYqILM4cpgREiwBhpGBEezWNpmlqSModSfaHpIYNCa7XB ETPzYnuNycAgEsCGHM7eTzor1AQw2qZjkbqvxn5wB85jM0pogcsT6PMcDHVc3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716477299; 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=cPG0YVyvlfMNDbseTC5COIF9T94GZgpLfyBvo+doSNI=; b=sysLlyG7x/jhMc3lZO89rfBL7pzgxBjFMwfQr5byvnbDLHdKApp4QGQBxMgAyD+LqgQUT4 N7r6eY58Xi64kwmnfZWACAGYFxypeD2btR49N4gaOn/bE7kRP6w7CR8XT7NcCwGopGT9bU uF5Vndfc96jQNaebde3S0DKphX48IpFjy1h42NiQs3hseqhqciDuaCroFYkZpXkZLrCWx1 RX78x18iPjguVCLn/Uyx6ln4sBeO+iV5hR3y7+KaV9VCM3NnB1IBmrHfhw4wtQIJm9UBk+ nH1NZaT5S9YQXZBzAmXNh2zbahXkkDznmDsxUVjAn8+wqgXnJPhp7RxnLxEvCQ== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.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: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlWtq0p8LzG91; Thu, 23 May 2024 15:14:59 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id C69CD11D69C; Thu, 23 May 2024 17:14:56 +0200 (CEST) Date: Thu, 23 May 2024 17:14:56 +0200 From: Baptiste Daroussin <bapt@freebsd.org> To: Michael Osipov <michaelo@freebsd.org> Cc: Mike Karels <mike@karels.net>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Message-ID: <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> On Thu 23 May 14:34, Michael Osipov wrote: > On 2024-05-23 14:10, Mike Karels wrote: > > On 22 May 2024, at 10:07, Baptiste Daroussin wrote: > > > > > On Fri 03 May 07:40, Michael Osipov wrote: > > > > The branch main has been updated by michaelo: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed > > > > > > > > commit aa48259f337100e79933d660fec8856371f761ed > > > > Author: Michael Osipov <michaelo@FreeBSD.org> > > > > AuthorDate: 2024-04-15 11:05:17 +0000 > > > > Commit: Michael Osipov <michaelo@FreeBSD.org> > > > > CommitDate: 2024-05-03 07:38:55 +0000 > > > > > > > > periodic.conf: remove long deprecated security_daily_compat_var() > > > > > > > > This function is documented to be gone in after 11. Time to remove this > > > > compat shim. > > > > > > > > PR: 275296 > > > > Reviewed by: jrm (mentor) > > > > MFC after: 1 month > > > > Differential Revision: https://reviews.freebsd.org/D44796 > > > > > > this broke pkg's periodic script, I would have appreciated a heads up to give me > > > time to prepare a release compatible prior this commit. > > > > > > This also breaks some ports. > > > > > > Bapt > > > > This produces almost a dozen failure messages in the daily security email. > > Given that the deprecated function was still in use, it should not be removed. > > Michael, please revert this. > > Salut Baptiste, > Hi Mike, > > this is surprising that is it still in use although clear marked as > deprecated after 11. Though, Baptiste has pushed a new pkg release yesterday > [1] and only main is affected, do you still prefer to revert this commit > (for now)? > > @bapt, can you name the affected ports and report a PR, so we can track > them? > This was in use beside the deprecation, because pkg for one is supposed to support as many version of freebsd as possible so we had to keep the deprecation notice. I have released a new version of pkg without it and merged that version in quarterly branches, so even if it gets MFCed we should be safe. I was scared more ports where keeping for the same reason the deprecated code, I span the ports tree itself and found one port which I fixed straight away, I also did a deep analysis of the any port which plist contains etc/periodic, I extracted all their sources and I found nothing. so I think we are safe now. I don't think we should revert. Best regards, Bapt From nobody Thu May 23 16:05:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlY1m72ZZz5KVWx; Thu, 23 May 2024 16:06:04 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlY1m4NcNz4ZQZ; Thu, 23 May 2024 16:06:04 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.18.1/8.18.1) with ESMTP id 44NG61QV058851; Thu, 23 May 2024 11:06:01 -0500 (CDT) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1716480361; bh=zw+V+cycE0Ib9mZ2M8d/0AKLRwVuUsAwi6n+t9dGmLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qzg/G9gkbHLwH6xIPy6SP+a4rMMmk51+W4ns5RjOMWMcCmZYQviqcRpxQy/tQgCVr uhZvaZozn59pKf9jpLRf0T3YNRrTyDI85BsCueJAuMnEVMPH+hHQwdLOoK+9zUESWw RnGU9vI61LjSLrybY5HiRAFfB4MxyEgPVGr5Fb5tw3J8vRR/QHd6Qey24yzW9U36++ zKjwtEQkE4rPpOIP+NTo0KNuBiBNdpVwhqfoY+1lg1WGeoVkAVsEVh7uv/ozh9h1/2 c9frucS5iKeNp4WF6QrjXvb737quytxZRkT36zk4BxYCPx41EqgoJ25rpgV5e0KCg0 cOvCbtSzVDX7g== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id loGzHmlpT2bh5QAAs/W3XQ (envelope-from <mike@karels.net>); Thu, 23 May 2024 11:06:01 -0500 From: Mike Karels <mike@karels.net> To: Baptiste Daroussin <bapt@freebsd.org> Cc: Michael Osipov <michaelo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Date: Thu, 23 May 2024 11:05:57 -0500 X-Mailer: MailMate (1.14r6030) Message-ID: <1AE302C8-5EED-4644-8900-6D8B91326183@karels.net> In-Reply-To: <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- 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.16.0.0/14, country:US] X-Rspamd-Queue-Id: 4VlY1m4NcNz4ZQZ On 23 May 2024, at 10:14, Baptiste Daroussin wrote: > On Thu 23 May 14:34, Michael Osipov wrote: >> On 2024-05-23 14:10, Mike Karels wrote: >>> On 22 May 2024, at 10:07, Baptiste Daroussin wrote: >>> >>>> On Fri 03 May 07:40, Michael Osipov wrote: >>>>> The branch main has been updated by michaelo: >>>>> >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Daa48259f337100e79933= d660fec8856371f761ed >>>>> >>>>> commit aa48259f337100e79933d660fec8856371f761ed >>>>> Author: Michael Osipov <michaelo@FreeBSD.org> >>>>> AuthorDate: 2024-04-15 11:05:17 +0000 >>>>> Commit: Michael Osipov <michaelo@FreeBSD.org> >>>>> CommitDate: 2024-05-03 07:38:55 +0000 >>>>> >>>>> periodic.conf: remove long deprecated security_daily_compat_va= r() >>>>> >>>>> This function is documented to be gone in after 11. Time to re= move this >>>>> compat shim. >>>>> >>>>> PR: 275296 >>>>> Reviewed by: jrm (mentor) >>>>> MFC after: 1 month >>>>> Differential Revision: https://reviews.freebsd.org/D44796 >>>> >>>> this broke pkg's periodic script, I would have appreciated a heads u= p to give me >>>> time to prepare a release compatible prior this commit. >>>> >>>> This also breaks some ports. >>>> >>>> Bapt >>> >>> This produces almost a dozen failure messages in the daily security e= mail. >>> Given that the deprecated function was still in use, it should not be= removed. >>> Michael, please revert this. >> >> Salut Baptiste, >> Hi Mike, >> >> this is surprising that is it still in use although clear marked as >> deprecated after 11. Though, Baptiste has pushed a new pkg release yes= terday >> [1] and only main is affected, do you still prefer to revert this comm= it >> (for now)? >> >> @bapt, can you name the affected ports and report a PR, so we can trac= k >> them? >> > > This was in use beside the deprecation, because pkg for one is supposed= to > support as many version of freebsd as possible so we had to keep the de= precation > notice. > > I have released a new version of pkg without it and merged that version= in > quarterly branches, so even if it gets MFCed we should be safe. > > I was scared more ports where keeping for the same reason the deprecate= d code, I > span the ports tree itself and found one port which I fixed straight aw= ay, I > also did a deep analysis of the any port which plist contains etc/perio= dic, > I extracted all their sources and I found nothing. > > so I think we are safe now. I don't think we should revert. > > Best regards, > Bapt OK, I'll withdraw my request to revert if we're confident that there are = no stragglers. Mike From nobody Thu May 23 16:16:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYFX2GQxz5KX5S; Thu, 23 May 2024 16:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYFX0TqQz4clZ; Thu, 23 May 2024 16:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716480976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XU1lK19iFYMafu0ccyWQjHsS1eBZUBgh51hG2H4xLH4=; b=dd94EQu8gDDVeL49ybjxYhLoxAxOhrBeFrHJsp+hDMOGU5t86YOGVu971KJQzRxa4vTT2j UBLYjI029uBSJb5Llw4nSlg5GRUSh0qqDZCuQEjFCaC3SGMhYDZIP+UWfwc+ohNRqcWRbD mYqcY+BhaTAbYagwnguxy8YrNwytnbgzt2HPxSKaUmnuHyhcjuTV8BOr0+1L1P5Yy9j3lv Jy1cFH9daDzKHJj/lrOTqK/PyPUTHNrnr5Kj6bMA6mPnX3WtidpqYKPFpzjNEySHjW0qzY c90MGaiADpgTDS0bWzADWvrlwQt7MrsOY7pK/R99kaRuG//v1BTBlvw4R1VA4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716480976; a=rsa-sha256; cv=none; b=uu7LoBN6zhD6sDuMxXbvJJEIs+fc6d5W7Bj0Eq+ZTAaqeeg/sRq+WCmakrOFMwkSHz+PlK UcxdxTvz8zOLhue+iqg4w8/kTrSKIveqVX7uA9z7ggBvgIPNBvjztTKlNJhoGeAMlzuZqI 6991zeaNT/CIM34nu5MKcMvRLUDzXvVqmqdwO0ttfeAurFXic8ydbyWTHVEKLU9HIQf4RD i7gPFrh87MTDURmTGQgeBrHBWta6Ehajzp9fku5JfGKgUHK3FH7C7QInY5Wun1DOLBHaqm AB7FVeqkixxxe8l4joMr3s21l8hkbyNV2VhxYWOsTYY/MQqaCPHpZHT8HaBEZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716480976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XU1lK19iFYMafu0ccyWQjHsS1eBZUBgh51hG2H4xLH4=; b=UwlGaAYcT663H1KPO6+b23ru9crlT5ZqX8XIZb9bR74sIbkPGI7frWPigITdM8JuJmpD3e IHgsJjNtLr/mmAXb84qB255KbBJs5lTa+CRlL+Fj1HeBfRQpBQxBFuuHcpgc3Zg2mHAuvW Q2dd9ssuQcVLdo3eBdqorM3IFJrhFgsg2fC7NhUTUUBfGWR7Lkf/oSeHCA50ZExj2lbgFn MvRmzPEdJQcTw7V41nJ8iCCN73jy2AqhIBashTqkoZbirgry2faiA5YeQq5o5iaCcyIcWP DswmJ26AJnlQ/qiUi4XnN2koI5vOTf0o1ADXQSnri0IhgmzeENiDlk441B4IEg== 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 4VlYFW74Y9zwdY; Thu, 23 May 2024 16:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGGFMv030231; Thu, 23 May 2024 16:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGGFXA030228; Thu, 23 May 2024 16:16:15 GMT (envelope-from git) Date: Thu, 23 May 2024 16:16:15 GMT Message-Id: <202405231616.44NGGFXA030228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis <brooks@FreeBSD.org> Subject: git: fb9013f21521 - main - pcm: centralize 32-bit ioctl compat List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb9013f215211f013eccc54786f299e39a1f8773 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fb9013f215211f013eccc54786f299e39a1f8773 commit fb9013f215211f013eccc54786f299e39a1f8773 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-05-23 16:14:36 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-05-23 16:15:09 +0000 pcm: centralize 32-bit ioctl compat Move all handlng of struct sndstioc_nv_arg(32) to sndstat_ioctl() and make the functions that actually do the work take a buffer and size or size pointer. The 32-bit compat work is minimal so just inline it. Remove checks that we've got a 32-bit process for 32-bit ioctls. We don't check that default ioctls are from 64-bit processes on 64-bit systems. Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D45307 --- sys/dev/sound/pcm/sndstat.c | 95 ++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 66 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 6880ce383ba4..6670a1e43aac 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -45,9 +45,6 @@ #include <sys/nv.h> #include <sys/dnv.h> #include <sys/sx.h> -#ifdef COMPAT_FREEBSD32 -#include <sys/sysent.h> -#endif #include <dev/sound/pcm/sound.h> #include <dev/sound/pcm/pcm.h> @@ -622,10 +619,9 @@ sndstat_refresh_devs(struct sndstat_file *pf) } static int -sndstat_get_devs(struct sndstat_file *pf, caddr_t data) +sndstat_get_devs(struct sndstat_file *pf, void *arg_buf, size_t *arg_nbytes) { int err; - struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data; SNDSTAT_LOCK(); sx_xlock(&pf->lock); @@ -664,22 +660,22 @@ sndstat_get_devs(struct sndstat_file *pf, caddr_t data) SNDSTAT_UNLOCK(); - if (!arg->nbytes) { - arg->nbytes = pf->devs_nbytes; + if (*arg_nbytes == 0) { + *arg_nbytes = pf->devs_nbytes; err = 0; goto done; } - if (arg->nbytes < pf->devs_nbytes) { - arg->nbytes = 0; + if (*arg_nbytes < pf->devs_nbytes) { + *arg_nbytes = 0; err = 0; goto done; } - err = copyout(pf->devs_nvlbuf, arg->buf, pf->devs_nbytes); + err = copyout(pf->devs_nvlbuf, arg_buf, pf->devs_nbytes); if (err) goto done; - arg->nbytes = pf->devs_nbytes; + *arg_nbytes = pf->devs_nbytes; free(pf->devs_nvlbuf, M_NVLIST); pf->devs_nvlbuf = NULL; @@ -850,25 +846,24 @@ sndstat_dsp_unpack_nvlist(const nvlist_t *nvlist, struct sndstat_userdev *ud) } static int -sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data) +sndstat_add_user_devs(struct sndstat_file *pf, void *nvlbuf, size_t nbytes) { int err; nvlist_t *nvl = NULL; const nvlist_t * const *dsps; size_t i, ndsps; - struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data; if ((pf->fflags & FWRITE) == 0) { err = EPERM; goto done; } - if (arg->nbytes > SNDST_UNVLBUF_MAX) { + if (nbytes > SNDST_UNVLBUF_MAX) { err = ENOMEM; goto done; } - err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl); + err = sndstat_unpack_user_nvlbuf(nvlbuf, nbytes, &nvl); if (err != 0) goto done; @@ -914,52 +909,17 @@ sndstat_flush_user_devs(struct sndstat_file *pf) return (0); } -#ifdef COMPAT_FREEBSD32 -static int -compat_sndstat_get_devs32(struct sndstat_file *pf, caddr_t data) -{ - struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data; - struct sndstioc_nv_arg arg; - int err; - - arg.buf = (void *)(uintptr_t)arg32->buf; - arg.nbytes = arg32->nbytes; - - err = sndstat_get_devs(pf, (caddr_t)&arg); - if (err == 0) { - arg32->buf = (uint32_t)(uintptr_t)arg.buf; - arg32->nbytes = arg.nbytes; - } - - return (err); -} - -static int -compat_sndstat_add_user_devs32(struct sndstat_file *pf, caddr_t data) -{ - struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data; - struct sndstioc_nv_arg arg; - int err; - - arg.buf = (void *)(uintptr_t)arg32->buf; - arg.nbytes = arg32->nbytes; - - err = sndstat_add_user_devs(pf, (caddr_t)&arg); - if (err == 0) { - arg32->buf = (uint32_t)(uintptr_t)arg.buf; - arg32->nbytes = arg.nbytes; - } - - return (err); -} -#endif - static int sndstat_ioctl( struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { int err; struct sndstat_file *pf; + struct sndstioc_nv_arg *arg; +#ifdef COMPAT_FREEBSD32 + struct sndstioc_nv_arg32 *arg32; + size_t nbytes; +#endif err = devfs_get_cdevpriv((void **)&pf); if (err != 0) @@ -967,27 +927,30 @@ sndstat_ioctl( switch (cmd) { case SNDSTIOC_GET_DEVS: - err = sndstat_get_devs(pf, data); + arg = (struct sndstioc_nv_arg *)data; + err = sndstat_get_devs(pf, arg->buf, &arg->nbytes); break; #ifdef COMPAT_FREEBSD32 case SNDSTIOC_GET_DEVS32: - if (!SV_CURPROC_FLAG(SV_ILP32)) { - err = ENODEV; - break; + arg32 = (struct sndstioc_nv_arg32 *)data; + nbytes = arg32->nbytes; + err = sndstat_get_devs(pf, (void *)(uintptr_t)arg32->buf, + &nbytes); + if (err == 0) { + KASSERT(nbytes < UINT_MAX, ("impossibly many bytes")); + arg32->nbytes = nbytes; } - err = compat_sndstat_get_devs32(pf, data); break; #endif case SNDSTIOC_ADD_USER_DEVS: - err = sndstat_add_user_devs(pf, data); + arg = (struct sndstioc_nv_arg *)data; + err = sndstat_add_user_devs(pf, arg->buf, arg->nbytes); break; #ifdef COMPAT_FREEBSD32 case SNDSTIOC_ADD_USER_DEVS32: - if (!SV_CURPROC_FLAG(SV_ILP32)) { - err = ENODEV; - break; - } - err = compat_sndstat_add_user_devs32(pf, data); + arg32 = (struct sndstioc_nv_arg32 *)data; + err = sndstat_add_user_devs(pf, (void *)(uintptr_t)arg32->buf, + arg32->nbytes); break; #endif case SNDSTIOC_REFRESH_DEVS: From nobody Thu May 23 16:22:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYNd4Y2Jz5KXcY; Thu, 23 May 2024 16:22: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYNd40hFz4fJm; Thu, 23 May 2024 16:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvX8d2iVHlJyORuw97Ps6lSRYaD8QW/4KKkFzB5Or+A=; b=yW2ZQM2Ifc4SDJgCOaOJk4FHDZz/Ty9DgTsy7g4OgYj/7ZkGUK6lpgtaCQzePvGTxzJfRb TPuJvmfijIPhP2Y7k0nKX2tfFnz3m0mKmVj0daJxbLTNuQ0Kuf34+36QsmQKt5PL+HcmyQ a8mmp8vlByvUB5W5okMHJ32+QXjFMSFu6YWNN7DTxAefWput7xOXKQKjuGtHia6KOdU4x8 2cCjxIW9xkvAHJzUQ39V4C7QR0TcyxUD03mZC20sIg5dl8AYqOF/BXm9sFPo6k2pSrQ8sf X6hMfsnQuHzDwpIfhTU/Yr5IS0gLGIt70RSKMN8FV8vnFosdzKKvVGpPnwBGeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481345; a=rsa-sha256; cv=none; b=WCSei6bfVfUsqu85g+QDuFc7XkrADCiSMN1ygvpaYj/kwS+9mQ7+7xt3jpBUbNE/wEjgu1 X1dWGCmO/UNngsrSgNNAt1ASqctpKH/SxjkrLyhYM8AhPhgCiRSoQBV2ErPr4/0Pyn1XP3 BfQRom1qp3wUgB0JFTndXsjMJhh04+GVDA4W2d1lUapvfYbvXcE4RksRdoySRYTEki0aED k2m2uo2N1FXlOrCmG9nnSAqD7aPcGeFxQcyFaZWzNM4F2qETpVvYwiIwURXcy28vgcDq1J p9KsjP4IfHuWu8w5zldzgFTDVf19plclbivLi6UO8U74VN1rbFxcik7ceiXA9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BvX8d2iVHlJyORuw97Ps6lSRYaD8QW/4KKkFzB5Or+A=; b=TzB/FH3zgUfIMohviSPLY19/VGmbi1J8/NGykJws6jxX18uOcVqJ56gvifCJUouMpja4A8 OHQvKkGrstvTsYvReThiiBLCCwvWbDMXrDKuC1F5AHCjTyrcgLsRJ0nCLZ6zAoADHAdt5I 8Hpfwaph4EtCxd1THp42U5KBQus5T8IFUi+sve2T4tJ60pLLdRfx0uI621CPr2Z2fwpJNR mq88qJ+UzMO6gRMsQc9GPbhgwHDNBTokGRkRFpHt8b1qkTCyrqV9ELTPhTBM2UAZ1WIPlk SS5GyMAyijo+BKJeWokDhQoKAkV/djpj2ViodAYInTmdjCBH0HpHZzxCeePoBw== 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 4VlYNd3cXqzwnC; Thu, 23 May 2024 16:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGMPYf045994; Thu, 23 May 2024 16:22:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGMPx0045991; Thu, 23 May 2024 16:22:25 GMT (envelope-from git) Date: Thu, 23 May 2024 16:22:25 GMT Message-Id: <202405231622.44NGMPx0045991@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin <mav@FreeBSD.org> Subject: git: 49086aa35d98 - main - Fix scn_queue races on very old pools List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49086aa35d987b78dbc3c9ec94814fe338e07164 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=49086aa35d987b78dbc3c9ec94814fe338e07164 commit 49086aa35d987b78dbc3c9ec94814fe338e07164 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2024-05-23 16:20:37 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-05-23 16:20:37 +0000 Fix scn_queue races on very old pools Code for pools before version 11 uses dmu_objset_find_dp() to scan for children datasets/clones. It calls enqueue_clones_cb() and enqueue_cb() callbacks in parallel from multiple taskq threads. It ends up bad for scan_ds_queue_insert(), corrupting scn_queue AVL-tree. Fix it by introducing a mutex to protect those two scan_ds_queue_insert() calls. All other calls are done from the sync thread and so serialized. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16162 PR: 278414 --- sys/contrib/openzfs/include/sys/dsl_scan.h | 1 + sys/contrib/openzfs/module/zfs/dsl_scan.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/contrib/openzfs/include/sys/dsl_scan.h b/sys/contrib/openzfs/include/sys/dsl_scan.h index 2e3452e5ebaa..f32f59a2bedf 100644 --- a/sys/contrib/openzfs/include/sys/dsl_scan.h +++ b/sys/contrib/openzfs/include/sys/dsl_scan.h @@ -173,6 +173,7 @@ typedef struct dsl_scan { dsl_scan_phys_t scn_phys; /* on disk representation of scan */ dsl_scan_phys_t scn_phys_cached; avl_tree_t scn_queue; /* queue of datasets to scan */ + kmutex_t scn_queue_lock; /* serializes scn_queue inserts */ uint64_t scn_queues_pending; /* outstanding data to issue */ /* members needed for syncing error scrub status to disk */ dsl_errorscrub_phys_t errorscrub_phys; diff --git a/sys/contrib/openzfs/module/zfs/dsl_scan.c b/sys/contrib/openzfs/module/zfs/dsl_scan.c index 55e89b89f06a..085cfd3c5691 100644 --- a/sys/contrib/openzfs/module/zfs/dsl_scan.c +++ b/sys/contrib/openzfs/module/zfs/dsl_scan.c @@ -491,6 +491,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); + mutex_init(&scn->scn_queue_lock, NULL, MUTEX_DEFAULT, NULL); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, sizeof (scan_prefetch_issue_ctx_t), offsetof(scan_prefetch_issue_ctx_t, spic_avl_node)); @@ -646,6 +647,7 @@ dsl_scan_fini(dsl_pool_t *dp) scan_ds_queue_clear(scn); avl_destroy(&scn->scn_queue); + mutex_destroy(&scn->scn_queue_lock); scan_ds_prefetch_queue_clear(scn); avl_destroy(&scn->scn_prefetch_queue); @@ -2723,8 +2725,10 @@ enqueue_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) return (err); ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } @@ -2915,8 +2919,10 @@ enqueue_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } From nobody Thu May 23 16:27:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYW10bvrz5KYhN; Thu, 23 May 2024 16:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYW05s5wz4h07; Thu, 23 May 2024 16:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bblVp0tyK6WXCdxKolsz0e4+L6AOuiSZ5gTcjF5/u6Y=; b=RsSh8FGDEFp6GV4MyO4So5Ach7OOM8ATtbvF9b2rEpzk85OcUslFbKJZn/4bvpfDJ07/Si yYzDpLhgbijTTXp2mNpBT8V2litbuKVTyznvun5WDVK1XhyRf7cWiHLOoRDFK+IIR/bp6S OnKWCUCfPgLorRYzG+xRr5A95Giv7RcTMFcHVv0CUje0kM0crtQu3MLmM97OYs20qKZSSl eo0tiAdbT6PIKRmk9682IR2/l/98IBKQuWNFTHQw8e8ElVYEASli4JKHm1l6mLwFSoOXUg fPxno6EbBtNnv8NRc017GUwD+lJ2AxNI9F0bIOQ1fFvZ7UqtsrwadbRJ952DXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481676; a=rsa-sha256; cv=none; b=n/y4519aV/uRlkNvsNPjul/0JQRE9R8qCNXdGXqThYPsL1kxyV6wRNWYRS5LylI8gAAMdH iYfNAR9eIGOpph41d2rr8MK+IDw8OnmisJ33roTsTq09G6PivPRBWQ/UpRpC/rFr8E8s7H Vo1geuQVn4G1gMhR8iQtp/ElO0Ja6Sr2fs6nxzwyl80gN/9TKEu2zYzTqka6E3AUsTSLEq Ka8Nf9iWzDcuw5RvYRA0zZF+Wdp3IwonqkOCTNLFpXNYfPVtf+1QREOJeLFXB0Rg/2j+MK c+FzTqMvFKuavKUjiRbDMQJHyAv04dm9oqGEK8XO6uWAj9gqyPe7wijAPmclzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bblVp0tyK6WXCdxKolsz0e4+L6AOuiSZ5gTcjF5/u6Y=; b=LMqYid9CfXG7eoDvu9SfWM61nOazPOjNtgaP94UGIZN1iF77gSdZqoIN1RQgi30HBczJJi bLn07NQk+Jd1dWil6dEgTYNZSwKMrbR5YiUDunW5ABw4i+GFqDOhtQE+Zn1/pHZ6EWXaqJ WfX9pr4m+WFn/kyKaC/2M8liWjtiekyEm/GBYiua8ksyfeKW2n9/wm9HyL4RBhsDW0X54+ RYIl4vTvEZuPbT5hWhwPueR5Bx1STMLiiU6z3FSUfybfFIuSR3W2d6uqdgDSz66XGUxAKI /ubs+x7Nf51vl/zBadBSJ7C9FK1E6r2c9L9JSTypCRhjc2zg6qavpODdgM2I2w== 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 4VlYW04ktLzxCH; Thu, 23 May 2024 16:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGRuSf047862; Thu, 23 May 2024 16:27:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGRuAO047859; Thu, 23 May 2024 16:27:56 GMT (envelope-from git) Date: Thu, 23 May 2024 16:27:56 GMT Message-Id: <202405231627.44NGRuAO047859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis <brooks@FreeBSD.org> Subject: git: 6729e8a40bd9 - main - libpmc: remove tautological assert List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6729e8a40bd9b15c2790bc96c58817493de4f6f0 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6729e8a40bd9b15c2790bc96c58817493de4f6f0 commit 6729e8a40bd9b15c2790bc96c58817493de4f6f0 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-05-23 16:26:24 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-05-23 16:27:37 +0000 libpmc: remove tautological assert gcc13 whines about this assert than an unsigned integer is >= 0. Reviewed by: luporl Fixes: b48a2770d48b9 powerpc64: add Power8 and Power9 PMCs Differential Revision: https://reviews.freebsd.org/D45232 --- lib/libpmc/libpmc_pmu_util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index fa2e76e8d026..74a93ae963d7 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -622,7 +622,6 @@ pmc_pmu_pmcallocate_md(const char *event_name, struct pmc_op_pmcallocate *pm) if (pmu_parse_event(&ped, pe->event)) return (ENOENT); - assert(ped.ped_event >= 0); pm->pm_ev = idx; pm->pm_md.pm_event = ped.ped_event; pm->pm_class = PMC_CLASS_POWER8; From nobody Thu May 23 16:27:57 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYW21ZKLz5KYYH; Thu, 23 May 2024 16:27: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYW15lyHz4h3y; Thu, 23 May 2024 16:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0nI7Ce9byCPIdMrUQSdfyBQIQUBBcF162Sggb0/X44=; b=XtgFsW1Tytt1GFTIYsTYP1JEbXIokoW+u3j/rGl+ZupsKrnJ+50ZuVtX+ebiu9yAqefgrX ZzVy18zbPKmpnivdYyXaFf4HZRFZHE0kww7kqQyist5nTGxqJLYd0i1DQTHDQPXfPVYygZ 3Z37rMDu7PfNQ0PEAmVyGCZeIx0QAWitjLymMNuGTWQ6tmh7izT9SZdDhWylxHE9FF+7My MJFxdq/jVn7ctkOqsXpurZ17pVj9Da1wdst4p2paboqscM72DQu3lgRFlzuhHHd9RDmZ/f 1vPB4W2CdTUTj7YjN0FFLpmtVW5y9gmbhccX2M7RgRrDZCiKpyAjTj0ZqNPydg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481677; a=rsa-sha256; cv=none; b=AyIwEePnkZtUlLlZuUeZxRmNZXjakYvGQwZeTNyLQe689PQ6KMHL9hIQ66eBbCykuzA6c9 CF4xA4tNAeGdUB7gGfA7yDp3K76teoHlBBgEz9D2NVDsAJ9sqh+3aUmUy8qgufYt5luiNo YRUqx4Ijow3Cj+T1yOo3gZXQV0BlRErsVlJa1su9BTrpPB4wtbnKkK2bxjoh0wL3B/Btgb S4FM6dl5riWC5M6BhgS7Kg49C+PFOW2ZpBuiVUK2QHZ0LsgBZvcYYGNSZJzH4HeqgJq5kP qZHRkTaofUIoNhy/3cn5AjOmChWiyGoISAGzK6pEkfGXJg5ZAYZjcHtd4gLT8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0nI7Ce9byCPIdMrUQSdfyBQIQUBBcF162Sggb0/X44=; b=RMCs1zggWsVxpZP2xkeaVVadK4dvnRcXmNmnlp7WhQAMuubK051xsIPwR3c+cXNLrIn2nN uU9PeWfg5gI6eT4KPOKN2PIL0XuDaZo4I0uzk5K3oC1mc9dZwyjeoCNp7VgIdGVHY87CaB C8Jkk3oziMsBeUxe280OnKi6socsNWf5S6mW3H/CtWFde+YN4B7HpZmRb/AdeI1owEVPGY vkfsJ9OX4+H0rA4g5I4nc4jxNN97LGeIimY2450a64pAt2K1jTgwPkD1PoGxjEjO3BR34b ezw6hI/6bvemVlQkXhMmI4wXwVzXUcvbHLaWLayYCM2feokFs/jJMbRlS5FsRg== 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 4VlYW15MG8zx2R; Thu, 23 May 2024 16:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGRv15047910; Thu, 23 May 2024 16:27:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGRvcM047908; Thu, 23 May 2024 16:27:57 GMT (envelope-from git) Date: Thu, 23 May 2024 16:27:57 GMT Message-Id: <202405231627.44NGRvcM047908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis <brooks@FreeBSD.org> Subject: git: fcc5fa091ebb - main - libcompiler_rt: gcc13 doesn't support _Float16 on arm List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcc5fa091ebb89db48d8fbda9b74c25bd44357b8 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=fcc5fa091ebb89db48d8fbda9b74c25bd44357b8 commit fcc5fa091ebb89db48d8fbda9b74c25bd44357b8 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-05-23 16:26:51 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2024-05-23 16:27:37 +0000 libcompiler_rt: gcc13 doesn't support _Float16 on arm Don't set CRT_COMMON_F16_ARCH for arm as it's not supported by gcc13. Differential Revision: https://reviews.freebsd.org/D45234 --- lib/libcompiler_rt/Makefile.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 6fb13cb12305..bdb6b93e6fda 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -233,7 +233,6 @@ SRCF+= comparesf2 # Helper to reduce complexity of _Float16 and __bf16 statements below. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "arm" || \ (${MACHINE_CPUARCH} == "i386" && !empty(MACHINE_CPU:Msse2)) CRT_COMMON_F16_ARCH=t .endif @@ -243,7 +242,8 @@ CRT_COMMON_F16_ARCH=t # versions. # .if ((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000) && \ - (defined(CRT_COMMON_F16_ARCH) || ${MACHINE_CPUARCH} == "riscv")) || \ + (defined(CRT_COMMON_F16_ARCH) || \ + ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "riscv")) || \ ((${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120000) && \ (defined(CRT_COMMON_F16_ARCH))) CFLAGS+= -DCOMPILER_RT_HAS_FLOAT16 From nobody Thu May 23 16:32:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYcP4Ss0z5KYrC; Thu, 23 May 2024 16:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYcP3XQsz4k9L; Thu, 23 May 2024 16:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dPBRC/ujUBmTqUSbArup7lnv0EgEZFRaeLCTPA6IuU=; b=TG3/L3DMKjRu80JHl+h2GMGfoyYT80FKJa32245DxKlaodnhcfK05+gdxuzjWTi7wpS+FT aO7YzSzgLvQDd5jLxv52YuMUpTOPvWEV9J5kFM/DE3PdEOAwDXgPj0iG58lrScqT7SMcDg jgqZHJqNJOt9jhcgIjh6fN5Xr6IwO8lXwnuZSUHdNs1F6qND82PL8wHtyqZeDdcs78FhEz q29Z0Xty77Wk9/CBpzxbfSQMQbgMXz0LSqD45vgL6OriYNyUTeppqqetazCMC1RNw44VyR hRZtxKHPOoWvAXof3EpXHpaNR9VgWkrg371+uT3Ts1UdR8dAS2JRhCDtT+Bqgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716481957; a=rsa-sha256; cv=none; b=JD75qWAVuuJD8LIf9WDTr0xu0ewUfpxa7nayPxH93ZPvbMC1qiZrHj5YryprXDcExKQAGQ pv54/7EjPq8lezjYj40U/oYLhKBOASzGnF13yfYdmTKGDy4gxnMWyH7LngWnGJrEdhkMr0 AYM7Ko+/FjcsziYlVa6MAc6ttfvpKxiEtHT+C7PLdWp6W49cQBQLd+EDQHreQZRgWRKsXe i8PaRXi8yjfYmjUZbHYUTlQ+RYHV6wVwVpifgrHfk0Ze1rGWJumaIy7oPpKVMLvG+M7oD1 zijZX0tjVLuY2Z96V1j5J1YNzpwPQMlVWD7NjEB/x2nwTGdviLdsTI7bpjHltQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716481957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dPBRC/ujUBmTqUSbArup7lnv0EgEZFRaeLCTPA6IuU=; b=qMSYMiIjM4f2Cwn0klUJdnBMPWrTrduLkh1vk9IhHFkoc1RNinsH9GBc1pLKq9t4KfgVeF aE6kw8WbSzK4xe+erny+So62xVL33cZo8nL5AEtlrQ+iwd0CVcEh23xGE7g32CkPLKeerX TjPs30j4kAN/eS8VGXCS6gn4at75CGlqk/5MqvLjkpQZ8tgJenL6wywfcwhtyyfH6mMVN7 i2UyNhXcCrI1LkmHTqu0vFIet+kpbk/7ywjCmdYH/n6DamN/NhK1YbF3980eTzFCQCSFKO cYDWHtlauXF8HMZGQEjFAP/IyXF2qZ9dZ93l5zfY6sL30r3CFnpG/AFfz6AqAg== 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 4VlYcP382wzxX9; Thu, 23 May 2024 16:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGWbpd063536; Thu, 23 May 2024 16:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGWbPq063533; Thu, 23 May 2024 16:32:37 GMT (envelope-from git) Date: Thu, 23 May 2024 16:32:37 GMT Message-Id: <202405231632.44NGWbPq063533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 2ce32ab21a59 - main - Fix "version introduced" in two manual pages List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2ce32ab21a5961dd9405cde8d985da9d0a664276 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ce32ab21a5961dd9405cde8d985da9d0a664276 commit 2ce32ab21a5961dd9405cde8d985da9d0a664276 Author: Tom Hukins <tom@FreeBSD.org> AuthorDate: 2024-05-22 12:32:03 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:30:32 +0000 Fix "version introduced" in two manual pages Signed-off-by: Tom Hukins <tom@FreeBSD.org> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1252 --- lib/libc/gen/exec.3 | 2 +- usr.bin/posixmqcontrol/posixmqcontrol.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index 8f866e5ab321..ce289ebf502a 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -344,7 +344,7 @@ function first appeared in The .Fn execvpe function first appeared in -.Fx 15.0 . +.Fx 14.1 . .Sh BUGS The type of the .Fa argv diff --git a/usr.bin/posixmqcontrol/posixmqcontrol.1 b/usr.bin/posixmqcontrol/posixmqcontrol.1 index 67ddbfd5eaf0..ec7059b90235 100644 --- a/usr.bin/posixmqcontrol/posixmqcontrol.1 +++ b/usr.bin/posixmqcontrol/posixmqcontrol.1 @@ -172,7 +172,7 @@ info reports a worst-case estimate for QSIZE. The .Nm command appeared in -.Fx 15.0 . +.Fx 14.1 . .Sh AUTHORS The .Nm From nobody Thu May 23 16:36:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYjC3BQZz5KZT9; Thu, 23 May 2024 16:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYjC2Sbgz4klN; Thu, 23 May 2024 16:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7raieI5cCBuCXcXcmXZHINYBhWRcVmGhBGAgWzWtAdo=; b=wF35UNtj4TasEbdbEOFhEpS9m/skb2k82KGr6CBkh4HdE0vGbb1jP4sla1QYKyvmn0eieG /zj4P1k8KTzqgjzNPkyWOuuxV15DL1acQfcw8Fzm5f+5EBM/Vr+r9bNKbE8PF0GKQVvh6S EKbYE7CMEglplHctcspqKxVFmStVToDqM5dOk7uDVkmhKZEe83TNg5F/aRkRXNRzXJA9JF isQbSYjUzHTPbwjYTj/2zThRQswT0n0KzwBrDnlNcyGRNHPPdp5BtR9XpHJyyxFDHU/79g m4oJPSFYkR8HEpCuQQR47PwWzT0KjzF2rAWNVnxs1ZSQANgPZ6c1kIioMSBfSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716482207; a=rsa-sha256; cv=none; b=vi1ObNRYsuyKFXGXExlxVhzaJudxeNVD4lO6rk4A2ma+opDrAvOZXEXqVW2YWuzzGkCpLO UdZF0XCk6NjD4oPzzNjv02SgeLPM2h4IlAU/ieqx0EhmIqjWEwI4AK01SlCm9JXMvQ6XiN FJkxkZ7tVMS11urzMlqW6S5t97NRipHUTu3jFRj9EQvroYWD/LyUe/4/PVkQptEYyyDj9w ElucNISTU+iU/On2c+rO7R755lflBDc6x1cSQmtmkAhuSpqjnKA0GlS3HhgQ0CCNxQ4Q52 Jk4EUcRaqKe93MNLsewL2jfrtVTJGqRzBEvaIYlE+hWVMuMivDGjO9igJvQq5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7raieI5cCBuCXcXcmXZHINYBhWRcVmGhBGAgWzWtAdo=; b=UsfQLnJMnd4yUKs+dt49TCYjcliTSuDI2FNqGjdnvVn9z82PLh0L9K5M5olGnYcA4CUeGg 0w537WYhMzCqxSAecgx1Vlx83cnRGXT6vQcdwh/rGhZZwK9csheQVGsVRSl7ZWOu37NPOV /E6pNyjSuENY5gcRSy72cgs1u0C9RL221Kce4AnCYVSuRsjRb+SHBnt70of/nSwKFhP0lD iyabDEcxwjLGAbyi0IHLq8DDFm17PU0HvykUOmAGlthnVP9qLrlLlwfxz+NYnxgOpaWM5U Erd2NE80WERjc+j1+12zNHqxgoh6lgbD5KqKSD6lxIfybnW0VB5HWcow5jqL+g== 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 4VlYjC23qNzxXC; Thu, 23 May 2024 16:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGalMg064323; Thu, 23 May 2024 16:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGal6h064320; Thu, 23 May 2024 16:36:47 GMT (envelope-from git) Date: Thu, 23 May 2024 16:36:47 GMT Message-Id: <202405231636.44NGal6h064320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 2c9f8518de51 - main - etherswitch.4: Remove non-existent manual pages List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2c9f8518de512f7776413d092111c7ae999379b6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c9f8518de512f7776413d092111c7ae999379b6 commit 2c9f8518de512f7776413d092111c7ae999379b6 Author: Tom Hukins <tom@FreeBSD.org> AuthorDate: 2024-05-23 14:06:01 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:35:28 +0000 etherswitch.4: Remove non-existent manual pages Signed-off-by: Tom Hukins <tom@FreeBSD.org> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1253 --- share/man/man4/etherswitch.4 | 3 --- 1 file changed, 3 deletions(-) diff --git a/share/man/man4/etherswitch.4 b/share/man/man4/etherswitch.4 index aeb5e484e7cf..8ec1715e4248 100644 --- a/share/man/man4/etherswitch.4 +++ b/share/man/man4/etherswitch.4 @@ -50,12 +50,9 @@ device nodes .Sh SEE ALSO .Xr arswitch 4 , .Xr iicbus 4 , -.Xr ip17x 4 , -.Xr rtl8366rb 4 , .Xr e6060sw 4 , .Xr adm6996fc 4 , .Xr ksz8995ma 4 , -.Xr ukswitch 4 , .Xr etherswitchcfg 8 .Sh HISTORY The From nobody Thu May 23 16:36:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlYjD6Q55z5KZNK; Thu, 23 May 2024 16:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlYjD3RJkz4kj8; Thu, 23 May 2024 16:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/gAUxjmC/0sKJyMPFIVa/EfdfqglgbVzw7zLuj1ZUk=; b=jwxIIhI6XwMaXwA/Qlj45Ia7tomqaKwEfEfIcSetfqlrL/F1LOi5vcwuKXtor9g7z+3XCk 9JX8vrOMFePDdHsNDjgzTIgh/S4AE/iA3QwXcf44pZ+dSwVglktFToUxqzpJgrOV6kDZ1m lrZVQxnlwhZOL5Bsm4dnoxL5WlkYvKZrv92Zmy/v9+llcf2Tf4PpFNQIiN682SnZcgkF9W ymnjKLpyou1QB1JUQm9OM6N+zy4knZXk6iQoVplpTyU1RiA7l8RHOhEMr/j32784kuFIin hYruk7N+LE+mFcuyekF1l4nXP3N77yYh8pARyPiROmSGr8ynHUiwHDFQWMEA+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716482208; a=rsa-sha256; cv=none; b=vAvDj9EcWH9zb1QoddvENxMKMpu7XuR8bEcB/OVlzCGiqjRNYemmp5p1c+ce4o3kBduemR bFQLEYILprQJJOxka8bXyY75WwCG94K8J4B2kP6Dg9DQwPZxT8IqGfxnV4TEM+8b7VJiXp W5R68aPYP7w32aI6mOEQtuwLB/4XAMWSKtuK2ezsMkQhk63TBOYSXzR8/gRAmD16N1Yg74 vwsfZfdKTR1kR8JzQH6lCC+qoD16ikzt5YrV+n4fbuFilExSIKMpfoJdJtMqspS2fqQkba zddo3bKCdfmU/1pe5lZmK4DCzwjBaiJ/SP9CkmsPWAhgBxFoiesLoB47Rm25UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716482208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/gAUxjmC/0sKJyMPFIVa/EfdfqglgbVzw7zLuj1ZUk=; b=AulD8SFCrAUlnsKkC63loTALD2iwS46ZLfNBFtrrQhT5WjxMufjS9UCjWJb7OAc6aeOQds dW92u80Xf3NwNvSZvQrjv45b2yYs8p852M864RJYMQT3tM4Bys3QLMqwbLK3lNOyzl7KBS Opb1fDrRvD9mwxO+jKddvBNSu95T2OqnBa0A5cLyXtccPkbHbGT/cXB9I7CxbUbNnki/JX 8aTVaIP23Psopha2fp7ARncI5Npg9FCGHkD35OZYrxM/cdTWnJC7j3wDCWKbqKGU073xWF egzkGT6eMN1QX6Vqj2XXEcgWZUR8se+9bR0RADnV744fQ6sv3S9GSLK/bQbi/g== 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 4VlYjD33DdzxXD; Thu, 23 May 2024 16:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGamqS064365; Thu, 23 May 2024 16:36:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGamAw064362; Thu, 23 May 2024 16:36:48 GMT (envelope-from git) Date: Thu, 23 May 2024 16:36:48 GMT Message-Id: <202405231636.44NGamAw064362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 083d14922431 - main - etherswitch.4: List manual pages alphabetically List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 083d1492243127fa4416be93807603ea6e0a8947 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=083d1492243127fa4416be93807603ea6e0a8947 commit 083d1492243127fa4416be93807603ea6e0a8947 Author: Tom Hukins <tom@FreeBSD.org> AuthorDate: 2024-05-23 14:07:27 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:35:29 +0000 etherswitch.4: List manual pages alphabetically Signed-off-by: Tom Hukins <tom@FreeBSD.org> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1253 --- share/man/man4/etherswitch.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/etherswitch.4 b/share/man/man4/etherswitch.4 index 8ec1715e4248..4813d7cce1e5 100644 --- a/share/man/man4/etherswitch.4 +++ b/share/man/man4/etherswitch.4 @@ -48,10 +48,10 @@ driver provides a framework for Ethernet switch devices. device nodes .El .Sh SEE ALSO +.Xr adm6996fc 4 , .Xr arswitch 4 , -.Xr iicbus 4 , .Xr e6060sw 4 , -.Xr adm6996fc 4 , +.Xr iicbus 4 , .Xr ksz8995ma 4 , .Xr etherswitchcfg 8 .Sh HISTORY From nobody Thu May 23 16:50:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlZ0g6Zb9z5KbVB; Thu, 23 May 2024 16:50: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlZ0g671wz4mQF; Thu, 23 May 2024 16:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716483011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l6IqZW9T27zetQxZ2FcqC9cZr7Iy18zUYgU3qXQO1E0=; b=CpfjJhg0xrgBFqa8odkOPNEyC3azkzG2CpMR8f+p3OAwGspi12uqSbP2RPkp98XND9iHJU JUtoKkjpxzl0WXeRoAnbqpCARyZG6qTwskBK2tNuEJgb3y5qWYEBkwroSUic+sgz8OWt/e NJ3k0XnrFJaGToMNhmXavYVvsaKxBal5KRTP5Uc+Tct9R9oJJJVU2kFMv7Sj+JwDzunFRP ID+BPtP0yvgLRGqAjsSRax0Ms1ZzjPc4JLdggpUWLHfgwaNWTPVdMAgvWJPx7FMEr08Yhu E0eA9cFhKhMYoIR10h3PHt98A3pSlpoOFoZwESzW4z+GzuO50kH+asQqWiiY8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716483011; a=rsa-sha256; cv=none; b=Gssbc/3GeCD+CDZowrSvSGqCjiVbpgcJqERUvsMRjM0B4BPJ3sX6Y2C2qPfe1MZlUuJ3AU HTWdE+qiOiveFDvgvWFYzWnQo+RRI4G0vsqLxMwh5u26UtD04Sf8WppjUhxLsQupq5ZM3N Q5GTichjn/TI5WIWTbUkzhp8M/u4v4pPnmj46rritOrhkr9hSFd8tbHmNTRN2pkGXq9Z1h +9+tYCFwazuebpq63weXY3uxuu7rUfi/X5wvqswXmYwo7RqPyaLYJzbEzqDip9v5fMFsbZ ZWXIVKOv4FwtuQin+7otjgHe9mDqyP11WjdXsOAne8jwqhdyY/4kOvLfjsMvnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716483011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l6IqZW9T27zetQxZ2FcqC9cZr7Iy18zUYgU3qXQO1E0=; b=xBEBwah3vf6x2KD86+mOoAiY3zYx0uU5/xIp4TadKfdUM0YljR7TAR4lguCfR4P03fEuup xkSd7TadgEB93sINWE4W9OlBW23YEJMHw3rsgxEw7XX6fDmNPN+NRovgagXXzfdNfTgg/7 PnpOqJc0wMTGt3JOKqPdALfAIyyINB6AtSEmqkxIAHu3DyEYfsqbhDj7nf28S/wu3F6kVv 3NbOX3OK132epB4gHAtUrN0bvTLf5kj6SxeVTJI+hNcQjgroixiOENgOJ8KfjhR/ZECz3L A2xMEesS0zKy+NUA86QcETPhmRlj3f5kk8sxrU4EdZSf8SySau7lxRRO83KccQ== 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 4VlZ0g5knszxH1; Thu, 23 May 2024 16:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NGoBsc086134; Thu, 23 May 2024 16:50:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NGoBME086125; Thu, 23 May 2024 16:50:11 GMT (envelope-from git) Date: Thu, 23 May 2024 16:50:11 GMT Message-Id: <202405231650.44NGoBME086125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: be3631bc8d16 - main - option_survey.sh: Bump size to 5GB List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: be3631bc8d1664aedb2b8538a75fe3ecbe7a1b57 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=be3631bc8d1664aedb2b8538a75fe3ecbe7a1b57 commit be3631bc8d1664aedb2b8538a75fe3ecbe7a1b57 Author: Michael Dexter <editor@callfortesting.org> AuthorDate: 2024-05-20 17:22:56 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 16:47:38 +0000 option_survey.sh: Bump size to 5GB Increase image size from 4G to 5G to accommodate growth in OS. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1251 --- tools/tools/build_option_survey/option_survey.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/build_option_survey/option_survey.sh b/tools/tools/build_option_survey/option_survey.sh index 46ce167c49d9..c787125c9acd 100644 --- a/tools/tools/build_option_survey/option_survey.sh +++ b/tools/tools/build_option_survey/option_survey.sh @@ -117,7 +117,7 @@ trap "umount ${MNT} || true; mdconfig -d -u $MDUNIT" 1 2 15 EXIT umount $MNT || true mdconfig -d -u $MDUNIT || true -dd if=/dev/zero of=${ODIR}/imgfile bs=1m count=4096 +dd if=/dev/zero of=${ODIR}/imgfile bs=1m count=5120 mdconfig -a -t vnode -f ${ODIR}/imgfile -u $MDUNIT # Build & install the reference world From nobody Thu May 23 17:29:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlZt94j4mz5Kghb; Thu, 23 May 2024 17:29:37 +0000 (UTC) (envelope-from michaelo@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlZt92RQ0z4q29; Thu, 23 May 2024 17:29:37 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716485377; 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=R2iniBvMdCHogYerE1wKz6FukJHvAgYh4v8TOPNJw0E=; b=GWzG6/siVsZlJdI+P7tQg9HEps8zJb+BcLBOHjKfsHgCtOSMdHPt2zDPQjrG1ST6Ao1i5h YgKoU0HgQfqXpCqrwp0z5eoauFWaJKmVyj1Yg/JQyb/CPBS/sw7lpGgAnlz7w7SELN+i5O LW8WjPBLOJRnxRUZEqoS2n376e501VexC4a78IudFbQl4iCAQauVd7hrSp+hubCNTn9Upg MS687JrMTA3jzpwr9FGBDfS9/vaceBA7Qw5efn3nhuPbCF+RVev9nvcjHgN1pytIlt2YmD pPNvKSFfDTTuaHdyrCntm14ES4bhdWmDlqnWgjrghifdf5UxPDJIwBdbGUQz2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716485377; a=rsa-sha256; cv=none; b=npB566mA0GsS7koQBDfEQbwScKGQf/tVtG7To/pXejwnNcveYUEQTny9iZltxGgHo4cRYd Gs7yaCjSr0DZbMXgtMajRZmhPK5uJU0q3ydmx1iAdfrpJ/BGMrcgu6G2/NykfdE0w7lnX6 DV9LbqqoAG/wzCNQnXmDo25Cfj0ACX0SaLjvGwuF8ov+qbPR4jLjpeV821jNDeeNW1CKnQ i5ptavNl+wie3i0vKY767A9sH9IKnbeKse7NIRbaS4a2LUeLdHALWkk4+EbqmoJsurfwDs MH1vNxTyKGuN3eqPsD5c/mE7LbkxEIkDs4UUHr+OGwsMMozyGT6fgG/PcUCRpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716485377; 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=R2iniBvMdCHogYerE1wKz6FukJHvAgYh4v8TOPNJw0E=; b=AoRigS7doWIAKsV4mc2nGW0A5y1vzeDPDlqH3whIX0VvtndaCJVRnXKI6DxxFGexwIf9ti gCDmWu12D/EYyqSZM13pwwn1XfLhZPhLO3krj+wkm59oYzZW/n6M86KPFIRp3PiuX0NMxR Hj1vAhm81KAklyG7t2RNhNP9Ap+g+1Jemq5Fm53wAbhRuFiPuyec5FW6rRkXFRxyyE6V5D H6tTq4zKhaogESF/v+tuJjC8YA6Ed0EYK/M1/asx07v0sC+yoJRpJ65i6N8wzHuTQEcOBv 0z1C4aNYTmATKooXrSxlO8Cr2pPObBEAYIL1XkKiqtNvCoOi4rYXPKMh/iGOdQ== Received: from [192.168.1.23] (unknown [147.161.168.127]) (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: michaelo/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlZt83dNRzHVj; Thu, 23 May 2024 17:29:36 +0000 (UTC) (envelope-from michaelo@FreeBSD.org) Message-ID: <c0e90461-614f-4b00-9f14-28fa5677f3b7@FreeBSD.org> Date: Thu, 23 May 2024 19:29:35 +0200 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Thunderbird Daily Subject: Re: git: aa48259f3371 - main - periodic.conf: remove long deprecated security_daily_compat_var() Content-Language: en-US To: Mike Karels <mike@karels.net>, Baptiste Daroussin <bapt@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202405030740.4437eWUC034126@gitrepo.freebsd.org> <mecrmnhbuuzhha7k55zke4vl37cbtlztpu26rmujpaey5afx6x@ioljshqcbmw2> <648BD801-F3C0-40DD-B500-CB71177A6748@karels.net> <61c568fb-7e9d-4445-9d91-0830975bb54b@FreeBSD.org> <ov7t74svffzkfas6z42yyz42hvqjfsoozwinp3rqvzumcq562t@ifp32cuj2bem> <1AE302C8-5EED-4644-8900-6D8B91326183@karels.net> From: Michael Osipov <michaelo@FreeBSD.org> In-Reply-To: <1AE302C8-5EED-4644-8900-6D8B91326183@karels.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-05-23 18:05, Mike Karels wrote: > On 23 May 2024, at 10:14, Baptiste Daroussin wrote: > >> On Thu 23 May 14:34, Michael Osipov wrote: >>> On 2024-05-23 14:10, Mike Karels wrote: >>>> On 22 May 2024, at 10:07, Baptiste Daroussin wrote: >>>> >>>>> On Fri 03 May 07:40, Michael Osipov wrote: >>>>>> The branch main has been updated by michaelo: >>>>>> >>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=aa48259f337100e79933d660fec8856371f761ed >>>>>> >>>>>> commit aa48259f337100e79933d660fec8856371f761ed >>>>>> Author: Michael Osipov <michaelo@FreeBSD.org> >>>>>> AuthorDate: 2024-04-15 11:05:17 +0000 >>>>>> Commit: Michael Osipov <michaelo@FreeBSD.org> >>>>>> CommitDate: 2024-05-03 07:38:55 +0000 >>>>>> >>>>>> periodic.conf: remove long deprecated security_daily_compat_var() >>>>>> >>>>>> This function is documented to be gone in after 11. Time to remove this >>>>>> compat shim. >>>>>> >>>>>> PR: 275296 >>>>>> Reviewed by: jrm (mentor) >>>>>> MFC after: 1 month >>>>>> Differential Revision: https://reviews.freebsd.org/D44796 >>>>> >>>>> this broke pkg's periodic script, I would have appreciated a heads up to give me >>>>> time to prepare a release compatible prior this commit. >>>>> >>>>> This also breaks some ports. >>>>> >>>>> Bapt >>>> >>>> This produces almost a dozen failure messages in the daily security email. >>>> Given that the deprecated function was still in use, it should not be removed. >>>> Michael, please revert this. >>> >>> Salut Baptiste, >>> Hi Mike, >>> >>> this is surprising that is it still in use although clear marked as >>> deprecated after 11. Though, Baptiste has pushed a new pkg release yesterday >>> [1] and only main is affected, do you still prefer to revert this commit >>> (for now)? >>> >>> @bapt, can you name the affected ports and report a PR, so we can track >>> them? >>> >> >> This was in use beside the deprecation, because pkg for one is supposed to >> support as many version of freebsd as possible so we had to keep the deprecation >> notice. >> >> I have released a new version of pkg without it and merged that version in >> quarterly branches, so even if it gets MFCed we should be safe. >> >> I was scared more ports where keeping for the same reason the deprecated code, I >> span the ports tree itself and found one port which I fixed straight away, I >> also did a deep analysis of the any port which plist contains etc/periodic, >> I extracted all their sources and I found nothing. >> >> so I think we are safe now. I don't think we should revert. >> >> Best regards, >> Bapt > > OK, I'll withdraw my request to revert if we're confident that there are no > stragglers. Alright, thank you folks. We'll keep as-is and MFC will still land no sooner than in June. Personal thanks to Baptiste because you picked up the problem so quickly! Michael From nobody Thu May 23 17:42:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlb8Z4Smpz5Kxtb; Thu, 23 May 2024 17:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlb8Z3pJ9z4rSD; Thu, 23 May 2024 17:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716486126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u5VkYq5r8JejhsZf2gECWaykt3YMrZXT4G6s5dL4gqc=; b=S8jPBVa6ntDq0hvJwAyb9AzuSoyR2ppgiwFZ65JkDZG6+5X/TAl8ytf3vL0AAq1KhNlRi8 OXiKf/bqJXlbP8eOvsQenOjBR22nh2pMxuXque6qvm4XMzfAtAbegrhs0hxzByQxJqstQw +Sk3o9snP3+4H2ubuTREBuK/F4ZnGedQ0k9aHOiYYO2zqgT17Tax6cJotKgExDOsgHRDW6 DJGfGncbGcSGAb7wPpot7jhZBy2IKG/pzrsocPYIIAmHULpDznNblc1EwX+s+Q9WNzk392 U5nM9NuzRHmDexY02c7251m/KTq8g1BHR6zXRUJoG7nzz00y+MiZ+SxiJewt7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716486126; a=rsa-sha256; cv=none; b=n9utmUZYQM2ESgB6SkW07lSBauIph9fKB9BeQ42gfSJrjYiot0ehTbm8DlTtVGbjbuJfX5 jIKGJ3E2UP7kSrhN0vDZCEVfwh/SR83afrR952NTML8mCTYfE6NdvedEpYwOD0DlFvjSwh gCv2qHDb4PzktqhbLzRXU9hYg0IJZ3MJNZeT2nLFCfui91fhhebNXCKTek4+YVFQfeTk82 K8Onj9nBbdCYJdW23h3slK922gH4raT60NrefsoDO2t5Maflw0iiz+WE/Ynb+YLLnJitby hkuncLm2yStIuIH39/wVVwDNCFa9BMXvMaR4YEHFz/ApDSjnlcTHOSCSo+q+6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716486126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u5VkYq5r8JejhsZf2gECWaykt3YMrZXT4G6s5dL4gqc=; b=ZGvDEv1AbchieOJ8yNmZSBuo7WriyLHiyb1JdFOm205IVsa+w53oa9CXN+U7ylMvrdAoIC P+rA/GfpzQqYiAdP23Kfzt/gNGZTODbC1cJCK2qMGm2IM1LMqTDsnrlMRpvjk8ttRxnq+5 PJmynNaF5S3+lV2ARYJ3QdixsH1vPSs27Yoe5gUXbgVQ0Up9yYrCVz2pT4FK+m2x8NradW g998feJCz+nH30L5/wH9yr0IiaLobCINyXrazOxbKXQA2II4uhhHlVgj9KnwsrwPHPx+QX IZGFaAbmdvdcNeiGt1WjEQMrXv8Rt0AKhTHsTQGRQyd4+Tl41UwiP0g0CNKnLQ== 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 4Vlb8Z3PwWzyrN; Thu, 23 May 2024 17:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NHg6um081525; Thu, 23 May 2024 17:42:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NHg6WV081522; Thu, 23 May 2024 17:42:06 GMT (envelope-from git) Date: Thu, 23 May 2024 17:42:06 GMT Message-Id: <202405231742.44NHg6WV081522@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin <mav@FreeBSD.org> Subject: git: 455ce1729353 - stable/14 - Fix scn_queue races on very old pools List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 455ce1729353f2ffce9713ccc3574e73186a22f0 Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=455ce1729353f2ffce9713ccc3574e73186a22f0 commit 455ce1729353f2ffce9713ccc3574e73186a22f0 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2024-05-23 16:20:37 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-05-23 16:24:55 +0000 Fix scn_queue races on very old pools Code for pools before version 11 uses dmu_objset_find_dp() to scan for children datasets/clones. It calls enqueue_clones_cb() and enqueue_cb() callbacks in parallel from multiple taskq threads. It ends up bad for scan_ds_queue_insert(), corrupting scn_queue AVL-tree. Fix it by introducing a mutex to protect those two scan_ds_queue_insert() calls. All other calls are done from the sync thread and so serialized. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16162 PR: 278414 (cherry picked from commit 49086aa35d987b78dbc3c9ec94814fe338e07164) --- sys/contrib/openzfs/include/sys/dsl_scan.h | 1 + sys/contrib/openzfs/module/zfs/dsl_scan.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/contrib/openzfs/include/sys/dsl_scan.h b/sys/contrib/openzfs/include/sys/dsl_scan.h index 2e3452e5ebaa..f32f59a2bedf 100644 --- a/sys/contrib/openzfs/include/sys/dsl_scan.h +++ b/sys/contrib/openzfs/include/sys/dsl_scan.h @@ -173,6 +173,7 @@ typedef struct dsl_scan { dsl_scan_phys_t scn_phys; /* on disk representation of scan */ dsl_scan_phys_t scn_phys_cached; avl_tree_t scn_queue; /* queue of datasets to scan */ + kmutex_t scn_queue_lock; /* serializes scn_queue inserts */ uint64_t scn_queues_pending; /* outstanding data to issue */ /* members needed for syncing error scrub status to disk */ dsl_errorscrub_phys_t errorscrub_phys; diff --git a/sys/contrib/openzfs/module/zfs/dsl_scan.c b/sys/contrib/openzfs/module/zfs/dsl_scan.c index 34012db82dee..c509f402c44a 100644 --- a/sys/contrib/openzfs/module/zfs/dsl_scan.c +++ b/sys/contrib/openzfs/module/zfs/dsl_scan.c @@ -491,6 +491,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); + mutex_init(&scn->scn_queue_lock, NULL, MUTEX_DEFAULT, NULL); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, sizeof (scan_prefetch_issue_ctx_t), offsetof(scan_prefetch_issue_ctx_t, spic_avl_node)); @@ -646,6 +647,7 @@ dsl_scan_fini(dsl_pool_t *dp) scan_ds_queue_clear(scn); avl_destroy(&scn->scn_queue); + mutex_destroy(&scn->scn_queue_lock); scan_ds_prefetch_queue_clear(scn); avl_destroy(&scn->scn_prefetch_queue); @@ -2727,8 +2729,10 @@ enqueue_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) return (err); ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } @@ -2919,8 +2923,10 @@ enqueue_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } From nobody Thu May 23 17:45:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlbDh37cpz5Ky4Z; Thu, 23 May 2024 17:45: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlbDh2bwsz4rpC; Thu, 23 May 2024 17:45:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716486340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdcerXvjMvNzTp3aTHPHmknrAfZBH8kondIICJh2F9U=; b=CtaAGzuoq2UcEX4yCxZdu0l+gEE9r7hp/GKcR9FUHJYXImnPytsbXoeXLuJcKe7scCJ+FW BFyYJgHE3iAgqrF8EkZgMI3z6e+saTrmw4uHM7sdvIW/ArSiNGiCsg5Ogsrb/G4q44SL8h WdXrs/fDkaeeuUcBLBgi3aO9N/Saonpyf2EWKwlYh+LxkUpqjaJeUmM7KpgCog+v9UGosP ZMiDrNF+yBD7UITlqQup4m9JGAR7mdEaF9Q7IVnWXBvrkl/Nm/f3UUy7/QIZW6cDCCyMME ahmD4y9I02NKiLJlKgCqpUpZ9h3VTzc1WVb+cedXxmqJ494uWz4D32eM8vwfCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716486340; a=rsa-sha256; cv=none; b=LBc7F6ybLOVXBsqmCw2Tt2Us1lvyYADqPJVKX2O/btT7ByaJK8P5fh1PEh2uhsoMS9+Kty bvyafaaOShZXLGZH639kZ3/9NbeGs6ou4dA8nfYlrg7PgAzJ4iBSy85RL8JVlImQ735Vo4 FGK8R+gX0hNFK8z8yLFw+KIYpQfIWo4EWVA0ZBJk/Q7NoY7RNWcw/rH7S1ZX2RNKrzun1x 0CeZMnMPDT0Oqcc+dwPruhrHhhKSHdbHz8dpYuS3ca3c81g2ohMXLsdc30lIlYkiwuYx26 OSYQ/1vyU9Concq5cIp1TJYZygZQo/Wzo0xgegEXtPIm0Y3FZo6uusQ+K+aBjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716486340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdcerXvjMvNzTp3aTHPHmknrAfZBH8kondIICJh2F9U=; b=T35l6wuLGrWIop0DXHXjmxGCTFMAvtsfbSNUF3cauZp+Ufjs3OYBTN2QX65nLgWD+5Va9P MOcdcBnBwu2Q0XGpJGdpTXWPVdl59v9OZG//DyetV2cbugSjloKh/PFWY1lG7QSYstD0v8 oZ3jqVOGn7qELW/pbNobggjAGUm6a7Ztf+CkMiCz4NCkn7/JIr7PrBYBYReJONYYYcK7H5 e5EkS9z/bpl/k118LdHrhGfLFqe5X3+eVAFIYecyK5rV4K2VvD8CQYD6qaZShTrEl6nhTo x9QlZlZKzPE35JYDtQVBCSoZgRxiinU78OEt/2ap65PV+rvl02ABBAdLCf+7xA== 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 4VlbDh25FHzyrf; Thu, 23 May 2024 17:45:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NHjeer082154; Thu, 23 May 2024 17:45:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NHjej8082151; Thu, 23 May 2024 17:45:40 GMT (envelope-from git) Date: Thu, 23 May 2024 17:45:40 GMT Message-Id: <202405231745.44NHjej8082151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin <mav@FreeBSD.org> Subject: git: 9898f936aa69 - stable/13 - Fix scn_queue races on very old pools List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9898f936aa69d1b67bcd83d189acb6013f76bd43 Auto-Submitted: auto-generated The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=9898f936aa69d1b67bcd83d189acb6013f76bd43 commit 9898f936aa69d1b67bcd83d189acb6013f76bd43 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2024-05-23 16:20:37 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-05-23 17:43:02 +0000 Fix scn_queue races on very old pools Code for pools before version 11 uses dmu_objset_find_dp() to scan for children datasets/clones. It calls enqueue_clones_cb() and enqueue_cb() callbacks in parallel from multiple taskq threads. It ends up bad for scan_ds_queue_insert(), corrupting scn_queue AVL-tree. Fix it by introducing a mutex to protect those two scan_ds_queue_insert() calls. All other calls are done from the sync thread and so serialized. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16162 PR: 278414 (cherry picked from commit 49086aa35d987b78dbc3c9ec94814fe338e07164) --- sys/contrib/openzfs/include/sys/dsl_scan.h | 1 + sys/contrib/openzfs/module/zfs/dsl_scan.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/contrib/openzfs/include/sys/dsl_scan.h b/sys/contrib/openzfs/include/sys/dsl_scan.h index d716510f879d..f2647a936c94 100644 --- a/sys/contrib/openzfs/include/sys/dsl_scan.h +++ b/sys/contrib/openzfs/include/sys/dsl_scan.h @@ -155,6 +155,7 @@ typedef struct dsl_scan { dsl_scan_phys_t scn_phys; /* on disk representation of scan */ dsl_scan_phys_t scn_phys_cached; avl_tree_t scn_queue; /* queue of datasets to scan */ + kmutex_t scn_queue_lock; /* serializes scn_queue inserts */ uint64_t scn_queues_pending; /* outstanding data to issue */ } dsl_scan_t; diff --git a/sys/contrib/openzfs/module/zfs/dsl_scan.c b/sys/contrib/openzfs/module/zfs/dsl_scan.c index f0a851ff53a9..6979f08cc9ff 100644 --- a/sys/contrib/openzfs/module/zfs/dsl_scan.c +++ b/sys/contrib/openzfs/module/zfs/dsl_scan.c @@ -469,6 +469,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); + mutex_init(&scn->scn_queue_lock, NULL, MUTEX_DEFAULT, NULL); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, sizeof (scan_prefetch_issue_ctx_t), offsetof(scan_prefetch_issue_ctx_t, spic_avl_node)); @@ -611,6 +612,7 @@ dsl_scan_fini(dsl_pool_t *dp) scan_ds_queue_clear(scn); avl_destroy(&scn->scn_queue); + mutex_destroy(&scn->scn_queue_lock); scan_ds_prefetch_queue_clear(scn); avl_destroy(&scn->scn_prefetch_queue); @@ -2402,8 +2404,10 @@ enqueue_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) return (err); ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } @@ -2593,8 +2597,10 @@ enqueue_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } From nobody Thu May 23 18:00:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlbYH1bLXz5L0BB; Thu, 23 May 2024 18:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlbYH15vgz4sfK; Thu, 23 May 2024 18:00:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716487203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NViUAakX0jRhdEv4/qZEDLpbkPupuz7Ic8V/TP8gf7s=; b=p0Ah5mamYx+DMObnQPbujEpsNpr2cCZilMEJ10ze2Nce/+KMOswF9jQCcrEgonBB7RYrD8 ReFUKpUQu1TAkQhC11VkVNitiv6imisz6xp3iSeFJqt4joOaEjjWZhuM5hJq6sfSjre2KY gl0znP8AM4/Wwyv0mcotoH1rZoNvbnCvRB5mdy5b84sRfuVgxIU5ZQlku1NScu9KC4GqTR wpSlQeHCwl8bHEG4E5KznEG9VLcRLZPcbL6/ZlJzIi5CZyE92v7LsgtE5LsVw3TCUibKoY Zksw57iGdRhZ1jHsOXbwMxv9AaqbaruoQPRuaio+RPCcdTh2SLDVjXeg6/9zOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716487203; a=rsa-sha256; cv=none; b=pIzA5K/4qEVU+IxM6QHLNwuAi4fO+Zw+FWKCiBprldmIg9N69uh+WqR0q1cFYmvKh3nFS7 0UYKlKYKkkY5RUsNz5KiRo3rAte+1M/vemwrr4bvOe7rGaW+PyQeSwGm/Sm6cd01aCXMOz I9SSpb5vEZMdOax1wgU5DS3zGPBkzjUkMIiRea50sgGLKlaBW6aKxbSrdbmNLaPLNyVRDV /Fg56t7I4AbFOysoLlZQqPQDhKwh5iP19GYVp1iR1ZdRtZPpjOuLIcPoJJ8Nyhfvt11fry N23vRms3iuUKSTumGjbamYD4C6ViN47IpVbMao+g3IK8VlZPHwsSC8AzzD5Paw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716487203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NViUAakX0jRhdEv4/qZEDLpbkPupuz7Ic8V/TP8gf7s=; b=iphtHpmye4J9pdv3ZKsm9CeKOH5ow3kNj9XfcCKIXwZ4KnLItZKZ7/wkYO8O5iHVKlAraK lAZlnF6mOeMkk59coEPLzgpiqcE3lY7Dq23/4/aDpURU3pgu2pcVPBimEo5T5nLpvdZklJ xRXEGj0ymkA8LT/A9XmHMBnHyAxxuqH77g+svABAi930q/8g//w5mvXxbDGBCsSuB7jkLw QI3tOPMFPeYwNYQeABOWVvox3C3rpYTMYyZuTi3xOST4bdU0Mv/SSsiazHt5Wh7gNICcRu 6ITMoGHpVMsrWRxorwf/TzgKKtun2aTmOCTt+a7QLni2OhEABDAjqT0aqPDt7w== 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 4VlbYH0htlz10Br; Thu, 23 May 2024 18:00:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NI02hX002208; Thu, 23 May 2024 18:00:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NI02TZ002201; Thu, 23 May 2024 18:00:02 GMT (envelope-from git) Date: Thu, 23 May 2024 18:00:02 GMT Message-Id: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: a5f03413aade - main - ci: Redirect output for builds. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a5f03413aade8f69cf954162151da043d34dd1f5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a5f03413aade8f69cf954162151da043d34dd1f5 commit a5f03413aade8f69cf954162151da043d34dd1f5 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-23 17:37:01 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 17:59:40 +0000 ci: Redirect output for builds. This target is far too noisy to be at all useful. Save the output ala make universe in _. files. Also report where to find errors. Sponsored by: Netflix --- tests/ci/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 8892b0860260..fed66e5cc317 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -147,19 +147,31 @@ beforeclean: .PHONY clean: beforeclean .PHONY ci-buildworld: .PHONY - ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildworld + @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 || \ + (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) + ci-buildkernel: ci-buildworld-${TARGET_ARCH:tl} .PHONY - ${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildkernel + @echo "Building kenrel 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 || \ + (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) ci-buildimage: ${QEMUTGT} ci-buildkernel-${TARGET_ARCH:tl} .PHONY + @echo "Building ci image for ${TARGET_ARCH"}" mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ QEMUSTATIC=${QEMUSTATIC} CITYPE=${CITYPE} \ ${RELEASEDIR}/scripts/mk-vmimage.sh \ -C ${RELEASEDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \ -i ${.OBJDIR}/ci.img -s ${VMSIZE} -f ${FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF} + -S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF} \ + > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \ + (echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false) touch ${.TARGET} ci-setsmokevar: .PHONY From nobody Thu May 23 18:12:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlbqK0wBrz5L173; Thu, 23 May 2024 18:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlbqK07d0z4tfM; Thu, 23 May 2024 18:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716487933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qn5cuBY+WmkGM1sguhHLHkvuRUpmyw6zZPKUOauyujw=; b=EWEWEGAgiM9MeuIvGXxJEY/P/WVc+5m6D5hqzRogo4S4SXsv+T6NjbiZx6/9q9ZS6041fq vgECp8ehZrKLSMu4+PB86UiMbA8MbcoSltPqUbq9oaeiGFHo4na4iVbsk0o/+YkhnNbKLC GOWht2eHn5fnGxI+XUj/gQ5lTkDoqokzDahiYJUPUlfPUy1FFDxFH4pxdEzoUlrhlFCYfF gxQjWp8csSery6P3vDueaFi9JXGAE/cdcze+1yTYj1ScBmcLLPwayWVIcYSyyzx9oHQ9y3 74V+uvbd/DNlaCIhl4LgKW1zweVflz/t/5t+aJrxS2TL4ljjPGnHVl3Pdp5IYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716487933; a=rsa-sha256; cv=none; b=Y+dJhSrPVotk/67YAdbPQJkxbnCWVIjraSUoj6FzrgqwdtLrSz7isSpiiEUOZiDrZ/fG9B 9IvSnkItJdd5px+18zQLYRn/+0iAD4V/YLVy5bIZJw9SbmkZjxdfBue0d0BXPEu+U2VtX4 InTJ+Tp3trnNEruTHDkUAgFbNuxqEWPaaT8yQ9l3pH9riyHGxgruj/XiamzJGduOALoJyN +oczLCLrKcdI5By2yuQSodNfJ3vgswfyxheyHO15t9QkoTIUSODNNxdOofKyQtTJMe/jri 2Cl1MUczRc4nUSeOp8xVzlfk9gkd90j2FdeK24B3PvZ4Wk3+uVFfKALwjXmRoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716487933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qn5cuBY+WmkGM1sguhHLHkvuRUpmyw6zZPKUOauyujw=; b=s7a7ZajsimcZHWUCzDl/Ru1e2xsI2yjUjqA0NQKaG2aN0FVHKFIrPR0YEgFAmKfqg+fWXX KmzteAtchWEmArXWBNxAL1XCkCv1KjJbMj93P0GHWHgka2NlCnnZ2FoSbRrozJ/5ASzMzL KEuuN05CfkWfmwF5/F4OXewbyH2mde4B8NeoX4MZdGHhxoNLwAC6cvAiANF0oA2cfZ4otE R6MBCQ9aSp2EuFELlG4sYh1z1GucFBzdBenbXTWHsKu7k/UqJZTtMG1jGqpZF22NGwyJor s2bF2ET4qUF52AIrc8KeWO2cjNnKSsTDs33GdJxdkxurZzdCgv5ChvTEhOFgmA== 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 4VlbqJ6rdnz10V6; Thu, 23 May 2024 18:12:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NICCKV033051; Thu, 23 May 2024 18:12:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NICCwQ033048; Thu, 23 May 2024 18:12:12 GMT (envelope-from git) Date: Thu, 23 May 2024 18:12:12 GMT Message-Id: <202405231812.44NICCwQ033048@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin <mav@FreeBSD.org> Subject: git: 856d35337225 - releng/14.1 - Fix scn_queue races on very old pools List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 856d35337225d77948b43ee5d479baa2588963ec Auto-Submitted: auto-generated The branch releng/14.1 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=856d35337225d77948b43ee5d479baa2588963ec commit 856d35337225d77948b43ee5d479baa2588963ec Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2024-05-23 16:20:37 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-05-23 18:11:36 +0000 Fix scn_queue races on very old pools Code for pools before version 11 uses dmu_objset_find_dp() to scan for children datasets/clones. It calls enqueue_clones_cb() and enqueue_cb() callbacks in parallel from multiple taskq threads. It ends up bad for scan_ds_queue_insert(), corrupting scn_queue AVL-tree. Fix it by introducing a mutex to protect those two scan_ds_queue_insert() calls. All other calls are done from the sync thread and so serialized. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16162 PR: 278414 Approved by: re (cperciva) (cherry picked from commit 49086aa35d987b78dbc3c9ec94814fe338e07164) (cherry picked from commit 455ce1729353f2ffce9713ccc3574e73186a22f0) --- sys/contrib/openzfs/include/sys/dsl_scan.h | 1 + sys/contrib/openzfs/module/zfs/dsl_scan.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/contrib/openzfs/include/sys/dsl_scan.h b/sys/contrib/openzfs/include/sys/dsl_scan.h index 2e3452e5ebaa..f32f59a2bedf 100644 --- a/sys/contrib/openzfs/include/sys/dsl_scan.h +++ b/sys/contrib/openzfs/include/sys/dsl_scan.h @@ -173,6 +173,7 @@ typedef struct dsl_scan { dsl_scan_phys_t scn_phys; /* on disk representation of scan */ dsl_scan_phys_t scn_phys_cached; avl_tree_t scn_queue; /* queue of datasets to scan */ + kmutex_t scn_queue_lock; /* serializes scn_queue inserts */ uint64_t scn_queues_pending; /* outstanding data to issue */ /* members needed for syncing error scrub status to disk */ dsl_errorscrub_phys_t errorscrub_phys; diff --git a/sys/contrib/openzfs/module/zfs/dsl_scan.c b/sys/contrib/openzfs/module/zfs/dsl_scan.c index 34012db82dee..c509f402c44a 100644 --- a/sys/contrib/openzfs/module/zfs/dsl_scan.c +++ b/sys/contrib/openzfs/module/zfs/dsl_scan.c @@ -491,6 +491,7 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); + mutex_init(&scn->scn_queue_lock, NULL, MUTEX_DEFAULT, NULL); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, sizeof (scan_prefetch_issue_ctx_t), offsetof(scan_prefetch_issue_ctx_t, spic_avl_node)); @@ -646,6 +647,7 @@ dsl_scan_fini(dsl_pool_t *dp) scan_ds_queue_clear(scn); avl_destroy(&scn->scn_queue); + mutex_destroy(&scn->scn_queue_lock); scan_ds_prefetch_queue_clear(scn); avl_destroy(&scn->scn_prefetch_queue); @@ -2727,8 +2729,10 @@ enqueue_clones_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) return (err); ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } @@ -2919,8 +2923,10 @@ enqueue_cb(dsl_pool_t *dp, dsl_dataset_t *hds, void *arg) ds = prev; } + mutex_enter(&scn->scn_queue_lock); scan_ds_queue_insert(scn, ds->ds_object, dsl_dataset_phys(ds)->ds_prev_snap_txg); + mutex_exit(&scn->scn_queue_lock); dsl_dataset_rele(ds, FTAG); return (0); } From nobody Thu May 23 18:20:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlc0W6tWZz5L2Cg for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 18:20:11 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlc0W6HHgz4vNJ; Thu, 23 May 2024 18:20:11 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488411; 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; bh=1T4mmuuaw0VU2hdPF3HnyoWGggYS1mhS6hNy/4cinx4=; b=T7+avK1sprEquJ+lFWOsrjWkZ+6Ds3xU3Ry1eYVBljov3nDnfnY9ZffoWIFRaNl7GhhJM/ wvTv9lMLztYGSF1UfvNQ7r7z1DZzSSAYgOZ2Q1HLXN/WG92WGl3IPhZBiiJLFE6BrGKZ/i LqHcFFEyyB3xnXXTLW5sGJVUzYtuh9P98FpuKf7vZ2Qjd8mRmPnTetA0XEzLClKI28Mfnv UiRR9ihTkJgYVVGzGfhydOD1x3IG/vS5nSkc09uh/z0TLU/+L4Gy1cgzOR+nV2rsZbvwZY pZlA9YJN6jMXugp7rYxRWLwLMPDHs345BVSdcsq9PiKVzmkK6QOF8atOxhkXvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716488411; a=rsa-sha256; cv=none; b=pBoJPDX2MiokZscRC7cpPi8WlrEkffEeHmPDdK8l9GfCc92PqgN+BRkNbhms0ttah/CBo5 zv2da6X3QpNp72foGkjGly8+Em6Gxalni8shApJflFYyI+bkTImaSIZfyDGOBcVqwqG8RO e+//dx16oRrUiV5JNItmzBHtMbWYlrLWeIZC+armDBL9v2KcNADRVfeAU86sJIDgpsDZUz GFmchH9POTpijKGpCgIt25yKQAvixbc/Sa88mSAevRD6TZBqHgOvLjfHzUwpOmXU/JRQKY USU1zplAGxDqkzZj487+GTkCft9i4hTMpkIeMKWYPq1PglZ5O1u08avFA+yGBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488411; 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; bh=1T4mmuuaw0VU2hdPF3HnyoWGggYS1mhS6hNy/4cinx4=; b=FX6Plt+t50WAJnrg/HNALzxEQRI7aLIf44DDTQvbZdHDgntjinamqsX2QHQc8uT6nhmF8e /QyQasjCTxE+zM3S7tvhiuZ0rzOyLYJrZ218KTVsCFWZzZaL0f7e2mp34qDd07zzDN+hBZ xDslChPYINciLyrwaxC7owOfNU5TAHhDWRM3hHlPhUaLIA8ajxriURqOzXiXcPaVby//os O32a1Nt8vlMBUmoQ9oD6hR8jHStIDX8t0REMna7XzXHAbuy1EBUIdvM5EezEY7c1+GGQOI rdYTDLRq07Ce0PciNw687A56TqMf6wKWJmYSfsx2Qruazrube0grHBSZa+kmfQ== 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 4Vlc0W0wdPzKBS; Thu, 23 May 2024 18:20:11 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Thu, 23 May 2024 11:20:08 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: John Baldwin <jhb@freebsd.org>, Brooks Davis <brooks@freebsd.org> Cc: Dmitry Salychev <dsl@freebsd.org>, Lexi Winter <lexi@le-fay.org>, Mariusz Zaborski <oshogbo@freebsd.org>, dev-commits-src-all@freebsd.org Subject: generated sources Was: git: 408957613bc0 - main - Regen Message-ID: <Zk-I2IcR80OBu4Tx@cell.glebi.us> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> <3edabe3b-4b51-401f-ad64-e36c84fd455b@FreeBSD.org> Hi, sorry for slightly diverting the discussion, but looks like this thread is the right place... On Wed, May 22, 2024 at 12:55:24PM -0700, John Baldwin wrote: J> I don't think it's worth reverting at this point. For `make sysent` I would J> suggest 'sysent: Regen' as a commit log in the future. We typically use J> 'src.conf.5: Regen' after running `make makeman`. On Wed, May 22, 2024 at 05:05:14PM +0000, Brooks Davis wrote: B> This is more or less standard practice for generated files. These B> commits are of basically no interest. Historically they had to exist B> because the source file $FreeBSD$ entries were embedded in the generated B> files and thus had to be final. That isn't true any more so I often just B> include them in the origional commit unless I'm doing a lot of minor B> changes to the source files. Is it possible to generate the files during normal kernel build? That would require lua packages installed, but we already almost require git installed to work with FreeBSD sources. Absence of lua can be checked in Makefile and a verbose error message would be printed. Or may be we can use the small lua that we have in the loader? Sorry if the very last suggestion was stupid - really don't have any knowledge in the area. After the xz/liblzma backdoor all the generated code committed manually makes me concerned, as it has 0% chance to get reviewed by community. Just if my suggestion sounds stupid and there is a good reason to have what we have - an automatic generation followed by a manual commit - then please explain this reason. -- Gleb Smirnoff From nobody Thu May 23 18:24:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlc5l08Xfz5L2jc; Thu, 23 May 2024 18:24:43 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlc5k3Y1pz4w5t; Thu, 23 May 2024 18:24:42 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488682; 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=0wkaGOsxKMG0zFtSJno3Xcu4e3lgtn3jnEk/AATyi1U=; b=ND5RkUKEISy/XuFxo4zgxcsq4oZtppmPrIA7vfScJWnlEfLa47I61eL9d2CTToj6Qw7WXv EUHNx0ZEVXdbY/Z12b+wsOdLevBjJKJE/ZWJtZW5mAdA0vWvMT0uHmnyTnzOY0A5a718Zd nGojRBbi4uQs3ASVWPptTMkKL8gh5cP0MSAU3neO9k7xCL5qyOOMBov81xbgXboKewdjDk 9CVczAq/T5WILowekmEQSrBdyejSo0KOjZqBX6WRtWDlUy1VRTJNwH6bIzPaKROE8BLE92 NG2tuqbNNNlpYOfdTyRL2ZscFQOveOmRt6tP+FHuCzneHGSKqC4gj/YSm9gh3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716488682; a=rsa-sha256; cv=none; b=DLux/LKOJ/H2MiCZtV3rn27GOMZPWu9qM+SZMela54IHNfZNTKwHTzazXRVlHQt2H+P5JM SyUHtg22G2RsfkXthOIG0I1IDJrlERlhFxYbTbBWUzD/WJaQxkh35zIc0pnUyAZaRftQ5V bmSPZA8s4a/LFs+ooyI5pcjhDtZXGRpHLUT5PBZsQysogP0VkOSoZjQWpGzviMJFGms+/Y 9fRpN8Fb+MhSugvPwHD8Eccq2SwiQ1vW4gHL4Sj2s5a++5BQJUbhtJw1sKhrJkLG5Ddvug ts8nHVwXJLwJl5TBv22KOqMzZ3kQKIDBSSadOA4E7NXvgv5Yn89zxLvpP662DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488682; 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=0wkaGOsxKMG0zFtSJno3Xcu4e3lgtn3jnEk/AATyi1U=; b=gLalBM62Ozica71PhQLny2qvO6GQ8auSfjZl/D3DPdcgIVVAlfCiRHB/QOekMR8YhJwOa2 lqSiHU31bkRIzSeZEca3zlT9UI8RwsB2sApTMFJppySp+uyhSqri/oWj1MS0CoV1k7C9U0 ZhjYvIZ8ypok7AMBkNuRBRMuZ+Tux5fCwpvd2FkdzaXEdu0I8/yf/ddITQVkHGVFTmj2RT Sw4HNM1rkfgIstmlMM/7bDIF45B4AJEaq0uaOELNZGE7M9VtpUis8ORZhulN2HULKjBMTR uuClUYNxnBt4fEQiw8XXdhkbY68OtpPLtxcRCxZ8wUX7NgX6AH6wRH2Lou3BMA== 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 4Vlc5k2zcYzKBf; Thu, 23 May 2024 18:24:42 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 74BB53C019B; Thu, 23 May 2024 18:24:41 +0000 (UTC) Date: Thu, 23 May 2024 18:24:41 +0000 From: Brooks Davis <brooks@freebsd.org> To: Warner Losh <imp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. Message-ID: <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a5f03413aade8f69cf954162151da043d34dd1f5 > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > Author: Warner Losh <imp@FreeBSD.org> > AuthorDate: 2024-05-23 17:37:01 +0000 > Commit: Warner Losh <imp@FreeBSD.org> > CommitDate: 2024-05-23 17:59:40 +0000 > > ci: Redirect output for builds. > > This target is far too noisy to be at all useful. Save the output ala > make universe in _. files. Also report where to find errors. If this target is intended to be run in a variety CI system then this won't work in practice as many have no way to preserve the contents of the files (jenkins does with sufficient configuration, but then you have to expose it to the world which is a security problem given its vulnerability history.) -- Brooks From nobody Thu May 23 18:28:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlcB96HDmz5L2cn; Thu, 23 May 2024 18:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlcB94FHzz4wXy; Thu, 23 May 2024 18:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p648VWC2+v9BbWWQJAZZVcFQMyXLHGWAHEsMgiVJC7E=; b=uvzad7u78RTEjwgPFO/8jakt/HOvNagG9T4BY9Y65Gf26lES6jIUONncWiZog2yVODI1KR hg2X6VnuGIpq75Y3VmBCp9SpPzNuDm+/qQYL0OCeaPfMeu9mlSC/0MQTxtuAUeXumVeWSh nmEnOevZ+kUqFf3ZhWH/yntOahtdzr0GmQLfYNx4w1LWPR9jsdXD0FFzIjdBgspUyNJ2b1 cVoPENleLmsl0Rug47DM3hoxOGH2y1mQi9dSDiCNJN1FdwkFF2ZMAWcSmYiSS1eWbO8PMe Km5fgl416MGDFCkdo3kKfLbofdGcCCIh5HWwO0V5Iu2aScjXxWvbGU1mY7lAPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716488913; a=rsa-sha256; cv=none; b=fiE9m20hC5mHhZtFrWzo/hULObIwFTW5QwMcugU2FkbGPL+7vQAMuHwtk68Nz0GwuleRkX Jz+nLdgqBS/WfZjWpZ3Ns7OapSwqeVZNDbfkByu+Cl5r5EiTULTJmCzAVLr+wAM0rrAQnF NsPjSi+Om7fiPSNZSm9iXFaNfU4cW69guccPdGYHCABUWy6WNoVuzy3LK7ivVfCgXlrzb2 smRkaSqbUETGrt4UahvIChCTeKQnKnMdwUw04jVxVD9X/KTn5Q2c7wkghmqoffzXj7N9l0 o6Y5FXqGksfkKxA2l7YrEBgPXQ6s++nz0btiRspd659Pp5leHXTB9xh5VopSZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716488913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p648VWC2+v9BbWWQJAZZVcFQMyXLHGWAHEsMgiVJC7E=; b=L7gDMMvVAhBlZbaPFHKJp6AL0h/t6RL5qqvzcyqkJSuDSTaBRAEftvKHIvOdzdKXfbm0Io ld+JJnfHSESEGUHr8SlbJF81HeQjT4z8lwLQSHRpZZ9eBCxiR3xqof/VsAdEwaJCJzNBji J0OM+WMCBAtgFhxwi5LKAVqCjdHthiNm3fwE9xkDmHOPVMr156UH/4pxDNl5lNja6Zm7Ur sSkb/No2y2tsjFKuVEfbUsSfvVN63qLxRktEfydhvSax9/InkWjOE3fIrx2hu30VXDLkJl NeTaFefGXUhlPfIqE0x/DxhCccnD8o9vy3EE2pd7ZC17HdsDwGDXmccN2Jb4uA== 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 4VlcB93sG5z11Ff; Thu, 23 May 2024 18:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NISXvH050494; Thu, 23 May 2024 18:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NISX2W050491; Thu, 23 May 2024 18:28:33 GMT (envelope-from git) Date: Thu, 23 May 2024 18:28:33 GMT Message-Id: <202405231828.44NISX2W050491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 3d7c8f088796 - main - cp: avoid a resource leak List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 3d7c8f088796ec6ceb1d54005657dee78fd01fbe Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3d7c8f088796ec6ceb1d54005657dee78fd01fbe commit 3d7c8f088796ec6ceb1d54005657dee78fd01fbe Author: Pierre Pronchery <pierre@freebsdfoundation.org> AuthorDate: 2024-05-16 14:19:44 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 18:04:43 +0000 cp: avoid a resource leak In copy_file(), make sure the from_fd file descriptor is closed even when the operation failed early. Reported by: Coverity Scan CID: 1545036 Sponsored by: The FreeBSD Foundation Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1238 --- bin/cp/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index d102fb076139..cfbb2022caaf 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -112,6 +112,8 @@ copy_file(const FTSENT *entp, int dne) if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) < 0 || fstat(from_fd, &sb) != 0) { warn("%s", entp->fts_path); + if (from_fd >= 0) + (void)close(from_fd); return (1); } /* @@ -124,6 +126,7 @@ copy_file(const FTSENT *entp, int dne) */ if ((sb.st_mode & S_IFMT) != (fs->st_mode & S_IFMT)) { warnx("%s: File changed", entp->fts_path); + (void)close(from_fd); return (1); } } From nobody Thu May 23 18:34:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlcJn2vBJz5L30L for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 18:34:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlcJm6phxz4xQs for <dev-commits-src-all@freebsd.org>; Thu, 23 May 2024 18:34:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a59b49162aeso1134747766b.3 for <dev-commits-src-all@freebsd.org>; Thu, 23 May 2024 11:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1716489255; x=1717094055; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+t8x8+ySGDw3i0zY3g4Nzwyq5f4sS4MuNHbQJdiArJI=; b=FonlwAsz/HfcKC3cb1LpWPfIKpCOGiwdryWaYeCA9sOAS50TINEz/0W9hStAdY5QAS HLZyQxYDVGOo+WwPoVqKKwjTccVfgjebPkBu23bGq+hV0bw3O5lsGScB3sAcghh/gafe Ny5lo4L9SSxthA+zOsW731Ep/EEMZg/DSQaRsovjhknNjwUFlVeMUY3iLxJD9SR3nQhy RjOGrCsjVomv2RZdeIqShL/Iaukn51bGUde/tKUZDa4MUYkrwpLhBlEE8WAKw1wbxUIV tteh3BuvK++WVTSRpeoRjG/92aQ29kTgXM7QFjxwnerAGjaOQdRWXgFRCQcKnPjUL8CC fKkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716489255; x=1717094055; h=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=+t8x8+ySGDw3i0zY3g4Nzwyq5f4sS4MuNHbQJdiArJI=; b=Twg6FHSFwWu0sJU5Szhf5GamTypMkzi5rWEDSTD0Qd3X6MoEKP7UImKG9JnQ+RhvCM wTn6/Cpu5NwIFdVMGIoEeeJeDYAdFfcr9dCE4Jp7Zd3O8dvyK7xvCfggKRMaoWluH3x1 IffYJK1Z89JU9H8ZdXORenXNnfgxj2nCFwexu/f1CqCICPqxN8qodlq0mbfo2KR03qa0 iKRFRxw6laxXSqtnxH3tl3aDsK2EqJdBjUtnY/g2+7eWTQbKa4lTd02hVvuY3yDtuJZQ 4Fsf5BPBm2IZq5psKCmnn3DIEojV49OiTT0mQV8IRMHC85VwZ4PfMzJzdy9lEKityH5l ZKjw== X-Forwarded-Encrypted: i=1; AJvYcCWadYwzrFpWf9duoK4XjRkX/K5PyLTTx52jtkQU53EXn5z/2XTI5yvCYJZkNZ5enSKoR3gV/2d6bIxvcniFn/9IHds8gO4+MJ8f8uM4hrDF X-Gm-Message-State: AOJu0Ywo67buIQgYBdSn0rz70iZQSOFMIlUiyirMn4a+VOuySNW87G1y wVWjScd65X524yu+YEDsDg8PUxtsy8IfRoXwsdHrkohm15DekK2TLhUPvtnSu6UMEXXU0KAdhN7 DUHc/WMRlrYaZ1STZ/plPhT1CyyLxViE5DpA2MQ== X-Google-Smtp-Source: AGHT+IGlBOo42yuxzzJaZFL+jNwTZ5foB21z1RxyZ6ClRwmGnddoELhiHl44AQQbrK542RZ+VdWAG6bh8QWSDdowupI= X-Received: by 2002:a17:906:280a:b0:a59:dd90:baeb with SMTP id a640c23a62f3a-a6264f0ef79mr10395366b.48.1716489255356; Thu, 23 May 2024 11:34:15 -0700 (PDT) List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> In-Reply-To: <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> From: Warner Losh <imp@bsdimp.com> Date: Thu, 23 May 2024 12:34:03 -0600 Message-ID: <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. To: Brooks Davis <brooks@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000053a7150619234c86" X-Spamd-Bar: ---- 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:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VlcJm6phxz4xQs --00000000000053a7150619234c86 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 12:24=E2=80=AFPM Brooks Davis <brooks@freebsd.org> = wrote: > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da04= 3d34dd1f5 > > > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > > Author: Warner Losh <imp@FreeBSD.org> > > AuthorDate: 2024-05-23 17:37:01 +0000 > > Commit: Warner Losh <imp@FreeBSD.org> > > CommitDate: 2024-05-23 17:59:40 +0000 > > > > ci: Redirect output for builds. > > > > This target is far too noisy to be at all useful. Save the output a= la > > make universe in _. files. Also report where to find errors. > > If this target is intended to be run in a variety CI system then this > won't work in practice as many have no way to preserve the contents of > the files (jenkins does with sufficient configuration, but then you > have to expose it to the world which is a security problem given its > vulnerability history.) > This is a developer tool to run CI before committing. It's not going to run in Jenkins. If we want that, it will have to be a different target. It's way too verbose otherwise to be a useful developer tool... so verbose as to not be at all useful. Warner --00000000000053a7150619234c86 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 23, 2024 at 12:24=E2=80= =AFPM Brooks Davis <<a href=3D"mailto:brooks@freebsd.org">brooks@freebsd= .org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex">On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote:<br> > The branch main has been updated by imp:<br> > <br> > URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade= 8f69cf954162151da043d34dd1f5" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da043d34dd1f5<= /a><br> > <br> > commit a5f03413aade8f69cf954162151da043d34dd1f5<br> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2024-05-23 17:37:01 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2024-05-23 17:59:40 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0ci: Redirect output for builds.<br> >=C2=A0 =C2=A0 =C2=A0<br> >=C2=A0 =C2=A0 =C2=A0This target is far too noisy to be at all useful. S= ave the output ala<br> >=C2=A0 =C2=A0 =C2=A0make universe in _. files. Also report where to fin= d errors.<br> <br> If this target is intended to be run in a variety CI system then this<br> won't work in practice as many have no way to preserve the contents of<= br> the files (jenkins does with sufficient configuration, but then you<br> have to expose it to the world which is a security problem given its<br> vulnerability history.)<br></blockquote><div><br></div><div>This is a devel= oper tool to run CI before committing. It's not going to run in Jenkins= . If we want that, it will have to be a different target. It's way too = verbose otherwise to be a useful developer tool... so verbose as to not be = at all useful.</div><div><br></div><div>Warner=C2=A0</div></div></div> --00000000000053a7150619234c86-- From nobody Thu May 23 18:37:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlcMw5sGQz5L3Zh for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 18:37:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlcMw4zLHz4xhX; Thu, 23 May 2024 18:37:00 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716489420; 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=gtNxrvXbKIypG0TJ7fuOPZd97+FE61NnxZyISpkQ1Vk=; b=LVyFZwZ6nttqJqUorChEKTxXT3CWg8DOj4+W9/j7+rEwwSumAGPwBSjKSBEcORyZ8Boe+o MZY9ZGP7YUe4qN5CkLTxqJMGw1sk6SmGCn/S2Vlce+xVWM7v8cAJZATErcYFmGAqBJCLYx iwitQgmEKiZWkJJ7G68oP8ST9zNiovMc1MxoJja+4u9qcvkm1SdkFDbPK8N2qWfOyW6e7S OgDC3HxSL09TMD5clfjcpCBEcII5t50IUrvuhcTYiFUAlcnOW9zbqKoj5wy4cJmHY177/7 PhTDbUL0VuJgeCxtQPurORxhbldwivUF3IEMY1vA49YL4x2+d1tmcyqy0Gw7mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716489420; a=rsa-sha256; cv=none; b=BQnnGl0LZeZGkZZIBqRBQaVKT/hbiCmM4UX0slHQChPGkoF7HwGe44QQAXwdvkHAsc3LZq x+OBvOs7LCbJ03Sw2tpHoRVG9YncFVIYKjZy/I0f7Ed3Qxw9CUZokeuoP9VNFzaQ29EZ7H hVhRdINfe5sX8w2ZMyFsVHwD3SFCG2wfATMHGW3g56WWATfZzEUf0osOIswqxyywKWJ5ZE +zzJhAg/LeT5uNSYRFYmszUwt/+uquCiTg2olBKz8IkJXhOIBvtFyv94kMFgnNzjw6fkrg I9Ndp0rvWbD274VT6VID352U8U/h/wruJhETl7QtNGvzvRTytCQEFK4uzgLjcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716489420; 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=gtNxrvXbKIypG0TJ7fuOPZd97+FE61NnxZyISpkQ1Vk=; b=uVJGE8PnjcMOiZlDfhfeLmYh3ZjYVFxJ1DzuBPYEfR441nUiL52uVDH/bWzhfHOvihU/YC vc0L5L2MZvuwBOnkCEiX7l9yJ19rN0HH1VOLifslndnEBaeVhnhnK6YAgPavf5DRf3JkJ+ /5/FSGy/7TGPVXVSO9PXRF++LLZfCzn1l1Pgloa8qA+C7jPhkyE2IYSt25w6L/n8QaaykV i2pM9eVxZrZaY8hWyPcc5SNcci/NSgqRqbZJ21bxFyc0kdpQMdsPGTlr6dVudbMerXxgXt L0fDPZvTl/jn3+eX20LVXaIFW4mJAjD5QYGrHaG6ckM1JvOA2q1ER5EHLLWEbQ== 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)) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlcMw4GrlzKBm; Thu, 23 May 2024 18:37:00 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 434633C019B; Thu, 23 May 2024 18:37:00 +0000 (UTC) Date: Thu, 23 May 2024 18:37:00 +0000 From: Brooks Davis <brooks@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: John Baldwin <jhb@freebsd.org>, Dmitry Salychev <dsl@freebsd.org>, Lexi Winter <lexi@le-fay.org>, Mariusz Zaborski <oshogbo@freebsd.org>, dev-commits-src-all@freebsd.org Subject: Re: generated sources Was: git: 408957613bc0 - main - Regen Message-ID: <Zk-MzCRStIVscpaJ@spindle.one-eyed-alien.net> References: <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> <3edabe3b-4b51-401f-ad64-e36c84fd455b@FreeBSD.org> <Zk-I2IcR80OBu4Tx@cell.glebi.us> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <Zk-I2IcR80OBu4Tx@cell.glebi.us> On Thu, May 23, 2024 at 11:20:08AM -0700, Gleb Smirnoff wrote: > Hi, > > sorry for slightly diverting the discussion, but looks like this thread is the > right place... > > On Wed, May 22, 2024 at 12:55:24PM -0700, John Baldwin wrote: > J> I don't think it's worth reverting at this point. For `make sysent` I would > J> suggest 'sysent: Regen' as a commit log in the future. We typically use > J> 'src.conf.5: Regen' after running `make makeman`. > > On Wed, May 22, 2024 at 05:05:14PM +0000, Brooks Davis wrote: > B> This is more or less standard practice for generated files. These > B> commits are of basically no interest. Historically they had to exist > B> because the source file $FreeBSD$ entries were embedded in the generated > B> files and thus had to be final. That isn't true any more so I often just > B> include them in the origional commit unless I'm doing a lot of minor > B> changes to the source files. > > Is it possible to generate the files during normal kernel build? That would > require lua packages installed, but we already almost require git installed to > work with FreeBSD sources. Absence of lua can be checked in Makefile and a > verbose error message would be printed. Or may be we can use the small lua that > we have in the loader? Sorry if the very last suggestion was stupid - really > don't have any knowledge in the area. TL;DR: No one likes the current state of affairs, but it's complicated to fix or we'd have done it long ago. We'd like to generate these files at build time, but at least sys/sys/syscall.mk is difficult to handle as it's required to build libc so I belive we'd need to arrange to create it before entering lib/libc. The others seem straightforward, but right now we've got a single script to generate everything and we'd want to be selective about generating things so we did it in the right place. I know there's some work in progress to turn sys/tools/makesyscalls.lua into something more library-like, but it's not done. (I've not been helping by adding things to makesyscalls.lua and thus moving the goalposts...) > After the xz/liblzma backdoor all the generated code committed manually makes > me concerned, as it has 0% chance to get reviewed by community. This is a valid, but not very practical concern. We check that these are in sync routinely in github CI and could easily factor those checks out to do in jenkins if we wanted more immediate post-commit feedback. > Just if my suggestion sounds stupid and there is a good reason to have what we > have - an automatic generation followed by a manual commit - then please > explain this reason. Not stupid, just not easy to change. -- Brooks From nobody Thu May 23 18:41:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlcTF1snWz5L43T; Thu, 23 May 2024 18:41:37 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlcTD6znXz4yK3; Thu, 23 May 2024 18:41:36 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716489697; 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=XytRKc8S+NZabV39bsoht2oFbjaMv4rpOv3bM9ba7L4=; b=jvmUHu5ofV7gRrvpAEMK4/P4EKAuQvWdMYbKCh7u9r8vo//pJAFGF9bsfauLb1tFBGAtDN N5PxfBDfGRO5azFQ9GS9qA7kJyVseXOLu4VQ/zwfrD55e+WbijZgPkO2oo2H+8P5v0HzW1 sCckn5lc43j0UiWSG/T1bSCOXZngZ7IGRlbIz7jD5Mb9ArfzHvjMpzR0exrzBZfofGPkLS 6R+Wj9iIxiT5Im31pm5dsIqIvH0gDLYLk+KQ9W7Mn+4f2fVH0ojtc/YIeZXnQmzJPxKeO+ qLGcZnp8dn/ecIPMs1XMOIWPrDM4SaghquIDt2XbPZ/8XIiupWlUrgQhvPZTow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716489697; a=rsa-sha256; cv=none; b=Z/be3ZKXJR50xTh5C9+I/A2s6bWFLLAIIK4VpciLSLiCaTO2OxQztZJnG/W/v9TVj8N/e+ Pdr3XmWa/Kq0DRyeIK0aFHpAx7keudKeXq8ntvvhWXDDWw53mM6OTUMJbJJdT91+HzOnrL NYd15keuthu4Vlbcmqzx1BcP27XejCln/KW7K7GFUasVBm8yPo5ddhzANVhFoTps8WojIE KW9dZgUxMMp+Q75/i59FkEPZ2vx5NtKQQH66j7K8XUdRYrQEkd1xvcE6D6kRB+mpOnH0u9 qlPnEMzcR532mWXxnvVxqGSmgAxgEN4im3jq66e3MldB8rg5PTLgodv4L5gaHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716489697; 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=XytRKc8S+NZabV39bsoht2oFbjaMv4rpOv3bM9ba7L4=; b=R42zZmRXBtZsK66F4DdUjv7VaiGs4DAbnh73JvEpj8VJ94AmCY/zA0bxg0n7JYaMZ10IFt uyNGJyPKen4c9Ibzi/rwpv1zCKe03BzBs9P8nSjVOJxvA03yguHlKQ4ZfJEm4QyQxHjAvy hFJIobvyjFTpZyIYuGyLTl66T29jIz5TQF4GJ6C8STqExDdxEAIMtmYaX/orM41xTk+zBt EYOi4dQl2SEYIgtG/x1iW32vohgZOfTCXx+19TCHzOz77PCVThTgZXGt3JfZhYf4ZmKkAA y3y8xLFXR8NxpMmAcWvqddwsRGGui5bVd6YesRhDyaFU/joNt4F6gqbNU6Tc3w== 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)) (Client did not present a certificate) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VlcTD6VjfzKZX; Thu, 23 May 2024 18:41:36 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id AE7943C019B; Thu, 23 May 2024 18:41:36 +0000 (UTC) Date: Thu, 23 May 2024 18:41:36 +0000 From: Brooks Davis <brooks@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. Message-ID: <Zk-N4BNTQRcTZGOb@spindle.one-eyed-alien.net> References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> On Thu, May 23, 2024 at 12:34:03PM -0600, Warner Losh wrote: > On Thu, May 23, 2024 at 12:24???PM Brooks Davis <brooks@freebsd.org> wrote: > > > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > > > The branch main has been updated by imp: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=a5f03413aade8f69cf954162151da043d34dd1f5 > > > > > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > > > Author: Warner Losh <imp@FreeBSD.org> > > > AuthorDate: 2024-05-23 17:37:01 +0000 > > > Commit: Warner Losh <imp@FreeBSD.org> > > > CommitDate: 2024-05-23 17:59:40 +0000 > > > > > > ci: Redirect output for builds. > > > > > > This target is far too noisy to be at all useful. Save the output ala > > > make universe in _. files. Also report where to find errors. > > > > If this target is intended to be run in a variety CI system then this > > won't work in practice as many have no way to preserve the contents of > > the files (jenkins does with sufficient configuration, but then you > > have to expose it to the world which is a security problem given its > > vulnerability history.) > > > > This is a developer tool to run CI before committing. It's not going to run > in Jenkins. If we want that, it will have to be a different target. It's > way too verbose otherwise to be a useful developer tool... so verbose as to > not be at all useful. I think we have different take on the goal of the project that created this target. My read was that it would move the core CI functionality into the tree so developers could run exactly the same things jenkins does and thus debug issues more easily. For reference: https://freebsdfoundation.org/project/continuous-integration-enhancements/ -- Brooks From nobody Thu May 23 19:10:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vld7p0RDwz5L6dK; Thu, 23 May 2024 19:11:34 +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 4Vld7n5D7bz51MF; Thu, 23 May 2024 19:11:33 +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 44NHYKsQ001556; Thu, 23 May 2024 12:11: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=4xGfFCY0vnzxq Z4y+ngGtVGz3VTSO6LEnFe8yDYR3iQ=; b=az9/1oax+PdD0odkjJs0R6eenibOE P7AAujvaMdRASiLOYVBQV7KfuxmOhdLXgKjhZB3/UEcKXXwb8NCebvVd2RAP01Mk v1oSyXyjvTSjEy2lgXrP2sOws7hQQt7qB22XmJqiKOVeOmLf2dT3xWyirjmQ4xob 2IQWnikHKcGacBjwR0aV6oPhQHKNTVWK5SXexsWT2ztFXAxv5elbxBh/bFWzj5SH cL81ULkKJ+f3wK+TVTUzdKyYm0KttaSYyQFkwAQgxV5whHUhiymYaXpI+dx8iA4l oXLU7DON3Rrmgss0zz7GtW+SCipMDjuidhGR8yS9y22aXthfxd2XIgk1A== Received: from sa9pr02cu001.outbound.protection.outlook.com (mail-southcentralusazlp17011010.outbound.protection.outlook.com [40.93.14.10]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 3yaaad06dh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 12:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CiwQToieVb2UHMaBfq6EAN/IMbOAoi+MPO0inr1JL5G9cMzDQYnEpOWxoQ+T0A08E0145RfAZbtBmX+L0cxfMDlayFrtTl1NzTi3VH6S/VB8iElRurSTKm2QmsMlqL0EI1BboXC5+U2E9lB8nCzhJEqxoUbW0Jrsy8oY6feQulXszZ0Ll2guw189v2FjGziD/Lc8yLtDHHBlwzeMVXg4xz8tvsALmuwhJJKE+qAYb/ap0Q1JZc5EDoam6D4/v/tee349g5jt/JzYPvZitPzvWpI/hOoNayGnXXD/vluWfufKenWga4V2RTjhTJCkkEkHzm+6nMbyNhLyN4SiWM/xVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=4xGfFCY0vnzxqZ4y+ngGtVGz3VTSO6LEnFe8yDYR3iQ=; b=J91ClL59aV883f8AchotXT97i6SWbDL+zx3Tus6QVapNqoi9KgqzAf6XjGnvSYYEj3KO3z1vNBYM2VdehWMDZCg8klJfNkNncKwTYC/g8WPGGgtzSDLD3G0qWpFBiqTMqisw27YRhDYAE0Ydewuf4nj9NXCLRNwbdTQZxur928B6c/g4W0gD8wTUJSvq9YcwhLr0H/UBmhhcMn6dRywE392bm2vGV4Z267C8xaPAnQD7K67kfsIJdEuouQELssdBQlsvd3wk+//LctlxiukYcdHePap6FtAC1/JxWvGQrAzSOIQ7OJxPCK4rGFz6IPksCVicgm82rWmCBp9Y3Yk5dw== 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=4xGfFCY0vnzxqZ4y+ngGtVGz3VTSO6LEnFe8yDYR3iQ=; b=HL4dLYiycNeCuJWRjVQPG3z+msq69cDXO2VMTg0dfDvto0IFz1CP5nAoHpqrLv50LSvFiiP+CMZZOpaxx6bRPHWj8L+XyX1gB8l+ewuB2sGu8m+XedYtRB8WtIXFWY7ndTFUNiXCc9J5dQZhkzn+ncucLTkIQz35QCWMK6fCSro= Received: from CH0PR04CA0084.namprd04.prod.outlook.com (2603:10b6:610:74::29) by SJ0PR05MB7625.namprd05.prod.outlook.com (2603:10b6:a03:2ab::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.9; Thu, 23 May 2024 19:11:29 +0000 Received: from CH2PEPF0000013D.namprd02.prod.outlook.com (2603:10b6:610:74:cafe::3) by CH0PR04CA0084.outlook.office365.com (2603:10b6:610:74::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.22 via Frontend Transport; Thu, 23 May 2024 19:11:29 +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 CH2PEPF0000013D.mail.protection.outlook.com (10.167.244.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.14 via Frontend Transport; Thu, 23 May 2024 19:11:29 +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.4; Thu, 23 May 2024 14:11:28 -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.4 via Frontend Transport; Thu, 23 May 2024 14:11:28 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 44NJBSPR000352; Thu, 23 May 2024 12:11:28 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id EAFB635DCA; Thu, 23 May 2024 12:10:24 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id E94F335EB6; Thu, 23 May 2024 12:10:24 -0700 (PDT) To: Warner Losh <imp@bsdimp.com> CC: Brooks Davis <brooks@freebsd.org>, Warner Losh <imp@freebsd.org>, <src-committers@freebsd.org>, <dev-commits-src-all@freebsd.org>, <dev-commits-src-main@freebsd.org>, <sjg@juniper.net> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. In-Reply-To: <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> Comments: In-reply-to: Warner Losh <imp@bsdimp.com> message dated "Thu, 23 May 2024 12:34:03 -0600." From: "Simon J. Gerraty" <sjg@juniper.net> X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 29.3 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <89103.1716491424.1@kaos.jnpr.net> Date: Thu, 23 May 2024 12:10:24 -0700 Message-ID: <90929.1716491424@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000013D:EE_|SJ0PR05MB7625:EE_ X-MS-Office365-Filtering-Correlation-Id: aac04713-e57d-40a3-2fc3-08dc7b5c268c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400017|36860700004|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?C5VUcl+j9G/r2b6PhyyroVqO+v2h/H2gppvqAWqEazrmkfKCeWIXz1oUg536?= =?us-ascii?Q?s80wkSkfzMPU6U+MTYXeY3A0/x8XV1MRRh8SDBeNUEl9XBm9cvlsnGqp7LoN?= =?us-ascii?Q?PUx5REvgJLFETdG40iW1gmwciOaKOMRTp2ShPKxIbIKWjpyN0rv3COP64CPy?= =?us-ascii?Q?CqMpz4CpIEHvZm2YGvuCPzUOy/IgLF4/YpSkS49s0I95RGTOcV1u1bolcv36?= =?us-ascii?Q?XvMGm13CdAzVcqEclf8ohl/QNJakugLwU5lG8uXGBSZty1ZRFgakRWLCAeAC?= =?us-ascii?Q?kncolAXxsKDB8FtoOwMKRuaouQn7+0LCTBc30c634L04n1qkd8VQPJWDTRVX?= =?us-ascii?Q?63kFSq5bMEo71Y6owzjrr0mhpDeTekYJxYFMf8eqlrpqSWv1X2VBdt1FEYjb?= =?us-ascii?Q?ZeDPuSrLlbbOL+qa74clKtnq5c0hGFs+p9kzXLY8rDQBGpki0//tRte+quIZ?= =?us-ascii?Q?Uykwvd6PScYYxkjAacNZI2M7nXaoSHi+EBJ/lB0ok3LmA1AKhsbNtHyQ6ABG?= =?us-ascii?Q?b6TsJHY5lvwCWp60JQi87dmsVu4S5zKKCzupBzenMvX4C4AjNBrvqLdf7LY2?= =?us-ascii?Q?LYpqOFxH1CAXAk6biWj+j+uuxWSzHHqw+7OmM8KwLok0m4S01T4Uiu3yNoir?= =?us-ascii?Q?zk26WTO5XWlOr/nlrXOuqad9LOgSyfQZmk/NhFZUcZqx7RIbrXhIm6QydcPC?= =?us-ascii?Q?vanlShInDRS+tc821SX+OTlj4nVZrXzJjSXxLZ/JYkzv25u+K0NVpVxUDJUj?= =?us-ascii?Q?8D2Wd5ALzQadL2WH+IqyDAma7pEtpi70r+f6arjYyL7PaE0K3Yfv94jCw1tH?= =?us-ascii?Q?10cgvqmkmOkyFFiQB4nS41kwxennhdDYWGVGKzQyJoldu4jNcYSJqVWKjD4U?= =?us-ascii?Q?BVpdAzoxlMMRIglA2q2NzfPerGgk2YjTvikZ5Y3uFHLI42XTGDGrgGT/7PXu?= =?us-ascii?Q?RGaAFluqhrxM1AXZQxylxhL9kpJsw3dh0UlQK1bwXzHbHNb3YsWJottHNrvw?= =?us-ascii?Q?JTosOElS0nfbRD5wVUNO3af/ZBZ3Yj8TLtGBG9lyP/YWvQqnsmUXml5rORAx?= =?us-ascii?Q?8R/JPrBf15BKkCuWAB5rvuAqBwdBUpUWqXREWnc9f7mZH3eUy8YYTS458MxA?= =?us-ascii?Q?MKEJ+lEppg1iA8n01seG4aaH0aJSeW3XfKhmBYcvZhs79WX8DRsAFkf3WtZs?= =?us-ascii?Q?R0F8uq8VKkdHKnuXm+kNGgzyzZlnCZRu8GBZArGPThF03/b5y5rtJrUEn12c?= =?us-ascii?Q?jqHA5gDAtfYlVVFSpoWtXR6d9RiicIlsFb+gpTRG9mtg/qDVzjMyRE8ASVgI?= =?us-ascii?Q?OcHLPnxnMEpf+ymuXxlrIqm+mBkaYHnF5LbAhqTIG2NAABC4CcSRBnGy57+J?= =?us-ascii?Q?8WGqPr3cMN+9LOxEkFqbPaX97r9Y?= 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:(13230031)(82310400017)(36860700004)(376005)(1800799015);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2024 19:11:29.2603 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aac04713-e57d-40a3-2fc3-08dc7b5c268c 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: CH2PEPF0000013D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR05MB7625 X-Proofpoint-GUID: YYSVqHobDvCmZ4-DkqOajdyovLjGklrs X-Proofpoint-ORIG-GUID: YYSVqHobDvCmZ4-DkqOajdyovLjGklrs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-23_11,2024-05-23_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 mlxscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=578 malwarescore=0 priorityscore=1501 clxscore=1011 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405230132 X-Spamd-Bar: ---- 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-Rspamd-Queue-Id: 4Vld7n5D7bz51MF Warner Losh <imp@bsdimp.com> wrote: > > ci: Redirect output for builds. > > > > This target is far too noisy to be at all useful. Save the output ala > > make universe in _. files. Also report where to find errors. Could this issue be addressed by simply using -jobs ? eg. make ci-buildworld-jobs runs ci-buildworld with suitable -j arg and redirects output to ../ci-buildworld.log by default. From nobody Thu May 23 19:12:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vld8j1cwnz5L6mF; Thu, 23 May 2024 19: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vld8j18JZz51bh; Thu, 23 May 2024 19: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=1716491541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDdiGNL7ywUi7FpbVcdoRZepmfFdgC0OoZvH/tzhjDA=; b=flLxUt1tFyULixClKeeesR0J38EYndJ9lzdYqe9zteHu0Lnvn6/zfj2WBkxRrJXcsUg1yC M3ZCQlM1YFtPoLRX7XuZpkl+xUkBDqD+HZ5sHFyHGMlqblzJRTZBRB/x16rhgnlOs5SPGo ZiRI2TtGZKLL0M2Cc0mbcl2yWC7OzZ4OCj/3/U+6WumvNmMxDZNWCAt51HHhrcZzBYqCBJ zBoJ/MfeLais7i6LwTqBQ5y54bGrke/NgZWasDYRcVT3UInzroJvRHDQ5XIL5G0a5e/IPj lxs+dASPaIBwdUpsuTQ+7ZDi98go695VLEshryD6WeoyIqMcB1VPzH39nWMSzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716491541; a=rsa-sha256; cv=none; b=sLEKgToVpMuSsIFOkFd9GTDYyeWVu3jR7FuA2cRCGbDeELgjxd74bJ6AHfFBL3UG91q5cb PBsiYUuPiCOvkQSUVTw344tkU4QOyyAiAJb4K67tAHWRXHwQfqZ+i02ZHoayZ7KGAICWjm jjHAJ0/mL44c9MSYzV+VopCtOnRR1NJIyCtRyUXeniNNXcrUSkkE3DChd0bkY5M1iMWgX4 FDWhOcqEK/E+sE0Qqao2ItfNNxReTOO3hK4gEdI77FvZdmGPphtTGG2CXwz2WA1XFqWIDO i0qQY+m2wOPa4m+IBvwfEDaTemtACCvlLbolOXlGQ2yN0WxKqgKYmMZ25IMIJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716491541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDdiGNL7ywUi7FpbVcdoRZepmfFdgC0OoZvH/tzhjDA=; b=Zy4eeXBxrsz4uhora+puoRtsjlbvlOKUPxz9yiMftN8XGlDocAKOYRc5eoIXVdVLvQKAeq VZlTvjex7ciOLQvESIbn+HUflbHmzaSjG2/Bdj2ocyf/DqEn7DnHOdm2HK/Zb5AA6z3woO pIX+tm96Q8Oby/jzNnS2VmfA1Wrz/3YdftwUau0na3vD1eqadeko5iRSgaU9D5OGeVCy07 tZGrEQD6Dx+Ya4SuwJFJ6SeYRXrLUurT4oas8eOL0/SvoyG0ko+/Fk/9rpnITqlCRRtWQC c946fxMKjRghv9yYOilSrihnQPTgO0eIzlMw5krhiSpO+ADNEyJAmlCE4jeC8Q== 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 4Vld8j0m7zz12JJ; Thu, 23 May 2024 19:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJCL2u032050; Thu, 23 May 2024 19:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJCLja032047; Thu, 23 May 2024 19:12:21 GMT (envelope-from git) Date: Thu, 23 May 2024 19:12:21 GMT Message-Id: <202405231912.44NJCLja032047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff <glebius@FreeBSD.org> Subject: git: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0d37895849150e1646485068d12c3a8ff26809f9 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0d37895849150e1646485068d12c3a8ff26809f9 commit 0d37895849150e1646485068d12c3a8ff26809f9 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2024-05-23 19:11:54 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2024-05-23 19:11:54 +0000 ctl: use socket buffer mutexes in struct socket directly A mechanical change performed with sed(1) script: s/SOCKBUF_LOCK\(&so->so_rcv\)/SOCK_RECVBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_rcv\)/SOCK_RECVBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_rcv\)/SOCK_RECVBUF_MTX(so)/ s/SOCKBUF_LOCK\(&so->so_snd\)/SOCK_SENDBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_snd\)/SOCK_SENDBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_snd\)/SOCK_SENDBUF_MTX(so)/ Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D45190 --- sys/cam/ctl/ctl_ha.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c index 695006ed99e1..e94708028ee4 100644 --- a/sys/cam/ctl/ctl_ha.c +++ b/sys/cam/ctl/ctl_ha.c @@ -164,17 +164,17 @@ ctl_ha_close(struct ha_softc *softc) report = 1; } if (so) { - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); soupcall_clear(so, SO_RCV); while (softc->ha_receiving) { wakeup(&softc->ha_receiving); - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "ha_rx exit", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); soupcall_clear(so, SO_SND); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); softc->ha_so = NULL; if (softc->ha_connect) pause("reconnect", hz / 2); @@ -218,7 +218,7 @@ ctl_ha_rx_thread(void *arg) next = wire_hdr.length; else next = sizeof(wire_hdr); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); while (sbavail(&so->so_rcv) < next || softc->ha_disconnect) { if (softc->ha_connected == 0 || softc->ha_disconnect || so->so_error || @@ -226,10 +226,10 @@ ctl_ha_rx_thread(void *arg) goto errout; } so->so_rcv.sb_lowat = next; - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "-", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); if (wire_hdr.length == 0) { iov.iov_base = &wire_hdr; @@ -246,7 +246,7 @@ ctl_ha_rx_thread(void *arg) if (error != 0) { printf("%s: header receive error %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); goto errout; } } else { @@ -259,7 +259,7 @@ ctl_ha_rx_thread(void *arg) errout: softc->ha_receiving = 0; wakeup(&softc->ha_receiving); - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); ctl_ha_conn_wake(softc); kthread_exit(); } @@ -280,13 +280,13 @@ ctl_ha_send(struct ha_softc *softc) break; } } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); if (sbspace(&so->so_snd) < softc->ha_sending->m_pkthdr.len) { so->so_snd.sb_lowat = softc->ha_sending->m_pkthdr.len; - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); break; } - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error = sosend(softc->ha_so, NULL, NULL, softc->ha_sending, NULL, MSG_DONTWAIT, curthread); softc->ha_sending = NULL; @@ -309,14 +309,14 @@ ctl_ha_sock_setup(struct ha_softc *softc) if (error) printf("%s: soreserve failed %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); so->so_rcv.sb_lowat = sizeof(struct ha_msg_wire); soupcall_set(so, SO_RCV, ctl_ha_rupcall, softc); - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); so->so_snd.sb_lowat = sizeof(struct ha_msg_wire); soupcall_set(so, SO_SND, ctl_ha_supcall, softc); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); bzero(&opt, sizeof(struct sockopt)); opt.sopt_dir = SOPT_SET; From nobody Thu May 23 19:21:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldMD6rFbz5L7nK; Thu, 23 May 2024 19:21:28 +0000 (UTC) (envelope-from rpokala@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VldMD6Kwhz539f; Thu, 23 May 2024 19:21:28 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716492088; h=from:from:reply-to:subject: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=+qH60lC2f4arBa8mhwnm8nENDQYpQ9nxCIjUfgPZFNU=; b=fW/YHWKOLl/enCX/TofV7lOZvr1MN3/ffXTRVyvHIl94zA6YN//WbQw2Sej1tjiTodnI7I MF/pHoBn2mvp5OIPeCISQ636muuG+oSrg+2CsvUfHJMOgrKRUxbndlthBbftv7XwCE8ngy 3I98xipP4ZmBVeBZ2a8JXmuRjnoyVFt07qTEfdG++l9MMbccWuvhko1gz8JtWzuTFze7+T WLy5iBR61gvJfbBYEpoyHdBPUjUrew5To2qwJUIvsBO/7EnLsRoDmXH5pd1OBxVu1atkFK UxmnGlANTf+hyyJIg0cl+Hs9vRos8MOGYURenawN48qJvwDDEFdysYJchpc9eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716492088; a=rsa-sha256; cv=none; b=WL/a8ZfUO/b3YIkvzYWpplBi12qrpfno8bTddXblM+NkyFWl0XKIo27m5cZMH1KS8U+lfM raisN9y/1ly3pubNkYW1pMgsrxaHYT5wrJHIFw9o4vOQKDJwwgAIQWaFjcOfqWCA6SPko8 I8TxdXI8R1IFmQeUU86SNmOLGNgBfDlr0Rxl5D4wXbisCjEW3cgwAv/Vig5V71jeC+iDN6 aOD5SFtgYzdvHDOJ8NU6fvTE2qg8jp5r3r4CALxADMp2rHcNkhzoaWXrOO+IdiyfiLn9dk 6jZ/ptWmiNazOgH83oJIJ3ZmExHrnZrKUHfroR5Sha5kB2qIQvqEkJxO+sEFKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716492088; h=from:from:reply-to:subject: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=+qH60lC2f4arBa8mhwnm8nENDQYpQ9nxCIjUfgPZFNU=; b=df2+ppntazdz/z5JWZ4a6cMdcu39gV+LZA0j10Vna5yt02/aFPXLJEgM2jMKvJXMaqyprF ReY1dX4tcj7Q+hzl6e29WsV95NJPC6O88r+Rm9ogMJo2goVebSiQiHepJueJ7O0eqlPxV8 p7xOEuXkTigwdO/GLBHjVdmqcmZUh/c2/bq/m7Ei8Q46KFO1w2rWsC/zzNYHmLUx1zUeIu DmZ+3wGVZYLA6b4Kr6/EcrBt3l4My2mWCTmQN93JjqQHGlikDXdJnIvBYfu1gubWZ4YaVZ WcjiqqfUcOcJNa18sAfVxAn56JSNIPFhoIE2WStBRjgMCmVYwpuUaF0b3h577g== 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 4VldMD2FR9zLRM; Thu, 23 May 2024 19:21:28 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.85.24051916 Date: Thu, 23 May 2024 12:21:23 -0700 Subject: Re: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly From: Ravi Pokala <rpokala@freebsd.org> To: Gleb Smirnoff <glebius@FreeBSD.org>, <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org> Message-ID: <1B513920-69CF-434E-B5A1-45960CB99246@panasas.com> Thread-Topic: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly Thread-Index: AQHarUYcTs2miEsRM02SSnaBkVpxjg== References: <202405231912.44NJCLja032047@gitrepo.freebsd.org> In-Reply-To: <202405231912.44NJCLja032047@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable Hi Gleb, Isn't this the exact opposite of the summary? This change *doesn't* use the= mutexes directly, it uses the wrappers to *avoid* using the mutexes directl= y. Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: <owner-src-committers@freebsd.org <mailto:owner-src-committers@freebs= d.org>> on behalf of Gleb Smirnoff <glebius@FreeBSD.org <mailto:glebius@Free= BSD.org>> Date: Thursday, May 23, 2024 at 12:12 To: <src-committers@FreeBSD.org <mailto:src-committers@FreeBSD.org>>, <dev-= commits-src-all@FreeBSD.org <mailto:dev-commits-src-all@FreeBSD.org>>, <dev-= commits-src-main@FreeBSD.org <mailto:dev-commits-src-main@FreeBSD.org>> Subject: git: 0d3789584915 - main - ctl: use socket buffer mutexes in struc= t socket directly The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3D0d37895849150e1646485068d12c3a= 8ff26809f9 <https://cgit.FreeBSD.org/src/commit/?id=3D0d37895849150e1646485068= d12c3a8ff26809f9> commit 0d37895849150e1646485068d12c3a8ff26809f9 Author: Gleb Smirnoff <glebius@FreeBSD.org <mailto:glebius@FreeBSD.org>> AuthorDate: 2024-05-23 19:11:54 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org <mailto:glebius@FreeBSD.org>> CommitDate: 2024-05-23 19:11:54 +0000 ctl: use socket buffer mutexes in struct socket directly A mechanical change performed with sed(1) script: s/SOCKBUF_LOCK\(&so->so_rcv\)/SOCK_RECVBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_rcv\)/SOCK_RECVBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_rcv\)/SOCK_RECVBUF_MTX(so)/ s/SOCKBUF_LOCK\(&so->so_snd\)/SOCK_SENDBUF_LOCK(so)/ s/SOCKBUF_UNLOCK\(&so->so_snd\)/SOCK_SENDBUF_UNLOCK(so)/ s/SOCKBUF_MTX\(&so->so_snd\)/SOCK_SENDBUF_MTX(so)/ Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D45190 <https://reviews.= freebsd.org/D45190> --- sys/cam/ctl/ctl_ha.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/cam/ctl/ctl_ha.c b/sys/cam/ctl/ctl_ha.c index 695006ed99e1..e94708028ee4 100644 --- a/sys/cam/ctl/ctl_ha.c +++ b/sys/cam/ctl/ctl_ha.c @@ -164,17 +164,17 @@ ctl_ha_close(struct ha_softc *softc) report =3D 1; } if (so) { - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); soupcall_clear(so, SO_RCV); while (softc->ha_receiving) { wakeup(&softc->ha_receiving); - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "ha_rx exit", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); soupcall_clear(so, SO_SND); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); softc->ha_so =3D NULL; if (softc->ha_connect) pause("reconnect", hz / 2); @@ -218,7 +218,7 @@ ctl_ha_rx_thread(void *arg) next =3D wire_hdr.length; else next =3D sizeof(wire_hdr); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); while (sbavail(&so->so_rcv) < next || softc->ha_disconnect) { if (softc->ha_connected =3D=3D 0 || softc->ha_disconnect || so->so_error || @@ -226,10 +226,10 @@ ctl_ha_rx_thread(void *arg) goto errout; } so->so_rcv.sb_lowat =3D next; - msleep(&softc->ha_receiving, SOCKBUF_MTX(&so->so_rcv), + msleep(&softc->ha_receiving, SOCK_RECVBUF_MTX(so), 0, "-", 0); } - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); if (wire_hdr.length =3D=3D 0) { iov.iov_base =3D &wire_hdr; @@ -246,7 +246,7 @@ ctl_ha_rx_thread(void *arg) if (error !=3D 0) { printf("%s: header receive error %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); goto errout; } } else { @@ -259,7 +259,7 @@ ctl_ha_rx_thread(void *arg) errout: softc->ha_receiving =3D 0; wakeup(&softc->ha_receiving); - SOCKBUF_UNLOCK(&so->so_rcv); + SOCK_RECVBUF_UNLOCK(so); ctl_ha_conn_wake(softc); kthread_exit(); } @@ -280,13 +280,13 @@ ctl_ha_send(struct ha_softc *softc) break; } } - SOCKBUF_LOCK(&so->so_snd); + SOCK_SENDBUF_LOCK(so); if (sbspace(&so->so_snd) < softc->ha_sending->m_pkthdr.len) { so->so_snd.sb_lowat =3D softc->ha_sending->m_pkthdr.len; - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); break; } - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); error =3D sosend(softc->ha_so, NULL, NULL, softc->ha_sending, NULL, MSG_DONTWAIT, curthread); softc->ha_sending =3D NULL; @@ -309,14 +309,14 @@ ctl_ha_sock_setup(struct ha_softc *softc) if (error) printf("%s: soreserve failed %d\n", __func__, error); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); so->so_rcv.sb_lowat =3D sizeof(struct ha_msg_wire); soupcall_set(so, SO_RCV, ctl_ha_rupcall, softc); - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); so->so_snd.sb_lowat =3D sizeof(struct ha_msg_wire); soupcall_set(so, SO_SND, ctl_ha_supcall, softc); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); bzero(&opt, sizeof(struct sockopt)); opt.sopt_dir =3D SOPT_SET; From nobody Thu May 23 19:42:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq26GKzz5L9TG; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq25pSFz559R; Thu, 23 May 2024 19:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jHZI9kAKdQAOHZNS5r26GziD5Jqv1PUdGHgA0OorRZc=; b=bV0JTTPM2wBigdK61iuyEhjnmd2zNexIXXiVqXmYgxIrH2dwHQiStAPokTNmP6ob18GjEA D7p0lCB5ai/7P8wMbHRZTi3uruSACb5rfYA3zQCYGGeQfp5BLyiP/DMBq1fUKxU85md4mO pmLUFoSW2so5HebOPnYmKXOJZs72Wa3gwhw690x44eFCfN+L49vYBp24iti0p90IMINXaE ZmMGIkpTDNEHaCDnz6GD5WsPKdjecI/w148adMv0hg8mfjowRjklWKxHVVBPrJw+hURAJv sSdYa74fOqIAyce49Z9QRZQB0rKWNaCEUyexseLVVg0EkGAyGhxMaV2easL2Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493326; a=rsa-sha256; cv=none; b=DpsZaadBt45Llep+8Lg4vo5kExtePaTPupE5dyAEHbCmNkQ5vCOmAwm0RvwDJXNg2f/SeG B1ihD0SM3NJ5vX/R4zUEdxLGlkhYES8O4tuqHxx3PxUg6HWmvDZC0FZom+VkPqQex7cYNp zZbhhtHLt8HFvE5/Xd4p/A0KhR6N5/fUR6it8kS2Mjav80e5sJ1yuFOwRBRxUleZHYn4G3 yjxiZgCTg376xdPm7fOUXW3EcTJ/kMbHSxAJvi6766pbi2RQ1WFBg5uK2uLvxgDeQr5WDS e/yaoj745u1xMdUuf5fLt5nhs/252nz4Ijwlr+MS/Re1w6W+mGUuP87E+NG+YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jHZI9kAKdQAOHZNS5r26GziD5Jqv1PUdGHgA0OorRZc=; b=Y7qhDsxODkmED5/iclHGmRKjzXvCf9xzUMqvQvxPxb0Onydlaiu581n//MQZUOcI3KAfhH 0zlbLCiM4OQ0QE/R/DwxEre1ZlpWfhCt7YsgkmQZsoQztphK55u4H+RNR0mRUxSVjrYZBa dM9bwSjWHdRPQCFIz/F0GmP1VZ9VqESnaSBjwlZpDi1fLJXHzoYImUaIoHq+uXHX86E7NJ iaB6/5DZcObfpC8yd0QHPrbp7yVd+4MYhmMfj2D3JxEtBsVSfH7Hc/sLjZ4vBr3A3rEagK 1huaDGpaOIyUKk+1q4Yec8+sUxBj88YNrh4zJIpFf9EgGJ6brl3veT+H04BnJQ== 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 4Vldq25Nsbz1315; Thu, 23 May 2024 19:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJg6Xj082446; Thu, 23 May 2024 19:42:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJg6SA082443; Thu, 23 May 2024 19:42:06 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:06 GMT Message-Id: <202405231942.44NJg6SA082443@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: acb7a4deb21a - main - mqueue: Add sysctl for default_maxmsg & default_msgsize and fix descriptions List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: acb7a4deb21a4cdfbb9bbf703b42a377450b9fdd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=acb7a4deb21a4cdfbb9bbf703b42a377450b9fdd commit acb7a4deb21a4cdfbb9bbf703b42a377450b9fdd Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-12 10:30:46 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:45 +0000 mqueue: Add sysctl for default_maxmsg & default_msgsize and fix descriptions Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/kern/uipc_mqueue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 7779d8877337..2efdfc9dd04c 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -200,14 +200,18 @@ static SYSCTL_NODE(_kern, OID_AUTO, mqueue, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "POSIX real time message queue"); static int default_maxmsg = 10; +SYSCTL_INT(_kern_mqueue, OID_AUTO, default_maxmsg, CTLFLAG_RD, + &default_maxmsg, 0, "Default maximum messages in queue"); static int default_msgsize = 1024; +SYSCTL_INT(_kern_mqueue, OID_AUTO, default_msgsize, CTLFLAG_RD, + &default_msgsize, 0, "Default maximum message size"); static int maxmsg = 100; SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmsg, CTLFLAG_RW, - &maxmsg, 0, "Default maximum messages in queue"); + &maxmsg, 0, "maximum messages in queue"); static int maxmsgsize = 16384; SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmsgsize, CTLFLAG_RW, - &maxmsgsize, 0, "Default maximum message size"); + &maxmsgsize, 0, "maximum message size"); static int maxmq = 100; SYSCTL_INT(_kern_mqueue, OID_AUTO, maxmq, CTLFLAG_RW, &maxmq, 0, "maximum message queues"); From nobody Thu May 23 19:42:07 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq409tnz5L9Qr; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq36G76z552F; Thu, 23 May 2024 19:42:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wuCsOTIwVTzuUjnpjcnYctPWW72CpV68+9vn1s0RKZo=; b=EEU2Q4w6ohlDYLooYYxb5Up+Juxooxp/Rh8GM1H2jEqaij4OSiOidGgDSgDLC5GkQukve8 2dZUTVJLfM2/BFpxrfONPlHBPONsnsdSSeHxb4pmBzKTrvt/KnD5YXV0qlRlgs73nUyM7q 90hnKr8IEMiiTRlSJ/y2ggdvLRpt4tZdu1VQfWnxKVpDdZJiCNv9SNdxGz7h3u8L8vpioX KfPv9RwPh/3hFogjhifX6+rjx0e9HlfwElx6D2LOkbV+QQI0eeYHHMJum998/6hljL8fRP ZDhCQnG983cbd9GtG9QYFjsvuLvbbiLu9NJjyD95l2ole1NjTe95pufMr25G3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493327; a=rsa-sha256; cv=none; b=x+jFw/H8gEYc7JYJw2/WsJpUEjRvzOrOxMrBcUB7ZGrg6BzwDuvS89JB8eDazrUJ95gieZ asplXP/OKyAapQ7Z1E5noQ/Kuiz5o7d9Wr565fpY616mAGMABBLCrPO3wMzlB0i57pdBai wIDxItcXAPPbQ5LGgsd+X9G3JN9J/UsDI7Pe08ZrZDsRsxMxBuMOCK0OaxXuGAjNZ+ldGS uyDzQdMLxA3G1Kzcm5KJZkBVXg0s4b5d88Yn1//PrqlUAV8Q2qm2mTpuVen/IaOd5IjXa0 JIxwE0+4cPeitI+VjMkfoQZh6yiQl1E+rt1QJowhIh76d27c2GEz1nozhWhnYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wuCsOTIwVTzuUjnpjcnYctPWW72CpV68+9vn1s0RKZo=; b=csxXi6WWuQRoIdji3w34FL4FNatabR+e5Z5Z4PTyWpTO+L10Cb5P8mmQqssNgHHdKIiz9O FPoi6CLJU380kaQaVtSdJuFScNZHWo0+eV181yYvZoufBXMvrltmcZsyH+cr871qzkHEjA jepCfiFlq+e+A+pOs+srcUicRTKgyQbN9g+lu7WgB0gnUSsQVbsOB7LZK580G+kNm6txVT xHbX40QLfNwiX9TKkPOTP1Cobqv7XbtTth2Wb6+hIDrPg0iu8gfh08SO/CkBaFivqCG2X1 PvzJ3AArON9oRthQducECalSjVvIm8drYTgavzHoY02WPZldegS1NJWiIoIFyg== 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 4Vldq35syRz1317; Thu, 23 May 2024 19:42:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJg7Kk082496; Thu, 23 May 2024 19:42:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJg7re082493; Thu, 23 May 2024 19:42:07 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:07 GMT Message-Id: <202405231942.44NJg7re082493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 04d3f8e5396e - main - linprocfs: Add support for proc/sys/fs/mqueue/* List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 04d3f8e5396edbef0e1d97e9866813163b0c6381 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=04d3f8e5396edbef0e1d97e9866813163b0c6381 commit 04d3f8e5396edbef0e1d97e9866813163b0c6381 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-12 09:49:36 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:45 +0000 linprocfs: Add support for proc/sys/fs/mqueue/* Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/compat/linprocfs/linprocfs.c | 107 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 617eb122291c..c5b6ec9b32c1 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -2220,6 +2220,97 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/sys/fs/mqueue/msg_default + */ +static int +linprocfs_domqueue_msg_default(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.default_maxmsg", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + +/* + * Filler function for proc/sys/fs/mqueue/msgsize_default + */ +static int +linprocfs_domqueue_msgsize_default(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.default_msgsize", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); + +} + +/* + * Filler function for proc/sys/fs/mqueue/msg_max + */ +static int +linprocfs_domqueue_msg_max(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmsg", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + +/* + * Filler function for proc/sys/fs/mqueue/msgsize_max + */ +static int +linprocfs_domqueue_msgsize_max(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmsgsize", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + +/* + * Filler function for proc/sys/fs/mqueue/queues_max + */ +static int +linprocfs_domqueue_queues_max(PFS_FILL_ARGS) +{ + int res, error; + size_t size = sizeof(res); + + error = kernel_sysctlbyname(curthread, "kern.mqueue.maxmq", + &res, &size, NULL, 0, 0, 0); + if (error != 0) + return (error); + + sbuf_printf(sb, "%d\n", res); + return (0); +} + /* * Constructor */ @@ -2378,6 +2469,22 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(dir, "shm", &linprocfs_dosysvipc_shm, NULL, NULL, NULL, PFS_RD); + /* /proc/sys/fs/... */ + dir = pfs_create_dir(sys, "fs", NULL, NULL, NULL, 0); + + /* /proc/sys/fs/mqueue/... */ + dir = pfs_create_dir(dir, "mqueue", NULL, NULL, NULL, 0); + pfs_create_file(dir, "msg_default", &linprocfs_domqueue_msg_default, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msgsize_default", &linprocfs_domqueue_msgsize_default, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msg_max", &linprocfs_domqueue_msg_max, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "msgsize_max", &linprocfs_domqueue_msgsize_max, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "queues_max", &linprocfs_domqueue_queues_max, + NULL, NULL, NULL, PFS_RD); + return (0); } From nobody Thu May 23 19:42:08 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq514Glz5L9tK; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq508fMz557H; Thu, 23 May 2024 19:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/sUBjn32/aqHZCVyXzL8t/wKJUfUaAO2mVXqLoMKov8=; b=JnaQMwBW2WdAIPzok+ubdtk5Vky5ds34McM0EkDJ9Zh2tWNsHU2WgqL5X5fb9sLne6+1lN GafulQq+cCtDO/bSaZfGh8rhI7a2rULRqFoe7xrxlg/KlsroCCTk4+GvUHUaJ1ho7rRsbK HZ+XAu5xweKYo1XxMkQtI++LomFk9jedlpBg7ot8mEcPMLvVevNrXqMK5j0n+NuG9HhxLt xEYu/a83ubnIcVzrVkYd/qMJl9n+5BppNlZan7FY7VSk1eNOreEeWxNzwPmZYLSOsOd90e KRd4JIEIwgTiGnBoKeMdulxf5eda+eQ/2HfV8bjyyF+N+/zs633kIsPN9yx2PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493329; a=rsa-sha256; cv=none; b=yko9mgr82HdUBVSSF2F2j4VciNSHCm8hIDJujRkl/TOhDWYrbfwFxIaESxpQ+lM/hy1xNg buIxPIU5XIKkMBMC5AfkmnJ4/Kecwg9++vpzQUuRy1KQmBaJtBAaqy/cK5uwu+ZY+gZG0R 7F1YMfD36kwFrvjZ3lsX+C4R4An1iq6GokvnnFdR1vnvNJ/GtiluRBAYRc6j21PUTWzwlS EJoXdlWet/7CYHDwjdU1qD5SN70a1ui3sQ8257ff1LBrBI0ano6oxh2m26jL1u/FfbjDQw 2z8ruTcHU94w422rWo9YVJCGqQdW5WrOTaHSMzbrLpTY0EQ3RfsoRZd9Si3a3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/sUBjn32/aqHZCVyXzL8t/wKJUfUaAO2mVXqLoMKov8=; b=HQe4PdNT4XMbqzLtUJXlf9Q5tdARe90JyQiIkjh5zNsckptPA6OGUg4/qeY73cFHPZskjG zz2TeoRrYFMPntSrIJcZh922Vl6ZG85PjYqkZzKOjv4CRyyAjlysuRhQkAwY8+GO/N5X8T yX+6RDFJCP4ZKo+XD26Q/7+4JtUgsj9MHsM9cWuApOO4C2kMj+arWu85uvNuYCv2rJeLfO pL/DJ6PMgj8Sduj3kWTLxB9lHi5pB+y6Ja3UdJUA+laeJI+ENzPgy1rw/cg15NM+nO0mPx u9WVCiXiAaTMvv9vXm/6/H+5Vj5+tgzDKoxxWKuD06AexD2XeEuzaNgF912GPA== 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 4Vldq46v5Yz131B; Thu, 23 May 2024 19:42:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJg8oO082553; Thu, 23 May 2024 19:42:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJg84L082550; Thu, 23 May 2024 19:42:08 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:08 GMT Message-Id: <202405231942.44NJg84L082550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: ddbfb544c6c9 - main - mqueuefs: Relax restriction that path must begin with a slash List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ddbfb544c6c9726ae97bcaf105d11dec8b292877 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddbfb544c6c9726ae97bcaf105d11dec8b292877 commit ddbfb544c6c9726ae97bcaf105d11dec8b292877 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-15 20:56:15 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 mqueuefs: Relax restriction that path must begin with a slash This is needed to support Linux implementation which discards the leading slash when calling mq_open(2) Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- lib/libsys/mq_open.2 | 4 ++-- sys/kern/uipc_mqueue.c | 34 ++++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/lib/libsys/mq_open.2 b/lib/libsys/mq_open.2 index 484fe95432da..4800ab18de59 100644 --- a/lib/libsys/mq_open.2 +++ b/lib/libsys/mq_open.2 @@ -35,7 +35,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd September 26, 2023 +.Dd May 15, 2024 .Dt MQ_OPEN 2 .Os .Sh NAME @@ -322,7 +322,7 @@ Support for POSIX message queues first appeared in .Sh BUGS This implementation places strict requirements on the value of .Fa name : -it must begin with a slash +it may begin with a slash .Pq Ql / and contain no other slash characters. .Pp diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 2efdfc9dd04c..9276c918565f 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2007,7 +2007,7 @@ static int kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, const struct mq_attr *attr) { - char path[MQFS_NAMELEN + 1]; + char *path, pathbuf[MQFS_NAMELEN + 1]; struct mqfs_node *pn; struct pwddesc *pdp; struct file *fp; @@ -2027,32 +2027,37 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, return (EINVAL); } + path = pathbuf; error = copyinstr(upath, path, MQFS_NAMELEN + 1, NULL); if (error) return (error); /* - * The first character of name must be a slash (/) character + * The first character of name may be a slash (/) character * and the remaining characters of name cannot include any slash * characters. */ len = strlen(path); - if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL) + if (len < 2 || strchr(path + 1, '/') != NULL) return (EINVAL); + if (path[0] == '/') { + path++; + len--; + } /* * "." and ".." are magic directories, populated on the fly, and cannot * be opened as queues. */ - if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0) + if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0) return (EINVAL); - AUDIT_ARG_UPATH1_CANON(path); + AUDIT_ARG_UPATH1_CANON(pathbuf); error = falloc(td, &fp, &fd, O_CLOEXEC); if (error) return (error); sx_xlock(&mqfs_data.mi_lock); - pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred); + pn = mqfs_search(mqfs_data.mi_root, path, len, td->td_ucred); if (pn == NULL) { if (!(flags & O_CREAT)) { error = ENOENT; @@ -2062,7 +2067,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, error = ENFILE; } else { pn = mqfs_create_file(mqfs_data.mi_root, - path + 1, len - 1, td->td_ucred, + path, len, td->td_ucred, cmode); if (pn == NULL) { error = ENOSPC; @@ -2134,23 +2139,28 @@ sys_kmq_open(struct thread *td, struct kmq_open_args *uap) int sys_kmq_unlink(struct thread *td, struct kmq_unlink_args *uap) { - char path[MQFS_NAMELEN+1]; + char *path, pathbuf[MQFS_NAMELEN + 1]; struct mqfs_node *pn; int error, len; + path = pathbuf; error = copyinstr(uap->path, path, MQFS_NAMELEN + 1, NULL); if (error) return (error); len = strlen(path); - if (len < 2 || path[0] != '/' || strchr(path + 1, '/') != NULL) + if (len < 2 || strchr(path + 1, '/') != NULL) return (EINVAL); - if (strcmp(path, "/.") == 0 || strcmp(path, "/..") == 0) + if (path[0] == '/') { + path++; + len--; + } + if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0) return (EINVAL); - AUDIT_ARG_UPATH1_CANON(path); + AUDIT_ARG_UPATH1_CANON(pathbuf); sx_xlock(&mqfs_data.mi_lock); - pn = mqfs_search(mqfs_data.mi_root, path + 1, len - 1, td->td_ucred); + pn = mqfs_search(mqfs_data.mi_root, path, len, td->td_ucred); if (pn != NULL) error = do_unlink(pn, td->td_ucred); else From nobody Thu May 23 19:42:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq64KFsz5L9tM; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq61Bq3z559t; Thu, 23 May 2024 19:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQk63XVGbeSeUAvWYUvsUbrg6z2AjLAmw7XjnI2iNGE=; b=dkz1JdSyRuLRM3jb6qvl2D/DJxsedGnixVcAltLngL59zCYEep9Ty39/HuhGskXbik8awM jfo8p3rgSdhm/K8DNyZzVOtFHKotm5QhhMUIqFIpVe8HDfeZSuf21e6V5lQznKvXKBd9hC WTT6pVANAfyTgKXDP+u6UzniT1Rp4mYkYmfXQv1dsdyc5L38tJdQN9rNve1Q2KAjaZH0Z+ KNb8IGySgF8YWDRcJLhXhIBBaOhsIefuHFY88BTepZF1dTnFEjf7g5dHDCUCZI1TnFWrdt INPelJLQmETMwxGYp1yOHQQ37ODRR2RGdekOMvw1FsSYXgJHXU7O5P73q/N12w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493330; a=rsa-sha256; cv=none; b=gq3ZNVdohUyHbm35HkM/S2hbEaZmLSeG4KT0LVXReGGzai/b93nh2x0Be/vU5NNBRCkhfb acPC40PlszcjVNhLbGpenieefH0GGyHzoVcYBkE05Cuy96LDJdE6ntfFGFs4PjwihluFws PKPOfXzF1bR1b5Cj8tlrYuoOt14sOn5MOwePPWTjyXMUM/80YYTalaa773e3CbUA0goT8l Z/pZhLKfzmcgm1it5zUbItf7UDecXwS8hKrcpzW5qYjCEBgR/o+b9GZAnPxopnv+VSFEZy HyGtd32zpmQXABydKfNZ2y4GeFykYxrepVoPI/W0u4yW2dnfrL8tFh1xXGMcDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQk63XVGbeSeUAvWYUvsUbrg6z2AjLAmw7XjnI2iNGE=; b=QUjZDZsLizJJ962CjoNjrpGtNhh1niJNLYL010LFR572fPjOtBqTHqbyEIAgIuHGb4kmgH 8lOnMHj3dWdHroJj+HJ1yXo0fTpRRc1zGKlMICHCGXdBgWhTd71uvdYJuVGZeyyqX2mwEE V8Uw/k69y75LOA7+e/fch+mI0174ZIDRaKrEH4aMjdoejG9p82oBMER7/5GsfdZOIqEzyb 3CldJ58X2vRd8r68AUbZUVe2eufhgGQYQXLyXHm2bI8slbjxDhDA9ZjEHU6W4Sg3fPIBly BN/+4k+X2GlkeFQLU535zCv1aPqwLC/juPKUkA0FrPI83/hdoJ439k9ibVtQrw== 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 4Vldq60nTqz12Sy; Thu, 23 May 2024 19:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgA3A082595; Thu, 23 May 2024 19:42:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgAKW082592; Thu, 23 May 2024 19:42:10 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:10 GMT Message-Id: <202405231942.44NJgAKW082592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 427db2c45eb3 - main - linux: Fix linux_mq_notify_args & linux_timer_create_args List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 427db2c45eb3a6e362e0ce2804dd9abd2e6909a4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=427db2c45eb3a6e362e0ce2804dd9abd2e6909a4 commit 427db2c45eb3a6e362e0ce2804dd9abd2e6909a4 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-15 21:09:38 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Fix linux_mq_notify_args & linux_timer_create_args Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/amd64/linux/syscalls.master | 4 ++-- sys/amd64/linux32/syscalls.master | 4 ++-- sys/arm64/linux/syscalls.master | 4 ++-- sys/i386/linux/syscalls.master | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 10084b53a1e1..fd08c9b0279d 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -1296,7 +1296,7 @@ 222 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1428,7 +1428,7 @@ 244 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp, ); } 245 AUE_NULL STD { diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 6b40a89db66d..92d5f09c423f 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -1402,7 +1402,7 @@ 259 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1538,7 +1538,7 @@ 281 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp ); } 282 AUE_NULL STD { diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index 61c7499d57b3..79c04c398e00 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -661,7 +661,7 @@ 107 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1107,7 +1107,7 @@ 184 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp ); } 185 AUE_NULL STD { diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index d0ba99861153..958336be0f08 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -1420,7 +1420,7 @@ 259 AUE_NULL STD { int linux_timer_create( clockid_t clock_id, - struct sigevent *evp, + struct l_sigevent *evp, l_timer_t *timerid ); } @@ -1554,7 +1554,7 @@ 281 AUE_NULL STD { int linux_mq_notify( l_mqd_t mqd, - const struct l_timespec *abs_timeout + const struct l_sigevent *sevp ); } 282 AUE_NULL STD { From nobody Thu May 23 19:42:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq72vSWz5L9fK; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq72LKxz54xj; Thu, 23 May 2024 19:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vzuiyiHsT6KuQ7TJYiT7c/xHQvEoKvCDs/nJ0DFSQG8=; b=PSs/sCE46Vw/lClv6Vs5XLR8rfccpwWd3X5TqptQ2jNhrvUqs1iubiKkN8+Ud+9jK2g8Z0 uMhg0+IZYntNfII9+ZE0BkA6ij3PTAzybGLCEjobLtkS+IWOL6TimudD1QDsiLriyV5OKu sZe10OQyuWbl9Dl0JMoCYHd2sY4ZGGEXW67C0doeA2jGHbsYrmhSqKq/mao3UmLSUf9oa7 xRODK3CFduYVmtj7y8r+V6Xp5SbpqFZ/FkBMTeLOLoVYJJkfrihThTAwu921dGNScGtd2L no9pSuqwbSrBQIAwHPOHtYVIDbESYzoSHq+ZZ4MdDh/QqPaRU0sWsKi1dyrW4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493331; a=rsa-sha256; cv=none; b=c1n3LyN5FFKRBLWgYPM7lXvsWaybxliLLjf1nxt+/Ta1+P8a08PoD5cro/jUL2sLHl2c9R BHQZg6yAvmgwC5dOP2lS5OeqSm5HwsGj6VprjD/gZGmUEWgmTBY1wClHQ3rKOLmoXpjAKR wCqJI/GDoqcIknIgaA1Ij8TZkHsu2UNvnbg5hsZpmf9tU+L+Q3XA2j6FCPC07QofVu8EUY B6B5eBaPnNriTYd5fFoVYuTF15HJmWZc3Wy7ytfpJfZDoMXku/LllVWeQYbqz3RkNcW5Hf ISF9H04IwvMaC+FZnQzu1f24RVxjYGAL+tWnnUQ+hYnzrIewAoH3Gls0PR5iEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vzuiyiHsT6KuQ7TJYiT7c/xHQvEoKvCDs/nJ0DFSQG8=; b=Sl6urNaYIsyryp1xES/rR0g3c0R/WLhYzEQoJLLRESvFGi9YkfNFYZBszrjkBdtwmfFEOF t76i5958pgNK5Im+Ku1+mgzmMqn5VKv5/KOcXI/lTUWBFQGBlYhq9A4L85XrnyDyPZ8H+B twaWrulic1jU+65uWSCDJbqEmxOgsFg/lPlrSTUgjP8el0BGukdy9pXqaN6WIDQGTZPsOy xYM01k3NscJt00wUBIiRGWv1A5R6yCLya8zWjj8fIEoAIEJ1z34ccdslv83jSP8pUoNR4z ez+dAygL2uC2bXVfDOqNbUXt1WgZbPrj5lvCJ9OpCn0SenH1WaFiQKwCZQlH/Q== 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 4Vldq71jv1z13GX; Thu, 23 May 2024 19:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgBOk082631; Thu, 23 May 2024 19:42:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgB2W082628; Thu, 23 May 2024 19:42:11 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:11 GMT Message-Id: <202405231942.44NJgB2W082628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 9c7b1bf27122 - main - linux: Export linux_common_openflags() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9c7b1bf27122f975ea70c81931d48b751f8a1bfa Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9c7b1bf27122f975ea70c81931d48b751f8a1bfa commit 9c7b1bf27122f975ea70c81931d48b751f8a1bfa Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:08:24 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Export linux_common_openflags() Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/compat/linux/linux_file.c | 2 +- sys/compat/linux/linux_file.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 1279490ae8be..5f510004c684 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -104,7 +104,7 @@ linux_creat(struct thread *td, struct linux_creat_args *args) } #endif -static int +int linux_common_openflags(int l_flags) { int bsd_flags; diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index ce9feca154ed..2e56942b0f40 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -197,6 +197,7 @@ struct l_file_handle { }; int linux_enobufs2eagain(struct thread *, int, int); +int linux_common_openflags(int); #endif /* From nobody Thu May 23 19:42:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq8404tz5L9fL; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq82kdsz54y5; Thu, 23 May 2024 19:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=89afMdWuQmy8o1ixs8h0tPwdB82A81dFH3qpf26kolo=; b=REoKMnH8wdIOIssDhWtC5Wxv12ziiWT86HkFmQlXZDAiCUOFYjsTNcMr74+n2RdS5j8VCU oygW8g4BUpSOylNkK/6IJiSzRZ/31pncfWaxAs+ondgVRsngpYYRgQ3bvtP+CtOcSIBq6r 9cog6K8oJsuIkgooVMHwnTXMZ1vbuN4zLkSRBYRVd0RCi5ia+IceWDprBUvrfBtyy7/JSQ MovZjoGgupBcdkwBZUqMWYJCtpLF0hsjNu0WQULEXRjdXxpbDK3ZnZrHwd8b76Lg+XUTtk 2Jxq3IyX7YIXcNa1msyPhCuR7oSCkftSZkvog7hi+BJVwumbG3LNitMTi4Cfdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493332; a=rsa-sha256; cv=none; b=e8psJA4F61UY5o8iHUa1bOulWq1l2jVDHQvUnNMvc0uGd1/xTd55LZTXeE8G3bW9ER/sK7 mKYEvJwCLeVT3UrGD4qdZ2PxySVRzp/slwlK1f3OxFLewjJTLecYv8I4jyxFNE/NbG5cNA TLZxjDeCWputqKTYHPOLl+P3sESRaLXbTZGcSZjdMUf1n8yxED3SdP5kOF9PnRFKqjKbgx JZxTsCfjDGr8eW5ocvIIF+SH716pyiOzGdY46uYM8UHL+VbTZ5nImX/SmrW0Y7WR5Bh63O 2kUxxbjjz0rCx3E8NCUuTzqt6KyDP1Kpsu+Yzu7TelNxSlaWSKQKSFe4N4Yvjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=89afMdWuQmy8o1ixs8h0tPwdB82A81dFH3qpf26kolo=; b=xyRYdrpEuUaNybtM291JHEBcZSUGEZfQ2HWAK1En6JoISc+ljARd11mTvQB07aR47HqoqK 6XS9k1b6DTVLSGGRFIjtlLpBxS4xonaOY+PuNCstx9v4C5mRxgtTwcNILnZsuKrKOn5ukQ XZu/8PdznxBW38bsQopPRPN4XkZdCmuf4uxjPOQ8aszpPk7mAGB/YkoIB0UHsZX4h4YXdx fFlHTJ+ZRwLOwc1aypurzcFJbrOMNua6jrEvfoL95FTwbgaMT18IaE85BJZ9pRfU5kOo8M Dzc2RUQqs/p+DC7I/ieYmAHQsIqwT3U95/J7VD+9re8HT6j5LwDcRCFfWx1qzQ== 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 4Vldq82L85z13GY; Thu, 23 May 2024 19:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgCtu082672; Thu, 23 May 2024 19:42:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgCAI082669; Thu, 23 May 2024 19:42:12 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:12 GMT Message-Id: <202405231942.44NJgCAI082669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 86e43b5def1b - main - linux: Export linux_convert_l_sigevent List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 86e43b5def1bc1c94d40b809ab8c8ff0259735ff Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=86e43b5def1bc1c94d40b809ab8c8ff0259735ff commit 86e43b5def1bc1c94d40b809ab8c8ff0259735ff Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:29:03 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Export linux_convert_l_sigevent Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/compat/linux/linux_time.h | 1 + sys/compat/linux/linux_timer.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_time.h b/sys/compat/linux/linux_time.h index d99684db1cbf..bb23105f4f23 100644 --- a/sys/compat/linux/linux_time.h +++ b/sys/compat/linux/linux_time.h @@ -137,6 +137,7 @@ int linux_to_native_itimerspec64(struct itimerspec *, struct l_itimerspec64 *); #endif +int linux_convert_l_sigevent(const struct l_sigevent *l_sig, struct sigevent *sig); int linux_to_native_timerflags(int *, int); #endif /* _LINUX_TIME_H */ diff --git a/sys/compat/linux/linux_timer.c b/sys/compat/linux/linux_timer.c index 2188006ec38f..ed9133359302 100644 --- a/sys/compat/linux/linux_timer.c +++ b/sys/compat/linux/linux_timer.c @@ -43,8 +43,8 @@ #endif #include <compat/linux/linux_time.h> -static int -linux_convert_l_sigevent(struct l_sigevent *l_sig, struct sigevent *sig) +int +linux_convert_l_sigevent(const struct l_sigevent *l_sig, struct sigevent *sig) { CP(*l_sig, *sig, sigev_notify); From nobody Thu May 23 19:42:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vldq960n8z5L9TM; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vldq93RLXz55Q3; Thu, 23 May 2024 19:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FIL8E/0gOsibB6bUvKofQc5PKWAJWQy7dFZwG0m3Mk=; b=RSON6QUFvgp+l6mI83PvmrdQpH1Pqxj+1wmc/qLulaHQRuzjRsBEVs55WbgBlWRfQql7Ph C+yMX10v88ch6BTOu+OASPo1wTv2JLvcv4SdBo3oNfv88KMPNLwUGoQ3jKw9ekdA0UwvmY pbdfGb6byzAaUyGxiYH+Y8TeWt16lIUdvoT6hpQIxJpRZsnzAEatwdq+c4RnXaCD2RUKdn W30fsr0fXG/EqY5w4XRD9gJ/aGbWXTLGxfaGYJVTf1YBxvTp/KiriutUl6lIajuKlGUDfO SgvsJm7nOFl/0FD9Gm20XmNNLIHX/L+8nYMdJ1VPE73gd7bqccVChuJfM4NaGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493333; a=rsa-sha256; cv=none; b=XPR1808xznKmNvi2Z/JXhEGHue64xRvAkUCHcOQYMWehbVZhFl7JPsUyyHPbDsPScNdStA z5r6yHInjv3E2t/JOQb420o0zBTpzQahag4bN5HAAnYBG6toX+QH15yaIIjJCoQTfFIT7j G7zL8ZLR64gMZhVZhRxuGBui7cw2ITKffmUK2tLmkGdPdhaWZK7v+nXQzLUwHSII6cU/P0 iEMzFSRWH+VkrmnVfSaRD7IEwDW173pVk4VsWe5YmVYHs2mpQi9jjusvk5+lXV8QsncGB5 DRoWzy5IbZ60AykaaJe+UXR6GyFW8bDGPYuSmsuwiUeB3grx/t7QfMf7HhU8XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6FIL8E/0gOsibB6bUvKofQc5PKWAJWQy7dFZwG0m3Mk=; b=BoOPKvYEXbwjpXQl0+J5uKnqWbCWzOjqhKpkvBV1HvTpMvI5pO8PgpUasfIMc1BzkWOnxT myVVEITk7u5UijmGUblrcLBQnYX4XBsit6SblSSVFCVyeem5pib23bS6mwq9QcsoEqJoT7 fIvx6w8u+35I0ReKUT8e8mMCmC+e9czUHiL9BbhYHnERQh6HW3btB1VdeGf6NBj/5aifAp wr3yTX5W6t61GnbU75+ehuP3/6BfEztsQGuGrSrz/mKHkVNlSxXbYnNcEVSSAD7FEjGryn rQ4UamhKJt9rrcZhscXJalFSWZ3zHPFvx+IAuLOs5wzHi+EN+mtZH1dXqj7eNA== 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 4Vldq933MKz13Gb; Thu, 23 May 2024 19:42:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgDNf082732; Thu, 23 May 2024 19:42:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgDk4082729; Thu, 23 May 2024 19:42:13 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:13 GMT Message-Id: <202405231942.44NJgDk4082729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 289b2d6a7980 - main - mqueue: Export some functions to be used by Linuxulator List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 289b2d6a79801f44adc787728cfc8219d39ec076 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=289b2d6a79801f44adc787728cfc8219d39ec076 commit 289b2d6a79801f44adc787728cfc8219d39ec076 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:31:16 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 mqueue: Export some functions to be used by Linuxulator Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/kern/uipc_mqueue.c | 6 +++--- sys/sys/mqueue.h | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 9276c918565f..b48abf8788f6 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2003,7 +2003,7 @@ notifier_remove(struct proc *p, struct mqueue *mq, int fd) PROC_UNLOCK(p); } -static int +int kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, const struct mq_attr *attr) { @@ -2223,7 +2223,7 @@ getmq_write(struct thread *td, int fd, struct file **fpp, fpp, ppn, pmq); } -static int +int kern_kmq_setattr(struct thread *td, int mqd, const struct mq_attr *attr, struct mq_attr *oattr) { @@ -2329,7 +2329,7 @@ out: return (error); } -static int +int kern_kmq_notify(struct thread *td, int mqd, struct sigevent *sigev) { struct filedesc *fdp; diff --git a/sys/sys/mqueue.h b/sys/sys/mqueue.h index 50f6681ce218..78f34c197c7e 100644 --- a/sys/sys/mqueue.h +++ b/sys/sys/mqueue.h @@ -38,8 +38,14 @@ struct mq_attr { }; #ifdef _KERNEL +struct sigevent; struct thread; struct file; extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); +int kern_kmq_notify(struct thread *, int, struct sigevent *); +int kern_kmq_open(struct thread *, const char *, int, mode_t, + const struct mq_attr *); +int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, + struct mq_attr *); #endif #endif From nobody Thu May 23 19:42:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqB5Trlz5L9Ww; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VldqB4Nyqz55FD; Thu, 23 May 2024 19:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjOcFcyzPaPEQgMvKqgfX0eZwOfDd6OW6oYEMe5fYZA=; b=ulDUYAzzdMy21JggiFsLovBNROeMuRkErkoO2HnpdbwyjaWy5MuDZh2zbI8q5GxH+9d+LR G26r/WbSebl/YUbXwC0HBo2AGR5j04tlp768O/paBYHE0sB9PCwHrKKhpMrg9IrbHW6PNE 6SlKWIh1HMJedDeZA/R1lyRjTN96q5rNjsFDqyhtbs+c4CRKCl4AaiBg/3mZs6z/0xNIaX vB4TTGY1lfeumAypcYMDjA5OgccWTdz14cSR6qDwLeS2jsoC052ZVZU0VJmQ0bRDQ7YYeI DthhlxhZfzlcLCxAy3OGnbP6lrByuCe1Yxo0t4O+wuHgrsboAAlqqAiT7Srb3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493334; a=rsa-sha256; cv=none; b=rOKaYGLshaHTQ0xOsLCCeQm98q+Woi04K/WnpcB42+fih2vxUAjnKFJyVQVHMH5QKH6dmr 58sUEp3MeRcoaJKIy6bjGubRnp3YiSeN1+U6t7gKSaR0UM6iVHyx/8fP7ZQWytmQ+wqOSc QWLDiK/v/R8Eibuffl27jm1ayVIGGdpoM0UEEGNwfON6eddafFuScxYpzYxu60ibLR1wEP 1wTkoxU9ltjjcjD6jJKhUaSSkagO8nJdEGiZS1E0YZwrPAAeVYSrkNy7hmHw3AWl2YSx1Y EfPHG1S4I927qG1Ps+VCt6a/91jJIPF1CXahied6f3uopUdmxeu16nTImML6gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XjOcFcyzPaPEQgMvKqgfX0eZwOfDd6OW6oYEMe5fYZA=; b=czCCluWScahBnUzXPzG5R10Yx/VslAwEcZOpilaPUECD/sN2zkUZtDScbXi6bFQqcVEglr l/CaUP7po3aOpNrweCw2EZI2lc/W8bXt7U3/HUr96Abqu1Fp18WYo9JFUqYkz74L0Mv1gG Mj+PPbXq1qt7Ja0bzmK+kbcr2BqOvzIzyNgWfoCtbhyA+sGeXWLduMkqZrBVEcBuUIrbyK eMiO/SSnDRGc92gRNmUcikmstYggDHyP9rUaUCBJi8xm3OcVu/wZ/9amzCSu7JZd88C+oo kYv4LTESt2B0qSWugGNksMQd5COw/oNJMn0DykcpHV7SfBN0LdoOF+GeUDXTEg== 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 4VldqB41KRz12qG; Thu, 23 May 2024 19:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgEx6082774; Thu, 23 May 2024 19:42:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgEQC082771; Thu, 23 May 2024 19:42:14 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:14 GMT Message-Id: <202405231942.44NJgEQC082771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: e30621d58fa1 - main - mqueue: Introduce kern_kmq_timedreceive & kern_kmq_timedsend List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e30621d58fa10d82f3d4a89bb6b5572e2517b024 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e30621d58fa10d82f3d4a89bb6b5572e2517b024 commit e30621d58fa10d82f3d4a89bb6b5572e2517b024 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-18 15:19:39 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 mqueue: Introduce kern_kmq_timedreceive & kern_kmq_timedsend Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/kern/uipc_mqueue.c | 106 ++++++++++++++++++++++++------------------------- sys/sys/mqueue.h | 6 --- sys/sys/syscallsubr.h | 10 +++++ 3 files changed, 63 insertions(+), 59 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index b48abf8788f6..c0948d40c47b 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2275,58 +2275,77 @@ sys_kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) } int -sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap) +kern_kmq_timedreceive(struct thread *td, int mqd, char *msg_ptr, + size_t msg_len, unsigned int *msg_prio, const struct timespec *abs_timeout) { struct mqueue *mq; struct file *fp; + int error, waitok; + + AUDIT_ARG_FD(mqd); + error = getmq_read(td, mqd, &fp, NULL, &mq); + if (error != 0) + return (error); + waitok = (fp->f_flag & O_NONBLOCK) == 0; + error = mqueue_receive(mq, msg_ptr, msg_len, msg_prio, waitok, + abs_timeout); + fdrop(fp, td); + return (error); +} + +int +sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap) +{ struct timespec *abs_timeout, ets; int error; - int waitok; - AUDIT_ARG_FD(uap->mqd); - error = getmq_read(td, uap->mqd, &fp, NULL, &mq); - if (error) - return (error); if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets, sizeof(ets)); if (error != 0) - goto out; + return (error); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedreceive(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int -sys_kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap) +kern_kmq_timedsend(struct thread *td, int mqd, const char *msg_ptr, + size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout) { struct mqueue *mq; struct file *fp; - struct timespec *abs_timeout, ets; int error, waitok; - AUDIT_ARG_FD(uap->mqd); - error = getmq_write(td, uap->mqd, &fp, NULL, &mq); - if (error) + AUDIT_ARG_FD(mqd); + error = getmq_write(td, mqd, &fp, NULL, &mq); + if (error != 0) return (error); + waitok = (fp->f_flag & O_NONBLOCK) == 0; + error = mqueue_send(mq, msg_ptr, msg_len, msg_prio, waitok, + abs_timeout); + fdrop(fp, td); + return (error); +} + +int +sys_kmq_timedsend(struct thread *td, struct kmq_timedsend_args *uap) +{ + struct timespec *abs_timeout, ets; + int error; + if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets, sizeof(ets)); if (error != 0) - goto out; + return (error); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedsend(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int @@ -2801,63 +2820,44 @@ int freebsd32_kmq_timedsend(struct thread *td, struct freebsd32_kmq_timedsend_args *uap) { - struct mqueue *mq; - struct file *fp; struct timespec32 ets32; struct timespec *abs_timeout, ets; int error; - int waitok; - AUDIT_ARG_FD(uap->mqd); - error = getmq_write(td, uap->mqd, &fp, NULL, &mq); - if (error) - return (error); if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); if (error != 0) - goto out; + return (error); CP(ets32, ets, tv_sec); CP(ets32, ets, tv_nsec); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedsend(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int freebsd32_kmq_timedreceive(struct thread *td, struct freebsd32_kmq_timedreceive_args *uap) { - struct mqueue *mq; - struct file *fp; struct timespec32 ets32; struct timespec *abs_timeout, ets; - int error, waitok; + int error; - AUDIT_ARG_FD(uap->mqd); - error = getmq_read(td, uap->mqd, &fp, NULL, &mq); - if (error) - return (error); if (uap->abs_timeout != NULL) { error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); if (error != 0) - goto out; + return (error); CP(ets32, ets, tv_sec); CP(ets32, ets, tv_nsec); abs_timeout = &ets; } else abs_timeout = NULL; - waitok = !(fp->f_flag & O_NONBLOCK); - error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); -out: - fdrop(fp, td); - return (error); + + return (kern_kmq_timedreceive(td, uap->mqd, uap->msg_ptr, uap->msg_len, + uap->msg_prio, abs_timeout)); } int diff --git a/sys/sys/mqueue.h b/sys/sys/mqueue.h index 78f34c197c7e..50f6681ce218 100644 --- a/sys/sys/mqueue.h +++ b/sys/sys/mqueue.h @@ -38,14 +38,8 @@ struct mq_attr { }; #ifdef _KERNEL -struct sigevent; struct thread; struct file; extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); -int kern_kmq_notify(struct thread *, int, struct sigevent *); -int kern_kmq_open(struct thread *, const char *, int, mode_t, - const struct mq_attr *); -int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, - struct mq_attr *); #endif #endif diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 6652619287ad..8ac3f55596e6 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -49,6 +49,7 @@ struct kevent_copyops; struct kld_file_stat; struct ksiginfo; struct mbuf; +struct mq_attr; struct msghdr; struct msqid_ds; struct pollfd; @@ -385,6 +386,15 @@ int kern_writev(struct thread *td, int fd, struct uio *auio); int kern_socketpair(struct thread *td, int domain, int type, int protocol, int *rsv); int kern_unmount(struct thread *td, const char *path, int flags); +int kern_kmq_notify(struct thread *, int, struct sigevent *); +int kern_kmq_open(struct thread *, const char *, int, mode_t, + const struct mq_attr *); +int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, + struct mq_attr *); +int kern_kmq_timedreceive(struct thread *, int, char *, + size_t, unsigned int *, const struct timespec *); +int kern_kmq_timedsend(struct thread *td, int, const char *, + size_t, unsigned int, const struct timespec *); /* flags for kern_sigaction */ #define KSA_OSIGSET 0x0001 /* uses osigact_t */ From nobody Thu May 23 19:42:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqD0Jlkz5L9R1; Thu, 23 May 2024 19:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VldqC4tPSz55Vx; Thu, 23 May 2024 19:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6/0oavsWMItGCsgtit3DY70gIOSFtqrIgoOAscdAHEM=; b=WvQlfuvMyV5ylZx5mJlqV33xYBLG1AAB+YlihtQLzVMqzgplToIaeI+2pwR5BrEMsK7xGL 9qc/g+ch1aV65pi+n9qgQEAsv1BN3x2fba6lmx+O779gTz9l8o1GCRWG5MVltt8PuiS5RK HwKwY7omoQtW8Kn2NhES/nlWi8AiCNCqN0+ugjxysB/5YXrKcVy+8e3Odk1sVaPCDeKZ6f 1x70mMI3ePFipU6zvSVgLmjTYIyCvMAwqoDfeBW6DYOAw3Ru3UYhZ+Q1I4EzADZ8SHHYt8 zMD3PnHAOYlOXufktFje9yg+XN8JsbvOdw1yZVeoQABmu2nx6ftbHcK5xD4+2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493335; a=rsa-sha256; cv=none; b=JMeML5zlI4uXO2mCRWqCFOt1++HqHhngv3os8twJIAYkahCjSgYhuN3EqXQxeiLMJY73Ds DjXG42XBgwtEVuCOAsfkzleKGWXLGpHi7uTE2sni+Fg3ghAR7OXma9vnp8mIJK1rZzqRU2 mUvgJ+X9fjS37LqqIeV2oWIdZeDgyPmwW59+EwunnigUax6MHak+uaXbARJbyF9xnfJ2XT 8tiaFyY1SD0RAkDXZ2DMHGA0sTiT4vHw6hF6G34ToQ6XY54ufn15H9OV80jOueaW735YAs eG3EArYHXDyVdCy0G4H25RZHqY5KzJxURPh9Xb0UiuXSLJo6cKNXSc05lOvX2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6/0oavsWMItGCsgtit3DY70gIOSFtqrIgoOAscdAHEM=; b=Bkw/YlgyBiXXKqjfvGWiNv1XYWwZo66PTw/e4K7rb2NJ8awU9K6I/lFUrl+n8yqMKdurdt fLhXT7J110yQrcnJPDwgf1Ng22MqTLZ9fjV68FecPiWfaHnNeiQe1SjwjmCZO3QC7sWEVf 3bp353IDPJNXHipQetyk8wU03Lnjs++6Y2WGKdnGfATRbBTpMmc8n5lG9G01v5pETQ5Iuf LHOShr3LSIJf/Nq4sH0e9acKRg0pL0VqzrtLOjn/8Pav4Ybl7tmpTmbYLj2feweex5zWbm ne9IqNUSdT7Lk4IFkJjQSrooMO/Yf554kFngYk9Pb8zc9d29QkndqDC+t+B2lg== 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 4VldqC4SBgz12kw; Thu, 23 May 2024 19:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgFA2082817; Thu, 23 May 2024 19:42:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgFKq082814; Thu, 23 May 2024 19:42:15 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:15 GMT Message-Id: <202405231942.44NJgFKq082814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 97add684f530 - main - linux: Support POSIX message queues List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 97add684f5306ebf93be238a0340597ba1898d0e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=97add684f5306ebf93be238a0340597ba1898d0e commit 97add684f5306ebf93be238a0340597ba1898d0e Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-17 20:31:49 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:46 +0000 linux: Support POSIX message queues Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- sys/amd64/linux/linux_dummy_machdep.c | 6 -- sys/amd64/linux32/linux32_dummy_machdep.c | 6 -- sys/arm64/linux/linux_dummy_machdep.c | 6 -- sys/compat/linux/linux_misc.c | 124 ++++++++++++++++++++++++++++++ sys/i386/linux/linux_machdep.c | 61 --------------- 5 files changed, 124 insertions(+), 79 deletions(-) diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c index 759586d9f1fc..53bdb8099578 100644 --- a/sys/amd64/linux/linux_dummy_machdep.c +++ b/sys/amd64/linux/linux_dummy_machdep.c @@ -56,12 +56,6 @@ DUMMY(io_destroy); DUMMY(io_getevents); DUMMY(io_submit); DUMMY(io_cancel); -DUMMY(mq_open); -DUMMY(mq_unlink); -DUMMY(mq_timedsend); -DUMMY(mq_timedreceive); -DUMMY(mq_notify); -DUMMY(mq_getsetattr); DUMMY(readahead); DUMMY(restart_syscall); /* Linux 3.15: */ diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index c2206c81c528..1476d39b9c35 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -55,12 +55,6 @@ DUMMY(olduname); DUMMY(uname); DUMMY(bdflush); DUMMY(ptrace); -DUMMY(mq_open); -DUMMY(mq_unlink); -DUMMY(mq_timedsend); -DUMMY(mq_timedreceive); -DUMMY(mq_notify); -DUMMY(mq_getsetattr); /* Linux 4.11: */ DUMMY(arch_prctl); /* Linux 5.0: */ diff --git a/sys/arm64/linux/linux_dummy_machdep.c b/sys/arm64/linux/linux_dummy_machdep.c index a7a7795f573d..5ff6bfafe2d6 100644 --- a/sys/arm64/linux/linux_dummy_machdep.c +++ b/sys/arm64/linux/linux_dummy_machdep.c @@ -42,10 +42,4 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); * Before adding new stubs to this file, please check if a stub can be added to * the machine-independent code in sys/compat/linux/linux_dummy.c. */ -DUMMY(mq_open); -DUMMY(mq_unlink); -DUMMY(mq_timedsend); -DUMMY(mq_timedreceive); -DUMMY(mq_notify); -DUMMY(mq_getsetattr); DUMMY(kexec_file_load); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 9b8ab193f2bd..14c36669efc8 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -29,6 +29,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_posix.h" + #include <sys/param.h> #include <sys/fcntl.h> #include <sys/jail.h> @@ -36,6 +38,7 @@ #include <sys/limits.h> #include <sys/lock.h> #include <sys/msgbuf.h> +#include <sys/mqueue.h> #include <sys/mutex.h> #include <sys/poll.h> #include <sys/priv.h> @@ -2963,3 +2966,124 @@ linux_ioprio_set(struct thread *td, struct linux_ioprio_set_args *args) } return (error); } + +/* The only flag is O_NONBLOCK */ +#define B2L_MQ_FLAGS(bflags) ((bflags) != 0 ? LINUX_O_NONBLOCK : 0) +#define L2B_MQ_FLAGS(lflags) ((lflags) != 0 ? O_NONBLOCK : 0) + +int +linux_mq_open(struct thread *td, struct linux_mq_open_args *args) +{ + struct mq_attr attr; + int error, flags; + + flags = linux_common_openflags(args->oflag); + if ((flags & O_ACCMODE) == O_ACCMODE || (flags & O_EXEC) != 0) + return (EINVAL); + flags = FFLAGS(flags); + if ((flags & O_CREAT) != 0 && args->attr != NULL) { + error = copyin(args->attr, &attr, sizeof(attr)); + if (error != 0) + return (error); + attr.mq_flags = L2B_MQ_FLAGS(attr.mq_flags); + } + + return (kern_kmq_open(td, args->name, flags, args->mode, + args->attr != NULL ? &attr : NULL)); +} + +int +linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args) +{ + struct kmq_unlink_args bsd_args = { + .path = PTRIN(args->name) + }; + + return (sys_kmq_unlink(td, &bsd_args)); +} + +int +linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args) +{ + struct timespec ts, *abs_timeout; + int error; + + if (args->abs_timeout == NULL) + abs_timeout = NULL; + else { + error = linux_get_timespec(&ts, args->abs_timeout); + if (error != 0) + return (error); + abs_timeout = &ts; + } + + return (kern_kmq_timedsend(td, args->mqd, PTRIN(args->msg_ptr), + args->msg_len, args->msg_prio, abs_timeout)); +} + +int +linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args) +{ + struct timespec ts, *abs_timeout; + int error; + + if (args->abs_timeout == NULL) + abs_timeout = NULL; + else { + error = linux_get_timespec(&ts, args->abs_timeout); + if (error != 0) + return (error); + abs_timeout = &ts; + } + + return (kern_kmq_timedreceive(td, args->mqd, PTRIN(args->msg_ptr), + args->msg_len, args->msg_prio, abs_timeout)); +} + +int +linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args) +{ + struct sigevent ev, *evp; + struct l_sigevent l_ev; + int error; + + if (args->sevp == NULL) + evp = NULL; + else { + error = copyin(args->sevp, &l_ev, sizeof(l_ev)); + if (error != 0) + return (error); + error = linux_convert_l_sigevent(&l_ev, &ev); + if (error != 0) + return (error); + evp = &ev; + } + + return (kern_kmq_notify(td, args->mqd, evp)); +} + +int +linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) +{ + struct mq_attr attr, oattr; + int error; + + if (args->attr != NULL) { + error = copyin(args->attr, &attr, sizeof(attr)); + if (error != 0) + return (error); + attr.mq_flags = L2B_MQ_FLAGS(attr.mq_flags); + } + + error = kern_kmq_setattr(td, args->mqd, args->attr != NULL ? &attr : NULL, + &oattr); + if (error == 0 && args->oattr != NULL) { + oattr.mq_flags = B2L_MQ_FLAGS(oattr.mq_flags); + bzero(oattr.__reserved, sizeof(oattr.__reserved)); + error = copyout(&oattr, args->oattr, sizeof(oattr)); + } + + return (error); +} + +MODULE_DEPEND(linux, mqueuefs, 1, 1, 1); diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index b5d42dc22162..0e056aadb4b5 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -592,67 +592,6 @@ linux_get_thread_area(struct thread *td, struct linux_get_thread_area_args *args return (0); } -/* XXX: this wont work with module - convert it */ -int -linux_mq_open(struct thread *td, struct linux_mq_open_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_open(td, (struct kmq_open_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_unlink(td, (struct kmq_unlink_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_timedsend(td, (struct kmq_timedsend_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_notify(td, (struct kmq_notify_args *)args)); -#else - return (ENOSYS); -#endif -} - -int -linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) -{ -#ifdef P1003_1B_MQUEUE - return (sys_kmq_setattr(td, (struct kmq_setattr_args *)args)); -#else - return (ENOSYS); -#endif -} - void bsd_to_linux_regset(const struct reg *b_reg, struct linux_pt_regset *l_regset) From nobody Thu May 23 19:42:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqF16PYz5L9b6; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VldqD5zx6z55Qq; Thu, 23 May 2024 19:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CZfpfOcqj2wYU20Hqfjl87D8IPng2DeWjr22XdV8m/k=; b=fzCxcvcBCoWGTNXJlGRRJOpiq6iqU0jt68iMoon4Gb401/wDD2307YFHHzGrlKBytrl4k3 tr07ODAxzJvEmIlcxwuM/pHjGXc5vpbub0Vj84egnaeWhCuATgSTIQG4UR09OA7fdxa60X PstDUaDwU5IiIXyljN27RdyO9djPRX7ZDRhIcTlHVrOFY6BXnelfQghG5z3UU5vZ4HAW+R 5hmZkY/sbmpOPRhBbb+anrutWRYMtwlRIhuzQltdYMVl7ReWrRrftSgTTgc35ikQQUtaoA iOoRxuAXTUT8KCWi27h6UAG3z1el7dX7+1UH8PhO3e4sAYWRY537LL9crHL5HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493336; a=rsa-sha256; cv=none; b=b/QwTSsgWyWneHlvTC+guR7+UFwobyY2JR7YmnCqZ+re54KxXUPx+oQHCrf5wyeajiH8mF qJi2388QLEGnRMbzUb4srfDse5I2CKNgTuaHc2eCu3z6LGSYvhsmJ9GUvG0/6kvET95gPl 3uxUQsdAyGZX/ioC5K31+0XB+9O0cdpP+woCyrNuXEbC7JiWmNBpZSV/pJ3SKbB0oGpZ1J n7UJ3ZtTXAvWVekLCvMF0ikqy/1CJwJQ1v/OCSvrDYE3yV/bmrbejYVu1ubtDy6z82cIgL N4K8vXh2HcQNgQlRprtllPaS1xt7srGiPsDOVlCfGZrPgvoIE6naZkTsWJoy+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CZfpfOcqj2wYU20Hqfjl87D8IPng2DeWjr22XdV8m/k=; b=vH4QcFk0wUujwMkQR9t8jqIhAvjJXdYztytvh/J6VqBrO8LnOGYGHa6ROPoiuG/0yigWKd i5R2bpwAIowG+hAIvd3GFGFoCX4vWm5dMC7wzs9mHet/Pak040Q1As/tZHA//prXUqphDZ 80320zknhsJT3w56ZqIjM9F4RGIe9PHoTqHvPxoiNiH7/5xz2PirVWfbMB9DDmhn+icDdT VDFeCJwxHktwlK34mLdaIx1X5f6WH7lTdV8BMG9U7QZZDWsOEix/Djwb/WCzH17/oS3VZJ dzL8wLY6ga4oFEPjGsE5ZkN2ZulDGrQqrLc8MOvNZdP3fgVyk89KeSw6KV8ZPA== 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 4VldqD5bwbz13Gd; Thu, 23 May 2024 19:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgGM0082865; Thu, 23 May 2024 19:42:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgGSc082862; Thu, 23 May 2024 19:42:16 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:16 GMT Message-Id: <202405231942.44NJgGSc082862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 9a9677ec1cbf - main - linux: Update linux manpage to mention mqueuefs List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9a9677ec1cbf46a86a032d18e790aa0fedc82e28 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a9677ec1cbf46a86a032d18e790aa0fedc82e28 commit 9a9677ec1cbf46a86a032d18e790aa0fedc82e28 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-05-19 09:37:12 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:47 +0000 linux: Update linux manpage to mention mqueuefs Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1248 --- share/man/man4/linux.4 | 6 +++++- sys/compat/linux/linux_misc.c | 2 -- sys/sys/syscallsubr.h | 18 +++++++++--------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/share/man/man4/linux.4 b/share/man/man4/linux.4 index a50e1513ba43..212dd2526f3f 100644 --- a/share/man/man4/linux.4 +++ b/share/man/man4/linux.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 9, 2022 +.Dd May 19, 2024 .Dt LINUX 4 .Os .Sh NAME @@ -162,6 +162,9 @@ file descriptor file system mounted with the .Cm linrdlnk option, see .Xr fdescfs 4 +.It Pa /compat/linux/dev/mqueue +symbolic link to a mqueuefs mount, see +.Xr mqueuefs 4 .It Pa /compat/linux/dev/shm in-memory file system, see .Xr tmpfs 4 @@ -177,6 +180,7 @@ Linux kernel objects file system, see .Xr fdescfs 4 , .Xr linprocfs 4 , .Xr linsysfs 4 , +.Xr mqueuefs 4 , .Xr pty 4 , .Xr tmpfs 4 , .Xr elf 5 diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 14c36669efc8..aa6c3923067f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -29,8 +29,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_posix.h" - #include <sys/param.h> #include <sys/fcntl.h> #include <sys/jail.h> diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 8ac3f55596e6..2e0a362f90ad 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -213,6 +213,15 @@ int kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps); int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); +int kern_kmq_notify(struct thread *, int, struct sigevent *); +int kern_kmq_open(struct thread *, const char *, int, mode_t, + const struct mq_attr *); +int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, + struct mq_attr *); +int kern_kmq_timedreceive(struct thread *, int, char *, + size_t, unsigned int *, const struct timespec *); +int kern_kmq_timedsend(struct thread *td, int, const char *, + size_t, unsigned int, const struct timespec *); int kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, const char *path2, enum uio_seg segflg, int flag); int kern_listen(struct thread *td, int s, int backlog); @@ -386,15 +395,6 @@ int kern_writev(struct thread *td, int fd, struct uio *auio); int kern_socketpair(struct thread *td, int domain, int type, int protocol, int *rsv); int kern_unmount(struct thread *td, const char *path, int flags); -int kern_kmq_notify(struct thread *, int, struct sigevent *); -int kern_kmq_open(struct thread *, const char *, int, mode_t, - const struct mq_attr *); -int kern_kmq_setattr(struct thread *, int, const struct mq_attr *, - struct mq_attr *); -int kern_kmq_timedreceive(struct thread *, int, char *, - size_t, unsigned int *, const struct timespec *); -int kern_kmq_timedsend(struct thread *td, int, const char *, - size_t, unsigned int, const struct timespec *); /* flags for kern_sigaction */ #define KSA_OSIGSET 0x0001 /* uses osigact_t */ From nobody Thu May 23 19:42:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VldqG2kCRz5L9X9; Thu, 23 May 2024 19:42: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VldqF6wJBz55Cb; Thu, 23 May 2024 19:42:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoNp6BCRwce401HbekPJOJDGHAA5VhD9aTkTiHDBq+A=; b=FSRPZIKfZ7iPD5JnUg203ys2eKQKqE7vC0W3GmaolgnRD8LHZaA2YY/hqOjTfARfk3U29T i5EcyAiI2w2E+EQOhwXADSAN796d8STPD8WAo6oKF1SBnKD+gLSb1PqsosonBZ6XHAI13w gquGHjBFGDL5dJQTiwBBBQ+EyBaxT0ONOomUrn5OCeTTJdYUOnEaKhR44V6Py7oxFOIrww l7PXZmQ/GsIhgom+z5ba4/mYln9s6/M0cJ9/yzH7jDQiLkW8dZlR82ZotgHeGeZyuTU0l1 jNdAah5ysNua323y0g4x8P+0vrrP3eD4B9ayXt0LiIESP0qwXojtjCdGVw8G4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716493338; a=rsa-sha256; cv=none; b=yS478VpqG7JHCHSnn5wgKw+f6qxRjF1kdfypnS4oLxEwsm7VRiuj4mBU7x/EBH+YlBZ3sp qJ3KJvz4qpBtTeOIJDbZTjqWfh43XSCZRx5c7zhFS3a7ssLqn+hXA+uZsCKeN3QqrxWsfb 8wCAyd0gijPSoHc4jw8PlJ8IJAixAIVK+8r7VacnIjcTNVRvlr5dbcMEa1uAGlfanDuytH Ez3MiRDMeBP8JFrVOO6flatANFL63ZPCH7gQ7q767C8e512/xG65bIiBXE1lg0tH4Xzdq8 jBurN0gJql084xk7XaM3wpNn094Tq9moGrRDiDGcA9xKOOKqXyIbv3M3si74TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716493338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HoNp6BCRwce401HbekPJOJDGHAA5VhD9aTkTiHDBq+A=; b=ZF114dPBnkOu34oaRBDcGzM57AM9jChkUMJG6cJ+KvMtIYIvDChSn0FcrwiTgsOuiQvpYI 7CkH3Da+al3cCeBamtavp7Ck8hGNzwqvpzjdP1cK20R1fxCnD6+36K42egNQG0rMo4UX5v 8BjjurotlxTBWsYPkESp3PgL/RD8dt5/gaj70xLBjbEVm/T+mACGqV41yxs/f4cJNKVwZc b07Kl70UGNO7G7q9JyBTIjpuSThf40BeKCKotATVsPdtJDBC5DaD8nxM8s19ilXYL8Y3Lv XvUhhdZJ5yizdEF9iZyfVAh3QkzYg+0pY4Co8IF2otjNXpJX7cbtN+HA41Rmiw== 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 4VldqF6Xq4z12ky; Thu, 23 May 2024 19:42:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NJgHuO082917; Thu, 23 May 2024 19:42:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NJgHNf082914; Thu, 23 May 2024 19:42:17 GMT (envelope-from git) Date: Thu, 23 May 2024 19:42:17 GMT Message-Id: <202405231942.44NJgHNf082914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: bedbaee805cc - main - syscalls: Regen for Linux emulator additions List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: bedbaee805ccb22d723d01ea60c24913f8a9d515 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bedbaee805ccb22d723d01ea60c24913f8a9d515 commit bedbaee805ccb22d723d01ea60c24913f8a9d515 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-23 18:54:03 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 19:40:47 +0000 syscalls: Regen for Linux emulator additions --- sys/amd64/linux/linux_proto.h | 4 ++-- sys/amd64/linux/linux_systrace_args.c | 8 ++++---- sys/amd64/linux32/linux32_proto.h | 4 ++-- sys/amd64/linux32/linux32_systrace_args.c | 8 ++++---- sys/arm64/linux/linux_proto.h | 4 ++-- sys/arm64/linux/linux_systrace_args.c | 8 ++++---- sys/i386/linux/linux_proto.h | 4 ++-- sys/i386/linux/linux_systrace_args.c | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 065c82d7db50..15e1dfc1a444 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -780,7 +780,7 @@ struct linux_fadvise64_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_settime_args { @@ -875,7 +875,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 8a350eeda6c0..0126fdf7aa5a 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -1676,7 +1676,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 222: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -1849,7 +1849,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 244: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -5484,7 +5484,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -5769,7 +5769,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 59bb85e742db..ab0edd99df42 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -846,7 +846,7 @@ struct linux_set_tid_address_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_settime_args { @@ -944,7 +944,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 994f80b92d81..a37de1d753dd 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -1791,7 +1791,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 259: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -1967,7 +1967,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 281: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -6151,7 +6151,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -6445,7 +6445,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 1a5335af05b1..ae3d8569df58 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -459,7 +459,7 @@ struct linux_delete_module_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_gettime_args { @@ -701,7 +701,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 151d46238d1c..73b3bf107486 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -848,7 +848,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 107: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -1445,7 +1445,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 184: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -3848,7 +3848,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -4792,7 +4792,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index f894310b01c5..aa2dfbb68745 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -846,7 +846,7 @@ struct linux_set_tid_address_args { }; struct linux_timer_create_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; - char evp_l_[PADL_(struct sigevent *)]; struct sigevent * evp; char evp_r_[PADR_(struct sigevent *)]; + char evp_l_[PADL_(struct l_sigevent *)]; struct l_sigevent * evp; char evp_r_[PADR_(struct l_sigevent *)]; char timerid_l_[PADL_(l_timer_t *)]; l_timer_t * timerid; char timerid_r_[PADR_(l_timer_t *)]; }; struct linux_timer_settime_args { @@ -942,7 +942,7 @@ struct linux_mq_timedreceive_args { }; struct linux_mq_notify_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; - char abs_timeout_l_[PADL_(const struct l_timespec *)]; const struct l_timespec * abs_timeout; char abs_timeout_r_[PADR_(const struct l_timespec *)]; + char sevp_l_[PADL_(const struct l_sigevent *)]; const struct l_sigevent * sevp; char sevp_r_[PADR_(const struct l_sigevent *)]; }; struct linux_mq_getsetattr_args { char mqd_l_[PADL_(l_mqd_t)]; l_mqd_t mqd; char mqd_r_[PADR_(l_mqd_t)]; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 70036d227707..4ec9ca460802 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -1828,7 +1828,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 259: { struct linux_timer_create_args *p = params; iarg[a++] = p->clock_id; /* clockid_t */ - uarg[a++] = (intptr_t)p->evp; /* struct sigevent * */ + uarg[a++] = (intptr_t)p->evp; /* struct l_sigevent * */ uarg[a++] = (intptr_t)p->timerid; /* l_timer_t * */ *n_args = 3; break; @@ -2002,7 +2002,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 281: { struct linux_mq_notify_args *p = params; iarg[a++] = p->mqd; /* l_mqd_t */ - uarg[a++] = (intptr_t)p->abs_timeout; /* const struct l_timespec * */ + uarg[a++] = (intptr_t)p->sevp; /* const struct l_sigevent * */ *n_args = 2; break; } @@ -6225,7 +6225,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "clockid_t"; break; case 1: - p = "userland struct sigevent *"; + p = "userland struct l_sigevent *"; break; case 2: p = "userland l_timer_t *"; @@ -6513,7 +6513,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mqd_t"; break; case 1: - p = "userland const struct l_timespec *"; + p = "userland const struct l_sigevent *"; break; default: break; From nobody Thu May 23 20:04:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfJb4FRcz5LCx3; Thu, 23 May 2024 20:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfJb3dZVz3wyF; Thu, 23 May 2024 20:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716494655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NCuTtKmSHVnOpwkZTdqpVDqp9oSpUAqC6UAu/xEmSU0=; b=Tx9JKaVF0Wc4p0Mq/pYhLrCdx/+qITnKk/gfpVQSL01IycDmdINOYRTvta2Og8p8WyCXGx 3wanHtXvoJ1JSvr+foVzaDQH8U1Cg5e6hoktzG4JA+PYkLj332AaHGwnj2LS9ddIgW2fg5 Ss5KbYfH9cVWkLF0zOYJMX7f7Hc3UlGuvD9aN45CVgYnotlzhVMGWZJyTCFpPin2M+8NO6 KXPn3zldyn5byBTB+TEllBQxltvATsxAut8lYBE60iqXw165+nUi/4EXc5W7RL0ScranSd Wu5X+0VHOddvPE0azdO914+c+irHvrwjvBbtg5PNE05WPzo8xEsHi1vnvdAeSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716494655; a=rsa-sha256; cv=none; b=hlhyHu5VTYHKJOlpqXjI8sTQHMVv389MDtakC0GDh2BIM/+qvMW/NOETbseQLoV21mihfG MvbiaslMg7gokh3o2srYFHGW9Hqc9AxKQqhO0+c+XAB3GGSE4itJ12Wax1uazlO441VvE7 JoJ34vMyF8K6Lotw8Xy0VdWNo+Si7lx45KNjuURv6VOfbcgSv6vmxCAFYB1eBLDaY7x9M1 e29AZ2CMMUzYvHeVSCrtdHGqX6eoXY/WAV0dH+g/he+eeGu2pHkX7r7I/qMhjTZSqa4JpX yNQDZOULKxpRP9KwcmvFcvYIqru5OiiRw4b7pRA1pTA0w4Xxr/sr+6skgRNbRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716494655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NCuTtKmSHVnOpwkZTdqpVDqp9oSpUAqC6UAu/xEmSU0=; b=A0PNN7AlOzz06ZQO8jZ4+xygvI8+6m2cmCqUgW+mNTYRFZNcxaYFTs//pOrDKcIaIMrZhw bmCac3XRyOQkkpIGCoh1uXvaekM7KNcsDMVqWQnR/KhGCzkJYJcmQT3gJwU/DwDgza8rZp LKcfa6iLkv0yDJaaDASbbDzz1lU5UHyx/K5khKUFB5hdY6Gim+m8SwC01IMBfGwSmqh924 fB7EJvhffFDjKhxcnz/t9EHzsu4SGsnBC7WOlzxSqAcIUfjFl9LX6oe7GEJ6/eJ/n3/ic2 Tpsc78A0CkUkMFWKQQlzvSiwjHyG6jIuA4Uytk+NyHSiwfeAKOyzfvBQpG0hYg== 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 4VlfJb3FD5z13Wp; Thu, 23 May 2024 20:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NK4FnZ021453; Thu, 23 May 2024 20:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NK4Fjx021450; Thu, 23 May 2024 20:04:15 GMT (envelope-from git) Date: Thu, 23 May 2024 20:04:15 GMT Message-Id: <202405232004.44NK4Fjx021450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 2356b60be702 - main - arp(8): allow -i with -s List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 2356b60be7024b10ddc4361fc22f96205b55fbbb Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2356b60be7024b10ddc4361fc22f96205b55fbbb commit 2356b60be7024b10ddc4361fc22f96205b55fbbb Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-05 18:21:06 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:02:57 +0000 arp(8): allow -i with -s arp(8) usually disallows adding a static ARP entry for an IP address which is not configured on a local interface. Change this to allow such ARP entries to be added if '-i' is provided to specify the interface the ARP entry relates to. Due to limitations in the kernel lltable, this still requires that a host route exists for the target address, but allows static ARP entries to be configured to proxy ARP for, e.g., local jails which use an IPv4 address with a /32 route. Reviewed by: imp, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1220 --- usr.sbin/arp/arp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index e5b94ca053e1..8cd18d875820 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -144,7 +144,7 @@ main(int argc, char *argv[]) if (!func) func = F_GET; if (opts.rifname) { - if (func != F_GET && !(func == F_DELETE && opts.aflag)) + if (func != F_GET && func != F_SET && !(func == F_DELETE && opts.aflag)) xo_errx(1, "-i not applicable to this operation"); if ((opts.rifindex = if_nametoindex(opts.rifname)) == 0) { if (errno == ENXIO) @@ -375,7 +375,7 @@ set(int argc, char **argv) } } #ifndef WITHOUT_NETLINK - return (set_nl(0, dst, &sdl_m, host)); + return (set_nl(opts.rifindex, dst, &sdl_m, host)); #else return (set_rtsock(dst, &sdl_m, host)); #endif From nobody Thu May 23 20:10:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfRj2BWTz5LDR8 for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 20:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfRj1ZBRz3xdH; Thu, 23 May 2024 20:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+1hne+cIxYqIFsnoSa35bhHf28r3YL6s6qaSZS6oGA=; b=WjsKd8MGO7RMGn6HX37ZA/vQfqhZgusEgIwJdI8Y75iH6YAy/GBaNJQEiBTnY++kVaq2JK I2WUSInlDIMW/4S/D65JxmPd58Npa3n4zTCfHCM5Hyd+kLJbo9olym0iTpk20VgQcH8h4z WlcX/rmxD3QqZMQKzf/wApfxR5GOayIB9w829nLDumAtpTL4KvMb+gwrTCl68ohV4mmeu2 h80EOuhuB28PXlPBzrw9F6k5/qK6WPE9mH/oFNudneUnW3zbUFITlzpF60HNFA90vgrgPq G82igabC+GBmvAjMz3JmfFU7F9Y6PTMbDOybXXJitndUJzWuWUwcDieXuFizkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495025; a=rsa-sha256; cv=none; b=K+LQVCv/q5Y0RVtfqBpfMoRPcwR2g4HDDmcI3lQEHXRxt5yMC8X1hOF9Y0+CFmKzk301Tm omvF9PSXmpUimkTnlVp5Zi0L0YYKVJ9iCbzF3DJNH6RgptAT9vumUTPOPFErnPr0L5D2ZT /EYeH+yfrzGtp7jw5EXf3QNiHPtIRA7rSrYtkmeM+qCK4HV3X+EEBdPY8lXaHIu6MKHiQZ 1nHPJ8Hy2ibnKsN1UrH+2YcEqw2+xvEOz97xxe+Oby8h7UyyFQ5dKbVHjn5tvZLfI74FD0 eDfygol3f1xANXIW+ZzjTlpymCL4wb6LUhEU/Xn6p4AlJR0wTl38GAEHicoMtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+1hne+cIxYqIFsnoSa35bhHf28r3YL6s6qaSZS6oGA=; b=ROIL8ISAdD9LO3hDHS+8n6wliaYISEAP5KkldsjMh3wj/WZb3YOCgBcvvWsPFJ5teyDW1y Opnez+b0Im9BOoc+LTI+u1ZxkLd7cTkvSIscf8430kQ9xen0w5zCKvlUzd8u2CQJh2JE5t iAJO10HPCKheq2OvJ7WekW25OX2BRn1bxpMhezA8bTp9EyqduVoEI/udH/LqdfriDD+wZ8 3q6CEK5u5LjaJWnd7agVVh+hKp+JsdELdXr4lpn/IIHO6pGWc37UBHT7kA1GuzxKzjUkAx /EN8kO9K0wCTkCWVmktAf1QG562uWrcaA/MjdPz++THfkw45AYMNk3dyHiqS6w== 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 4VlfRj0vPrz12rV; Thu, 23 May 2024 20:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKAPEw030881; Thu, 23 May 2024 20:10:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKAPA0030880; Thu, 23 May 2024 20:10:25 GMT (envelope-from git) Date: Thu, 23 May 2024 20:10:25 GMT Message-Id: <202405232010.44NKAPA0030880@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" <sjg@FreeBSD.org> Subject: git: 3c2ab5fddc57..29efb3dcaedd - vendor/NetBSD/bmake - vendor branch updated List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/vendor/NetBSD/bmake X-Git-Reftype: branch X-Git-Commit: 29efb3dcaedd9cbabc6f96f35545baf2c8b28501 X-Git-Oldrev: 3c2ab5fddc576e58f3ffa70dc5fa95144646a513 X-Git-Newrev: 29efb3dcaedd9cbabc6f96f35545baf2c8b28501 Auto-Submitted: auto-generated The branch vendor/NetBSD/bmake has been updated by sjg: URL: https://cgit.FreeBSD.org/src/log/?id=3c2ab5fddc57..29efb3dcaedd 29efb3dcaedd Import bmake-20240520 From nobody Thu May 23 20:10:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfRj4DvDz5LDL3 for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 20:10: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfRj24dWz3xlT; Thu, 23 May 2024 20:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JAdCXoE0bjgSCMScLr3RMTBPpKh18BrqRTbKg74htko=; b=SipZJskEB78lbcQhxW1ieBSzdOZ5G4IDFw+Y+O6vWVZ9hfN5B08f5Jlp2DKmwWlgqMNQEx guQnl0/3xwYxMfh3/Tm0J1uLkG3BNYSgsVkG4t3jIQSUV3OoFYC4WcU/drDCuO/nJTTlI1 tjAnoLKd5CG+G/WlTq0Y9BtvI6ZF77nLmQq4Tbs+QD7+0xMsxpnTUHQ8jpUWKywgo1YCMz V8u5+M2B96khJP+R9WCa3McGJcwQ7YkizLI/Y5H33XfRcZAUvvhCFLubs462QADDh5dnHe r0QEA5cAdOU+6H1ftD09O7/3jUjwQIpdHgQd0GPOVGCVIXd0CFsQO2wwDdiwKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495025; a=rsa-sha256; cv=none; b=tiJvc8C1DPsdEuscfH4VqPnCDr0IMF0F1zd4uje7HmG4b1YkUwwkI0TB3wyp8mlN4hnHE9 PH7VjsvPi43kdR3KqPdHM/R5iRlkscgT1ruXi6CoAsD4vd3pTMH4oOMeCRUX0Wy7zR61Ky srYgtyU3iv3j0Efz8xleZEKpQj9LGeV/fQ8kqGzF9h60kZHVtu4yMzBRJUrsZrJjr0j1bJ 64RjLkfsLLJ9bb+JWS36pwRe2UdBDEZwPCdYKfzBm9vpRC9ho83SjaHrEM7oQp0JPJvq2I +Tv8jSgerPEZ4RnB/rD/exiaFBZkyF1Hc+HTimqHvucZgYq1uSzkQQb00nb7iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JAdCXoE0bjgSCMScLr3RMTBPpKh18BrqRTbKg74htko=; b=Y6Gmxk/Eff91CYno69lWo+xIa6JAFtpUJ/yxMxTDkrF5fK+Jq/mcJEs6JTHnR8WqQkYJZF yAMiaLqBC/nnm9niQQyEDij0fnP7PEYH6asqiVs38BWQsaSop0849x7FNOm/jWuAasCCqQ pg/sF4Y0aUBsg0MOMlPhmpdTFo+4U87qXk7ZW8RO61dYScCPnPhx1UzwEmPaFmxDPiJqUx CJnIGk4v2YHqrVUY1UxITEAw0vsELKMT5BjX6bkpRVKP/bQ/9gnDZB7EH7Rkg8yRH7YtGo s2q8ziwgPBvFWaQnu1xLzUXYiMXPDp9JIRp9YPurO0G0QCos51nqycRIP7tq9g== 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 4VlfRj1Zpwz13JJ; Thu, 23 May 2024 20:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKAPhJ030900; Thu, 23 May 2024 20:10:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKAPJd030899; Thu, 23 May 2024 20:10:25 GMT (envelope-from git) Date: Thu, 23 May 2024 20:10:25 GMT Message-Id: <202405232010.44NKAPJd030899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" <sjg@FreeBSD.org> Subject: git: 1e674c83f432 - Create tag vendor/NetBSD/bmake/20240520 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/tags/vendor/NetBSD/bmake/20240520 X-Git-Reftype: annotated tag X-Git-Commit: 1e674c83f432c010f9e965946e981c5699accdfd Auto-Submitted: auto-generated The annotated tag vendor/NetBSD/bmake/20240520 has been created by sjg: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/NetBSD/bmake/20240520 tag vendor/NetBSD/bmake/20240520 Tagger: Simon J. Gerraty <sjg@FreeBSD.org> TaggerDate: 2024-05-23 20:09:09 +0000 Tag bmake/20240520 commit 29efb3dcaedd9cbabc6f96f35545baf2c8b28501 Author: Simon J. Gerraty <sjg@FreeBSD.org> AuthorDate: 2024-05-23 20:08:58 +0000 Commit: Simon J. Gerraty <sjg@FreeBSD.org> CommitDate: 2024-05-23 20:08:58 +0000 Import bmake-20240520 Intersting/relevant changes since bmake-20240508 ChangeLog since bmake-20240508 2024-05-20 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): Merge with NetBSD make, pick up o dir.c: in FindFile restore last search of .CURDIR even for includes, as a number of existing makefiles are broken otherwise. 2024-05-19 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240519 Merge with NetBSD make, pick up o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR. Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty. o main.c: no need to set .DOTLAST in sysIncPath From nobody Thu May 23 20:14:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfXL1vBTz5LF8L; Thu, 23 May 2024 20:14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfXK71QGz40Rs; Thu, 23 May 2024 20:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEbRIKjE2LTQ3inizDz7rOcXkH9Z1CqhzILQSlP/+Ro=; b=xYX3plvYu+yofqUCLvUFBt6uUasGzHlIv/EtVhKp7pOXSEBKYy3DbPa9eSbxJgRWrsSsz0 FZgmYXPojGa97MBVP5/CLQ+YlfwxRFj4mHc0z0S6ols0PJfxl0hflMc+nMPr0CjHK9p7vV PLWPQ3sAFh+4V0yuMU6P+9OyhjsA85LTMAF+zL/juiT+7uimHfqXUOPaeId9MQAOhOWP90 uz8HpMqnWpYtI6c36ErpRyv4LYo9ArvI83geh1kOR9AMjwZj5XE53/BJG9fBFfbWyYvfqZ +w248ToxIcbLLLOCLHZZsWKXeEYOTLRlUrFFl/x14e2obRV28OLG1yjlhUgjAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495266; a=rsa-sha256; cv=none; b=TxDlP0eyM0MgLirwBDkYrtMMb2DX2MelVgUqYB9adyDmS1dFYE9uKX4VoXlndx39tL+UGF 3nVj/csEGf0qDneQ9V46UnKHc8rSdygPYETAb9+bGEiFinpw2DnG5LhuH+vhA0LfKZQWN+ YMlv5bfNmN5nsVLWEPmXU3pWba9cFNR4XkWTqDDDgxAEoxeP2LImiJxkaid8Yql4QlRkt4 queLltbCEEFJxE7wixdEYUwltuyWLlAac8QymGRuHJFrkLfl2lIVWxslJ3caf12TJm4f1j lNNkDm2Ty7LGm2vuMDnQ4j+FiRgS4chniq6r86NcQlUxNCqtE1UVm7ufcqeKjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FEbRIKjE2LTQ3inizDz7rOcXkH9Z1CqhzILQSlP/+Ro=; b=ny7ZuTs4GFdVI58IkI3HZ4odn9Zu0HaMfyfnoaAotoQB2z5rDIU0GV9I4A6VMV8zUhozER BhwaNGq+pflGOv31Fttc5mms3Tls87JuQZMw90XESjQGWAk9leI9SsEKYK75b83g1uPxSk q75gRaj4SxwP4juBMRlFW+9kr1ticKeXQwGM4prnGcO6jeT23MjOSCv/uymNZDjjFKFeYL /Q/Ig9m+Zgf1n6dMn2VXOuN0z5aLANIVQ8UUHNGRaIk1DJX2YPBmOjPy9fDui+vs4ReJkz 3AS7PpODRHy6mBe7wiTXlnI16Q5LI6XRV5SDoxMFmDIKtFkC72OhDhCsLZHMfg== 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 4VlfXK6RvWz140Z; Thu, 23 May 2024 20:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKEPhU037993; Thu, 23 May 2024 20:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKEJ1l037976; Thu, 23 May 2024 20:14:19 GMT (envelope-from git) Date: Thu, 23 May 2024 20:14:19 GMT Message-Id: <202405232014.44NKEJ1l037976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" <sjg@FreeBSD.org> Subject: git: 9d3df31ec06f - main - Merge bmake-20240520 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d3df31ec06fe91c5c67da464f11408474d57174 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9d3df31ec06fe91c5c67da464f11408474d57174 commit 9d3df31ec06fe91c5c67da464f11408474d57174 Merge: 2356b60be702 29efb3dcaedd Author: Simon J. Gerraty <sjg@FreeBSD.org> AuthorDate: 2024-05-23 20:11:02 +0000 Commit: Simon J. Gerraty <sjg@FreeBSD.org> CommitDate: 2024-05-23 20:12:43 +0000 Merge bmake-20240520 Merge commit '29efb3dcaedd9cbabc6f96f35545baf2c8b28501' contrib/bmake/ChangeLog | 15 +++++++++ contrib/bmake/VERSION | 2 +- contrib/bmake/dir.c | 51 ++++++++++++++++++++++++++----- contrib/bmake/dir.h | 3 +- contrib/bmake/getopt.c | 6 ++-- contrib/bmake/main.c | 6 ++-- contrib/bmake/parse.c | 6 ++-- contrib/bmake/unit-tests/deptgt-phony.exp | 2 +- usr.bin/bmake/Makefile.config | 2 +- 9 files changed, 71 insertions(+), 22 deletions(-) diff --cc usr.bin/bmake/Makefile.config index 55bc4a4370ca,000000000000..e62d207b70ac mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,28 -1,0 +1,28 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# + +SRCTOP?= ${.CURDIR:H:H} + +# things set by configure + - _MAKE_VERSION?=20240508 ++_MAKE_VERSION?=20240520 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc +MAKE_OS?= +DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk + +EGREP = egrep +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H +LDFLAGS+= +LIBOBJS+= ${LIBOBJDIR}stresep$U.o +LDADD+= +USE_META?= yes +USE_FILEMON?= dev +FILEMON_H?= /usr/include/dev/filemon/filemon.h +BMAKE_PATH_MAX?= 1024 +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} From nobody Thu May 23 20:20:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfgR0sWMz5LFRY; Thu, 23 May 2024 20:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfgQ6cfwz41S9; Thu, 23 May 2024 20:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8PICA2kQ1BwVjl0xlbt6DOhohJqKCv3yd56o2SgNQ8=; b=SN6fOLMETp72rxq+SxeL3xHcgEN1pfQe2u5h8I4P0sFl1TGHGkLE14P+CaqNAdWQn5avCR IbnsTNWx6OhtpVtoxZ2I6zgkqs7g8mrrAtld1ouPeSZcRUnS9HCyZIu+2bRz/KiE1usar7 up11ptuL/7EJRQPIlVtl4uEzpZ19et2UndsI+skwToAmEksOKXIACN4+KxoSfI7QjsEQNk wS411Sum4dy/yusCDXVIgBXHpmxsnLNpjZMR9BWL4VgEEPGx6XXgWy02qBqJsHTmZ+RgRu Vk5mIF4pg4lW/SrAQAAjPS/34u7uoQNLDffPK9oVgPT9FvlGbrQbukbxFp0QfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495634; a=rsa-sha256; cv=none; b=FVYHMRFvDY3I/upyP5qB0BhCAEMT+E6OfiElkL5JLaUl9CiI5EzcsZafojHdRBlYg/3yJP JsEFxWE4jXTD0YG/T45UJ7yu1UFkuUq8bNLg0bEbFf2uvNmC9iaJ+R/sZ607YpmMXXsmr7 f71+mxeqJ+L70aTuXJh+XwMdDLm2MYmt3HC1imT7p+I67k0FdXszs/c/a64o4Qbo47CbwF FAYnRt6nNxRr9A0Y3qSPTF5we728MfbBhCXHMnL+6NmSsWqWMwM8tLeYCBB/EcK/saupDh 2mIvnXP7N9pRE3lhzYPMZHzvDWIAds2qiMIgIgNNk6Rac+s0Y3Z4VjOwijKM8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8PICA2kQ1BwVjl0xlbt6DOhohJqKCv3yd56o2SgNQ8=; b=IZKx/BxYduYpvmR9fKHpfBuQzeKpWrV90rdmue1RWjDuLGmD73o669t+YQD5IAJ9wtgNcd SeyaUWTF3OBGiUqSRm5Tj83XjDjf2XdRyivVh3yfWzuslq2DeD/2/aAST6rAdZfE9tvcWa CsyPv9xO9SCqiKC2tKaTvrP47sYuLxdPwxZUJc7U59hXaBEZcodj/wfD048ujufzTVB+oL AXLUnzeekqayOIztdKVbPPiaS5UaPp7+fhkLVznMeqgDNYiRTbcF9Kmi2uT4izcb4DbRhl CVE7Owhghie14qv4RMcNgqtHfCoMRxZBTBXn1caeu19rsc6Cr552JJGAjsj7ww== 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 4VlfgQ6CYQz13Zv; Thu, 23 May 2024 20:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKKYOa047446; Thu, 23 May 2024 20:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKKYmE047443; Thu, 23 May 2024 20:20:34 GMT (envelope-from git) Date: Thu, 23 May 2024 20:20:34 GMT Message-Id: <202405232020.44NKKYmE047443@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: fe136aecc2a0 - main - tcp: improve inp locking in setsockopt List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4 commit fe136aecc2a0ae9d9cc5f78b2d1430cd33b6b7c4 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-23 20:14:27 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-23 20:19:12 +0000 tcp: improve inp locking in setsockopt Ensure that the inp is not dropped when starting a stack switch. While there, clean-up the code by using INP_WLOCK_RECHECK, which also re-assigns tp. Reviewed by: glebius MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45241 --- sys/netinet/tcp_usrreq.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 3e705181d5e8..9e0a702a6c0f 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1709,11 +1709,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) default: return (error); } - INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - INP_WUNLOCK(inp); - return (ECONNRESET); - } + INP_WLOCK_RECHECK(inp); } else if (sopt->sopt_name == TCP_FUNCTION_BLK) { /* * Protect the TCP option TCP_FUNCTION_BLK so @@ -1728,8 +1724,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) if (error) return (error); - INP_WLOCK(inp); - tp = intotcpcb(inp); + INP_WLOCK_RECHECK(inp); blk = find_and_ref_tcp_functions(&fsn); if (blk == NULL) { From nobody Thu May 23 20:22:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfjJ25Nsz5LFfS for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfjJ1fLrz41s0; Thu, 23 May 2024 20: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=1716495732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mKAgvisDSZtrLeuJBLN2rwAy9LyXXfb0QfW8sd0UE/0=; b=qcNJxcBSufhQ2LpI97CdaF5R8vedGltFYHnmdoMxw8+S2sUSzUyuxwqhR6OstqEqKDUuVl CwFkzrvvBNkRx6VGg0LO627KG4adKjXULiLbF02PgaMXhDitkpOYCx9lo/QQSVoLTqrIba 6YCgHp+V37BOec9bNiv41RqDe0M21m9sDwx/RM3nDx347YMiAXrbrMDCu7s68xdE0VV6HK Etg4p7ZS/h4ETTSKzMNq4Dzje1KmtK26ZSHw0qu8yRtN1TkLVJoqH/I7+9MQbE6lRhXSoK 2OeE9oMAMfm/kA8lDyo4gjf1RVAnRDJ1JkuLkbwmzYZ3FUw0jiVoyMyyVND7ZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495732; a=rsa-sha256; cv=none; b=cT6kYg/wv/u3sWvHcOXadXj4rxSX2PaKXETNbS14KT3oek0dNrEJlxfVbb7k0UUes2IyfG eZyN5FuuoIEoUGNokuIR48u1H19Y92aqTzcDRmkHnIujsNIwOmjgxd6yGCunoJujNb4YR2 07a4bTWe2yktjFNO/fdcODS4t9BUcvrr0McYsQxv254O2J502o7H/+L9cH/YKQBinl/lrA pSkVT4j2boUu28k46tYs8xCpQIs7kCtPxra+VeWYWVmzsaWONg1ljgB+gS4z3ZQ2mqdAv2 q1b6axzMxDPr+d9ByPCS4k+N2gJeW2q6NadGf9we6wcjlYf/xt6yLor00m41VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mKAgvisDSZtrLeuJBLN2rwAy9LyXXfb0QfW8sd0UE/0=; b=IgurcNCixwDJB9NBLJXMFQkFeEX/fajGOjv2DJzRhKCClM8iwIgBIOErPmmhrs92MPQ4PU u4WQtZn6tokkAMCIOAr8Wc4cQ4YyS9kFwD0tY8lk9hkE/LZBuLIFaN8p/JmwyyeUdLfC+u e06bVuCBrcb4RsZGM10204FmX1OJI37EiJ7vqJFBl8pwyflNMStsk2t6Bxqgm6YZkfgrpO VZEa7kldftd308VdXi7WeI5sKeXFkNRQbl6cvQ68CQsvmF2Qtoa82aw35KOyv0Gn0NFZ+0 qyiU06X2dk4v7yBbr+nYaqrhrN9TubUBwE8KGAtANW6G95GOn4ICLikDQGDdYg== 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 4VlfjJ0xvmz13hY; Thu, 23 May 2024 20:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKMCqW053499; Thu, 23 May 2024 20:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKMCds053497; Thu, 23 May 2024 20:22:12 GMT (envelope-from git) Date: Thu, 23 May 2024 20:22:12 GMT Message-Id: <202405232022.44NKMCds053497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric <dim@FreeBSD.org> Subject: git: 9a7cb8417a2a..c6bcacc7c9d8 - vendor/llvm-project/release-18.x - vendor branch updated List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/release-18.x X-Git-Reftype: branch X-Git-Commit: c6bcacc7c9d89ff87e3a15e4a8919edbfc237800 X-Git-Oldrev: 9a7cb8417a2a13bcb7a300c65c43960389b85456 X-Git-Newrev: c6bcacc7c9d89ff87e3a15e4a8919edbfc237800 Auto-Submitted: auto-generated The branch vendor/llvm-project/release-18.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=9a7cb8417a2a..c6bcacc7c9d8 c6bcacc7c9d8 Vendor import of llvm-project branch release/18.x llvmorg-18.1.6-0-g1118c2e05e67. From nobody Thu May 23 20:22:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlfjJ2K5Xz5LG2B for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlfjJ1pnmz41gr; Thu, 23 May 2024 20: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=1716495732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H/JWNaYeHkXQrcMQhWa1nlXlPNFoJ14vCBXIHmFetY8=; b=tzRLyVwrPvq4r8j8d7aB87DM0HFtZcoYrHcuosOCjzMQawvI5YkLmTRTpWyIQATcUhXg5I 1SrXWKa5s3FDKHi1LbI0eOMxFNuoEsV8eUrNPLXLivmYEoRvNV1YVkjtR1lfXKbqzfJg2Q w8ZeDppiQz5+DNlcDr4pZnUaam+qnRNKUVJZK0jOPj5/EtY15V/1IGspt9QrJyUO8TPhCQ J8rElJ+D6EVcuTp38Y6B+RHg3cVBN9qItoCG3GYi6yY0zKtKVPLP/Cw5iofyQVtf5GTKqJ Uhv/n+WfG4KkGbH9OwX595xpUVtqUAKUhabEDUED9RqfhCSQlv60mWkP8G0TXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716495732; a=rsa-sha256; cv=none; b=TMXxMQlYlQJq5UbBPRLPbj7Gh9nHWpxGvNLPjol3kN4cfDqo4BkYlTPfAd1xmUl+mnHmj6 Yu6e/63RC/Cmy4zzpEkN/aQvPr8PL48GZh+OI1IDd4LZ2QimbcKmBongPAMzcmvychE5Lm S/VCr/CiLpkkfdgXqPgBoF2ji0JfjZEwIYS0EIRNJ4sm5MXyd/D8hp2LoLOYTptNrSnbSr X6VReQnniSMq5W4++L8QXuZsraDTIJhSRlOtmWyYv6mAs1o4l0TLOIbupLMRdA5TYPyF8A ybe5iU1mh93WWFUncWfFgIstex4WdNyH+Wpl56pafKSDyfiNSPBLuZhZy2Xijw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716495732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H/JWNaYeHkXQrcMQhWa1nlXlPNFoJ14vCBXIHmFetY8=; b=Mv54MK+2KMlInYoe1U6pXEXufUEU45gDrpT2I8KaYhUf2wTEcrW7OOXUG5n2FGadT+r4nw FjztgmXUg/RsRR0PX+d5hswYSA2DAPkwurulfCi3yK85F3NJ3Rev42ujdypkUVkTkwQbOW dWtbfC0OOg0cezjmLJJpGpX1a30NzJCIzljju0RwIW+0Kg+bcLZos19mcjGDcKfjk0QKev fG8SMlf1yTne60ckaaWF2+JXtPQpsVLxwCRTgwkm/cmNc+gTDOwYC914V+EePrGtM3JKc3 xmQslIG7oi1hpGdQJXgWC/bGt29T5Uvvr4fuDvw5gJ8NU2zdJMB4rWnmOzr6eQ== 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 4VlfjJ1Qg1z13ps; Thu, 23 May 2024 20:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKMCAF053520; Thu, 23 May 2024 20:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKMCqK053519; Thu, 23 May 2024 20:22:12 GMT (envelope-from git) Date: Thu, 23 May 2024 20:22:12 GMT Message-Id: <202405232022.44NKMCqK053519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric <dim@FreeBSD.org> Subject: git: 09454b441dc3 - Create tag vendor/llvm-project/llvmorg-18.1.6-0-g1118c2e05e67 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-18.1.6-0-g1118c2e05e67 X-Git-Reftype: annotated tag X-Git-Commit: 09454b441dc310fc8d8fb27ad348a5541f33635a Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-18.1.6-0-g1118c2e05e67 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-18.1.6-0-g1118c2e05e67 tag vendor/llvm-project/llvmorg-18.1.6-0-g1118c2e05e67 Tagger: Dimitry Andric <dim@FreeBSD.org> TaggerDate: 2024-05-23 20:21:45 +0000 Tag llvm-project branch release/18.x llvmorg-18.1.6-0-g1118c2e05e67. commit c6bcacc7c9d89ff87e3a15e4a8919edbfc237800 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-05-23 20:21:31 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-05-23 20:21:31 +0000 Vendor import of llvm-project branch release/18.x llvmorg-18.1.6-0-g1118c2e05e67. From nobody Thu May 23 20:34:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlfzc5d3Fz5LGcr; Thu, 23 May 2024 20:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlfzc3C7Vz42jc; Thu, 23 May 2024 20:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3lRTy/nLiHr4/ejClGylKX2z0/Beax0q4aSQji1mTQ=; b=g/PioiHMyoXY/Xlxbbxkmp3qkIexz1zzmxjF7SCFs/8dS1izUyYo5Hzu0AVq8afHNpcker mHA+pmn6NAKk6eTACniitYYyUBtYXcscpZ1y6KvZt394Z0bZ6pHdeI+cBk7mCcgtWBaySw Uy0/ngkvaR39FjZD2aAcujLzpGtZEYHFsrogxBG4XgVOVRSmxdvO7JIElNWVEtxFC7s0j4 4MnNfLu3I18qTmnQJ8dz5mPki5S/P9Ho9hCfyaAXDvqkFgAJ1sa6XrFmqthhnXP1AYTdji 4tPl73KuOqu4hxb8NO5PkbENGLLPB5K518crPpeoKzGmnuK+wvbvc/MyzKuxfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496476; a=rsa-sha256; cv=none; b=SHipn/Otq9rZkcjWqD2a1O4dwO3fkSVOR6E4r2ELdcUHuyOwqUfhhYyGAHPwZIxgiqlXJn mcR1QlQ+aRG6omtuBtFkYCW/fcxJKPPzyZWXgurS3BVqYe3l/5QqD2DUnEwlYyKq5ZkJLA wmICR0MQ84acFmVhZ5Ekj1nA0V5YMmLQ7hA6UFfdRqu3bj36u2SJPPNV6mLAML5h3NweIY iWCS5BR0j4WE7vgK97/jkAiAXUB1DRqGNVKkFvMEnj6hNZ/zsPB4GgvQQynxQkTtOx8tRJ gLH01fmZYLpTfUo0m2LZ29oFOyleHQiGUroQiHgEF58hVyBfkamnmtyfPyZoSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3lRTy/nLiHr4/ejClGylKX2z0/Beax0q4aSQji1mTQ=; b=ktJNtb+QwEdtMpHWqzlS7C0bjtth/nwWUwZjUy0YBqG5qkc0j8tkeZtGtHZMSrCH91rq9H TUQi7gdxQi98Smd3EbgmRDlotxFJWYdlQa69X3Z984+3l0IbnloPltXW76gfUhpn1XxuN7 TrgT5hpm7OKYsCMX+5ziFKKybejW6xoAOuU9NJ3sgBvavr37afoWAw2MCF2XajgWCot/fa hH/GQomuKXgpHpEZV4hcUfKA4vDFDqOPxEXoLf8+FK9C8asJcvKjvMzB8xe6ZJBbhkUyCJ XytIZHlmyVLykwAkmpcqpmp6OxyF7yKGSBArPW3Wjp3ZMBPQMcilR5LdSJPJIw== 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 4Vlfzc2jCXz141g; Thu, 23 May 2024 20:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKYa9s072227; Thu, 23 May 2024 20:34:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKYa5M072224; Thu, 23 May 2024 20:34:36 GMT (envelope-from git) Date: Thu, 23 May 2024 20:34:36 GMT Message-Id: <202405232034.44NKYa5M072224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 87bf0aaba8f1 - main - Remove COMPAT_FREEBSD4/5/6/7/9 from MINIMAL and FIRECRACKER kernel configurations List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 87bf0aaba8f1bd743d4df24ae422dd8075260d45 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=87bf0aaba8f1bd743d4df24ae422dd8075260d45 commit 87bf0aaba8f1bd743d4df24ae422dd8075260d45 Author: Henrich Hartzer <henrichhartzer@tuta.io> AuthorDate: 2024-05-10 23:03:14 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:30:57 +0000 Remove COMPAT_FREEBSD4/5/6/7/9 from MINIMAL and FIRECRACKER kernel configurations FIRECRACKER is not a legacy config, so remove the really old FreeBSD versions from it. MINIMAL has a similar history, and limited target audience which has little to no overlap with really old binaries. Either of these is really easy to get additional binary compat with the include directive, so balance things better. Leave GENERIC alone. PR: 231768 Signed-off-by: Henrich Hartzer <henrichhartzer@tuta.io> Reviewed by: imp (MINIMAL), cperciva (FIRECRACKER) Pull Request: https://github.com/freebsd/freebsd-src/pull/1228 --- sys/amd64/conf/FIRECRACKER | 5 ----- sys/amd64/conf/MINIMAL | 5 ----- sys/i386/conf/MINIMAL | 5 ----- 3 files changed, 15 deletions(-) diff --git a/sys/amd64/conf/FIRECRACKER b/sys/amd64/conf/FIRECRACKER index b8ea17ee4a78..a36fb974c24e 100644 --- a/sys/amd64/conf/FIRECRACKER +++ b/sys/amd64/conf/FIRECRACKER @@ -57,11 +57,6 @@ options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options EFIRT # EFI Runtime Services support options COMPAT_FREEBSD32 # Compatible with i386 binaries -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 191b88daca14..0baf6d6431de 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -49,11 +49,6 @@ options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD32 # Compatible with i386 binaries -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 73277c7a3cee..2a06eb84bff8 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -54,11 +54,6 @@ options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options GEOM_LABEL # Provides labelization -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options COMPAT_FREEBSD12 # Compatible with FreeBSD12 From nobody Thu May 23 20:41:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlg7s39qTz5LHnV; Thu, 23 May 2024 20:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlg7s2PK4z4490; Thu, 23 May 2024 20:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4oHxsZNZFFilJTcxsJ/5LKZ7HocGmKfO5x9Na+Ci+Xg=; b=fg6+IPQJDpEUSEYXE2aK/ECW/KCpI00YOcsntzsiHDV89oqUJ5ec5MpWdaUj1+ZeDUjJ/l XXrko9RJDqNC44H0oBRcetzbCN/5SVTQMQuR2aSa4ZXgngOeCjja4UVf0nTAaQbAIzG0q/ UK4jGRHW9A5UpeqcGFVxvqF1H/9RYPbjY7aS8S2o9BLn3Q/khRuQ2in5EvdaDHHyh5Bg3d 4EwnMYYa0FB/MV/7GVFAysAj49J6AcEy+rMQPnYoOKmQB5NGlNkVNreMjq7Cs5+QNk3but vdgT7NAN1jidbKkLGx2QFwlkOYu8jlE40jpTihQr7u1DOmXaHFu7UzqG6oMXzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496905; a=rsa-sha256; cv=none; b=S26FjCw6etnKBix3Yd0j57MzBeAcsUIi1ZLzpXeDbJ0ZJ7VViLih+pKAm3FAY90KHIqtUe yXpSd5icZ2zQ8/zWy3JauHRSmlea6AAZgh77tK4h7F8s8uJApqb2lI8nxLvF9LOxlVmOtV SazQJhkaGsuOdbBLU0UGbbpvOONRdNi432mJPJO6uxo9dpSd0MvjEA19nE5JegJNejHypq QyGuiqarAMjdMeHQ+Alr7pD1BDCT6O3jJg+eb0FNmGaxsHJfAR/5wBQ872QLjgY6dF38rI IV35FEazCs7DQeM5nAlaEtXGPwR1Y8Iaiof4zVNaiPvFUOowtX/Vm918271ChA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4oHxsZNZFFilJTcxsJ/5LKZ7HocGmKfO5x9Na+Ci+Xg=; b=hvtJqieguwHNYIC6GrvUtq25hWfohcUQh++I0NUD40RYi0uWXWm9zX3XmciD1r+BW5XjT0 6cwcS4nkdg2TEnpiusAsvJ01dBw7FsYJu2L0WhpBwb/KFy67JdUbqlCoUV5ILdQe4TZx21 UgwYckyt65wE6fAAKFQvtNcFAqpI1O7gv5/i4fFDWrnDiGIXvOXKMvlQRawzP0In5kKRGN ueXte0zfgHGMiK55iJgCH9py7rvkefTrTZEA/+8gHKyZiy/SrjVDCASQ6vgv+FXZaFBtnC txOwLPEq9mUosh/6iojzU8GTR+xXS9uHRqWAhL1+LyqLyiuRqTShh/24R6ULdQ== 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 4Vlg7s20f0z14GY; Thu, 23 May 2024 20:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKfj7A085860; Thu, 23 May 2024 20:41:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKfjcL085845; Thu, 23 May 2024 20:41:45 GMT (envelope-from git) Date: Thu, 23 May 2024 20:41:45 GMT Message-Id: <202405232041.44NKfjcL085845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 1e8eb413f6c8 - main - netinet/icmp6: add PREF64 definitions (RFC 8781) List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1e8eb413f6c8b0d7c44b9779f59fd1d33d2e6ac8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e8eb413f6c8b0d7c44b9779f59fd1d33d2e6ac8 commit 1e8eb413f6c8b0d7c44b9779f59fd1d33d2e6ac8 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-04-26 21:33:13 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:40:11 +0000 netinet/icmp6: add PREF64 definitions (RFC 8781) Reviewed by: imp, glebius (prior suggetions done) Pull Request: https://github.com/freebsd/freebsd-src/pull/1206 --- sys/netinet/icmp6.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 4368fd2a0fcf..05f4737e8fd9 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -307,7 +307,8 @@ struct nd_opt_hdr { /* Neighbor discovery option header */ #define ND_OPT_ROUTE_INFO 24 /* RFC 4191 */ #define ND_OPT_RDNSS 25 /* RFC 6106 */ #define ND_OPT_DNSSL 31 /* RFC 6106 */ -#define ND_OPT_MAX 31 +#define ND_OPT_PREF64 38 /* RFC 8781 */ +#define ND_OPT_MAX 38 struct nd_opt_prefix_info { /* prefix information */ u_int8_t nd_opt_pi_type; @@ -373,6 +374,14 @@ struct nd_opt_dnssl { /* DNSSL option (RFC 6106) */ /* followed by list of DNS search domains */ } __packed; +struct nd_opt_pref64 { /* PREF64 option (RFC 8781) */ + u_int8_t nd_opt_pref64_type; + u_int8_t nd_opt_pref64_len; + /* bits 0-12 are the SL, bits 13-15 are the PLC */ + u_int16_t nd_opt_pref64_sl_plc; + char nd_opt_prefix[12]; +} __packed; + /* * icmp6 namelookup */ From nobody Thu May 23 20:41:46 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlg7t46Bjz5LHZ5; Thu, 23 May 2024 20:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlg7t3Ds4z4491; Thu, 23 May 2024 20:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kIWulHpCH6fNrBL5RwBAbW6oG2xq1rNxxO/UELeL04=; b=kqZg9WHVb8lh+aQhLQFBuDYb+P3W+E5gu6kuSlVdQmBmV/xlMzg4FCsJhuiLzthDOEXxU8 Tjdk1nwqxC/Ge59hL8vKb9LrmnXjyb/hrII3KmVuZ3EycuvF583wat9Rgb+sKudy2lP3kN yZTwrxN3yfBiXBPYGrB2ZKYJR0B36XVU3RdRUGA/c2YTY3KJUma0gIxItHjvLxEXV2PzWj 8KOYfROQX/b4kD49+4ChVpoPTYN6weTygwylzwlcAx+ZFqN9//P47PP0Cg5U4UM/ojlQb0 SwQmXkFZ+YgZQt3ST14X44F5jYU203stxF0xFLHvv0xICxxrzvzGCwZmVW4L+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496906; a=rsa-sha256; cv=none; b=mCOvyQeqidSu6JQEPbRj/XTCjE3zZ01rw0YObNJZnjzSz1GlgPTGNAKIrowdJD/MCzUppV Ft4DGlwuIsytu8MFWOgZhEu0OtGYwPszPGvaoJe0PEa2oKFiDS0Aw8mKcLfcYP/NwvhxAh 5pDJ3iylZDhIFpr8pgNnYSD11mMSIyE7eT6ISB4GoCWvHOhZ453qnRD9jMde8bvu2B5zv8 NkDWKxCKszLRD1Dx1LR1xhviYSoaV68hb1JSheWsLg9Bu66YCX7XjvriMQKrmbg5E9rAQy Se0pm98/I8peoZFllcSUml9WEBeMd4RkaNuNUAofdLc02HGSctVLpDJ2gjiXEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0kIWulHpCH6fNrBL5RwBAbW6oG2xq1rNxxO/UELeL04=; b=IYEHRrI1cnTavlLmP2Ln9TfQtDlW/1eCl3cQupwzKxcZULMLxM7o2VLNxypv7F4whQMQOI DsUnC2HdChAOvGnoxSflDMN1xTFGgenOzkiWQgab1ifctIzusPuatqMCAh/u437d5m5nCb h+o0zHRZvPWmbJDvQ13B0jnXoofBz2tb0O3qaqe5C/dFy7MBMnnmn6uxWdChM51kY7Vlb9 A7USWDvB2XTogC8CdxnWFHx6rW8q91MTh/PCr/Zmb1hy5cbE4O1K3vfT9gNjBGUtKtOvfW 5XijR38eULRRZ2CvO1ypvZi5rtlsoCT9Fnc6VHrETc51iNEBC5Sr9QcgzM6SAg== 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 4Vlg7t2X8Yz14VJ; Thu, 23 May 2024 20:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKfkjH087176; Thu, 23 May 2024 20:41:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKfktd087161; Thu, 23 May 2024 20:41:46 GMT (envelope-from git) Date: Thu, 23 May 2024 20:41:46 GMT Message-Id: <202405232041.44NKfktd087161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 77f06c476c8c - main - rtadvd(8): support PREF64 (RFC 8781) List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 77f06c476c8cb8700bd1c154a4f4314d51286378 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=77f06c476c8cb8700bd1c154a4f4314d51286378 commit 77f06c476c8cb8700bd1c154a4f4314d51286378 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-04-26 21:41:37 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:40:48 +0000 rtadvd(8): support PREF64 (RFC 8781) PREF64 allows a router to advertise the network's NAT64 prefix, allowing clients to auto-configure CLAT. This makes it possible to deploy IPv6-only or IPv6-mostly client access networks without the need for DNS64. Reviewed by: imp, glebius (prior suggetions done) Pull Request: https://github.com/freebsd/freebsd-src/pull/1206 --- usr.sbin/rtadvd/config.c | 68 +++++++++++++++++++++++++++++++++++++++++++ usr.sbin/rtadvd/rtadvd.conf.5 | 18 ++++++++++++ usr.sbin/rtadvd/rtadvd.h | 11 +++++++ 3 files changed, 97 insertions(+) diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index bd990c58b36a..1b37d53c8b91 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -912,6 +912,58 @@ getconfig_free_dns: } free(dns); } + + /* + * handle pref64 + */ + rai->rai_pref64.p64_enabled = false; + + if ((addr = (char *)agetstr("pref64", &bp))) { + if (inet_pton(AF_INET6, addr, &rai->rai_pref64.p64_prefix) != 1) { + syslog(LOG_ERR, "<%s> inet_pton failed for %s", + __func__, addr); + } else { + rai->rai_pref64.p64_enabled = true; + + switch (val64 = agetnum("pref64len")) { + case -1: + case 96: + rai->rai_pref64.p64_plc = 0; + break; + case 64: + rai->rai_pref64.p64_plc = 1; + break; + case 56: + rai->rai_pref64.p64_plc = 2; + break; + case 48: + rai->rai_pref64.p64_plc = 3; + break; + case 40: + rai->rai_pref64.p64_plc = 4; + break; + case 32: + rai->rai_pref64.p64_plc = 5; + break; + default: + syslog(LOG_ERR, "prefix length %" PRIi64 + "on %s is invalid; disabling PREF64", + val64, ifi->ifi_ifname); + rai->rai_pref64.p64_enabled = 0; + break; + } + + /* This logic is from RFC 8781 section 4.1. */ + val64 = agetnum("pref64lifetime"); + if (val64 == -1) + val64 = rai->rai_lifetime * 3; + if (val64 > 65528) + val64 = 65528; + val64 = (val64 + 7) / 8; + rai->rai_pref64.p64_sl = (uint16_t) (uint64_t) val64; + } + } + /* construct the sending packet */ make_packet(rai); @@ -1334,6 +1386,7 @@ make_packet(struct rainfo *rai) struct rdnss *rdn; struct nd_opt_dnssl *ndopt_dnssl; struct dnssl *dns; + struct nd_opt_pref64 *ndopt_pref64; size_t len; struct prefix *pfx; struct ifinfo *ifi; @@ -1355,6 +1408,8 @@ make_packet(struct rainfo *rai) packlen += sizeof(struct nd_opt_prefix_info) * rai->rai_pfxs; if (rai->rai_linkmtu) packlen += sizeof(struct nd_opt_mtu); + if (rai->rai_pref64.p64_enabled) + packlen += sizeof(struct nd_opt_pref64); TAILQ_FOREACH(rti, &rai->rai_route, rti_next) packlen += sizeof(struct nd_opt_route_info) + @@ -1435,6 +1490,19 @@ make_packet(struct rainfo *rai) buf += sizeof(struct nd_opt_mtu); } + if (rai->rai_pref64.p64_enabled) { + ndopt_pref64 = (struct nd_opt_pref64 *)buf; + ndopt_pref64->nd_opt_pref64_type = ND_OPT_PREF64; + ndopt_pref64->nd_opt_pref64_len = 2; + ndopt_pref64->nd_opt_pref64_sl_plc = + (htons(rai->rai_pref64.p64_sl << 3)) | + htons((rai->rai_pref64.p64_plc & 0x7)); + memcpy(&ndopt_pref64->nd_opt_prefix[0], + &rai->rai_pref64.p64_prefix, + sizeof(ndopt_pref64->nd_opt_prefix)); + buf += sizeof(struct nd_opt_pref64); + } + TAILQ_FOREACH(pfx, &rai->rai_prefix, pfx_next) { uint32_t vltime, pltime; struct timespec now; diff --git a/usr.sbin/rtadvd/rtadvd.conf.5 b/usr.sbin/rtadvd/rtadvd.conf.5 index 6824d2a5578b..8158d09f99cf 100644 --- a/usr.sbin/rtadvd/rtadvd.conf.5 +++ b/usr.sbin/rtadvd/rtadvd.conf.5 @@ -428,6 +428,24 @@ DNS search list entries. The default value is 3/2 of the interval time. .El .Pp +The following items are for PREF64 discovery +.Pq RFC 8781 , +which will advertise the network's NAT64 prefix to clients. +These items are optional. +.Bl -tag -width indent +.It Cm \&pref64 +(str) The prefix to advertise in the PREF64 option. +.It Cm \&pref64len +(num) The length of the PREF64 prefix. +This must be 96, 64, 56, 48, 40, or 32. +If not specified, the default is 96. +.It Cm \&pref64lifetime +(num) The prefix lifetime to advertise in the PREF64 option. +This should be at least as long as the RA lifetime, but cannot be greater +than 65528. +If not specified, the default is the RA lifetime, or 65528, whichever is lower. +.El +.Pp You can also refer one line from another by using .Cm tc capability. diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h index eb7746733c6e..597fb2f47f0d 100644 --- a/usr.sbin/rtadvd/rtadvd.h +++ b/usr.sbin/rtadvd/rtadvd.h @@ -32,6 +32,8 @@ * SUCH DAMAGE. */ +#include <stdbool.h> + #define ELM_MALLOC(p,error_action) \ do { \ p = malloc(sizeof(*p)); \ @@ -148,6 +150,14 @@ struct rdnss { uint32_t rd_ltime; /* number of seconds valid */ }; +struct pref64 { + TAILQ_ENTRY(pref64) p64_next; + bool p64_enabled; + uint16_t p64_plc; /* prefix length code */ + uint16_t p64_sl; /* scaled lifetime */ + struct in6_addr p64_prefix; +}; + /* * The maximum length of a domain name in a DNS search list is calculated * by a domain name + length fields per 63 octets + a zero octet at @@ -217,6 +227,7 @@ struct rainfo { /* actual RA packet data and its length */ size_t rai_ra_datalen; char *rai_ra_data; + struct pref64 rai_pref64; /* PREF64 option */ /* info about soliciter */ TAILQ_HEAD(, soliciter) rai_soliciter; /* recent solication source */ From nobody Thu May 23 20:41:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlg7v6ZXbz5LHlC; Thu, 23 May 2024 20:41: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlg7v3yZfz43nR; Thu, 23 May 2024 20:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7t0wz/58KqyhnmryxkADnvavol7nEEjeQWZ+XydqV4=; b=xUZw0QluVkG7FEZsZP5TQKXtdWJQVC+sgv8wPsfxzT7+riuzzPJ+as/h6T9vihSnPjSbat oO+dDJbxszhLRiRcvy/WfRvTDtfiraXv0ft+49xeBHbidxmW/nR9GVOWpg95X89IubGnxW tl3SfZlo6NR5EKaJ0C1KrQuBSGpuolzmxZHvbeXaARbAe3oX4cSlMETq1oAv0JqQkoPStD fzgh4HVp1ltLqPGZsI7kEFi+fLe+il2jisvi0PvyeFSe1iH0npn1I1PAzhSmGm2MXnugyp tn28X23aZEa0TanT4kw5ss57jKBgpjFa7T033sN0y6oSPrmh/zQrgEuuK931kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716496907; a=rsa-sha256; cv=none; b=kKSAaZ3wGwwBS4NWkfcWTFNxC13AkKdSrhfxxerh8K9vzE9aVF+gA/nBNxsEF9dOQGSpUA dm8oecJxDwTy+jk1/NCY8HBJzK0msQPK9QliIaENayAwZ9dWeVZeRLbjp4NFW6Iykmo8q5 s6wcZcKdIYHSrzSOcZ75i3c6ExlLFvNrLt3Ikiv1inyaNhNTzvbe4x7dF7wW57A9HKZKcY k9KOzr5av8pcsjlXEtPaXmU7WV7NEQg2P7i5ECwAJ7ZChXCtKe9dRFMCZfHzFKDiqKpi9z 8Qu20As9OCjq4Hptoz+kYb0o3ZByCu76VKWmtz9eXJ7GHqvtNcnxR5IMf1k8FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716496907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7t0wz/58KqyhnmryxkADnvavol7nEEjeQWZ+XydqV4=; b=s4UlBs9KFXREBlmNgM9Q/7jLbQPzZ843GPtCFiFYNwYtGorNaAza1QtvVC3fAJLUfBsTJk apE3i72H0ZfCCFPm/lBVkn84G5hyvDXxCv28n1GdQbzFJaSL8s7eNTNfX0CNfK+IPOmCtK mFvfiAUwtFJdNOd4DagJqGU4PXV+njUSD+4B/GUFkJgNntQ5QDsCYcEo8231FR35HOJgMg wXS9DiEmMGIM2818ei+alWMylPNhM0Y1u7ixA27+SWq7PGlhaIY7rSOio6zEmjTb70qS+Z 28BRoh1bwgE8KtBMXM0QQF6FpsFzoMpuw2cBLNEhfHIcefvKURY2iqz30EuTeQ== 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 4Vlg7v3Z1Gz14GZ; Thu, 23 May 2024 20:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NKflPe087322; Thu, 23 May 2024 20:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NKflSc087319; Thu, 23 May 2024 20:41:47 GMT (envelope-from git) Date: Thu, 23 May 2024 20:41:47 GMT Message-Id: <202405232041.44NKflSc087319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 4b75afe885d4 - main - sys/netinet/icmp6.h: use C99 uintX_t constants for new PREF64 struct List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4b75afe885d4510ee2bd83be21ac78ca9a2f02cd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4b75afe885d4510ee2bd83be21ac78ca9a2f02cd commit 4b75afe885d4510ee2bd83be21ac78ca9a2f02cd Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-14 23:45:47 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 20:40:48 +0000 sys/netinet/icmp6.h: use C99 uintX_t constants for new PREF64 struct Reviewed by: imp, glebius (prior suggetions done) Pull Request: https://github.com/freebsd/freebsd-src/pull/1206 --- sys/netinet/icmp6.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 05f4737e8fd9..0bccba3754b0 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -63,6 +63,8 @@ #ifndef _NETINET_ICMP6_H_ #define _NETINET_ICMP6_H_ +#include <stdint.h> + #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct icmp6_hdr) */ @@ -375,10 +377,10 @@ struct nd_opt_dnssl { /* DNSSL option (RFC 6106) */ } __packed; struct nd_opt_pref64 { /* PREF64 option (RFC 8781) */ - u_int8_t nd_opt_pref64_type; - u_int8_t nd_opt_pref64_len; + uint8_t nd_opt_pref64_type; + uint8_t nd_opt_pref64_len; /* bits 0-12 are the SL, bits 13-15 are the PLC */ - u_int16_t nd_opt_pref64_sl_plc; + uint16_t nd_opt_pref64_sl_plc; char nd_opt_prefix[12]; } __packed; From nobody Thu May 23 21:05:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlggT1MGfz5LKct; Thu, 23 May 2024 21:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlggT0qdDz46Qm; Thu, 23 May 2024 21:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DG0PUbahQ/gPM3lY6XlLszA9VQbx+bPjboBb7rRPjG8=; b=Bs74uUthmkCg2712w4nkRTe+xWg7Uul2SjafEOvXZzUYrltf+9OjzqI9A65HOYR7wbBE4Q CRE95pZU7E33PMk3EFiXWWPCNqGaQ07DAeeUMLv/J2Ptnfa4bHtRFDfclP4FJBQgyltm55 8Dc3PAzPTeI0qnfp6eKJK8Cm5yy9lBAAtyDlKtD4ZftzTiAOVmSqGptYbwjnajzevu3/kD PJajfd8F99x3Qexvhyj0msZbUcNII1LMi1uoX6UJJ7Bc1zeKQSqq+K198ayijpZomXTul4 WbN2avtTDwS0Gk9m2jZ4FQvYsJnw3ql7IJO+aSw1dB8ruBTSniiy8ZyUTBKqvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716498341; a=rsa-sha256; cv=none; b=FfuRVLFmALYy7SPj0KLgmCiIOgL/VDn3g+AArN/SekAAGguVReDy7dt5gLdq3yyWNU9sno E6YBWq5HhBJjH5uNKwZR19QCFa+VjYABL/H7HJhUNF+w/BldRWCiQ/NjIDYS1EgbHUQo/b V/UHd7m0rIryLSh0R88fpKdQ6nUPrtzl3zqa9JUaq5lloxcXC9niBoVaYeIyCH+IpXAfk0 FCy2gbbMaNntbMkOc6ZlQcY2V7IzfwiShWJf5u8SzljpqhjkTPie5OrwNfZV7TwgsYcmlC KTavPB0utTRUsM4RsX14VIZBnc9K/Yxxmz+Di81GOlJxQUwSrU0N6KesnHJQSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DG0PUbahQ/gPM3lY6XlLszA9VQbx+bPjboBb7rRPjG8=; b=K28Rx57y0+sbX9M7RhWBSLdfpQ9cWlutZ/xwlhy87uCSBKUopVF6o69O7A6Sf9k3x6QVsI 7znq23FLCImNtbiL+RcMVZa+3gFoZeQ36Mcr3iEB5m556NSf9ogCazHOrYKngyQ+G2jq0l sVee+NCc8FGqBp3E26fJWy5fpMGDuaaKDikif0k6J1OTDOwKAPbSYxUn3JUo+n3icls94c bK35TYD5GkR32TANGtOB8Agrk6edxyOr83B+KThL+KndQcSwcXchp+voo/oqt8/UnXSHy7 8fVIo+icZWrPK3ZoFWKGDxrSqJ5NR4JWoKcnR+nb4eKztp4LRAop/kFwpYSNcQ== 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 4VlggT0Qzdz14pd; Thu, 23 May 2024 21:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NL5eWJ023754; Thu, 23 May 2024 21:05:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NL5eaE023751; Thu, 23 May 2024 21:05:40 GMT (envelope-from git) Date: Thu, 23 May 2024 21:05:40 GMT Message-Id: <202405232105.44NL5eaE023751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert <cy@FreeBSD.org> Subject: git: 380ee9b3c0c5 - main - sys/netinet/icmp6.h: Fix build List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 380ee9b3c0c54680ac26dbd80ea812671052fae2 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=380ee9b3c0c54680ac26dbd80ea812671052fae2 commit 380ee9b3c0c54680ac26dbd80ea812671052fae2 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2024-05-23 21:02:06 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2024-05-23 21:03:55 +0000 sys/netinet/icmp6.h: Fix build Fix stdint.h file not found. Fixes: 4b75afe885d4 --- sys/netinet/icmp6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 0bccba3754b0..9de8daaa3390 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -63,7 +63,7 @@ #ifndef _NETINET_ICMP6_H_ #define _NETINET_ICMP6_H_ -#include <stdint.h> +#include <sys/stdint.h> #define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr) - sizeof(struct icmp6_hdr) */ From nobody Thu May 23 21:11:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlgpC6xwTz5LKwV; Thu, 23 May 2024 21:11: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlgpC6Fplz474g; Thu, 23 May 2024 21:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZramZ3Da6SyJ6lPa14iX74yw0L8qM60msFx71Dv/nyw=; b=pQGhf5oE0XOqEbkSFwdAq4igsCFfn/cnl5o6HYMeuNp0v1r7tLqBWffZMfOrSkmYKRRqqb nqlCVJYOIMEWqvhgVHk9Zb45jhAUEc5hAwdFwX02nvFOIlQ2fWhiq6yZlfdtBks3hrDu+4 Sur9DYs8HO+YtyOw6cjlCRC/bZLGPNEiq0dztrxVbaFbR0zp/JDzJmfA4R4WFrLPNoBRMm PKuRdpmZErWiEeJunnIuW9dUvKY7WZCKp8nnOURNrFWio+Ws+NgZjHqbbD4HjNx7xLNmAF NWnym01s6MJV9WNYrBxZhZY4/6GOTxNRpSEVq9fvwz4vEfqeGg7yaur1VEWs3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716498691; a=rsa-sha256; cv=none; b=AVMEOnuaxs/pu24axEvIZlHE2+MkHVWmvdsNuU8foqpFFSSDdHAOG7DmAZygSGU7zHG9LZ z8sJBBFFctAZyhXYpsmi4zrJ04oF6wsrppxZo7m8otIjGqjFIw4QVzHDOvXCvaQl8t+AsU CFHHLA0upJkQ0LvIQdfy0chlVuhpY8Zkg2aWlMlQcR6J/wuboWGMuw4AYnBCAvEqkAlMRZ IT3gPeglzcIfW1RYqgBK9tjDpuSP7+0exToEX5WwZNPBJzML7s7FApFHCBXe0gCu943jBj pJZ1qEk3eVn6pNuMbNqzbrhGu9kDkqJJOy5i+ydyGsV+y7IHxLAzIFCTWcrT5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716498691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZramZ3Da6SyJ6lPa14iX74yw0L8qM60msFx71Dv/nyw=; b=uDqJ4dCmuZ8Z+dpVRtQsWMOZmsu+RI109IWActI3o3q1j8YJjCfZ+/SKoixSX/9XrOL2Y9 hOlGiRdaSVplMoq+r3t410qGQ+O6rxihs2xKsY524AjmdItzuaIw7F335vEmJm8uQKQZ0o NTniHS0hoGU/o0aD4ry9DH/ZHwTlXqs7hN/GSh3EQPwAojQuxkfnb67F8m4nB3R4JK89Du mSkneINowayp3ntD5/2k19SnirROcCCVIUuyyXr3xQxwCKIEpnA+fypUVsa4YvlldWmVrY jCV9Z89F34nLzdiIlJtCg96Yo9hBmIzbDNU6cQo0+O3ekOpll0ShftuP5p8abw== 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 4VlgpC5rwyz14b0; Thu, 23 May 2024 21:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NLBVlq034102; Thu, 23 May 2024 21:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NLBVSK034097; Thu, 23 May 2024 21:11:31 GMT (envelope-from git) Date: Thu, 23 May 2024 21:11:31 GMT Message-Id: <202405232111.44NLBVSK034097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 674956e19979 - main - sys/netinet/cc: Switch from deprecated random() to prng32() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 674956e1997954e8478e68080061c0530b081515 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=674956e1997954e8478e68080061c0530b081515 commit 674956e1997954e8478e68080061c0530b081515 Author: Henrich Hartzer <henrichhartzer@tuta.io> AuthorDate: 2024-04-10 21:53:02 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-23 21:10:09 +0000 sys/netinet/cc: Switch from deprecated random() to prng32() Related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277655 Signed-off-by: henrichhartzer@tuta.io Reviewed by: imp, mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1162 --- sys/netinet/cc/cc_cdg.c | 8 +++++--- sys/netinet/cc/cc_chd.c | 9 +++++---- sys/netinet/cc/cc_hd.c | 7 ++++--- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sys/netinet/cc/cc_cdg.c b/sys/netinet/cc/cc_cdg.c index 1e9236f878d4..7ec9e8ca3ccc 100644 --- a/sys/netinet/cc/cc_cdg.c +++ b/sys/netinet/cc/cc_cdg.c @@ -57,6 +57,7 @@ #include <sys/malloc.h> #include <sys/module.h> #include <sys/queue.h> +#include <sys/prng.h> #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/sysctl.h> @@ -507,7 +508,8 @@ cdg_cong_signal(struct cc_var *ccv, ccsignal_t signal_type) static inline int prob_backoff(long qtrend) { - int backoff, idx, p; + int backoff, idx; + uint32_t p; backoff = (qtrend > ((MAXGRAD * V_cdg_exp_backoff_scale) << D_P_E)); @@ -519,8 +521,8 @@ prob_backoff(long qtrend) idx = qtrend; /* Backoff probability proportional to rate of queue growth. */ - p = (INT_MAX / (1 << EXP_PREC)) * probexp[idx]; - backoff = (random() < p); + p = (UINT32_MAX / (1 << EXP_PREC)) * probexp[idx]; + backoff = (prng32() < p); } return (backoff); diff --git a/sys/netinet/cc/cc_chd.c b/sys/netinet/cc/cc_chd.c index 52048a7c05ae..92fcf68c41f1 100644 --- a/sys/netinet/cc/cc_chd.c +++ b/sys/netinet/cc/cc_chd.c @@ -58,6 +58,7 @@ #include <sys/limits.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/prng.h> #include <sys/queue.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -85,8 +86,8 @@ */ #define CC_CHD_DELAY 0x02000000 -/* Largest possible number returned by random(). */ -#define RANDOM_MAX INT_MAX +/* Largest possible number returned by prng32(). */ +#define RANDOM_MAX UINT32_MAX static void chd_ack_received(struct cc_var *ccv, ccsignal_t ack_type); static void chd_cb_destroy(struct cc_var *ccv); @@ -159,9 +160,9 @@ chd_window_decrease(struct cc_var *ccv) static __inline int should_backoff(int qdly, int maxqdly, struct chd *chd_data) { - unsigned long p, rand; + uint32_t rand, p; - rand = random(); + rand = prng32(); if (qdly < V_chd_qthresh) { chd_data->loss_compete = 0; diff --git a/sys/netinet/cc/cc_hd.c b/sys/netinet/cc/cc_hd.c index 82486563f97e..def1580d8ffb 100644 --- a/sys/netinet/cc/cc_hd.c +++ b/sys/netinet/cc/cc_hd.c @@ -59,6 +59,7 @@ #include <sys/limits.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/prng.h> #include <sys/queue.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -77,8 +78,8 @@ #include <netinet/khelp/h_ertt.h> -/* Largest possible number returned by random(). */ -#define RANDOM_MAX INT_MAX +/* Largest possible number returned by prng32(). */ +#define RANDOM_MAX UINT32_MAX static void hd_ack_received(struct cc_var *ccv, ccsignal_t ack_type); static int hd_mod_init(void); @@ -128,7 +129,7 @@ should_backoff(int qdly, int maxqdly) p = (RANDOM_MAX / 100) * V_hd_pmax; } - return (random() < p); + return (prng32() < p); } /* From nobody Thu May 23 21:32:59 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlhHD3gBtz5LNDQ for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 21:33:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlhHD3C52z49ZH for <dev-commits-src-all@freebsd.org>; Thu, 23 May 2024 21:33:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a6269ad71b6so14072966b.2 for <dev-commits-src-all@freebsd.org>; Thu, 23 May 2024 14:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1716499991; x=1717104791; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4oXjtGuMMopfym7B2P+Mcemt3QmJZ+9qmURhj7KilKI=; b=kC1qA8GbGnb/IXqszYgZoWQGSvwIVLLTyuuzR8fovQzTT4gDCT8qOvSrVBlA5/yXCN XNiz5NEjMjfWIQ8RMNbt8zSSlfilMRg3Cq0hpJix2FMpZAh5NQAWSTIDldscKOaaO29l Ud5AWjT2eRGx+eLQw939PXOvvLq4/ByXflVwnvcPFEIXRCHFVITNGmvU1lQiBSf+qPK4 YhY66IClsaXTLSH2fusW/643kUUiz3SBJldliUEWklWTkQPJqDdbObO9bQ+Aitgig7/Y VMlJveBLdgbUTKc01o1woSPXi4orv/FQsGxRzNKujrwqx9CVFeNQFXGco7DSak91mtxL coRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716499991; x=1717104791; h=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=4oXjtGuMMopfym7B2P+Mcemt3QmJZ+9qmURhj7KilKI=; b=VN0y5WOfsUL2W0FZRrW3PiX0fvabNebGWg4jnAnKSIH5yqgfyWiz3g3FgqG05HFeei XcYrMpvwuvNyGYG5Vs8W6/H0RdrWG4Hlzpxa+ZYRURig37BErfu5De5WYxJOrrle/nTB yG+akSHOcV6hDMpld+uGmlWFi8uDJ5XS32jrhU7nrcmpoNdQnUFp/eaofv810oOnxc3P 65LjzQQE7L6T+3t0aPAfGxiFf6ojSkQe1MhSLZlM64e75NBUb99X4tgNmq3M7Ciamy0w H4EB8i7DnE5+CrH0vjbJHSyFQywpfbpxfF6IAcOeI/oIXaLCvKbzmMW3V48OFBsehP8l ewDQ== X-Forwarded-Encrypted: i=1; AJvYcCVdYupPUpWE+AWDS3VIxf0YCLeLz27WhNrX7iShmO9pmEv4CiugoGo+sG7I/V6I+vkWhHuWgwvX7epjiTWR1xrgS2e8UszIXkfQ67D7YM7V X-Gm-Message-State: AOJu0YyCGeYaf5Ethn3Yrnz5Z7nnbAKlCqkZQlDmHqOirk+e8WuN0XVY WGX8X82uU8PYntOFXSJefKs6vJ1bD/LQjXoQ6LgIJWBKJmyTFV7rtDnD27NBKoNHtkX2zXGGjtK PwMc++WW/ruvl/vKV0hWY3Uizb3517F+JnbwUUA== X-Google-Smtp-Source: AGHT+IFgvXyOJlpZ00yPrMFZLl6uloymiLtw3VxlVlxnvlYdleQgx10qS92XUn2M3+5ESCkhUvbQesLFDq6gwEPdj6M= X-Received: by 2002:a17:906:2b82:b0:a59:c3bb:b83b with SMTP id a640c23a62f3a-a62641b1bbfmr27836366b.1.1716499990792; Thu, 23 May 2024 14:33:10 -0700 (PDT) List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> <Zk-N4BNTQRcTZGOb@spindle.one-eyed-alien.net> In-Reply-To: <Zk-N4BNTQRcTZGOb@spindle.one-eyed-alien.net> From: Warner Losh <imp@bsdimp.com> Date: Thu, 23 May 2024 15:32:59 -0600 Message-ID: <CANCZdfp6LyiZkw1fxT5wo5K9s8U6D6Xj0oHYVrJNW9=WERUF+g@mail.gmail.com> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. To: Brooks Davis <brooks@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000356b0f061925cc64" X-Spamd-Bar: ---- 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:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VlhHD3C52z49ZH --000000000000356b0f061925cc64 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 12:41=E2=80=AFPM Brooks Davis <brooks@freebsd.org> = wrote: > On Thu, May 23, 2024 at 12:34:03PM -0600, Warner Losh wrote: > > On Thu, May 23, 2024 at 12:24???PM Brooks Davis <brooks@freebsd.org> > wrote: > > > > > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da04= 3d34dd1f5 > > > > > > > > commit a5f03413aade8f69cf954162151da043d34dd1f5 > > > > Author: Warner Losh <imp@FreeBSD.org> > > > > AuthorDate: 2024-05-23 17:37:01 +0000 > > > > Commit: Warner Losh <imp@FreeBSD.org> > > > > CommitDate: 2024-05-23 17:59:40 +0000 > > > > > > > > ci: Redirect output for builds. > > > > > > > > This target is far too noisy to be at all useful. Save the > output ala > > > > make universe in _. files. Also report where to find errors. > > > > > > If this target is intended to be run in a variety CI system then this > > > won't work in practice as many have no way to preserve the contents o= f > > > the files (jenkins does with sufficient configuration, but then you > > > have to expose it to the world which is a security problem given its > > > vulnerability history.) > > > > > > > This is a developer tool to run CI before committing. It's not going to > run > > in Jenkins. If we want that, it will have to be a different target. It'= s > > way too verbose otherwise to be a useful developer tool... so verbose a= s > to > > not be at all useful. > > I think we have different take on the goal of the project that created > this target. My read was that it would move the core CI functionality > into the tree so developers could run exactly the same things jenkins > does and thus debug issues more easily. > > For reference: > https://freebsdfoundation.org/project/continuous-integration-enhancements= / Yea, I'd helped write the proposal and so maybe my perspective on this is skewing things. The goal was to run the various things that jenkins will run so you'll know whether or not you'll break Jenkins. I'm happy to revert and just go back to using make tinderbox w/o trying to do a smoke boot for landing pull requests. Warner --000000000000356b0f061925cc64 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 23, 2024 at 12:41=E2=80= =AFPM Brooks Davis <<a href=3D"mailto:brooks@freebsd.org">brooks@freebsd= .org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar= gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1= ex">On Thu, May 23, 2024 at 12:34:03PM -0600, Warner Losh wrote:<br> > On Thu, May 23, 2024 at 12:24???PM Brooks Davis <<a href=3D"mailto:= brooks@freebsd.org" target=3D"_blank">brooks@freebsd.org</a>> wrote:<br> > <br> > > On Thu, May 23, 2024 at 06:00:02PM +0000, Warner Losh wrote:<br> > > > The branch main has been updated by imp:<br> > > ><br> > > > URL:<br> > > <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade= 8f69cf954162151da043d34dd1f5" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3Da5f03413aade8f69cf954162151da043d34dd1f5<= /a><br> > > ><br> > > > commit a5f03413aade8f69cf954162151da043d34dd1f5<br> > > > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;<br> > > > AuthorDate: 2024-05-23 17:37:01 +0000<br> > > > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;<br> > > > CommitDate: 2024-05-23 17:59:40 +0000<br> > > ><br> > > >=C2=A0 =C2=A0 =C2=A0ci: Redirect output for builds.<br> > > ><br> > > >=C2=A0 =C2=A0 =C2=A0This target is far too noisy to be at all= useful. Save the output ala<br> > > >=C2=A0 =C2=A0 =C2=A0make universe in _. files. Also report wh= ere to find errors.<br> > ><br> > > If this target is intended to be run in a variety CI system then = this<br> > > won't work in practice as many have no way to preserve the co= ntents of<br> > > the files (jenkins does with sufficient configuration, but then y= ou<br> > > have to expose it to the world which is a security problem given = its<br> > > vulnerability history.)<br> > ><br> > <br> > This is a developer tool to run CI before committing. It's not goi= ng to run<br> > in Jenkins. If we want that, it will have to be a different target. It= 's<br> > way too verbose otherwise to be a useful developer tool... so verbose = as to<br> > not be at all useful.<br> <br> I think we have different take on the goal of the project that created<br> this target.=C2=A0 My read was that it would move the core CI functionality= <br> into the tree so developers could run exactly the same things jenkins<br> does and thus debug issues more easily.<br> <br> For reference:<br> <a href=3D"https://freebsdfoundation.org/project/continuous-integration-enh= ancements/" rel=3D"noreferrer" target=3D"_blank">https://freebsdfoundation.= org/project/continuous-integration-enhancements/</a></blockquote><div><br><= /div><div>Yea, I'd helped write the proposal and so maybe my perspectiv= e on this is</div><div>skewing things. The goal was to run the various thin= gs that jenkins will run so</div><div>you'll know whether or not you= 9;ll break Jenkins. I'm happy to revert and just=C2=A0</div><div>go bac= k to using make tinderbox w/o trying to do a smoke boot for landing pull</d= iv><div>requests.</div><div><br></div><div>Warner</div></div></div> --000000000000356b0f061925cc64-- From nobody Thu May 23 21:33:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlhJ24jnFz5LN5b for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Thu, 23 May 2024 21:33:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlhJ22gS8z49r3 for <dev-commits-src-all@freebsd.org>; Thu, 23 May 2024 21:33:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-57824fa0a8fso4117144a12.0 for <dev-commits-src-all@freebsd.org>; Thu, 23 May 2024 14:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1716500032; x=1717104832; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8cM8Cj2SS2VLfJU+U0/tthNKeKrNIid1P9WuVRK1wi8=; b=orZkwNj0Wthrfla556qWICrY8HXTcEAphJgvGBAl5tY7N3ClNGrcCAXmNIyciDgk0y RWdb1rVcB5BROm9ZKrV3/LvPUJ7cWxCN3VnuP2ecYU3xM0MGThKiMjcQfEgx8DqKL8uJ UrDzxiN2MHjLm1UFVtIMtrMGoM16xzHr6hHvnIblzhqAfdGbQN6cT4SvANf5AoZDaIuZ yJmNGQzKFBc4d77whrcRpYx8GdLkjnGc9JIWrzIMUU1XeJa1Qtt3BNmLOv6Vtrf3i4Yg CSgXbpDAAmURd4f7dJVA1Du1dABnhkBTv+US34CoeFkbEtx001E0SgwgYbWJ5uxhAMAe 91QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716500032; x=1717104832; h=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=8cM8Cj2SS2VLfJU+U0/tthNKeKrNIid1P9WuVRK1wi8=; b=gm0+VIJCQiryAi+qVOxqD+R6OXxVvNxKUxgh/dcSNsmhleOV6IzxgHVsG3glQSWRIb XH2RcTmmX6YGkC4PBjcGX/Of54JV4VQtRRsQVeySXNMNj3YUv1EXOxYgSZJrtTf52vbz MCglAKFOawWrCRmrJQ3dFrSBSsPCbB+IneVTI27xZsW21DBr1OqQSR07Jc7k7V7lvG/M xcep0d+rlT3wFqlsciMlV127gHunBNGeIe6pO2aY5pQX4X3FPhTjLJ2ePkEuo12i+M5I RAMfL/Hu+VT8xIcw9pVfykormDncPS1sEC+AJ3fWnBiC5icYZjmWU4nqFs3XsIvtaxHK 9ffQ== X-Forwarded-Encrypted: i=1; AJvYcCVlk2t8X/ROYP7rs9XehRJH19vsEFmfK26XcO8GUJr/Tf6KVKEy1mibE+BHG4XeLu1QWAWGfOQo2kY3R5Pk7oKxDxH0ltMetdoJLbn6HSmS X-Gm-Message-State: AOJu0YwIJGT+dGKIgaykCY5+cLeVozPzW59E1cN3l7QpxXwTIducB3QZ 9tLGluQpWNSaVnu3xgYKnelcKpEjQmB0Nsul5GIp35KUsdV+aOSnYvhih0jdzpfL2TBveplr6Tr pdYyVzzdM8a4HXB6Wn6baXL4gO2vHAQcWnxwC1g== X-Google-Smtp-Source: AGHT+IEKIT1TuJhzs1ikB2mVmOTWHRf0dWBXst4Ad7XV1nK2OkhuSl+iYZGQnVtErtTB9Kdq/F3EdVtQFuJ7CAiFNVU= X-Received: by 2002:a17:906:c55:b0:a59:c3a5:4df6 with SMTP id a640c23a62f3a-a62642d471amr29780166b.29.1716500031845; Thu, 23 May 2024 14:33:51 -0700 (PDT) List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202405231800.44NI02TZ002201@gitrepo.freebsd.org> <Zk-J6aatixxTOmDJ@spindle.one-eyed-alien.net> <CANCZdfqiHXLOuH2AHXcVYmNeedb2YukJdPg8RZ9+p__zZzcoDQ@mail.gmail.com> <90929.1716491424@kaos.jnpr.net> In-Reply-To: <90929.1716491424@kaos.jnpr.net> From: Warner Losh <imp@bsdimp.com> Date: Thu, 23 May 2024 15:33:40 -0600 Message-ID: <CANCZdfpqboVq_04NV0fPVxn=+AzSh+eqBgSTOtTAH5KpgOJwnw@mail.gmail.com> Subject: Re: git: a5f03413aade - main - ci: Redirect output for builds. To: "Simon J. Gerraty" <sjg@juniper.net> Cc: Brooks Davis <brooks@freebsd.org>, Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a7ef86061925ceab" X-Spamd-Bar: ---- 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:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VlhJ22gS8z49r3 --000000000000a7ef86061925ceab Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 1:11=E2=80=AFPM Simon J. Gerraty <sjg@juniper.net> = wrote: > Warner Losh <imp@bsdimp.com> wrote: > > > ci: Redirect output for builds. > > > > > > This target is far too noisy to be at all useful. Save the output > ala > > > make universe in _. files. Also report where to find errors. > > Could this issue be addressed by simply using -jobs ? > eg. > > make ci-buildworld-jobs > > runs ci-buildworld with suitable -j arg and redirects output to > ../ci-buildworld.log by default. > Likely. If I've put my foot in it, then I'm happy to back off. Warner --000000000000a7ef86061925ceab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 23, 2024 at 1:11=E2=80=AF= PM Simon J. Gerraty <<a href=3D"mailto:sjg@juniper.net">sjg@juniper.net<= /a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0= px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">W= arner Losh <<a href=3D"mailto:imp@bsdimp.com" target=3D"_blank">imp@bsdi= mp.com</a>> wrote:<br> > >=C2=A0 =C2=A0 =C2=A0ci: Redirect output for builds.<br> > ><br> > >=C2=A0 =C2=A0 =C2=A0This target is far too noisy to be at all usef= ul. Save the output ala<br> > >=C2=A0 =C2=A0 =C2=A0make universe in _. files. Also report where t= o find errors.<br> <br> Could this issue be addressed by simply using -jobs ?<br> eg.<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 make ci-buildworld-jobs<br> <br> runs ci-buildworld with suitable -j arg and redirects output to<br> ../ci-buildworld.log by default.<br></blockquote><div><br></div><div>Likely= . If I've put my foot in it, then I'm happy to back off.=C2=A0</div= ><div><br></div><div>Warner</div></div></div> --000000000000a7ef86061925ceab-- From nobody Thu May 23 22:28:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VljVm61N8z5LSpJ; Thu, 23 May 2024 22:28: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VljVm5Wmpz4Lvj; Thu, 23 May 2024 22:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716503296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgVUSl78hSgterQdTj19I6ijd4qUEbOodaJMzaWrF3Q=; b=Obuuk0O/WvXRLDJXphAbCIl4E3UEUlz5++C6CHUyjdgHC4Gso5uTOxcTcKEF1yjJ3MZvSS dml34wLvH1FH19Dr6LK9tImXqHIx+iXk4pmMEgFLpvr2ndc7QOHvbW26JXr5ymZRZffqf3 2ttBU+KVVjKNwbQKihC9HWzf/WPtvq8rWX3msnYwrtXaqXxLEC3a6z3WSRjaY9yPgAVKV7 KjRXdfKMm4nGyTZCGOebatxVo8pn9fogJN79hhI5gEru6zm7flDWWQ8J6wlGfi+VvuLFdj ejAWU7zKyB19nS68/gw3SiSlLfCbRxmhMvwvniut+mtKRQMegb2DiiLy+ityMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716503296; a=rsa-sha256; cv=none; b=H/f33TZP2fAP4lEOv6XjYd03SgcXxawD2mY5Abz98EsjyIV9mFEZGLyCk3z+/V8R9o12hS TLAPlnNRUKDpQFDVRRp5zBJ/oZdHqFTG4Y2je8xrebIU/mG863mXfT7C5VpOqTuUCMCVle +0ZqiJEl/TxlRbdBRF4kAtaPA8A1tWpIKJINx34TfUzeUZFC5ya/g2v7jYx0iWyK0JjU3h nbgJJ9AuoQS0y3RvARJPfcfC/VZvojYAFyXJgtx6Jpz27xidKvreRETr+8DUNk/JiOeqLi 8FSqqlZkBSChYvqcVbY4PmiNmaPcb6IK7XfxM+KwGuLUWDjp7YGTiyuOJot8JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716503296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgVUSl78hSgterQdTj19I6ijd4qUEbOodaJMzaWrF3Q=; b=BYzpDorverh0zT0osdqALLF8xEG9k+dlMEboSRmN6eGdC31inUKoujcPzhHTwFp/uBdxV4 rGAGuaxeK9EeYnh2/5ByZFe0tW0jE2Dqb+V38BT/T1Z71UPu1vAScT2DXCqCdAEZd1NbeI OQv23yql3OQ0rkfxUeFpHLvdRqPsIz27PWgujo95n2F2ZqSoRkXxp348NNQ+ytAdN58DSH dvKMFnrMDO6wy8QvKJmPPI+8d8bcQjmrCcTqedig62yPUw1CygGJm2om0RFrUJpxOu38ej UvHCPDuk4hUFcpoFp3nqWD/d+cKnnuUKzIc818PGTzOTTAOTNj3jnojQnQCq6A== 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 4VljVm56Lrz176J; Thu, 23 May 2024 22:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NMSG2A059045; Thu, 23 May 2024 22:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NMSG7L059042; Thu, 23 May 2024 22:28:16 GMT (envelope-from git) Date: Thu, 23 May 2024 22:28:16 GMT Message-Id: <202405232228.44NMSG7L059042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: d33f5a0afa54 - main - fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d33f5a0afa54be7f18775f6506f015c7f79a6a5f Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d33f5a0afa54be7f18775f6506f015c7f79a6a5f commit d33f5a0afa54be7f18775f6506f015c7f79a6a5f Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-04-23 01:10:07 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-23 22:26:59 +0000 fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925, QCA ath1xk, and add Intel iwlwifi IDs. Rather than using a package per driver add fine(r) grained flavors even though it is a lot more likely to break in certain cases. For Intel we need a great level of detail to match PCI IDs so also pass the full pciconf -l line to into the pci_* files as "$2" to have access to these. This lines up with ports commit 80f50c9eb66d. Sponsored by: The FreeBSD Foundation Reviewed by: manu (earlier version) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44918 --- usr.sbin/fwget/pci/Makefile | 1 + usr.sbin/fwget/pci/pci | 2 +- usr.sbin/fwget/pci/pci_network_intel | 437 ++++++++++++++++++++++++++++++++ usr.sbin/fwget/pci/pci_network_mediatek | 53 ++-- usr.sbin/fwget/pci/pci_network_qca | 62 +++-- usr.sbin/fwget/pci/pci_network_realtek | 46 +++- 6 files changed, 539 insertions(+), 62 deletions(-) diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile index 66b3901e4a91..6c500dae6df6 100644 --- a/usr.sbin/fwget/pci/Makefile +++ b/usr.sbin/fwget/pci/Makefile @@ -1,6 +1,7 @@ PACKAGE= fwget SCRIPTS=pci \ + pci_network_intel \ pci_network_mediatek \ pci_network_qca \ pci_network_realtek \ diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci index 6a66049842e2..fbdfa0001c5c 100644 --- a/usr.sbin/fwget/pci/pci +++ b/usr.sbin/fwget/pci/pci @@ -107,7 +107,7 @@ pci_search_packages() fi . ${LIBEXEC_PATH}/pci_${class}_${vendor} - pci_${class}_${vendor} ${device} + pci_${class}_${vendor} ${device} "${fulldevice}" done IFS=${oldifs} } diff --git a/usr.sbin/fwget/pci/pci_network_intel b/usr.sbin/fwget/pci/pci_network_intel new file mode 100644 index 000000000000..cf8c52075db3 --- /dev/null +++ b/usr.sbin/fwget/pci/pci_network_intel @@ -0,0 +1,437 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +# Some iwlwifi chipsets are detected by other means and we cannot replicate +# the full logic here. +# Currently we also filter out all those which do have a wildcard device ID +# as well as all for those which exists no firmware (yet). + +# iwlwifi (dynamic) +pci_network_intel_iwlwifi() +{ + + local idstr=$(echo $2 | sed 's,.*\ device=\(0x[0-9a-z]*\) subvendor=\(0x[0-9a-z]*\) subdevice=\(0x[0-9a-z]*\),\1/\2/\3,') + + case "${idstr}" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh } + ### >>> + + # 7000 + 0x08b1/*/0x4a6c) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a6e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x402a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x406a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x446a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x486e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4870) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc02a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc06a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc760) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x426a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc26a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2050) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2150) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5c10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5f10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9e10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x500a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x502a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x900a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5002) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5090) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5100) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5102) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5190) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5412) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5490) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5590) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9112) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x520a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5202) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5290) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5302) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + + # 8000 + 0x24f3/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x01f0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0004) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x10b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0044) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0250) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xb0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x1030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x8030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x9030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xc030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xd030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f5/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f6/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e01) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e02) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x10d0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9074) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + + # 9000 + 0x9df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x30dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x31dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271c/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x2526/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0xa370/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + + # 22000 + 0x02f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1653) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1654) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + + # ax210 + 0x7a70/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1673) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1674) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x2020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2729/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + + # bz + 0x272b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x272d/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x2727/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x7740/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0xa840/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + + # sc + 0x6e70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xd340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe440/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + + ### <<< + + esac +} + +pci_network_intel() +{ + + for _drv in iwlwifi; do + pci_network_intel_${_drv} "$1" "$2" + case $? in + 1) break ;; + esac + done +} diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 5e4d2af9eb26..3ed6c8b95b47 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# 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 @@ -25,45 +29,38 @@ # SUCH DAMAGE. # -# mt7915 -pci_network_mediatek_mt7915() +pci_network_mediatek_mt76() { - # awk 'BEGIN { x = 0; } { if (/mt7915_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7915) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } + ### >>> -# mt7921 -pci_network_mediatek_mt7921() -{ + 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 ;; + 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 ;; + 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 ;; + 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - # awk 'BEGIN { x = 0; } { if (/mt7921_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7961) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0608) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} - -# mt7996 -pci_network_mediatek_mt7996() -{ - - # awk 'BEGIN { x = 0; } { if (/mt7996_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7990) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; + ### <<< esac } pci_network_mediatek() { - for _drv in mt7915 mt7921 mt7996; do + for _drv in mt76; do pci_network_mediatek_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_qca b/usr.sbin/fwget/pci/pci_network_qca index cf33e0d87239..a97d29ef1135 100644 --- a/usr.sbin/fwget/pci/pci_network_qca +++ b/usr.sbin/fwget/pci/pci_network_qca @@ -29,18 +29,27 @@ pci_network_qca_ath10k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath10k-kmod\"; return 1 ;;\n", tolower($3) }' hw.h - # We ignore the ubiquity entry for now. case "$1" in - 0x003c) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0041) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x003e) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0040) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0056) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0046) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0050) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x003c) addpkg "wifi-firmware-ath10k-kmod-qca988x_hw20"; return 1 ;; + 0x003e) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21" + addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + return 1 ;; + 0x0040) addpkg "wifi-firmware-ath10k-kmod-qca99x0_hw20"; return 1 ;; + 0x0041) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21"; return 1 ;; + 0x0042) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + addpkg "wifi-firmware-ath10k-kmod-qca9377_hw10" + return 1 ;; + 0x0046) addpkg "wifi-firmware-ath10k-kmod-qca9984_hw10"; return 1 ;; + 0x0050) addpkg "wifi-firmware-ath10k-kmod-qca9887_hw10"; return 1 ;; + 0x0056) addpkg "wifi-firmware-ath10k-kmod-qca9888_hw20"; return 1 ;; + + ### <<< esac } @@ -48,31 +57,42 @@ pci_network_qca_ath10k() pci_network_qca_ath11k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath11k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1101) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1104) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1103) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1101) addpkg "wifi-firmware-ath11k-kmod-qca6390_hw20"; return 1 ;; + 0x1103) addpkg "wifi-firmware-ath11k-kmod-wcn6855_hw20"; return 1 ;; + 0x1104) addpkg "wifi-firmware-ath11k-kmod-qcn9074_hw10"; return 1 ;; + + ### <<< esac } # ath12k pci_network_qca_ath12k() { - # No ath12k firmware package yet - return 0 - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath12k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1109) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; - 0x1107) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1107) addpkg "wifi-firmware-ath12k-kmod-wcn7850_hw20"; return 1 ;; + + ### <<< esac } pci_network_qca() { - for _drv in ath10k ath11k; do + for _drv in ath10k ath11k ath12k; do pci_network_qca_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_realtek b/usr.sbin/fwget/pci/pci_network_realtek index 795d9d4a6e0a..d70470b65244 100644 --- a/usr.sbin/fwget/pci/pci_network_realtek +++ b/usr.sbin/fwget/pci/pci_network_realtek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# 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 @@ -29,14 +33,21 @@ pci_network_realtek_rtw88() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw88-kmod\"; return 1 ;;\n", tolower($2) }' *.c case "$1" in - 0xd723) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc82f) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh } + ### >>> + + 0xd723) addpkg "wifi-firmware-rtw88-kmod-rtw8723d"; return 1 ;; + 0xb821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xc821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xb822) addpkg "wifi-firmware-rtw88-kmod-rtw8822b"; return 1 ;; + 0xc822) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + 0xc82f) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + + ### <<< esac } @@ -44,11 +55,22 @@ pci_network_realtek_rtw88() pci_network_realtek_rtw89() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw89-kmod\"; return 1 ;;\n", tolower($2) }' *.c - case "$1" in - 0x8852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xa85a) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xc852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; + case "$1" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh } + ### >>> + + 0xb851) addpkg "wifi-firmware-rtw89-kmod-rtw8851b"; return 1 ;; + 0x8852) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xa85a) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xb852) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xb85b) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xc852) addpkg "wifi-firmware-rtw89-kmod-rtw8852c"; return 1 ;; + 0x8922) addpkg "wifi-firmware-rtw89-kmod-rtw8922a"; return 1 ;; + + ### <<< esac } From nobody Thu May 23 23:46:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VllDj2gsKz5Lbdm; Thu, 23 May 2024 23:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VllDj24qgz4TZr; Thu, 23 May 2024 23:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716507973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6bko5/PeaOj6QpLAX2nsIBnlmcZ9IjA+Poj4XjoDpac=; b=RVD5fj1R6J6LHosPZOA9RC5OA0+a3nOxnGltdZZKneCjha6lS1UwGhU7e08QbbJ190KOXA eocDpSGXsKdL3RQV2X+S2ToBsTFAmF82UpLO1pvzwYF9HM7itIes/bPTKK3lz+aCgDOQ5D lklkkgPa96ulT1LQHIQ+IUeuSL/U3CFYADdaq/hZhGtyhxDGS79pdXIkvTKL0qIsjpOlyQ n1FzJEmJrwhXN8i5FJ8yZjsSR3h8udw4nVgLvCoNq7Bn4uFbSC4b1/riD92a3nM0CZ26JV 715sZqKEjYVyWK6fHKYytOE2iS7m5MMajTmF5VbZL6Nu0I9XH99FxLRt8n9V4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716507973; a=rsa-sha256; cv=none; b=pvY8DOtWl98McyQx7eNdYsB0fkpxGs/bMlueHmhl6OeJaNFyQ4aOOXnlqi+73CGf3GxZ8R daJ7qsABkDzRh0jcvL1gIL3wfy7txR3y6k97I+2UXTCH3D1CMky7KmHtu4KS+fwwo/ZKpI NpV5f7IOM15PRpGnTLXxZxpeRQT3vaARtEj3UeHc13KLPfqKfDM7na97RQtt8TLvr+gDjK jUU4uGNIGpGTfqOCWR7PuuI7BvIsjJQm2KN0vizGX+eSRteysW8+Mg4dAWDHF7J8oEyR8A 60IxEgz4LTRa9EcIn2wR5bcf07oHaxSxsx8Rmewr2M0wGhuDQ4DJ4/Sm+QGP7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716507973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6bko5/PeaOj6QpLAX2nsIBnlmcZ9IjA+Poj4XjoDpac=; b=sdUxgfNlQvFwoPWcrVaSR7egbkW6tX4Tz32NuN8hqs9MtIoe1rHeyIHDo/g9CwpIb9C6mz EDH80KkUc3iOaA+uBUSPhMnr4WIzuZXqr/fqot/g5K9W+YcY9b1QKXuPGEJU4SHI7vPCSi tsKmb5FtXD1JPwcjDyNvK6EULo4CUIeC96IjqF9Bk7s9/dS67X96R6nRg1S61rKxVEPiiJ fWfFtaghm1XGoxLbvvKyzfCRFxRJon+HipR0AJiKtJxQjMdjrrPICIkQCwPBUVEjHAr++1 Yf9sAxZNnqjM0hGet0DNTFmmI5kYNLwy1XGl+ANbwEK2vx8AO8bNrXpoDm+A/g== 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 4VllDj1Xf6z18nQ; Thu, 23 May 2024 23:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44NNkDsU092943; Thu, 23 May 2024 23:46:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44NNkD4m092940; Thu, 23 May 2024 23:46:13 GMT (envelope-from git) Date: Thu, 23 May 2024 23:46:13 GMT Message-Id: <202405232346.44NNkD4m092940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Subject: git: 45bce6fa306f - main - LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=45bce6fa306fc3a211949f63c9bbb7932fe5a3bd commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-02-18 21:07:08 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-23 23:43:29 +0000 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls Lock the two TX MO downcalls into driver/firmware in lkpi_80211_txq_tx_one() to make sure they cannot happen in the middle of other (net80211 triggered) updates calling down into the driver/firmware. Sponsored by: The FreeBSD Foundation (commit) MFC after: 3 days Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43966 --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 72b39e840bfd..03b36e6526bd 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3769,7 +3769,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif LKPI_80211_LTXQ_UNLOCK(ltxq); + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + LKPI_80211_LHW_UNLOCK(lhw); return; ops_tx: @@ -3782,7 +3784,9 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_tx(hw, &control, skb); + LKPI_80211_LHW_UNLOCK(lhw); } static void From nobody Thu May 23 23:58:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VllVw4Nmyz5LcLb; Thu, 23 May 2024 23:58:32 +0000 (UTC) (envelope-from lexi@le-fay.org) Received: from fuchsia.eden.le-Fay.ORG (fuchsia.eden.le-fay.org [81.187.47.195]) by mx1.freebsd.org (Postfix) with ESMTP id 4VllVv6H4jz4VdM; Thu, 23 May 2024 23:58:31 +0000 (UTC) (envelope-from lexi@le-fay.org) Authentication-Results: mx1.freebsd.org; none Received: from iris.eden.le-Fay.ORG (unknown [IPv6:fd12:8247:3:1::7]) by fuchsia.eden.le-Fay.ORG (Postfix) with ESMTP id 3132C2D379; Thu, 23 May 2024 23:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=le-fay.org; s=fuchsia; t=1716508704; bh=Ya9BIac/brBHZJwfKEGsRD7H6LI4l5SjIkCfhq+Uoo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=rbCYRLlehrS0XEK1DvWIRxlNItcZ88SNwNjA0epzv+ca146eNk4eocwINg0IqM1sr c3xrfPZCJnZ10rj7FdenhcHJnBmHA2FWj9q3bZ2/PUL0t0B3aGw6quV770mvgdmhQy S0SQ0pNLZ63xxDQja1CdnIlykwRdkiveH3h0HIuo= Received: from ilythia.eden.le-fay.org (ilythia.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by iris.eden.le-Fay.ORG (Postfix) with ESMTPSA id 75EB62C04D7; Fri, 24 May 2024 00:58:23 +0100 (BST) Date: Fri, 24 May 2024 00:58:23 +0100 From: Lexi Winter <lexi@le-fay.org> To: Cy Schubert <cy@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, imp@freebsd.org Subject: Re: git: 380ee9b3c0c5 - main - sys/netinet/icmp6.h: Fix build Message-ID: <Zk_YHyGpFk7osH5E@ilythia.eden.le-fay.org> References: <202405232105.44NL5eaE023751@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="34tPE2G4rq7AmsaW" Content-Disposition: inline In-Reply-To: <202405232105.44NL5eaE023751@gitrepo.freebsd.org> X-Spamd-Bar: ---- 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:20712, ipnet:81.187.0.0/16, country:GB] X-Rspamd-Queue-Id: 4VllVv6H4jz4VdM --34tPE2G4rq7AmsaW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cy Schubert: > -#include <stdint.h> > +#include <sys/stdint.h> sorry, that's my fault: i had already fixed this locally but apparently forgot to push the change into the GitHub PR before it was merged. i'm not sure why the GH CI tooling didn't pick this up though. --34tPE2G4rq7AmsaW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmZP2BwACgkQDHqbqZ41 x5m4Pwv/QblcCkECro55Ywgl9Fl4z6/S82XtItcnYH81I+VFVOVuW0IviQPl2/kZ 8pGKQYinXhoDV6gAHhWg3K3IrBT0yjJTZItKhV8NHM2mX3iEYjtHH/BZ8p2nkJAs eycNyW0YuOZ1MGfbEbdIS+toqZ0u1l6r6KCrgv4lEnBqHntt6fb0XDncOUZYXI1V IYemmgRjga4Q0UJGFUgdUVjRsVJlXWAR5BEPWuIYoeP9KjAgNm1mYZF8KqHbz5bD bY3U33yfvUuV+8uC7p9ubqjvBuloqRNEiH/RL46HZA/y0zLxVGZismxS7+RfIeq+ Vw87J/U2MH9vYTJEWiLtqO7zpnG3GmkBPTXLQI9UVdOtYEeDd5ldb7xhJ4hfuNWD B0Hc1nLzjbi8bpT959TQ/yaEDGsQCoV4mkBz16Xv8q32UTepRZ8qo8T7G7N/o+IU X0qe4CgqSCo70ohGreOeSmQuI+WE+nHVrUbvem2zQX7pNJDKa72ozlt76TFMNqKg xcy3wtQA =H8EL -----END PGP SIGNATURE----- --34tPE2G4rq7AmsaW-- From nobody Fri May 24 00:02:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllb0536rz5Lch0; Fri, 24 May 2024 00:02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllb04XX3z4WHw; Fri, 24 May 2024 00:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716508924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ToXFb6AWpSjfpXpcRn+BZWQwHQZV0mwx7vgvCKWxs=; b=QQOmVESWrLP357NzyYxb6SPuoKuhc4AzQfLwPyg8GIrsw9o3LV3H1XEispfVWOwq731P9W ofS0QQnFmvNoGcjRACyApx+u+/1sfXHWIncbI/8cSe+ZNXytzilAxr/BJmqeYa9MzkxiBZ 1Xh54KbU8vZEmxZ+MH2As7cOVMA1sa/26zWWzIn0yD6BUqGk84/TsxSok+ORMlP5iTTd2N aog+b7n/J7GvV2XKp8Tsb2O3GOoDOn7/t9rthvjD5bP4K5FMmLz7k3prRRRY4Xf1snTbce 0xW/JsdciaWsXefi/XG0VJ9x61L6pJakArgDRbsls4/Ixd4L16eiqJCOF3zrng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716508924; a=rsa-sha256; cv=none; b=Q0/3z1LvCXuwasqJTdeVpplfAzgrHTEbhlKCSepCeIGy5U2K0qRUFVKmMhtuy+O0jgfAuj 3e9h4KsR7j/e95mnYs+zjgPifELodiH1AGP3eglP0nvPZRBuFYkW7ZEaX7m8VWfqGrH7mG BccDvrxuPSoY6GwTuxCBq1/CGvvP4c1jGD3lnSxvh3EDZPQKFAYXGQfqnoNFHJ4H+EFrGP R9fxRwXOmXoQFn4SC8xIgUTPpH3/Axbaznup1GiUOeMyqE8BZc1ud+W1tko34V52X9DjPY fqLSq/VzQHRcH/R6E/Dy7tgN6St8vuJWYSNdOl9gy3RlOTwJYZPKeRe74yTpCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716508924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4ToXFb6AWpSjfpXpcRn+BZWQwHQZV0mwx7vgvCKWxs=; b=QrcbF3X7K4B1nk4xHM12cU9jVfKD7H2ljpnQx+CXTWf4cItYCrE3KwLPvXDj312t4cxQiK XvERY2vuMZ99nObgYbECmJufAxMjGnvIu2pw4mHu4oT5Xprv/aMho6ZPLiPCfqj0l8nPpw 4QWnZvEK7lBXWURZ3F8ZVWTYRYZhILZZFo+kQyMnk+rcmIMzDVqcHBWVEfYospxbpXcRt8 WBR/UdphJA0YID0ZeSKAxrAjeS/5IKfFdXBzhPhfYjw3hMQ8fyBZP+1ZQq8BkZ8ZmTsktK aEmft9QXKL9HbkVog3h1saMxHnTmhssQ1ItRSxsDENjdW6CEELzkVBVdyQaTAQ== 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 4Vllb047sDz198P; Fri, 24 May 2024 00:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O024Ix026676; Fri, 24 May 2024 00:02:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O0243G026673; Fri, 24 May 2024 00:02:04 GMT (envelope-from git) Date: Fri, 24 May 2024 00:02:04 GMT Message-Id: <202405240002.44O0243G026673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: d31ed58b9f93 - main - Modernize DVD package set in preparation for 14.1 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d31ed58b9f9360cecd9acfbd12999190edca6e56 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d31ed58b9f9360cecd9acfbd12999190edca6e56 commit d31ed58b9f9360cecd9acfbd12999190edca6e56 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2024-05-20 17:42:49 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:01:59 +0000 Modernize DVD package set in preparation for 14.1 Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old and unlikely to be useful without other linux packages being installed), ports-mgmt/portmaster (now largely obsolete and discouraged in favour of using pkg and binary packages) and x11-drivers/xf86-video-vmware (questionably useful). Replace devel/git with devel/git@lite (sufficient for most purposes), and adjust the "ensure the ports exist to sanitize the list" code to ignore the @lite part when checking that /usr/ports/devel/git exists. Add sysutils/seatd and x11-wm/sway for wayland support. MFC after: 1 minute Differential Revision: https://reviews.freebsd.org/D45278 --- release/scripts/pkg-stage.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 551876eca8c6..5742f84b0258 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -12,9 +12,7 @@ export ROOTDIR="$PWD/dvd" export PKGCMD="/usr/sbin/pkg -d --rootdir ${ROOTDIR}" export PORTSDIR="${PORTSDIR:-/usr/ports}" -_DVD_PACKAGES="archivers/unzip -devel/git -emulators/linux_base-c7 +_DVD_PACKAGES="devel/git@lite graphics/drm-kmod graphics/drm-510-kmod graphics/drm-515-kmod @@ -22,19 +20,19 @@ misc/freebsd-doc-all net/mpd5 net/rsync ports-mgmt/pkg -ports-mgmt/portmaster shells/bash shells/zsh security/sudo sysutils/screen +sysutils/seatd sysutils/tmux www/firefox www/links -x11-drivers/xf86-video-vmware x11/gnome x11/kde5 x11/sddm -x11/xorg" +x11/xorg +x11-wm/sway" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f ${PORTSDIR}/Makefile ]; then @@ -61,10 +59,10 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "${PORTSDIR}/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P%%@*}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else - echo "*** Skipping nonexistent port: ${_P}" + echo "*** Skipping nonexistent port: ${_P%%@*}" fi done From nobody Fri May 24 00:03:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllcx0T6Bz5LcyK; Fri, 24 May 2024 00:03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllcw741Fz4WVd; Fri, 24 May 2024 00:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4tCN+LUXo9A3Ct7cHTM5qKvaSCIN5nTRMjg3nJZdw7U=; b=ehF9z8y6oHw+5DHqGTfLNEfh35Q5KgXhLSZTobcTjWwYASWFkmoXVwi5O4K9rj8n9M1qaX ijdgap1hQCkPZrt1YBK67vpXDzVITT6ypf7nwz4SEXkV7V1iorkNtCplnZPxlpyyLNWOcg vQ3YG3mIT67KDG882FASb5BM/dTJepzyQK2ZfgeZiTuHJJ197d+BruGXNLkht945A0U57A +vJnzIwH1HKiQgskUCfnLvtTNGcD2sLeO6IP5cfyL9qKdOVOCu+VeiIBdKC/dOvZSoGLsW PVfasei8qpNuCmwPn5UYsHtvGFnZMe+1H8LakRD9WmztM3wkj+9KVoTxMPKnSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716509025; a=rsa-sha256; cv=none; b=y3t756PfIL2N1cXYhaMSYb/Eas5NnP44EXtQ+Pod3YX3CyOD6BhGoSy2Wv2bzdXkXOn0jo z61MZXKLL9RfGgWhFiZLHJarA53XRf6vKqg4sez5++3/dHkzYwqL+BxoM/FKOYt5D7FLD7 9UUNfePXLdLcS6igqMgfwgf7fwSTAnJArYg8zfRG08m239ZNJIaJlEVQ2K8m+7QJAOXqjv szUpjcPHdtb1c6oIQcZxU1LbSLvyMSFiDK9i69uClAuyNna/6xH3uViI6qoECX1IilnpYd 0WhHWf7IDaJMmCaReRv+ymFrocRdBaSHBtrkk5Hzil+aL7O6xwx7DlyVHOJP7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4tCN+LUXo9A3Ct7cHTM5qKvaSCIN5nTRMjg3nJZdw7U=; b=uBwLn+JnIZ3cmKPHoKLgpTTAP5tT7cxodtdLhwJMvCm1PLJ0G/n3nkhV6KBdwY9WciOJ7d +wj6MxkM94aQ24TI0Xd3dwS4p/xJZOTmKGvmEdZ2ZRh2YbL34HMjnFLeoDaoznv1nirM4u NqhzbIfY1et2wwVIfwOYkXuhmYKp16tqONvPDjCiZryKT4TX0b0HeyBkQ8FJwT39nU8avT qs0KneWBCX09LckDQDuSqwvR9B7BBWDe96QazpvegN0ZIToLO3n77Vt4aq0szluzApYcfd N/VgJxJSiFVHMx8fq6JF8aBx53Y9FRbPkpdAAwzrM58LAfD7H2c5Qd+K9q7KCg== 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 4Vllcw6gPdz19M1; Fri, 24 May 2024 00:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O03iU2027057; Fri, 24 May 2024 00:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O03iG4027054; Fri, 24 May 2024 00:03:44 GMT (envelope-from git) Date: Fri, 24 May 2024 00:03:44 GMT Message-Id: <202405240003.44O03iG4027054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: f81c0904f736 - main - Add rtw88 firmware to DVD package set List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f81c0904f736249bd43a95e92370483383233449 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f81c0904f736249bd43a95e92370483383233449 commit f81c0904f736249bd43a95e92370483383233449 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2024-05-24 00:02:40 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:02:40 +0000 Add rtw88 firmware to DVD package set Add net/wifi-firmware-rtw88-kmod since it is no longer included in the base system on 15.x. (It is present in 14.x, so this change will not be MFCed.) --- release/scripts/pkg-stage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 5742f84b0258..a887173aa858 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -19,6 +19,7 @@ graphics/drm-515-kmod misc/freebsd-doc-all net/mpd5 net/rsync +net/wifi-firmware-rtw88-kmod ports-mgmt/pkg shells/bash shells/zsh From nobody Fri May 24 00:07:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllhz24gtz5Lcy8; Fri, 24 May 2024 00:07: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllhz1YwDz4X8T; Fri, 24 May 2024 00:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ziV49G3zRfnfHmiCZIt6qo/WgLYeeLW2r5NYmx6mgA=; b=TOahm58Ejn4ZuJkvlWzPwdw7rhLREH0YIz/lhOySmr6bN06ELxA6W3ixcpO453/pUUQCdw +orudSMGiLRhYr4oOsUUkt7N6ZKx1vNAHciDhmcFpzvPMjs4MdTU/6idbd+vhyp/eNYVF+ 3nLLvY0AJ8Kbpx58C9I2pl/7Z1KBqNKwUqMWZBWYG2zArfAJO0fdkXxLDkuTGJ64qeyudU 5BL978Pe0WcuaElHwKgE0Bgbjl+86tdLCwDxP64IYFBvban9UIj0YuCtaQnIJeOvR3/K5g qC/EnV9Ms7F+a6MYU5NMki0bzzbGd+t1lFvX2EtnG+oN1oTeVhIRPtbVVNCi/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716509235; a=rsa-sha256; cv=none; b=mX9UzZqbl/QpZY8vtwxBDeoGuyvd7ZpLVZ4htCzz0E/fOOZh5lr0Rn/lbJ6Fchyn1zYlEI MAjDWo6huwY97O8bE8Tqw2JjE25TQvfun5knINsZqTJfOSWpdbJ70YRDHaeu5nYaWM4NN5 4KBDfryltzQu9DIwJGmiqTPdqCBsNylDMYzgA13XjQ6PBczU2kNvSkLKezDLK6qxYExYHB l18jR9l5TsK5LVbeZSlmRHY4hwIGarDYS4nBPccO4HHMmuVNxLhzd41cP6+w/pgwoQX9j0 DJQsIFXCVW0qndXnbq4Agd5zL5x4+4WyyMOVfugavFotZZAiTLGmgsLKlUruFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ziV49G3zRfnfHmiCZIt6qo/WgLYeeLW2r5NYmx6mgA=; b=KCS1qhDMbLwPQzspDGrAJkllTHmpPjs+a6i8tXl2lTbjmDvKDum+QPJMdiIVPkwKICFu9M VLm/Vs4qwDVmmYvatik6prRAtflLswHpZR0Dit8VfG/0vLdzK6ikxdt2W0GTl4AXTu6rOr 1nbyNi7ZcJ3so3aPIWkFdYYV0R6eIk7R6/gApKVEPjn2GmxbZGxFKTnsCF/IbnSqQaZYoM V2kTE65H39MQU4Pyy6QRHOHBvTM+PH/3bBJcoOlSrztAj2mBmFzJzpu8YgTatpDcAAuzuQ LYeVlqnL42F8jcl3y39vmoub3Xxs/HM5xeOYM51PvUzA+7sUEIOuRq9Er+3NwQ== 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 4Vllhz18Lxz19c6; Fri, 24 May 2024 00:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O07Fko027699; Fri, 24 May 2024 00:07:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O07FuK027697; Fri, 24 May 2024 00:07:15 GMT (envelope-from git) Date: Fri, 24 May 2024 00:07:15 GMT Message-Id: <202405240007.44O07FuK027697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: 9317a4a3a827 - stable/14 - pkg-stage.sh: add x11/sddm List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9317a4a3a82797f8128720ac46a36ece0a404349 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9317a4a3a82797f8128720ac46a36ece0a404349 commit 9317a4a3a82797f8128720ac46a36ece0a404349 Author: Graham Perrin <grahamperrin@gmail.com> AuthorDate: 2024-02-02 23:35:42 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:06:44 +0000 pkg-stage.sh: add x11/sddm MFC After: 2 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/996 (cherry picked from commit 5ff76402daf17b9c36048bf11957dac7556272a6) --- release/scripts/pkg-stage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index bdfa3643bacb..551876eca8c6 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -33,6 +33,7 @@ www/links x11-drivers/xf86-video-vmware x11/gnome x11/kde5 +x11/sddm x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). From nobody Fri May 24 00:07:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllj031hLz5LdBJ; Fri, 24 May 2024 00:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllj02CP2z4XC2; Fri, 24 May 2024 00:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRV4OdVRfM3c0mAySEzzgv4jD137xZqyjob9GbekNAw=; b=SFDOcedUbFtFoC66mmAlfgg0ZxGdDmbnJMSuvp26E7H+pCTRcw1rLlMU3tKwddIEOMVoKU MC9ZGqtyvUUNeb672m+hWiLIlMvWxnaaO4kJ4dswXoWATLYgRMrNSyjHvvBr8L+Ut8mnK8 ad2k8k+/9dxKmXB4KIx4lTyqAmzrts5OA9Kuvf2UNKgxFJf3mBNSQ4cNuLfPG3W0Zg5wVE ZKndUnRKLhyVh6soxN5J0w0dm8Av1viNWj5/KYU4ffv5YSw114oAhtDZlWWERvSIU5h6W0 dk/d22UWZICYoNVuITjF/XZYGRw1mfqpvEkw/Z0hGfpDmAP6z5ie2/VbefO+PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716509236; a=rsa-sha256; cv=none; b=yoqbb/nhYSpiArL4CL1hbSokEWgBxCpEFhcI2MATNY08xkiH9PrvyDfw+lXst9hq087tSE APURRcsiuxotmSUnFQeGPeIIXVHsuq2yB6PuqfkwTaIenUdeovnGh1kOzq5KZCcm1GXpLB QGm+Wg0BcU0QTUO7HG3W2UxQ0xR17ayh3rroJBNXy46QWdnfFvcfw7leiDDq0XMaI8BxzP cMrjHMgf+Tnz7kT08VycDBOAksdjGkEJVB5f/vRn9CdirDHxfFzMyftwjX6gkv4DHStykN JxMS8MXAOq6SqrDoh5pYfPDAlDn23aMJ3yD9/ouM4laxfXweIFXu26GAi+8FBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WRV4OdVRfM3c0mAySEzzgv4jD137xZqyjob9GbekNAw=; b=yKmR7RiRbh2d05zreCbWCSsHVwVsL9a2GApaS6tBn633GChwKDKisU8QJaH7ByoQk4rY1c eXfW82eM5WuYNVpjEI+SDylz39kMR9ej9h4xLW2dT0Xz9/RFtdrOv1c2lmVW9KGTuDkZ5p 6WuEWitTkSHxF6oMluZNXP548ipybwq+k6SOoc0yNZ540AfwRqnDrZTe2AhimsD+2u+xpq MzGpsXq5Vbf22c9kWbavJnWuD601FnOy97FCEva2zKqMPDJwOZNoZAVml5lJaOq2iT5cNo gO3FBPzfFuP94male9XbSsST4anKWwN1UDXubr88ExJwZ2+pt/vhBiSf7XZ7DA== 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 4Vllj01q4Gz19M2; Fri, 24 May 2024 00:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O07G34027750; Fri, 24 May 2024 00:07:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O07G22027747; Fri, 24 May 2024 00:07:16 GMT (envelope-from git) Date: Fri, 24 May 2024 00:07:16 GMT Message-Id: <202405240007.44O07G22027747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: 0543cdc36ac6 - stable/14 - Modernize DVD package set in preparation for 14.1 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0543cdc36ac6c91dccc2f1c5ae1df42c6d4d2a1d Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0543cdc36ac6c91dccc2f1c5ae1df42c6d4d2a1d commit 0543cdc36ac6c91dccc2f1c5ae1df42c6d4d2a1d Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2024-05-20 17:42:49 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:06:50 +0000 Modernize DVD package set in preparation for 14.1 Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old and unlikely to be useful without other linux packages being installed), ports-mgmt/portmaster (now largely obsolete and discouraged in favour of using pkg and binary packages) and x11-drivers/xf86-video-vmware (questionably useful). Replace devel/git with devel/git@lite (sufficient for most purposes), and adjust the "ensure the ports exist to sanitize the list" code to ignore the @lite part when checking that /usr/ports/devel/git exists. Add sysutils/seatd and x11-wm/sway for wayland support. MFC after: 1 minute Differential Revision: https://reviews.freebsd.org/D45278 (cherry picked from commit d31ed58b9f9360cecd9acfbd12999190edca6e56) --- release/scripts/pkg-stage.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 551876eca8c6..5742f84b0258 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -12,9 +12,7 @@ export ROOTDIR="$PWD/dvd" export PKGCMD="/usr/sbin/pkg -d --rootdir ${ROOTDIR}" export PORTSDIR="${PORTSDIR:-/usr/ports}" -_DVD_PACKAGES="archivers/unzip -devel/git -emulators/linux_base-c7 +_DVD_PACKAGES="devel/git@lite graphics/drm-kmod graphics/drm-510-kmod graphics/drm-515-kmod @@ -22,19 +20,19 @@ misc/freebsd-doc-all net/mpd5 net/rsync ports-mgmt/pkg -ports-mgmt/portmaster shells/bash shells/zsh security/sudo sysutils/screen +sysutils/seatd sysutils/tmux www/firefox www/links -x11-drivers/xf86-video-vmware x11/gnome x11/kde5 x11/sddm -x11/xorg" +x11/xorg +x11-wm/sway" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f ${PORTSDIR}/Makefile ]; then @@ -61,10 +59,10 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "${PORTSDIR}/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P%%@*}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else - echo "*** Skipping nonexistent port: ${_P}" + echo "*** Skipping nonexistent port: ${_P%%@*}" fi done From nobody Fri May 24 00:10:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VllmG0nLdz5LdBb; Fri, 24 May 2024 00:10:06 +0000 (UTC) (envelope-from lexi@le-fay.org) Received: from fuchsia.eden.le-Fay.ORG (fuchsia.eden.le-fay.org [81.187.47.195]) by mx1.freebsd.org (Postfix) with ESMTP id 4VllmF2GFpz4XgV; Fri, 24 May 2024 00:10:05 +0000 (UTC) (envelope-from lexi@le-fay.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=le-fay.org header.s=fuchsia header.b="w/J4OOr3"; dmarc=none; spf=pass (mx1.freebsd.org: domain of lexi@le-fay.org designates 81.187.47.195 as permitted sender) smtp.mailfrom=lexi@le-fay.org Received: from iris.eden.le-Fay.ORG (unknown [IPv6:fd12:8247:3:1::7]) by fuchsia.eden.le-Fay.ORG (Postfix) with ESMTP id CD9B62D482; Fri, 24 May 2024 00:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=le-fay.org; s=fuchsia; t=1716509404; bh=aI+9KzA7GLk5ltMtcuvxLqBbgfRFx/uJ+eCDcPhEC8o=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=w/J4OOr32CtVs4GRwhnDNMFdAwa86pvq6zFGIq0w94EGY93FKNESIomc/sI3va37U Xof99xWbVR4guHANuqruY2/4JfwO3l74XptDFpKXfGZ3MW+OsVXEbx0Fkr8yWw8q1Y un2YXtv0+9zYYNkjdl91TPaiSDzwyk0UtEVBmqfg= Received: from ilythia.eden.le-fay.org (ilythia.eden.le-fay.org [IPv6:2001:8b0:aab5:106:3::10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by iris.eden.le-Fay.ORG (Postfix) with ESMTPSA id 51A132C04D7; Fri, 24 May 2024 01:10:04 +0100 (BST) Date: Fri, 24 May 2024 01:10:04 +0100 From: Lexi Winter <lexi@le-fay.org> To: Brooks Davis <brooks@freebsd.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk_a3GLevuNFS680@ilythia.eden.le-fay.org> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UlbVc3+SPPOOXNrd" Content-Disposition: inline In-Reply-To: <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.50 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_DKIM_ALLOW(-0.20)[le-fay.org:s=fuchsia]; R_SPF_ALLOW(-0.20)[+ip4:81.187.47.195]; RCVD_NO_TLS_LAST(0.10)[]; MISSING_XM_UA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:20712, ipnet:81.187.0.0/16, country:GB]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DWL_DNSWL_NONE(0.00)[le-fay.org:dkim]; ARC_NA(0.00)[]; DMARC_NA(0.00)[le-fay.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[le-fay.org:+] X-Rspamd-Queue-Id: 4VllmF2GFpz4XgV --UlbVc3+SPPOOXNrd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Brooks Davis: > This is more or less standard practice for generated files. These > commits are of basically no interest. to be clear, i'm certainly not expecting a detailed commit message for things like this. my only concern is that when viewing the commit log for all of src/, or for src/sys/ or whatever, they look like this: 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf LinuxKPI: add kvmemdup() 69b6c4a6ec6654978628ccd48edce46f00ac3e96 LinuxKPI: 802.11: fix for_each_sta_active_link() 408957613bc065c4444812c3ae276ace03697ebd Regen 6b7e4254a29e3228a7273622556b60416e300509 capsicum: allow rfork(2) in capability mode c80c104cbd52db994c0f2757bd1c6d014744022c glabel.8: Describe cases related to permissions / existing mounts the other commits make it clear what they touch (LinuxKPI, capsicum, ...) so i can ignore those if that's not what i'm looking for, but 'Regen' is not very informative there. if it just included the filename it would immediately be much more helpful. --UlbVc3+SPPOOXNrd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEuwt6MaPcv/+Mo+ftDHqbqZ41x5kFAmZP2tkACgkQDHqbqZ41 x5mPLQwAjTzt7nJVgTbpdqIjOb4ZKKELh8bwM2LG/LB56EmxnG7Sy6GoBQzICxfs C//cbIs846FyfQwpH2m0rdnfQPrfl5PGTdWW+j54otAxAXUNkuRn4wPiinGDimFD SwwdJZ6Vncyk54OOJKCNF/9XiKFUnM3gzEADQu7ZDsI49iVf76+0FJJXbouK8st8 i3DnwGqFAT/6MpxlgtWdojCJA85wYbedTuY7DDN6YtKiPGHzCaAlOD8Ahf78wZJ7 Xrut+peieLSkKZueN0fFBl6IGXBU7JRfjY86zJF67nXkB2scmYTtEUhr95n+3mBi oXgSF7T1P4mCEHNgSnU7Sj4bCmjn3FfWSzlz9ohUCpn7CrsOSVZSDXnfbKLncqQ0 7fcTyqsNVaXKQ3Yk6U8YgcT5FKKxBgruuos4JLQb2sgeexRswlSGWKeNy8V+xhUE FQykxeh5/vMSWYy0Gd0YHJWD38w4RICYNjv8Ar6cfzaTgw7iJNwshtjbeZGKjm0+ zMdHgu0s =+AHw -----END PGP SIGNATURE----- --UlbVc3+SPPOOXNrd-- From nobody Fri May 24 00:13:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllqg6jMhz5LdvC; Fri, 24 May 2024 00:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllqg65cwz4YDd; Fri, 24 May 2024 00:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oSR+XPfcH0/XSZ1EAJ759RcmozodU8FeUje2tGpxcMg=; b=pISrbiQdIrNCg12eed0vrdURM15SsGWIJ4+4CKBe6w33N+LecX6SeSVkfiIuvTtPbbr0D2 QaZsrYZxJKcgYyIRYX2ZwtJ/QJzIckDi1pQpuKz/UYlXT08EePE7CSzj3xEFrbRPOh9sI3 wsW84R/XDWmfjpmfbryT19asYvtFhbfUerC3l8Kg4IcrsLSO8iVZWcPpCIeaGvvh1bQ66D wi+Rfk0joTwgdu1H2Nq4iLBSf88qzgx0dSdFK4OvA5DmArD91W8Y1na8vx4f+MtoDi0QBV RN1gdjTwxgxr46ilk/GHsES6fFwjh0tfOZVs7yiA60VNF7W7gwXvNHvDqSNneA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716509583; a=rsa-sha256; cv=none; b=GGqLJSdOKlWKy51WdEzj1LJ7TzFR/1R6v8qr77OS7R0XHI3x5TiqRWBLFzD4KnoFyFrPjF k+wlqLj0KmE9xsnjxbk2XjNLZEYBvEJzYxWNW8d4FvNtluSuHDLw9Df/D1CUfLWpk77OVa 2zKDxdQ1Q3Fx7yCsRARtvTZveWAssRSHIumDMsxJX2f88HWRvNvZGoplyyvsIuwKtqjXPR l3JWUqhhr28fyODJUbGcfjQSi3zNKJJciFGZekSTbJdruBNfRdzGsZuI+SmPT4Zu89MNfI K7aYeVVTc5nZJGo8eX4W3y9wZ7tEEMHFX82Qrg8Fc2JS+NeJlQ53jZXC6/h31g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oSR+XPfcH0/XSZ1EAJ759RcmozodU8FeUje2tGpxcMg=; b=MGio4t0AuFtyXL76qfxjWHwAfVtYYQkc0RTewvyR28V22BdDjABuJweVPbrA2tQqXgerJ7 3P7NU4iTiyv9OqQzAl/1+RolvF4Gn5e7Vmcx4kpixd1nlPsmWhgLACqIaUEiFb6ctRRLvc AmK+QJ0dx6C02/Ia0bXBKNA8mgkAq249sIYIR9OXvDSIudhsKDDdOCOxdVRDhtgon9h7gz M1QLIC5QmpnaJvhCTttU89cP73KygLykP5Bmu1DSPLxan6ENP0KANF6s4SyKuYv5Z5oph+ qyfqjfhEHUUJYMEV+UfWm65kUb6vA2m+1P3cepRUusYRpIO980sBMsOjj7gqWw== 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 4Vllqg5jMxz19NY; Fri, 24 May 2024 00:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O0D3Yg043780; Fri, 24 May 2024 00:13:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O0D39p043777; Fri, 24 May 2024 00:13:03 GMT (envelope-from git) Date: Fri, 24 May 2024 00:13:03 GMT Message-Id: <202405240013.44O0D39p043777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: cf1e3e15ddd0 - releng/14.1 - pkg-stage.sh: add x11/sddm List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: cf1e3e15ddd0a4aa7c18ed97dd504b66fa9c6a5d Auto-Submitted: auto-generated The branch releng/14.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=cf1e3e15ddd0a4aa7c18ed97dd504b66fa9c6a5d commit cf1e3e15ddd0a4aa7c18ed97dd504b66fa9c6a5d Author: Graham Perrin <grahamperrin@gmail.com> AuthorDate: 2024-02-02 23:35:42 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:08:22 +0000 pkg-stage.sh: add x11/sddm Approved by: re (cperciva) MFC After: 2 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/996 (cherry picked from commit 5ff76402daf17b9c36048bf11957dac7556272a6) (cherry picked from commit 9317a4a3a82797f8128720ac46a36ece0a404349) --- release/scripts/pkg-stage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index bdfa3643bacb..551876eca8c6 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -33,6 +33,7 @@ www/links x11-drivers/xf86-video-vmware x11/gnome x11/kde5 +x11/sddm x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). From nobody Fri May 24 00:13:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllqj0hdFz5LdWs; Fri, 24 May 2024 00:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllqh73ykz4YXg; Fri, 24 May 2024 00:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HQhFVAWha89bk8/HWdMmTcjKv6CO6WcyZu/VEwUKMs=; b=Jn8vqDcYaZq0KptqhmVowK7dYCei7FGnbfR9YKCMghc8ufOxge4LUPNAXrdxrRx6DQDPeK 1Gm2U7urrZAy9bIcC5ZzwxAVRVrIxIBKyqIdZss+qSQb2035eYp2vsetkysmCD9u45z0Ap FWAod2/OnhMvowL4vHtCOWSKP+PDWR9i/nXlxAfLiGbJOR9lVlCLROH1jt8kMQ768AORrX 9xJHGqiP+WXIxelsdda5ufTCC7tGK4A4ZpJOb43aWQZvSyKJX397AZptLGEITOl5e0fFB9 /Gyi6mLMil1nVSq2eNkxLA3lrEOrftAr5qZ/DRkrA7ctmgjj5dC9ORBax8vyWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716509585; a=rsa-sha256; cv=none; b=B7MY0JA4NqSc85WuzVOnb3uUaZ28vzs/6qCXbbuBFoNDE223B3+ki8NEp5uUIZ8WRHfg2i r60nUgqMV8O7KucFB3dUkIJB4/b0+LKIeex0SLpfpPs8DFd/7lhdYBZHqVYP5a5FLyXjBG LLqcEm6XKKym+wKi8IvGWeAAPeWZM5bzYy6odI612H+hdkW8hvr/nBlxfblot9S3n44qjF MVA+ktJpwyhj2U+SfzpP5tZDZwEmx3kFIoXmieFytQJJ47EBaRUkVd1l8xbx2bsuJphYB7 vLoxR9RBQwZeGpfOh7oWGml5MJf3DQIR73ChdykR0jhhBh7h6HqxwnNqo8nJUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HQhFVAWha89bk8/HWdMmTcjKv6CO6WcyZu/VEwUKMs=; b=OyaYwgFfjLiHG8MNwY+2fhLbfJvULDO+VGXgufHXp+6J7Igd1C7qZrqlBwkORNeaM+AME8 m227wtpiB658Rx8+r1huD1hxRbhhvBAKjsXkZiQD5iM5AX1Tx2Oqq/m6PSXuGgbpgsqVPj Zh3RPe644+w/tfFpK9vsw3r0GNzwPnmhU2VgsG1NixKFGz6HDTsePIB/bok54blZ3Kxn5q zyEpK3uQ1D5jdv1hT9tWwUdM7mV3VgwOcNgX84CwVzpJiP/ICL76Vr4xUmVWppogxr1mBq +UC646b7sQXcO7IhepQEJYSX4jKPtPZWxF0dWiflMi/glCAoREEIX1BQoudTRQ== 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 4Vllqh6hM6z19gJ; Fri, 24 May 2024 00:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O0D4aC043831; Fri, 24 May 2024 00:13:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O0D4gN043828; Fri, 24 May 2024 00:13:04 GMT (envelope-from git) Date: Fri, 24 May 2024 00:13:04 GMT Message-Id: <202405240013.44O0D4gN043828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: 8f7da18ea248 - releng/14.1 - Modernize DVD package set in preparation for 14.1 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8f7da18ea2482e49bab7021ad759b4ca17366369 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8f7da18ea2482e49bab7021ad759b4ca17366369 commit 8f7da18ea2482e49bab7021ad759b4ca17366369 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2024-05-20 17:42:49 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:08:37 +0000 Modernize DVD package set in preparation for 14.1 Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old and unlikely to be useful without other linux packages being installed), ports-mgmt/portmaster (now largely obsolete and discouraged in favour of using pkg and binary packages) and x11-drivers/xf86-video-vmware (questionably useful). Replace devel/git with devel/git@lite (sufficient for most purposes), and adjust the "ensure the ports exist to sanitize the list" code to ignore the @lite part when checking that /usr/ports/devel/git exists. Add sysutils/seatd and x11-wm/sway for wayland support. Approved by: re (cperciva) MFC after: 1 minute Differential Revision: https://reviews.freebsd.org/D45278 (cherry picked from commit d31ed58b9f9360cecd9acfbd12999190edca6e56) (cherry picked from commit 0543cdc36ac6c91dccc2f1c5ae1df42c6d4d2a1d) --- release/scripts/pkg-stage.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 551876eca8c6..5742f84b0258 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -12,9 +12,7 @@ export ROOTDIR="$PWD/dvd" export PKGCMD="/usr/sbin/pkg -d --rootdir ${ROOTDIR}" export PORTSDIR="${PORTSDIR:-/usr/ports}" -_DVD_PACKAGES="archivers/unzip -devel/git -emulators/linux_base-c7 +_DVD_PACKAGES="devel/git@lite graphics/drm-kmod graphics/drm-510-kmod graphics/drm-515-kmod @@ -22,19 +20,19 @@ misc/freebsd-doc-all net/mpd5 net/rsync ports-mgmt/pkg -ports-mgmt/portmaster shells/bash shells/zsh security/sudo sysutils/screen +sysutils/seatd sysutils/tmux www/firefox www/links -x11-drivers/xf86-video-vmware x11/gnome x11/kde5 x11/sddm -x11/xorg" +x11/xorg +x11-wm/sway" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f ${PORTSDIR}/Makefile ]; then @@ -61,10 +59,10 @@ fi # Ensure the ports listed in _DVD_PACKAGES exist to sanitize the # final list. for _P in ${_DVD_PACKAGES}; do - if [ -d "${PORTSDIR}/${_P}" ]; then + if [ -d "${PORTSDIR}/${_P%%@*}" ]; then DVD_PACKAGES="${DVD_PACKAGES} ${_P}" else - echo "*** Skipping nonexistent port: ${_P}" + echo "*** Skipping nonexistent port: ${_P%%@*}" fi done From nobody Fri May 24 00:13:05 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vllqk3NtTz5LdRL; Fri, 24 May 2024 00:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vllqk18Y2z4Y86; Fri, 24 May 2024 00:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sBkaI6KM6yYk/MaepipamoRuYkfQoMh/z9R0n+HPiOQ=; b=aFthAuBzn1X7Ai2iVL7YB8AwPmdiqhLaHvzSdtAwAVUxG6CHlAlbjGMn6aIPNEdT3vdYJ6 FJgHIzOUmvYfNS4LfJkJDucimdaCoKtcAK+KlRYxc8dOA66MN5KHyeAkN46hXo/oe7KNcb v6N+9mIfK6HC1+PCNxq22VxVuEZv8FR0Ex21+x+NzDdc0m+H6InGO5T2XtVcA1M8eFlMMK qczLAOCtkhtly4mmUQHLpvl8+UfI++oMBZq+yyOS3hn1hCkxNLe4i3WaNctv6qqtvKk9SU DdoK/ybkVRlLJisxRiCIV+x3DxZ75momqXFrhd79cLh6M19B+TNeTToYzpOf7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716509586; a=rsa-sha256; cv=none; b=mijkKu59Hgt2MXsO8T57AmrUj2XeEmBotXudxFiNARPkazdIeoJlFMdMVNvMh1blpoBMxI DbGVcRCgT1yrmPo0/iH5Tcn5HSkqKfTUKaWR3Q0lWfPT76TkJs5oLMe7Bcc3ycEiNhQQk1 voIg4dBUNNHuGmCwOu9+OnPXfnk9mRcxFI1wTUCD4pU3nLNISw/uxO5g9x0ElvvtKajkLZ F2XN8eUNUZNExK6Mb37oUpKKZ+bdotfKg5GZ1jfxWi8OtMWIcYeTphHTJ70dUw7CGs6HFS nfww+17rfstD4Rjc9eRzkdTLiJdUeox2mcHHy7yA8eaDN1citE0oNZhjvoCcmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716509586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sBkaI6KM6yYk/MaepipamoRuYkfQoMh/z9R0n+HPiOQ=; b=yxopq3F8j0Ye8mTiq1PiiYL6Q+OmphtBoZJZxtUlG25XaD1+2fv6HpHrNx20XhcSpR01Gr p9y+98Rca3aaazxRfTmVMdQGW8qbqh9/iPjnNvHWvUjCnbS8Kl/02hGtYEAz9fddT43WFR 9ont7I9AH8BIpwke/pZWPvuC0mkv/aOf3+TFwU4B4/8FzcA6YmNhhBWWpe4VwePrCvStzr BNryodRCVF+22fV3CiI8HXF7ORn/IBCz2I2UStBU2weNQMqlQM5+g1FuRxNTJ7yVp1Y20f 7RpVkx3uaOJ3Tgb1F+hXKe4uYxE5xG42DQQ0f88Y1aczdmXf9VZfDSo3MahVdg== 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 4Vllqk0kMMz19Zc; Fri, 24 May 2024 00:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O0D6VA043874; Fri, 24 May 2024 00:13:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O0D5Of043871; Fri, 24 May 2024 00:13:05 GMT (envelope-from git) Date: Fri, 24 May 2024 00:13:05 GMT Message-Id: <202405240013.44O0D5Of043871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival <cperciva@FreeBSD.org> Subject: git: 4de43de58f51 - releng/14.1 - 14.1: update to RC1 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 4de43de58f519f5c7a68925ecadc77cdf37f9f30 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4de43de58f519f5c7a68925ecadc77cdf37f9f30 commit 4de43de58f519f5c7a68925ecadc77cdf37f9f30 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2024-05-24 00:10:09 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2024-05-24 00:10:09 +0000 14.1: update to RC1 Now that we're at RC1, switch from "quarterly" packages to the release package set. Approved by: re (implicit) --- release/pkg_repos/release-dvd.conf | 2 +- sys/conf/newvers.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/pkg_repos/release-dvd.conf b/release/pkg_repos/release-dvd.conf index 600c309d5979..d63faaa5fea7 100644 --- a/release/pkg_repos/release-dvd.conf +++ b/release/pkg_repos/release-dvd.conf @@ -1,5 +1,5 @@ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_1", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 76028e28d286..7ba6ed47b3b8 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.1" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri May 24 00:22:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vlm2n5Tljz5LfMx; Fri, 24 May 2024 00:22:41 +0000 (UTC) (envelope-from brooks@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vlm2n4sQtz4Zpt; Fri, 24 May 2024 00:22:41 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716510161; 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=lbXxwucuYKAmRmdJCRFNwrJ1t/rMYkn+ZPxG+11T8n4=; b=a5XsjunAO0iBlf+nEzFiqr7tDI7T+zzKnr0X180bP6wbXVbEIo18BdlbCYAO6WkY5+bE3N Kp7aoDhiJ7/vuv5pjX5xoJDO8o6Vi5hfKsD9bGnJxMQ5kW4tr220VDM0HTxTBUkGjVXYpE efGd4b3g5QS2msD+UisJrtk1CalXLUJ/lulW1/n4w20pXb/FaRLRscQ8hjIRbsRC5NQkYR 77MV0fWgMZIPJKLO3B2h3ZCLWldAAPKGkCO/8Ep8kNlnPVtb+T/r5B9c1uy1esVbP11etg fruOshdZte2pA9ka1aZEouoX7+hyAIW0tfjCtScYIVFQOneFDbAAOgvZEtKyiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716510161; a=rsa-sha256; cv=none; b=dXr8ntkGXT/CxfCiK/GzTMaHg/MHIxPQduYZOHdEKy0mtUCBvW3ISsMa9vTnPZZ4KbC2vo 3EddZBWqXOzyVhZsBcWrcqJp424zTCusNfCwGE+B9UlPrW5gI+nWmXghoN4+Z5L3GPbA8n FvUymh2SJK0MccAOcrDZ9MeUFTF6+pzHuSXaJv4do5d1e3c6Y5FYXj9LX3csCpLEQZ+jBN G2nFTqz5kVtUbw9VZLoa9d2B32j8B5G0XiQmvxDZUDUaZpd85HkSZk7U0C1tHcOQD2TvQc qDMx8uluw/q6mcU+KampRToJNEitodmXdlI64pJuyf+5W+XpvH/zCqjsIZ4muw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716510161; 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=lbXxwucuYKAmRmdJCRFNwrJ1t/rMYkn+ZPxG+11T8n4=; b=WVpkABGIgczLnxXvRItl0BKGD5pJ4SK12VYURQSH4NCM/zYzLyls0titNX2kVfCQdqafrm 1NUI4XPPjRLZxqk6s9//1Y7GU5dFxspEAzF8Wz0jpv9q7mwfSIYU5Sm5gUhSjWoCTLmWhK ezkoSpQgOr/JMaUgNbb83CXuNaIk3OcjNNVgDVLm62LK1P6JR3Mz1jprD5vp0dpf7ZAAX+ mGWFBt2gUyh5wUTLYbv6JCien3zX0+NCDd3U+Lmo+Ujds8xnSDK6cGe4seGzMIypBNhO7K AZDFcdWZprU4BCj0MHwQGmgQoMnwWLH6WWVbRxl1nzBuQSErrbZmUWFQEpAoag== 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 4Vlm2n4HNSzRkm; Fri, 24 May 2024 00:22:41 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D59F13C019B; Fri, 24 May 2024 00:22:40 +0000 (UTC) Date: Fri, 24 May 2024 00:22:40 +0000 From: Brooks Davis <brooks@freebsd.org> To: Lexi Winter <lexi@le-fay.org> Cc: Mariusz Zaborski <oshogbo@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 408957613bc0 - main - Regen Message-ID: <Zk_d0AkjfcwjDmoV@spindle.one-eyed-alien.net> References: <202405212004.44LK4cBG042804@gitrepo.freebsd.org> <Zk2lBymRapenk_V8@ilythia.eden.le-fay.org> <Zk4lyti6kSjAux1t@spindle.one-eyed-alien.net> <Zk_a3GLevuNFS680@ilythia.eden.le-fay.org> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <Zk_a3GLevuNFS680@ilythia.eden.le-fay.org> On Fri, May 24, 2024 at 01:10:04AM +0100, Lexi Winter wrote: > Brooks Davis: > > This is more or less standard practice for generated files. These > > commits are of basically no interest. > > to be clear, i'm certainly not expecting a detailed commit message for > things like this. my only concern is that when viewing the commit log > for all of src/, or for src/sys/ or whatever, they look like this: > > 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf LinuxKPI: add kvmemdup() > 69b6c4a6ec6654978628ccd48edce46f00ac3e96 LinuxKPI: 802.11: fix for_each_sta_active_link() > 408957613bc065c4444812c3ae276ace03697ebd Regen > 6b7e4254a29e3228a7273622556b60416e300509 capsicum: allow rfork(2) in capability mode > c80c104cbd52db994c0f2757bd1c6d014744022c glabel.8: Describe cases related to permissions / existing mounts > > the other commits make it clear what they touch (LinuxKPI, capsicum, > ...) so i can ignore those if that's not what i'm looking for, but > 'Regen' is not very informative there. if it just included the filename > it would immediately be much more helpful. It should probably contains "sysent: ". It's pretty rare that one file is touched (usually that's an error). -- Brooks From nobody Fri May 24 02:03:33 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VlpHB17rzz5LMKt; Fri, 24 May 2024 02:03: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VlpHB0dhfz4hMt; Fri, 24 May 2024 02:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716516214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FebYLscS2ULzbrtGIqrjS/AQmk5fBNkgECfVLuGx+qA=; b=STgAxl6APoBsdASD669B/727A1t1hqengQMKM0n7fVwt3wlYriHFKUxhIK7vdqJw3wE4Bo 7uctflSDAnlN3OYB+h/im6uhse9s6bPcaH/4CUjm1j/Jozix0HP81tJ0KL/PYR+Q6r4LDo wCcOUWXTVuHhStOML7a+1xG7gMcok566DCQpCowqWHRoe043rCs9D1A9NcVRAQIbuTVFkK KQCU+9Tnooazhau9jRNoDlpj9s1iFFHgwXm9Gy1eQlt8njYzZ0JYvj2g6wVoYna173EEJ9 KCJ6rTO0/RMB//XMRejyC+fzzV78GLwrluAlNqOwsxLmhSMTbbe5HFXxSGwzXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716516214; a=rsa-sha256; cv=none; b=vMJ+XbP7a8n2L3UbfQnyyn5k0sCvt+s6S2Bv233GioCAGtPoxGMoudWS1T7vHEZ3GpR55N MUjAyo3E3gt6MKEAvapLTAy2/DpsARYoW34gWQueHUZkUFBZQGWGHCzlA1Z3gpWHzS+rH9 f78/aME8AbA8JS8XwhLUDre4B3tP6iW/SpsctiOKl2HfqKbtP/UpuNt++EWcHKr8q68Jnx pBsPpTYZgma1BFUUdcscR0Z2ciLuaymlSj+xki1qkidFSntePbSJv7lGYXOtNP2qRvw8qK jUDxQUBunX/3DMeEvHupGl5hC+ZTs0oP0vsexeZyHqPiJGa38nX3jFNKNM+E5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716516214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FebYLscS2ULzbrtGIqrjS/AQmk5fBNkgECfVLuGx+qA=; b=fi3dd70yjnPUyVJnEs52/N39dMccv3jRLnsFlQuDmhTQWw8S3eD3fzWjsD125oI4vt9Vbl ykaNOjF/2z+MENV/XktrTnQrZdC2mJ/KzmgBtj0MEV4y6KOhEBJ0OzGvgcH5Swsv2p1apR EryUa54hYvTqoYsSJfPWbfUMTuXN2/huRJ3irPcGUiL3+cxPFNUlC/aWuUEvlfKsgghzeX HTkwEP4504AG1njQwuCBofIAMIO5TwyCpW3mSRMEWAd9ocdCxcaI1RmOjoOWrbK40U6bFA WSVinX1JdhBpLijjGWUx7NFjWAa89NuKuI/CVuLaUl39a5N8QborMhCyP92XxA== 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 4VlpHB0FLDzDht; Fri, 24 May 2024 02:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44O23XjE028945; Fri, 24 May 2024 02:03:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44O23X3M028942; Fri, 24 May 2024 02:03:33 GMT (envelope-from git) Date: Fri, 24 May 2024 02:03:33 GMT Message-Id: <202405240203.44O23X3M028942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 59aa64914aeb - main - cross: Move Solaris API64 defines to common List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 59aa64914aeb1b2cccc0d4fc39ead2ee159a1e5b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=59aa64914aeb1b2cccc0d4fc39ead2ee159a1e5b commit 59aa64914aeb1b2cccc0d4fc39ead2ee159a1e5b Author: Val Packett <val@packett.cool> AuthorDate: 2024-05-23 21:49:53 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 02:03:18 +0000 cross: Move Solaris API64 defines to common off64_t is needed for both Linux (musl) and MacOS, so move them to the common area. Somehow glibc provides the definition, but defining it doesn't hurt and hels in the musl case. Reviewed by: allanjude, jrtc27 Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 --- tools/build/cross-build/include/common/sys/_types.h | 3 +++ tools/build/cross-build/include/mac/sys/_types.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/build/cross-build/include/common/sys/_types.h b/tools/build/cross-build/include/common/sys/_types.h index 650edc8080d0..408f0537d1e6 100644 --- a/tools/build/cross-build/include/common/sys/_types.h +++ b/tools/build/cross-build/include/common/sys/_types.h @@ -45,3 +45,6 @@ * Neither GLibc nor macOS define __va_list but many FreeBSD headers require it. */ typedef __builtin_va_list __va_list; + +/* Needed for opensolaris compat. */ +typedef __int64_t off64_t; diff --git a/tools/build/cross-build/include/mac/sys/_types.h b/tools/build/cross-build/include/mac/sys/_types.h index 5ca37580b85a..8d39fc39f087 100644 --- a/tools/build/cross-build/include/mac/sys/_types.h +++ b/tools/build/cross-build/include/mac/sys/_types.h @@ -41,5 +41,3 @@ * __darwin_ct_rune_t exists. */ typedef __darwin_ct_rune_t __ct_rune_t; -/* Needed for opensolaris compat. */ -typedef __int64_t off64_t; From nobody Fri May 24 13:47:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm5vJ1RHrz5L3wX; Fri, 24 May 2024 13:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm5vH69N1z4gTW; Fri, 24 May 2024 13:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EKdmmZQ/10Bis0TCJzpWDNC/tCyrql12F5S4LnUF71Y=; b=jLU9EklS3wye1vH02X8yLfVkf2RPmRXZYdwtadntg2XPI9J18wYsDMIYo8yVMoCb5o7Xni 5nUpbFJT7uQO/M6NuwJZaJvjgg9QxYsusngYSYJgI1hsdkd1YcjKklcygnUyQCWCieOAIF HY/2RVum1JjeOGo4YxkyniC5HvziGXpnNsq4QtzRUQunezCYg8ssyYEmB5idXnmeB33TDW wlTvSniVEWmwDgfj7yCPu/DEz0VJzZhiPORMu37g5IkdwJNOG2Xn9p1s2bY5XHDLu9edaI XSAd2bgChgHXOKVZNDJlYzf4cOwcizw2284nbJzblniEcLKQEuOcOPfR90nwyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716558443; a=rsa-sha256; cv=none; b=tc9+fjWnM9nnldflYJZCkulyIKxOMvafUqZoGOS2RFWvXmHgIwh42TpqewDTq+a0iLDfC+ Gwe0/A4HMxYT2xdDsc/SEpVM8veB8f33+LSPeNAMaDCPlVrK0hXwbedcgxVu8+Ys1zJ+5N swClRhSCzipAhtrYU4ht7C+PRIh2fXwNZf1qpRuDPUeFWr0kzkl1oQDiT8pnqst7WCkDy0 xjHsmZj5g1u8CzfdjiQeoXzVVUAX6/7F8SrtJ52MoBIbrv04lv3qVMSOIGFON3GNdfB+Rh t1FGB5q2MIKJByty9ldKQyin7lnX/gQADoi8FdN5+AZDi0ibMV6FPKypYr624A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EKdmmZQ/10Bis0TCJzpWDNC/tCyrql12F5S4LnUF71Y=; b=C0noug3oqOY4eK/f5bBeRSU+IdRRxx+jlZaMZAbmPP/3mO9HO8JejkJuvCr2RHYOKGFgpC hLQBP2CVzuNpkloSvYCb9Xi399h4NPmLbudf/k1Rcqw7c5FPlEgY7uXXeosQHP1oG+54FM a+LTq+9YUVZni88F1HTEKCv1cTGCWJc2vF/RFzZxeMmCiogQ4uNrTX/VoKWuHgY/yu3iRg uSpVAybATNooOqAPlpE6gg0gGZlhWjO9Bn2TPnmLrumXSLm+KtkkMKurpKMosP5pOIo0a6 3SLPy4oSjlDNF7zdpAlrs2lno5LOeijerPGHsBJyaz/DZvCw9iZK7IjKsWV9vA== 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 4Vm5vH5gbQzbsZ; Fri, 24 May 2024 13:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ODlN53011743; Fri, 24 May 2024 13:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ODlNmU011740; Fri, 24 May 2024 13:47:23 GMT (envelope-from git) Date: Fri, 24 May 2024 13:47:23 GMT Message-Id: <202405241347.44ODlNmU011740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: c957e35ccbe9 - stable/14 - autofs manuals: align lists, tag SPDX List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c957e35ccbe9cd8d1deb5903df21347bc4649da8 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c957e35ccbe9cd8d1deb5903df21347bc4649da8 commit c957e35ccbe9cd8d1deb5903df21347bc4649da8 Author: Alexander Ziaee <concussious@runbox.com> AuthorDate: 2024-05-24 13:46:40 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 13:46:55 +0000 autofs manuals: align lists, tag SPDX MFC after: 3 days Fixes: 286c4906d60f (add -noauto), 3914ddf8a7b1 (import autofs) Pull Request: https://github.com/freebsd/freebsd-src/pull/1243 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1243 (cherry picked from commit 7839534a5a7b0d97131512888d6baa8ba5c20e56) --- usr.sbin/autofs/auto_master.5 | 5 ++++- usr.sbin/autofs/automount.8 | 5 ++++- usr.sbin/autofs/automountd.8 | 5 ++++- usr.sbin/autofs/autounmountd.8 | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/usr.sbin/autofs/auto_master.5 b/usr.sbin/autofs/auto_master.5 index 0d4753b18f95..2b79f7dd8647 100644 --- a/usr.sbin/autofs/auto_master.5 +++ b/usr.sbin/autofs/auto_master.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -246,7 +249,7 @@ Special maps have names beginning with .Li - . Supported special maps are: .Pp -.Bl -tag -width "-hosts" -compact +.Bl -tag -width "-noauto" -compact .It Li -hosts Query the remote NFS server and map exported shares. This map is traditionally mounted on diff --git a/usr.sbin/autofs/automount.8 b/usr.sbin/autofs/automount.8 index 3dc423c3054f..f205665fe3e6 100644 --- a/usr.sbin/autofs/automount.8 +++ b/usr.sbin/autofs/automount.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -49,7 +52,7 @@ or unmounts .Xr autofs 5 filesystems to match. These options are available: -.Bl -tag -width ".Fl v" +.Bl -tag -width "-D" .It Fl D Define a variable. It is only useful with diff --git a/usr.sbin/autofs/automountd.8 b/usr.sbin/autofs/automountd.8 index 4b2cf7d56336..032a106f433b 100644 --- a/usr.sbin/autofs/automountd.8 +++ b/usr.sbin/autofs/automountd.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -54,7 +57,7 @@ forks a child process. The child process parses the appropriate map and mounts filesystems accordingly. Then it signals the kernel to release blocked processes that were waiting for the mount. -.Bl -tag -width ".Fl v" +.Bl -tag -width "-m maxproc" .It Fl D Define a variable. .It Fl i diff --git a/usr.sbin/autofs/autounmountd.8 b/usr.sbin/autofs/autounmountd.8 index 69b4565703e6..582e0d36b214 100644 --- a/usr.sbin/autofs/autounmountd.8 +++ b/usr.sbin/autofs/autounmountd.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 The FreeBSD Foundation .\" .\" This software was developed by Edward Tomasz Napierala under sponsorship @@ -52,7 +55,7 @@ After a specified time passes, attempts to unmount a filesystem, retrying after some time if necessary. .Pp These options are available: -.Bl -tag -width ".Fl v" +.Bl -tag -width "-d" .It Fl d Debug mode: increase verbosity and do not daemonize. .It Fl r From nobody Fri May 24 13:55:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm64r3T28z5L4CH; Fri, 24 May 2024 13:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm64r2hdLz4hLR; Fri, 24 May 2024 13:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mw1VrOa4vZ8sNIJx6GA8HMotbzeh9MRVDdBRSzhFOSM=; b=LXmYqhsQwfQxX/9hFz5/iPpdmmDyhpodcHcpL+uktiFabP/sygb7zCXQRK4kE3R5XOakPX M3VG1MO/KbuGJHc7FHm41/ApRrLPbXl6ssIxT4HEzdbR/gq8d5Q870GtUlQx7f+tXhbVrG 1xPUk2TStDQJ7kjxqwkGMpLaktC+j7N0YgTuX03FHhzEGwtH4lLQLHwJbwOCx4xUSB797N j8w61/9LKDwD2DcSy50rIrPmKbHADHtHMrIxrApNYKWwvL3vfNg/I4V+PmlZ2vRIY9eaHk 7eFzlUjaZ0ljzIvNZ2UXcEDiBb0dwlMtWI+r3DrT37uMnYSAmE2KSIqpm/gy0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716558940; a=rsa-sha256; cv=none; b=MhsclatTIsoOqOLOYBgsv0noUWImOpK3VKdDzou+xz0HYnRwHBwaRy9S1DU9Dw3idqF/+m cPAnnllQmPHRvQBMGI3SY/tNw7fQzXs29vHWYlX+XhAx90Vu8fPnf5OqPYBRwVMgRBtyIk UmhEnQxrU74mK4hbOO1EVtbNHBzKwfYlPbBdrc/3pyuaQO+DGqlToIgoQqfQWh0ReDYJjD am9J9L0pOYB10wqD/SgAnUuB48YMf6xJ37Pi57mtk5Ma/gJ9fK9u1gDM2OMSwclJwK37CI yEiPM1nPtZby/mltgM2UXP6WNEFFQO9PebS0Q0PwnWsN1hoF8j2R2ukrZZhNHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mw1VrOa4vZ8sNIJx6GA8HMotbzeh9MRVDdBRSzhFOSM=; b=pjH9lgKP3sJjgelLFoqYbFxxCTZAh8OzvdaakXbmRJ0fjEnK3rs3rVwWXWMGsrIl2p+cmd bKhJBA/snVvDrb2YlSZniLClx0H2+a3DLPVWA1pKudMNlam2UBsz2o26t5rbgAk6AlmYrA v+PH08424GpHG3iRE008zL2EVugYSb7djnBf6BHGa4h7su1He5NzCy2meW6cDOZpkBHPsH MV+CsmaNDuxAr1Xo3Z8tFwBiasr+bIu9kbEwaqp1BeXaR5nmvaj9MRiHdlJAx43jge+aKF Fv0X17rWjr1cKRpVy/KIbN1EzGLLyBQ+YazTw2T0fc5fjTjP0P/Tk4sx804ltA== 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 4Vm64r29sPzbtG; Fri, 24 May 2024 13:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ODteGg028763; Fri, 24 May 2024 13:55:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ODteOY028760; Fri, 24 May 2024 13:55:40 GMT (envelope-from git) Date: Fri, 24 May 2024 13:55:40 GMT Message-Id: <202405241355.44ODteOY028760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne <mhorne@FreeBSD.org> Subject: git: b5e17840de65 - main - arm64, riscv: removed unused struct pv_addr List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5e17840de65ff196b2398211b68ce96d6919f2c Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e17840de65ff196b2398211b68ce96d6919f2c commit b5e17840de65ff196b2398211b68ce96d6919f2c Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-05-24 13:53:14 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-05-24 13:55:24 +0000 arm64, riscv: removed unused struct pv_addr No functional change. Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45322 --- sys/arm64/include/pmap.h | 10 ---------- sys/riscv/include/pmap.h | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index d69924080610..d604f705e596 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -71,16 +71,6 @@ struct md_page { vm_memattr_t pv_memattr; }; -/* - * This structure is used to hold a virtual<->physical address - * association and is used mostly by bootstrap code - */ -struct pv_addr { - SLIST_ENTRY(pv_addr) pv_list; - vm_offset_t pv_va; - vm_paddr_t pv_pa; -}; - enum pmap_stage { PM_INVALID, PM_STAGE1, diff --git a/sys/riscv/include/pmap.h b/sys/riscv/include/pmap.h index d65935c4ce7f..e10cbacb6e1f 100644 --- a/sys/riscv/include/pmap.h +++ b/sys/riscv/include/pmap.h @@ -67,16 +67,6 @@ struct md_page { vm_memattr_t pv_memattr; }; -/* - * This structure is used to hold a virtual<->physical address - * association and is used mostly by bootstrap code - */ -struct pv_addr { - SLIST_ENTRY(pv_addr) pv_list; - vm_offset_t pv_va; - vm_paddr_t pv_pa; -}; - struct pmap { struct mtx pm_mtx; struct pmap_statistics pm_stats; /* pmap statictics */ From nobody Fri May 24 13:55:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm64s3xPJz5L4CJ; Fri, 24 May 2024 13:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm64s3Jh7z4h2C; Fri, 24 May 2024 13:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXXxcdgu8rO6g4XLQIiU6C0UY45y3Nn0YcIhrH3oK78=; b=iEchAyo8EA1b/i+lh/b3DzZKxdAtesPowH314IofAQSlNe8THyON7ufQaxe/e9xB9Toonx 7seJKR9piHSPZGEcgbNpFOROfvGlhSYBqH0VHB9ROc5k4HOnp+drcKDv/J4o2c5b/iW5/+ +JzxMSvwU8uNL5L4xjQXSs3CPyg7BMkjJHF1/BubSDiUKAZcfoxs1Oumis0SJ27inN26/j IogscCZjE9dTjEUl2opo+C3nl8TCHFuKiFG0tXTXDKJBgAqWbg56I6BEL9BFFN/7v++zFA YDAK9rkoi9nLPwEyESihCz7zXz0/dwCoEpHai3LV1j1OvhMheaz9WwRcw+ZZxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716558941; a=rsa-sha256; cv=none; b=e9vfz0WYRpjhBo6XCempI4UEuFHYCMkUTMJQI4JVP6Q9aglLIw76aH+dczhHRaOj7wQgqV RNJE7U+baqY23Go5aOyE2dJdkwGRWW9n9IaY+cRqxspHGr8fqr3RM/e+8Gzz1TvpluS2ei 88LzHdgGhx/bGqYqhPK9WFODNU+SPAlUD2Bp9vitDem0WunzEFY5d1aIwp7xNSHU+ojPQg K1R73L+FB2BEz+8LUNplSbgp6+YI7WFFq/g95pPZztjGruCaONWCMkHQFjnDQilMIb4YQe TBDstG31o+kD1KY0AZFOvEWo9s6KH2MDQcReHmxqS3Y0LoGlfR8zv24LedE3IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716558941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CXXxcdgu8rO6g4XLQIiU6C0UY45y3Nn0YcIhrH3oK78=; b=ex4MSawt7cZVhdICKIWX4nH1DHH9JI0UjUfQBGVbJ+OhOUnD5dEkkVu78z3mA6puW+DaLA kZ0XVpBSeGKUDW+mAYwwM4LMYGVqpXw6rkbS0RG5GHWFNiP/JWZmt+KFJHSisXOEJ4zPj5 csbZZ8gxx9EeRnXMoKgkFvWcK1IGYbCJH52mIvSJzX3P5DX7rZ9v2Xgs4bIcHD2RkZAnv8 RfeR7PyhEQCRbU3AcwkePajaG10gBIaHyMkA47xvsReY0bQQw7F0jx/+JHNeZcMX0I6He7 SrH81+MTCBiGq/ZAfSTv10O1e7NcErNRKRcA33u/9yCA2YyqLxzusswvZu4JvQ== 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 4Vm64s2tJJzbwj; Fri, 24 May 2024 13:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ODtfBx028807; Fri, 24 May 2024 13:55:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ODtfQJ028804; Fri, 24 May 2024 13:55:41 GMT (envelope-from git) Date: Fri, 24 May 2024 13:55:41 GMT Message-Id: <202405241355.44ODtfQJ028804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne <mhorne@FreeBSD.org> Subject: git: 1d3c23676de3 - main - arm64, riscv: remove unused declaration List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d3c23676de33762fd7fc2e3d890fd14738d3ee6 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1d3c23676de33762fd7fc2e3d890fd14738d3ee6 commit 1d3c23676de33762fd7fc2e3d890fd14738d3ee6 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2024-05-24 13:53:43 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2024-05-24 13:55:24 +0000 arm64, riscv: remove unused declaration It is inherited from arm, where the global exists and is used. No functional change. Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45323 --- sys/arm64/include/vmparam.h | 1 - sys/riscv/include/vmparam.h | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 83c55913f56e..ffa5a538504a 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -301,7 +301,6 @@ extern vm_paddr_t dmap_phys_base; extern vm_paddr_t dmap_phys_max; extern vm_offset_t dmap_max_addr; -extern vm_offset_t vm_max_kernel_address; #endif diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index 18fd6a28308b..d2014654b691 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -240,7 +240,6 @@ extern vm_paddr_t dmap_phys_base; extern vm_paddr_t dmap_phys_max; extern vm_offset_t dmap_max_addr; -extern vm_offset_t vm_max_kernel_address; extern vm_offset_t init_pt_va; #endif From nobody Fri May 24 15:40:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q120c7z5LGty; Fri, 24 May 2024 15:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Q10YbTz4vhN; Fri, 24 May 2024 15:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayPTQTo/gMW3p6aN6X1ZxmfGZq3ra0/H0K0E7rAqgqA=; b=Je1FMxWl+sES0Eqbq6xd2JQjvsWPTOSNdjDF4myrQ19d+Hld4qi8XloR4epECwfUvRBlx/ aIDTFh5bLkkaD/xPuiCoRl2VfPNuTUGi9drq1+SXj3zuqdysHj7EjCXF4DY6cEuzGWZ/IN vkXoGd2jYSdgujMOWPsNND/C9Yc6UT7X2w1Ko4jgfuSMXfYvjOdntrgp+NhyzPd7VfPL8s S17gfSFHjfA9hOWN12NgTCKe2B9AftClOT0Sig0rFfcVIXX7bDuebMUd7dHtR4s8+iCJZP 6HDJw59iryap/KpDX4+q4WDYke35yfV3FB6RGYECXKyEgLy8/M1n1DQsDeTBMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565241; a=rsa-sha256; cv=none; b=uD7G+2CcthwTjhxQkUoCdqrI3uF8JA8ST8feo/dPFgq2hOin+foMPTcPtza2RE09R56fFC PN3rRozmyygB97uyOasl74M+9JAPdDPQH7RIzPkEv9gUm2xNTEu2r9NlxnnSmeziTOTl49 8Gs3tK+PIb0Jra0WhBmyLYW3RWmax11w7sRcZVwDY+mAqtLAMeJiVaCIjxPh6mSrnccMOV cUt4hN4kvMlbjwVFDnHwh0/W2rSd+H2dAOhl763FHbRnCsJRCh9qFv9sRcR/lCHgPlD14I V7Z4He0HAzfZcI/nxqRtIMmtPwUZRXGBZM9NoauBDiGFEBbEH8Y2Z4ix2qG6PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ayPTQTo/gMW3p6aN6X1ZxmfGZq3ra0/H0K0E7rAqgqA=; b=dXsM10ZR9Z2MakW2Nr4MEDo5cRxIcrtBH99wlG8VGQbtheWiM8HX4sF17J94lCLX+R6E99 VvUEQnOWt5aGAT5rz8zaiGmcpW1BE9RNJkMPJM58QFC3jonlHCjr+j2W5A+5VBRgFMp2kg gPF4UVAwGQ576MVmPeiotdK/Q3bdvJXfNchYWJ+7vyTU/eQB5MTw1wF5B84HuyVTLUXP8a qepL7giVnnirWY1UMOmnPEJ2i19Ha4DHp4b27bjaOTg2C4TRHzQdnRHEdAR3GutSV8xGsa OsHYCkU+Sm0hxXJMyJq6dRkJBuTCxHkPS717B/8Es/bonNsPTQHz8Wp9I2nW5w== 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 4Vm8Q109jHzfXD; Fri, 24 May 2024 15:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OFeeIQ012157; Fri, 24 May 2024 15:40:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFeeU0012154; Fri, 24 May 2024 15:40:40 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:40 GMT Message-Id: <202405241540.44OFeeU0012154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 32f40fc9837d - main - geom: Add counts for enomem and pausing List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 32f40fc9837daee8e3cb59ae17a28fba4d1c76cf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=32f40fc9837daee8e3cb59ae17a28fba4d1c76cf commit 32f40fc9837daee8e3cb59ae17a28fba4d1c76cf Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:31:15 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:31:15 +0000 geom: Add counts for enomem and pausing Add counts for the number of requests that complete with the ENOMEM as kern.geom.nomem_count and the number of times we pause the g_down thread to let the system recover as kern.geom.pause_count. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45309 --- sys/geom/geom_io.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index ddd469d909a0..25b3908e5fb5 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -75,6 +75,9 @@ static int g_io_transient_map_bio(struct bio *bp); static struct g_bioq g_bio_run_down; static struct g_bioq g_bio_run_up; +static u_long nomem_count; +static u_long pause_count; + /* * Pace is a hint that we've had some trouble recently allocating * bios, so we should back off trying to send I/O down the stack @@ -701,6 +704,7 @@ g_io_deliver(struct bio *bp, int error) if (bootverbose) printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name); + atomic_add_long(&nomem_count, 1); /* Rare event, but no locks held */ bp->bio_children = 0; bp->bio_inbed = 0; bp->bio_driver1 = NULL; @@ -734,6 +738,12 @@ int inflight_transient_maps; SYSCTL_INT(_kern_geom, OID_AUTO, inflight_transient_maps, CTLFLAG_RD, &inflight_transient_maps, 0, "Current count of the active transient maps"); +SYSCTL_ULONG(_kern_geom, OID_AUTO, nomem_count, CTLFLAG_RD, + &nomem_count, 0, + "Total count of requests completed with status of ENOMEM"); +SYSCTL_ULONG(_kern_geom, OID_AUTO, pause_count, CTLFLAG_RD, + &pause_count, 0, + "Total count of requests stalled due to low memory in g_down"); static int g_io_transient_map_bio(struct bio *bp) @@ -822,6 +832,7 @@ g_io_schedule_down(struct thread *tp __unused) * for that I/O. */ CTR0(KTR_GEOM, "g_down pacing self"); + pause_count++; /* g_down has only one thread */ pause("g_down", min(hz/1000, 1)); pace = 0; } From nobody Fri May 24 15:40:42 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q21fmgz5LHB3; Fri, 24 May 2024 15:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Q217xLz4vvd; Fri, 24 May 2024 15:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5GephaTSaysz20CG7aL0oE19QCWCXm+wq+mStM/r3U=; b=xIwM5NUg3aB5iXRZTqLl+CPzF40svxkuouWBebHWJN34z/8j2/iv8Vw+NhDex3HMmtIun5 vwBiDIMXeS5FeQGh8SJYdAnIyvfqyF0XdIBCKnCNDjCPNz683h6kb/OWlsDNFJrlUH/K0v u2QwRQVT4HRnXHOlv6Bm/7rhT+Qf37Xn3GEjFpnritOMI+vUfuDN11ZDPpQ0PXz5mOqar9 X0TdAMeiKhwUVDLYxuu//S99G2Q5bTMHo8HjQGPD1n+FR14NdN983K9uviTkMvGwQ3nKec tyb/NURK57VJpRmtka/yY7Q0GKU6TuAsm3fhWMV1rtNq7jYVTEW2CkAZBWhDKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565242; a=rsa-sha256; cv=none; b=JhyOV4JLp6462rYaLz+766wjeOWRX17ePSUsIzYSuyffEv0plJkIb6fepoHNR5E2YD8DCU UyfWrGeuuin2aB21+LsLPzaic5GI7QU+GAg+eDD7oqc7ilqjrPV2CLpq0GUaArWbJeg+OZ z8umsqibR1vrhLPda7pCkYr80w4DeHYOlR6z2rlJQhl1EMQS4/rhaB9+LlNqYfVfnP9wDN +IkiBf+nk0g+qUlmq5RpuvwZuQpwPPeqI36vHSc9eCwCTi8hhW2KU0OYei4UVeC3Ouaghk CEGV4rVh9PFb48aY3gyBaw16q5s+o1/njGPs+576AqgeZvuI0mTYL3N3ts7Ehw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P5GephaTSaysz20CG7aL0oE19QCWCXm+wq+mStM/r3U=; b=jUHRT2G4bDjKGsaabid6g9Y7Fu1mNJgOmnH3sZ5lEStmAm+6+JqfwnQyLvI4xleCCowGrz 3tjLDCW7e3bDnBusXlQuCXcz93N666YjY6pJdQjOyWQO9ahWlt0cRnKIX60JOJeLzYLrNI ihvJHIQc2AGDky93PBarMrRjvmHIP7sgmJ8+RdYWXyJkCMSHvD0LH0oFwtL2XHBU1DToSM /nbRgNRMRhjopepAqkFtPhlHCba9RRa/PDB5moxMJBMqPIoSRwjBZuTtfO2U7rsuGjhSGa /46u8YqWdaLMqqioZyJyUFyhARlMJEzt3Tr+gZ5yo9GhJcjUyl8QqAuymOxcNA== 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 4Vm8Q20lzDzf6p; Fri, 24 May 2024 15:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OFegP7012223; Fri, 24 May 2024 15:40:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFeg8m012220; Fri, 24 May 2024 15:40:42 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:42 GMT Message-Id: <202405241540.44OFeg8m012220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 6d83b381860b - main - geom_io: Shift to pause_sbt to eliminate bogus min and update comment. List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6d83b381860bd8a1ea2043e26bdf2cf2ed640a38 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d83b381860bd8a1ea2043e26bdf2cf2ed640a38 commit 6d83b381860bd8a1ea2043e26bdf2cf2ed640a38 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:31:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:31:55 +0000 geom_io: Shift to pause_sbt to eliminate bogus min and update comment. Update to eliminate bogus min to ensure 0 was never passed to pause. Instead, requrest 1ms with an 'infinite' precision, which defaults to whatever the underlying time counter can do. This should ensure we run fairly quickly to start processing done events, while still giving a small pause for the system to catch its breath. This rate limiter still is less than ideal, and this commit doesn't change that. It should really have no functional change: it just uses a better interface to express the desired sleep. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45316 --- sys/geom/geom_io.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 25b3908e5fb5..02c8ed9f2bae 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -809,20 +809,17 @@ g_io_schedule_down(struct thread *tp __unused) biotrack(bp, __func__); if (pace != 0) { /* - * There has been at least one memory allocation - * failure since the last I/O completed. Pause 1ms to - * give the system a chance to free up memory. We only - * do this once because a large number of allocations - * can fail in the direct dispatch case and there's no - * relationship between the number of these failures and - * the length of the outage. If there's still an outage, - * we'll pause again and again until it's - * resolved. Older versions paused longer and once per - * allocation failure. This was OK for a single threaded - * g_down, but with direct dispatch would lead to max of - * 10 IOPs for minutes at a time when transient memory - * issues prevented allocation for a batch of requests - * from the upper layers. + * There has been at least one memory allocation failure + * since the last I/O completed. Pause 1ms to give the + * system a chance to free up memory. Pause time is not + * scaled to the number of I/O failures since they tend + * to cluster and the number is not predictive of how + * long a pause is needed. + * + * Older versions had a longer pause, which limited the + * IOPS to 10, which prolonged memory shortages that could + * be alleviated by I/O completing since it eliminated + * direct dispatch as well. * * XXX This pacing is really lame. It needs to be solved * by other methods. This is OK only because the worst @@ -833,7 +830,7 @@ g_io_schedule_down(struct thread *tp __unused) */ CTR0(KTR_GEOM, "g_down pacing self"); pause_count++; /* g_down has only one thread */ - pause("g_down", min(hz/1000, 1)); + pause_sbt("g_down", SBT_1MS, 0, 0); pace = 0; } CTR2(KTR_GEOM, "g_down processing bp %p provider %s", bp, From nobody Fri May 24 15:40:43 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q36gN0z5LH7S; Fri, 24 May 2024 15:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Q32K4Wz4vkX; Fri, 24 May 2024 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbfG8UrFbwaa2L3NLmcgDP1Rle+TQthwRv+7m8MZFwg=; b=uSQH+UoWGA/Q6S/sTG5Zw8zGmjKEIGwcs3ouvI5X3NDif+SV/LYCIzNCoMiqhCAlGoaob4 A1M+Ofdpr1CI8GpmGr4H0RLmrtODmZhQS4GQlQrB1VbzXYsYZmZnz46jlpF1t8ZKwoPhDc CloKjt4VWQ0+Z51oFVsvHqZZ2d9qFeWP82qH54ewWkXRpTDzHBsY3cN2klnzNQ51VNhTph QROXyIU1EEjPwVhPpH/iC8/6Uw7Mdm/jlPChnEkE2AduHBig+Y04xdQJLsKFoy5Hh18B+3 pY3TaArGqUJGvSYmw1sKbfCPEJEMY30VuMcDhm/pBpG8c1hOyrcOsn+NUu8Tuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565243; a=rsa-sha256; cv=none; b=trpWg0Pm9UHAPTBoHyTge8scM9wNX9uuax8Mz6MMOFdQzppmAjob85SXmz96p4mzhasvCQ aHUq9a7/MU5XL9ZWPicOVq/gv2pzN6zTakej7e78Z8+3xosu9bOk7XInbbB0WpA+DNNRAM nEFeJjpFF07Etp/EnUWOXyf7PMjq78mDAN01Wi9SzBAYFvto8c5oLoL3yetph3YadBEISZ QNvfSlI0sUksNJ4j2zwKH7L1+bg8CCmxeFT7iGBTy0KxN8kkzb72Tf6UcU/cxEhwlmk7Gp Q3qDQ0p/D5o2iHDFIYxqvJ6rTXYT/1cjayqg81yNnlLRl2fvluhqirK2ZUlb3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbfG8UrFbwaa2L3NLmcgDP1Rle+TQthwRv+7m8MZFwg=; b=yICYV5yPZlLoIH8npmNn3d4LBECkDZOyMf8Va3GRw7A8PvwBGQIeaxaE0pt8c+uIRxLp+1 sYLFTlOWp7IVDffxcfEX51bzUz0sHSiCex5+4i/lUB4UIP2C9luB0+zFm78MrjApaBRn5k HNiXJTvbpIIjHN6jcpegNxKMBptkQYv4M5+oEozgh60VVJOgVKE0K/Jg9vAveUbK/jcm5n QwKrprRNN3+EfKvQnT4o2+wBN/cZsU9q+FGP+kEvRASQejSQYaeiiDfeeim+7zfbzltDQy b2zE+6Gw83A90I9zADfaWN+fZVoVz6FLVFGWnyi39VVgpoJwFUV33kBqKtG2Sw== 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 4Vm8Q31tnmzf8l; Fri, 24 May 2024 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OFehCT012280; Fri, 24 May 2024 15:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFeh1d012277; Fri, 24 May 2024 15:40:43 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:43 GMT Message-Id: <202405241540.44OFeh1d012277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 99c14fb99ffc - main - cam: Drop periph lock when completing I/O with ENOMEM status List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 99c14fb99ffc8fd601ad15bbe54a54fac8f4f203 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=99c14fb99ffc8fd601ad15bbe54a54fac8f4f203 commit 99c14fb99ffc8fd601ad15bbe54a54fac8f4f203 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:32:04 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:32:04 +0000 cam: Drop periph lock when completing I/O with ENOMEM status When biofinish calls g_io_deliver with an error of ENOMEM, that kicks off the slowdown protocol, forcing I/O to go through g_down rather than be directly dispatch. One of the side effects is that the I/O is resubmitted, so the start routines get called recursively, leading to a recursive lock panic. Rather than make the periph lock recursive, drop and reacquire the lock around such calls to biofinish. For nda, this happens only when we can't allocate space to construct a TRIM. For ada and da, this is only for certain ZONE operations. Sponsored by: Netflix Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D45310 --- sys/cam/ata/ata_da.c | 9 +++++++++ sys/cam/nvme/nvme_da.c | 10 ++++++++++ sys/cam/scsi/scsi_da.c | 11 ++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index d4a591943307..6e008cfc8d22 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -2518,7 +2518,16 @@ adastart(struct cam_periph *periph, union ccb *start_ccb) error = ada_zone_cmd(periph, start_ccb, bp, &queue_ccb); if ((error != 0) || (queue_ccb == 0)) { + /* + * g_io_deliver will recurisvely call start + * routine for ENOMEM, so drop the periph + * lock to allow that recursion. + */ + if (error == ENOMEM) + cam_periph_unlock(periph); biofinish(bp, NULL, error); + if (error == ENOMEM) + cam_periph_lock(periph); xpt_release_ccb(start_ccb); return; } diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index 3f6cf8702870..41c552e2780a 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -1077,7 +1077,17 @@ ndastart(struct cam_periph *periph, union ccb *start_ccb) trim = malloc(sizeof(*trim), M_NVMEDA, M_ZERO | M_NOWAIT); if (trim == NULL) { + /* + * We have to drop the periph lock when + * returning ENOMEM. g_io_deliver treats these + * request differently and will recursively call + * the start routine which causes us to get into + * ndastrategy with the periph lock held, + * leading to a panic when its acquired again. + */ + cam_periph_unlock(periph); biofinish(bp, NULL, ENOMEM); + cam_periph_lock(periph); xpt_release_ccb(start_ccb); ndaschedule(periph); return; diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 0daaff9229b0..59745231bca5 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -3455,10 +3455,19 @@ more: queue_ccb = 0; - error = da_zone_cmd(periph, start_ccb, bp,&queue_ccb); + error = da_zone_cmd(periph, start_ccb, bp, &queue_ccb); if ((error != 0) || (queue_ccb == 0)) { + /* + * g_io_deliver will recurisvely call start + * routine for ENOMEM, so drop the periph + * lock to allow that recursion. + */ + if (error == ENOMEM) + cam_periph_unlock(periph); biofinish(bp, NULL, error); + if (error == ENOMEM) + cam_periph_lock(periph); xpt_release_ccb(start_ccb); return; } From nobody Fri May 24 15:40:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Q45ssCz5LH4j; Fri, 24 May 2024 15:40: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Q4358hz3whh; Fri, 24 May 2024 15:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCbKW/8cknsYxDNB+HW+mQBNPzZM4rRyn/FPMbRjU00=; b=WOiRPCgRireVM6aubO1/MbJ45oV8ibeddJEKGouxfDvDngJpBeOZxll5XJoqmfZixa+f8v UHbKHaNbAIKIlEcfDu5bEamxqEXxy7p2oYrIl2c2msASb6yfl3gVltkKHFlphfRjJyJPtw FeJrZSG7vdj23ql7UpWVQZifLBngo2oh/Ylq6CogJidJciIvbqUjh20fs32sMv2gMI+Uey 2REYProDQdu5+pC6I6M3ps5WC/MLpTsrXZ63v62M2qJBiUCPRPapkvxEahpu+i1/q8SyoB MVx8EFcIkacpx/ybiCwFyocbQR4IfV+dGKwGPMoRxvC1yBgE1UvCvfhPQtDlmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565244; a=rsa-sha256; cv=none; b=fiVYpoWGhaScrJFR/3nXWu4fcjGYVMpxwj1raB1nTHtZhGBjuH3tlrCpH1D1mwh5H9HoxT tYquPuZwEgbSclDdWHqD/tdu+q9f+ycK6MU/aD5i5WdDdUHLYJdU2JmDBvKnRCYf8OO4aK kDaNb5f4gtakG4wUl7tohfMI0l6OAiEdFKdKobCTgFHy1r2RLOUiHdKIXwHBSZb6iexxh7 pDMJ+jqO/1E3Fw4lzKF0CSRspNh1eHdLtrPYLh9/PpIPbdTjMwAT1GSL0EnKPvd7DK/r3O drqJIqcgmqLgYTFroI11nJxfSkTIcDR1cHOb94UeESk6zz2SfSX6YGgxkx9gsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gCbKW/8cknsYxDNB+HW+mQBNPzZM4rRyn/FPMbRjU00=; b=TjzGnawZuBncU0MjamgW8A/q88cAX4Irvv3A6Kb49w830Qy1F8zu3MnCYxIpkxlVHRSS7z m1ywZUaJt6mZSGjBssymXJTY2MLsFn6zNs5F//pmADtB0eXo49aM42tFO6+r1Z0OycTkGM x+iQyOEqOZhNXOyGcxipktSJG24C1QTDYa5ykLuA9m6RkJ5UqjSb9oofsr1r86ra4Qz0fU tRrGI/hErTHvNs8eWJFvOos+BBlFzkL9uOqCtEgqJFRmPmWxQIK4Vow020WFv8ClMvTw/d 77xz1N20W291u6F0SPIysUdkTwnTOQhwa8Z2CfWdIe4N8QW+zBa9YBCyq0OAEg== 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 4Vm8Q42f0Yzf8n; Fri, 24 May 2024 15:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OFei8w012326; Fri, 24 May 2024 15:40:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFei0I012323; Fri, 24 May 2024 15:40:44 GMT (envelope-from git) Date: Fri, 24 May 2024 15:40:44 GMT Message-Id: <202405241540.44OFei0I012323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: d09ee08f106d - main - nvme: Count number of alginment splits List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d09ee08f106ddabeb02affc7e9dcfea8c154a57d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d09ee08f106ddabeb02affc7e9dcfea8c154a57d commit d09ee08f106ddabeb02affc7e9dcfea8c154a57d Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-24 14:32:47 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-24 14:32:47 +0000 nvme: Count number of alginment splits When possible, we split up I/Os to NVMe drives that advertise a preferred alignment. Add a counter for this. Sponsored by: Netflix Reviewed by: chuck, mav Differential Revision: https://reviews.freebsd.org/D45311 --- sys/dev/nvme/nvme_ctrlr.c | 5 +++++ sys/dev/nvme/nvme_ns.c | 1 + sys/dev/nvme/nvme_private.h | 4 ++++ sys/dev/nvme/nvme_sysctl.c | 5 +++++ 4 files changed, 15 insertions(+) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 00e619bfdc46..d9bd1fce2864 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1442,6 +1442,8 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) ctrlr->enable_aborts = 0; TUNABLE_INT_FETCH("hw.nvme.enable_aborts", &ctrlr->enable_aborts); + ctrlr->alignment_splits = counter_u64_alloc(M_WAITOK); + /* Cap transfers by the maximum addressable by page-sized PRP (4KB pages -> 2MB). */ ctrlr->max_xfer_size = MIN(maxphys, (ctrlr->page_size / 8 * ctrlr->page_size)); if (nvme_ctrlr_construct_admin_qpair(ctrlr) != 0) @@ -1560,6 +1562,9 @@ noadminq: ctrlr->resource_id, ctrlr->resource); nores: + if (ctrlr->alignment_splits) + counter_u64_free(ctrlr->alignment_splits); + mtx_destroy(&ctrlr->lock); } diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index e494b8cd857a..201cf9188c1e 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -428,6 +428,7 @@ nvme_ns_split_bio(struct nvme_namespace *ns, struct bio *bp, if (child_bios == NULL) return (ENOMEM); + counter_u64_add(ns->ctrlr->alignment_splits, 1); for (i = 0; i < num_bios; i++) { child = child_bios[i]; err = nvme_ns_bio_process(ns, child, nvme_bio_child_done); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 69141add4e48..8415819ca20b 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -32,6 +32,7 @@ #include <sys/param.h> #include <sys/bio.h> #include <sys/bus.h> +#include <sys/counter.h> #include <sys/kernel.h> #include <sys/lock.h> #include <sys/malloc.h> @@ -317,6 +318,9 @@ struct nvme_controller { bus_dmamap_t hmb_desc_map; struct nvme_hmb_desc *hmb_desc_vaddr; uint64_t hmb_desc_paddr; + + /* Statistics */ + counter_u64_t alignment_splits; }; #define nvme_mmio_offsetof(reg) \ diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index d6452a2e5492..447f48e0bdd5 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -30,6 +30,7 @@ #include "opt_nvme.h" #include <sys/param.h> +#include <sys/systm.h> #include <sys/bus.h> #include <sys/sysctl.h> @@ -419,4 +420,8 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr) nvme_sysctl_initialize_queue(&ctrlr->ioq[i], ctrlr_ctx, que_tree); } + + SYSCTL_ADD_COUNTER_U64(ctrlr_ctx, ctrlr_list, OID_AUTO, "alignment_splits", + CTLFLAG_RD, &ctrlr->alignment_splits, + "Number of times we split the I/O alignment for drives with preferred alignment"); } From nobody Fri May 24 15:43:47 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8Th0H5Wz5LHqv; Fri, 24 May 2024 15:43:52 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8Tg6mFNz3yHS; Fri, 24 May 2024 15:43:51 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565431; 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=/pbbCIZ0wS57HGXKb0z2dc02ep+kZYmVz7tMIl8yoNo=; b=ikKq2upobeHACI3BFbJmYDtvSlCkd5noMDTE0LVLqThy/VLe1b7u0LFQ5PVu6q16KiuMn8 fcQnqIVbF3sJIRoOzgcHy3cgN7iGOQhrpRq9op9+ML1moiABFSzsSnyMg95GhybKIbrJRR bX9nboJKA2On9n++7H7hZ2+0Evo8HIyiaAaUrQ/fs2c4tlgKk5eezKoTxlfQfsMqA2veYa HHYMqvBOn+dZPS3EpIqRzDDY1jEqVMgTFdyPNhmYO++IkoCfwTrCG28nbpaa3AinDO/DLA IPidR5xoC088AZbXSh4OHDFCeodMIsCbnn6R0EcZMkixT7otozrvy2FMSNz+ZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716565431; a=rsa-sha256; cv=none; b=DwRty+054ZNmqyGOzB+9s8ZHdIx9dO4c5idMkCM3xETPFw8FCQnDcfmgMenxpinkRACM+X HPXnjHDz4VvUTkgcZk/g5TDyJG9aYraWsmyM4XBxmmF4HPo0LmGdR10NdQo5+U0u3/6uFf Fgxj9i/UZcjWiSzo1bQtzFF1g5+5bkcEGHQy5csSPc1MCE5crJVw6zFos5CA6EYkcxqUiM IM4zEafucVLgb0EEhYU4rrFMW4roDRWMx8Qo0PgGQI1Hfp8fLgzg1e4fyOx+fWr8ZsqXVl Sa20Gple17zhamiArPVYz7j906gK6ksEFkA9uE3dic1wXiYKz7owQGhLoeq8rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716565431; 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=/pbbCIZ0wS57HGXKb0z2dc02ep+kZYmVz7tMIl8yoNo=; b=ZqIVnyFG/fVnHkXjqOxurNGqkiKX6nNgURYyJtw0K9Edywl9jQDbGNpgzTtjVMTlWy3QfS /aXwSoXhKCSz2VqRwpQOY8K9JRtUj5ydNLkHFqDD+xE3hjkbny0YcCbZAUlJCEZrYK5Tkn I68s/P/oyCVtXdkRWM5QjRDBSGT/s08FgBJdfSJ8k1RjuYo2/6xV2phvEjwmi4YN+FamRZ Uo5VT5ATbZasZpvZ4JQPDIfNAJ7ooih1BQi5QZ7AXP2CnNBVlSrxGo2sTrY8y/D6kAb+VT eeDdqDyq9MqMaMgRrPZEsbCaCZdeLxi3dX+J7rKGaqWjVUyqqEoZXmvvfAT+Rw== 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 4Vm8Tg1t37z10rF; Fri, 24 May 2024 15:43:51 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 24 May 2024 08:43:47 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: Ravi Pokala <rpokala@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: 0d3789584915 - main - ctl: use socket buffer mutexes in struct socket directly Message-ID: <ZlC1s6Bbz_hBYeIz@cell.glebi.us> References: <202405231912.44NJCLja032047@gitrepo.freebsd.org> <1B513920-69CF-434E-B5A1-45960CB99246@panasas.com> List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1B513920-69CF-434E-B5A1-45960CB99246@panasas.com> On Thu, May 23, 2024 at 12:21:23PM -0700, Ravi Pokala wrote: R> Hi Gleb, R> R> Isn't this the exact opposite of the summary? This change *doesn't* use the mutexes directly, it uses the wrappers to *avoid* using the mutexes directly. SOCKBUF_LOCK(&so->so_rcv) locks via pointer in the buffer to the socket. SOCK_RECVBUF_LOCK(so) locks directly in the socket. -- Gleb Smirnoff From nobody Fri May 24 15:56:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8m10cbsz5LJf5; Fri, 24 May 2024 15:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8m0736cz40q0; Fri, 24 May 2024 15:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4EXqIzMLDaND6jJsrQosN1raS8+XwutO+Nuvin01S0=; b=Sn8qgpxGG/YEY8RxEc8RNnI1reIqE9DVa/PuJ5ebcUgEv8Trw3UhjuoyKzNa1Zbg2Pev/R wr7oVDSuOC3xhQdpazeaOTFTF2+Vl9JApEZbsO6tBvGONqtksd1lOIBjR0fRowBqfijGH7 1BOHWZ9wmm66sla53FVxx7VlLFu4q5SojJHG2sDUKVamc0i3gbQA7aLKEY9JlkWhpHnYmx jAKhANiw/FshC+L3qAlOC7Vb71iGdXf07N0C8bDafdWWJKcczk03hnlqNsYkLg7zgGHk1T xNOpdDhrFtf7gwrsZia12e1Sf4sJ90f7zDnFS1nOXiKKANrIo5p7rPgMZvJbGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716566177; a=rsa-sha256; cv=none; b=DJqNDrZVFPJ7IF6n9WiI5g8PwcMpoRSn3yYXchQXl80v2QHXlvji6pmhg0x+v3MkYRy+mQ K10TocJJqGtBIRP/MTdpuC6kij+OQtqxudGeaaRCkW4imzl/r7tdAgT3n3G4+HoSR25iDR UDQ1+gGz6Jg5bo/wneZ2dBgKawFeZvvocP6hCLKn/XBL/dYA8RwZSXNv9u2yL8VLC4XWGT Kh999r14RrQxccUQVQEPcEeFv918VGcxmxU5XX1bYiO1zrxQG/vlcATsakVRd8EuPb2ehz m9fk+125aGGzuzG+zElvIZUoJJ7RgC5ujqSXsW0hF2tur0L8hs+ExAeNuhvVOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4EXqIzMLDaND6jJsrQosN1raS8+XwutO+Nuvin01S0=; b=x4Qog8eIHDVDq83rJniUAvCupTU5b3J1Z/eIV0+d3wxmdG87lnRYRxd5TU6MuvgJMahI84 tkazclv4V+GAXZMuMSdH3dpPzZAPboU69ItHdWLxzrOhiJNvSwbdZrdl3U6zbb7oLtNw52 qwL1TSxbfesznmnE5RwXnvQMGX3FHyeGhffRjMHnkBcnqGK2NibJGuyPLFGQ6EyefeUkb9 Ol8DQiXTDWQiaBoazYOG/+Rv7hLylECoLPm4kPdpD+I+F/QITkJUN7JIFSBl/rvJKRP98a CbUly3/ZqhAtxpB4BovzYDaPncAC+8u3zQYGzS5JaYSgoizmqUOYeZhGSdNcnQ== 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 4Vm8m06bsCzfsv; Fri, 24 May 2024 15:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OFuGhR037620; Fri, 24 May 2024 15:56:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFuGAe037617; Fri, 24 May 2024 15:56:16 GMT (envelope-from git) Date: Fri, 24 May 2024 15:56:16 GMT Message-Id: <202405241556.44OFuGAe037617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby <rlibby@FreeBSD.org> Subject: git: a216e311a70c - main - vm_pageout_scan_inactive: take a lock break List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a216e311a70cc87a5646f4306e36c60a51706699 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=a216e311a70cc87a5646f4306e36c60a51706699 commit a216e311a70cc87a5646f4306e36c60a51706699 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2024-05-24 15:52:58 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2024-05-24 15:52:58 +0000 vm_pageout_scan_inactive: take a lock break In vm_pageout_scan_inactive, release the object lock when we go to refill the scan batch queue so that someone else has a chance to acquire it. This improves access latency to the object when the pagedaemon is processing many consecutive pages from a single object, and also in any case avoids a hiccup during refill for the last touched object. Reviewed by: alc, markj (previous version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45288 --- sys/vm/vm_pageout.c | 16 +++++++++++++++- sys/vm/vm_pagequeue.h | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 8e9555c678c9..61f02eeb2f11 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1451,7 +1451,21 @@ vm_pageout_scan_inactive(struct vm_domain *vmd, int page_shortage) pq = &vmd->vmd_pagequeues[PQ_INACTIVE]; vm_pagequeue_lock(pq); vm_pageout_init_scan(&ss, pq, marker, NULL, pq->pq_cnt); - while (page_shortage > 0 && (m = vm_pageout_next(&ss, true)) != NULL) { + while (page_shortage > 0) { + /* + * If we need to refill the scan batch queue, release any + * optimistically held object lock. This gives someone else a + * chance to grab the lock, and also avoids holding it while we + * do unrelated work. + */ + if (object != NULL && vm_batchqueue_empty(&ss.bq)) { + VM_OBJECT_WUNLOCK(object); + object = NULL; + } + + m = vm_pageout_next(&ss, true); + if (m == NULL) + break; KASSERT((m->flags & PG_MARKER) == 0, ("marker page %p was dequeued", m)); diff --git a/sys/vm/vm_pagequeue.h b/sys/vm/vm_pagequeue.h index 1fa80e718b71..7e133ec947b4 100644 --- a/sys/vm/vm_pagequeue.h +++ b/sys/vm/vm_pagequeue.h @@ -354,6 +354,12 @@ vm_batchqueue_init(struct vm_batchqueue *bq) bq->bq_cnt = 0; } +static inline bool +vm_batchqueue_empty(const struct vm_batchqueue *bq) +{ + return (bq->bq_cnt == 0); +} + static inline int vm_batchqueue_insert(struct vm_batchqueue *bq, vm_page_t m) { From nobody Fri May 24 15:59:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8qY3ZdBz5LK1q; Fri, 24 May 2024 15:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8qY3PSmz41SS; Fri, 24 May 2024 15:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/B6Hug5JCxYt8f9Qc90T7V1Lcbir0IZeXzdnxmNZ3w=; b=y1x44/QECnULmNryHPI8KYR3TeRt1px4vcKZG8zPprlii/A1GRFdkwHjiyx6CVmfE8d0Bi 56Ty3aj8l7lTvVowUAQRhgbMm1L2X4ETFAuz98svdJMBA081vnz7BDo/KluX2DpXKY4KoD wRcjAJU7aHmBtQIpDqczGfNNZW3twvkBPADEj1S32Sw8RmaLW9Q5ianLKw9NbQm/N6QPFu IDHF1osuDbmdFMlqti4wyHJmnjx36ZpIxKxz9Zf8zh8PlTDNYt6RS6R9fLLfp1Bi996y7f Rb/6u9SppzfzCgSVNQ9RKByshBWmVh/56xZNsfRG/T9CmCt2R05vaXOfdDCr4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716566361; a=rsa-sha256; cv=none; b=FNQSNcsMPBWHoCXX1+ud4/LLninyN0asFd0AWk0SZYUd5CqwMFL6UcJiL5pDLGv0yzQk/P 9ZiplWsydIZ03pX/P1Rx1lGyHEFyJSHU4VONKejTHKEJix3ljuZScKSD2qbNrtBIEftlL1 QsNnEMRRS1DJa9Fmzl9a26elQfhCE7TqqMEzHpvtrbuXnZWiz2k1C3vqFqEmFTIENkdq7J Ru4FhAwg/jSJoLOOqHZxQ9/a+rcsD/qeGWnxOvUOlwprm68iH8zpyuqkHAznlTY+X/xkox JJmhi1XHBzGueZfbHeMzKBf1z2XLQQsdT9wBbZOlnhZ1/MwYeSh/3s9os+dFUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/B6Hug5JCxYt8f9Qc90T7V1Lcbir0IZeXzdnxmNZ3w=; b=WJKj2/8Ipv7RDH16iI8hypnWAYV8/7bDq+2bXU3V8sFiyS3ZcvrEjCPHw/DOhY64qiSAe1 LV/ikHOw/WDjX0ZQAZ4ZBHjgP8KDDkwswV85za6TnQhm/hFz+Izm0YyFAi9BnDx2C1lYwH oPTV+GNjMhyA0SOcDQrHDo7Hfx7EFi8Qyo54H0m+RyNtcGZTU4yTCbmSOWDAsJj7cbfe1M y6yioIXWA/Rlcmaso8QUBsBc78vfRWwFwcpT2tirqOLXlU5uF1tK3aWztczZuRh6zlcs84 whC9y9iX+DP7DrtgsIwjzcaUyDvvHp4GmLJlzPBcTfkq2XuqPXAw3IAN+Fd49A== 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 4Vm8qY30X8zfqX; Fri, 24 May 2024 15:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OFxL6p038342; Fri, 24 May 2024 15:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OFxHbI038322; Fri, 24 May 2024 15:59:17 GMT (envelope-from git) Date: Fri, 24 May 2024 15:59:17 GMT Message-Id: <202405241559.44OFxHbI038322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric <dim@FreeBSD.org> Subject: git: 3a0793336edf - main - Merge llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a0793336edfc21cb6d4c8c5c5d7f1665f3e6c5a Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3a0793336edfc21cb6d4c8c5c5d7f1665f3e6c5a commit 3a0793336edfc21cb6d4c8c5c5d7f1665f3e6c5a Merge: a216e311a70c c6bcacc7c9d8 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-05-24 15:51:19 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-05-24 15:58:04 +0000 Merge llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67. PR: 276104 MFC after: 3 days .../clang/lib/CodeGen/CodeGenModule.cpp | 14 +++++ .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 3 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 7 ++- .../clang/lib/Format/WhitespaceManager.cpp | 2 +- .../clang/lib/Interpreter/IncrementalParser.cpp | 24 ++++++-- .../clang/lib/Interpreter/IncrementalParser.h | 5 ++ .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 25 +++++++-- contrib/llvm-project/libcxx/src/atomic.cpp | 16 +++++- contrib/llvm-project/libcxx/src/chrono.cpp | 4 +- contrib/llvm-project/lld/ELF/Relocations.cpp | 5 +- .../llvm/include/llvm/CodeGen/MachineFrameInfo.h | 7 +++ .../llvm/lib/Analysis/InstructionSimplify.cpp | 4 ++ .../lib/CodeGen/InterleavedLoadCombinePass.cpp | 3 + .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 +- .../Target/AArch64/AArch64Arm64ECCallLowering.cpp | 16 ++++-- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 3 +- .../AArch64/GISel/AArch64GlobalISelUtils.cpp | 6 ++ .../Target/AArch64/GISel/AArch64LegalizerInfo.cpp | 1 + .../AArch64/GISel/AArch64RegisterBankInfo.cpp | 5 +- .../llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 2 +- .../llvm/lib/Target/AMDGPU/SIInstrInfo.h | 11 ++++ .../llvm/lib/Target/AMDGPU/SOPInstructions.td | 2 +- .../llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp | 57 ++++++------------- .../Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp | 8 +-- .../Target/RISCV/MCTargetDesc/RISCVELFStreamer.h | 1 - .../lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp | 2 - .../RISCV/MCTargetDesc/RISCVTargetStreamer.cpp | 5 ++ .../RISCV/MCTargetDesc/RISCVTargetStreamer.h | 5 ++ .../llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 32 +++++++++-- .../lib/Target/RISCV/RISCVExpandPseudoInsts.cpp | 5 +- .../llvm/lib/Target/RISCV/RISCVFeatures.td | 5 ++ .../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 9 ++- .../llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp | 65 +++++++++++++--------- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 6 +- .../llvm/lib/Target/X86/X86InstrAVX512.td | 42 +++++++------- .../llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 7 ++- .../llvm/lib/Transforms/IPO/GlobalOpt.cpp | 3 + .../Transforms/InstCombine/InstCombineSelect.cpp | 14 ++++- .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 21 +------ lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Basic/Version.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 4 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 46 files changed, 316 insertions(+), 169 deletions(-) diff --cc lib/clang/include/VCSVersion.inc index c4bb0df4e3a5,000000000000..941c98e43c9a mode 100644,000000..100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@@ -1,8 -1,0 +1,8 @@@ - #define LLVM_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define LLVM_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" + - #define CLANG_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define CLANG_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" + - #define LLDB_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define LLDB_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --cc lib/clang/include/clang/Basic/Version.inc index c243016c5f73,000000000000..405ee341dfcd mode 100644,000000..100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@@ -1,8 -1,0 +1,8 @@@ - #define CLANG_VERSION 18.1.5 - #define CLANG_VERSION_STRING "18.1.5" ++#define CLANG_VERSION 18.1.6 ++#define CLANG_VERSION_STRING "18.1.6" +#define CLANG_VERSION_MAJOR 18 +#define CLANG_VERSION_MAJOR_STRING "18" +#define CLANG_VERSION_MINOR 1 - #define CLANG_VERSION_PATCHLEVEL 5 ++#define CLANG_VERSION_PATCHLEVEL 6 + +#define CLANG_VENDOR "FreeBSD " diff --cc lib/clang/include/lld/Common/Version.inc index 8b21c19f95ba,000000000000..1de090a4b4d0 mode 100644,000000..100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@@ -1,4 -1,0 +1,4 @@@ +// Local identifier in __FreeBSD_version style +#define LLD_FREEBSD_VERSION 1500000 + - #define LLD_VERSION_STRING "18.1.5 (FreeBSD llvmorg-18.1.5-0-g617a15a9eac9-" __XSTRING(LLD_FREEBSD_VERSION) ")" ++#define LLD_VERSION_STRING "18.1.6 (FreeBSD llvmorg-18.1.6-0-g1118c2e05e67-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --cc lib/clang/include/lldb/Version/Version.inc index 0e86bd2e01ba,000000000000..c693f099ccff mode 100644,000000..100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@@ -1,6 -1,0 +1,6 @@@ - #define LLDB_VERSION 18.1.5 - #define LLDB_VERSION_STRING "18.1.5" ++#define LLDB_VERSION 18.1.6 ++#define LLDB_VERSION_STRING "18.1.6" +#define LLDB_VERSION_MAJOR 18 +#define LLDB_VERSION_MINOR 1 - #define LLDB_VERSION_PATCH 5 ++#define LLDB_VERSION_PATCH 6 +/* #undef LLDB_FULL_VERSION_STRING */ diff --cc lib/clang/include/llvm/Config/config.h index 0760c0b17a87,000000000000..65e903427a83 mode 100644,000000..100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@@ -1,378 -1,0 +1,378 @@@ +#ifndef CONFIG_H +#define CONFIG_H + +// Include this header only under the llvm source tree. +// This is a private header. + +/* Exported configuration */ +#include "llvm/Config/llvm-config.h" + +/* Bug report URL. */ +#define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" + +/* Define to 1 to enable backtraces, and to 0 otherwise. */ +#define ENABLE_BACKTRACES 1 + +/* Define to 1 to enable crash overrides, and to 0 otherwise. */ +#define ENABLE_CRASH_OVERRIDES 1 + +/* Define to 1 to enable crash memory dumps, and to 0 otherwise. */ +#define LLVM_ENABLE_CRASH_DUMPS 0 + +/* Define to 1 to prefer forward slashes on Windows, and to 0 prefer + backslashes. */ +#define LLVM_WINDOWS_PREFER_FORWARD_SLASH 0 + +/* Define to 1 if you have the `backtrace' function. */ +#define HAVE_BACKTRACE TRUE + +#define BACKTRACE_HEADER <execinfo.h> + +/* Define to 1 if you have the <CrashReporterClient.h> header file. */ +/* #undef HAVE_CRASHREPORTERCLIENT_H */ + +/* can use __crashreporter_info__ */ +#if defined(__APPLE__) +#define HAVE_CRASHREPORTER_INFO 1 +#else +#define HAVE_CRASHREPORTER_INFO 0 +#endif + +/* Define to 1 if you have the declaration of `arc4random', and to 0 if you + don't. */ +#define HAVE_DECL_ARC4RANDOM 1 + +/* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you + don't. */ +#define HAVE_DECL_FE_ALL_EXCEPT 1 + +/* Define to 1 if you have the declaration of `FE_INEXACT', and to 0 if you + don't. */ +#define HAVE_DECL_FE_INEXACT 1 + +/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_S 0 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if dlopen() is available on this platform. */ +#define HAVE_DLOPEN 1 + +/* Define if dladdr() is available on this platform. */ +#define HAVE_DLADDR 1 + +#if !defined(__arm__) || defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__) +/* Define to 1 if we can register EH frames on this platform. */ +#define HAVE_REGISTER_FRAME 1 + +/* Define to 1 if we can deregister EH frames on this platform. */ +#define HAVE_DEREGISTER_FRAME 1 +#endif // !arm || USING_SJLJ_EXCEPTIONS || ARM_DWARF_EH_ + +/* Define if __unw_add_dynamic_fde() is available on this platform. */ +/* #undef HAVE_UNW_ADD_DYNAMIC_FDE */ + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the <fenv.h> header file. */ +#define HAVE_FENV_H 1 + +/* Define if libffi is available on this platform. */ +/* #undef HAVE_FFI_CALL */ + +/* Define to 1 if you have the <ffi/ffi.h> header file. */ +/* #undef HAVE_FFI_FFI_H */ + +/* Define to 1 if you have the <ffi.h> header file. */ +/* #undef HAVE_FFI_H */ + +/* Define to 1 if you have the `futimens' function. */ +#define HAVE_FUTIMENS 1 + +/* Define to 1 if you have the `futimes' function. */ +#define HAVE_FUTIMES 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the `isatty' function. */ +#define HAVE_ISATTY 1 + +/* Define to 1 if you have the `edit' library (-ledit). */ +#define HAVE_LIBEDIT TRUE + +/* Define to 1 if you have the `pfm' library (-lpfm). */ +/* #undef HAVE_LIBPFM */ + +/* Define to 1 if the `perf_branch_entry' struct has field cycles. */ +/* #undef LIBPFM_HAS_FIELD_CYCLES */ + +/* Define to 1 if you have the `psapi' library (-lpsapi). */ +/* #undef HAVE_LIBPSAPI */ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the `pthread_getname_np' function. */ +#define HAVE_PTHREAD_GETNAME_NP 1 + +/* Define to 1 if you have the `pthread_setname_np' function. */ +#define HAVE_PTHREAD_SETNAME_NP 1 + +/* Define to 1 if you have the <link.h> header file. */ +#if __has_include(<link.h>) +#define HAVE_LINK_H 1 +#else +#define HAVE_LINK_H 0 +#endif + +/* Define to 1 if you have the <mach/mach.h> header file. */ +#if __has_include(<mach/mach.h>) +#define HAVE_MACH_MACH_H 1 +#endif + +/* Define to 1 if you have the `mallctl' function. */ +#if defined(__FreeBSD__) +#define HAVE_MALLCTL 1 +#endif + +/* Define to 1 if you have the `mallinfo' function. */ +#if defined(__linux__) +#define HAVE_MALLINFO 1 +#endif + +/* Define to 1 if you have the `mallinfo2' function. */ +/* #undef HAVE_MALLINFO2 */ + +/* Define to 1 if you have the <malloc/malloc.h> header file. */ +#if __has_include(<malloc/malloc.h>) +#define HAVE_MALLOC_MALLOC_H 1 +#endif + +/* Define to 1 if you have the `malloc_zone_statistics' function. */ +#if defined(__APPLE__) +#define HAVE_MALLOC_ZONE_STATISTICS 1 +#endif + +/* Define to 1 if you have the `posix_spawn' function. */ +#define HAVE_POSIX_SPAWN 1 + +/* Define to 1 if you have the `pread' function. */ +#define HAVE_PREAD 1 + +/* Define to 1 if you have the <pthread.h> header file. */ +#define HAVE_PTHREAD_H 1 + +/* Have pthread_mutex_lock */ +#define HAVE_PTHREAD_MUTEX_LOCK 1 + +/* Have pthread_rwlock_init */ +#define HAVE_PTHREAD_RWLOCK_INIT 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `sigaltstack' function. */ +#define HAVE_SIGALTSTACK 1 + +/* Define to 1 if you have the <signal.h> header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/resource.h> header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if stat struct has st_mtimespec member .*/ +#if !defined(__linux__) +#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 +#endif + +/* Define to 1 if stat struct has st_mtim member. */ +#if !defined(__APPLE__) +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +#endif + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if the setupterm() function is supported this platform. */ +#if defined(__FreeBSD__) +/* + * This is only needed for terminalHasColors(). When disabled LLVM falls back + * to checking a list of TERM prefixes which is sufficient for a bootstrap tool. + */ +#define LLVM_ENABLE_TERMINFO TRUE +#endif + +/* Define to 1 if you have the <termios.h> header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the <valgrind/valgrind.h> header file. */ +/* #undef HAVE_VALGRIND_VALGRIND_H */ + +/* Have host's _alloca */ +/* #undef HAVE__ALLOCA */ + +/* Define to 1 if you have the `_chsize_s' function. */ +/* #undef HAVE__CHSIZE_S */ + +/* Define to 1 if you have the `_Unwind_Backtrace' function. */ +#define HAVE__UNWIND_BACKTRACE 1 + +/* Have host's __alloca */ +/* #undef HAVE___ALLOCA */ + +/* Have host's __ashldi3 */ +/* #undef HAVE___ASHLDI3 */ + +/* Have host's __ashrdi3 */ +/* #undef HAVE___ASHRDI3 */ + +/* Have host's __chkstk */ +/* #undef HAVE___CHKSTK */ + +/* Have host's __chkstk_ms */ +/* #undef HAVE___CHKSTK_MS */ + +/* Have host's __cmpdi2 */ +/* #undef HAVE___CMPDI2 */ + +/* Have host's __divdi3 */ +/* #undef HAVE___DIVDI3 */ + +/* Have host's __fixdfdi */ +/* #undef HAVE___FIXDFDI */ + +/* Have host's __fixsfdi */ +/* #undef HAVE___FIXSFDI */ + +/* Have host's __floatdidf */ +/* #undef HAVE___FLOATDIDF */ + +/* Have host's __lshrdi3 */ +/* #undef HAVE___LSHRDI3 */ + +/* Have host's __main */ +/* #undef HAVE___MAIN */ + +/* Have host's __moddi3 */ +/* #undef HAVE___MODDI3 */ + +/* Have host's __udivdi3 */ +/* #undef HAVE___UDIVDI3 */ + +/* Have host's __umoddi3 */ +/* #undef HAVE___UMODDI3 */ + +/* Have host's ___chkstk */ +/* #undef HAVE____CHKSTK */ + +/* Have host's ___chkstk_ms */ +/* #undef HAVE____CHKSTK_MS */ + +/* Linker version detected at compile time. */ +/* #undef HOST_LINK_VERSION */ + +/* Define if overriding target triple is enabled */ +/* #undef LLVM_TARGET_TRIPLE_ENV */ + +/* Whether tools show host and target info when invoked with --version */ +#define LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO 1 + +/* Define if libxml2 is supported on this platform. */ +/* #undef LLVM_ENABLE_LIBXML2 */ + +/* Define to the extension used for shared libraries, say, ".so". */ +#if defined(__APPLE__) +#define LTDL_SHLIB_EXT ".dylib" +#else +#define LTDL_SHLIB_EXT ".so" +#endif + +/* Define to the extension used for plugin libraries, say, ".so". */ +#if defined(__APPLE__) +#define LLVM_PLUGIN_EXT ".dylib" +#else +#define LLVM_PLUGIN_EXT ".so" +#endif + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freebsd.org/submit/" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "LLVM" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "LLVM 18.1.5" ++#define PACKAGE_STRING "LLVM 18.1.6" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "18.1.5" ++#define PACKAGE_VERSION "18.1.6" + +/* Define to the vendor of this package. */ +/* #undef PACKAGE_VENDOR */ + +/* Define to a function implementing stricmp */ +/* #undef stricmp */ + +/* Define to a function implementing strdup */ +/* #undef strdup */ + +/* Whether GlobalISel rule coverage is being collected */ +#define LLVM_GISEL_COV_ENABLED 0 + +/* Define to the default GlobalISel coverage file prefix */ +/* #undef LLVM_GISEL_COV_PREFIX */ + +/* Whether Timers signpost passes in Xcode Instruments */ +#if defined(__APPLE__) +#define LLVM_SUPPORT_XCODE_SIGNPOSTS 1 +#else +#define LLVM_SUPPORT_XCODE_SIGNPOSTS 0 +#endif + +/* #undef HAVE_PROC_PID_RUSAGE */ + +#define HAVE_BUILTIN_THREAD_POINTER 1 + +#endif diff --cc lib/clang/include/llvm/Config/llvm-config.h index 049529efdd7f,000000000000..372a69017f79 mode 100644,000000..100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@@ -1,229 -1,0 +1,229 @@@ +/*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/ +/* */ +/* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ +/* Exceptions. */ +/* See https://llvm.org/LICENSE.txt for license information. */ +/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ +/* */ +/*===----------------------------------------------------------------------===*/ + +/* This file enumerates variables from the LLVM configuration so that they + can be in exported headers and won't override package specific directives. + This is a C header that can be included in the llvm-c headers. */ + +#ifndef LLVM_CONFIG_H +#define LLVM_CONFIG_H + +/* Define if LLVM_ENABLE_DUMP is enabled */ +/* #undef LLVM_ENABLE_DUMP */ + +/* Target triple LLVM will generate code for by default */ +/* Doesn't use `cmakedefine` because it is allowed to be empty. */ +/* #undef LLVM_DEFAULT_TARGET_TRIPLE */ + +/* Define if threads enabled */ +#define LLVM_ENABLE_THREADS 1 + +/* Has gcc/MSVC atomic intrinsics */ +#define LLVM_HAS_ATOMICS 1 + +/* Host triple LLVM will be executed on */ +/* #undef LLVM_HOST_TRIPLE */ + +/* LLVM architecture name for the native architecture, if available */ +/* #undef LLVM_NATIVE_ARCH */ + +/* LLVM name for the native AsmParser init function, if available */ +/* #undef LLVM_NATIVE_ASMPARSER */ + +/* LLVM name for the native AsmPrinter init function, if available */ +/* #undef LLVM_NATIVE_ASMPRINTER */ + +/* LLVM name for the native Disassembler init function, if available */ +/* #undef LLVM_NATIVE_DISASSEMBLER */ + +/* LLVM name for the native Target init function, if available */ +/* #undef LLVM_NATIVE_TARGET */ + +/* LLVM name for the native TargetInfo init function, if available */ +/* #undef LLVM_NATIVE_TARGETINFO */ + +/* LLVM name for the native target MC init function, if available */ +/* #undef LLVM_NATIVE_TARGETMC */ + +/* LLVM name for the native target MCA init function, if available */ +/* #undef LLVM_NATIVE_TARGETMCA */ + +/* Define if the AArch64 target is built in */ +#ifdef LLVM_TARGET_ENABLE_AARCH64 +#define LLVM_HAS_AARCH64_TARGET 1 +#else +#define LLVM_HAS_AARCH64_TARGET 0 +#endif + +/* Define if the AMDGPU target is built in */ +#define LLVM_HAS_AMDGPU_TARGET 0 + +/* Define if the ARC target is built in */ +#define LLVM_HAS_ARC_TARGET 0 + +/* Define if the ARM target is built in */ +#ifdef LLVM_TARGET_ENABLE_ARM +#define LLVM_HAS_ARM_TARGET 1 +#else +#define LLVM_HAS_ARM_TARGET 0 +#endif + +/* Define if the AVR target is built in */ +#define LLVM_HAS_AVR_TARGET 0 + +/* Define if the BPF target is built in */ +#ifdef LLVM_TARGET_ENABLE_BPF +#define LLVM_HAS_BPF_TARGET 1 +#else +#define LLVM_HAS_BPF_TARGET 0 +#endif + +/* Define if the CSKY target is built in */ +#define LLVM_HAS_CSKY_TARGET 0 + +/* Define if the DirectX target is built in */ +#define LLVM_HAS_DIRECTX_TARGET 0 + +/* Define if the Hexagon target is built in */ +#define LLVM_HAS_HEXAGON_TARGET 0 + +/* Define if the Lanai target is built in */ +#define LLVM_HAS_LANAI_TARGET 0 + +/* Define if the LoongArch target is built in */ +#define LLVM_HAS_LOONGARCH_TARGET 0 + +/* Define if the M68k target is built in */ +#define LLVM_HAS_M68K_TARGET 0 + +/* Define if the Mips target is built in */ +#ifdef LLVM_TARGET_ENABLE_MIPS +#define LLVM_HAS_MIPS_TARGET 1 +#else +#define LLVM_HAS_MIPS_TARGET 0 +#endif + +/* Define if the MSP430 target is built in */ +#define LLVM_HAS_MSP430_TARGET 0 + +/* Define if the NVPTX target is built in */ +#define LLVM_HAS_NVPTX_TARGET 0 + +/* Define if the PowerPC target is built in */ +#ifdef LLVM_TARGET_ENABLE_POWERPC +#define LLVM_HAS_POWERPC_TARGET 1 +#else +#define LLVM_HAS_POWERPC_TARGET 0 +#endif + +/* Define if the RISCV target is built in */ +#ifdef LLVM_TARGET_ENABLE_RISCV +#define LLVM_HAS_RISCV_TARGET 1 +#else +#define LLVM_HAS_RISCV_TARGET 0 +#endif + +/* Define if the Sparc target is built in */ +#define LLVM_HAS_SPARC_TARGET 0 + +/* Define if the SPIRV target is built in */ +#define LLVM_HAS_SPIRV_TARGET 0 + +/* Define if the SystemZ target is built in */ +#define LLVM_HAS_SYSTEMZ_TARGET 0 + +/* Define if the VE target is built in */ +#define LLVM_HAS_VE_TARGET 0 + +/* Define if the WebAssembly target is built in */ +#define LLVM_HAS_WEBASSEMBLY_TARGET 0 + +/* Define if the X86 target is built in */ +#ifdef LLVM_TARGET_ENABLE_X86 +#define LLVM_HAS_X86_TARGET 1 +#else +#define LLVM_HAS_X86_TARGET 0 +#endif + +/* Define if the XCore target is built in */ +#define LLVM_HAS_XCORE_TARGET 0 + +/* Define if the Xtensa target is built in */ +#define LLVM_HAS_XTENSA_TARGET 0 + +/* Define if this is Unixish platform */ +#define LLVM_ON_UNIX 1 + +/* Define if we have the Intel JIT API runtime support library */ +#define LLVM_USE_INTEL_JITEVENTS 0 + +/* Define if we have the oprofile JIT-support library */ +#define LLVM_USE_OPROFILE 0 + +/* Define if we have the perf JIT-support library */ +#define LLVM_USE_PERF 0 + +/* Major version of the LLVM API */ +#define LLVM_VERSION_MAJOR 18 + +/* Minor version of the LLVM API */ +#define LLVM_VERSION_MINOR 1 + +/* Patch version of the LLVM API */ - #define LLVM_VERSION_PATCH 5 ++#define LLVM_VERSION_PATCH 6 + +/* LLVM version string */ - #define LLVM_VERSION_STRING "18.1.5" ++#define LLVM_VERSION_STRING "18.1.6" + +/* Whether LLVM records statistics for use with GetStatistics(), + * PrintStatistics() or PrintStatisticsJSON() + */ +#define LLVM_FORCE_ENABLE_STATS 0 + +/* Define if we have z3 and want to build it */ +/* #undef LLVM_WITH_Z3 */ + +/* Define if we have curl and want to use it */ +/* #undef LLVM_ENABLE_CURL */ + +/* Define if we have cpp-httplib and want to use it */ +/* #undef LLVM_ENABLE_HTTPLIB */ + +/* Define if zlib compression is available */ +#define LLVM_ENABLE_ZLIB 1 + +/* Define if zstd compression is available */ +#define LLVM_ENABLE_ZSTD 1 + +/* Define if LLVM is using tflite */ +/* #undef LLVM_HAVE_TFLITE */ + +/* Define to 1 if you have the <sysexits.h> header file. */ +#define HAVE_SYSEXITS_H 1 + +/* Define if building libLLVM shared library */ +/* #undef LLVM_BUILD_LLVM_DYLIB */ + +/* Define if building LLVM with BUILD_SHARED_LIBS */ +/* #undef LLVM_BUILD_SHARED_LIBS */ + +/* Define if building LLVM with LLVM_FORCE_USE_OLD_TOOLCHAIN_LIBS */ +/* #undef LLVM_FORCE_USE_OLD_TOOLCHAIN */ + +/* Define if llvm_unreachable should be optimized with undefined behavior + * in non assert builds */ +#define LLVM_UNREACHABLE_OPTIMIZE 1 + +/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */ +#define LLVM_ENABLE_DIA_SDK 0 + +/* Define if plugins enabled */ +/* #undef LLVM_ENABLE_PLUGINS */ + +#endif diff --cc lib/clang/include/llvm/Support/VCSRevision.h index 433b2b53b8fe,000000000000..9c8ecebe02de mode 100644,000000..100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@@ -1,2 -1,0 +1,2 @@@ - #define LLVM_REVISION "llvmorg-18.1.5-0-g617a15a9eac9" ++#define LLVM_REVISION "llvmorg-18.1.6-0-g1118c2e05e67" +#define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" From nobody Fri May 24 16:05:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vm8y54vfsz5LKgC; Fri, 24 May 2024 16:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vm8y546jJz41yn; Fri, 24 May 2024 16:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lcz39PcmFqbunav+06idOalJGwc1ITGRdlMLMI5cYhI=; b=cG8LkDhB5gblUAbqx1ReP6PUPBOsPkMdvPNV9OwQsIKtdT9xdoA5eXZiM5+5RwCuH/MLuH AUopPkBTO8NiSF/Gp9SK5m+oaDt3IzGm3angpI1dNLkeqN3XWnYY+15LfvliBDMzPHscYm FOc7egiqwVr7gCui5t3pZbSJcYkoZLyjdQVm1nX+XGfjy3szV7aG21szuwA+5p5KJ8itof f7Gy+/bX7K/Peam9MHoE64W/BgGICJvZkXzoABq5L2h3lXV9KPxIpTe/fTbsfOrc0RPIzQ fm8S8V/6cIkrwLSV1DunEH+RomoT72xjaFX6+VIz6CknN7qIqzMUC6ASQVKTag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716566701; a=rsa-sha256; cv=none; b=mGkOVw+B4vc0YtQdTf0/d1GbAxONrcfGE2oZq1js2+qyTFHMlpoCMD83yxLF8qnnQeU9tm vhvTy2GbHiyszeDfpfs1td6gvKCHFpKkB9EHG2L8YMb4tNmH3hSRmwKUPuIjyCVJx0s5sK /uqHr4UsiUw/iMxFwIUAiGnONzCIM66MM2WZvedK3Zv32xxl3OYjRQLgHh/69i3ySNMgjR HK4T5tuOfKFWGJgPEfoCX/2AqMg3ft7kwAZtggFN5DXipPoBKttjjTfzmNqFtpTzb2fpty Pd3V/seiJ2SgH1xjDmEl2uBITazWis5MM32E9lplGFqx49vz8yIntpGIoiv5YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716566701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lcz39PcmFqbunav+06idOalJGwc1ITGRdlMLMI5cYhI=; b=oRGegyelBfDhwZxAkFCASl9rsoPpr161LxZXcsXsy3+MijGRlKcNYxt2l1aQlbjKzzV0YD nD4IODVNXBnf1owuxwUW3xjXV7Bginl/ZcroblI6AR3frJvk5y2jT/AG7RG1QC/Md8mif2 PVrpFjl9AwrtTNcF81UIGSzJOOXiwTHYnzJLBGKakQTcxQlDEIyRfEVXnUxriTm4idmBTn oCnZW+gEUOcq+Q73pF+ltLn5BuWaduxceRz1u8AFH10nGVYEIWmgyAasIIPNCAcKOJMCTR hHongn/RtkSrsSij5GIPKVkHLdDW7PmwEnqisj9QUIv4080tvLkfzFBy2mtYIQ== 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 4Vm8y53c8Fzfts; Fri, 24 May 2024 16:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OG51b1056210; Fri, 24 May 2024 16:05:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OG51PA056207; Fri, 24 May 2024 16:05:01 GMT (envelope-from git) Date: Fri, 24 May 2024 16:05:01 GMT Message-Id: <202405241605.44OG51PA056207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang <zlei@FreeBSD.org> Subject: git: c9188db6f956 - stable/14 - ifconfig: Redo fix vlan/vlanproto reconfiguration List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c9188db6f956b30344bc99a13baf57727d4ac97a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c9188db6f956b30344bc99a13baf57727d4ac97a commit c9188db6f956b30344bc99a13baf57727d4ac97a Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-05-21 16:35:01 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-05-24 16:03:02 +0000 ifconfig: Redo fix vlan/vlanproto reconfiguration When the if_vlan(4) interface has not been fully configured, i.e., a bare interface without a physical interface associated with it, retrieving the current settings of it and unconditionally overwriting `params` will result in losing vlandev settings in `params`. That will lead to failing to associate the if_vlan(4) interface with the requested physical interface and the false report 'both vlan and vlandev must be specified'. Fix that by checking if the vlan interface has been fully configured. The basic VLAN test is slightly modified to cover this case. PR: 279181 Reviewed by: kp Tested by: Mike Tancsa <mike@sentex.net> Fixes: b82b8055ad44 ifconfig: fix vlan/vlanproto reconfiguration MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45283 (cherry picked from commit 76df3c57a0abfd24652bfa33982ba136d9d0575b) --- sbin/ifconfig/ifvlan.c | 31 ++++++++++++++++++++++++++----- tests/sys/net/if_vlan.sh | 10 +++++++--- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index a79ea35bc14b..0a2603f1736f 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -60,6 +60,7 @@ #include "ifconfig.h" #define NOTAG ((u_short) -1) +#define NOPROTO ((u_short) -1) static const char proto_8021Q[] = "802.1q"; static const char proto_8021ad[] = "802.1ad"; @@ -67,7 +68,7 @@ static const char proto_qinq[] = "qinq"; static struct vlanreq params = { .vlr_tag = NOTAG, - .vlr_proto = ETHERTYPE_VLAN, + .vlr_proto = NOPROTO, }; static void @@ -157,6 +158,8 @@ vlan_create(if_ctx *ctx, struct ifreq *ifr) errx(1, "must specify a tag for vlan create"); if (params.vlr_parent[0] == '\0') errx(1, "must specify a parent device for vlan create"); + if (params.vlr_proto == NOPROTO) + params.vlr_proto = ETHERTYPE_VLAN; ifr->ifr_data = (caddr_t) ¶ms; } ifcreate_ioctl(ctx, ifr); @@ -173,6 +176,8 @@ static void vlan_set(int s, struct ifreq *ifr) { if (params.vlr_tag != NOTAG && params.vlr_parent[0] != '\0') { + if (params.vlr_proto == NOPROTO) + params.vlr_proto = ETHERTYPE_VLAN; ifr->ifr_data = (caddr_t) ¶ms; if (ioctl(s, SIOCSETVLAN, (caddr_t)ifr) == -1) err(1, "SIOCSETVLAN"); @@ -196,8 +201,16 @@ setvlantag(if_ctx *ctx, const char *val, int dummy __unused) errx(1, "value for vlan out of range"); if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) { - vreq.vlr_tag = params.vlr_tag; - memcpy(¶ms, &vreq, sizeof(params)); + /* + * Retrieve the current settings if the interface has already + * been configured. + */ + if (vreq.vlr_parent[0] != '\0') { + if (params.vlr_parent[0] == '\0') + strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ); + if (params.vlr_proto == NOPROTO) + params.vlr_proto = vreq.vlr_proto; + } vlan_set(ctx->io_s, &ifr); } } @@ -230,8 +243,16 @@ setvlanproto(if_ctx *ctx, const char *val, int dummy __unused) errx(1, "invalid value for vlanproto"); if (ioctl_ctx_ifr(ctx, SIOCGETVLAN, &ifr) != -1) { - vreq.vlr_proto = params.vlr_proto; - memcpy(¶ms, &vreq, sizeof(params)); + /* + * Retrieve the current settings if the interface has already + * been configured. + */ + if (vreq.vlr_parent[0] != '\0') { + if (params.vlr_parent[0] == '\0') + strlcpy(params.vlr_parent, vreq.vlr_parent, IFNAMSIZ); + if (params.vlr_tag == NOTAG) + params.vlr_tag = vreq.vlr_tag; + } vlan_set(ctx->io_s, &ifr); } } diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh index 675ed0090e8c..458e3cc36bc6 100755 --- a/tests/sys/net/if_vlan.sh +++ b/tests/sys/net/if_vlan.sh @@ -22,8 +22,12 @@ basic_body() jexec alcatraz ifconfig ${epair_vlan}a up jexec alcatraz ifconfig ${vlan0} 10.0.0.1/24 up - vlan1=$(jexec singsing ifconfig vlan create vlandev ${epair_vlan}b \ - vlan 42) + vlan1=$(jexec singsing ifconfig vlan create) + + # Test associating the physical interface + atf_check -s exit:0 \ + jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 + jexec singsing ifconfig ${epair_vlan}b up jexec singsing ifconfig ${vlan1} 10.0.0.2/24 up @@ -37,7 +41,7 @@ basic_body() # And change back # Test changing the vlan ID atf_check -s exit:0 \ - jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 + jexec singsing ifconfig ${vlan1} vlan 42 vlandev ${epair_vlan}b atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1 } From nobody Fri May 24 20:48:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmHDg1j2Fz5LvcK; Fri, 24 May 2024 20:48: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmHDg18zkz4YGh; Fri, 24 May 2024 20:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716583683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBDwmhP4UhBqmkPyV2DmBKWQgFzjIBUXONw3KBewr1Q=; b=gXbFSejfbWWP4jAmkJ7dk8m6HMLd0d6w6KubbeT74bOl2nL3tgSYA0R6qIpeRQQn7bL8FC WqpiKZc5woalm6zDaae8I0a3caZgIGl5QggXcOuPDME2lE9eJsIvMaLS5wcLzPB5HMliBk HvvcQ5HHNRiUlYFTWAXWdxDr/RM/C6SUBf0pruxga8ggnixIjmpccW4+e8uaDWkKhqUXBq PXGM4nQZoPGMzZevo+4LObg8ChSOnFrqwLqIQ9G153HgbP/mDwagTCfS3kqx20o4ppgIHm dM5Zrgrj86DeNrFRtqduYzxy7mIPcCHQXF6DXdUHkI2wss35dWEvnNurD10BjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716583683; a=rsa-sha256; cv=none; b=OXkTVLyI+YrpabR+riFDyoPFjFVqNL4uIciRgm6Ze2TmjicLspS9iHfxRlo4neB+jF5BVY JqlrIQL0cwdgw0mb9wfw95SF+F2WO1Pe326l1kzRjeVxXNQZuRxzuLwNtMajLuLgBsShEB T0qaL63lTwPAyfemFsbHNppbngoD/g7maGbFzuCaMJdW1g8WELaqCzJ1GoVFrUlmN2weM2 Cl89NmvMUe5WyzrjkpDUhYZzbYTJcmetElbOYLINuoyiXYC1PxkcTP8ax9ec+rQLJrDLtv seGTO3IgQx9KQxvZknku1DY73k2uVR10N4pEKAJ+GSjj4D3g4zLin6KFy5ugYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716583683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qBDwmhP4UhBqmkPyV2DmBKWQgFzjIBUXONw3KBewr1Q=; b=aOEmPhXda0dtcyHT8FV3ZfOJ4dZ4NWQItkHAO0V174LFACJqqTY2CvZGLp0o8h5c9CUM4h k23Va4CplimpTJsJkB+sPXcnrAZBzqplnl5yo184HAmoL3TZB3WUxAO/rBRCYuXi0cwojA BBK06GSlppRWFP0LCEtz4LJm+Rk68dVB+08+8uj3NEiA+cvQCqX8jyhXO1GhkvsSg34zJu srk60Q7U8SfNs+OBMMmwGtlgGqhhQ7MgDUvC/TTdJKGB0onBNcUyK/I28yih1awG0/KmYt Orn7Q3DydaACcmsSnUG+ALmM+gq0Y0FxlFzu9pUoHfdXIOlrWpaghjNI70DkXw== 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 4VmHDg0f1Jznsd; Fri, 24 May 2024 20:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44OKm2Np030557; Fri, 24 May 2024 20:48:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44OKm267030554; Fri, 24 May 2024 20:48:02 GMT (envelope-from git) Date: Fri, 24 May 2024 20:48:02 GMT Message-Id: <202405242048.44OKm267030554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: 61639bb3fc5a - main - libc: move NIS xdr_* symbols from rpc's to yp's Symbol.map List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 61639bb3fc5abe0bb7b096e643b51c30703ac432 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=61639bb3fc5abe0bb7b096e643b51c30703ac432 commit 61639bb3fc5abe0bb7b096e643b51c30703ac432 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-24 17:27:29 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-24 20:47:37 +0000 libc: move NIS xdr_* symbols from rpc's to yp's Symbol.map To fix WITHOUT_NIS build. Building yp_xdr.c is gated by MK_NIS. PR: 279270 Reported by: peterj Reported by: matteo Reported by: Michael Dexter's Build Option Survey run Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45347 --- lib/libc/rpc/Symbol.map | 31 ------------------------------- lib/libc/yp/Symbol.map | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map index 5bf364f28d81..e4fecb83ec66 100644 --- a/lib/libc/rpc/Symbol.map +++ b/lib/libc/rpc/Symbol.map @@ -8,37 +8,6 @@ FBSD_1.0 { xdr_desargs; xdr_desresp; - /* From yp_xdr.c (generated by rpcgen - include/rpcsvc/yp.x) */ - xdr_domainname; - xdr_keydat; - xdr_mapname; - xdr_peername; - xdr_valdat; - xdr_ypbind_binding; - xdr_ypbind_resp; - xdr_ypbind_resptype; - xdr_ypbind_setdom; - xdr_ypmap_parms; - xdr_ypmaplist; - xdr_yppush_status; - xdr_yppushresp_xfr; - xdr_ypreq_key; - xdr_ypreq_nokey; - xdr_ypreq_xfr; - xdr_ypreqtype; - xdr_yprequest; - xdr_ypresp_all; - xdr_ypresp_key_val; - xdr_ypresp_maplist; - xdr_ypresp_master; - xdr_ypresp_order; - xdr_ypresp_val; - xdr_ypresp_xfr; - xdr_ypresponse; - xdr_ypresptype; - xdr_ypstat; - xdr_ypxfrstat; - authdes_seccreate; authdes_pk_seccreate; authnone_create; diff --git a/lib/libc/yp/Symbol.map b/lib/libc/yp/Symbol.map index fff2b2e60e39..f50beed7be31 100644 --- a/lib/libc/yp/Symbol.map +++ b/lib/libc/yp/Symbol.map @@ -18,4 +18,36 @@ FBSD_1.0 { yperr_string; ypprot_err; _yp_check; + + /* From yp_xdr.c (generated by rpcgen - include/rpcsvc/yp.x) */ + xdr_domainname; + xdr_keydat; + xdr_mapname; + xdr_peername; + xdr_valdat; + xdr_ypbind_binding; + xdr_ypbind_resp; + xdr_ypbind_resptype; + xdr_ypbind_setdom; + xdr_ypmap_parms; + xdr_ypmaplist; + xdr_yppush_status; + xdr_yppushresp_xfr; + xdr_ypreq_key; + xdr_ypreq_nokey; + xdr_ypreq_xfr; + xdr_ypreqtype; + xdr_yprequest; + xdr_ypresp_all; + xdr_ypresp_key_val; + xdr_ypresp_maplist; + xdr_ypresp_master; + xdr_ypresp_order; + xdr_ypresp_val; + xdr_ypresp_xfr; + xdr_ypresponse; + xdr_ypresptype; + xdr_ypstat; + xdr_ypxfrstat; + }; From nobody Fri May 24 23:55:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmMP40Jq4z5LYYp; Fri, 24 May 2024 23:55: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmMP363Wjz4snX; Fri, 24 May 2024 23:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716594935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEZsWcM//4A6MTk1VT6ukuq4Z997D4xErQc0FvBlNnw=; b=JIw1ZTiIoz/2qScZucW3Jviyce2ldyMSQQACN+exFrXPbmk1tZG93LdXjcMFLN7ZcKR2Fj vToFcyqeFFSi3zSdmziBPshIPG5ZdDrZRKc6ADYqeu1pGdYxPXGPyXggb8MDKR0nat1s+y PLYJQUPyOBpRQxUY1ugklqatDMQ7QRrY3bpKTR+8i04fxrY8b6xqILwgjd1qpXfu9xHTGK a2MHYF1yy3v8WkXcqsgIfM45dJubnthyUBPJq/jhKhoxhc9cZaSyze5vc+UlIcvUJhNmv2 rzwn8E0WV1l7qqJNGUQYVP3b7PiiNqiPRRb8+aXQIKQyPmwyJU6kPdpBq6P1fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716594935; a=rsa-sha256; cv=none; b=vRyS1Eig0OVkmVDnPgtlKrNJPZ8nsVNOyJFNsa4Xd5iv7Oyb/pnkWtgPbAjS4knghwhNvp rhPrJcLrbNhOCO7DWuQ8YZD4A/NlSeDhUWBtktys+JaCB6mCLUKJQUcoq86lQNrZGRy5Kk 1yB4NIlRDqPh9FsaPM8BdRvKP0b4YZVBYM+HvzS4xxEnZugwMyjrW4QhdyNtW8nfEkagjS Zt3ntnoGmyRTCCJRo70DgMJjvAUFAPuGTOFk8Eae8J6SlMTMho1F+ziLHJxlXD9S6fHuSs Tey9ICvJI/N/z8QVYRifYWL75ikJO+9r/a94Q7UIjdM5SE0LqJ2++Ieo5R+TMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716594935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tEZsWcM//4A6MTk1VT6ukuq4Z997D4xErQc0FvBlNnw=; b=gfGfJAgnFYP0eWLkdaGt+pJ3vouTmJApyyb2HS/AiUVGM+iixQbjO5iz7Bi5OCoOj+N+2r b91U5iCF6YlJTLU25Sp6A59rB37AugVB99Z2/lnHR8x6hrFdE8BorXB3xVEedkLVrTBRL7 +YR7G4eXLEBzkvFlwesRgyZA56mAaN1I0Ef2X0zmTwUv0T3TjdKvIEZ5jwjRUat+n/N+1U W2aYTOHpcQoYngyqSpuzEgaF10myPvc+bDT3tG9OJgZ8s9jYD/MyAX/u2qOdgqNFdQhQYU Jy0BYn7ulAJv5t6iFo4e7FL+cOpAdFsPFDhEQ5fPsIPVGMXIX93CnAwbDab8yw== 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 4VmMP35YVQztn6; Fri, 24 May 2024 23:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ONtZ2G049989; Fri, 24 May 2024 23:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ONtZal049986; Fri, 24 May 2024 23:55:35 GMT (envelope-from git) Date: Fri, 24 May 2024 23:55:35 GMT Message-Id: <202405242355.44ONtZal049986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: f52481f3b8a3 - main - vt(4): add note about sc/UEFI incompatibility List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f52481f3b8a377e336ecba1b5150023a344ec189 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f52481f3b8a377e336ecba1b5150023a344ec189 commit f52481f3b8a377e336ecba1b5150023a344ec189 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-24 21:45:14 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-24 23:55:10 +0000 vt(4): add note about sc/UEFI incompatibility syscons is not compatible with UEFI boot. This is noted in syscons(4), but not mentioned in vt(4) where the kern.vty tunable (used to select vt or sc) is documented. Add a note so that if someone reads vt(4) but not sc(4) they are not surprised by having no usable console. PR: 276206 Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45357 --- share/man/man4/vt.4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index ed4da98df673..45e6c0ceb979 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 8, 2023 +.Dd May 24, 2024 .Dt "VT" 4 .Os .Sh NAME @@ -220,6 +220,11 @@ The kernel uses .Nm when this value is not set. +Note that +.Ql sc +is not compatible with +.Xr UEFI 8 +boot. .It Va kern.vt.color. Ns Ar colornum Ns Va .rgb Set this value to override default palette entry for color .Pa colornum From nobody Fri May 24 23:59:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmMTS28xgz5LZ0m; Fri, 24 May 2024 23:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmMTR6vj2z4tCS; Fri, 24 May 2024 23:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716595164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0gilGHBDgXo62t+7ROHTbhTD+2pOG7VDkPrcqRrj8e0=; b=TwATDbNPz9s1sxujJpSUBm/MQAnt2qCSo3OA0QqtWYyUO3lQ2OeTHXEXOV/7Yqq3fIcAMX 11A/fdcUcAYkx9jIBYSvpYgKP9IFvreEFnMitQdIZ5gQee95tUt1aIt6EVbPugyzuqgP2H XP6gsu997vRU5C4SfCfQAGczw+DBafLqBEgbGwxahR5cdd3QPDHg9MS+71qVmYDGKWQHTL ChJtmWjtPShk9PUkR/y7A1CSMU8isfNICR8g13+LlaKNC8aLmKdFvOGGJJSp8AsnIYm02J HgXfgvpWQBvx0rYm9TJT1OJuyC1+KS70WFFS4G5Th/khCHl6hmk+fPBT3vB+MQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716595164; a=rsa-sha256; cv=none; b=xpWqI6ngDYJsbbwEgD6XsxHNtam4UUAWJCsW7U1qAbxMK+7wwIKVd5/dR6PlLQxxTJou+1 2CQXia7dx495DPGfZoPxMPGs4dqhRryXgYJEzLSViRFf5iiv5vQTDiCeDxqSs1haPVxD67 3q2fqPJk7sFBZRMm5D+nPMXYMphK0HUa+8WL4xdBYV7u2l0GiJR3kaifaK2bPxONr5LVDs KB9vtTH7EoBdPDe02qo1llhAGOfcc9NlbzCSo0Sz5oRO/dkEPEkSAqkp54bOwrqo5hCvXS 07NK6DxbdlMdaLFq0FLJ5iMj2ZA5aKxM/KYBOu1eveLgva82yF4awMeRUEq3tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716595164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0gilGHBDgXo62t+7ROHTbhTD+2pOG7VDkPrcqRrj8e0=; b=ekz53rSQ87XFKe6KnOp/2ymOpxccb4DCVr68T6oFfom4JRbj2fyPOAPAN0Uy2GFRD6sgpH uLGjhfD+LduqIqU9ib3CjngjqsPv89udjRpIwO1aGF3x1cEEH8cWByPZjm3R6muRMbMJyp oVFcdj2EvR+tEoXYeXaCLE/3r5O7IGXDEybVeAflNcZ4jfmhK+tu4EhPQ6fQcEkqJD+oR9 G0Ra5MqAysQ8BfNfYu5G4X5HfnPWf4lGALpbrhkvKCgTg34mZ1MgOwexpvbi4F4m9R0wnA 14fIsL5YeytRO8gjSy/8gZ+q1jg6jad9nDiUzJEAI4DoAr3yp+jWhXx0t3f0tg== 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 4VmMTR6P3Bztn9; Fri, 24 May 2024 23:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44ONxNTM050614; Fri, 24 May 2024 23:59:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44ONxNeY050611; Fri, 24 May 2024 23:59:23 GMT (envelope-from git) Date: Fri, 24 May 2024 23:59:23 GMT Message-Id: <202405242359.44ONxNeY050611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: 1b7672ed9929 - stable/14 - diff: honour -B flag with -q List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1b7672ed992963e1c79ccc152f4afd72c91481f3 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1b7672ed992963e1c79ccc152f4afd72c91481f3 commit 1b7672ed992963e1c79ccc152f4afd72c91481f3 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-16 14:53:23 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-24 23:59:11 +0000 diff: honour -B flag with -q PR: 278988 Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45220 (cherry picked from commit fb623aab3927a6825ff7731198ec2e33426f7607) --- usr.bin/diff/diffreg.c | 3 ++- usr.bin/diff/tests/diff_test.sh | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 8042003cd836..ffb3f90beede 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -383,7 +383,8 @@ diffreg(char *file1, char *file2, int flags, int capsicum) } if (diff_format == D_BRIEF && ignore_pats == NULL && - (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE|D_STRIPCR)) == 0) + (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE| + D_SKIPBLANKLINES|D_STRIPCR)) == 0) { rval = D_DIFFER; status |= 1; diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 66596bae8a46..c29c0a93d5d8 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -11,6 +11,7 @@ atf_test_case brief_format atf_test_case b230049 atf_test_case stripcr_o atf_test_case b252515 +atf_test_case b278988 atf_test_case Bflag atf_test_case Nflag atf_test_case tabsize @@ -89,6 +90,14 @@ b252515_body() diff -qw b252515_a.in b252515_b.in } +b278988_body() +{ + printf 'a\nb\nn' > b278988.a.in + printf 'a\n\nb\nn' > b278988.b.in + atf_check -o empty -s eq:0 \ + diff -Bw b278988.a.in b278988.b.in +} + header_body() { export TZ=UTC @@ -365,6 +374,7 @@ atf_init_test_cases() atf_add_test_case b230049 atf_add_test_case stripcr_o atf_add_test_case b252515 + atf_add_test_case b278988 atf_add_test_case Bflag atf_add_test_case Nflag atf_add_test_case tabsize From nobody Sat May 25 04:18:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTDV6VtDz5M4Mq; Sat, 25 May 2024 04:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmTDV5WWQz4DR2; Sat, 25 May 2024 04:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716610714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8v1eREaCVd7SyQWuxkCVtqcHV0wgPEHAuAZGwrs2K3E=; b=hLKDqzB4Sc8pFYQbAcZprLUeqIxHuFvsYyLhRakT2RtLTKsHgHY4doRCjjAokAs+Z7kJil aKS3XeJfK7me+wZvz2YNoB6SIOhgO8pDLZOpdJzYMACxvkmMKODZlILcDBVZ9uxEmdLatK QcdxtNFVjDTqO+rkf6QXw7hG2EClp88/mMLvi+nJJtNcEY3qmipmXWlVxyK6ihjdyVWjcF cL0n0R6WfzTcB/K5GwKYJORk3fDzbbyOrONOG+b4IFhrDLUxDpxuYFWfP8yj4JYMoMe0rm tnKP38CgJp7/4Ar7Uh8YvlNkLdJFNLGJKrE4qXVOzH2/0U2Fa0/EOd160SagjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716610714; a=rsa-sha256; cv=none; b=VtrrQgWX+SNIeKD0pzAgglCBxMf2/MBVzBZvVSntVYnIl+OQEMLE8rRTkSEEQRQ7DCad2E z8Ddk/9Qimd4r1++Wm7KzlYiTOHaURCHn+k/88KpBB/AtG2sNjzzu4VsGj3FZbWUu70vy8 JRaOdOvTPeugPWhhbWNGnkqschtl4eM8xGcSqpKnJLsM6s8wC3KP0Bb/tJPY//AQLu7J38 8t+S52ob2jprMrMNKHm92VSAKv1q0xd4r36WB/GLZA8t9ASFZQ8rt4VurWhxe8Da+HS+Z8 Hd368n+GR3pcqnM1CDuwVet325zkXfsvB1pwVxIqOPgQHrGlS4+vx1kNHDFeiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716610714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8v1eREaCVd7SyQWuxkCVtqcHV0wgPEHAuAZGwrs2K3E=; b=jGSSca1iQOtucu8NPld2tH4Eyqf1+khQhlW53nSGdS79rIN24w+MVA8OHf9FKfUYsinWW9 UD2KBzjsMa9PEcLh2jlW8h8OQxdbKA+kKNxWL9Ibuw7bB8t71lVCZCK/RZgkzbzdS7NLzi b7uxj/3RJkUrex9zVf1qyyWJa6u60B8+IfAz5Ntyd6EvlS/zgVcOWONE8YIDLhek1NRTDu TxFDOSQj8FeZk7pkJ7Hlw/XWJlkJc1cPrF76tJXds5onhNe/RXbM2H4g43Kk185AthI2rH qC1Gj9BN/aARvVbI0MNhKfUIvWTL+pl1TQXDhuamiaiHoMOPHGqBHAD0uXMbdQ== 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 4VmTDV57csz12CC; Sat, 25 May 2024 04:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44P4IYDE094873; Sat, 25 May 2024 04:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4IYOM094870; Sat, 25 May 2024 04:18:34 GMT (envelope-from git) Date: Sat, 25 May 2024 04:18:34 GMT Message-Id: <202405250418.44P4IYOM094870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 0cc8506c5124 - main - dhclient: remove unused primary_address List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0cc8506c512481cf08af70c1c726062debbd70b1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0cc8506c512481cf08af70c1c726062debbd70b1 commit 0cc8506c512481cf08af70c1c726062debbd70b1 Author: Franco Fichtner <franco@opnsense.org> AuthorDate: 2024-05-24 15:55:59 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:17:08 +0000 dhclient: remove unused primary_address Its last use was removed in 396c7521364. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1257 Differential Revsiion: https://reviews.freebsd.org/D42717 --- sbin/dhclient/dhcpd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 399b5c1ecf6c..a80c5bd8f23e 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -199,7 +199,6 @@ struct client_state { struct interface_info { struct interface_info *next; struct hardware hw_address; - struct in_addr primary_address; char name[IFNAMSIZ]; int rfdesc; int wfdesc; From nobody Sat May 25 04:25:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTN63hL8z5M4rB; Sat, 25 May 2024 04:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmTN62q37z4F5s; Sat, 25 May 2024 04:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUS4iE4dOXZZOn9rQKJuVf9LURb2Ke3t36fXKlGYpGw=; b=fzsf14ukn1Kmt2peVMZkusGczt2hbgBiJKkljTTuQ8wZOEesMzKAsuI2/XpFrh4cUs8dBJ uCaCLtKAwNSWHdOgbCo4+forfeJgYBMi1dAdlyNNT+edJ1/25JB7OzaS9aaK2qNlX4Qg3M g3YZOhNu2WsRBY1FKpj4clkKbzSaj79wYXE/1/WBPkptrv86JGirICYmuvmUIbQd1YSEMY s9nNHvmsSWsksldt3woNyTsL9mWruoMs+pWE+fN42x/PLxeRjejsLRFF14KtLi1+pYYnbi xqHyvUzd/mY09yHyV7Wce9+6q1UpBwsh+xvYd8Zoo9Jh4yJmMAubWWF/jxUfsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716611110; a=rsa-sha256; cv=none; b=LdG/tF3WbkiK1oWmr6J4rV8GdCir6LeMx4pyjaXebOcxvsGgX4Guw0O0oNMF1h67+7pR9z idhurywws1A10EgZLfOsErOzRg7JRwt2MrKPdfjRWMqqTTf5QYX9Bu8nqBx79zl28be3yR rD+GKhnTLAHGRbcwyJgRMCxZYQDAq9r6mvOwCb4HjnGYCxDdlH0ufkVQVrbLnLe0ME5F+k o46toqYKTQaTmUHrASF0vI/5ephZbyUwbYipYR30U2ODfctbmmhrToxjy/WjKt37efs8k9 yQwUIxFBPnRPugu+n2Px7YVQSenGEnMuimJh39mATv4Pg8Yp7YR8yLMQkM5DhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUS4iE4dOXZZOn9rQKJuVf9LURb2Ke3t36fXKlGYpGw=; b=kZIkWmsZXF4EpgKeY0AYSf+UBpMg5bC1eLANm0KqLvDCG8U0LQ7UElk5rGyfimTsrLQXsj gzqqaUqG0T9p001DYMcFkW+XgtWBw+nhx9Mp1N0xik1u5tbJHznUicF83cyLeulKZafpMy 3pW/YVU4/ZZUVao0dcJdpVni6vCYRghToMvUyAYaYwXGRflOgzwIEbYOI6zWnaTCr9Z0oE zatswviUEeBkMgm395poLbIosVn6Gkqb4QDwoMuTHLOhCRr+7SjPn47U0TnGIXUTda3+EK Rik71GZtsUzuxEvCBZupWUg8V2wdSuUEbqMZ8xDO8BOdtmlqSunCJzIh4ciB3A== 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 4VmTN62QXVz12bC; Sat, 25 May 2024 04:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44P4PA6J010789; Sat, 25 May 2024 04:25:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4PA62010786; Sat, 25 May 2024 04:25:10 GMT (envelope-from git) Date: Sat, 25 May 2024 04:25:10 GMT Message-Id: <202405250425.44P4PA62010786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: 0e2ce866278b - main - ipfw: don't build the module if INET not in kernel List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 0e2ce866278bdaf0764db4578f5793283dd9afa4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e2ce866278bdaf0764db4578f5793283dd9afa4 commit 0e2ce866278bdaf0764db4578f5793283dd9afa4 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-24 00:32:49 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:21:24 +0000 ipfw: don't build the module if INET not in kernel Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1255 --- sys/modules/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index ad274e7f7b47..54108097fe1d 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -490,7 +490,7 @@ _sctp= sctp _if_stf= if_stf .endif -.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) +.if (${KERN_OPTS:MINET} && ${MK_INET_SUPPORT} != "no") || defined(ALL_MODULES) _if_me= if_me _ipfw= ipfw .if ${MK_INET6_SUPPORT} != "no" || defined(ALL_MODULES) From nobody Sat May 25 04:25:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTN74dHLz5M5GS; Sat, 25 May 2024 04:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmTN73STbz4FPj; Sat, 25 May 2024 04:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZ6dRAgEM+9AJntKIbEfZXyIWFVnrow6KA+CtLzHcN4=; b=DlKD9aEGN47gWCiaIlxwlBP8d4DPJJMh6kmzx7s9MARU8Vxtx85pk5PKSA816YUUBc+lbu 9kYleGrb6UZYhKHwEbt4zAi7tdAjJUayOOwzpjWi58fEXsijRdLAHNXmZ9UxsSxtI6o0CA D4clqPFQZ0oM8BVd04YyY5VoxPaJKRj4eJXsS/KP5cjWPXWPXHoEo4uAGdDCT9k0NCGM0K BubKWzzmq2xDFAO9C9N78Dzm0mz3VdP1PMmNDK0fIqJJUwfOla9t3yWljCEb0kZ5zExdRq kmBz4iXsUzeoMuvy+dVUrjX2M/aAl01ql1kY1FMwBaDs8sBdHijIJ1MuOntxXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716611111; a=rsa-sha256; cv=none; b=pfv1o0VaJ5bQxW2KKlSWZvItMeSsib/LJolu837b7iz1mzAe6Tz1YSt8hteyvgyj++4tqB lHmpO3tokw8WO+iqXPuP+PqVTeKvrAq7TpufG5c/+jgL67ZXBqmCdd4gw8ezZs4kzrDZq0 OCG9/ZvG4XccUfWdRJ9ss8WMT/Z6PMSo1LwlAl4R/Jrk6r/uvBVJzyqRq4dYr1hHB0skTV YjO9xXTzKsE0xZaka5kK3JuisnXmR1Yhb9tPyaSAah4G44VS6JBXXKLmOzOExDmRmXBCjE 5YHapTYeOqPNakGzRqEGPc74fzpPpVdme8NSy6VP+CgIs6xT3ePl5HEiQ0srTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZ6dRAgEM+9AJntKIbEfZXyIWFVnrow6KA+CtLzHcN4=; b=Qm1Y+SMdzwwAoq3/WQTzpeROzWlYHKUQpT4sXOAUwXd1dcYeObZwR8eUab6MyLbWHzV7C8 bWIK5/Jm5nOSUFfcPsp0qapN1A8lojbzmoTK82bK9LRqX2gH5w8/ZcJGHmT6E+fV0d9AQr TTkIeUqUa36XBmrCqiAx137v/u5O4WHvvzGrQemvn4zpA9JynysYq986508MbVrxXewA7m CCgIC3k4+Uy7fhuvpFEYO9kFRD7DopuyQOrbw8f3ic1wZSDlFMdYeRIr3P+9hQKZV1jdFS ubTxzauil8/2sqeNG9+2/7iJVPG/epRMWOtjLYOFgVurVgoaVNdVgtOnF9vb3g== 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 4VmTN734rdz12Z4; Sat, 25 May 2024 04:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44P4PB1K010829; Sat, 25 May 2024 04:25:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4PB4N010826; Sat, 25 May 2024 04:25:11 GMT (envelope-from git) Date: Sat, 25 May 2024 04:25:11 GMT Message-Id: <202405250425.44P4PB4N010826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: bfd248f59de3 - main - sys/amd64/conf/LINT-NOINET{6,}: don't set WITHOUT_INET{6,}_SUPPORT List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: bfd248f59de39715b28a469bcba39427a42a5383 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bfd248f59de39715b28a469bcba39427a42a5383 commit bfd248f59de39715b28a469bcba39427a42a5383 Author: Lexi Winter <lexi@le-Fay.ORG> AuthorDate: 2024-05-24 00:14:11 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:21:25 +0000 sys/amd64/conf/LINT-NOINET{6,}: don't set WITHOUT_INET{6,}_SUPPORT Previously, it was necessary to set WITHOUT_INET_SUPPORT when building the kernel without INET, and WITHOUT_INET6_SUPPORT when building the kernel without INET6, or else the modules build would fail. The LINT-NOINET and LINT-NOINET6 configs did this using makeoptions. After recent changes, this is no longer required, so remove these makeoptions. This avoids masking potential future build issues when these aren't set. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1255 --- sys/amd64/conf/LINT-NOINET | 3 --- sys/amd64/conf/LINT-NOINET6 | 1 - 2 files changed, 4 deletions(-) diff --git a/sys/amd64/conf/LINT-NOINET b/sys/amd64/conf/LINT-NOINET index 3f2246001b72..f5e704f6c071 100644 --- a/sys/amd64/conf/LINT-NOINET +++ b/sys/amd64/conf/LINT-NOINET @@ -1,7 +1,4 @@ include LINT ident LINT-NOINET -makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT=" nooptions INET -nodevice gre -nodevice netmap diff --git a/sys/amd64/conf/LINT-NOINET6 b/sys/amd64/conf/LINT-NOINET6 index e314ad1b01ec..041916883277 100644 --- a/sys/amd64/conf/LINT-NOINET6 +++ b/sys/amd64/conf/LINT-NOINET6 @@ -1,5 +1,4 @@ include LINT ident LINT-NOINET6 -makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT=" nooptions INET6 From nobody Sat May 25 04:35:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmTbk69Nlz5M67q; Sat, 25 May 2024 04:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmTbk1HCfz4GQH; Sat, 25 May 2024 04:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huZwXcrh4ivBbRr3XBTbFz0rRk61nx4wCOJwV/kQ7oM=; b=GPy1iISvs60hC1xDA+nOQNFIROOtGtvxVrTBpgr2UdylXUlxunpMLxuC5ZU4r/cEqUEMAd cVSJkdiOfiaTVlWLW+SER5XAPq6XhOlGyjOQS5rnwzkMZW611S6lAHz7jpXiPKeslp6Sdc GWXc5RfY9MKcZmbQzeRMRXWvTzZBCy09vi6OgDFjYVkVT9ITVXUAuvMBEEu/gPdOcdXCoI 9LNLQgcHWO6GvB4Z0biaO6Vy8AV4oms0hr2acTOVBQG9aYnozDX1k7f6MUII5PxONdLzPi xPT1J6PCyO82zuwrgonAL0yK/PIPn1bhSdrhA9H/7xd8+OJAT2lfNyr03nz/6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716611714; a=rsa-sha256; cv=none; b=NSBeqtKIuycPSqr9LR92PJZvJr3aBvkQ82I/Oc6Q603a7ypeTvUF+X08aNV/lUsvh0Qdj6 rTufDeQEF9sxjMsJ7x+zWkYXBbIe+5RuXmwO+Y+Plh4/hBDY7w2+XsdyV99voMNSyszVdl RiF7TR+OmE/W6UpW2JJ2c3YN+Ho6OmyZf80Uhi9DM56U9rhX8sBGaIPEZ579KmAWgrxMC+ UzhIElnPFaCRZKhhFqmu6zl07GRgqMasJEp13+iFbcUOxpQP7XLPC/XffUBeiLtvy4HHee Xni9uBBdYV1g8Y59IzrInvO6smdrJsaKUFBy427cwL3wdMbZ+k6NrvozBIct0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716611714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huZwXcrh4ivBbRr3XBTbFz0rRk61nx4wCOJwV/kQ7oM=; b=tomMc5UEzBlXS/HKCASURXnaKNZW3F3qBS6n9fbQ8yl7idVFNob5f4SR7ALomnjeT8B7gE dvCMrNmGnqXoh3nRY8tXRvoErnHqBp0mexFuE++rzlh5e3POJicjU8OqTTsB+B3TCeilbV L/AiON4tBtz4hbg285Wtm11XSW9aZJ1mtYb44K0pd6ObGvfjGb0ezHg9w4j8Dlmg5IYIfq iOxPN3mGQgMWjKGFtxuWq0ZcDu7dO6rhW73GqWpDYIrxBHW3dVW2sOWv7VOspEf18BNEtG BiuFSA2vQTUVzKBtnf4fkp1YUwZa5LJqIvluclW8EdqQ1wed1tHPv5hnO+LG2w== 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 4VmTbk0tybz13BF; Sat, 25 May 2024 04:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44P4ZEdp027213; Sat, 25 May 2024 04:35:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P4ZEXm027210; Sat, 25 May 2024 04:35:14 GMT (envelope-from git) Date: Sat, 25 May 2024 04:35:14 GMT Message-Id: <202405250435.44P4ZEXm027210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh <imp@FreeBSD.org> Subject: git: ff92493a4f65 - main - netlink: Fix C++ compile errors List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ff92493a4f6504c49a6c84ec65053f493ff5d708 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ff92493a4f6504c49a6c84ec65053f493ff5d708 commit ff92493a4f6504c49a6c84ec65053f493ff5d708 Author: cnbatch <cnbatch@gmail.com> AuthorDate: 2024-05-17 13:09:44 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-25 04:31:42 +0000 netlink: Fix C++ compile errors Allow these files to be included in C++ programs with careful casting to the proper type, like C++ wants (and in a way that also works for C). MFC After: 1 week Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1245 --- sys/netlink/netlink_snl.h | 33 +++++++++++++++++---------------- sys/netlink/netlink_snl_route.h | 2 +- sys/netlink/netlink_snl_route_parsers.h | 10 +++++----- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 7550800bb0f7..7151f6221fca 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -63,7 +63,7 @@ #define _NLA_END(_start, _len) ((char *)(_start) + (_len)) #define NLA_FOREACH(_attr, _start, _len) \ - for (_attr = (_start); \ + for (_attr = (struct nlattr *)(_start); \ ((char *)_attr < _NLA_END(_start, _len)) && \ ((char *)NLA_NEXT(_attr) <= _NLA_END(_start, _len)); \ _attr = NLA_NEXT(_attr)) @@ -80,7 +80,7 @@ struct linear_buffer { static inline struct linear_buffer * lb_init(uint32_t size) { - struct linear_buffer *lb = calloc(1, size); + struct linear_buffer *lb = (struct linear_buffer *)calloc(1, size); if (lb != NULL) { lb->base = (char *)(lb + 1); @@ -102,7 +102,7 @@ lb_allocz(struct linear_buffer *lb, int len) len = roundup2(len, alignof(__max_align_t)); if (lb->offset + len > lb->size) return (NULL); - void *data = (void *)(lb->base + lb->offset); + char *data = (lb->base + lb->offset); lb->offset += len; return (data); } @@ -275,7 +275,7 @@ snl_init(struct snl_state *ss, int netlink_family) } ss->bufsize = rcvbuf; - ss->buf = malloc(ss->bufsize); + ss->buf = (char *)malloc(ss->bufsize); if (ss->buf == NULL) { snl_free(ss); return (false); @@ -495,7 +495,8 @@ snl_parse_header(struct snl_state *ss, void *hdr, int len, struct nlattr *nla_head; /* Extract fields first (if any) */ - snl_parse_fields(ss, hdr, parser->in_hdr_size, parser->fp, parser->fp_size, target); + snl_parse_fields(ss, (struct nlmsghdr *)hdr, parser->in_hdr_size, + parser->fp, parser->fp_size, target); nla_head = (struct nlattr *)(void *)((char *)hdr + parser->in_hdr_size); bool result = snl_parse_attrs_raw(ss, nla_head, len - parser->in_hdr_size, @@ -639,7 +640,7 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla, { int maxlen = NLA_DATA_LEN(nla); - char *buf = snl_allocz(ss, maxlen + 1); + char *buf = (char *)snl_allocz(ss, maxlen + 1); if (buf == NULL) return (false); buf[maxlen] = '\0'; @@ -656,7 +657,7 @@ snl_attr_copy_string(struct snl_state *ss, struct nlattr *nla, char *tmp; if (snl_attr_get_string(ss, nla, NULL, &tmp)) { - strlcpy(target, tmp, (size_t)arg); + strlcpy((char *)target, tmp, (size_t)arg); return (true); } return (false); @@ -669,7 +670,7 @@ snl_attr_dup_string(struct snl_state *ss __unused, struct nlattr *nla, size_t maxlen = NLA_DATA_LEN(nla); if (strnlen((char *)NLA_DATA(nla), maxlen) < maxlen) { - char *buf = snl_allocz(ss, maxlen); + char *buf = (char *)snl_allocz(ss, maxlen); if (buf == NULL) return (false); memcpy(buf, NLA_DATA(nla), maxlen); @@ -698,14 +699,14 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla, uint32_t start_size, const void *arg, void *target) { const struct snl_hdr_parser *p = (const struct snl_hdr_parser *)arg; - struct snl_parray *array = target; + struct snl_parray *array = (struct snl_parray *)target; struct nlattr *nla; uint32_t count = 0, size = start_size; if (p->out_size == 0) return (false); - array->items = snl_allocz(ss, size * sizeof(void *)); + array->items = (void **)snl_allocz(ss, size * sizeof(void *)); if (array->items == NULL) return (false); @@ -735,7 +736,7 @@ snl_attr_get_parray_sz(struct snl_state *ss, struct nlattr *container_nla, if (count == size) { uint32_t new_size = size * 2; - void **new_array = snl_allocz(ss, new_size *sizeof(void *)); + void **new_array = (void **)snl_allocz(ss, new_size *sizeof(void *)); memcpy(new_array, array->items, size * sizeof(void *)); array->items = new_array; @@ -848,7 +849,7 @@ static const struct snl_attr_parser _nla_p_bitset[] = { static inline bool _cb_p_bitset(struct snl_state *ss __unused, void *_target) { - struct snl_attr_bitset *target = _target; + struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target; uint32_t sz_bytes = _roundup2(target->nla_bitset_size, 32) / 8; @@ -884,7 +885,7 @@ snl_attr_get_bitset_c(struct snl_state *ss, struct nlattr *nla, const void *arg __unused, void *_target) { const struct snl_hdr_parser *p = &_nla_bitset_parser; - struct snl_attr_bitset *target = _target; + struct snl_attr_bitset *target = (struct snl_attr_bitset *)_target; /* Assumes target points to the beginning of the structure */ if (!snl_parse_header(ss, NLA_DATA(nla), NLA_DATA_LEN(nla), p, _target)) @@ -1004,7 +1005,7 @@ parse_cmsg(struct snl_state *ss, const struct msghdr *msg, struct snl_msg_info * int len = cmsg->cmsg_len - ((char *)data - (char *)cmsg); const struct snl_hdr_parser *ps = &snl_msg_info_parser; - return (snl_parse_attrs_raw(ss, data, len, ps->np, ps->np_size, attrs)); + return (snl_parse_attrs_raw(ss, (struct nlattr *)data, len, ps->np, ps->np_size, attrs)); } return (false); @@ -1046,7 +1047,7 @@ static inline void snl_init_writer(struct snl_state *ss, struct snl_writer *nw) { nw->size = SNL_WRITER_BUFFER_SIZE; - nw->base = snl_allocz(ss, nw->size); + nw->base = (char *)snl_allocz(ss, nw->size); if (nw->base == NULL) { nw->error = true; nw->size = 0; @@ -1084,7 +1085,7 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) nw->hdr = (struct nlmsghdr *) (void *)((char *)new_base + hdr_off); } - nw->base = new_base; + nw->base = (char *)new_base; } return (true); diff --git a/sys/netlink/netlink_snl_route.h b/sys/netlink/netlink_snl_route.h index 619e769b1496..62055b2db417 100644 --- a/sys/netlink/netlink_snl_route.h +++ b/sys/netlink/netlink_snl_route.h @@ -100,7 +100,7 @@ snl_attr_get_ip(struct snl_state *ss, struct nlattr *nla, static inline struct sockaddr * parse_rta_via(struct snl_state *ss, struct rtattr *rta, int *perror) { - struct rtvia *via = NL_RTA_DATA(rta); + struct rtvia *via = (struct rtvia *)NL_RTA_DATA(rta); switch (via->rtvia_family) { case AF_INET: diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h index 7e4bcad4010b..256edfec297d 100644 --- a/sys/netlink/netlink_snl_route_parsers.h +++ b/sys/netlink/netlink_snl_route_parsers.h @@ -78,7 +78,7 @@ static const struct snl_field_parser _fp_p_mp_nh[] = { static inline bool _cb_p_mp_nh(struct snl_state *ss __unused, void *_target) { - struct rta_mpath_nh *target = _target; + struct rta_mpath_nh *target = (struct rta_mpath_nh *)_target; finalize_sockaddr(target->gw, target->ifindex); return (true); @@ -158,7 +158,7 @@ static const struct snl_field_parser _fp_p_route[] = { static inline bool _cb_p_route(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_route *target = _target; + struct snl_parsed_route *target = (struct snl_parsed_route *)_target; finalize_sockaddr(target->rta_dst, target->rta_oif); finalize_sockaddr(target->rta_gw, target->rta_oif); @@ -277,7 +277,7 @@ static struct snl_field_parser _fp_p_neigh_s[] = { static inline bool _cb_p_neigh(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_neigh *target = _target; + struct snl_parsed_neigh *target = (struct snl_parsed_neigh *)_target; finalize_sockaddr(target->nda_dst, target->nda_ifindex); return (true); @@ -326,7 +326,7 @@ static const struct snl_field_parser _fp_p_addr_s[] = { static inline bool _cb_p_addr(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_addr *target = _target; + struct snl_parsed_addr *target = (struct snl_parsed_addr *)_target; finalize_sockaddr(target->ifa_address, target->ifa_index); finalize_sockaddr(target->ifa_local, target->ifa_index); @@ -379,7 +379,7 @@ static const struct snl_attr_parser _nla_p_nh[] = { static inline bool _cb_p_nh(struct snl_state *ss __unused, void *_target) { - struct snl_parsed_nhop *target = _target; + struct snl_parsed_nhop *target = (struct snl_parsed_nhop *)_target; finalize_sockaddr(target->nha_gw, target->nha_oif); return (true); From nobody Sat May 25 05:32:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmVsb5sJDz5MBSK; Sat, 25 May 2024 05:32: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmVsb5XW8z4LxK; Sat, 25 May 2024 05:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716615139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3D2eX+F36+IpEXuyzNucn136ZpZcbn3pOw1XDFI8wys=; b=AFAFiYjrptn0TWK0wk0R309qXkarGqnAc+5vgEDWUaQ2pjMgSREiplnnA8I8mPifzmWV85 NTdEYdPJrqgbijpNM8qN0CsiQPkBhJZ9l0D+1Sj5wKZcTj2FdZhG0eLcMFBd+JH9utuANu nVnfCQclicKxzWIgU45HC8h/qzOL/DDyqAX98fwQdKvQwdXT9GVHnPQU6xa51a+JWbHXC6 bOPn2HLyINlw7gYourp8cy674kZX8+nX+sB/UH7/UFjrZUtD0Rdap4kfds1jFHh8jkVYVU wMpCCF0/wVg3LNh6Fded9SQ2PlHpeJKh+kaKYcMxvwALJY2cBQOaBy6F7A9gOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716615139; a=rsa-sha256; cv=none; b=os1worP+La2qrK0jiP0aaHUQWU7TeOIqO0RVQjJzfWC+d+Yu9CLEYMXr7R9WqDP4//2zMl aq7NEBKGXLjOnsL9Elj9+nASaqpJfPcmrRIlP10jYHWNGqkd+K6GVm1LJSUu1UJUeCRL0r sz/h1BLoUoe+wzTS9agOtk7DQaj+RobhdcgIzMhdF9fGZVtGiK+vzqSofssNsyIsgHUWZH NtzPY8kyHn8tVhvIdWhQFUAn6N6RL1IzZIKhHTSZPu4NOjwLJ4qLjPDQo3MQ0JQE5qg3sy uYHDoH+BhHfO6NPgosZZs2TFIRgKJhOXaOKd7JQiOokT0xUiwN/hDrE5ydrTVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716615139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3D2eX+F36+IpEXuyzNucn136ZpZcbn3pOw1XDFI8wys=; b=gIoIKqBwoKfD1NXZwr7x7DykQgzUOGwosXjCGPifvxxp9TBhFSwDoxTB5iNlJYFfxuq8e7 +/H99amBo2xy0OQNSpaS4cdlcFXOwPttxs6p9SOQl4Bz4TyZFiisny64jog5SFzobkclCx 8w2cBYp1Mxp6gqWQA7oN0ju/GJCWbl8b7p0+QUDkSL/napMsyEX/1q7t5q4jx89ofoRsZ9 GjMlY9vpQykdfaD7UZyaSpq5CmAoulo2eoB63ggi6SrZWiJCj0RJ8E61ycsyPi0M1T4d07 arCKSfzx67ngEq3cHcPtelqVUS7OsA4FkRGXPMlEqXWlkdgfs1suM0QJLA7KVg== 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 4VmVsb58Qyz140P; Sat, 25 May 2024 05:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44P5WJgg028918; Sat, 25 May 2024 05:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P5WJRs028915; Sat, 25 May 2024 05:32:19 GMT (envelope-from git) Date: Sat, 25 May 2024 05:32:19 GMT Message-Id: <202405250532.44P5WJRs028915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov <kib@FreeBSD.org> Subject: git: 40d951bc5932 - main - x86/iommu: extract useful utilities into x86_iommu.c List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 40d951bc5932deb87635f5c1780a6706d0c7c012 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=40d951bc5932deb87635f5c1780a6706d0c7c012 commit 40d951bc5932deb87635f5c1780a6706d0c7c012 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-25 00:47:26 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-25 05:32:01 +0000 x86/iommu: extract useful utilities into x86_iommu.c related to the page tables page allocation and mapping. Sponsored by: The FreeBSD Foundation Sponsored by: Advanced Micro Devices (AMD) MFC after: 1 week --- sys/conf/files.x86 | 1 + sys/x86/include/iommu.h | 1 + sys/x86/iommu/intel_ctx.c | 25 +++---- sys/x86/iommu/intel_dmar.h | 9 +-- sys/x86/iommu/intel_drv.c | 7 +- sys/x86/iommu/intel_fault.c | 1 + sys/x86/iommu/intel_idpgtbl.c | 77 ++++++++++---------- sys/x86/iommu/intel_intrmap.c | 3 +- sys/x86/iommu/intel_qi.c | 3 +- sys/x86/iommu/intel_quirks.c | 1 + sys/x86/iommu/intel_reg.h | 15 +--- sys/x86/iommu/intel_utils.c | 128 +++------------------------------ sys/x86/iommu/iommu_utils.c | 164 ++++++++++++++++++++++++++++++++++++++++++ sys/x86/iommu/x86_iommu.h | 62 ++++++++++++++++ 14 files changed, 302 insertions(+), 195 deletions(-) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 9439a46ce347..de698e82c823 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -352,6 +352,7 @@ x86/iommu/intel_intrmap.c optional acpi iommu pci x86/iommu/intel_qi.c optional acpi iommu pci x86/iommu/intel_quirks.c optional acpi iommu pci x86/iommu/intel_utils.c optional acpi iommu pci +x86/iommu/iommu_utils.c optional acpi iommu pci x86/isa/atrtc.c standard x86/isa/clock.c standard x86/isa/isa.c optional isa diff --git a/sys/x86/include/iommu.h b/sys/x86/include/iommu.h index a95480b53acc..98c6661aa8e3 100644 --- a/sys/x86/include/iommu.h +++ b/sys/x86/include/iommu.h @@ -7,6 +7,7 @@ #include <x86/include/busdma_impl.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> #endif /* !_MACHINE_IOMMU_H_ */ diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 49c87cf0b39f..baee0109e5a9 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -65,6 +65,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> static MALLOC_DEFINE(M_DMAR_CTX, "dmar_ctx", "Intel DMAR Context"); @@ -84,7 +85,7 @@ dmar_ensure_ctx_page(struct dmar_unit *dmar, int bus) /* * Allocated context page must be linked. */ - ctxm = dmar_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_NOALLOC); + ctxm = iommu_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_NOALLOC); if (ctxm != NULL) return; @@ -95,14 +96,14 @@ dmar_ensure_ctx_page(struct dmar_unit *dmar, int bus) * threads are equal. */ TD_PREP_PINNED_ASSERT; - ctxm = dmar_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_ZERO | + ctxm = iommu_pgalloc(dmar->ctx_obj, 1 + bus, IOMMU_PGF_ZERO | IOMMU_PGF_WAITOK); - re = dmar_map_pgtbl(dmar->ctx_obj, 0, IOMMU_PGF_NOALLOC, &sf); + re = iommu_map_pgtbl(dmar->ctx_obj, 0, IOMMU_PGF_NOALLOC, &sf); re += bus; dmar_pte_store(&re->r1, DMAR_ROOT_R1_P | (DMAR_ROOT_R1_CTP_MASK & VM_PAGE_TO_PHYS(ctxm))); dmar_flush_root_to_ram(dmar, re); - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); TD_PINNED_ASSERT; } @@ -114,7 +115,7 @@ dmar_map_ctx_entry(struct dmar_ctx *ctx, struct sf_buf **sfp) dmar = CTX2DMAR(ctx); - ctxp = dmar_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid), + ctxp = iommu_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid), IOMMU_PGF_NOALLOC | IOMMU_PGF_WAITOK, sfp); ctxp += ctx->context.rid & 0xff; return (ctxp); @@ -186,7 +187,7 @@ ctx_id_entry_init(struct dmar_ctx *ctx, dmar_ctx_entry_t *ctxp, bool move, ("ctx %p non-null pgtbl_obj", ctx)); ctx_root = NULL; } else { - ctx_root = dmar_pgalloc(domain->pgtbl_obj, 0, + ctx_root = iommu_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_NOALLOC); } @@ -272,7 +273,7 @@ domain_init_rmrr(struct dmar_domain *domain, device_t dev, int bus, "region (%jx, %jx) corrected\n", domain->iodom.iommu->unit, start, end); } - entry->end += DMAR_PAGE_SIZE * 0x20; + entry->end += IOMMU_PAGE_SIZE * 0x20; } size = OFF_TO_IDX(entry->end - entry->start); ma = malloc(sizeof(vm_page_t) * size, M_TEMP, M_WAITOK); @@ -601,9 +602,9 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid, func, rid, domain->domain, domain->mgaw, domain->agaw, id_mapped ? "id" : "re"); } - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); } else { - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); dmar_domain_destroy(domain1); /* Nothing needs to be done to destroy ctx1. */ free(ctx1, M_DMAR_CTX); @@ -703,7 +704,7 @@ dmar_move_ctx_to_domain(struct dmar_domain *domain, struct dmar_ctx *ctx) ctx->context.domain = &domain->iodom; dmar_ctx_link(ctx); ctx_id_entry_init(ctx, ctxp, true, PCI_BUSMAX + 100); - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); error = dmar_flush_for_ctx_entry(dmar, true); /* If flush failed, rolling back would not work as well. */ printf("dmar%d rid %x domain %d->%d %s-mapped\n", @@ -787,7 +788,7 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx) if (ctx->refs > 1) { ctx->refs--; DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); TD_PINNED_ASSERT; return; } @@ -809,7 +810,7 @@ dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx) else dmar_inv_iotlb_glob(dmar); } - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); domain = CTX2DOM(ctx); dmar_ctx_unlink(ctx); free(ctx->context.tag, M_DMAR_CTX); diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index e20144094c80..8289478aed19 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -238,16 +238,11 @@ iommu_gaddr_t pglvl_page_size(int total_pglvl, int lvl); iommu_gaddr_t domain_page_size(struct dmar_domain *domain, int lvl); int calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size, iommu_gaddr_t *isizep); -struct vm_page *dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags); -void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags); -void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, - struct sf_buf **sf); -void dmar_unmap_pgtbl(struct sf_buf *sf); int dmar_load_root_entry_ptr(struct dmar_unit *unit); int dmar_inv_ctx_glob(struct dmar_unit *unit); int dmar_inv_iotlb_glob(struct dmar_unit *unit); int dmar_flush_write_bufs(struct dmar_unit *unit); -void dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst); +void dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst); void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst); void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst); int dmar_disable_protected_regions(struct dmar_unit *unit); @@ -315,9 +310,7 @@ void dmar_quirks_pre_use(struct iommu_unit *dmar); int dmar_init_irt(struct dmar_unit *unit); void dmar_fini_irt(struct dmar_unit *unit); -extern iommu_haddr_t dmar_high; extern int haw; -extern int dmar_tbl_pagecnt; extern int dmar_batch_coalesce; extern int dmar_rmrr_enable; diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 7346162d1502..9a2fedf90b6a 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -67,6 +67,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> #ifdef DEV_APIC @@ -179,9 +180,9 @@ dmar_identify(driver_t *driver, device_t parent) return; haw = dmartbl->Width + 1; if ((1ULL << (haw + 1)) > BUS_SPACE_MAXADDR) - dmar_high = BUS_SPACE_MAXADDR; + iommu_high = BUS_SPACE_MAXADDR; else - dmar_high = 1ULL << (haw + 1); + iommu_high = 1ULL << (haw + 1); if (bootverbose) { printf("DMAR HAW=%d flags=<%b>\n", dmartbl->Width, (unsigned)dmartbl->Flags, @@ -490,7 +491,7 @@ dmar_attach(device_t dev) * address translation after the required invalidations are * done. */ - dmar_pgalloc(unit->ctx_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO); + iommu_pgalloc(unit->ctx_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO); DMAR_LOCK(unit); error = dmar_load_root_entry_ptr(unit); if (error != 0) { diff --git a/sys/x86/iommu/intel_fault.c b/sys/x86/iommu/intel_fault.c index e275304c8d51..59b482720cf1 100644 --- a/sys/x86/iommu/intel_fault.c +++ b/sys/x86/iommu/intel_fault.c @@ -54,6 +54,7 @@ #include <x86/include/busdma_impl.h> #include <x86/iommu/intel_reg.h> #include <dev/iommu/busdma_iommu.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> /* diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 929f8656d1eb..157afaec75ef 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -63,6 +63,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> static int domain_unmap_buf_locked(struct dmar_domain *domain, @@ -108,7 +109,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, iommu_gaddr_t addr) { vm_page_t m1; - dmar_pte_t *pte; + iommu_pte_t *pte; struct sf_buf *sf; iommu_gaddr_t f, pg_sz; vm_pindex_t base; @@ -117,28 +118,28 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, VM_OBJECT_ASSERT_LOCKED(tbl->pgtbl_obj); if (addr >= tbl->maxaddr) return; - (void)dmar_pgalloc(tbl->pgtbl_obj, idx, IOMMU_PGF_OBJL | + (void)iommu_pgalloc(tbl->pgtbl_obj, idx, IOMMU_PGF_OBJL | IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO); - base = idx * DMAR_NPTEPG + 1; /* Index of the first child page of idx */ + base = idx * IOMMU_NPTEPG + 1; /* Index of the first child page of idx */ pg_sz = pglvl_page_size(tbl->pglvl, lvl); if (lvl != tbl->leaf) { - for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) + for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) domain_idmap_nextlvl(tbl, lvl + 1, base + i, f); } VM_OBJECT_WUNLOCK(tbl->pgtbl_obj); - pte = dmar_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf); + pte = iommu_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf); if (lvl == tbl->leaf) { - for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) { + for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) { if (f >= tbl->maxaddr) break; pte[i].pte = (DMAR_PTE_ADDR_MASK & f) | DMAR_PTE_R | DMAR_PTE_W; } } else { - for (i = 0, f = addr; i < DMAR_NPTEPG; i++, f += pg_sz) { + for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) { if (f >= tbl->maxaddr) break; - m1 = dmar_pgalloc(tbl->pgtbl_obj, base + i, + m1 = iommu_pgalloc(tbl->pgtbl_obj, base + i, IOMMU_PGF_NOALLOC); KASSERT(m1 != NULL, ("lost page table page")); pte[i].pte = (DMAR_PTE_ADDR_MASK & @@ -146,7 +147,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, } } /* domain_get_idmap_pgtbl flushes CPU cache if needed. */ - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); VM_OBJECT_WLOCK(tbl->pgtbl_obj); } @@ -300,7 +301,7 @@ put_idmap_pgtbl(vm_object_t obj) rmobj = tbl->pgtbl_obj; if (rmobj->ref_count == 1) { LIST_REMOVE(tbl, link); - atomic_subtract_int(&dmar_tbl_pagecnt, + atomic_subtract_int(&iommu_tbl_pagecnt, rmobj->resident_page_count); vm_object_deallocate(rmobj); free(tbl, M_DMAR_IDPGTBL); @@ -322,9 +323,9 @@ static int domain_pgtbl_pte_off(struct dmar_domain *domain, iommu_gaddr_t base, int lvl) { - base >>= DMAR_PAGE_SHIFT + (domain->pglvl - lvl - 1) * - DMAR_NPTEPGSHIFT; - return (base & DMAR_PTEMASK); + base >>= IOMMU_PAGE_SHIFT + (domain->pglvl - lvl - 1) * + IOMMU_NPTEPGSHIFT; + return (base & IOMMU_PTEMASK); } /* @@ -343,18 +344,18 @@ domain_pgtbl_get_pindex(struct dmar_domain *domain, iommu_gaddr_t base, int lvl) for (pidx = idx = 0, i = 0; i < lvl; i++, pidx = idx) { idx = domain_pgtbl_pte_off(domain, base, i) + - pidx * DMAR_NPTEPG + 1; + pidx * IOMMU_NPTEPG + 1; } return (idx); } -static dmar_pte_t * +static iommu_pte_t * domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, vm_pindex_t *idxp, struct sf_buf **sf) { vm_page_t m; struct sf_buf *sfp; - dmar_pte_t *pte, *ptep; + iommu_pte_t *pte, *ptep; vm_pindex_t idx, idx1; DMAR_DOMAIN_ASSERT_PGLOCKED(domain); @@ -362,13 +363,13 @@ domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, idx = domain_pgtbl_get_pindex(domain, base, lvl); if (*sf != NULL && idx == *idxp) { - pte = (dmar_pte_t *)sf_buf_kva(*sf); + pte = (iommu_pte_t *)sf_buf_kva(*sf); } else { if (*sf != NULL) - dmar_unmap_pgtbl(*sf); + iommu_unmap_pgtbl(*sf); *idxp = idx; retry: - pte = dmar_map_pgtbl(domain->pgtbl_obj, idx, flags, sf); + pte = iommu_map_pgtbl(domain->pgtbl_obj, idx, flags, sf); if (pte == NULL) { KASSERT(lvl > 0, ("lost root page table page %p", domain)); @@ -377,7 +378,7 @@ retry: * it and create a pte in the preceeding page level * to reference the allocated page table page. */ - m = dmar_pgalloc(domain->pgtbl_obj, idx, flags | + m = iommu_pgalloc(domain->pgtbl_obj, idx, flags | IOMMU_PGF_ZERO); if (m == NULL) return (NULL); @@ -398,7 +399,7 @@ retry: KASSERT(m->pindex != 0, ("loosing root page %p", domain)); m->ref_count--; - dmar_pgfree(domain->pgtbl_obj, m->pindex, + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); return (NULL); } @@ -407,7 +408,7 @@ retry: dmar_flush_pte_to_ram(domain->dmar, ptep); sf_buf_page(sfp)->ref_count += 1; m->ref_count--; - dmar_unmap_pgtbl(sfp); + iommu_unmap_pgtbl(sfp); /* Only executed once. */ goto retry; } @@ -420,7 +421,7 @@ static int domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags) { - dmar_pte_t *pte; + iommu_pte_t *pte; struct sf_buf *sf; iommu_gaddr_t pg_sz, base1; vm_pindex_t pi, c, idx, run_sz; @@ -437,7 +438,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, pi += run_sz) { for (lvl = 0, c = 0, superpage = false;; lvl++) { pg_sz = domain_page_size(domain, lvl); - run_sz = pg_sz >> DMAR_PAGE_SHIFT; + run_sz = pg_sz >> IOMMU_PAGE_SHIFT; if (lvl == domain->pglvl - 1) break; /* @@ -476,7 +477,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, KASSERT((flags & IOMMU_PGF_WAITOK) == 0, ("failed waitable pte alloc %p", domain)); if (sf != NULL) - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); domain_unmap_buf_locked(domain, base1, base - base1, flags); TD_PINNED_ASSERT; @@ -488,7 +489,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, sf_buf_page(sf)->ref_count += 1; } if (sf != NULL) - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); TD_PINNED_ASSERT; return (0); } @@ -512,10 +513,10 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, KASSERT((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) == 0, ("modifying idmap pagetable domain %p", domain)); - KASSERT((base & DMAR_PAGE_MASK) == 0, + KASSERT((base & IOMMU_PAGE_MASK) == 0, ("non-aligned base %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); - KASSERT((size & DMAR_PAGE_MASK) == 0, + KASSERT((size & IOMMU_PAGE_MASK) == 0, ("non-aligned size %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); KASSERT(size > 0, ("zero size %p %jx %jx", domain, (uintmax_t)base, @@ -562,7 +563,7 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, } static void domain_unmap_clear_pte(struct dmar_domain *domain, - iommu_gaddr_t base, int lvl, int flags, dmar_pte_t *pte, + iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_fs); static void @@ -570,7 +571,7 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags) { struct sf_buf *sf; - dmar_pte_t *pde; + iommu_pte_t *pde; vm_pindex_t idx; sf = NULL; @@ -580,7 +581,7 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, static void domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, - int flags, dmar_pte_t *pte, struct sf_buf **sf, bool free_sf) + int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_sf) { vm_page_t m; @@ -588,7 +589,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, dmar_flush_pte_to_ram(domain->dmar, pte); m = sf_buf_page(*sf); if (free_sf) { - dmar_unmap_pgtbl(*sf); + iommu_unmap_pgtbl(*sf); *sf = NULL; } m->ref_count--; @@ -600,7 +601,7 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, KASSERT(m->pindex != 0, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); - dmar_pgfree(domain->pgtbl_obj, m->pindex, flags); + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); domain_free_pgtbl_pde(domain, base, lvl - 1, flags); } @@ -611,7 +612,7 @@ static int domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, int flags) { - dmar_pte_t *pte; + iommu_pte_t *pte; struct sf_buf *sf; vm_pindex_t idx; iommu_gaddr_t pg_sz; @@ -623,10 +624,10 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, KASSERT((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) == 0, ("modifying idmap pagetable domain %p", domain)); - KASSERT((base & DMAR_PAGE_MASK) == 0, + KASSERT((base & IOMMU_PAGE_MASK) == 0, ("non-aligned base %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); - KASSERT((size & DMAR_PAGE_MASK) == 0, + KASSERT((size & IOMMU_PAGE_MASK) == 0, ("non-aligned size %p %jx %jx", domain, (uintmax_t)base, (uintmax_t)size)); KASSERT(base < (1ULL << domain->agaw), @@ -669,7 +670,7 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); } if (sf != NULL) - dmar_unmap_pgtbl(sf); + iommu_unmap_pgtbl(sf); /* * See 11.1 Write Buffer Flushing for an explanation why RWBF * can be ignored there. @@ -705,7 +706,7 @@ domain_alloc_pgtbl(struct dmar_domain *domain) domain->pgtbl_obj = vm_pager_allocate(OBJT_PHYS, NULL, IDX_TO_OFF(pglvl_max_pages(domain->pglvl)), 0, 0, NULL); DMAR_DOMAIN_PGLOCK(domain); - m = dmar_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK | + m = iommu_pgalloc(domain->pgtbl_obj, 0, IOMMU_PGF_WAITOK | IOMMU_PGF_ZERO | IOMMU_PGF_OBJL); /* No implicit free of the top level page table page. */ m->ref_count = 1; diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index 09271a6f6cc9..035de24a2d4e 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -54,6 +54,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> #include <x86/iommu/iommu_intrmap.h> @@ -340,7 +341,7 @@ dmar_init_irt(struct dmar_unit *unit) } unit->irte_cnt = clp2(num_io_irqs); unit->irt = kmem_alloc_contig(unit->irte_cnt * sizeof(dmar_irte_t), - M_ZERO | M_WAITOK, 0, dmar_high, PAGE_SIZE, 0, + M_ZERO | M_WAITOK, 0, iommu_high, PAGE_SIZE, 0, DMAR_IS_COHERENT(unit) ? VM_MEMATTR_DEFAULT : VM_MEMATTR_UNCACHEABLE); if (unit->irt == NULL) diff --git a/sys/x86/iommu/intel_qi.c b/sys/x86/iommu/intel_qi.c index 37e2bf211e32..590cbac9bcbd 100644 --- a/sys/x86/iommu/intel_qi.c +++ b/sys/x86/iommu/intel_qi.c @@ -55,6 +55,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> static bool @@ -501,7 +502,7 @@ dmar_init_qi(struct dmar_unit *unit) /* The invalidation queue reads by DMARs are always coherent. */ unit->inv_queue = kmem_alloc_contig(unit->inv_queue_size, M_WAITOK | - M_ZERO, 0, dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + M_ZERO, 0, iommu_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); unit->inv_waitd_seq_hw_phys = pmap_kextract( (vm_offset_t)&unit->inv_waitd_seq_hw); diff --git a/sys/x86/iommu/intel_quirks.c b/sys/x86/iommu/intel_quirks.c index cccb503b6047..fd5c522d588d 100644 --- a/sys/x86/iommu/intel_quirks.c +++ b/sys/x86/iommu/intel_quirks.c @@ -58,6 +58,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> typedef void (*dmar_quirk_cpu_fun)(struct dmar_unit *); diff --git a/sys/x86/iommu/intel_reg.h b/sys/x86/iommu/intel_reg.h index 26a18ff94890..0fafcce7accf 100644 --- a/sys/x86/iommu/intel_reg.h +++ b/sys/x86/iommu/intel_reg.h @@ -31,16 +31,6 @@ #ifndef __X86_IOMMU_INTEL_REG_H #define __X86_IOMMU_INTEL_REG_H -#define DMAR_PAGE_SIZE PAGE_SIZE -#define DMAR_PAGE_MASK (DMAR_PAGE_SIZE - 1) -#define DMAR_PAGE_SHIFT PAGE_SHIFT -#define DMAR_NPTEPG (DMAR_PAGE_SIZE / sizeof(dmar_pte_t)) -#define DMAR_NPTEPGSHIFT 9 -#define DMAR_PTEMASK (DMAR_NPTEPG - 1) - -#define IOMMU_PAGE_SIZE DMAR_PAGE_SIZE -#define IOMMU_PAGE_MASK DMAR_PAGE_MASK - typedef struct dmar_root_entry { uint64_t r1; uint64_t r2; @@ -49,7 +39,7 @@ typedef struct dmar_root_entry { #define DMAR_ROOT_R1_CTP_MASK 0xfffffffffffff000 /* Mask for Context-Entry Table Pointer */ -#define DMAR_CTX_CNT (DMAR_PAGE_SIZE / sizeof(dmar_root_entry_t)) +#define DMAR_CTX_CNT (IOMMU_PAGE_SIZE / sizeof(dmar_root_entry_t)) typedef struct dmar_ctx_entry { uint64_t ctx1; @@ -73,9 +63,6 @@ typedef struct dmar_ctx_entry { #define DMAR_CTX2_DID(x) ((x) << 8) /* Domain Identifier */ #define DMAR_CTX2_GET_DID(ctx2) (((ctx2) & DMAR_CTX2_DID_MASK) >> 8) -typedef struct dmar_pte { - uint64_t pte; -} dmar_pte_t; #define DMAR_PTE_R 1 /* Read */ #define DMAR_PTE_W (1 << 1) /* Write */ #define DMAR_PTE_SP (1 << 7) /* Super Page */ diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index 4d680cc7d9e8..356b8d5e6436 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -63,6 +63,7 @@ #include <x86/include/busdma_impl.h> #include <dev/iommu/busdma_iommu.h> #include <x86/iommu/intel_reg.h> +#include <x86/iommu/x86_iommu.h> #include <x86/iommu/intel_dmar.h> u_int @@ -182,7 +183,7 @@ pglvl_max_pages(int pglvl) int i; for (res = 0, i = pglvl; i > 0; i--) { - res *= DMAR_NPTEPG; + res *= IOMMU_NPTEPG; res++; } return (res); @@ -213,12 +214,12 @@ pglvl_page_size(int total_pglvl, int lvl) { int rlvl; static const iommu_gaddr_t pg_sz[] = { - (iommu_gaddr_t)DMAR_PAGE_SIZE, - (iommu_gaddr_t)DMAR_PAGE_SIZE << DMAR_NPTEPGSHIFT, - (iommu_gaddr_t)DMAR_PAGE_SIZE << (2 * DMAR_NPTEPGSHIFT), - (iommu_gaddr_t)DMAR_PAGE_SIZE << (3 * DMAR_NPTEPGSHIFT), - (iommu_gaddr_t)DMAR_PAGE_SIZE << (4 * DMAR_NPTEPGSHIFT), - (iommu_gaddr_t)DMAR_PAGE_SIZE << (5 * DMAR_NPTEPGSHIFT) + (iommu_gaddr_t)IOMMU_PAGE_SIZE, + (iommu_gaddr_t)IOMMU_PAGE_SIZE << IOMMU_NPTEPGSHIFT, + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (2 * IOMMU_NPTEPGSHIFT), + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (3 * IOMMU_NPTEPGSHIFT), + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (4 * IOMMU_NPTEPGSHIFT), + (iommu_gaddr_t)IOMMU_PAGE_SIZE << (5 * IOMMU_NPTEPGSHIFT), }; KASSERT(lvl >= 0 && lvl < total_pglvl, @@ -243,7 +244,7 @@ calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size, int am; for (am = DMAR_CAP_MAMV(unit->hw_cap);; am--) { - isize = 1ULL << (am + DMAR_PAGE_SHIFT); + isize = 1ULL << (am + IOMMU_PAGE_SHIFT); if ((base & (isize - 1)) == 0 && size >= isize) break; if (am == 0) @@ -253,113 +254,9 @@ calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size, return (am); } -iommu_haddr_t dmar_high; int haw; int dmar_tbl_pagecnt; -vm_page_t -dmar_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags) -{ - vm_page_t m; - int zeroed, aflags; - - zeroed = (flags & IOMMU_PGF_ZERO) != 0 ? VM_ALLOC_ZERO : 0; - aflags = zeroed | VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | VM_ALLOC_NODUMP | - ((flags & IOMMU_PGF_WAITOK) != 0 ? VM_ALLOC_WAITFAIL : - VM_ALLOC_NOWAIT); - for (;;) { - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WLOCK(obj); - m = vm_page_lookup(obj, idx); - if ((flags & IOMMU_PGF_NOALLOC) != 0 || m != NULL) { - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - break; - } - m = vm_page_alloc_contig(obj, idx, aflags, 1, 0, - dmar_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - if (m != NULL) { - if (zeroed && (m->flags & PG_ZERO) == 0) - pmap_zero_page(m); - atomic_add_int(&dmar_tbl_pagecnt, 1); - break; - } - if ((flags & IOMMU_PGF_WAITOK) == 0) - break; - } - return (m); -} - -void -dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) -{ - vm_page_t m; - - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WLOCK(obj); - m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT); - if (m != NULL) { - vm_page_free(m); - atomic_subtract_int(&dmar_tbl_pagecnt, 1); - } - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); -} - -void * -dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, - struct sf_buf **sf) -{ - vm_page_t m; - bool allocated; - - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WLOCK(obj); - m = vm_page_lookup(obj, idx); - if (m == NULL && (flags & IOMMU_PGF_ALLOC) != 0) { - m = dmar_pgalloc(obj, idx, flags | IOMMU_PGF_OBJL); - allocated = true; - } else - allocated = false; - if (m == NULL) { - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - return (NULL); - } - /* Sleepable allocations cannot fail. */ - if ((flags & IOMMU_PGF_WAITOK) != 0) - VM_OBJECT_WUNLOCK(obj); - sched_pin(); - *sf = sf_buf_alloc(m, SFB_CPUPRIVATE | ((flags & IOMMU_PGF_WAITOK) - == 0 ? SFB_NOWAIT : 0)); - if (*sf == NULL) { - sched_unpin(); - if (allocated) { - VM_OBJECT_ASSERT_WLOCKED(obj); - dmar_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL); - } - if ((flags & IOMMU_PGF_OBJL) == 0) - VM_OBJECT_WUNLOCK(obj); - return (NULL); - } - if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == - (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) - VM_OBJECT_WLOCK(obj); - else if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == 0) - VM_OBJECT_WUNLOCK(obj); - return ((void *)sf_buf_kva(*sf)); -} - -void -dmar_unmap_pgtbl(struct sf_buf *sf) -{ - - sf_buf_free(sf); - sched_unpin(); -} - static void dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) { @@ -374,7 +271,7 @@ dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) } void -dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst) +dmar_flush_pte_to_ram(struct dmar_unit *unit, iommu_pte_t *dst) { dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); @@ -686,11 +583,6 @@ dmar_timeout_sysctl(SYSCTL_HANDLER_ARGS) return (error); } -static SYSCTL_NODE(_hw_iommu, OID_AUTO, dmar, CTLFLAG_RD | CTLFLAG_MPSAFE, - NULL, ""); -SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, tbl_pagecnt, CTLFLAG_RD, - &dmar_tbl_pagecnt, 0, - "Count of pages used for DMAR pagetables"); SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, batch_coalesce, CTLFLAG_RWTUN, &dmar_batch_coalesce, 0, "Number of qi batches between interrupt"); diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c new file mode 100644 index 000000000000..ffea1cc1a190 --- /dev/null +++ b/sys/x86/iommu/iommu_utils.c @@ -0,0 +1,164 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2013, 2014 The FreeBSD Foundation + * + * This software was developed by Konstantin Belousov <kib@FreeBSD.org> + * 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 <sys/systm.h> +#include <sys/lock.h> +#include <sys/memdesc.h> +#include <sys/mutex.h> +#include <sys/sf_buf.h> +#include <sys/sysctl.h> +#include <sys/proc.h> +#include <sys/sched.h> +#include <sys/rwlock.h> +#include <sys/taskqueue.h> +#include <sys/tree.h> +#include <vm/vm.h> +#include <vm/vm_page.h> +#include <vm/vm_object.h> +#include <dev/pci/pcireg.h> +#include <machine/atomic.h> +#include <machine/bus.h> +#include <machine/cpu.h> +#include <x86/include/busdma_impl.h> +#include <dev/iommu/busdma_iommu.h> +#include <dev/iommu/iommu.h> +#include <x86/iommu/x86_iommu.h> + +vm_page_t +iommu_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags) +{ + vm_page_t m; + int zeroed, aflags; + + zeroed = (flags & IOMMU_PGF_ZERO) != 0 ? VM_ALLOC_ZERO : 0; + aflags = zeroed | VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | VM_ALLOC_NODUMP | + ((flags & IOMMU_PGF_WAITOK) != 0 ? VM_ALLOC_WAITFAIL : + VM_ALLOC_NOWAIT); + for (;;) { + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WLOCK(obj); + m = vm_page_lookup(obj, idx); + if ((flags & IOMMU_PGF_NOALLOC) != 0 || m != NULL) { + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + break; + } + m = vm_page_alloc_contig(obj, idx, aflags, 1, 0, + iommu_high, PAGE_SIZE, 0, VM_MEMATTR_DEFAULT); + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + if (m != NULL) { + if (zeroed && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + atomic_add_int(&iommu_tbl_pagecnt, 1); + break; + } + if ((flags & IOMMU_PGF_WAITOK) == 0) + break; + } + return (m); +} + +void +iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) +{ + vm_page_t m; + + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WLOCK(obj); + m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT); + if (m != NULL) { + vm_page_free(m); + atomic_subtract_int(&iommu_tbl_pagecnt, 1); + } + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); +} + +void * +iommu_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, + struct sf_buf **sf) +{ + vm_page_t m; + bool allocated; + + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WLOCK(obj); + m = vm_page_lookup(obj, idx); + if (m == NULL && (flags & IOMMU_PGF_ALLOC) != 0) { + m = iommu_pgalloc(obj, idx, flags | IOMMU_PGF_OBJL); + allocated = true; + } else + allocated = false; + if (m == NULL) { + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + return (NULL); + } + /* Sleepable allocations cannot fail. */ + if ((flags & IOMMU_PGF_WAITOK) != 0) + VM_OBJECT_WUNLOCK(obj); + sched_pin(); + *sf = sf_buf_alloc(m, SFB_CPUPRIVATE | ((flags & IOMMU_PGF_WAITOK) + == 0 ? SFB_NOWAIT : 0)); + if (*sf == NULL) { + sched_unpin(); + if (allocated) { + VM_OBJECT_ASSERT_WLOCKED(obj); + iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL); + } + if ((flags & IOMMU_PGF_OBJL) == 0) + VM_OBJECT_WUNLOCK(obj); + return (NULL); + } + if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == + (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) + VM_OBJECT_WLOCK(obj); + else if ((flags & (IOMMU_PGF_WAITOK | IOMMU_PGF_OBJL)) == 0) + VM_OBJECT_WUNLOCK(obj); + return ((void *)sf_buf_kva(*sf)); +} + +void +iommu_unmap_pgtbl(struct sf_buf *sf) +{ + + sf_buf_free(sf); + sched_unpin(); +} + +iommu_haddr_t iommu_high; +int iommu_tbl_pagecnt; + +SYSCTL_NODE(_hw_iommu, OID_AUTO, dmar, CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, ""); +SYSCTL_INT(_hw_iommu_dmar, OID_AUTO, tbl_pagecnt, CTLFLAG_RD, + &iommu_tbl_pagecnt, 0, + "Count of pages used for DMAR pagetables"); diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h new file mode 100644 index 000000000000..3789586f1eaf --- /dev/null +++ b/sys/x86/iommu/x86_iommu.h @@ -0,0 +1,62 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2013-2015 The FreeBSD Foundation *** 58 LINES SKIPPED *** From nobody Sat May 25 08:30:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmZqh21P9z5L1T3; Sat, 25 May 2024 08:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmZqh042nz4dXy; Sat, 25 May 2024 08:30:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716625856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zv5kUpnPcZVI9RP13B9Wl/WwuCAKILpVihHlihw583k=; b=y3M1nULVzA9fi6Hx7H5P6vdjyI81AFFtyZDisAIKkf/7vcp3NVbZ3bDsvBq4QYKphcxvlX vOThO7TgJVhZbCg9u+mRhxMJVwYfmZDvK5L2qXUmyfHTR7fYq228d+qkhrfwcRxRa4fDrI CLY+KryR7Dkw9EzCWqSQi7pPGzgpa+NbLxiVg4yo6hsmLhSFiQ8/g4YVTJUOXo+zYSgSoR I+/nYrO9QgtjJ3r+u3q16nHGwi3uxMxqiA0G8xXHuV8MVfjC58bpxYJ9SoZZJEfci9vuG9 ddv0bcRT8DtuOZDq1sjBcGKU4JAgC6lBqG6VgellUZ4n2oxfgymsj4Qd6UrlIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716625856; a=rsa-sha256; cv=none; b=X8cXg+t3FV/Oy0YTtNcKN9oSvSza89wR48DLuBw8I9x0svS+fIENuM1sA+qWlLnnoIYrBg nDfDBBa07culeHoKpPIu4LdQFskSJMYkYJUdjQNV1Hcomy9seIu4e6g+IQDPOMEiftD35D l8uLIdgtSXJFC6lhR87SJvZyIMnDgCfsz9GFwzkzM4TTqesa73iV1tjjdmIcQ+FtP5a8FZ pXOkSy+fU1h2gyNIZU6St2MFBrTaVWfSJvLFr05A5J7B1TkZzX6j3wRXaCLWtHhbmjAIb/ vVUM62p3gV3Jy5zY3dP+BzJnaRxyJqT1HYzXAmPaQZ2qP2/jqtScvpD/C78jzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716625856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zv5kUpnPcZVI9RP13B9Wl/WwuCAKILpVihHlihw583k=; b=JJRRuWqvPvaY9dB0UL8ysGLJu5vHvslargwj2vlg1GflPTt24M3nzAO0puyWQQaHqcbSS/ awQ1bS+aJQTSJYKM3aqwAdjkVAZTKQg3PascxNffYm/8d4hJXYouOEqW69PhRdIdo69sQf fJqxy1czBmh7PWTv5FhIRP96KObyYpJZ+O/LsZjhgXjNBP0jNLNKZqj+C33hET/dB6sXAf kryvDGlquB+WGSWsxJOU4whGVS5cJg9ULwaN3tVFjtWxO10Rww0dtOj4H2xIYR1F4KB+Wx 723nvPlmOf0PzBVbcEw7PxsawD7f1icqPthN0sOuw+0zsiCSgIQLEcGl1VUfUA== 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 4VmZqg6nSgz18sf; Sat, 25 May 2024 08:30:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44P8Utmc027663; Sat, 25 May 2024 08:30:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44P8Utfg027660; Sat, 25 May 2024 08:30:55 GMT (envelope-from git) Date: Sat, 25 May 2024 08:30:55 GMT Message-Id: <202405250830.44P8Utfg027660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: 02d15215cef2 - main - tcp: improve blackhole support List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 02d15215cef2a28f1865e6ad5b19f18af1398b8b Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=02d15215cef2a28f1865e6ad5b19f18af1398b8b commit 02d15215cef2a28f1865e6ad5b19f18af1398b8b Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-24 04:59:13 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-24 04:59:13 +0000 tcp: improve blackhole support There are two improvements to the TCP blackhole support: (1) If net.inet.tcp.blackhole is set to 2, also sent no RST whenever a segment is received on an existing closed socket or if there is a port mismatch when using UDP encapsulation. (2) If net.inet.tcp.blackhole is set to 3, no RST segment is sent in response to incoming segments on closed sockets or in response to unexpected segments on listening sockets. Thanks to gallatin@ for suggesting such an improvement. Reviewed by: gallatin MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45304 --- share/man/man4/blackhole.4 | 10 +++++++--- sys/netinet/tcp_input.c | 43 +++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 090f330a6ed8..bb955fd4497d 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd May 22, 2024 +.Dd May 25, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -21,7 +21,7 @@ MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connectio attempts .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" -.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2" +.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" .Cd sysctl net.inet.tcp.blackhole_local Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole_local Ns Op = Ns Brq "0 | 1" @@ -30,7 +30,8 @@ The .Nm .Xr sysctl 8 MIB is used to control system behaviour when connection requests -are received on SCTP, TCP, or UDP ports where there is no socket listening. +are received on SCTP, TCP, or UDP ports where there is no socket listening +or unexpected packets are received on listening sockets. .Pp The blackhole behaviour is useful to slow down an attacker who is port-scanning a system in an attempt to detect vulnerable services. @@ -61,6 +62,9 @@ is merely dropped, and no RST is sent, making the system appear as a blackhole. By setting the MIB value to two, any segment arriving on a closed port is dropped without returning a RST. +Setting the MIB value to three, any segment arriving on a closed port +or an unexpected segment on a listening port is dropped without sending a +RST in reply. This provides some degree of protection against stealth port scans. .Ss UDP Enabling blackhole behaviour turns off the sending diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 56327bd99cd7..08ff84039c90 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -915,23 +915,6 @@ findpcb: log(LOG_INFO, "%s; %s: Connection attempt " "to closed port\n", s, __func__); } - /* - * When blackholing do not respond with a RST but - * completely ignore the segment and drop it. - */ - if (((V_blackhole == 1 && (thflags & TH_SYN)) || - V_blackhole == 2) && (V_blackhole_local || ( -#ifdef INET6 - isipv6 ? !in6_localaddr(&ip6->ip6_src) : -#endif -#ifdef INET - !in_localip(ip->ip_src) -#else - true -#endif - ))) - goto dropunlock; - rstreason = BANDLIM_RST_CLOSEDPORT; goto dropwithreset; } @@ -1410,15 +1393,27 @@ tfo_socket_result: return (IPPROTO_DONE); dropwithreset: + /* + * When blackholing do not respond with a RST but + * completely ignore the segment and drop it. + */ + if (((rstreason == BANDLIM_RST_OPENPORT && V_blackhole == 3) || + (rstreason == BANDLIM_RST_CLOSEDPORT && + ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) && + (V_blackhole_local || ( +#ifdef INET6 + isipv6 ? !in6_localaddr(&ip6->ip6_src) : +#endif +#ifdef INET + !in_localip(ip->ip_src) +#else + true +#endif + ))) + goto dropunlock; TCP_PROBE5(receive, NULL, tp, m, tp, th); - - if (inp != NULL) { - tcp_dropwithreset(m, th, tp, tlen, rstreason); - INP_UNLOCK(inp); - } else - tcp_dropwithreset(m, th, NULL, tlen, rstreason); + tcp_dropwithreset(m, th, tp, tlen, rstreason); m = NULL; /* mbuf chain got consumed. */ - goto drop; dropunlock: if (m != NULL) From nobody Sat May 25 15:00:50 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmlTb3Gjgz5LjPK; Sat, 25 May 2024 15:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmlTZ6y4Rz4GWd; Sat, 25 May 2024 15:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716649251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XUkSZQna7xGTrN/eV3jcDatKOw4UPJLJOP4FPB8NLIM=; b=G+K4xN2nqAIaKDCtnGTpIj0WSBUCgFJ8Xl0UUQmSR3NrBtHN8o3szerSFjZZqglVr0hR+b TM1evuK0uNLqTu1lb4hYCUcwGwpxgFsLcPKjoM2WLc/HcllpfKzG5bVXuCCAysxUn39XEg 1NV4Df9X7ytFjMRQbCJitJuY3EqacqZQ+g6Nlgz73lxAPsKpDTIsz1nmP62yMlOiVFCSiE sctdzP0XEvYegYPLnHAxAj4ur9Mbh/3HkdaMZqn8VogKtekWsLTm+Qn8ZXeReaVPTjBvR1 xEPKeskjPP6FjvN9EfdOAutjYW2SJvy4douQznpre5nGfcyHz03D0PBdzaOj/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716649251; a=rsa-sha256; cv=none; b=nUSP+z5lw9NErmXkkRi6dA9GBfcNg+OIBPrlJ2R3rFjHv+IprJjSlGpxNSaxPYEjE6Zh+u 5g6N31+BmeLUKgM5ZVDvS6KMOsX1uGXaxZfyFD27qval9hIZO5U7ATXfIzqpUmUjZ3iz4s StOw2ipqJ08WthcN22Js+jEZIhOOIrn5QNxoNl3e/fPGhg86v+RtUTE2KDki1kHWXxcq/K MJgzZv70/sSx89jogGrhWuBfTeYR65SppjodHUEfRD+G+KGzfwV2WgatEFyQmOjCIeT1X2 M7or8O2yzmSTQ4P+oDvIOy/IA6QTpoOxHX8otOh/y89kQyqCXKIYgxlVd+Uy/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716649251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XUkSZQna7xGTrN/eV3jcDatKOw4UPJLJOP4FPB8NLIM=; b=xCrfHGWdM1NrzvJdUo9wvjC/Z42Pi/QMMOInENJsWg50q3+iPG6oY9a4CpSkszf0He3fJ5 tnx4h3oT6P0rb3eqkNj14Hbu9M8x+Qd23HZiBqLdDte80d/SAp90BrJrDDSFX4AIcdJOe2 Mk1K7h2PznoUorKsW48dini7XWoU2Nf8XZsIOqDwjuuh1C2x/+oFIgOSCzs+u2lkIO01g2 yDZ4zVyM7s1G/WBMYgod2d4wMy5O4OTlM/0P+t4fH7YMQVjCJ5DVFEcqPxryKDbeB5dfsS 4BSvl/UH29RJfi+XBPGN7rXX6s7/VY0leZBv4HvL9haoBVVCf92aOJTCXLWvig== 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 4VmlTZ6HL3zLrM; Sat, 25 May 2024 15:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PF0oss084076; Sat, 25 May 2024 15:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PF0odb084073; Sat, 25 May 2024 15:00:50 GMT (envelope-from git) Date: Sat, 25 May 2024 15:00:50 GMT Message-Id: <202405251500.44PF0odb084073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: 9b1de7e4844d - main - vt/sc: retire logic to select vt(4) by default for UEFI boot List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9b1de7e4844d951a7d7335cbde75a86a2380e220 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9b1de7e4844d951a7d7335cbde75a86a2380e220 commit 9b1de7e4844d951a7d7335cbde75a86a2380e220 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-24 21:36:09 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-25 15:00:35 +0000 vt/sc: retire logic to select vt(4) by default for UEFI boot We previously defaulted to using sc(4) with a special case to prefer vt(4) when booted via UEFI. As vt(4) is now always the default we can simplify this. Reviewed by: imp, kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45356 --- sys/amd64/amd64/machdep.c | 9 --------- sys/kern/kern_cons.c | 18 ------------------ sys/sys/cons.h | 1 - 3 files changed, 28 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c8539b7b189d..c509dcc2f7dd 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1464,15 +1464,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) r_idt.rd_base = (long) idt; lidt(&r_idt); - /* - * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) - * transition). - * Once bootblocks have updated, we can test directly for - * efi_systbl != NULL here... - */ - if (efi_boot) - vty_set_preferred(VTY_VT); - TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable); TUNABLE_INT_FETCH("machdep.mitigations.ibrs.disable", &hw_ibrs_disable); diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 040aa3932a1a..2ab86d5905a9 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -737,7 +737,6 @@ sysbeep(int pitch __unused, sbintime_t duration __unused) /* * Temporary support for sc(4) to vt(4) transition. */ -static unsigned vty_prefer; static char vty_name[16]; SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, vty_name, 0, "Console vty driver"); @@ -762,10 +761,6 @@ vty_enabled(unsigned vty) break; } #endif - if (vty_prefer != 0) { - vty_selected = vty_prefer; - break; - } #if defined(DEV_VT) vty_selected = VTY_VT; #elif defined(DEV_SC) @@ -780,16 +775,3 @@ vty_enabled(unsigned vty) } return ((vty_selected & vty) != 0); } - -void -vty_set_preferred(unsigned vty) -{ - - vty_prefer = vty; -#if !defined(DEV_SC) - vty_prefer &= ~VTY_SC; -#endif -#if !defined(DEV_VT) - vty_prefer &= ~VTY_VT; -#endif -} diff --git a/sys/sys/cons.h b/sys/sys/cons.h index 78df26858376..c7110a7c8c17 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -145,7 +145,6 @@ int constty_clear(struct tty *tp); #define VTY_SC 0x01 #define VTY_VT 0x02 int vty_enabled(unsigned int); -void vty_set_preferred(unsigned int); #endif /* _KERNEL */ From nobody Sat May 25 17:25:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vmph833V1z5LDtY; Sat, 25 May 2024 17:25: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vmph82NCqz4V3s; Sat, 25 May 2024 17:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d0pWZosFQV1+zHG0ptnlb5++2Q0fKvrtLej6T0RzEa8=; b=Dgd9/RR0cbuGpC7Z2xuMKzYetmKApu7sExEIA9AEaQdv9lm6YKj3L5f561vlIKZpVnWuLa GqODqH1K5k0ErodueMA8HJasP1yJR2itr3TeeMsnk+fGkNJLKDaWAqgXZ0hrXQc6LNG/Vi wsktBZ0fi3a6jSVixFR9tolCZ6W0kRMEfeN/2SXVKuWC1JZnZ/N2fAgy7ez4mhKddtQtFR ToKI998J/6IkA93w9FbXVB4/2ZEbDekB18UfP6xBHgRboyOUj0DBj4/VdB+V9WCiyKWfnH 9rvRKMNdRR4EIFo9+4jvAkqW3fzdVoP8W/r5SUn0tRFQXhXC3WjiMD88wpsjpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716657912; a=rsa-sha256; cv=none; b=vEhQQRoZZfJ3qqFO0PBChAD+nEdiZ4kGTFEbBqyLS3n2IqzdNUvGSus9x1rxywzLPMO9Oe YF4nhLO8pOGtEmZNSKAZ1jpRUOmmAEuNKwbiXJ56jxURdpJJXAhHeZS0bcbHW129W1l4Ar TvIjCe/i61kN85x9h82GWaulQSex8/44snqJYnXaovsrdAPOELkS2JbehIyBpVmzjVveHZ sicLuspjDti0Pz6LGyDf0sBuycFuGd/AlDiwNGZkCII6dkAIAIabYj2tjNJ0Z6195tgtKX fNThck7rnfLzol13T7bpXLPqlJonTWFS4y+44raQ3RJ7h5EpCl6p/tp3KyLGwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d0pWZosFQV1+zHG0ptnlb5++2Q0fKvrtLej6T0RzEa8=; b=mwBmn/Uoy/+5UDnvmz4akmS0SdBihvZe2sCkioLWGibTNVMCFsx+hoSrChRe1g9v49XrUJ 6KyS6JmdMD5MK4MiOkUunmRdCo3xwXgaLUQCKkgr5r/pL3YNVxacdPvZ1atRJuVPZTw7Lq Htf4uD+utA0l24r21gdWW8g3YFwmYDLAO1VrYRJJqclcSrBktHj6YDynVp/YcS6AVdo+He xrnrYHoNfEhsHBwAF134pUxfXr7DR0LmauKDV+xR2ioh1MeleOYMbGKzc/gYDCysxGdT1H KTW4gOpSh0Ticx3LzU+VgWKw4pcSROxomf0ceJyE+hkioMOQ+/3Qxe6onVg2wQ== 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 4Vmph81rWSzQqF; Sat, 25 May 2024 17:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PHPCuw026647; Sat, 25 May 2024 17:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHPCSK026644; Sat, 25 May 2024 17:25:12 GMT (envelope-from git) Date: Sat, 25 May 2024 17:25:12 GMT Message-Id: <202405251725.44PHPCSK026644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= <bnovkov@FreeBSD.org> Subject: git: da76d349b6b1 - main - uma: Deduplicate uma_small_alloc List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da76d349b6b104f4e70562304c800a0793dea18d Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=da76d349b6b104f4e70562304c800a0793dea18d commit da76d349b6b104f4e70562304c800a0793dea18d Author: Bojan Novković <bnovkov@FreeBSD.org> AuthorDate: 2024-05-03 16:48:18 +0000 Commit: Bojan Novković <bnovkov@FreeBSD.org> CommitDate: 2024-05-25 17:24:46 +0000 uma: Deduplicate uma_small_alloc This commit refactors the UMA small alloc code and removes most UMA machine-dependent code. The existing machine-dependent uma_small_alloc code is almost identical across all architectures, except for powerpc where using the direct map addresses involved extra steps in some cases. The MI/MD split was replaced by a default uma_small_alloc implementation that can be overridden by architecture-specific code by defining the UMA_MD_SMALL_ALLOC symbol. Furthermore, UMA_USE_DMAP was introduced to replace most UMA_MD_SMALL_ALLOC uses. Reviewed by: markj, kib Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45084 --- sys/amd64/amd64/uma_machdep.c | 71 ------------------------------------------- sys/amd64/include/vmparam.h | 6 ++-- sys/arm64/arm64/uma_machdep.c | 69 ----------------------------------------- sys/arm64/include/vmparam.h | 2 +- sys/conf/files.amd64 | 1 - sys/conf/files.arm64 | 1 - sys/conf/files.riscv | 1 - sys/kern/subr_vmem.c | 6 ++-- sys/powerpc/include/vmparam.h | 6 ++-- sys/riscv/include/vmparam.h | 2 +- sys/riscv/riscv/uma_machdep.c | 68 ----------------------------------------- sys/vm/uma_core.c | 43 ++++++++++++++++++++++++-- sys/vm/vm_map.c | 8 ++--- sys/vm/vm_radix.c | 2 +- 14 files changed, 57 insertions(+), 229 deletions(-) diff --git a/sys/amd64/amd64/uma_machdep.c b/sys/amd64/amd64/uma_machdep.c deleted file mode 100644 index f83f0674cc4e..000000000000 --- a/sys/amd64/amd64/uma_machdep.c +++ /dev/null @@ -1,71 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/malloc.h> -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/vm_page.h> -#include <vm/vm_phys.h> -#include <vm/vm_dumpset.h> -#include <vm/uma.h> -#include <vm/uma_int.h> -#include <machine/md_var.h> - -void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, - int wait) -{ - vm_page_t m; - vm_paddr_t pa; - void *va; - - *flags = UMA_SLAB_PRIV; - m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | - VM_ALLOC_WIRED); - if (m == NULL) - return (NULL); - pa = m->phys_addr; - if ((wait & M_NODUMP) == 0) - dump_add_page(pa); - va = (void *)PHYS_TO_DMAP(pa); - return (va); -} - -void -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) -{ - vm_page_t m; - vm_paddr_t pa; - - pa = DMAP_TO_PHYS((vm_offset_t)mem); - dump_drop_page(pa); - m = PHYS_TO_VM_PAGE(pa); - vm_page_unwire_noq(m); - vm_page_free(m); -} diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index bff9bf840036..e5155a7c7d47 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -72,12 +72,12 @@ #endif /* - * We provide a machine specific single page allocator through the use - * of the direct mapped segment. This uses 2MB pages for reduced + * We provide a single page allocator through the use of the + * direct mapped segment. This uses 2MB pages for reduced * TLB pressure. */ #if !defined(KASAN) && !defined(KMSAN) -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #endif /* diff --git a/sys/arm64/arm64/uma_machdep.c b/sys/arm64/arm64/uma_machdep.c deleted file mode 100644 index f942248d4dcd..000000000000 --- a/sys/arm64/arm64/uma_machdep.c +++ /dev/null @@ -1,69 +0,0 @@ -/*- - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/malloc.h> -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/vm_page.h> -#include <vm/vm_phys.h> -#include <vm/vm_dumpset.h> -#include <vm/uma.h> -#include <vm/uma_int.h> -#include <machine/machdep.h> - -void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, - int wait) -{ - vm_page_t m; - vm_paddr_t pa; - void *va; - - *flags = UMA_SLAB_PRIV; - m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | - VM_ALLOC_WIRED); - if (m == NULL) - return (NULL); - pa = m->phys_addr; - if ((wait & M_NODUMP) == 0) - dump_add_page(pa); - va = (void *)PHYS_TO_DMAP(pa); - return (va); -} - -void -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) -{ - vm_page_t m; - vm_paddr_t pa; - - pa = DMAP_TO_PHYS((vm_offset_t)mem); - dump_drop_page(pa); - m = PHYS_TO_VM_PAGE(pa); - vm_page_unwire_noq(m); - vm_page_free(m); -} diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index ffa5a538504a..0dcd02d63938 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -293,7 +293,7 @@ #endif #if !defined(KASAN) && !defined(KMSAN) -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #endif #ifndef LOCORE diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 18dec5ed47b0..add27418ce08 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -92,7 +92,6 @@ amd64/amd64/support.S standard amd64/amd64/sys_machdep.c standard amd64/amd64/trap.c standard amd64/amd64/uio_machdep.c standard -amd64/amd64/uma_machdep.c standard amd64/amd64/vm_machdep.c standard amd64/pci/pci_cfgreg.c optional pci cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index a3d4fc09da89..8139a7af8ed3 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -78,7 +78,6 @@ arm64/arm64/swtch.S standard arm64/arm64/sys_machdep.c standard arm64/arm64/trap.c standard arm64/arm64/uio_machdep.c standard -arm64/arm64/uma_machdep.c standard arm64/arm64/undefined.c standard arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack \ compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*}" diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index be7ae2b40a08..49c8ddd0c516 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -67,7 +67,6 @@ riscv/riscv/sys_machdep.c standard riscv/riscv/trap.c standard riscv/riscv/timer.c standard riscv/riscv/uio_machdep.c standard -riscv/riscv/uma_machdep.c standard riscv/riscv/unwind.c optional ddb | kdtrace_hooks | stack riscv/riscv/vm_machdep.c standard diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index 1c9a8a5be979..a706d944dc3f 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -624,14 +624,14 @@ qc_drain(vmem_t *vm) uma_zone_reclaim(vm->vm_qcache[i].qc_cache, UMA_RECLAIM_DRAIN); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP static struct mtx_padalign __exclusive_cache_line vmem_bt_lock; /* * vmem_bt_alloc: Allocate a new page of boundary tags. * - * On architectures with uma_small_alloc there is no recursion; no address + * On architectures with UMA_USE_DMAP there is no recursion; no address * space need be allocated to allocate boundary tags. For the others, we * must handle recursion. Boundary tags are necessary to allocate new * boundary tags. @@ -707,7 +707,7 @@ vmem_startup(void) vmem_bt_zone = uma_zcreate("vmem btag", sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP mtx_init(&vmem_bt_lock, "btag lock", NULL, MTX_DEF); uma_prealloc(vmem_bt_zone, BT_MAXALLOC); /* diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index 89982a618bc7..250da8298610 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -111,6 +111,8 @@ #define KERNBASE 0x00100100 /* start of kernel virtual */ +#define UMA_MD_SMALL_ALLOC + #ifdef AIM #ifndef __powerpc64__ #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNEL_SR << ADDR_SR_SHFT) @@ -122,13 +124,13 @@ * Use the direct-mapped BAT registers for UMA small allocs. This * takes pressure off the small amount of available KVA. */ -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #else /* Book-E */ /* Use the direct map for UMA small allocs on powerpc64. */ #ifdef __powerpc64__ -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #else #define VM_MIN_KERNEL_ADDRESS 0xc0000000 #define VM_MAX_KERNEL_ADDRESS 0xffffefff diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index d2014654b691..5711bc8c347e 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -234,7 +234,7 @@ #define VM_INITIAL_PAGEIN 16 #endif -#define UMA_MD_SMALL_ALLOC +#define UMA_USE_DMAP #ifndef LOCORE extern vm_paddr_t dmap_phys_base; diff --git a/sys/riscv/riscv/uma_machdep.c b/sys/riscv/riscv/uma_machdep.c deleted file mode 100644 index 54e0d25800f6..000000000000 --- a/sys/riscv/riscv/uma_machdep.c +++ /dev/null @@ -1,68 +0,0 @@ -/*- - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/param.h> -#include <sys/malloc.h> -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/vm_page.h> -#include <vm/vm_phys.h> -#include <vm/vm_dumpset.h> -#include <vm/uma.h> -#include <vm/uma_int.h> - -void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, - int wait) -{ - vm_page_t m; - vm_paddr_t pa; - void *va; - - *flags = UMA_SLAB_PRIV; - m = vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | - VM_ALLOC_WIRED); - if (m == NULL) - return (NULL); - pa = m->phys_addr; - if ((wait & M_NODUMP) == 0) - dump_add_page(pa); - va = (void *)PHYS_TO_DMAP(pa); - return (va); -} - -void -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) -{ - vm_page_t m; - vm_paddr_t pa; - - pa = DMAP_TO_PHYS((vm_offset_t)mem); - dump_drop_page(pa); - m = PHYS_TO_VM_PAGE(pa); - vm_page_unwire_noq(m); - vm_page_free(m); -} diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index d185f12448ee..f9b6e18899c6 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2079,6 +2079,28 @@ contig_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag, bytes, wait, 0, ~(vm_paddr_t)0, 1, 0, VM_MEMATTR_DEFAULT)); } +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) +void * +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *flags, + int wait) +{ + vm_page_t m; + vm_paddr_t pa; + void *va; + + *flags = UMA_SLAB_PRIV; + m = vm_page_alloc_noobj_domain(domain, + malloc2vm_flags(wait) | VM_ALLOC_WIRED); + if (m == NULL) + return (NULL); + pa = m->phys_addr; + if ((wait & M_NODUMP) == 0) + dump_add_page(pa); + va = (void *)PHYS_TO_DMAP(pa); + return (va); +} +#endif + /* * Frees a number of pages to the system * @@ -2141,6 +2163,21 @@ pcpu_page_free(void *mem, vm_size_t size, uint8_t flags) kva_free(sva, size); } +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) +void +uma_small_free(void *mem, vm_size_t size, uint8_t flags) +{ + vm_page_t m; + vm_paddr_t pa; + + pa = DMAP_TO_PHYS((vm_offset_t)mem); + dump_drop_page(pa); + m = PHYS_TO_VM_PAGE(pa); + vm_page_unwire_noq(m); + vm_page_free(m); +} +#endif + /* * Zero fill initializer * @@ -3154,7 +3191,7 @@ uma_startup1(vm_offset_t virtual_avail) smr_init(); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP extern void vm_radix_reserve_kva(void); #endif @@ -3174,7 +3211,7 @@ uma_startup2(void) vm_map_unlock(kernel_map); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP /* Set up radix zone to use noobj_alloc. */ vm_radix_reserve_kva(); #endif @@ -5171,7 +5208,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count) pages = howmany(count, keg->uk_ipers) * keg->uk_ppera; -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP if (keg->uk_ppera > 1) { #else if (1) { diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 3111dda6e99d..3c7afcb6642f 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -172,7 +172,7 @@ static void vm_map_wire_entry_failure(vm_map_t map, vm_map_entry_t entry, start = end; \ } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP /* * Allocate a new slab for kernel map entries. The kernel map may be locked or @@ -264,7 +264,7 @@ vm_map_startup(void) kmapentzone = uma_zcreate("KMAP ENTRY", sizeof(struct vm_map_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOBUCKET); -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP /* Reserve an extra map entry for use when replenishing the reserve. */ uma_zone_reserve(kmapentzone, KMAPENT_RESERVE + 1); uma_prealloc(kmapentzone, KMAPENT_RESERVE + 1); @@ -660,7 +660,7 @@ _vm_map_unlock(vm_map_t map, const char *file, int line) VM_MAP_UNLOCK_CONSISTENT(map); if (map->system_map) { -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP if (map == kernel_map && (map->flags & MAP_REPLENISH) != 0) { uma_prealloc(kmapentzone, 1); map->flags &= ~MAP_REPLENISH; @@ -937,7 +937,7 @@ vm_map_entry_create(vm_map_t map) { vm_map_entry_t new_entry; -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP if (map == kernel_map) { VM_MAP_ASSERT_LOCKED(map); diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index cfc5a82eacc8..13f9d36194ab 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -82,7 +82,7 @@ vm_radix_node_free(struct pctrie *ptree, void *node) uma_zfree_smr(vm_radix_node_zone, node); } -#ifndef UMA_MD_SMALL_ALLOC +#ifndef UMA_USE_DMAP void vm_radix_reserve_kva(void); /* * Reserve the KVA necessary to satisfy the node allocation. From nobody Sat May 25 17:25:13 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vmph957tGz5LDTn; Sat, 25 May 2024 17:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vmph93QFjz4V1j; Sat, 25 May 2024 17:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjx72SWzHu/MKRjAR0YMIe2eAgbSGoSG6Hr890+/g6U=; b=k1ywi9ugHcGoVgsvyJhDqQEklMMsSKMuUx2OSxbg7Ra6w8ci8Mz2YSxV+T4/UZBV5GQ4ba mqKo5TccfTR0SdS/pH4gynJztVjsyVO77txKlv4PkstejTHDkgvrfljlh8Eg52Ya9K8OTN c+0OWfD7Plp00+30iSwbbM1zo5cAwALNrgJLNw8vEsnAVw/6puJglI1Z4Es254UGh24NMa PWodTL7SdBT5S9cE+EJ+Ma4gsnL+sDWRUKV+w9g4j2GeAi4CtI5HKjoOSJAj4A12hAU/Go Nwaeqsg7afphU08ztE4vr3cg147W05HKCzTGjArIhMeLAnDwFt5KkzDTxXSqLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716657913; a=rsa-sha256; cv=none; b=pqcPGHGP2E4ofq+dwQrC2XAphcZDIcm3jAevln7etTJwXuL2D0CNuN+tbJLlw/SLV31hvC mhSFt9XXwoNLMD3ndfrMZcrZEp/J6KLFslcTPlqRFP6ZuO6U94nzLND8S5AzAKzIMDdKtk he7KLsegceCpP4ULnPy2B1H+BRqPUa2R9hxOvvtmS0oRAWc9PqzaSRHFFgNRTP3xp1BhPn 87UCiU/HPx0DDJbrKQw2uVcU0Cq2I8vJ3oPVF2RPW2gSG8p5yrqMRVSGHP9fE/degy3qQQ hrpbyDvFQ3qyGU4lvPHRis3dVwQZfmqlFhKtu6yz4GM87zKWniqiopci5pgUBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716657913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xjx72SWzHu/MKRjAR0YMIe2eAgbSGoSG6Hr890+/g6U=; b=AHQiv9TnnluiE2g6tk4aGOKU57E2UMFKMFG1qhM7ok4o9PRgemm8+YDPhnqpwrBZrSwiwv 07h9FwT5a0+9E7cMp3A7/Tz7Jn6uA9E1MhpeXwvLgsTF0opzHFZZBzDVF+v0gZ2CM6HLs5 ITcTcWvH0MY7wf+c0ZHR7U6iRFFIQ2Su03oJ5+3nYDAFOOO9uODA6zPA8oCFdA+E59GQfm Fj7A0LQ1eDM2PAptYBO1lKnRhrihbGSGU/wybe7SBi0k7KeIG+m2K00aSL2FTvDDfEWyPB SGyqCbALhH4efcFiOoEP7fda9OYhEmAtquGCZjbbhEYFdFT+IMgvs92mQjEHdg== 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 4Vmph92xvjzQdC; Sat, 25 May 2024 17:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PHPDIu026695; Sat, 25 May 2024 17:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHPD4f026692; Sat, 25 May 2024 17:25:13 GMT (envelope-from git) Date: Sat, 25 May 2024 17:25:13 GMT Message-Id: <202405251725.44PHPD4f026692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= <bnovkov@FreeBSD.org> Subject: git: 0a44b8a56d23 - main - vm: Simplify startup page dumping conditional List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a44b8a56d23e24b05471ddb038b7dd30b149efe Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=0a44b8a56d23e24b05471ddb038b7dd30b149efe commit 0a44b8a56d23e24b05471ddb038b7dd30b149efe Author: Bojan Novković <bnovkov@FreeBSD.org> AuthorDate: 2024-05-03 17:53:56 +0000 Commit: Bojan Novković <bnovkov@FreeBSD.org> CommitDate: 2024-05-25 17:24:55 +0000 vm: Simplify startup page dumping conditional This commit introduces the MINIDUMP_STARTUP_PAGE_TRACKING symbol and uses it to simplify several instances of a complex preprocessor conditional for adding pages allocated when bootstraping the kernel to minidumps. Reviewed by: markj, mhorne Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D45085 --- sys/amd64/include/vmparam.h | 3 ++- sys/arm/include/vmparam.h | 1 + sys/arm64/include/vmparam.h | 1 + sys/i386/include/vmparam.h | 1 + sys/powerpc/include/vmparam.h | 2 ++ sys/riscv/include/vmparam.h | 1 + sys/vm/uma_core.c | 6 ++---- sys/vm/vm_page.c | 12 +++++------- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index e5155a7c7d47..93c2648e8fac 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -294,7 +294,8 @@ /* * Need a page dump array for minidump. */ -#define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 4ad42cfbe16b..15807923cefb 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -200,5 +200,6 @@ extern vm_offset_t vm_max_kernel_address; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 0 #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 0dcd02d63938..0e93e4026d4a 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -317,6 +317,7 @@ extern vm_offset_t dmap_max_addr; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #endif /* !_MACHINE_VMPARAM_H_ */ diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h index 0d9734ae3830..6f8885a539c3 100644 --- a/sys/i386/include/vmparam.h +++ b/sys/i386/include/vmparam.h @@ -246,5 +246,6 @@ * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 0 #endif /* _MACHINE_VMPARAM_H_ */ diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index 250da8298610..a612acbef239 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -308,11 +308,13 @@ extern int vm_level_0_order; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #else /* * No minidump with 32-bit powerpc. */ #define MINIDUMP_PAGE_TRACKING 0 +#define MINIDUMP_STARTUP_PAGE_TRACKING 0 #endif #define PMAP_HAS_DMAP (hw_direct_map) diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h index 5711bc8c347e..5092977d0669 100644 --- a/sys/riscv/include/vmparam.h +++ b/sys/riscv/include/vmparam.h @@ -257,5 +257,6 @@ extern vm_offset_t init_pt_va; * Need a page dump array for minidump. */ #define MINIDUMP_PAGE_TRACKING 1 +#define MINIDUMP_STARTUP_PAGE_TRACKING 1 #endif /* !_MACHINE_VMPARAM_H_ */ diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index f9b6e18899c6..59066eb96ae9 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1890,8 +1890,7 @@ startup_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag, pa = VM_PAGE_TO_PHYS(m); for (i = 0; i < pages; i++, pa += PAGE_SIZE) { -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING if ((wait & M_NODUMP) == 0) dump_add_page(pa); #endif @@ -1918,8 +1917,7 @@ startup_free(void *mem, vm_size_t bytes) if (va >= bootstart && va + bytes <= bootmem) pmap_remove(kernel_pmap, va, va + bytes); for (; bytes != 0; bytes -= PAGE_SIZE, m++) { -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING dump_drop_page(VM_PAGE_TO_PHYS(m)); #endif vm_page_unwire_noq(m); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4429ec067673..9ba31cb9e1b3 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -620,11 +620,7 @@ vm_page_startup(vm_offset_t vaddr) vm_page_dump = (void *)(uintptr_t)pmap_map(&vaddr, new_end, new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); bzero((void *)vm_page_dump, vm_page_dump_size); -#else - (void)last_pa; -#endif -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_STARTUP_PAGE_TRACKING /* * Include the UMA bootstrap pages, witness pages and vm_page_dump * in a crash dump. When pmap_map() uses the direct map, they are @@ -632,6 +628,9 @@ vm_page_startup(vm_offset_t vaddr) */ for (pa = new_end; pa < end; pa += PAGE_SIZE) dump_add_page(pa); +#endif +#else + (void)last_pa; #endif phys_avail[biggestone + 1] = new_end; #ifdef __amd64__ @@ -728,8 +727,7 @@ vm_page_startup(vm_offset_t vaddr) */ new_end = vm_reserv_startup(&vaddr, new_end); #endif -#if defined(__aarch64__) || defined(__amd64__) || \ - defined(__riscv) || defined(__powerpc64__) +#if MINIDUMP_PAGE_TRACKING && MINIDUMP_STARTUP_PAGE_TRACKING /* * Include vm_page_array and vm_reserv_array in a crash dump. */ From nobody Sat May 25 17:51:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmqFz26t8z5LHLr for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Sat, 25 May 2024 17:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmqFz1bmhz4X08; Sat, 25 May 2024 17:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716659463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c0Tbwz1Ub7l3H5OBLyo1j/tS9DraIjEiQqwPN2+6F1M=; b=ioQ4YEeNcrQseaOai1oUV/lyVHowBI0hmrPr7nwZ7A5F7L7yr0EIWmchtDslZJC9gPC2vB 1y+JP8QIpTrV3KRF1omB8QeUuYNwgegvt7oxJ+vxc6v4By5Rp2MVfxeQ00sWBKGS4SjM0W iJ+rfG3/8oG0LirGzsSVlVIPeSaGqaLrc6L7FRtrZ5jv3f1cF+a3TTBgHLnsC4TLRLDiBV 8xTE1LqrVS5xBy1+HwQj1SRbJjcOy6aBiqK0rlaxnNRDSmAEPA/tVZ5WI4UOcBOIKCcnOM CoKV+QLI3sRTGQMX6JsqLOwFQ1OlCk5vg6HyaqozNNRRY4sN6peEv8LCxDYBKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716659463; a=rsa-sha256; cv=none; b=fLzZIC8qKj2a05f8XqQo5ldehymj1WZ4+oj2KiNbT7sVWzH4rhMl0Oayhe7IM7MF5Gp9Qf bl1z6/ggr6gQK9Z7nCv/DqIA00dltCRvvG0kyoK+S/7SCKgNxOL+aVUm1QDrXxOCi8OQUC bGhs+tv64WpaDVzl1DoEvgfq+Skjgi7POkzy24CGnBtgq9PA8RzX2bjOWvtoUEaYglSCrT MZBzrPcmsht+BjfN/BHCewGFtDHE6lT9a3u76uA+0ZKpmJmU5jjnwCNAM7TDDSap9sqVKF O9MC6c8xX5sK8b7vbfpHzBVE/v1FxCH6U9GyuuymK3b9LYnuhx0WyBQfxVXSJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716659463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c0Tbwz1Ub7l3H5OBLyo1j/tS9DraIjEiQqwPN2+6F1M=; b=vve494Tlb00OHhlpG3SG4UuxGq0kG7aHeRMmhC+MZEBth6DAxhEuv1Je9NR2Z31ybrm0Xg vjt3LcMip85Yy1vtAkZEIK1RndRxvgrfLwvL4eugmTOeUCcf+s6hZsiTnR2zevdf3jLi22 slA6ZsBw3Usf4DahH+8Qb05lqZU3cbKoPIL4Z7v0ziycmJdq4myk7cPGTHsBQ5UUeUg8+u pxLU3oC/JWQwbJZv+t0UOTpW3SAPFJB8zFW7jj1Vilb1xNe7q9tkVW2tOpg+x/qYqsBIut vcIk7CPrn1O0uUZu6MrwcXmzsPSjz7bHha5rKyKSVt0znhnnyGsXSVDg/GO9Cw== 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 4VmqFz1BxnzRQ8; Sat, 25 May 2024 17:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PHp37p071448; Sat, 25 May 2024 17:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHp3uv071447; Sat, 25 May 2024 17:51:03 GMT (envelope-from git) Date: Sat, 25 May 2024 17:51:03 GMT Message-Id: <202405251751.44PHp3uv071447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska <mm@FreeBSD.org> Subject: git: 8f1b7a6fa676..02c5aa9b0928 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 02c5aa9b092818785ed8db4e2246a828278138e3 X-Git-Oldrev: 8f1b7a6fa6762ea4c89198ceb11c521f80b92ddc X-Git-Newrev: 02c5aa9b092818785ed8db4e2246a828278138e3 Auto-Submitted: auto-generated The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=8f1b7a6fa676..02c5aa9b0928 04bae5ec95f7 Disable high priority ZIO threads on FreeBSD and Linux 2dff7527d4a4 Replace usage of schedule_timeout with schedule_timeout_interruptible (#16150) a0f3c8aaf1e8 zdb: add missing cleanup for early return af5dbed3193e Fix scn_queue races on very old pools 3400127a75fd Fix ZIL clone records for legacy holes 414acbd37e0a Unbreak FreeBSD cross-build on MacOS broken in 051460b8b 1ede0c716bee libspl_assert: always link -lpthread on FreeBSD 41ae864b6999 Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN. 136c05321140 ZAP: Fix leaf references on zap_expand_leaf() errors abec7dcd30ac Linux: disable lockdep for a couple of locks 975a13259b87 Add support for parallel pool exports 89acef992bf3 Simplified the scope of the namespace lock f625d038d2ae tpool_dispatch: fail if it cannot start at least 1 worker. eced2e2f1e56 libzfs: Fix mounting datasets under thread limit pressure b64afa41d56e Better control the thread pool size when mounting datasets cc3869153431 zfs_ioc_send: use a dedicated taskq thread for send adda768e3eb9 spa: remove spa_taskq_dispatch_sync() 515c4dd2130a spa: flatten spa_taskq_dispatch_ent() 0a543db37111 spa_taskq_dispatch_ent: simplify arguments 91c46d4399e4 zdb: bring crash handling over from ztest e7b451941b92 zdb/ztest: use libspl backtrace for crashes 3974ef045ef2 libspl: lift backtrace into a separate file 1ea8c59441cd backtrace: rework for signal safety fa99d9cd9cbc zfs_dbgmsg_print: make FreeBSD and Linux consistent 3c941d181834 zdb/ztest: send dbgmsg output to stderr e675852bc1d5 dbuf: separate refcount calls for dbuf and dbuf_user a043b60f1eab Correct level handling in zstream recompress. d0d7c0d8f92d config/zfs-build.m4: sort vendors fec16b93c46d config/zfs-build.m4: add Alpine Linux bash-completion path efbef9e6cc1e FreeBSD: Add zfs_link_create() error handling 08648cf0da38 Allow block cloning to be interrupted by a signal. 7572e8ca04ad Avoid a gcc -Wint-to-pointer-cast warning 708be0f415c8 Linux 6.7 compat: detect if kernel defines intptr_t 34906f8bbee3 zap: reuse zap_leaf_t on dbuf reuse after shrink d0aa9dbccfb0 Use memset to zero stack allocations containing unions 8865dfbcaad4 Fix assertion in Persistent L2ARC 02c5aa9b0928 Destroy ARC buffer in case of fill error From nobody Sat May 25 17:58:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmqR43RKHz5LJ2k; Sat, 25 May 2024 17:58: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmqR42wtmz4XR9; Sat, 25 May 2024 17:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716659936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXs7LUHppWxKmf+/TQ5dXQfzqfUz2PlDLGqHmvCRthM=; b=g2WJyobuDpwQoByhXvkFVc3WiGIt/ityn/gsNFIyqLoiylrsLpvTncbHVJZ+VWosUu9Upz KQ79mrGrIZJr8rg5TKD+ttEn5Q/jI13kGR0s7pP/Zw+0pvTN6CDgE5yhd3dX+55YlnCs77 mIwFznRKipyX+cVzOMQ0UOFsP6TfPnFc0dfcDOxls7tA+ul/4pWp14u3yPYP+dt0DrX/qW qI9dO8wT/dzspiB9L8e2JwcWmHMKS5PH8PHEXTakQHjvM3zSIoTXn4Zu7EpUO/7KV1OqyP UVkZZZFmg2ZFLAr3MsTcztOJ71THd9gUqqunm07wqTh01Z4J3/rp3l5CgCElLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716659936; a=rsa-sha256; cv=none; b=XWRg2Beh9arE1/ohY35RhtB3ElSxplA956N2AEwNDjWefVYzt2NUYo7APREwYDRbU5qd2L kfR2aH8Uq1z34+GyRU3/5k/MM9ok8+00TvMXb1kTNAZSUWxM66+fpAJ0lM6twPP3JKBU0/ rSPNqTAk/95e9SAyyIzd4+BwKCXxouKEwYjJEVjwKLH+3FmX96asMuM48h6c4cnt9tpOwK /ue0KZ6OhkSENYgxBPmze5ktKSTJ+wZLqGRMz+djC40aQVeZV0/KiFfGUmx4vl6Cr3Wgzn 5Ww+FB/XP2dD2nUfgliiFtGowCJcu0nM8s2Qc1cEeo1KEQT1zXZElPNCZcWFDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716659936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXs7LUHppWxKmf+/TQ5dXQfzqfUz2PlDLGqHmvCRthM=; b=CVkjiWTr0WJHr6azPklGuWWK27rRuizENUiWxby9FUlpR8CiQ6EMOOaIKKK0Gr0uV8zmP+ Yjlsn2IdYXn4U3bFW2O13soK9cIvS2JxOJGF351TFRXkuMUXlshxfYSYcrbqUmUeYhgnzg 6lYWO/5UaQDCOdIYbXe5yXQi/66OakasI61MOX/K9zwan8in4QdoWe5GaLckPC2BYw/wWM ov/r5RyTO6R45eerUxhdzpd6yeJpQnRHjkJY95s5a8Eda6SEZ23YITuiQGfeoqOLrYm1U1 y+EM/EPHe3aypgziFFgiuwrn1NN/kktKdAeKdEHKkonrQXTY/21wEzK+SsZcfA== 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 4VmqR42GP9zRSl; Sat, 25 May 2024 17:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PHwumd077508; Sat, 25 May 2024 17:58:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHwuRw077506; Sat, 25 May 2024 17:58:56 GMT (envelope-from git) Date: Sat, 25 May 2024 17:58:56 GMT Message-Id: <202405251758.44PHwuRw077506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen <tuexen@FreeBSD.org> Subject: git: df9de82f54d1 - main - tcp: fix sending RST after second inp lookup List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: df9de82f54d13aa077889349e15d9bf7794a1e6f Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=df9de82f54d13aa077889349e15d9bf7794a1e6f commit df9de82f54d13aa077889349e15d9bf7794a1e6f Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2024-05-25 17:46:33 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-05-25 17:58:48 +0000 tcp: fix sending RST after second inp lookup When we first find an inp, we set also the tp. If then a second lookup is necessary, the inp is recomputed. If this fails, the tp is not cleared, which resulted in failing KASSERT. Therefore, clear the tp when staring the inp lookup procedure. Reported by: Jenkins Fixes: 02d15215cef2 ("tcp: improve blackhole support") MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 08ff84039c90..7faa815fc1ac 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -833,6 +833,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) ((thflags & (TH_ACK|TH_SYN)) == TH_SYN ? INPLOOKUP_RLOCKPCB : INPLOOKUP_WLOCKPCB); findpcb: + tp = NULL; #ifdef INET6 if (isipv6 && fwd_tag != NULL) { struct sockaddr_in6 *next_hop6; From nobody Sat May 25 18:02:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmqWg3902z5LJ52; Sat, 25 May 2024 18:02: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmqWg2j3zz4Y2P; Sat, 25 May 2024 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716660175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mL/a52VOhwYItYUoHZ+2U0hKLZPWxUIZJRLAWAdhq+Y=; b=XxDMzT8ISI9xP1LWEXmPNrZ43RYGfnjUCIZaWtOBVoMI6+LOvKRM3Pta629hoiSLtftywu WxT1/98i0TQDiy8k2/uSDKx0H0RMNWIpt4JrqsrS/c4AFOdeLIeGQjhRZsnMGSczH/MFHG 4t8GAyZaz6lPLTTHOpCwcZ8ZDKBgJhhjr2VitnFVpAeHUWuXiJwMT6D0TKIzfMBs6Chvmv igbSlQt4m/rcWx0JLkMIIZ2kjhhvjcbr1QIE8RW4UMe4XeRgQeEGGxyqQyRvmfaloJzklg fSEAYCGDSDw6bsexFVgrkbiaE0QWe7JhskXJqjMBiOJWyfIPGgo/wNdW/AQ6Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716660175; a=rsa-sha256; cv=none; b=WSBXCRIee5aQhFpfaM35Aaa0QJat+y9MQWFrsxQeoWg4hauNzfGiuKxf9bfE5cLwzLdFJC yW5vAc08SypzqiL28MFjAOK0k0lH76iPiEScRkKoENCJx3xij+0hzMFcZb+x3AzMM0Ev0h qZHvxV4ENuc0RpSOZhL42+ezigchRQaKZMY0qukKTFcImzl0AnuViOF5Jd/4kWjQfP3MI7 nM3eb5jb3vIGzjW6zmw1vsMDs/OPhrKjcjtFd+XVZWW5Miu2rxPbmHUokqXtdlz1okj+tA 5UdAQnEOhCh4gBckPKprJZdC/Yusj7KcfzFEIFysq6lQfKf1AqaUtdPocA2y8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716660175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mL/a52VOhwYItYUoHZ+2U0hKLZPWxUIZJRLAWAdhq+Y=; b=YDnAiX8SnHZ0BHfmaaSsNU8+zhJ8isI+47FE9JesPRZX3ydo7qB8+ZZevgVzlPBDMCsqGU e7sgkERQZ+h162FGioDRceGMMiHlz0bNVJALHwaDpMnN8oU7oWEApkhX5TDyJx4/w8x3cN +OE9LtKnpdUeoELs3Y76EGJQc0wMKv3lW/bjNUJdZ9KLEW6q7l8Zk55iMUCLdG/P7JX/oj UzCMaYa84asYqrTae1c39CpdzW4ayM/M+i6rYcE4DRscBe+BtKdQUmjSo3u1DnpxOFA9rg 7v2FpbUavEsANqTRj37a1+KEWfSdATl3wsqhKq/A/IQkOWnNh8KOfJ7iHioKJQ== 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 4VmqWg2JMczQfh; Sat, 25 May 2024 18:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PI2tsQ095395; Sat, 25 May 2024 18:02:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PI2tQv095393; Sat, 25 May 2024 18:02:55 GMT (envelope-from git) Date: Sat, 25 May 2024 18:02:55 GMT Message-Id: <202405251802.44PI2tQv095393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste <emaste@FreeBSD.org> Subject: git: b128bedfb95c - main - mptutil: correct man page date List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b128bedfb95c1fefe10e3375b07e200eff8c3664 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b128bedfb95c1fefe10e3375b07e200eff8c3664 commit b128bedfb95c1fefe10e3375b07e200eff8c3664 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-05-25 18:00:54 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-05-25 18:02:36 +0000 mptutil: correct man page date PR: 279201 Fixes: 9a49a3792940 ("mptutil: document that disabled/enab...") Sponsored by: The FreeBSD Foundation --- usr.sbin/mptutil/mptutil.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mptutil/mptutil.8 b/usr.sbin/mptutil/mptutil.8 index 47eb9e43d2b9..1aeaafbfa12e 100644 --- a/usr.sbin/mptutil/mptutil.8 +++ b/usr.sbin/mptutil/mptutil.8 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 24, 2024 +.Dd May 24, 2023 .Dt MPTUTIL 8 .Os .Sh NAME From nobody Sat May 25 18:27:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vmr4528nzz5LLnj; Sat, 25 May 2024 18:27:33 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mx-out-02.fh-muenster.de (mx-out-02.fh-muenster.de [212.201.120.206]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mx.fh-muenster.de", Issuer "GEANT OV RSA CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vmr446R56z4cqX; Sat, 25 May 2024 18:27:32 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Authentication-Results: mx1.freebsd.org; none Received: from mail-director-01.fh-muenster.de (mail-director-01.fh-muenster.de [185.149.215.227]) by mx-out-02.fh-muenster.de (Postfix) with ESMTPS id 66B56E0453; Sat, 25 May 2024 20:27:30 +0200 (CEST) Received: from smtpclient.apple (ip4d15f54e.dynamic.kabel-deutschland.de [77.21.245.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: tuexen) by mail-director-01.fh-muenster.de (Postfix) with ESMTPSA id EB1EC1A0048; Sat, 25 May 2024 20:27:29 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63"; protocol="application/pkcs7-signature"; micalg=sha-256 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: git: da76d349b6b1 - main - uma: Deduplicate uma_small_alloc From: tuexen@fh-muenster.de In-Reply-To: <202405251725.44PHPCSK026644@gitrepo.freebsd.org> Date: Sat, 25 May 2024 20:27:29 +0200 Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Content-Transfer-Encoding: quoted-printable Message-Id: <CEE600C9-BA44-4852-8537-EB70F299AA67@fh-muenster.de> References: <202405251725.44PHPCSK026644@gitrepo.freebsd.org> To: =?utf-8?Q?Bojan_Novkovi=C4=87?= <bnovkov@freebsd.org> X-Mailer: Apple Mail (2.3774.600.62) X-Spamd-Bar: ---- 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:680, ipnet:212.201.0.0/16, country:DE] X-Rspamd-Queue-Id: 4Vmr446R56z4cqX --Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 25. May 2024, at 19:25, Bojan Novkovi=C4=87 <bnovkov@freebsd.org> = wrote: >=20 > The branch main has been updated by bnovkov: With this commit, my arm64 VM (VMWare Fusion) stops booting right after printing the line WARNING: WITNESS option enabled, expect reduced performance. Same when doing a verbose boot. Best regards Michael >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dda76d349b6b104f4e70562304c800a07= 93dea18d >=20 > commit da76d349b6b104f4e70562304c800a0793dea18d > Author: Bojan Novkovi=C4=87 <bnovkov@FreeBSD.org> > AuthorDate: 2024-05-03 16:48:18 +0000 > Commit: Bojan Novkovi=C4=87 <bnovkov@FreeBSD.org> > CommitDate: 2024-05-25 17:24:46 +0000 >=20 > uma: Deduplicate uma_small_alloc >=20 > This commit refactors the UMA small alloc code and > removes most UMA machine-dependent code. > The existing machine-dependent uma_small_alloc code is almost = identical > across all architectures, except for powerpc where using the direct > map addresses involved extra steps in some cases. >=20 > The MI/MD split was replaced by a default uma_small_alloc > implementation that can be overridden by architecture-specific code = by > defining the UMA_MD_SMALL_ALLOC symbol. Furthermore, UMA_USE_DMAP = was > introduced to replace most UMA_MD_SMALL_ALLOC uses. >=20 > Reviewed by: markj, kib > Approved by: markj (mentor) > Differential Revision: https://reviews.freebsd.org/D45084 > --- > sys/amd64/amd64/uma_machdep.c | 71 = ------------------------------------------- > sys/amd64/include/vmparam.h | 6 ++-- > sys/arm64/arm64/uma_machdep.c | 69 = ----------------------------------------- > sys/arm64/include/vmparam.h | 2 +- > sys/conf/files.amd64 | 1 - > sys/conf/files.arm64 | 1 - > sys/conf/files.riscv | 1 - > sys/kern/subr_vmem.c | 6 ++-- > sys/powerpc/include/vmparam.h | 6 ++-- > sys/riscv/include/vmparam.h | 2 +- > sys/riscv/riscv/uma_machdep.c | 68 = ----------------------------------------- > sys/vm/uma_core.c | 43 ++++++++++++++++++++++++-- > sys/vm/vm_map.c | 8 ++--- > sys/vm/vm_radix.c | 2 +- > 14 files changed, 57 insertions(+), 229 deletions(-) >=20 > diff --git a/sys/amd64/amd64/uma_machdep.c = b/sys/amd64/amd64/uma_machdep.c > deleted file mode 100644 > index f83f0674cc4e..000000000000 > --- a/sys/amd64/amd64/uma_machdep.c > +++ /dev/null > @@ -1,71 +0,0 @@ > -/*- > - * SPDX-License-Identifier: BSD-2-Clause > - * > - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 1. Redistributions of source code must retain the above copyright > - * notice, this list of conditions and the following disclaimer. > - * 2. Redistributions in binary form must reproduce the above = copyright > - * notice, this list of conditions and the following disclaimer in = the > - * documentation and/or other materials provided with the = distribution. > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > - * SUCH DAMAGE. > - */ > - > -#include <sys/param.h> > -#include <sys/malloc.h> > -#include <vm/vm.h> > -#include <vm/vm_param.h> > -#include <vm/vm_page.h> > -#include <vm/vm_phys.h> > -#include <vm/vm_dumpset.h> > -#include <vm/uma.h> > -#include <vm/uma_int.h> > -#include <machine/md_var.h> > - > -void * > -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, = u_int8_t *flags, > - int wait) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - void *va; > - > - *flags =3D UMA_SLAB_PRIV; > - m =3D vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | > - VM_ALLOC_WIRED); > - if (m =3D=3D NULL) > - return (NULL); > - pa =3D m->phys_addr; > - if ((wait & M_NODUMP) =3D=3D 0) > - dump_add_page(pa); > - va =3D (void *)PHYS_TO_DMAP(pa); > - return (va); > -} > - > -void > -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - > - pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > - dump_drop_page(pa); > - m =3D PHYS_TO_VM_PAGE(pa); > - vm_page_unwire_noq(m); > - vm_page_free(m); > -} > diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h > index bff9bf840036..e5155a7c7d47 100644 > --- a/sys/amd64/include/vmparam.h > +++ b/sys/amd64/include/vmparam.h > @@ -72,12 +72,12 @@ > #endif >=20 > /* > - * We provide a machine specific single page allocator through the = use > - * of the direct mapped segment. This uses 2MB pages for reduced > + * We provide a single page allocator through the use of the > + * direct mapped segment. This uses 2MB pages for reduced > * TLB pressure. > */ > #if !defined(KASAN) && !defined(KMSAN) > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP > #endif >=20 > /* > diff --git a/sys/arm64/arm64/uma_machdep.c = b/sys/arm64/arm64/uma_machdep.c > deleted file mode 100644 > index f942248d4dcd..000000000000 > --- a/sys/arm64/arm64/uma_machdep.c > +++ /dev/null > @@ -1,69 +0,0 @@ > -/*- > - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 1. Redistributions of source code must retain the above copyright > - * notice, this list of conditions and the following disclaimer. > - * 2. Redistributions in binary form must reproduce the above = copyright > - * notice, this list of conditions and the following disclaimer in = the > - * documentation and/or other materials provided with the = distribution. > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > - * SUCH DAMAGE. > - */ > - > -#include <sys/param.h> > -#include <sys/malloc.h> > -#include <vm/vm.h> > -#include <vm/vm_param.h> > -#include <vm/vm_page.h> > -#include <vm/vm_phys.h> > -#include <vm/vm_dumpset.h> > -#include <vm/uma.h> > -#include <vm/uma_int.h> > -#include <machine/machdep.h> > - > -void * > -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, = u_int8_t *flags, > - int wait) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - void *va; > - > - *flags =3D UMA_SLAB_PRIV; > - m =3D vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | > - VM_ALLOC_WIRED); > - if (m =3D=3D NULL) > - return (NULL); > - pa =3D m->phys_addr; > - if ((wait & M_NODUMP) =3D=3D 0) > - dump_add_page(pa); > - va =3D (void *)PHYS_TO_DMAP(pa); > - return (va); > -} > - > -void > -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - > - pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > - dump_drop_page(pa); > - m =3D PHYS_TO_VM_PAGE(pa); > - vm_page_unwire_noq(m); > - vm_page_free(m); > -} > diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h > index ffa5a538504a..0dcd02d63938 100644 > --- a/sys/arm64/include/vmparam.h > +++ b/sys/arm64/include/vmparam.h > @@ -293,7 +293,7 @@ > #endif >=20 > #if !defined(KASAN) && !defined(KMSAN) > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP > #endif >=20 > #ifndef LOCORE > diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 > index 18dec5ed47b0..add27418ce08 100644 > --- a/sys/conf/files.amd64 > +++ b/sys/conf/files.amd64 > @@ -92,7 +92,6 @@ amd64/amd64/support.S standard > amd64/amd64/sys_machdep.c standard > amd64/amd64/trap.c standard > amd64/amd64/uio_machdep.c standard > -amd64/amd64/uma_machdep.c standard > amd64/amd64/vm_machdep.c standard > amd64/pci/pci_cfgreg.c optional pci > cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with = "${DTRACE_S}" > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > index a3d4fc09da89..8139a7af8ed3 100644 > --- a/sys/conf/files.arm64 > +++ b/sys/conf/files.arm64 > @@ -78,7 +78,6 @@ arm64/arm64/swtch.S standard > arm64/arm64/sys_machdep.c standard > arm64/arm64/trap.c standard > arm64/arm64/uio_machdep.c standard > -arm64/arm64/uma_machdep.c standard > arm64/arm64/undefined.c standard > arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack \ > compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*}" > diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv > index be7ae2b40a08..49c8ddd0c516 100644 > --- a/sys/conf/files.riscv > +++ b/sys/conf/files.riscv > @@ -67,7 +67,6 @@ riscv/riscv/sys_machdep.c standard > riscv/riscv/trap.c standard > riscv/riscv/timer.c standard > riscv/riscv/uio_machdep.c standard > -riscv/riscv/uma_machdep.c standard > riscv/riscv/unwind.c optional ddb | kdtrace_hooks | stack > riscv/riscv/vm_machdep.c standard >=20 > diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c > index 1c9a8a5be979..a706d944dc3f 100644 > --- a/sys/kern/subr_vmem.c > +++ b/sys/kern/subr_vmem.c > @@ -624,14 +624,14 @@ qc_drain(vmem_t *vm) > uma_zone_reclaim(vm->vm_qcache[i].qc_cache, UMA_RECLAIM_DRAIN); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP >=20 > static struct mtx_padalign __exclusive_cache_line vmem_bt_lock; >=20 > /* > * vmem_bt_alloc: Allocate a new page of boundary tags. > * > - * On architectures with uma_small_alloc there is no recursion; no = address > + * On architectures with UMA_USE_DMAP there is no recursion; no = address > * space need be allocated to allocate boundary tags. For the others, = we > * must handle recursion. Boundary tags are necessary to allocate new > * boundary tags. > @@ -707,7 +707,7 @@ vmem_startup(void) > vmem_bt_zone =3D uma_zcreate("vmem btag", > sizeof(struct vmem_btag), NULL, NULL, NULL, NULL, > UMA_ALIGN_PTR, UMA_ZONE_VM); > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > mtx_init(&vmem_bt_lock, "btag lock", NULL, MTX_DEF); > uma_prealloc(vmem_bt_zone, BT_MAXALLOC); > /* > diff --git a/sys/powerpc/include/vmparam.h = b/sys/powerpc/include/vmparam.h > index 89982a618bc7..250da8298610 100644 > --- a/sys/powerpc/include/vmparam.h > +++ b/sys/powerpc/include/vmparam.h > @@ -111,6 +111,8 @@ >=20 > #define KERNBASE 0x00100100 /* start of kernel virtual */ >=20 > +#define UMA_MD_SMALL_ALLOC > + > #ifdef AIM > #ifndef __powerpc64__ > #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNEL_SR << ADDR_SR_SHFT) > @@ -122,13 +124,13 @@ > * Use the direct-mapped BAT registers for UMA small allocs. This > * takes pressure off the small amount of available KVA. > */ > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP >=20 > #else /* Book-E */ >=20 > /* Use the direct map for UMA small allocs on powerpc64. */ > #ifdef __powerpc64__ > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP > #else > #define VM_MIN_KERNEL_ADDRESS 0xc0000000 > #define VM_MAX_KERNEL_ADDRESS 0xffffefff > diff --git a/sys/riscv/include/vmparam.h b/sys/riscv/include/vmparam.h > index d2014654b691..5711bc8c347e 100644 > --- a/sys/riscv/include/vmparam.h > +++ b/sys/riscv/include/vmparam.h > @@ -234,7 +234,7 @@ > #define VM_INITIAL_PAGEIN 16 > #endif >=20 > -#define UMA_MD_SMALL_ALLOC > +#define UMA_USE_DMAP >=20 > #ifndef LOCORE > extern vm_paddr_t dmap_phys_base; > diff --git a/sys/riscv/riscv/uma_machdep.c = b/sys/riscv/riscv/uma_machdep.c > deleted file mode 100644 > index 54e0d25800f6..000000000000 > --- a/sys/riscv/riscv/uma_machdep.c > +++ /dev/null > @@ -1,68 +0,0 @@ > -/*- > - * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 1. Redistributions of source code must retain the above copyright > - * notice, this list of conditions and the following disclaimer. > - * 2. Redistributions in binary form must reproduce the above = copyright > - * notice, this list of conditions and the following disclaimer in = the > - * documentation and/or other materials provided with the = distribution. > - * > - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > - * SUCH DAMAGE. > - */ > - > -#include <sys/param.h> > -#include <sys/malloc.h> > -#include <vm/vm.h> > -#include <vm/vm_param.h> > -#include <vm/vm_page.h> > -#include <vm/vm_phys.h> > -#include <vm/vm_dumpset.h> > -#include <vm/uma.h> > -#include <vm/uma_int.h> > - > -void * > -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, = u_int8_t *flags, > - int wait) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - void *va; > - > - *flags =3D UMA_SLAB_PRIV; > - m =3D vm_page_alloc_noobj_domain(domain, malloc2vm_flags(wait) | > - VM_ALLOC_WIRED); > - if (m =3D=3D NULL) > - return (NULL); > - pa =3D m->phys_addr; > - if ((wait & M_NODUMP) =3D=3D 0) > - dump_add_page(pa); > - va =3D (void *)PHYS_TO_DMAP(pa); > - return (va); > -} > - > -void > -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) > -{ > - vm_page_t m; > - vm_paddr_t pa; > - > - pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > - dump_drop_page(pa); > - m =3D PHYS_TO_VM_PAGE(pa); > - vm_page_unwire_noq(m); > - vm_page_free(m); > -} > diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c > index d185f12448ee..f9b6e18899c6 100644 > --- a/sys/vm/uma_core.c > +++ b/sys/vm/uma_core.c > @@ -2079,6 +2079,28 @@ contig_alloc(uma_zone_t zone, vm_size_t bytes, = int domain, uint8_t *pflag, > bytes, wait, 0, ~(vm_paddr_t)0, 1, 0, VM_MEMATTR_DEFAULT)); > } >=20 > +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) > +void * > +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t = *flags, > + int wait) > +{ > + vm_page_t m; > + vm_paddr_t pa; > + void *va; > + > + *flags =3D UMA_SLAB_PRIV; > + m =3D vm_page_alloc_noobj_domain(domain, > + malloc2vm_flags(wait) | VM_ALLOC_WIRED); > + if (m =3D=3D NULL) > + return (NULL); > + pa =3D m->phys_addr; > + if ((wait & M_NODUMP) =3D=3D 0) > + dump_add_page(pa); > + va =3D (void *)PHYS_TO_DMAP(pa); > + return (va); > +} > +#endif > + > /* > * Frees a number of pages to the system > * > @@ -2141,6 +2163,21 @@ pcpu_page_free(void *mem, vm_size_t size, = uint8_t flags) > kva_free(sva, size); > } >=20 > +#if defined(UMA_USE_DMAP) && !defined(UMA_MD_SMALL_ALLOC) > +void > +uma_small_free(void *mem, vm_size_t size, uint8_t flags) > +{ > + vm_page_t m; > + vm_paddr_t pa; > + > + pa =3D DMAP_TO_PHYS((vm_offset_t)mem); > + dump_drop_page(pa); > + m =3D PHYS_TO_VM_PAGE(pa); > + vm_page_unwire_noq(m); > + vm_page_free(m); > +} > +#endif > + > /* > * Zero fill initializer > * > @@ -3154,7 +3191,7 @@ uma_startup1(vm_offset_t virtual_avail) > smr_init(); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > extern void vm_radix_reserve_kva(void); > #endif >=20 > @@ -3174,7 +3211,7 @@ uma_startup2(void) > vm_map_unlock(kernel_map); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > /* Set up radix zone to use noobj_alloc. */ > vm_radix_reserve_kva(); > #endif > @@ -5171,7 +5208,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count) >=20 > pages =3D howmany(count, keg->uk_ipers) * keg->uk_ppera; >=20 > -#ifdef UMA_MD_SMALL_ALLOC > +#ifdef UMA_USE_DMAP > if (keg->uk_ppera > 1) { > #else > if (1) { > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > index 3111dda6e99d..3c7afcb6642f 100644 > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -172,7 +172,7 @@ static void vm_map_wire_entry_failure(vm_map_t = map, vm_map_entry_t entry, > start =3D end; \ > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP >=20 > /* > * Allocate a new slab for kernel map entries. The kernel map may be = locked or > @@ -264,7 +264,7 @@ vm_map_startup(void) > kmapentzone =3D uma_zcreate("KMAP ENTRY", sizeof(struct vm_map_entry), > NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, > UMA_ZONE_VM | UMA_ZONE_NOBUCKET); > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > /* Reserve an extra map entry for use when replenishing the reserve. = */ > uma_zone_reserve(kmapentzone, KMAPENT_RESERVE + 1); > uma_prealloc(kmapentzone, KMAPENT_RESERVE + 1); > @@ -660,7 +660,7 @@ _vm_map_unlock(vm_map_t map, const char *file, int = line) >=20 > VM_MAP_UNLOCK_CONSISTENT(map); > if (map->system_map) { > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > if (map =3D=3D kernel_map && (map->flags & MAP_REPLENISH) !=3D 0) { > uma_prealloc(kmapentzone, 1); > map->flags &=3D ~MAP_REPLENISH; > @@ -937,7 +937,7 @@ vm_map_entry_create(vm_map_t map) > { > vm_map_entry_t new_entry; >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > if (map =3D=3D kernel_map) { > VM_MAP_ASSERT_LOCKED(map); >=20 > diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c > index cfc5a82eacc8..13f9d36194ab 100644 > --- a/sys/vm/vm_radix.c > +++ b/sys/vm/vm_radix.c > @@ -82,7 +82,7 @@ vm_radix_node_free(struct pctrie *ptree, void *node) > uma_zfree_smr(vm_radix_node_zone, node); > } >=20 > -#ifndef UMA_MD_SMALL_ALLOC > +#ifndef UMA_USE_DMAP > void vm_radix_reserve_kva(void); > /* > * Reserve the KVA necessary to satisfy the node allocation. --Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCEfMw ggUSMIID+qADAgECAgkA4wvV+K8l2YEwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAkRFMSsw KQYDVQQKDCJULVN5c3RlbXMgRW50ZXJwcmlzZSBTZXJ2aWNlcyBHbWJIMR8wHQYDVQQLDBZULVN5 c3RlbXMgVHJ1c3QgQ2VudGVyMSUwIwYDVQQDDBxULVRlbGVTZWMgR2xvYmFsUm9vdCBDbGFzcyAy MB4XDTE2MDIyMjEzMzgyMloXDTMxMDIyMjIzNTk1OVowgZUxCzAJBgNVBAYTAkRFMUUwQwYDVQQK EzxWZXJlaW4genVyIEZvZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMg ZS4gVi4xEDAOBgNVBAsTB0RGTi1QS0kxLTArBgNVBAMTJERGTi1WZXJlaW4gQ2VydGlmaWNhdGlv biBBdXRob3JpdHkgMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMtg1/9moUHN0vqH l4pzq5lN6mc5WqFggEcVToyVsuXPztNXS43O+FZsFVV2B+pG/cgDRWM+cNSrVICxI5y+NyipCf8F XRgPxJiZN7Mg9mZ4F4fCnQ7MSjLnFp2uDo0peQcAIFTcFV9Kltd4tjTTwXS1nem/wHdN6r1ZB+Ba L2w8pQDcNb1lDY9/Mm3yWmpLYgHurDg0WUU2SQXaeMpqbVvAgWsRzNI8qIv4cRrKO+KA3Ra0Z3qL NupOkSk9s1FcragMvp0049ENF4N1xDkesJQLEvHVaY4l9Lg9K7/AjsMeO6W/VRCrKq4Xl14zzsjz 9AkH4wKGMUZrAcUQDBHHWekCAwEAAaOCAXQwggFwMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU k+PYMiba1fFKpZFK4OpL4qIMz+EwHwYDVR0jBBgwFoAUv1kgNgB5oKAia4zV8mHSuCzLgkowEgYD VR0TAQH/BAgwBgEB/wIBAjAzBgNVHSAELDAqMA8GDSsGAQQBga0hgiwBAQQwDQYLKwYBBAGBrSGC LB4wCAYGZ4EMAQICMEwGA1UdHwRFMEMwQaA/oD2GO2h0dHA6Ly9wa2kwMzM2LnRlbGVzZWMuZGUv cmwvVGVsZVNlY19HbG9iYWxSb290X0NsYXNzXzIuY3JsMIGGBggrBgEFBQcBAQR6MHgwLAYIKwYB BQUHMAGGIGh0dHA6Ly9vY3NwMDMzNi50ZWxlc2VjLmRlL29jc3ByMEgGCCsGAQUFBzAChjxodHRw Oi8vcGtpMDMzNi50ZWxlc2VjLmRlL2NydC9UZWxlU2VjX0dsb2JhbFJvb3RfQ2xhc3NfMi5jZXIw DQYJKoZIhvcNAQELBQADggEBAIcL/z4Cm2XIVi3WO5qYi3FP2ropqiH5Ri71sqQPrhE4eTizDnS6 dl2e6BiClmLbTDPo3flq3zK9LExHYFV/53RrtCyD2HlrtrdNUAtmB7Xts5et6u5/MOaZ/SLick0+ hFvu+c+Z6n/XUjkurJgARH5pO7917tALOxrN5fcPImxHhPalR6D90Bo0fa3SPXez7vTXTf/D6OWS T1k+kEcQSrCFWMBvf/iu7QhCnh7U3xQuTY+8npTD5+32GPg8SecmqKc22CzeIs2LgtjZeOJVEqM7 h0S2EQvVDFKvaYwPBt/QolOLV5h7z/0HJPT8vcP9SpIClxvyt7bPZYoaorVyGTkwggWsMIIElKAD AgECAgcbY7rQHiw9MA0GCSqGSIb3DQEBCwUAMIGVMQswCQYDVQQGEwJERTFFMEMGA1UEChM8VmVy ZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYu MRAwDgYDVQQLEwdERk4tUEtJMS0wKwYDVQQDEyRERk4tVmVyZWluIENlcnRpZmljYXRpb24gQXV0 aG9yaXR5IDIwHhcNMTYwNTI0MTEzODQwWhcNMzEwMjIyMjM1OTU5WjCBjTELMAkGA1UEBhMCREUx RTBDBgNVBAoMPFZlcmVpbiB6dXIgRm9lcmRlcnVuZyBlaW5lcyBEZXV0c2NoZW4gRm9yc2NodW5n c25ldHplcyBlLiBWLjEQMA4GA1UECwwHREZOLVBLSTElMCMGA1UEAwwcREZOLVZlcmVpbiBHbG9i YWwgSXNzdWluZyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ07eRxH3h+Gy8Zp 1xCeOdfZojDbchwFfylfS2jxrRnWTOFrG7ELf6Gr4HuLi9gtzm6IOhDuV+UefwRRNuu6cG1joL6W LkDh0YNMZj0cZGnlm6Stcq5oOVGHecwX064vXWNxSzl660Knl5BpBb+Q/6RAcL0D57+eGIgfn5mI TQ5HjUhfZZkQ0tkqSe3BuS0dnxLLFdM/fx5ULzquk1enfnjK1UriGuXtQX1TX8izKvWKMKztFwUk P7agCwf9TRqaA1KgNpzeJIdl5Of6x5ZzJBTN0OgbaJ4YWa52fvfRCng8h0uwN89Tyjo4EPPLR22M ZD08WkVKusqAfLjz56dMTM0CAwEAAaOCAgUwggIBMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYDVR0P AQH/BAQDAgEGMCkGA1UdIAQiMCAwDQYLKwYBBAGBrSGCLB4wDwYNKwYBBAGBrSGCLAEBBDAdBgNV HQ4EFgQUazqYi/nyU4na4K2yMh4JH+iqO3QwHwYDVR0jBBgwFoAUk+PYMiba1fFKpZFK4OpL4qIM z+EwgY8GA1UdHwSBhzCBhDBAoD6gPIY6aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9v dC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDBAoD6gPIY6aHR0cDovL2NkcDIucGNhLmRmbi5kZS9n bG9iYWwtcm9vdC1nMi1jYS9wdWIvY3JsL2NhY3JsLmNybDCB3QYIKwYBBQUHAQEEgdAwgc0wMwYI KwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2ZXIvT0NTUDBKBggrBgEF BQcwAoY+aHR0cDovL2NkcDEucGNhLmRmbi5kZS9nbG9iYWwtcm9vdC1nMi1jYS9wdWIvY2FjZXJ0 L2NhY2VydC5jcnQwSgYIKwYBBQUHMAKGPmh0dHA6Ly9jZHAyLnBjYS5kZm4uZGUvZ2xvYmFsLXJv b3QtZzItY2EvcHViL2NhY2VydC9jYWNlcnQuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQCBeEWkTqR/ DlXwCbFqPnjMaDWpHPOVnj/z+N9rOHeJLI21rT7H8pTNoAauusyosa0zCLYkhmI2THhuUPDVbmCN T1IxQ5dGdfBi5G5mUcFCMWdQ5UnnOR7Ln8qGSN4IFP8VSytmm6A4nwDO/afr0X9XLchMX9wQEZc+ lgQCXISoKTlslPwQkgZ7nu7YRrQbtQMMONncsKk/cQYLsgMHM8KNSGMlJTx6e1du94oFOO+4oK4v 9NsH1VuEGMGpuEvObJAaguS5Pfp38dIfMwK/U+d2+dwmJUFvL6Yb+qQTkPp8ftkLYF3sv8pBoGH7 EUkp2KgtdRXYShjqFu9VNCIaE40GMIIHKTCCBhGgAwIBAgIMJrRClNKRzetB0jc/MA0GCSqGSIb3 DQEBCwUAMIGNMQswCQYDVQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVp bmVzIERldXRzY2hlbiBGb3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUw IwYDVQQDDBxERk4tVmVyZWluIEdsb2JhbCBJc3N1aW5nIENBMB4XDTIyMDUzMDEzMjIxNVoXDTI1 MDUyOTEzMjIxNVowgcQxCzAJBgNVBAYTAkRFMRwwGgYDVQQIDBNOb3JkcmhlaW4tV2VzdGZhbGVu MREwDwYDVQQHDAhNdWVuc3RlcjEUMBIGA1UECgwLRkggTXVlbnN0ZXIxMjAwBgNVBAsMKUZhY2hi ZXJlaWNoIEVsZWt0cm90ZWNobmlrIHVuZCBJbmZvcm1hdGlrMQ8wDQYDVQQEDAZUdWV4ZW4xEDAO BgNVBCoMB01pY2hhZWwxFzAVBgNVBAMMDk1pY2hhZWwgVHVleGVuMIICIjANBgkqhkiG9w0BAQEF AAOCAg8AMIICCgKCAgEA2QZ7Uheto325SEnX2BTxBvYnz7u/BVmzxKlogaR4K0MA8ZcfNIdQkiJU efjL6imq21BSFsr/tXcODFZmPrvx9aIxjntCxmEFr7qFaw3e3mUIxJyj5n6BxjzZ/hyJte8LBDbj zj+e8WPUzXmYbSxtrh9kgw8NMx3+bo3Hslic+PkKEGx9JJp2I2TEs88xD0rHC2Ljwcfk6bS9jC+/ BAuY/TsbJoq+8d64DYSLGiIYbvMMuxM2C8BlpHLIOLx2FaH+uMqdH2dLVvCacZJ9YzHvvZY8O2nQ OBFCG1UMpX5YLHN8g/t02a+IBt+oe97JMdJ/kZsPjolI98dcRdzz0hTXZql2xvp6zlocm9iGTRcv dCSxy+0x4CIZD1EkVX9zCPGpzdTXnrU+zvnz14Uq3Wbfl3GiVgK0Avr1enfZepruAxAy7KGIm2zi /qY3XSkN8fvWJmYnomOjCRjaPtqS/azmnyeodsxlVhqQKbES65u/PbOXjOlhiYAvemS0IbK4iR76 3iSmkpwSNpJt6BCtFJN+w3Y8tztCP66KPPC1Fri1oj27KPaf04J66MkSjlQdpI7POS6lDyN7X2Hw tgZKRVA94h/JvZp4ld7mTzXTEW2tdO5azPILsL9xOYjSS5VIyUFF4MoxSbfZtXWaZFsMC1fXDNNL uRDrISotdwADuU75Fe0CAwEAAaOCAk4wggJKMD4GA1UdIAQ3MDUwDwYNKwYBBAGBrSGCLAEBBDAQ Bg4rBgEEAYGtIYIsAQEECjAQBg4rBgEEAYGtIYIsAgEECjAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE AwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwHQYDVR0OBBYEFFDbROYIxDr3fvlX tkXqx7T8lihxMB8GA1UdIwQYMBaAFGs6mIv58lOJ2uCtsjIeCR/oqjt0MCAGA1UdEQQZMBeBFXR1 ZXhlbkBmaC1tdWVuc3Rlci5kZTCBjQYDVR0fBIGFMIGCMD+gPaA7hjlodHRwOi8vY2RwMS5wY2Eu ZGZuLmRlL2Rmbi1jYS1nbG9iYWwtZzIvcHViL2NybC9jYWNybC5jcmwwP6A9oDuGOWh0dHA6Ly9j ZHAyLnBjYS5kZm4uZGUvZGZuLWNhLWdsb2JhbC1nMi9wdWIvY3JsL2NhY3JsLmNybDCB2wYIKwYB BQUHAQEEgc4wgcswMwYIKwYBBQUHMAGGJ2h0dHA6Ly9vY3NwLnBjYS5kZm4uZGUvT0NTUC1TZXJ2 ZXIvT0NTUDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDEucGNhLmRmbi5kZS9kZm4tY2EtZ2xvYmFs LWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDBJBggrBgEFBQcwAoY9aHR0cDovL2NkcDIucGNhLmRm bi5kZS9kZm4tY2EtZ2xvYmFsLWcyL3B1Yi9jYWNlcnQvY2FjZXJ0LmNydDANBgkqhkiG9w0BAQsF AAOCAQEALubmL854icQMxKxOxQK+deXTjC6CLYnUDwB8MvnDC+BSeh3tUHT37fSgsK1ShNUSNJX0 YF0VYLfZ6+lPyaFYLArVrAIHqvDiVURaulB9NA+3gck/VSuRz4ILYBy61XbcGQQ8Wx+g6TcqsjsF oOhqEBycj5QuITj+EFmX8nvfo0dJtVa2OPDk1N9beLfQBcLhspJ/nv0pKhpNWv5YETG26YqYfsC7 FA/ZNGvRcoOPkjkDhBTtG+qq9DDD75XtGEBZhYXbnG15tn4/UV07B+UyK4/cqQSA+My5FML3YsQw EYrV9klVD/mLMOdZV5+95xt7O8IdYeHrBapVlhANH5bFazGCBJ0wggSZAgEBMIGeMIGNMQswCQYD VQQGEwJERTFFMEMGA1UECgw8VmVyZWluIHp1ciBGb2VyZGVydW5nIGVpbmVzIERldXRzY2hlbiBG b3JzY2h1bmdzbmV0emVzIGUuIFYuMRAwDgYDVQQLDAdERk4tUEtJMSUwIwYDVQQDDBxERk4tVmVy ZWluIEdsb2JhbCBJc3N1aW5nIENBAgwmtEKU0pHN60HSNz8wDQYJYIZIAWUDBAIBBQCgggHPMBgG CSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTI0MDUyNTE4MjcyOVowLwYJ KoZIhvcNAQkEMSIEIILojSQPANYry+cIzINsG7NUXj0vtI4ouU7w+NklPELfMIGvBgkrBgEEAYI3 EAQxgaEwgZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZvZXJkZXJ1bmcg ZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsMB0RGTi1QS0kx JTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3rQdI3PzCBsQYL KoZIhvcNAQkQAgsxgaGggZ4wgY0xCzAJBgNVBAYTAkRFMUUwQwYDVQQKDDxWZXJlaW4genVyIEZv ZXJkZXJ1bmcgZWluZXMgRGV1dHNjaGVuIEZvcnNjaHVuZ3NuZXR6ZXMgZS4gVi4xEDAOBgNVBAsM B0RGTi1QS0kxJTAjBgNVBAMMHERGTi1WZXJlaW4gR2xvYmFsIElzc3VpbmcgQ0ECDCa0QpTSkc3r QdI3PzANBgkqhkiG9w0BAQsFAASCAgCNAoZrQUSWvokvjyCmnvEMcZo9uT2WanD5FVHosrTOpPIn ROotVrPSM+XoqX0UnEso86Uh4qe62xEjlclscEl9dZcR82AocPuKywtXr9ZlxaFKNF8A2yXd0QVr ALiCYM5lXag8bNmyGTvqDNMjpwqNMqEM+NZ/DhH/NkoLyfRTv7MWxjlPplh0QmPK/74fD2R8b4H3 +eob5rHRAt2SGDb3R44e4gmC/4HHg1wsqEdx84d5El9Y4fpDBP4jnzXieQYEGWUQ0OVjN9huSHFs EP+3K4G3eow7FPeTLxOLB7gG1NW0v62/FUrJL6JAY1XaVK92aolXLjjm4/cnAIf0vOZmCOFX85k/ vQt0x4UWCWcm369J6AESJharDBubJj5kxvobNEwi2P2b6VKgOitCVL1ZpvAMrdOYa6FmLzRfZMO0 9wNE00t98IL21PKUkXiI4cbLKETpdLSat6UFS/VlmWhuDyfc9lbRzbKa0S6c7/SCcyQQA5TEoJYe xmxTISrWhIPdpjG2Tk/PTwk6NcZEQ7RSsLEU/K3s25FoBKGOgdkN5Y95v+4Taldut5xCvVkUBnNX KI7fXbH3vmd+tl3tPXBLdpn17rgDog08WD1hntWOUfWDCG1PyKXrtsMpMRb/KUL4Z+YlsiuAJhFP gQbjanrHPXWdmIcVEzBfCNdLtunfhwAAAAAAAA== --Apple-Mail=_576BEDC6-D888-4C3A-82B9-E9B6340CFA63-- From nobody Sat May 25 19:31:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmsTy4CzNz5LSxC; Sat, 25 May 2024 19:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmsTy1KH5z4jf7; Sat, 25 May 2024 19:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUqwIrxeG4TBdhFk3zDHk4ag5/2Lc/ZQ8RyqG8W/W/w=; b=FMXvrE7kgPyNvRWW3bJJ85JVUZJnYeFKrNlZnLVDOOM772/6WFeKVxnSHak8RpuokDtnCE tSYVPP+QYzlRKeFyUDyuni9QtOEq6+AbGJE32AKeS3iG5YSdqhNueyv4OUS6zcytWkqNgP FaSB+Z9okxJKM16hr+IfcsCpwdkIoBjBk+poDIlqSfu300AU0A9rC8MfrP987y0dozDj3+ tuXMh6X9xbZN7L1xPQBAoyr0W4l4yDmuytav0cnnQfYPFzfIOP+6oDvF3ba5MLI8hlJ3hh MkpNw+VdyiKSHb0cg4iXflv5gNVBbhy3MsaCNApeKq25V0iSVN0W7JgSRa6Jwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665494; a=rsa-sha256; cv=none; b=Mh4bd6K1RcQzGcvpJx+VNOGt/9ytzfaH9XUDstx3bjkwcZgD8A53gPDO0H4LkNXf6xpMft sqOFvE9HBbZX8U9jxZu299jgH6nNyYvzevnw1jyM0af8DrSKwZ5VSYxiXR5ShF7kokHIyN lHYt4klnZb4qrhHTM1VKwCW3Azz/L2fdDAiYLhGEZ43S5/mN/6XYWG9IDmPBKWXsl4HvsQ X4IRuZC5oiLFJH9R4n7pfGXuPCxRgvnMxNb4COApsgXsJZalvJh4YZwosH7d+AuUFhPaR3 8Vdj5nMpQTe6rYW0+YhUOiwgNoezygDPHjVkBdHxQtKti78PAZst3n3KRkfioA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SUqwIrxeG4TBdhFk3zDHk4ag5/2Lc/ZQ8RyqG8W/W/w=; b=Vn9fyydUkcWKPJ4Wpb1Ga0ay3Vr/xtXVB7kigci0paukwCX9Bzp1mlk84/vPEBZvBQbwR5 eohsDjhLuUVOTZWw5R8qQTOME3vAfAuXzMqc6ZAEF1uVe/YZ1cw7RDAXFiyzSH08mREiW7 ihWqkHR+NZz1ZtKYLeWNEx0KDA4ivycKC1uQEjsZkPzP7LsXm5rT310+kZ0w1+TU0VX71d ViAV7L/ZdN960MTYIQevg7uIhv2luUjQQpq/w1yaocAM7nUE0fwUaMZDGjtbGWKF23h4Ri W+/NMhrOZPjCMDdRo2j0yoeTVJgpjVm1fGewvb/tRYT0U0mNx7HvxAacXGoBUQ== 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 4VmsTy0xMWzTLT; Sat, 25 May 2024 19:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PJVYRW043336; Sat, 25 May 2024 19:31:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PJVYr9043333; Sat, 25 May 2024 19:31:34 GMT (envelope-from git) Date: Sat, 25 May 2024 19:31:34 GMT Message-Id: <202405251931.44PJVYr9043333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: e8a80b4e50e8 - stable/14 - sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e8a80b4e50e8d992fe46a95509b37fc457288f93 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e8a80b4e50e8d992fe46a95509b37fc457288f93 commit e8a80b4e50e8d992fe46a95509b37fc457288f93 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:04 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-25 19:30:26 +0000 sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO FreeBSD's implementation of SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO does not exactly work as intended. The problem is essentially that both IOCTLs return the same information, while in fact the information returned currently by dsp_oss_audioinfo() is what _only_ SNDCTL_ENGINEINFO is meant to return. This behavior is also noted in the OSS manual [1] (see bold paragraph in "Audio engines and device files" section), but since e8c0d15a64fa ("sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)") we can actually fix this, because we now expose only a single device for each soundcard, and create the engines (channels) internally. SNDCTL_ENGINEINFO will now report info about all channels in a given device, and SNDCTL_AUDIOINFO[_EX] will only report information about /dev/dspX. To make this work, we also have to modify the SNDCTL_SYSINFO IOCTL to report the number of audio devices and audio engines correctly. While here, modernize the minimum and maximum channel counting in both SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO. Currently these IOCTLs will report only up to 2 channels, which is no longer the case. [1] http://manuals.opensound.com/developer/SNDCTL_AUDIOINFO.html PR: 246231, 252761 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45164 (cherry picked from commit e07f9178502b7cbc0769fc10e99ad0d013f437fd) --- sys/dev/sound/pcm/dsp.c | 179 +++++++++++++++++++++++++++++++++++++++++----- sys/dev/sound/pcm/dsp.h | 3 +- sys/dev/sound/pcm/mixer.c | 8 ++- sys/dev/sound/pcm/sound.c | 8 +-- 4 files changed, 173 insertions(+), 25 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 6e5fad048d40..4ee5d7c6738c 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -778,9 +778,15 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, ret = sound_oss_card_info((oss_card_info *)arg); break; case SNDCTL_AUDIOINFO: + ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + false); + break; case SNDCTL_AUDIOINFO_EX: + ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + true); + break; case SNDCTL_ENGINEINFO: - ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg); + ret = dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg); break; case SNDCTL_MIXERINFO: ret = mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg); @@ -2034,8 +2040,152 @@ dsp_unit2name(char *buf, size_t len, struct pcm_channel *ch) return (NULL); } +/** + * @brief Handler for SNDCTL_AUDIOINFO. + * + * Gathers information about the audio device specified in ai->dev. If + * ai->dev == -1, then this function gathers information about the current + * device. If the call comes in on a non-audio device and ai->dev == -1, + * return EINVAL. + * + * This routine is supposed to go practically straight to the hardware, + * getting capabilities directly from the sound card driver, side-stepping + * the intermediate channel interface. + * + * @note + * Calling threads must not hold any snddev_info or pcm_channel locks. + * + * @param dev device on which the ioctl was issued + * @param ai ioctl request data container + * @param ex flag to distinguish between SNDCTL_AUDIOINFO from + * SNDCTL_AUDIOINFO_EX + * + * @retval 0 success + * @retval EINVAL ai->dev specifies an invalid device + */ +int +dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex) +{ + struct pcmchan_caps *caps; + struct pcm_channel *ch; + struct snddev_info *d; + uint32_t fmts; + int i, minch, maxch, unit; + + /* + * If probing the device that received the ioctl, make sure it's a + * DSP device. (Users may use this ioctl with /dev/mixer and + * /dev/midi.) + */ + if (ai->dev == -1 && i_dev->si_devsw != &dsp_cdevsw) + return (EINVAL); + + for (unit = 0; pcm_devclass != NULL && + unit < devclass_get_maxunit(pcm_devclass); unit++) { + d = devclass_get_softc(pcm_devclass, unit); + if (!PCM_REGISTERED(d)) { + d = NULL; + continue; + } + + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + if ((ai->dev == -1 && d->dsp_dev == i_dev) || + (ai->dev == unit)) { + PCM_UNLOCK(d); + break; + } else { + PCM_UNLOCK(d); + d = NULL; + } + } + + /* Exhausted the search -- nothing is locked, so return. */ + if (d == NULL) + return (EINVAL); + + /* XXX Need Giant magic entry ??? */ + + PCM_UNLOCKASSERT(d); + PCM_LOCK(d); + + bzero((void *)ai, sizeof(oss_audioinfo)); + ai->dev = unit; + strlcpy(ai->name, device_get_desc(d->dev), sizeof(ai->name)); + ai->pid = -1; + ai->card_number = -1; + ai->port_number = -1; + ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1; + ai->legacy_device = unit; + snprintf(ai->devnode, sizeof(ai->devnode), "/dev/dsp%d", unit); + ai->enabled = device_is_attached(d->dev) ? 1 : 0; + ai->next_play_engine = 0; + ai->next_rec_engine = 0; + ai->busy = 0; + ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; + ai->iformats = 0; + ai->oformats = 0; + ai->min_rate = INT_MAX; + ai->max_rate = 0; + ai->min_channels = INT_MAX; + ai->max_channels = 0; + + /* Gather global information about the device. */ + CHN_FOREACH(ch, d, channels.pcm) { + CHN_UNLOCKASSERT(ch); + CHN_LOCK(ch); + + /* + * Skip physical channels if we are servicing SNDCTL_AUDIOINFO, + * or VCHANs if we are servicing SNDCTL_AUDIOINFO_EX. + */ + if ((ex && (ch->flags & CHN_F_VIRTUAL) != 0) || + (!ex && (ch->flags & CHN_F_VIRTUAL) == 0)) { + CHN_UNLOCK(ch); + continue; + } + + if ((ch->flags & CHN_F_BUSY) == 0) { + ai->busy |= (ch->direction == PCMDIR_PLAY) ? + OPEN_WRITE : OPEN_READ; + } + + ai->caps |= + ((ch->flags & CHN_F_VIRTUAL) ? PCM_CAP_VIRTUAL : 0) | + ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : + PCM_CAP_INPUT); + + caps = chn_getcaps(ch); + + minch = INT_MAX; + maxch = 0; + fmts = 0; + for (i = 0; caps->fmtlist[i]; i++) { + fmts |= AFMT_ENCODING(caps->fmtlist[i]); + minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch); + maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch); + } + + if (ch->direction == PCMDIR_PLAY) + ai->oformats |= fmts; + else + ai->iformats |= fmts; + + ai->min_rate = min(ai->min_rate, caps->minspeed); + ai->max_rate = max(ai->max_rate, caps->maxspeed); + ai->min_channels = min(ai->min_channels, minch); + ai->max_channels = max(ai->max_channels, maxch); + + CHN_UNLOCK(ch); + } + + PCM_UNLOCK(d); + + return (0); +} + static int -dsp_oss_audioinfo_cb(void *data, void *arg) +dsp_oss_engineinfo_cb(void *data, void *arg) { struct dsp_cdevpriv *priv = data; struct pcm_channel *ch = arg; @@ -2047,10 +2197,10 @@ dsp_oss_audioinfo_cb(void *data, void *arg) } /** - * @brief Handler for SNDCTL_AUDIOINFO. + * @brief Handler for SNDCTL_ENGINEINFO * - * Gathers information about the audio device specified in ai->dev. If - * ai->dev == -1, then this function gathers information about the current + * Gathers information about the audio device's engine specified in ai->dev. + * If ai->dev == -1, then this function gathers information about the current * device. If the call comes in on a non-audio device and ai->dev == -1, * return EINVAL. * @@ -2066,11 +2216,9 @@ dsp_oss_audioinfo_cb(void *data, void *arg) * * @retval 0 success * @retval EINVAL ai->dev specifies an invalid device - * - * @todo Verify correctness of Doxygen tags. ;) */ int -dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) +dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai) { struct pcmchan_caps *caps; struct pcm_channel *ch; @@ -2113,7 +2261,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) CHN_LOCK(ch); if (ai->dev == -1) { if (devfs_foreach_cdevpriv(i_dev, - dsp_oss_audioinfo_cb, ch) != 0) { + dsp_oss_engineinfo_cb, ch) != 0) { devname = dsp_unit2name(buf, sizeof(buf), ch); } @@ -2182,18 +2330,13 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai) * if any channel is mono, minch = 1; * and if all channels are mono, maxch = 1. */ - minch = 0; + minch = INT_MAX; maxch = 0; fmts = 0; for (i = 0; caps->fmtlist[i]; i++) { - fmts |= caps->fmtlist[i]; - if (AFMT_CHANNEL(caps->fmtlist[i]) > 1) { - minch = (minch == 0) ? 2 : minch; - maxch = 2; - } else { - minch = 1; - maxch = (maxch == 0) ? 1 : maxch; - } + fmts |= AFMT_ENCODING(caps->fmtlist[i]); + minch = min(AFMT_CHANNEL(caps->fmtlist[i]), minch); + maxch = max(AFMT_CHANNEL(caps->fmtlist[i]), maxch); } if (ch->direction == PCMDIR_PLAY) diff --git a/sys/dev/sound/pcm/dsp.h b/sys/dev/sound/pcm/dsp.h index b81e60dc19b5..7559e855d4e1 100644 --- a/sys/dev/sound/pcm/dsp.h +++ b/sys/dev/sound/pcm/dsp.h @@ -36,6 +36,7 @@ extern struct cdevsw dsp_cdevsw; int dsp_make_dev(device_t); void dsp_destroy_dev(device_t); char *dsp_unit2name(char *, size_t, struct pcm_channel *); -int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *); +int dsp_oss_audioinfo(struct cdev *, oss_audioinfo *, bool); +int dsp_oss_engineinfo(struct cdev *, oss_audioinfo *); #endif /* !_PCMDSP_H_ */ diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 9811496853c8..130333c7c442 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1282,9 +1282,13 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, case SNDCTL_CARDINFO: return (sound_oss_card_info((oss_card_info *)arg)); case SNDCTL_AUDIOINFO: + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + false)); case SNDCTL_AUDIOINFO_EX: - case SNDCTL_ENGINEINFO: - return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg, + true)); + case SNDCTL_ENGINEINFO: + return (dsp_oss_engineinfo(i_dev, (oss_audioinfo *)arg)); case SNDCTL_MIXERINFO: return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); } diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index e66462af2a71..072d42c4e989 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -718,9 +718,9 @@ sound_oss_sysinfo(oss_sysinfo *si) /* * Iterate over PCM devices and their channels, gathering up data - * for the numaudios and openedaudio fields. + * for the numaudioengines and openedaudio fields. */ - si->numaudios = 0; + si->numaudioengines = 0; bzero((void *)&si->openedaudio, sizeof(si->openedaudio)); j = 0; @@ -737,7 +737,7 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_UNLOCKASSERT(d); PCM_LOCK(d); - si->numaudios += PCM_CHANCOUNT(d); + si->numaudioengines += PCM_CHANCOUNT(d); CHN_FOREACH(c, d, channels.pcm) { CHN_UNLOCKASSERT(c); @@ -751,7 +751,6 @@ sound_oss_sysinfo(oss_sysinfo *si) PCM_UNLOCK(d); } - si->numaudioengines = si->numaudios; si->numsynths = 0; /* OSSv4 docs: this field is obsolete */ /** @@ -769,6 +768,7 @@ sound_oss_sysinfo(oss_sysinfo *si) si->numtimers = 0; si->nummixers = mixer_count; si->numcards = devclass_get_maxunit(pcm_devclass); + si->numaudios = devclass_get_maxunit(pcm_devclass); /* OSSv4 docs: Intended only for test apps; API doesn't really have much of a concept of cards. Shouldn't be used by applications. */ From nobody Sat May 25 19:31:36 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmsV10nD9z5LSxr; Sat, 25 May 2024 19:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmsV03dsvz4jhK; Sat, 25 May 2024 19:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=foiaQ1gM5atx6NWyZ3Fv+dHJgEYVSndpWP/eM9go+Mk=; b=ULbJohLnlTqUiZ969nb4wg0qCTJsx1/qjwVCRLk2SO9yqaf6Ct5OasGJ9ulIq4iW5l0lxN ey/aDfxwiZ67b8ZmGY3a3UF8PzaIdS+jLngDI7yMndEnGsesfLWchYq5lTHjyZXzxcpySA +ldSxxJ554CcMlIHuKWBLGVRP5YffsPIz7gfQ9l077gVBla7VV0RkPkxpTVWUQlMAEUWsK EM0URr62qHUrQ+CeV3k5gArxHKAbY1OOMEXMy11Yuyn8S9k9jr2+AVtTBXHwKhTgtDz6Ry Q5NQ5YvlkLQCEN5GZ4TTM2LldIUUrlKQo+1VPyOM5bRBHI2RYo3M2ejZFUphqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665496; a=rsa-sha256; cv=none; b=QRUvNXWprPioKGVQE9uuqoz0dJL4uFyCfaCvKPsPFObGfeaFUVPlyO892yiyTd45O6UyFT RP8KDwaxXx1wrirg+tJ9IPD5S9rOf+dV+TQNZ92Jek/PNWlLSnMVgQL8VC09Q7WAiKFews mPW0M/8ol+EzNXFb8og7Y0HWCerCKyx5Iqkj71hoS0aICTCYIpt+ZBzWI6eTsaDrxcPdQg JwIBO6lsy09MBysjmji9sbPkMOPTthmysA+IU7r5JoVFA+ylhtt9+EYnxnPeUFcBLyF2U7 f/2XlFvfrWolv8zZ89OFxPfdkoBIT+mYYba/KAfj0bLoEz5kyj0sfETu5pXbCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=foiaQ1gM5atx6NWyZ3Fv+dHJgEYVSndpWP/eM9go+Mk=; b=sMV3ItnSZcPjCvNndMrEqbi45pr10Cf6SgfvE3VtMJEW2V2FOoA48/tC1H/0wbTP/pZCPP 0OamXlCN4DAOBH87oR/ZR1M495s1EqSIqFJIIpjRsl3CQka4P1fQJ3RsPYZNT1+XcWWstu tEAycblAu4EmVp3Sp1QxhqkTzsBXYJM6HrtkWjVWsro8W+SThGWNTGFgXdMlVUMyP+9sGQ NbeZArXzuWi4vbVZaReEocBnDXBIMm/UCQVWukcd1h1xw56LS8bpUWrdMglXPXi3guJa7n Z/KbW0wewlsosHvmsxktyaeTWavSCc6FDpsbaswJUXf2u5lL7O1h9KSWrrrB7Q== 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 4VmsV031XQzV9q; Sat, 25 May 2024 19:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PJVafW043441; Sat, 25 May 2024 19:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PJVam5043438; Sat, 25 May 2024 19:31:36 GMT (envelope-from git) Date: Sat, 25 May 2024 19:31:36 GMT Message-Id: <202405251931.44PJVam5043438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: cd254b9243d3 - stable/14 - mixer(8): Ignore mixer_open() failures for the -a option List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: cd254b9243d3d0f4d86b388f919dc744086fb002 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=cd254b9243d3d0f4d86b388f919dc744086fb002 commit cd254b9243d3d0f4d86b388f919dc744086fb002 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:25 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-25 19:30:49 +0000 mixer(8): Ignore mixer_open() failures for the -a option The most likely reason mixer_open() will fail is because either the device doesn't exist, or because it is disabled, so there is not reason to kill the application. Instead, continue and print the rest of the enabled mixers. PR: 277615 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45151 (cherry picked from commit 0e80798518be673bdad7245b627cb5bd7ec08888) --- usr.sbin/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 47d8e6359b73..284ea955b7b4 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -99,7 +99,7 @@ main(int argc, char *argv[]) for (i = 0; i < n; i++) { (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i); if ((m = mixer_open(buf)) == NULL) - errx(1, "%s: no such mixer", buf); + continue; initctls(m); if (sflag) printrecsrc(m, oflag); From nobody Sat May 25 19:31:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmsV25Y8Bz5LT66; Sat, 25 May 2024 19:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmsV22Ll9z4jbq; Sat, 25 May 2024 19:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B7TLZkPLd08r2ZJz6A1pXZqh63MHh0MzteiAPweii+k=; b=H6x6vRqGsk1UBg/MzA3wQWSOIWOWoLKOan3xSrVHqW7WcUqFC4zwUs0tSw1QCYxehvDKA+ i3TnyDOE/G3a1peN+C5XlJP/wFP6eCfNyzKqrXKT2j3PwKkBMVvXy349FCB8rO8gPJZ9Xg oTzIv6/1QrWrJ4qufAzuwMWmRa77WE97dx6aHFPs3bdFNyIjlTXOdJ9r9rCndvUksaFM9l l8p+H6/ixxHiBUX3l7s92iKVEGKy/L4JFPR0FxfPlwy21tHzsGwhwyNtJOdMU2hPHGJVOM USP8smGBB88NbbEujPRAbAG4SV4QbW83xtQ33y6plqHZLDGwsBA4swcOJyds5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665498; a=rsa-sha256; cv=none; b=r0ibBiBmvIcds9MoXHq7qxmfG+NVBfJhNhuc46OeRlmQ7Sio85ifYrNIJb9gz9WTrhTMDN 4MGmL0abQyAlUOppN3Xs0r5lqv4MtnN8i9SGN/opMMWfHYHQ4jdCmeT0IZDzSWPrwdzOC/ ylXm33B5agsifAl77KvOzSCX4cyEz3BSo9L4zjf4TMK9naUgI7oTb3FvU5NCjJeDEqjA5y OR/BvXch/cosMN3y2vhIJ6lcvQDVjHMumK4lWTX8DBN8ywElqnVQsvc8WaZKT2rJaB+H0t KmlokEJTuKVZbtsI48EqsSD580RtRUC1ptoh3V/jx+o0H3xQNVqlBj6SuNEpNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B7TLZkPLd08r2ZJz6A1pXZqh63MHh0MzteiAPweii+k=; b=xCwycuCa2YT5ghTrePuKOSumVvCtxzHEbmXlmtYxgZsvBoxTaZnnzP5Vs+12eMO4h5STli CR40X6tFsxQBUvqpENx/mdxdBL569/sdaJjR98pT105ne05h6G6rXGFrnjN2zFHgxuhmZm 3pIU6t/RH6WjbXHQJ7j46rKrh5Q4mnCbmwKmtyj1bty/FeKSaHliW5rOHGv7+wNEXiQC7N kjitmSZaPf67uCF79Zl80cbeAT6i8Nf1Q5WXKsRYNIE7q8oA4RRV1Bf5MqCQp4pgxrUjAk S2zI7ML9OyezMDJ5OBNTzyKnc0MZgVJpnt7lD/dd05jHx5xU7F3g0Zh477exAQ== 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 4VmsV142CBzTPx; Sat, 25 May 2024 19:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PJVbVH043481; Sat, 25 May 2024 19:31:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PJVbiH043478; Sat, 25 May 2024 19:31:37 GMT (envelope-from git) Date: Sat, 25 May 2024 19:31:37 GMT Message-Id: <202405251931.44PJVbiH043478@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 0a1eb394d7b6 - stable/14 - mixer(3): Implement mixer_get_path() function List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0a1eb394d7b6dcc32d1d7411873886a835900dbd Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0a1eb394d7b6dcc32d1d7411873886a835900dbd commit 0a1eb394d7b6dcc32d1d7411873886a835900dbd Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:36 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-25 19:31:05 +0000 mixer(3): Implement mixer_get_path() function This is better than hardcoding device paths in mixer applications. Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45275 (cherry picked from commit 67c89b21b95601c01bafe5a0c518d320a39111c0) --- lib/libmixer/Makefile | 1 + lib/libmixer/Symbol.map | 4 ++++ lib/libmixer/mixer.3 | 40 +++++++++++++++++++++++++++++++++++++--- lib/libmixer/mixer.c | 25 +++++++++++++++++++++++++ lib/libmixer/mixer.h | 1 + 5 files changed, 68 insertions(+), 3 deletions(-) diff --git a/lib/libmixer/Makefile b/lib/libmixer/Makefile index 6ca17a9d020d..3f8a4dad4a65 100644 --- a/lib/libmixer/Makefile +++ b/lib/libmixer/Makefile @@ -22,6 +22,7 @@ MLINKS+= mixer.3 mixer_get_dunit.3 MLINKS+= mixer.3 mixer_set_dunit.3 MLINKS+= mixer.3 mixer_get_mode.3 MLINKS+= mixer.3 mixer_get_nmixers.3 +MLINKS+= mixer.3 mixer_get_path.3 MLINKS+= mixer.3 MIX_ISDEV.3 MLINKS+= mixer.3 MIX_ISMUTE.3 MLINKS+= mixer.3 MIX_ISREC.3 diff --git a/lib/libmixer/Symbol.map b/lib/libmixer/Symbol.map index f16e13d66e4c..2ce39fd058ab 100644 --- a/lib/libmixer/Symbol.map +++ b/lib/libmixer/Symbol.map @@ -19,3 +19,7 @@ FBSD_1.7 { mixer_get_mode; mixer_get_nmixers; }; + +FBSD_1.8 { + mixer_get_path; +}; diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index a3593898ed68..c8a7ee1148a8 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -40,6 +40,7 @@ .Nm mixer_set_dunit , .Nm mixer_get_mode , .Nm mixer_get_nmixers , +.Nm mixer_get_path , .Nm MIX_ISDEV , .Nm MIX_ISMUTE , .Nm MIX_ISREC , @@ -86,6 +87,8 @@ Mixer library (libmixer, -lmixer) .Ft int .Fn mixer_get_nmixers "void" .Ft int +.Fn mixer_get_path "char * buf" "size_t size" "int unit" +.Ft int .Fn MIX_ISDEV "struct mixer *m" "int devno" .Ft int .Fn MIX_ISMUTE "struct mixer *m" "int devno" @@ -398,7 +401,21 @@ The function returns the maximum mixer unit number. Although this might sound as incorrect behavior, given that one would expect "nmixers" to refer to the total number of active mixers, it is more intuitive -for applications that want to loop through all mixer devices. +for applications that want to loop through all mixer devices (see the +.Sx EXAMPLES +section). +.Pp +The +.Fn mixer_get_path +function writes the path of the mixer device specified in the +.Ar unit +argument to the buffer specified in +.Ar buf . +.Ar unit +can be either -1, in which case +.Fn mixer_get_path +will fetch the path of the default mixer, or between 0 and the maximum mixer +unit. .Pp The .Fn MIX_ISDEV @@ -470,9 +487,10 @@ The .Fn mixer_set_mute , .Fn mixer_mod_recsrc , .Fn mixer_get_dunut , -.Fn mixer_set_dunit +.Fn mixer_set_dunit , +.Fn mixer_get_nmixers , and -.Fn mixer_get_nmixers +.Fn mixer_get_path functions return 0 or positive values on success and -1 on failure. .Pp The @@ -542,6 +560,22 @@ TAILQ_FOREACH(dp, &m->devs, devs) { (void)mixer_close(m); .Ed +.Ss Loop through all mixer devices in the system +.Bd -literal +struct mixer *m; +char buf[NAME_MAX]; +int n; + +if ((n = mixer_get_nmixers()) < 0) + errx(1, "no mixers present in the system"); +for (i = 0; i < n; i++) { + (void)mixer_get_path(buf, sizeof(buf), i); + if ((m = mixer_open(buf)) == NULL) + continue; + ... + (void)mixer_close(m); +} +.Ed .Sh SEE ALSO .Xr queue 3 , .Xr sysctl 3 , diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c index 93ace1d0c69b..4abbed9b27d3 100644 --- a/lib/libmixer/mixer.c +++ b/lib/libmixer/mixer.c @@ -493,3 +493,28 @@ mixer_get_nmixers(void) return (si.nummixers); } + +/* + * Get the full path to a mixer device. + */ +int +mixer_get_path(char *buf, size_t size, int unit) +{ + size_t n; + + if (!(unit == -1 || (unit >= 0 && unit < mixer_get_nmixers()))) { + errno = EINVAL; + return (-1); + } + if (unit == -1) + n = strlcpy(buf, BASEPATH, size); + else + n = snprintf(buf, size, BASEPATH "%d", unit); + + if (n >= size) { + errno = ENOMEM; + return (-1); + } + + return (0); +} diff --git a/lib/libmixer/mixer.h b/lib/libmixer/mixer.h index cb9575c5f012..80a4b5c91a82 100644 --- a/lib/libmixer/mixer.h +++ b/lib/libmixer/mixer.h @@ -115,6 +115,7 @@ int mixer_get_dunit(void); int mixer_set_dunit(struct mixer *, int); int mixer_get_mode(int); int mixer_get_nmixers(void); +int mixer_get_path(char *, size_t, int); __END_DECLS From nobody Sat May 25 19:31:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmsV30dZqz5LT3d; Sat, 25 May 2024 19:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmsV265tzz4jhh; Sat, 25 May 2024 19:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQ3eRUKVcg6+ouUWR91iPUwpmqFzSZrCdhpv1IQS3EE=; b=rLjjGAq0fDaJK02yxMCuWqRal1HfLSYt3NtO277qi/Ff8suECpyEcUWepMLsVmnTnNHSkU 5Vt0jgl9//4aYU+zPgDZmPjrQP/dIVhbJkXARaAxmjG09hQ9cVBgJN8BBk2S+IwbS2g7rg 7KrVPEcssoefDAv09diURSr3od60wKDDEk/Lj/4VchJjvYMwaIlV5Q7e+FdMkYPNd/v5Zl OG5IIxUZrSmssfy3SknAEJp7GHgq5ZvrPytckVFT1YA8rnjZ2lQr3H79droBFjSwfRXyIi 9fFsH60sDdJokzzZviPLB5cdTL4zTrd/suz/BqAWIAJCt/DY3jiEaSK6yZoICw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665498; a=rsa-sha256; cv=none; b=V8IxLM/0wkxeIZ3CVdjjyTPgmWL3e8roEOppDRBEP9/1jscDKTxiIgn+VPtYxjKYsp6QX+ EkaQgF6dfh2ZZWcvwTm93hMRTsJcdpT815GF6rP7zpDZtEwSDSqGBnUqqNk/TBTrWsqjTY /8RVz6DPfHjwns2YZ7Ya60XXN49tlfhSpXbteh2KsQz3+nj3mZZzaaw2wnLrnIswWRVqm/ OHONHdZ16bb/qvYeTzeEf9gLnDct5F/tl8xCFT3I26nYSfCw0JCz2m+W9vlj3NREjFwrkh 9X3OluPmWa16xukjwOglaVLVrVwIGpezISpJ/5dCfBO79s9tUObOHHw13N9yCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iQ3eRUKVcg6+ouUWR91iPUwpmqFzSZrCdhpv1IQS3EE=; b=qUgzkoitrMoz8sBjZ7OU17XL98S7d+mmi86wLAxPHFQJ62+TM+XMap5trqS6zJxYnSpM39 jwSy113e98zPuUdxD1AwIMyViKt4qzTUnKq9ZtwhvS3SXcS5r8zoc/f32zwHde3ZEZ/55d rXNCRP0JuB+Fxo7XMF91w3wLP8cyLyKEVBrcVhgfIjQAQMga1Ii/krRgIpNnwDYDi1ItLr IwPkZYs5op5sHbB57h12FquqTtqXbC2TVVsJ/eUSOpJ+QBKVVCeLQIHbt42JMqlXrzB67x okepgzonrtuguW0Kb5qAdowejHdfrIU68SbKIK67wJGFxfjBS6C+aUFFqZMD4A== 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 4VmsV24grKzVdw; Sat, 25 May 2024 19:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PJVcfN043527; Sat, 25 May 2024 19:31:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PJVcJu043524; Sat, 25 May 2024 19:31:38 GMT (envelope-from git) Date: Sat, 25 May 2024 19:31:38 GMT Message-Id: <202405251931.44PJVcJu043524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: e279b7aa5d31 - stable/14 - mixer(8): Use mixer_get_path() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e279b7aa5d31722d3edc83a47b0814168e5bce69 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e279b7aa5d31722d3edc83a47b0814168e5bce69 commit e279b7aa5d31722d3edc83a47b0814168e5bce69 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:43 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-25 19:31:12 +0000 mixer(8): Use mixer_get_path() Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45276 (cherry picked from commit e3b94b375e1d2098e9e2c07bd0079e92f6a6fe4f) --- usr.sbin/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 284ea955b7b4..07dd16536495 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -97,7 +97,7 @@ main(int argc, char *argv[]) if ((n = mixer_get_nmixers()) < 0) errx(1, "no mixers present in the system"); for (i = 0; i < n; i++) { - (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i); + (void)mixer_get_path(buf, sizeof(buf), i); if ((m = mixer_open(buf)) == NULL) continue; initctls(m); From nobody Sat May 25 19:31:40 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmsV54BF0z5LTBm; Sat, 25 May 2024 19:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmsV46xDsz4jhr; Sat, 25 May 2024 19:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E1BxgcK9UizVUMWg92aO1KUB8qtd+7ijt0gM35tVUqo=; b=akhDgcSzI6sqCvC6QbEw5FyYu7T1Qu2MtXaftjpQc1VieKdbkwsYNioVG6bX6+L7dSroIs yKH/7ZDifak/vWaZzRwi6touytTj7+Qrjbw4E/0LynUdhsTZhWUfbHP/pbT22hX3qO9jr6 xnFCoZVcvQupADxYRDdEHbGSjbfD2sZ7xR47KhK8+3JfW6vA1IUQn+I312MgE9KdLSQ2IY wwLXzyNRvtXCQPHPIxw9X/KDOE6vcXTTbPF0n+bXVImbJdJVdjWzy47gALKzx/PvTdKYZ2 I1DnbFPDLiR7EiPxK7LdKUP1lt7j4mVMxy0vuPeuMEQxuJw8iwIpUwNAZq/fqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665501; a=rsa-sha256; cv=none; b=GTmorIHnzFUwopZP5879aTe1+X8DmYF0lBwhXm68X/xdbPKzpfNgKYEzVSi3lHvstp5fzE AmFGNFePfA5bD7KrDpwdcUcnRTZaeRnNFdZHM5lu0+P+XHgMBbU2wuwmmRNwG4gHzh4HYv a9Nw4eGX4jOcWFp7Fcad1pLLFvzcPv5iAGguYsK/GZdESHwnOcPzwp3ulIUzj7+E6UbQUK KMTDZEEnOVNr8StORg5hz9kaCL4ZZ4ExgUGWwn4zMX8wP7tjTd1HvO2zScIjECjBMvyqGf hexcCAY80fSikpuy/SLWtUcDt8oQsVhXFfX4XTvQt2tc20k82WJ5xLIBw8RPXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E1BxgcK9UizVUMWg92aO1KUB8qtd+7ijt0gM35tVUqo=; b=cGNoazvjVqSwvuFACG1xkWxpFv/7Lm1iAENRyLBwhu/1IQbU2Eg5pRmPO/7qHQLaS6v0Ml 3M7FURw+LiIq9e8YGxJfHejc+THpDJxpT1kic2aDORwUNASmW0hNmkmvcaRGMPjw0tZcj0 VtA1KGpCIQQNbRrtcFh4nJdWZXG7i3m5Z6Suj5v3jMDaf1uS66P7O7kUQ+D3tkBrfEb0Y0 xp0yJxXVk42mmcbSKTJgTGvZKgR70fldP3CU1MiMD08lApGn9V5ykRZHkH1iMy/rmFTkHR skvzEpJWQlx3a1ZC8pYs96jbTGEjzk31YIa4t2/G68scv6b+E0I69zRVLxi7DA== 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 4VmsV46YZXzTPy; Sat, 25 May 2024 19:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PJVea5043638; Sat, 25 May 2024 19:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PJVe4a043635; Sat, 25 May 2024 19:31:40 GMT (envelope-from git) Date: Sat, 25 May 2024 19:31:40 GMT Message-Id: <202405251931.44PJVe4a043635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 0aa767021c19 - stable/14 - sound: Fix minchn, maxchn and fmts in sndstat_get_caps() List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0aa767021c19ece8ab5ba99eb65d045700b09869 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa767021c19ece8ab5ba99eb65d045700b09869 commit 0aa767021c19ece8ab5ba99eb65d045700b09869 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:55 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-25 19:31:26 +0000 sound: Fix minchn, maxchn and fmts in sndstat_get_caps() The current implementation (incorrectly) passes the channel encoding value to AFMT_CHANNEL(), which will always return 0, since the channel number bits are masked out by AFMT_ENCODING(). Also add missing fmts initialization and aggregate encoding formats into it directly. Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45312 (cherry picked from commit 425a7bc465d4a6393c88c2e79c5ad77befda2a97) --- sys/dev/sound/pcm/sndstat.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index bbcb2fda7c29..6880ce383ba4 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -330,7 +330,6 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, uint32_t *max_rate, uint32_t *fmts, uint32_t *minchn, uint32_t *maxchn) { struct pcm_channel *c; - unsigned int encoding; int dir; dir = play ? PCMDIR_PLAY : PCMDIR_REC; @@ -347,11 +346,11 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, return; } + *fmts = 0; *min_rate = UINT32_MAX; *max_rate = 0; *minchn = UINT32_MAX; *maxchn = 0; - encoding = 0; CHN_FOREACH(c, d, channels.pcm) { struct pcmchan_caps *caps; int i; @@ -364,9 +363,9 @@ sndstat_get_caps(struct snddev_info *d, bool play, uint32_t *min_rate, *min_rate = min(caps->minspeed, *min_rate); *max_rate = max(caps->maxspeed, *max_rate); for (i = 0; caps->fmtlist[i]; i++) { - encoding |= AFMT_ENCODING(caps->fmtlist[i]); - *minchn = min(AFMT_CHANNEL(encoding), *minchn); - *maxchn = max(AFMT_CHANNEL(encoding), *maxchn); + *fmts |= AFMT_ENCODING(caps->fmtlist[i]); + *minchn = min(AFMT_CHANNEL(caps->fmtlist[i]), *minchn); + *maxchn = max(AFMT_CHANNEL(caps->fmtlist[i]), *maxchn); } CHN_UNLOCK(c); } From nobody Sat May 25 19:31:39 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmsV42KPsz5LT6T; Sat, 25 May 2024 19:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmsV35zSbz4k39; Sat, 25 May 2024 19:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2SYJH8yWgHtU4Q1OdbY1CQSbv4kgj8WcXVfPPsOFRQ4=; b=aAz2gjIxrRUT8JZTPMExbyWa7tSFbTeB7etBQiurVsSnbC4eGcUz5fwae8WZZ1Z/gWs6vf wrKtpY6D/fw4M8UF4xESETjQzUUs9EFwHc6+uucDWu/r3I2SE0C3mO9bPUIuAwmVWABPb/ RgkYnL1ScwO6Nkegm7S6BoUPJhqMEV6dPSqGqAZ1hB1nemt3EWwnRSg3L54No1EXdKXRCA kG48cTzC09hUU9Lc67VQNmGfdcBJXx9yggYlKHsSt+AxnJ4oaJpAJk0uAg6R/OzVygkPdg KBA0vI6yOGpABVxpQY7mI3OkEtS/7fNF2eeZaP0+QCYGywPqrvN9SQFndZLPEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716665499; a=rsa-sha256; cv=none; b=qKLTiKINOgA55iQGb2Cu0up26kEv/1PtpRNdUg1sTTWwRGJSsnSlosnon1KWUfi2l7HAZv I+5u2YueMQzsSeUdfJK7n4ddE8h3xejBApEs3jnJMeAOABp8SR1vx6FaHof8OOqRYIJP7w OHJ63THGS0vZL0vBqq6JsJQCEacyQwNE8sxag+TnbePsuCp9dWnvJTXq9vHmMbLVoBmDCd MPBW28SmYYr2LS2Mrimx5bX8OPWyFTb3AEtZ8H7ywWAtPaVjZWBcj9JorG9Cx5c8dg5Fgt o4YBHtXHeiNjJwZNR+GVjTQRqpzx3CcNt59QLTj97ct3VXbWxIeLvzYfhCaHzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716665499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2SYJH8yWgHtU4Q1OdbY1CQSbv4kgj8WcXVfPPsOFRQ4=; b=rh/zCdSEY9DQXiiF/tKgOgjfHB7M1ELanqQWm0gVy1TeRbf64OPScCEdhHHRqcVHqVxob9 lCphH6AxggCuj/ehinuF1vjps1r3CJxxKPCYOV8uz6vfMAKW51c4ZGvctQuDXbLkR06MBK a+Wy//S8HqmQjGGa8woU4UupfraCq2KcVkEu3+loCBy/5AlxlGL1KrLTcotm4Ug5bEdWAh BGJ8sHAP6Hz5SVEa7vHHyWzBqHJhNIhoAUecYuYMfgsSIPkRM/dQ137KZp9Uf26Fmg8Lnx Q2Qyf6YsF3hh60/zrrLFhJcuWCIRIpYYg/On7NAfiNUBiYSY7eqsmPNYOQMdSQ== 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 4VmsV35WXxzVdx; Sat, 25 May 2024 19:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PJVdON043576; Sat, 25 May 2024 19:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PJVd25043573; Sat, 25 May 2024 19:31:39 GMT (envelope-from git) Date: Sat, 25 May 2024 19:31:39 GMT Message-Id: <202405251931.44PJVd25043573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 63be29379cb1 - stable/14 - mixer.3: Fix mandoc -Tlint warnings List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 63be29379cb11463bdb6170862e6df85087f5cbc Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=63be29379cb11463bdb6170862e6df85087f5cbc commit 63be29379cb11463bdb6170862e6df85087f5cbc Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2024-05-23 00:57:49 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-25 19:31:19 +0000 mixer.3: Fix mandoc -Tlint warnings Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45290 (cherry picked from commit 1ab62c8d067454b77bc9fb1c5aac75f263bb4143) --- lib/libmixer/mixer.3 | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index c8a7ee1148a8..4008867ef2fb 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -19,7 +19,6 @@ .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN .\" THE SOFTWARE. .\" - .Dd May 22, 2024 .Dt MIXER 3 .Os @@ -168,13 +167,15 @@ is always equal to the number of that pcmX device. For example, if the audio device's number is 0 (i.e pcm0), then .Ar unit is 0 as well. -This number is useful when checking if the mixer's audio card is the default one. +This number is useful when checking if the mixer's audio card is the default +one. .It Fa ndev Number of devices in .Ar devs . .It Fa devmask Bit mask containing all supported devices for the mixer. -For example, if device 10 is supported, then the 10th bit in the mask will be set. +For example, if device 10 is supported, then the 10th bit in the mask will be +set. By default, .Fn mixer_open stores only the supported devices in devs, so it is very unlikely this mask will @@ -318,23 +319,27 @@ opens the default mixer (hw.snd.default_unit). The .Fn mixer_close function frees resources and closes the mixer device. -It is a good practice to always call it when the application is done using the mixer. +It is a good practice to always call it when the application is done using the +mixer. .Ss Manipulating the mixer The .Fn mixer_get_dev and .Fn mixer_get_dev_byname -functions select a mixer device, either by its number or by its name respectively. -The mixer structure keeps a list of all the devices, but only \ -one can be manipulated at a time. -Each time a new device is to be manipulated, one of the two functions has to be called. +functions select a mixer device, either by its number or by its name +respectively. +The mixer structure keeps a list of all the devices, but only one can be +manipulated at a time. +Each time a new device is to be manipulated, one of the two functions has to be +called. .Pp The .Fn mixer_set_vol function changes the volume of the selected mixer device. The .Ar vol -parameter is a structure that stores the left and right volumes of a given device. +parameter is a structure that stores the left and right volumes of a given +device. The allowed volume values are between MIX_VOLMIN (0.0) and MIX_VOLMAX (1.0). .Pp The @@ -355,7 +360,8 @@ Toggle the device's mute (e.g mute if unmuted and unmute if muted). The .Fn mixer_mod_recsrc function modifies a recording device. -The selected device has to be a recording device, otherwise the function will fail. +The selected device has to be a recording device, otherwise the function will +fail. The .Ar opt parameter has to be one of the following options: From nobody Sat May 25 20:18:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VmtWb6kn8z5LY8X; Sat, 25 May 2024 20:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VmtWb3vsgz4qY1; Sat, 25 May 2024 20:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716668283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bWukvAPs5fAdlwwI83k5GBk0VRbBYJAF2q+qhdHmk8=; b=aZ2JcLSK5Z4acJNsETbU3TZ3O+EoeNZM4/n77K3XTzizZMHZwExyKJWGUrH0l3zJnHt8Eh UGs7o3eFKmyzLcmtQbq16iERyKsR9b80UZ4x+zZiyJiSer9EPs8fZNbystHMCGre3bQpgM woTB4+kv/rXboQPj8T6dTMF5YNp2sXbQUhfLZjBJQTeRSoBWZXsTpZgYz+eFtbiyVPbx7y jVU/IYSoqrDui/mZt/Y+8EDh68SJuGpuYbbZqMPb4Oyn7V901djZv9ZPzkHN7Kh4x4Hqw4 QtiQXnfZYphIEjNUGfjhwvDTEk9FlNxlAEa+0k1pj0KOIF2cXAqNddP9pRSYUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716668283; a=rsa-sha256; cv=none; b=mmtRvUwRtADV05ouKOmDPd+RBcYZ4/T0MLp2c/5d1dF+xaT3T8psptItUTrp0wcGjtuINE 2GSju9ijOnKA/XIrklKSGvJ4rdT3iandS2yLQg4szwkwpqxF7CGXtdDJbZst7cjypxxiUc JHrMuWBPG/KMZOTDsbt3Rm6wfjXvdr+DBf9dTu2GveK2R2oxkN3nVM2mcq8g+SbpT7nP2L nUvoCpGW0rZih8P2yNAy9cIpbG6/09Wic3nad9aoJageA3w7S0Y9k6OjjJT1aOhoPASs7g MthUHviBGQxc3QkU0RQhE7Cd6dXHg2I81rOjawmV1jgmQIJMOzk/oIEHzrMnqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716668283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bWukvAPs5fAdlwwI83k5GBk0VRbBYJAF2q+qhdHmk8=; b=wKmtLus0AYRXgYAar7SrGJn8geITvwIe1jrXbwW0RVIvAEc7Vd1HAwt6J0AYqyWi48QgG9 FhfU43ogLroLfDDDuLWywm3CHjLbN/TdmFx2hrUAFqCe+QI1RJZFCiE6x1RrhUcl58mGbX BlctrdjqY2EZ5Gh8MD39se+yi3hq9h6RxDf7zwApqwlcsba9HRql69IoR+wNedibemrM3+ yKP5W1IQfZEAFoSV/QqHOv60HWHZGmYh8C7XvoicBIIbNqvQl0tMf6T5nwy9L7dIQwJ0lp ZIY6puL6ppEV/A9eCcVTRUqGCI23lz5KA9DuN0x1iFc5NfOLq8o+qKP1aE7fzA== 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 4VmtWb3D5ZzWBD; Sat, 25 May 2024 20:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44PKI3NS015679; Sat, 25 May 2024 20:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PKI3L3015676; Sat, 25 May 2024 20:18:03 GMT (envelope-from git) Date: Sat, 25 May 2024 20:18:03 GMT Message-Id: <202405252018.44PKI3L3015676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric <dim@FreeBSD.org> Subject: git: cadd2ca21765 - main - Merge commit d0be944aa511 from llvm-project (by Simon Pilgrim): List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cadd2ca21765ebcb95b77ec94977b4e74e1edc1b Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cadd2ca21765ebcb95b77ec94977b4e74e1edc1b commit cadd2ca21765ebcb95b77ec94977b4e74e1edc1b Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-05-25 17:52:15 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-05-25 19:12:29 +0000 Merge commit d0be944aa511 from llvm-project (by Simon Pilgrim): [X86] Add slow div64 tuning flag to Nehalem target (#91129) This appears to have been missed because later cpus don't inherit from Nehalem tuning much. Noticed while cleaning up for #90985 Merge commit 8b400de79eff from llvm-project (by Simon Pilgrim): [X86] Enable TuningSlowDivide64 on Barcelona/Bobcat/Bulldozer/Ryzen Families (#91277) Despite most AMD cpus having a lower latency for i64 divisions that converge early, we are still better off testing for values representable as i32 and performing a i32 division if possible. All AMD cpus appear to have been missed when we added the "idivq-to-divl" attribute - this patch now matches Intel cpu behaviour (and the x86-64/v2/3/4 levels). Unfortunately the difference in code scheduling means I've had to stop using the update_llc_test_checks script and just use old-fashioned CHECK-DAG checks for divl/divq pairs. Fixes #90985 This fixes possibly worse runtime performance on AMD Zen hardware, when using -march=znver4 (or any other znver), as opposed to -march=x86-64-v4 or the baseline -march=x86-64. A similar fix is applied for Nehalem. PR: 278908 MFC after: 3 days --- contrib/llvm-project/llvm/lib/Target/X86/X86.td | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/X86/X86.td b/contrib/llvm-project/llvm/lib/Target/X86/X86.td index e89ddcc570c9..1aff5f9fad97 100644 --- a/contrib/llvm-project/llvm/lib/Target/X86/X86.td +++ b/contrib/llvm-project/llvm/lib/Target/X86/X86.td @@ -867,6 +867,7 @@ def ProcessorFeatures { // Nehalem list<SubtargetFeature> NHMFeatures = X86_64V2Features; list<SubtargetFeature> NHMTuning = [TuningMacroFusion, + TuningSlowDivide64, TuningInsertVZEROUPPER, TuningNoDomainDelayMov]; @@ -1336,6 +1337,7 @@ def ProcessorFeatures { FeatureCMOV, FeatureX86_64]; list<SubtargetFeature> BarcelonaTuning = [TuningFastScalarShiftMasks, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER]; @@ -1358,6 +1360,7 @@ def ProcessorFeatures { list<SubtargetFeature> BtVer1Tuning = [TuningFast15ByteNOP, TuningFastScalarShiftMasks, TuningFastVectorShiftMasks, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER]; @@ -1380,6 +1383,7 @@ def ProcessorFeatures { TuningFastVectorShiftMasks, TuningFastMOVBE, TuningSBBDepBreaking, + TuningSlowDivide64, TuningSlowSHLD]; list<SubtargetFeature> BtVer2Features = !listconcat(BtVer1Features, BtVer2AdditionalFeatures); @@ -1404,6 +1408,7 @@ def ProcessorFeatures { FeatureLWP, FeatureLAHFSAHF64]; list<SubtargetFeature> BdVer1Tuning = [TuningSlowSHLD, + TuningSlowDivide64, TuningFast11ByteNOP, TuningFastScalarShiftMasks, TuningBranchFusion, @@ -1483,6 +1488,7 @@ def ProcessorFeatures { TuningFastScalarShiftMasks, TuningFastVariablePerLaneShuffle, TuningFastMOVBE, + TuningSlowDivide64, TuningSlowSHLD, TuningSBBDepBreaking, TuningInsertVZEROUPPER, From nobody Sun May 26 05:36:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vn6vl3y6xz4fjhC; Sun, 26 May 2024 05:36: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vn6vl1Zhhz4mH8; Sun, 26 May 2024 05:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716701779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Os9auUrjZqg6Pds1kwcNaYgRq9UeROGaoa61ptA/Qs=; b=PNmeDSvItvncNlw/WY9Tq3oVdY1CFBEoKqokG7f/1TNjV9/8B3HQVpqiDL/+YorldjC+EC cMYWQpRh8TZOSv64bii+QMCCL1uqhcIlwxehmEmfek0eYTVFeB8fiXILe70ACfp1808W/v 8oVfXf+s6Txt/mmhjncC5FPFQGprlmwVGrX1jIE/PRgqUDBXYrbHmI/6hrjqWT212JAnWA BYngt8laKLWBBZkxo6QEBPTCSwnDRDshtux7Uey67zfAIi1BipGwy7zcdNKuk5qjSvwtCi pjzIZLWNgNYWDQ0tL1hBrh9imx5X61M4WAFydcqpFSO5Oni1UIpTFnqdOYiM9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716701779; a=rsa-sha256; cv=none; b=q5L/sFjSDUF+R5FE78RrNGPwj9ZYYuzoniaxGjoiapr4EUOw9Pl/aG6GQYEQ/hEh/l4k22 Tu3csCq4eLDvOgQBdH3AtRUnMppZo4OODG5dBHZj5Qae03nUIViyBc7Fyw+CjKO15KrAzv p/Y/aOqA/ycj/6/C8mwduCVNFU8wh8QC91HetkF/hQCSz5yxQ/R8XJCm/X+4yrZ6ja74XI V7ZdND5aT3bWqcPy1pbKGrKOXkf81jD8AIzyyJfXt1jZJ3oB85K+L6k1sitvXjrBOfoTA8 Fw27rbPNKuOt1ktZbFjVGQt+kEd1f16aq8dXYnIh0lclCeZLg0ydrDp8UYX4dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716701779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Os9auUrjZqg6Pds1kwcNaYgRq9UeROGaoa61ptA/Qs=; b=Z6aUjCMJazmPQKWS5H6h/jkcN1MUMuc593CXrZnXSvzsCmepopJbDDi1Vh3bKcEBZPiUFt xXkinBmAL4SQigMI4PEjg1lubGgXNryCoTAZ5KvyP0XKhdMfEAqjDATLGT4CqImsiKEvMV zeWpdtPFFn9OAuw1U+Y83LL5OLjDBB4a5rAAIPEP3xGCqB5hUKCLk+WoEzu8KGk4jog7/Y Ug9JpJjlBZgXYbLJMHyWrxzqC6mcNDn7jwVFhfwVCNx96sj+AlQ2cIZOKM5f/3lFVQ3m7d aygQmvq3Jc7cKulT9n8fIsYzm1J+fGak574OmmZKINk58RrsDos5972XG5DfNQ== 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 4Vn6vl1B3VzndK; Sun, 26 May 2024 05:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44Q5aJtf060710; Sun, 26 May 2024 05:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44Q5aJ4r060708; Sun, 26 May 2024 05:36:19 GMT (envelope-from git) Date: Sun, 26 May 2024 05:36:19 GMT Message-Id: <202405260536.44Q5aJ4r060708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider <wosch@FreeBSD.org> Subject: git: 432c0128bd3d - stable/14 - man: the exists function needs to validate the first parameter List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 432c0128bd3da3f7800e9fa525d677f8fb99d7a1 Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=432c0128bd3da3f7800e9fa525d677f8fb99d7a1 commit 432c0128bd3da3f7800e9fa525d677f8fb99d7a1 Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2024-05-20 16:02:21 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2024-05-26 05:34:40 +0000 man: the exists function needs to validate the first parameter This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones <jamie@catflap.org> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion) --- usr.bin/man/man.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index cd047862727d..a4d23ff52aef 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -195,6 +195,10 @@ decho() { # Returns true if glob resolves to a real file and store the first # found filename in the variable $found exists() { + if [ -z "$1" ]; then + return 1 + fi + local IFS # Don't accidentally inherit callers IFS (breaks perl manpages) From nobody Sun May 26 05:44:18 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vn74z1jXcz4fkSd; Sun, 26 May 2024 05:44: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vn74z0SGHz4mrY; Sun, 26 May 2024 05:44:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716702259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXSojnX3gUMvADZLOYZd7NROmVYIve1pIdMr5nFif3M=; b=ZpEujaqwvmAViazdJ73Yn/Y5IQ+t3tLt5H6kMWwjQiL9Q79IfvwPd7Ycf19M9hTF3WnI7z P6aE8YYp9PhO7MEATYFteoNP5VzLLSvELjtqQ9SA9g0Tf/wXeUdg98/zjl/2KdISXuPqpI /uyYWp5j74PWfax+FTxvMAAzQgZzWC9OnW+qlm/9h7YjtQ73Qq6sT2Y+NdDgzPxMR7Gtr4 m2UgFYhAF39iVbn+Dax+I11VeELIrRhvJioFVhjc+SkATa7cPqIIL9NweQke/x1RoYmbAw +gwOdc0oHorqDXhr3VpnF2Y0baszee1cUvXJsgYhMAsp19NJEwR3U6LZ5tu3NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716702259; a=rsa-sha256; cv=none; b=neEpSm4BJizuSz/AESSkgaDBAkRQ4zjnlBTXDFYwP6MoQI48Y3UqtbS7qnhSXta41jEHMn cEFhAR3YeyKkayQcreZSw/SDxj53QjQe+dmFWma2zMFobOWjYd4kymAtsr6s+BKACk62he bmbP6NxeCH8kznKbpmxwszR08Kv4P0bBLxL8ImefO44b0ePgroo8QFP29k38Qlpl4GI69d OGEQkeP8v8z3sLjtTLP9mY9Md8bCIliBNlxYrMKVJ5Kw9UklOylAgH3Oyeu7x9Ej9x+4ZC 4mbGkCKapvEgRpd1/CSPoWIXD2WwTnYBRogrQKdIAFgbINYtO/CI1VeTrlKzWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716702259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZXSojnX3gUMvADZLOYZd7NROmVYIve1pIdMr5nFif3M=; b=sScUCdHkId7AwFJSpfuWrGurYQQeewMWQwhRuZ7lZEhRK4gp91mMpp2/BtsWNKr5+Awexv T15ZdthmQhYRAc+8FYAAk5Rn4ru7VBoWmsjADP94a/H0sXzg1BvAuIiwCAy9EQjqv0KSIF efyX7shx0AZKf/eWsFznwipKW8Q4x32uCEKYFYb7gcbvW9R8gixea/euUYc9b0ejOCf2O0 VVna743RaDb9pgyZEK3pQN33fsX1XwY7BQ+kwh5jlR7TnDvSrCOyX3by7BD5mJzGlVzHKG pTaVtwmUCIrDFoMDrrJ9039ImtpENi4Fdi2PZ3mXZkIVmI8VV2fj3az7m+wopQ== 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 4Vn74y6svgzp9M; Sun, 26 May 2024 05:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44Q5iISv076853; Sun, 26 May 2024 05:44:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44Q5iIEY076850; Sun, 26 May 2024 05:44:18 GMT (envelope-from git) Date: Sun, 26 May 2024 05:44:18 GMT Message-Id: <202405260544.44Q5iIEY076850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider <wosch@FreeBSD.org> Subject: git: 36294c97c147 - stable/13 - man: the exists function needs to validate the first parameter List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 36294c97c147733c3f4408cb6ecfacb8de8cc282 Auto-Submitted: auto-generated The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=36294c97c147733c3f4408cb6ecfacb8de8cc282 commit 36294c97c147733c3f4408cb6ecfacb8de8cc282 Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2024-05-20 16:02:21 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2024-05-26 05:43:45 +0000 man: the exists function needs to validate the first parameter This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones <jamie@catflap.org> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion) --- usr.bin/man/man.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index ca9b002dfc08..33be10cd5bd6 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -195,6 +195,10 @@ decho() { # Returns true if glob resolves to a real file and store the first # found filename in the variable $found exists() { + if [ -z "$1" ]; then + return 1 + fi + local IFS # Don't accidentally inherit callers IFS (breaks perl manpages) From nobody Sun May 26 05:51:56 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vn7Fm3WTYz4flRy; Sun, 26 May 2024 05:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vn7Fm2sZWz4nk2; Sun, 26 May 2024 05:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716702716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ja/VOWPNmzcO9+NOevzVXM3H48cbrc4YysxjBDk5zpk=; b=rftFMf38AhlFfC41PeatWxd93dq+R/QcFABiHXfMPQ46LABabBiZlWjqm2rOBPn+0pUaVA njkCz186yFQ4/tMt+2yL6dlOWuaKoJO60Ds6EcuaTMoV2q7A5Gu8f98wmTJFjzGulU6JWc I2KB+uvxYhZr0GV+bA8KM9gRSj/P1GTENyENR88NQiuVYOPUjf/cdeukS9MQMH2OJvdrd0 0jLVPFFu8LZJGqqvE+cVn7DEN71zeHs3Rn1h1cpRyydHhhEwTT6BsD0sRw4gev8RkMyffc XlsYgNcIwQa3yMqGsOLFPoAijUQflEeePNdhOTDujlCyQpIYO3r2ABB7WjNHLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716702716; a=rsa-sha256; cv=none; b=fhnw9+ukQHyWlMpF4fbPMqB/nTOLYYv5qJkUfu7C/9+oFVZnRMSFA4srARDTbK4VvczFWL obD+Z6/ktmD6j87LVj+YEXs/7pp0I2zJ6d4Hggl1Am/ejrtz+w8IrFPydgcrLxGnckLhAm m5vzsalYD9Vz0z9ZRpSMFdgEYWifj33bf1ovJ4RWXMSGNRO63HPuB0LMRIdh8lWnXRvBHS nlZQxw3ZZWt+YKiW4HRnQ8Ybh6Pg87Qji8tqLkDAx1ZHBPvOIhy7gPpgjqHoTHT6h6BcLc 87PqCFPz79EDnfZX2uDk6J+BQZ/joYPNDK/i3KoxV2zzxvGki72pXB4AXeGlkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716702716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ja/VOWPNmzcO9+NOevzVXM3H48cbrc4YysxjBDk5zpk=; b=mYsD8VOdywTF7Yi4EhfITU9RKmQUhdDCJFiplZij59c2pCu3Qp3on0creOr5k5gyGCEhfu 9i2q8fvaqnLH6G2xNKB0kM8BaZxdqdtQRxD6/UMFUqvV0v9JGAF0H+l47Maoc697eNjEKY FwkLEEcOJtRT8d4yxPGnIxkHSefiUg6828Sd7A0RIJVmL8ENCSFasYKY5+5x9rz8qE5NMl 3CXGkBn2x1jXk3cFj2eRafA2pYt4y/GRoYTkx//ApVS8wx9MryLI4P/j6/1KXtd0+h3S5F /X5L+ApdEuGra6Vol2aSkIlamxrtG9XxQKLmasr8oMwotitehQyUpS2unh/B7w== 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 4Vn7Fm2T5Hznf8; Sun, 26 May 2024 05:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44Q5puGh092326; Sun, 26 May 2024 05:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44Q5pu57092323; Sun, 26 May 2024 05:51:56 GMT (envelope-from git) Date: Sun, 26 May 2024 05:51:56 GMT Message-Id: <202405260551.44Q5pu57092323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider <wosch@FreeBSD.org> Subject: git: 73eb53813fe3 - main - man(1) needs to check for .so files not only in the first line PR: 279182 List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73eb53813fe3a2245edbeb670902e4bb9d41e288 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=73eb53813fe3a2245edbeb670902e4bb9d41e288 commit 73eb53813fe3a2245edbeb670902e4bb9d41e288 Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2024-05-26 05:48:40 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2024-05-26 05:48:40 +0000 man(1) needs to check for .so files not only in the first line PR: 279182 Some manual pages have a copyright notice or commit id before including other files with the .so macro. We need to skip comments and empty lines at the beginning of the manpage while checking for the first .so macro. MFC after: 1 week --- usr.bin/man/man.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index af638527f497..24a0464689cc 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -322,7 +322,7 @@ man_check_for_so() { # We need to loop to accommodate multiple .so directives. while true do - line=$($cattool "$manpage" 2>/dev/null | head -n1) + line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$') case "$line" in .so*) trim "${line#.so}" decho "$manpage includes $tstr" From nobody Sun May 26 13:52:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VnKvm5lB9z5LTgp; Sun, 26 May 2024 13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnKvm5Fp6z4jxx; Sun, 26 May 2024 13: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=1716731524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWGkIGr3sh0vAVVN/1KoDJDIs4b4kiaKEX2dn8bUcVs=; b=dAWybWWbweZ6oaxuv9BWzDYFZY6u/JDO/ZUBh2WNgwGNZC/nmYqSFUxKRRjBwgVm6unqjq crHl9Y04boY4ihYE5yD2uIkM7D7cU6bIussBrHcYG8jZqSEtKzao2XojeM+Z9Dquc+4leI 98IEaa4prgXHQGeIV5Q3NULvWyAJL4BTLq1bZqoLeq5wTMGzynxDBMMkPVvdCjuMI9ea6V L6yYKbVRiSPwzCBLY0tQy51B+bOc71L/DjG1iOyZl2HPC/ZCZxTHQ5nTUJI3vv7O4fg/g1 jNb0EWzNgno2uSjwaqPNWUoVAddIu6+jDWohES3xqWcz/Od78cCNgil5Bb0k4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716731524; a=rsa-sha256; cv=none; b=JHW5Cb80/otXEkZRjVQWPLRpNMdqTB3j7bZsQMnpUPLJkxcPSXY9IfrgX+DsEJ2L2ltWvN lNjr74QSbeKK9ethXSUSbhyN9C9H8U3IsQ3Og54YabmSQy1JPNjMe/Wuy7AzyVUlKuwhBI SWv5RWhKuTWlR5pylQBmM0cfVkk7c0p9pO1UxxX7QYtpADO4Oedze1lxu6PpeJjGeJHDbe z8W7ak3VCc3d+qnG/Z9/uyiTjbnAZ1F7uEVkKGSL877TWehAZ9bCeit76yj7ZlrjktiDTu aV0W76fwDmVVDe9wrJde/hhXyp72kjcnpHiSsfbFu1L9v27d6NPKaB9TNnFEhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716731524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWGkIGr3sh0vAVVN/1KoDJDIs4b4kiaKEX2dn8bUcVs=; b=d+lwiSSWdJ8GJ57o65abdgMCnFPmf7kN9l5ncvRFR8LviDi2sZw46tH18jdoZqG7WPAgl5 Tyu8SxIT/1VAYDemm9Bmcyf7lt4epv8RGC10qZt6C8u+QhX1bAk3sz8y/tpAQDKdYi8OFw iVO/Jz/iI9/y5ZPgSwRzrVDfO5NEv2Bk7kYSyktEXosHdQzgktiors/bUGbf4mQMPub4RR 8lmEpRepZubCBWIsLumXNMD3DhGG1kKm6QLp9069lVcSXZousejpBdkDWDwcSY1nEFyJR9 +TUZmHAMmpHcDwC9ZAm+6R/uOaKVq4+KBd0x6dHYbdGXAGszTAvQ3uVuGHSVHQ== 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 4VnKvm4sFGz12Sb; Sun, 26 May 2024 13:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44QDq4cM098935; Sun, 26 May 2024 13:52:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QDq4vS098932; Sun, 26 May 2024 13:52:04 GMT (envelope-from git) Date: Sun, 26 May 2024 13:52:04 GMT Message-Id: <202405261352.44QDq4vS098932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis <christos@FreeBSD.org> Subject: git: 38286d9f6828 - stable/14 - pcm: centralize 32-bit ioctl compat List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: <mailto:dev-commits-src-all+help@freebsd.org> List-Post: <mailto:dev-commits-src-all@freebsd.org> List-Subscribe: <mailto:dev-commits-src-all+subscribe@freebsd.org> List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@freebsd.org> X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 38286d9f68284e68ac8764b19f7862fd28acc689 Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=38286d9f68284e68ac8764b19f7862fd28acc689 commit 38286d9f68284e68ac8764b19f7862fd28acc689 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2024-05-23 16:14:36 +0000 Commit: Christos Margiolis <christos@FreeBSD.org> CommitDate: 2024-05-26 13:51:33 +0000 pcm: centralize 32-bit ioctl compat Move all handlng of struct sndstioc_nv_arg(32) to sndstat_ioctl() and make the functions that actually do the work take a buffer and size or size pointer. The 32-bit compat work is minimal so just inline it. Remove checks that we've got a 32-bit process for 32-bit ioctls. We don't check that default ioctls are from 64-bit processes on 64-bit systems. Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D45307 (cherry picked from commit fb9013f215211f013eccc54786f299e39a1f8773) --- sys/dev/sound/pcm/sndstat.c | 95 ++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 66 deletions(-) diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 6880ce383ba4..6670a1e43aac 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -45,9 +45,6 @@ #include <sys/nv.h> #include <sys/dnv.h> #include <sys/sx.h> -#ifdef COMPAT_FREEBSD32 -#include <sys/sysent.h> -#endif #include <dev/sound/pcm/sound.h> #include <dev/sound/pcm/pcm.h> @@ -622,10 +619,9 @@ sndstat_refresh_devs(struct sndstat_file *pf) } static int -sndstat_get_devs(struct sndstat_file *pf, caddr_t data) +sndstat_get_devs(struct sndstat_file *pf, void *arg_buf, size_t *arg_nbytes) { int err; - struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data; SNDSTAT_LOCK(); sx_xlock(&pf->lock); @@ -664,22 +660,22 @@ sndstat_get_devs(struct sndstat_file *pf, caddr_t data) SNDSTAT_UNLOCK(); - if (!arg->nbytes) { - arg->nbytes = pf->devs_nbytes; + if (*arg_nbytes == 0) { + *arg_nbytes = pf->devs_nbytes; err = 0; goto done; } - if (arg->nbytes < pf->devs_nbytes) { - arg->nbytes = 0; + if (*arg_nbytes < pf->devs_nbytes) { + *arg_nbytes = 0; err = 0; goto done; } - err = copyout(pf->devs_nvlbuf, arg->buf, pf->devs_nbytes); + err = copyout(pf->devs_nvlbuf, arg_buf, pf->devs_nbytes); if (err) goto done; - arg->nbytes = pf->devs_nbytes; + *arg_nbytes = pf->devs_nbytes; free(pf->devs_nvlbuf, M_NVLIST); pf->devs_nvlbuf = NULL; @@ -850,25 +846,24 @@ sndstat_dsp_unpack_nvlist(const nvlist_t *nvlist, struct sndstat_userdev *ud) } static int -sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data) +sndstat_add_user_devs(struct sndstat_file *pf, void *nvlbuf, size_t nbytes) { int err; nvlist_t *nvl = NULL; const nvlist_t * const *dsps; size_t i, ndsps; - struct sndstioc_nv_arg *arg = (struct sndstioc_nv_arg *)data; if ((pf->fflags & FWRITE) == 0) { err = EPERM; goto done; } - if (arg->nbytes > SNDST_UNVLBUF_MAX) { + if (nbytes > SNDST_UNVLBUF_MAX) { err = ENOMEM; goto done; } - err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl); + err = sndstat_unpack_user_nvlbuf(nvlbuf, nbytes, &nvl); if (err != 0) goto done; @@ -914,52 +909,17 @@ sndstat_flush_user_devs(struct sndstat_file *pf) return (0); } -#ifdef COMPAT_FREEBSD32 -static int -compat_sndstat_get_devs32(struct sndstat_file *pf, caddr_t data) -{ - struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data; - struct sndstioc_nv_arg arg; - int err; - - arg.buf = (void *)(uintptr_t)arg32->buf; - arg.nbytes = arg32->nbytes; - - err = sndstat_get_devs(pf, (caddr_t)&arg); - if (err == 0) { - arg32->buf = (uint32_t)(uintptr_t)arg.buf; - arg32->nbytes = arg.nbytes; - } - - return (err); -} - -static int -compat_sndstat_add_user_devs32(struct sndstat_file *pf, caddr_t data) -{ - struct sndstioc_nv_arg32 *arg32 = (struct sndstioc_nv_arg32 *)data; - struct sndstioc_nv_arg arg; - int err; - - arg.buf = (void *)(uintptr_t)arg32->buf; - arg.nbytes = arg32->nbytes; - - err = sndstat_add_user_devs(pf, (caddr_t)&arg); - if (err == 0) { - arg32->buf = (uint32_t)(uintptr_t)arg.buf; - arg32->nbytes = arg.nbytes; - } - - return (err); -} -#endif - static int sndstat_ioctl( struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { int err; struct sndstat_file *pf; + struct sndstioc_nv_arg *arg; +#ifdef COMPAT_FREEBSD32 + struct sndstioc_nv_arg32 *arg32; + size_t nbytes; +#endif err = devfs_get_cdevpriv((void **)&pf); if (err != 0) @@ -967,27 +927,30 @@ sndstat_ioctl( switch (cmd) { case SNDSTIOC_GET_DEVS: - err = sndstat_get_devs(pf, data); + arg = (struct sndstioc_nv_arg *)data; + err = sndstat_get_devs(pf, arg->buf, &arg->nbytes); break; #ifdef COMPAT_FREEBSD32 case SNDSTIOC_GET_DEVS32: - if (!SV_CURPROC_FLAG(SV_ILP32)) { - err = ENODEV; - break; + arg32 = (struct sndstioc_nv_arg32 *)data; + nbytes = arg32->nbytes; + err = sndstat_get_devs(pf, (void *)(uintptr_t)arg32->buf, + &nbytes); + if (err == 0) { + KASSERT(nbytes < UINT_MAX, ("impossibly many bytes")); + arg32->nbytes = nbytes; } - err = compat_sndstat_get_devs32(pf, data); break; #endif case SNDSTIOC_ADD_USER_DEVS: - err = sndstat_add_user_devs(pf, data); + arg = (struct sndstioc_nv_arg *)data; + err = sndstat_add_user_devs(pf, arg->buf, arg->nbytes); break; #ifdef COMPAT_FREEBSD32 case SNDSTIOC_ADD_USER_DEVS32: - if (!SV_CURPROC_FLAG(SV_ILP32)) { - err = ENODEV; - break; - } - err = compat_sndstat_add_user_devs32(pf, data); + arg32 = (struct sndstioc_nv_arg32 *)data; + err = sndstat_add_user_devs(pf, (void *)(uintptr_t)arg32->buf, + arg32->nbytes); break; #endif case SNDSTIOC_REFRESH_DEVS: