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 }, };